****** Restricting Ferret paths to bench directory ******
Benchmark scripts that will be run:
   bn_syntax.jnl
   bn_dollar.jnl
   bn_grave.jnl
   bn_letd.jnl
   bn_if.jnl
   bn_expressions.jnl
   bn_geometry.jnl
   bn_output.jnl
   bn_in_plane.jnl
   bn_compress.jnl
   bn_interpolate.jnl
   bn_regrid.jnl
   bn_ez.jnl
   bn_plot.jnl
   bn_curv.jnl
   bn_symbols.jnl
   bn_comma_delimited.jnl
   bn_dynamic_grids.jnl
   bn_cdf.jnl
   bn_regrid_transforms.jnl
   bn_axis_limits.jnl
   bn_movie.jnl
   bn_ez_order.jnl
   bn_user.jnl
   bn_stream.jnl
   bn_mc.jnl
   bn_negative_t.jnl
   bn_xact_regrid.jnl
   bn_gc_functions.jnl
   bn491_bug_fixes.jnl
   bn_odd_variable_name.jnl
   bn_test_stream.jnl
   bn_define_axes.jnl
   bn_pattern.jnl
   bn_polygon.jnl
   bn500_bug_fixes.jnl
   bn_sample.jnl
   bn_strides_revs_perms.jnl
   bn_non_COARDS_netCDF.jnl
   bn_cache_hits.jnl
   bn_regrid_to_user.jnl
   bn_calendar.jnl
   bn_dash_dot.jnl
   bn_flowlines.jnl
   bn_logaxes.jnl
   bn_internal_external_functions.jnl
   bn_modulo_strides.jnl
   bn_axis_viewports.jnl
   bn_strings.jnl
   bn_axcontrol.jnl
   bn_vec_curv.jnl
   bn_delimited_read.jnl
   bn541_bug_fixes.jnl
   bn_cancel_axes.jnl
   bn542_bug_fixes.jnl
   bn_subspan_modulo.jnl
   bn_dots.jnl
   bn_lev_symbols.jnl
   bn_mode_logo_lab.jnl
   bn_modulo_attribute.jnl
   bn550_bug_fixes.jnl
   bn551_bug_fixes.jnl
   bn_multi_line_labels.jnl
   bn552_bug_fixes.jnl
   bn_set_var_scale_off.jnl
   bn_longvarnames.jnl
   bn_shakey.jnl
   bn_eof_4d.jnl
   bn_abstract_axis_names.jnl
   bn_many_polygons.jnl
   bn_fill_irregular.jnl
   bn_xml_output.jnl
   bn_test_nan.jnl
   bn553_bug_fixes.jnl
   bn_graticules.jnl
   bn_repeat_range.jnl
   bn554_bug_fixes.jnl
   bn_bounds.jnl
   bn_all_leap.jnl
   bn570_bug_fixes.jnl
   bn_modstats.jnl
   bn_mc_vary_scale.jnl
   bn_plot_nokey.jnl
   bn580_bug_fixes_noremote.jnl
   bn_inf_levels.jnl
   bn_regulart.jnl
   bn_labwid.jnl
   bn_redefine_taxis_mc.jnl
   bn_illegal_axisname.jnl
   bn_exit_script.jnl
   bn_exit_cycle.jnl
   bn_curv_mod.jnl
   bn_shade_keycont.jnl
   bn581_bug_fixes.jnl
   bn_tab_comma_multivar.jnl
   bn_element_functions.jnl
   bn_long_revision_num.jnl
   bn_window_title.jnl
   bn_last_error.jnl
   bn_deg_min.jnl
   bn_dp_readscale.jnl
   bn_bounds_defineax.jnl
   bn_attributes.jnl
   bn_transforms.jnl
   bn_variance.jnl
   bn_linecolors.jnl
   bn_cdf_errmsg_noremote.jnl
   bn600_bug_fixes.jnl
   bn601_bug_fixes.jnl
   bn_set_strides.jnl
   bn_lsl_lowpass.jnl
   bn_return_xmod_tmod.jnl
   bn602_bug_fixes.jnl
   bn_modnbd.jnl
   bn_fifty_files.jnl
   bn603_bug_fixes.jnl
   bn_set_var_name.jnl
   bn_memory_symbol.jnl
   bn605_bug_fixes.jnl
   bn608_bug_fixes.jnl
   bn_shade_trim.jnl
   bn_mode_nlevels.jnl
   bn61_bug_fixes.jnl
   bn611_bug_fixes.jnl
   bn_no_valid_on_plot.jnl
   bn_median.jnl
   bn614_bug_fixes.jnl
   bn_mode_nodata_lab.jnl
   bn_proleptic_gregorian_calendar.jnl
   bn_string_ngd_nbd.jnl
   bn_cat_string.jnl
   bn_sort_strings.jnl
   bn_samplexyt.jnl
   bn_last_go_file.jnl
   bn_cancel_upcase_uservar.jnl
   bn_cdf_keepax.jnl
   bn_keep_axisnames.jnl
   bn_key_label_minmax.jnl
   bn62_bug_fixes.jnl
   bn_convolve.jnl
   bn_tax_tstep.jnl
   bn_grads_z.jnl
   bn_clock_syms.jnl
   bn63_bug_fixes.jnl
   bn_axis_reversed_syms.jnl
   bn_isdepth.jnl
   bn_var_hist_levels.jnl
   bn64_bug_fixes.jnl
   bn_long_grid_names.jnl
   bn_xml_repl.jnl
   bn65_bug_fixes.jnl
   bn_txtype_dmy.jnl
   bn_n_open_dsets_sym.jnl
   bn_multi_decade.jnl
   bn_show_xml_file.jnl
   bn66_bug_fixes.jnl
   bn_netcdf4.jnl
   bn_scat2grid_bin.jnl
   bn_axis_dir_symbols.jnl
   bn663_bug_fixes.jnl
   bn_set_axis_regular.jnl
   bn_set_cancel_redirect.jnl
   bn_min_max_smoothers.jnl
   bn_vector_symbols.jnl
   bn_variance_large.jnl
   bn_labnum_calendar.jnl
   bn665_bug_fixes.jnl
   bn_floatstr.jnl
   bn67_bug_fixes.jnl
   bn_NaN_note.jnl
   bn671_bug_fixes.jnl
   bn68_bug_fixes.jnl
   bn_ifv.jnl
   bn_randu2_randn2.jnl
   bn_axis_cf.jnl
   bn_repeated_coords.jnl
   bn_xml_header.jnl
   bn_eof_simple.jnl
   bn_eof_simple2.jnl
   bn_interpolate_6d.jnl
   bn_regrid_6d.jnl
   bn_syntax_6d.jnl
   bn_expressions_6d.jnl
   bn_direction_fcns_6d.jnl
   bn_regrid_transforms_6d.jnl
   bn_aggregate_e.jnl
   bn_6d_lab_mode.jnl
   bn682_bug_fixes.jnl
   bn683_bug_fixes.jnl
   bn_outtype.jnl
   bn_ribbon_plot.jnl
   bn_descr_4digit.jnl
   bn_axis_outtype.jnl
   bn_axis_nonmonotonic.jnl
   bn_vec_mod.jnl
   bn685_bug_fixes.jnl
   bn_dsg_e_x.jnl
   bn_nco_append.jnl
   bn_nobounds.jnl
   bn_write_integer_att.jnl
   bn_descriptor_mc.jnl
   bn_plot_color_only.jnl
   bn_vtree.jnl
   bn686_bug_fixes.jnl
   bn_long_symnames.jnl
   bn_strdim.jnl
   bn_single_colorlev.jnl
   bn69_bug_fixes.jnl
   bn_bad_axis_bounds.jnl
   bn_enter_exit_GO.jnl
   bn_stddev.jnl
   bn_set_axis_name.jnl
   bn691_bug_fixes.jnl
   bn_append_dsg.jnl
   bn_global_atts.jnl
   bn_conventions_history.jnl
   bn_center_key_labels.jnl
   bn_wgt_transform.jnl
   bn_show_outfile.jnl
   bn_date1900_array.jnl
   bn_spawn_size.jnl
   bn_polygon_log.jnl
   bn694_bug_fixes.jnl
   bn_permute_ascii.jnl
   bn_lon_lat_time_string.jnl
   bn_save_justdim.jnl
   bn_time2d.jnl
   bn_legend_labels.jnl
   bn_DQ.jnl
   bn695_bug_fixes.jnl
   bn_f_tax_fcns.jnl
   bn_fmrc.jnl
   bn_return_defined.jnl
   bn_can_var_noerr.jnl
   bn_annotate.jnl
   bn_auxiliary.jnl
   bn_plot_ribbon_gaploc.jnl
   bn_time_short_axes.jnl
   bn_floatstr_extended.jnl
   bn696_bug_fixes.jnl
   bn_bin_regrid.jnl
   bn697_bug_fixes_noremote.jnl
   bn_aggregate_t_noremote.jnl
   bn_unquoted_args_noremote.jnl
   bn_long_lists.jnl
   bn_show_uvar_grid.jnl
   bn_aggregate_f.jnl
   bn_aggregate_tef.jnl
   bn_dataset_qualifier.jnl
   bn_speedtest.jnl
   bn_show_noupcase.jnl
   bn_letd_attributes.jnl
   bn_list_clim_axes.jnl
   bn_climatology_attr.jnl
   bn_plot_along.jnl
   bn_show_commands.jnl
   bn_plot_decimate.jnl
   bn_auto_tprec_noremote.jnl
   bn_coordvars_atts.jnl
   bn710_bug_fixes_noremote.jnl
   bn_delim_datetime.jnl
   bn_aggregate_u.jnl
   bn_ez_noupcase.jnl
   bn_spawn_fail.jnl
   bn_ave_of_ave.jnl
   bn_agg_member_syntax.jnl
   bn_true_monthly.jnl
   bn720_bug_fixes.jnl
   bn_compressed_gather.jnl
   bn_dynamic_gather.jnl
   bn_stat_precision.jnl
   bn_plot_vs_with_time.jnl
   bn_dot_product.jnl
   bn_cache_management.jnl
   bn_transp_choose.jnl
   bn_iin_regrid.jnl
   bn721_bug_fixes.jnl
   bn722_bug_fixes.jnl
   bn_tseries_modulo.jnl
   bn_huge_axis.jnl
   bn_save_as_global.jnl
   bn74_bug_fixes.jnl
   bn_clim_special.jnl
   bn_let_like.jnl
   bn_def_axis_like.jnl
   bn_box_edges_fcn.jnl
   bn_hi_res_time.jnl
   bn_A_I_format.jnl
   bn_center_keylab.jnl
   bn741_bug_fixes.jnl
   bn_use_agg.jnl
   bn_ens_promote_global.jnl
   bn743_bug_fixes.jnl
   bn_data_squared.jnl
   bn_overlay_graticules.jnl
   bn_mixed_gregorian.jnl
   bn_int64.jnl
   bn_samplexyz.jnl
   bn745_bug_fixes.jnl
   bn_iso8601_time.jnl
   bn_agg_given_taxis.jnl
   bn_tagg_overlaps.jnl
   bn_samplexyzt.jnl
   bn_sample_multi.jnl
   bn_dsg_tseries.jnl
   bn_regrid_to_dsg.jnl
   bn_dsg_feature_mask.jnl
   bn_dsg_repeat_m.jnl
   bn_dsg_traj_plot.jnl
   bn_regrid_from_dsg.jnl
   bn_dsg_use_feature.jnl
   bn_dsg_plot_timeseries.jnl
   bn_dsg_save.jnl
   bn_dsg_transforms.jnl
   bn_dsg_one_e_val.jnl
   bn_dsg_list_comma_tab.jnl
   bn_dsg_if_exprns.jnl
   bn_dsg_subset.jnl
   bn_regrid_to_dsg_prof.jnl
   bn_regrid_to_dsg_traj.jnl
   bn_dsg_save_uvars.jnl
   bn_dsg_point_data.jnl
   bn_dsg_show_grid.jnl
   bn_dsg_no_data.jnl
   bn_dsg_orth_labels.jnl
   bn_dsg_fcn_of_instance.jnl
   bn751_bug_fixes.jnl
   bn_cdf_strlen.jnl
   bn_set_mem_max.jnl
   bn_lineplots_keys.jnl
   bn76_bug_fixes.jnl
   bn_ribbon_set.jnl
   bn_mode_dsg.jnl
   bn_string_type.jnl
   bn_gif_noremote.jnl
   bn_ps.jnl
   bn_all_ef.jnl
   bn_startupfile.jnl
   err700_decimate.jnl
*** Running ferret script: bn_syntax.jnl
! bn401_syntax.JNL
! - test syntax interpretation of Program FERRET
! - major changes for FERRET ver 2.00 5/90
! - changed mode REMOTE to mode STUPID - REMOTE removed in V2.30
! - added semicolon-separated command group processing in V3.00 2/93
! - added mode journal and mode ppllist tests
! - extended mode journal, ppllist, and metafile tests to include paths
! for V4.01 added var1[G=var2[d=dset]] (nested brackets) syntax
! for V4.20 added blanks surrounding colons
!	and tests of "escapes" using back slashes
! for V531 test continuation lines and long input lines
! for v698 interpretation of unknown qualifiers changed -- e.g. say /notaqual
! V698  3/16 *acm* Removed Philander-Seigel code including diagnostic variables,
! pre-defined axes and grids.
 
! SET - SHOW - CANCEL DATA
USE gtbc011
SHOW DATA/BRIEF
     currently SET data sets:
    1> ./data/gtbc011.cdf  (default)
SHOW DATA
     currently SET data sets:
    1> ./data/gtbc011.cdf  (default)
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                     70:72      1:100     1:27      1:3
 SALT     (SALINITY(ppt) - 35) /1000      70:71      1:100     1:27      1:3
 U        ZONAL VELOCITY                  69:72      1:100     1:27      1:3
 V        MERIDIONAL VELOCITY             69:72      1:100     1:27      1:3
 W        VERTICAL VELOCITY               70:71      1:100     1:27      1:3
 TAUX     ZONAL WIND STRESS               69:71      1:100     ...       1:3
 TAUY     MERIDIONAL WIND STRESS          69:71      1:100     ...       1:3
 PSI      STREAM FUNCTION                 69:73      1:100     ...       1:3
 
SHOW DATA/VARIABLES
     currently SET data sets:
    1> ./data/gtbc011.cdf  (default)
 
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                     70:72      1:100     1:27      1:3
             deg. C on grid PS3DT1 with -1.E+34 for missing data
             X=161W:158W  Y=30S:50N  Z=0:4149  
 SALT     (SALINITY(ppt) - 35) /1000      70:71      1:100     1:27      1:3
             frac. by wt. less .035 on grid PS3DT1 with 0.01 for missing data
             X=161W:159W  Y=30S:50N  Z=0:4149  
 U        ZONAL VELOCITY                  69:72      1:100     1:27      1:3
             cm/sec on grid PS3DU1 with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  Z=0:4149  
 V        MERIDIONAL VELOCITY             69:72      1:100     1:27      1:3
             cm/sec on grid PS3DU1 with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  Z=0:4149  
 W        VERTICAL VELOCITY               70:71      1:100     1:27      1:3
             cm/sec on grid PS3DW1 with -1.E+34 for missing data
             X=161W:159W  Y=30S:50N  Z=5:4149  
 TAUX     ZONAL WIND STRESS               69:71      1:100     ...       1:3
             dynes/cm**2 on grid PS2DU1 with -1.E+34 for missing data
             X=161.5W:158.5W  Y=28.8S:51.4N  
 TAUY     MERIDIONAL WIND STRESS          69:71      1:100     ...       1:3
             dynes/cm**2 on grid PS2DU1 with -1.E+34 for missing data
             X=161.5W:158.5W  Y=28.8S:51.4N  
 PSI      STREAM FUNCTION                 69:73      1:100     ...       1:3
             cm**3/sec on grid PS2DU1 with -1.E+34 for missing data
             X=161.5W:156.5W  Y=28.8S:51.4N  
 
  time range: 15-MAR-1983 10:00 to 15-MAR-1983 12:00
 
SHOW DATA/MEMBERS
     currently SET data sets:
    1> ./data/gtbc011.cdf  (default)
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                     70:72      1:100     1:27      1:3
 SALT     (SALINITY(ppt) - 35) /1000      70:71      1:100     1:27      1:3
 U        ZONAL VELOCITY                  69:72      1:100     1:27      1:3
 V        MERIDIONAL VELOCITY             69:72      1:100     1:27      1:3
 W        VERTICAL VELOCITY               70:71      1:100     1:27      1:3
 TAUX     ZONAL WIND STRESS               69:71      1:100     ...       1:3
 TAUY     MERIDIONAL WIND STRESS          69:71      1:100     ...       1:3
 PSI      STREAM FUNCTION                 69:73      1:100     ...       1:3
 
SHOW DATA/FULL
     currently SET data sets:
    1> ./data/gtbc011.cdf  (default)
 
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                     70:72      1:100     1:27      1:3
             deg. C on grid PS3DT1 with -1.E+34 for missing data
             X=161W:158W  Y=30S:50N  Z=0:4149  
 SALT     (SALINITY(ppt) - 35) /1000      70:71      1:100     1:27      1:3
             frac. by wt. less .035 on grid PS3DT1 with 0.01 for missing data
             X=161W:159W  Y=30S:50N  Z=0:4149  
 U        ZONAL VELOCITY                  69:72      1:100     1:27      1:3
             cm/sec on grid PS3DU1 with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  Z=0:4149  
 V        MERIDIONAL VELOCITY             69:72      1:100     1:27      1:3
             cm/sec on grid PS3DU1 with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  Z=0:4149  
 W        VERTICAL VELOCITY               70:71      1:100     1:27      1:3
             cm/sec on grid PS3DW1 with -1.E+34 for missing data
             X=161W:159W  Y=30S:50N  Z=5:4149  
 TAUX     ZONAL WIND STRESS               69:71      1:100     ...       1:3
             dynes/cm**2 on grid PS2DU1 with -1.E+34 for missing data
             X=161.5W:158.5W  Y=28.8S:51.4N  
 TAUY     MERIDIONAL WIND STRESS          69:71      1:100     ...       1:3
             dynes/cm**2 on grid PS2DU1 with -1.E+34 for missing data
             X=161.5W:158.5W  Y=28.8S:51.4N  
 PSI      STREAM FUNCTION                 69:73      1:100     ...       1:3
             cm**3/sec on grid PS2DU1 with -1.E+34 for missing data
             X=161.5W:156.5W  Y=28.8S:51.4N  
 
  time range: 15-MAR-1983 10:00 to 15-MAR-1983 12:00
 
CANCEL DATA 1
SHOW DATA
     currently SET data sets:
USE gtbc011
USE gt4d011
SHOW DATA/BRIEF
     currently SET data sets:
    1> ./data/gtbc011.cdf
    2> ./data/gt4d011.cdf  (default)
SHOW DATA/BRIEF gtbc011
     currently SET data sets:
    1> ./data/gtbc011.cdf
! ... save and restore data set
SET DATA 1
SET DATA/SAVE
SHOW DATA/BRIEF
     currently SET data sets:
    1> ./data/gtbc011.cdf  (default)
    2> ./data/gt4d011.cdf
SET DATA 2
SHOW DATA/BRIEF
     currently SET data sets:
    1> ./data/gtbc011.cdf
    2> ./data/gt4d011.cdf  (default)
SET DATA/RESTORE
CANCEL DATA/ALL
! ... EZ data sets
FILE snoopy.dat
SHOW DATA/FULL
     currently SET data sets:
    1> ./snoopy.dat  (default)
 
 name     title                             I         J         K         L
 V1       V1                               1:2       ...       ...       ...
               on grid (G###) with -1.E+34 for missing data
             X=-0.5:1.5  
 
 /FORMAT = FREE
 /SKIP = 0
 /COLUMNS = 1
FILE/TITLE="quick and dirty" snoopy.dat
SHOW DATA
     currently SET data sets:
    1> ./snoopy.dat  (default)
 name     title                             I         J         K         L
 V1       V1                               1:2       ...       ...       ...
 
SET MODE IGNORE_ERROR
SET DATA/EZ/VAR="P,Q" 1
FILE/TITLE="quick and dirty"/VAR="P,Q"/COL=4/GRID=ABSTRACT/FORM=UNF/SKIP=2 snoopy.dat
SET MODE/LAST IGNORE_ERROR
CANCEL DATA 1
FILE/TITLE="quick and dirty"/VAR="P,Q"/COL=4/GRID=ABSTRACT/FORM=UNF/SKIP=2 snoopy.dat
SET VARIABLE/TITLE="my P variable" P
SHOW DATA/FULL
     currently SET data sets:
    1> ./snoopy.dat  (default)
     quick and dirty
 name     title                             I         J         K         L         M         N
 P        my P variable                   1:99999999  1:99999999  1:99999999  1:99999999  1:99999999  1:99999999
               on grid ABSTRACT with -1.E+34 for missing data
             X=0.5:1.E+08  Y=0.5:1.E+08  Z=0.5:1.E+08  E=0.5:1.E+08  F=0.5:1.E+08  
 Q        Q                               1:99999999  1:99999999  1:99999999  1:99999999  1:99999999  1:99999999
               on grid ABSTRACT with -1.E+34 for missing data
             X=0.5:1.E+08  Y=0.5:1.E+08  Z=0.5:1.E+08  E=0.5:1.E+08  F=0.5:1.E+08  
 
 /FORMAT = UNF
 /SKIP = 2
 /COLUMNS = 4
 
! SET - SHOW - CANCEL - DEFINE REGION
SHOW REGION
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
SET REGION/I=101:105/J=46:48/Z=0/L=1
SHOW REGION
default region:
        I=101:105
        J=46:48
        Z=0
        L=1
        E/M is unspecified
        F/N is unspecified
DEFINE REGION SAVE
CANCEL REGION
SHOW REGION
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
DEFINE REGION/X=130E:70W/Y=28.9S:48.6N W	! re-define to default
SET REGION/@W
SHOW REGION
default region:
        X=130:290
        Y=-28.9:48.6
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
SHOW REGION SAVE
region SAVE
        I=101:105
        J=46:48
        Z=0
        L=1
        E/M is unspecified
        F/N is unspecified
SHOW REGION/ALL
default region:
        X=130:290
        Y=-28.9:48.6
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
region W
        X=130:290
        Y=-28.9:48.6
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
region T
        X=130:290
        Y=-23.5:23.5
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
region N
        X=130:290
        Y=-9.8:9.8
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
region SAVE
        I=101:105
        J=46:48
        Z=0
        L=1
        E/M is unspecified
        F/N is unspecified
SET REGION SAVE
SHOW REGION
default region:
        I=101:105
        J=46:48
        Z=0
        L=1
        E/M is unspecified
        F/N is unspecified
! delta regions
CANCEL REGION
SET REGION/L=1
SET REGION/DL=1:3
SHOW REGION
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        L=2:4
        E/M is unspecified
        F/N is unspecified
DEFINE REGION/dX=5 W
SHOW REGION W
region W
        X=135:295
        Y=-28.9:48.6
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
 
! SET - SHOW - CANCEL  MODE
SHOW MODES
      MODE            STATE        ARGUMENT
      DIAGNOSTIC    CANCELED            99
      VERIFY           SET         DEFAULT
      INTERPOLATE   CANCELED
      IGNORE_ERROR  CANCELED
      STUPID        CANCELED
      JOURNAL          SET         ferret.jnl
      LONG_LABEL       SET               4
      LATIT_LABEL      SET               3
      DEPTH_LABEL      SET               4
      CALENDAR         SET         minutes
      E_LABEL          SET               4
      F_LABEL          SET         minutes
      ASCII_FONT       SET
      SEGMENT          SET
      WAIT          CANCELED
      DESPERATE     CANCELED             0
      GKS              SET
      REFRESH          SET
      METAFILE      CANCELED       .gif
      PPLLIST       CANCELED       ppllist.out
      GUI           CANCELED
      LOGO          CANCELED
      LABELS           SET
      GRATICULE     CANCELED
      LINECOLORS       SET               6
      UPCASE_OUTPU     SET
      NLEVELS          SET              30
      NODATA_LAB       SET
      SHRINK_YLAB   CANCELED
      CURVILINEAR   CANCELED
      LAYERZ        CANCELED
      6D_LAB           SET
      FRUGAL           SET              30
      DATE_FORMAT      SET         DEFAULT
      DSG              SET
SET MODE IGNORE_ERROR
SHOW MODES
      MODE            STATE        ARGUMENT
      DIAGNOSTIC    CANCELED            99
      VERIFY           SET         DEFAULT
      INTERPOLATE   CANCELED
      IGNORE_ERROR     SET
      STUPID        CANCELED
      JOURNAL          SET         ferret.jnl
      LONG_LABEL       SET               4
      LATIT_LABEL      SET               3
      DEPTH_LABEL      SET               4
      CALENDAR         SET         minutes
      E_LABEL          SET               4
      F_LABEL          SET         minutes
      ASCII_FONT       SET
      SEGMENT          SET
      WAIT          CANCELED
      DESPERATE     CANCELED             0
      GKS              SET
      REFRESH          SET
      METAFILE      CANCELED       .gif
      PPLLIST       CANCELED       ppllist.out
      GUI           CANCELED
      LOGO          CANCELED
      LABELS           SET
      GRATICULE     CANCELED
      LINECOLORS       SET               6
      UPCASE_OUTPU     SET
      NLEVELS          SET              30
      NODATA_LAB       SET
      SHRINK_YLAB   CANCELED
      CURVILINEAR   CANCELED
      LAYERZ        CANCELED
      6D_LAB           SET
      FRUGAL           SET              30
      DATE_FORMAT      SET         DEFAULT
      DSG              SET
CANCEL MODE IGNORE_ERROR
SHOW MODES
      MODE            STATE        ARGUMENT
      DIAGNOSTIC    CANCELED            99
      VERIFY           SET         DEFAULT
      INTERPOLATE   CANCELED
      IGNORE_ERROR  CANCELED
      STUPID        CANCELED
      JOURNAL          SET         ferret.jnl
      LONG_LABEL       SET               4
      LATIT_LABEL      SET               3
      DEPTH_LABEL      SET               4
      CALENDAR         SET         minutes
      E_LABEL          SET               4
      F_LABEL          SET         minutes
      ASCII_FONT       SET
      SEGMENT          SET
      WAIT          CANCELED
      DESPERATE     CANCELED             0
      GKS              SET
      REFRESH          SET
      METAFILE      CANCELED       .gif
      PPLLIST       CANCELED       ppllist.out
      GUI           CANCELED
      LOGO          CANCELED
      LABELS           SET
      GRATICULE     CANCELED
      LINECOLORS       SET               6
      UPCASE_OUTPU     SET
      NLEVELS          SET              30
      NODATA_LAB       SET
      SHRINK_YLAB   CANCELED
      CURVILINEAR   CANCELED
      LAYERZ        CANCELED
      6D_LAB           SET
      FRUGAL           SET              30
      DATE_FORMAT      SET         DEFAULT
      DSG              SET
SHOW MODE STUPID
      MODE            STATE        ARGUMENT
      STUPID        CANCELED
SET MODE STUPID
SHOW MODE STUPID
      MODE            STATE        ARGUMENT
      STUPID           SET
SET MODE/LAST STUPID
SHOW MODE STUPID
      MODE            STATE        ARGUMENT
      STUPID        CANCELED
 
! new modes 5/93
set mode journal newjournal.jnl
show mode journal
      MODE            STATE        ARGUMENT
      JOURNAL          SET         newjournal.jnl
set mode journal ferret.jnl
ppl list plot
         WIDTH=   10.20  HEIGHT=    8.80  TKTYPE=    0  BAUD=  110
         WINDOW= ON   BOX= OFF  CROSS= 0  PLTYPE=  3
         PLOT MODE=   A
         PLOT FILE= .gif                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
set mode ppllist:ppllist.out
show mode ppllist
      MODE            STATE        ARGUMENT
      PPLLIST          SET         ppllist.out
ppl list plot
ppl listsym
cancel mode ppllist
ppl list plot
         WIDTH=   10.20  HEIGHT=    8.80  TKTYPE=    0  BAUD=  110
         WINDOW= ON   BOX= OFF  CROSS= 0  PLTYPE=  3
         PLOT MODE=   A
         PLOT FILE= .gif                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
cancel mode journal
show mode journal
      MODE            STATE        ARGUMENT
      JOURNAL       CANCELED       ferret.jnl
 
! new 1/94  (syntax check also applies to modes journal and ppllist)
show mode metafile
      MODE            STATE        ARGUMENT
      METAFILE      CANCELED       .gif
set mode metafile newmetafile1.plt
show mode metafile
      MODE            STATE        ARGUMENT
      METAFILE      CANCELED       .gif
set mode metafile:newmetafile2.plt
show mode metafile
      MODE            STATE        ARGUMENT
      METAFILE      CANCELED       .gif
set mode metafile: newmetafile3.plt
show mode metafile
      MODE            STATE        ARGUMENT
      METAFILE      CANCELED       .gif
set mode metafile: "newmetafile4.plt"
show mode metafile
      MODE            STATE        ARGUMENT
      METAFILE      CANCELED       .gif
set mode metafile: "./newmetafile5.plt"
show mode metafile
      MODE            STATE        ARGUMENT
      METAFILE      CANCELED       .gif
set mode metafile: ./newmetafile6.plt
show mode metafile
      MODE            STATE        ARGUMENT
      METAFILE      CANCELED       .gif
set mode metafile newmetafile7.plt
show mode metafile
      MODE            STATE        ARGUMENT
      METAFILE      CANCELED       .gif
set mode metafile "newmetafile8.plt"
show mode metafile
      MODE            STATE        ARGUMENT
      METAFILE      CANCELED       .gif
set mode metafile "./newmetafile9.plt"
show mode metafile
      MODE            STATE        ARGUMENT
      METAFILE      CANCELED       .gif
set mode metafile ./newmetafile10.plt
show mode metafile
      MODE            STATE        ARGUMENT
      METAFILE      CANCELED       .gif
set mode metafile metafile.plt
 
! SET - SHOW - CANCEL EXPRESSION
SHOW EXPRESSION
        current output expression(s):
        X[GX=1:0:1]
CANCEL EXPRESSION
SHOW EXPRESSION
SET EXPRESSION i+5,i-j
SHOW EXPRESSION
        current output expression(s):
        I+5
        I-J
LIST/i=1:3/j=6:8
             X: 0.5 to 3.5
             Y: 5.5 to 8.5
 Column  1: EX#1 is I+5
 Column  2: EX#2 is I-J
          EX#1   EX#2
 ---- J:6 Y:   6
1   / 1:  6.000 -5.000
2   / 2:  7.000 -4.000
3   / 3:  8.000 -3.000
 ---- J:7 Y:   7
1   / 1:  6.000 -6.000
2   / 2:  7.000 -5.000
3   / 3:  8.000 -4.000
 ---- J:8 Y:   8
1   / 1:  6.000 -7.000
2   / 2:  7.000 -6.000
3   / 3:  8.000 -5.000
 
! SET,SHOW GRID
USE gt4d011
SHOW GRID
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid XABSTRACT
    GRID XABSTRACT
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              full
 normal    Y
 normal    Z
 normal    T
LIST/I=101:105/J=50/K=1/L=5 SALT
             VARIABLE : (SALINITY(ppt) - 35) /1000 (frac. by wt. less .035)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 points (LONGITUDE)
             LATITUDE : 1.5N
             DEPTH (m): 5
             TIME     : 10-SEP-1982 20:00
                   1.5N    
                   50
 129.5W / 101:  1.123E-04
 128.5W / 102:  1.092E-04
 127.5W / 103:  1.064E-04
 126.5W / 104:  1.042E-04
 125.5W / 105:  1.015E-04
SHOW GRID
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid PS3DT2
    GRID PS3DT2
 name       axis              # pts   start                end                 subset
 PSXT      LONGITUDE          160mr   130.5E               70.5W               full
 PSYT      LATITUDE           100 i   28.836S              48.568N             full
 PSZT      DEPTH (m)           27 i-  5                    3824                full
 TIME1     TIME                25 r   17-AUG-1982 12:00    10-JAN-1983 12:00   full
SET GRID/SAVE
SET GRID ABSTRACT
SHOW GRID
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid PS3DT2
    GRID PS3DT2
 name       axis              # pts   start                end                 subset
 PSXT      LONGITUDE          160mr   130.5E               70.5W               full
 PSYT      LATITUDE           100 i   28.836S              48.568N             full
 PSZT      DEPTH (m)           27 i-  5                    3824                full
 TIME1     TIME                25 r   17-AUG-1982 12:00    10-JAN-1983 12:00   full
SHOW GRID/X=180:165W SALT
    GRID PS3DT2
 name       axis              # pts   start                end                 subset
 PSXT      LONGITUDE          160mr   130.5E               70.5W               full
 PSYT      LATITUDE           100 i   28.836S              48.568N             full
 PSZT      DEPTH (m)           27 i-  5                    3824                full
 TIME1     TIME                25 r   17-AUG-1982 12:00    10-JAN-1983 12:00   full
 
       I     X                       XBOX          XBOXLO
      50>  179.5E                    1          179E
      51>  179.5W                    1          180E
      52>  178.5W                    1          179W
      53>  177.5W                    1          178W
      54>  176.5W                    1          177W
      55>  175.5W                    1          176W
      56>  174.5W                    1          175W
      57>  173.5W                    1          174W
      58>  172.5W                    1          173W
      59>  171.5W                    1          172W
      60>  170.5W                    1          171W
      61>  169.5W                    1          170W
      62>  168.5W                    1          169W
      63>  167.5W                    1          168W
      64>  166.5W                    1          167W
      65>  165.5W                    1          166W
      66>  164.5W                    1          165W
SET GRID/RESTORE
SHOW GRID
 Default grid for DEFINE VARIABLE is ABSTRACT
 
! SHOW VARIABLES
LET A=i
SHOW VARIABLES
 Created by DEFINE VARIABLE:
 >>> Definitions that replace any file variable of same name:
     A = I
CANC VARIABLES/ALL
SHOW VARIABLES
 Created by DEFINE VARIABLE:
 
! SHOW MEMORY , LOAD
SHOW MEMORY
    SET MEMORY/MAX: 500 Mb   (62.5 megawords)
    Peak demand: 0.14 Kb
    Current cache: 0.04 Kb
SHOW MEMORY/TEMPORARY
    SET MEMORY/MAX: 500 Mb   (62.5 megawords)
    Peak demand: 0.14 Kb
    Current cache: 0.04 Kb
data loaded without /PERMANENT:
 SALT[D=gt4d011]                   X     mr:3 size:0.04 Kb
       101/130W               50/1.333N              1/0                   5/07-SEP-1982
       105/125W               50/1.667N              1/10                  5/13-SEP-1982
 
SHOW MEMORY/PERMANENT
    SET MEMORY/MAX: 500 Mb   (62.5 megawords)
    Peak demand: 0.14 Kb
    Current cache: 0.04 Kb
data loaded with /PERMANENT:
SHOW MEMORY/ALL
    SET MEMORY/MAX: 500 Mb   (62.5 megawords)
    Peak demand: 0.14 Kb
    Current cache: 0.04 Kb
all data in memory:
 SALT[D=gt4d011]                   X     mr:3 size:0.04 Kb
       101/130W               50/1.333N              1/0                   5/07-SEP-1982
       105/125W               50/1.667N              1/10                  5/13-SEP-1982
 
 
LET A=i
LOAD/PERM/I=1:5 A
SHOW MEMORY
    SET MEMORY/MAX: 500 Mb   (62.5 megawords)
    Peak demand: 0.14 Kb
    Current cache: 0.12 Kb
    Permanent: 0.04 Kb
SHOW MEMORY/FREE
    SET MEMORY/MAX: 500 Mb   (62.5 megawords)
    Peak demand: 0.14 Kb
    Current cache: 0.12 Kb
    Permanent: 0.04 Kb
    Total table slots: 500
    Free table slots: 497
    Un-cached variables: 0
    number of /PERMANENT variables: 1
    memory used for /PERM: 0.04Kb
LOAD/TEMPORARY/I=1:5 A
SHOW MEMORY
    SET MEMORY/MAX: 500 Mb   (62.5 megawords)
    Peak demand: 0.14 Kb
    Current cache: 0.08 Kb
SHOW MEMORY/FREE
    SET MEMORY/MAX: 500 Mb   (62.5 megawords)
    Peak demand: 0.14 Kb
    Current cache: 0.08 Kb
    Total table slots: 500
    Free table slots: 498
    Un-cached variables: 0
 
! REPEAT
REPEAT/L=1:3 LIST/I=1:6/ORDER=X 1/(I+L)
!-> REPEAT: L=1
             VARIABLE : 1/(I+L)
             SUBSET   : 6 points (X)
             T        : 1
            1       2       3       4       5       6     
             1       2       3       4       5       6
          0.5000  0.3333  0.2500  0.2000  0.1667  0.1429
!-> REPEAT: L=2
             VARIABLE : 1/(I+L)
             SUBSET   : 6 points (X)
             T        : 2
            1       2       3       4       5       6     
             1       2       3       4       5       6
          0.3333  0.2500  0.2000  0.1667  0.1429  0.1250
!-> REPEAT: L=3
             VARIABLE : 1/(I+L)
             SUBSET   : 6 points (X)
             T        : 3
            1       2       3       4       5       6     
             1       2       3       4       5       6
          0.2500  0.2000  0.1667  0.1429  0.1250  0.1111
 
! semicolon-separated command groups
cancel region
cancel data/all
(show data)
     currently SET data sets:
show data;show data
     currently SET data sets:
     currently SET data sets:
set region/l=99;show region;repeat/l=1:3 (show data;sh reg);can reg;show reg
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        L=99
        E/M is unspecified
        F/N is unspecified
!-> REPEAT: L=1
     currently SET data sets:
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        L=1
        E/M is unspecified
        F/N is unspecified
!-> REPEAT: L=2
     currently SET data sets:
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        L=2
        E/M is unspecified
        F/N is unspecified
!-> REPEAT: L=3
     currently SET data sets:
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        L=3
        E/M is unspecified
        F/N is unspecified
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
((show wind;show reg);repeat/l=1:2 (show reg;list/i=1:3/ord=x (i+5)))
 OPEN ACTIVE
   1    *
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
!-> REPEAT: L=1
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        L=1
        E/M is unspecified
        F/N is unspecified
             VARIABLE : (I+5)
             SUBSET   : 3 points (X)
            1      2      3    
            1      2      3
          6.000  7.000  8.000
!-> REPEAT: L=2
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        L=2
        E/M is unspecified
        F/N is unspecified
             VARIABLE : (I+5)
             SUBSET   : 3 points (X)
            1      2      3    
            1      2      3
          6.000  7.000  8.000
 
 
! nested brackets (7/95 - version 4.01)
use gtbc011,gt4d011
stat/k=1/l=1/j=40/i=70/d=2 temp[d=1]
 
             TEMPERATURE
             LONGITUDE: 160.5W
             LATITUDE: 1.833S
             DEPTH (m): 5
             TIME: 15-MAR-1983 10:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/gtbc011.cdf
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 30.082
 Maximum value: 30.082
 Mean    value: 30.082 (unweighted average)
stat/k=1/l=1/j=40/i=70/d=2 temp[d=1,g=u]
 
             TEMPERATURE
             regrid: U
             LONGITUDE: 160W
             LATITUDE: 1.667S
             DEPTH (m): 5
             TIME: 15-MAR-1983 10:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/gtbc011.cdf
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 30.252
 Maximum value: 30.252
 Mean    value: 30.252 (unweighted average)
! ... note that since the data set times do not overlap the regrid request
!	produces only a single missing value flag
stat/k=1/l=1/j=40/i=70/d=2 temp[d=1,g=u[d=2]]
 
             TEMPERATURE
             regrid: U[D=gt4d011]
             LONGITUDE: 160W
             LATITUDE: 1.667S
             DEPTH (m): 5
             TIME: 17-AUG-1982 12:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/gtbc011.cdf
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 1
stat/k=1/l=1/j=40/i=70/d=2 temp[d=gtbc011,g=u[d=gt4d011]]
 
             TEMPERATURE
             regrid: U[D=gt4d011]
             LONGITUDE: 160W
             LATITUDE: 1.667S
             DEPTH (m): 5
             TIME: 17-AUG-1982 12:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/gtbc011.cdf
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 1
 
! test blanks surrounding colons (bn420 - 10/95)
list/nohead/i=1 : 3 i
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 
! test escapes using back slashes (bn420 - 11/95)
! (moved to bn420_grave)
 
say \/notaqualifier	! "/" should pass through
/notaqualifier
! starting 12/2015 a space preceding a unrecognized qualifier turns that
! qualifier into an argument
say /notaqualifier
/notaqualifier
set mode ignore
say/notaqualifier
canc mode ignore
 
say this\;that	! ";" should pass through
this;that
set mode ignore
say this;that
this
canc mode ignore
 
say yes\! "\!" passes through
yes! "!" passes through
say yes! "!" passes through
yes
 
! ********* V5.31 **********
! test continuation line capabilities
define axis \ ! comment on the command
/x=1:10:1 \   ! comment on the qualifier
xax\          ! comment on the argument
              ! this line is significant -- completes the command
show axis xax; cancel axis xax  ! clean up
 name       axis              # pts   start                end
 XAX       X                   10 r   1                    10
   Axis span (to cell edges) = 10
 
! long quotations can span multiple lines
say "start of quote \ ! quotations left open
followed by the end of the quote\
"  ! and the closing quote all by itself
start of quote followed by the end of the quote
 
! leading blanks are significant on continuation lines
say "demonstrate that these leading blanks:\
       really are preserved"
demonstrate that these leading blanks:       really are preserved
 
! continuation prompts are ignored, too
say "demonstrate that these leading blanks:\
       really are preserved"
demonstrate that these leading blanks:       really are preserved
 
! weird little blank line inputs
 
 
cancel region  ! to make next output predictable
show region\
! comment
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
 
! a common example: continuation for REPEAT loops
repeat/i=1:3 (cancel data/all;\
show data;\
let a = i;\
list/nohead a;\
cancel variables/all;\
)
!-> REPEAT: I=1
     currently SET data sets:
          1.000
!-> REPEAT: I=2
     currently SET data sets:
          2.000
!-> REPEAT: I=3
     currently SET data sets:
          3.000
 
! deliberate error -- backslash escapes the bang
set mode ignore; \! ignore (err cuz bang gets escaped); can mode ignore
 
! test long input lines with continuation (V5.31)
! *kob* 6/01 - note shorten this test for long lines to 1024 characters. This
!              because that is the maximum record length for NAG f95.  Any
! 	       longer and the program is aborted
 
say *** A111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000B111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000C111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000D111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000E111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000\
F111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000G111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000H111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000I111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000\
J111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000
*** A111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000B111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000C111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000D111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000E111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000F111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000G111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000H111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000I111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000J111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000
 
*** Running ferret script: bn_dollar.jnl
! test this with GO journal hello
 
! V510: 3/00 *sh* added tests of backslash escapes and surrounding quotations
! V532: 5/01 *sh* added tests of 2-digit arguments; made mode ignore stricter
 
set mode ignore
message/continue $1
 !-> message/continue hello
hello
 
message/continue here is: $1"some text" and some more stuff
 !-> message/continue here is: hello and some more stuff
here is: hello and some more stuff
 
message/cont here is a big $1 and $3&some text&      ! default provided
 !-> message/cont here is a big hello and some text
here is a big hello and some text
 
message/cont $3			! error - no default
 
message/cont $3"<my error message"	! error - with message
 
message/cont $*
 !-> message/cont hello
hello
 
message/continue here is: $*"some text" and some more stuff
 !-> message/continue here is: hello and some more stuff
here is: hello and some more stuff
 
message/continue $no_digit_text   ! no substitution
$no_digit_text
 
!!!!!!!!!!!!!!!!!!
 
message/cont $1"|hello|goodbye<my error message"
 !-> message/cont hello
hello
 
message/cont $1"greetings|hello|goodbye"
 !-> message/cont hello
hello
 
message/cont $1">greetings|hello|goodbye"
 !-> message/cont hello
hello
 
message/cont $1">greetings|hello|goodbye<my error message"
 !-> message/cont hello
hello
 
message/cont $1">greetings|hello>replacement text|goodbye<my error message"
 !-> message/cont replacement text
replacement text
 
! doesn't match on "hello"
 
message/cont $1"|xxxxx|goodbye<my error message"
 
message/cont $1"greetings|xxxxx|goodbye"
 
message/cont $1">greetings|xxxxx|goodbye"
 !-> message/cont greetings
greetings
 
message/cont $1">greetings|xxxxx|goodbye<my error message"
 !-> message/cont greetings
greetings
 
message/cont $1">greetings|xxxxx>replacement text|goodbye<my error message"
 !-> message/cont greetings
greetings
 
! no argument supplied
 
message/cont $3"|hello|goodbye<my error message"
 
message/cont $3"greetings|hello|goodbye"
 !-> message/cont greetings
greetings
 
message/cont $3">greetings|hello|goodbye"
 
message/cont $3">greetings|hello|goodbye<my error message"
 
message/cont $3">greetings|hello>replacement text|goodbye<my error message"
 
! pathological examples
!*********
! works ok with 500 character input buffer
message/cont here is a very long text $1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx the end 1234567890 yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy 1234567890
 !-> message/cont here is a very long text hello xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx the end 1234567890 yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy 1234567890
here is a very long text hello xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx the end 1234567890 yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy 1234567890
message/cont here is a very long text $1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx the end 1234567890 yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy 1234567890
 !-> message/cont here is a very long text hello xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx the end 1234567890 yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy 1234567890
here is a very long text hello xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx the end 1234567890 yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy 1234567890
message/cont $3""
message/cont $3"<"
message/cont $3"||"
message/cont $3">"
 !-> message/cont >
>
message/cont $3"|>|"
message/cont $3">|"
message/cont $3"|<"
message/cont $3"|>"
 
set mode/last ignore
 
! bn420 10/95 - added tests that arguments don't get incorrectly broken up
! ==> EACH OF THESE SHOULD PASS AS A SINGLE ARGUMENT!!!
go bn_dollar.sub VAR[x=1,y=1]	! should be interpreted as a single arg
VAR[x=1,y=1]  2-n/a  3-n/a  4-n/a
go bn_dollar.sub VAR[x=1,g=var2[d=d1],y=1]	!  a single arg
VAR[x=1,g=var2[d=d1],y=1]  2-n/a  3-n/a  4-n/a
go bn_dollar.sub ((x+y)/(x-5))	! ignore slash, get single arg
((x+y)/(x-5))  2-n/a  3-n/a  4-n/a
go bn_dollar.sub ((x+y),(x-5))	! ignore comma, get single arg
((x+y),(x-5))  2-n/a  3-n/a  4-n/a
 
! V510 3/00
set mode ignore
  message/continue "$1"                ! final quote used to get mis-applied
 !-> message/continue "hello"
hello
set mode/last ignore
go bn_dollar.sub \"hello\"                 ! quotations as part of argument
"hello"  2-n/a  3-n/a  4-n/a
go bn_dollar.sub "\"hello with blanks\""   ! quotations as part of argument
"hello with blanks"  2-n/a  3-n/a  4-n/a
go bn_dollar.sub \"((x+y),(x-5))\"         ! quotations as part of argument
"((x+y),(x-5))"  2-n/a  3-n/a  4-n/a
 
! V5.3 additions 5/01 -- 2-digit arguments in parentheses
go bn_dollar.sub VAR[x=1,y=1] "arg 2" " " "arg 4" "arg 5"
VAR[x=1,y=1]  arg 2  3-n/a  arg 4
VAR[x=1,y=1]999  arg 2  3-parens
11-n/a   12-n/a  13-n/a
41-n/a  42-n/a  43-n/a
 
go bn_dollar.sub VAR[x=1,y=1] "arg 2" " " "arg 4" "arg 5" \
"arg 6" "arg 7" "arg 8" "arg 9" "arg 10" \
"arg 11" "arg 12" " "      "arg 14" "arg 15"
VAR[x=1,y=1]  arg 2  3-n/a  arg 4
VAR[x=1,y=1]999  arg 2  3-parens
arg 11   arg 12  13-n/a
41-n/a  42-n/a  43-n/a
 
go bn_dollar.sub VAR[x=1,y=1] "arg 2" " " "arg 4" "arg 5" \
"arg 6" "arg 7" "arg 8" "arg 9" "arg 10" \
"arg 11" "arg 12" " "      "arg 14" "arg 15" \
"arg 16" "arg 17" "arg 18" "arg 19" "arg 20" \
"arg 21" "arg 22" "arg 23" "arg 24" "arg 25" \
"arg 26" "arg 27" "arg 28" "arg 29" "arg 30" \
"arg 31" "arg 32" "arg 33" "arg 34" "arg 35" \
"arg 36" "arg 37" "arg 38" "arg 39" "arg 40" \
"arg 41" "arg 42" " "      "arg 44" "arg 45"
VAR[x=1,y=1]  arg 2  3-n/a  arg 4
VAR[x=1,y=1]999  arg 2  3-parens
arg 11   arg 12  13-n/a
star 41  subst 42  43-n/a
 
! deliberate errors
set mode ignore
  say $100        ! argument number too large
  say ($100)        ! argument number too large
  say ($10)0      ! argument 10 not defined
set mode/last ignore
*** Running ferret script: bn_grave.jnl
! bn420_grave
! benchmark to test evaluation of grave accent-enclosed expressions
! requires FERRET version 4.00 or later
 
! added one new command since bn400_grave to test for unwanted leading blanks
!  (a problem noticed on HP)
! and make sure that grave accents protect "/" and other chars from the parser
 
! 2/96 - added tests of PRECISION=n abd BAD=string
 
message/continue "2+2=`2+2`"
 !-> message/continue "2+2=4"
2+2=4
 
message/continue "2 squared + 2 squared =`2^2` + `2+2`"
 !-> message/continue "2 squared + 2 squared =4 + 4"
2 squared + 2 squared =4 + 4
 
message/continue "50/0 =`50/0`"	! invalid result
 !-> message/continue "50/0 =bad"
50/0 =bad
 
repeat/i=1:3 message/continue "I=`I`"
!-> REPEAT: I=1
 !-> message/continue "I=1"
I=1
!-> REPEAT: I=2
 !-> message/continue "I=2"
I=2
!-> REPEAT: I=3
 !-> message/continue "I=3"
I=3
 
LET start = 5; repeat/i=`start`:`start+2` message/continue "I=`I`"
 !-> repeat/i=5:7 message/continue "I=`I`"
!-> REPEAT: I=5
 !-> message/continue "I=5"
I=5
!-> REPEAT: I=6
 !-> message/continue "I=6"
I=6
!-> REPEAT: I=7
 !-> message/continue "I=7"
I=7
!cancel region/X ! removed - temporary experiment 3/00 *sh*
 
message/continue "2+2=``2+2``"	! double grave accents get condensed
 !-> message/continue "2+2=`2+2`"
2+2=`2+2`
 
message/continue A default substitution: $9"default string|2+2=`2+2`"
 !-> message/continue A default substitution: default string
A default substitution: default string
 
message/continue A grave   substitution: $9"2+2=`2+2`|replacement string"
 !-> message/continue A grave   substitution: 2+2=4
A grave   substitution: 2+2=4
 
canc var/all;LET XX = 5+4; mess/cont "xx is `xx`"
 !-> mess/cont "xx is 9"
xx is 9
 
! 2/96
message/continue "1/300=`1/300,p=5`"
 !-> message/continue "1/300=0.0033333"
1/300=0.0033333
message/continue "1/300=`1/300,p=-5`"	! decimal places
 !-> message/continue "1/300=0.00333"
1/300=0.00333
message/continue "1/300=`1/300 , precision=10`"
 !-> message/continue "1/300=0.003333333333"
1/300=0.003333333333
message/continue "1/0=`1/0,  b=-999`"
 !-> message/continue "1/0=-999"
1/0=-999
message/continue "1/0=`1/0  ,BAD=missing`"
 !-> message/continue "1/0=missing"
1/0=missing
message/continue "1/3=`1/3, precision=10,  BAD=-999`"
 !-> message/continue "1/3=0.3333333333"
1/3=0.3333333333
message/continue "1/3=`1/3,	BAD=-999 ,precision=10`"
 !-> message/continue "1/3=0.3333333333"
1/3=0.3333333333
 
! deliberate error
set mode ignore_errors
message/continue "2+2=`2+2"    		! unclosed grave accent
message/continue "2+2=`garbage`"	! invalid expression
message/continue "3 numbers: `I[i=3:5]`"! not a scalar
 
! 2/96 deliberate errors
message/continue "1/3=`1/3,BAD=-999,precision=11`"
 !-> message/continue "1/3=0.33333333333"
1/3=0.33333333333
message/continue "1/3=`1/3BAD=-999`"
message/continue "1/3=`1/3,qBAD=-999`"
canc mode ignore_errors
 
! bn420_grave:
! CHECK THIS TO MAKE SURE THERE ARE NO LEADING BLANKS  (ESP. HP!!!)
let x1 = 0.012954
let x2 = 7.5E-09
let x3 = .1
say >>`x1`<< ---  >>`x2`<< --- >>`x3`<<
 !-> MESSAGE/CONTINUE >>0.012954<< ---  >>7.5E-09<< --- >>0.1<<
>>0.012954<< ---  >>7.5E-09<< --- >>0.1<<
 
! must recognize "/" inside immediate mode exprn
list/I=`6/2` i
 !-> list/I=3 i
             VARIABLE : I
                        axis ABSTRACT
             X        : 3
          3.000
 
! test escapes using back slashes (bn420 - 11/95)
say `2+2`	! normal evaluation
 !-> MESSAGE/CONTINUE 4
4
say \`2+2\`	! these grave accents should pass through
`2+2`
say \`2+2\`
`2+2`
say \`2+`1+1`\` ! should translate 1+1=>2
 !-> MESSAGE/CONTINUE `2+2`
`2+2`
set mode ignore
say \`2+2`	! syntax error
say `2+2\`	! syntax error
say `2+2\`+1`	! syntax error
say \`2+2`+1\`	! syntax error
canc mode ignore
 
! test nested brackets mixed with grave accents
let long = x
say temp[x=`long[i=1]`:`long[i=160]`:5]
 !-> MESSAGE/CONTINUE temp[x=1:160:5]
temp[x=1:160:5]
 
! V5.10 - test new features
use coads_climatology
set mode diagnostic
let sst2 = sst[l=5:8]
say `sst, return=size`    ! should only do a GETGRID
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE X        M:  4 dset:   0 I:    160    160  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE LONG     M:  6 dset:   0 I:      1      1  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE LONG     M:  7 dset:   0 I:    160    160  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 -DELETE X2       M:  1 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE XX       M:  2 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE X1       M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE X3       M:  5 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 !-> MESSAGE/CONTINUE 48600
48600
say `sst2,return=lend`    ! should inherit L=5:8
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid SST2     C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 !-> MESSAGE/CONTINUE 8
8
set mode/last diagnostic
 
say `sst,return=shape`
 !-> MESSAGE/CONTINUE XYT
XYT
say `sst,return=T0`
 !-> MESSAGE/CONTINUE 01-JAN-0000 00:00:00
01-JAN-0000 00:00:00
say `sst,return=TITLE`
 !-> MESSAGE/CONTINUE SEA SURFACE TEMPERATURE
SEA SURFACE TEMPERATURE
say `sst,return=units`
 !-> MESSAGE/CONTINUE Deg C
Deg C
say `sst,return=GRID`
 !-> MESSAGE/CONTINUE GSQ1
GSQ1
 
say `sst,ret=isize`
 !-> MESSAGE/CONTINUE 180
180
say `sst,ret=jsize`
 !-> MESSAGE/CONTINUE 90
90
say `sst,ret=ksize`
 !-> MESSAGE/CONTINUE 1
1
say `sst,ret=lsize`
 !-> MESSAGE/CONTINUE 3
3
 
say `sst,r=istart`
 !-> MESSAGE/CONTINUE 1
1
say `sst,r=jstart`
 !-> MESSAGE/CONTINUE 1
1
say `sst,r=kstart`
 !-> MESSAGE/CONTINUE 0
0
say `sst,r=lstart`
 !-> MESSAGE/CONTINUE 1
1
 
say `sst,R=iend`
 !-> MESSAGE/CONTINUE 180
180
say `sst,R=jend`
 !-> MESSAGE/CONTINUE 90
90
say `sst,R=kend`
 !-> MESSAGE/CONTINUE 0
0
say `sst,R=LEND`
 !-> MESSAGE/CONTINUE 3
3
 
say `sst,return=xstart`
 !-> MESSAGE/CONTINUE 21E
21E
say `sst,return=ystart`
 !-> MESSAGE/CONTINUE 89S
89S
say `sst,return=zstart`
 !-> MESSAGE/CONTINUE *
*
say `sst,return=tstart`
 !-> MESSAGE/CONTINUE 16-JAN 06:00:00
16-JAN 06:00:00
 
say `sst,return=xend`
 !-> MESSAGE/CONTINUE 19E(379)
19E(379)
say `sst,return=yend`
 !-> MESSAGE/CONTINUE 89N
89N
say `sst,return=zend`
 !-> MESSAGE/CONTINUE *
*
say `sst,return=tend`
 !-> MESSAGE/CONTINUE 17-MAR 02:58:12
17-MAR 02:58:12
 
say `sst,return=xunit`
 !-> MESSAGE/CONTINUE degrees_east
degrees_east
say `sst,return=junits`
 !-> MESSAGE/CONTINUE degrees_north
degrees_north
say `sst,return=kunit`
 !-> MESSAGE/CONTINUE

say `sst,return=tunits`
 !-> MESSAGE/CONTINUE hour
hour
 
say `sst^2,return=size`
 !-> MESSAGE/CONTINUE 48600
48600
say `sst[L=1]+sst,return=lsize`
 !-> MESSAGE/CONTINUE 3
3
say `sst[L=1:3@ave],return=lsize`
 !-> MESSAGE/CONTINUE 1
1
say `sst[L=1:3@ave]+sst,return=lsize`
 !-> MESSAGE/CONTINUE 3
3
 
! test case of grid-changing variables returning an imposed (ABSTRACT) axes
let a = XSEQUENCE(J[j=1:5])
set mode diagnostic
say `a,return=isize`          ! full evaluation occurs
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C01,V08 C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C11,V08 C: 11 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 (C11,V08 C: 11 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    A        C:  6 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C01,V08 C:  8 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C11,V08 C: 10 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  J        M:  5 dset:   0 I:   -999   -999  J:    1    5  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid YABSTRACT       NORMAL    ABSTRACT  NORMAL    NORMAL
 -DELETE (C11,V08 M:  3 dset:   0 I:   -999   -999  J:    1    5  K: -999 -999  L:   -999   -999
 -DELETE J        M:  5 dset:   0 I:   -999   -999  J:    1    5  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE A        M:  1 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE (C01,V08 M:  2 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 !-> MESSAGE/CONTINUE 5
5
say `a[i=2:3],return=isize`   ! full evaluation is bypassed
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C01,V08 C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C11,V08 C: 11 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 (C11,V08 C: 11 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    A        C:  6 dset:   0 I:      2      3  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C01,V08 C:  8 dset:   0 I:      2      3  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C11,V08 C: 10 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  J        M:  2 dset:   0 I:   -999   -999  J:    1    5  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid YABSTRACT       NORMAL    ABSTRACT  NORMAL    NORMAL
 -DELETE (C11,V08 M:  1 dset:   0 I:   -999   -999  J:    1    5  K: -999 -999  L:   -999   -999
 -DELETE J        M:  2 dset:   0 I:   -999   -999  J:    1    5  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE A        M:  3 dset:   0 I:      2      3  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE (C01,V08 M:  5 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 !-> MESSAGE/CONTINUE 2
2
say `a[i=100:200],return=isize`    ! correct starting with Ferret v694 (tkt 2213)
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C01,V08 C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C11,V08 C: 11 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 (C11,V08 C: 11 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    A        C:  6 dset:   0 I:    100    200  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C01,V08 C:  8 dset:   0 I:    100    200  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C11,V08 C: 10 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  J        M:  5 dset:   0 I:   -999   -999  J:    1    5  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid YABSTRACT       NORMAL    ABSTRACT  NORMAL    NORMAL
 -DELETE (C11,V08 M:  3 dset:   0 I:   -999   -999  J:    1    5  K: -999 -999  L:   -999   -999
 -DELETE J        M:  5 dset:   0 I:   -999   -999  J:    1    5  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE A        M:  1 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE (C01,V08 M:  2 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 !-> MESSAGE/CONTINUE 5
5
set mode/last diagnostic
 
! deliberate errors
set mode ignore_errors
say `1*/3`     ! deliberate syntax error
say `sst*/3,return=lunits`
say `sst,rr=size`            ! could be an error ...
 !-> MESSAGE/CONTINUE 48600
48600
say `sst,return=Xsize`
say `sst,return=trash`
set mode/last ignore_errors
 
*** Running ferret script: bn_letd.jnl
! bn420_letd.jnl
! 9/1/95
 
! test LET definitions with the /D qualifier:  LET, SHOW, SET VAR, CANCEL
! .. not a particularly inspired benchmark, but, what the heck
 
! 9/2005 acm
! test for the behavior of bug 1336 by listing contents of variables;
! tests with SHOW VAR did not detect the bug.
 
sp touch snoopy.dat
 
! set and show 3 types of variables
let a = global_pre-empt
show var
 Created by DEFINE VARIABLE:
 >>> Definitions that replace any file variable of same name:
     A = GLOBAL_PRE-EMPT
show var/d
let/d a = global_default
show var
 Created by DEFINE VARIABLE:
 >>> Definitions that replace any file variable of same name:
     A = GLOBAL_PRE-EMPT
 >>> Definitions used if no file variable of this name exists:
     A (/D default) = GLOBAL_DEFAULT
show var/d
     A (/D default) = GLOBAL_DEFAULT
USE clim_airt_lev
let/d=clim_airt_lev a = clim_airt_lev-specific
set mode ignore; let/d=noexist a = b; set mode/last ignore
show var
 Created by DEFINE VARIABLE:
     A[D=clim_airt_lev] = CLIM_AIRT_LEV-SPECIFIC
 >>> Definitions that replace any file variable of same name:
     A = GLOBAL_PRE-EMPT
 >>> Definitions used if no file variable of this name exists:
     A (/D default) = GLOBAL_DEFAULT
show var/d=clim_airt_lev
     A[D=clim_airt_lev] = CLIM_AIRT_LEV-SPECIFIC
show data clim_airt_lev
     currently SET data sets:
    1> ./data/clim_airt_lev.cdf  (default)
 name     title                             I         J         K         L
 AIRT     CLIMATOLOGICAL AIR TEMPERATURE   1:160     1:100     ...       1:12
 ------------------------------
 A[D=clim_airt_lev] = CLIM_AIRT_LEV-SPECIFIC
 
use gt4d011
let/d=2 a = specific-to-gt4d
show var
 Created by DEFINE VARIABLE:
     A[D=clim_airt_lev] = CLIM_AIRT_LEV-SPECIFIC
     A[D=gt4d011] = SPECIFIC-TO-GT4D
 >>> Definitions that replace any file variable of same name:
     A = GLOBAL_PRE-EMPT
 >>> Definitions used if no file variable of this name exists:
     A (/D default) = GLOBAL_DEFAULT
show var/d=clim_airt_lev
     A[D=clim_airt_lev] = CLIM_AIRT_LEV-SPECIFIC
show var airt
list/l=1/x=180/y=0 airt[d=clim_airt_lev]
             VARIABLE : CLIMATOLOGICAL AIR TEMPERATURE (deg. C)
             FILENAME : clim_airt_lev.cdf
             LONGITUDE: 179.5E
             LATITUDE : 0.167S
             TIME     : 12-JAN-1982 12:00
          27.14
 
! data set-specific definition
let/d=clim_airt_lev airt = 1
list/l=1/x=180/y=0 airt[d=clim_airt_lev]
             VARIABLE : 1
             FILENAME : clim_airt_lev.cdf
          1.000
set mode ignore; list/l=1/x=180/y=0 airt[d=gt4d011]; set mode/last ignore
 
! default definition where no data set variable exists
let/d airt = 2
list/l=1/x=180/y=0 airt[d=clim_airt_lev]
             VARIABLE : 1
             FILENAME : clim_airt_lev.cdf
          1.000
list/l=1/x=180/y=0 airt[d=gt4d011]
             VARIABLE : 2
             FILENAME : gt4d011.cdf
          2.000
 
! global def'n replacing all file variables (but not data-set specific uvars)
let airt = 2
list/l=1/x=180/y=0 airt[d=clim_airt_lev]
             VARIABLE : 1
             FILENAME : clim_airt_lev.cdf
          1.000
list/l=1/x=180/y=0 airt[d=gt4d011]
             VARIABLE : 2
          2.000
canc data/all
list/l=1/x=180/y=0 airt
             VARIABLE : 2
          2.000
show var
 Created by DEFINE VARIABLE:
 >>> Definitions that replace any file variable of same name:
     AIRT = 2
     A = GLOBAL_PRE-EMPT
 >>> Definitions used if no file variable of this name exists:
     AIRT (/D default) = 2
     A (/D default) = GLOBAL_DEFAULT
 
! SET VARIABLE testing
USE clim_airt_lev
let t1 = 1
let/d t2 = 2
let/d=clim_airt_lev t3 = 3
file/var=t4,t3 snoopy.dat
set var/titl=test1 t1
set var/titl=test2 t2
set var/titl=test3 t3[d=clim_airt_lev]
set var/titl=test4 t4[d=snoopy.dat]
set var/titl=test3 t3[d=snoopy.dat]
show data
     currently SET data sets:
    1> ./data/clim_airt_lev.cdf
 name     title                             I         J         K         L
 AIRT     CLIMATOLOGICAL AIR TEMPERATURE   1:160     1:100     ...       1:12
 ------------------------------
 T3[D=clim_airt_lev] = 3
 
    2> ./snoopy.dat  (default)
 name     title                             I         J         K         L
 T4       test4                            1:2       ...       ...       ...
 T3       test3                            1:2       ...       ...       ...
 
show data/full 1
     currently SET data sets:
    1> ./data/clim_airt_lev.cdf
 
 name     title                             I         J         K         L
 AIRT     CLIMATOLOGICAL AIR TEMPERATURE   1:160     1:100     ...       1:12
             deg. C on grid GGT1 with -1.E+34 for missing data
             X=130E:70W  Y=30S:50N  
 
  time range: 12-JAN-1982 12:00 to 13-DEC-1982 02:00
 ------------------------------
 T3[D=clim_airt_lev] = 3
         "test3"
 
show var
 Created by DEFINE VARIABLE:
     T3[D=clim_airt_lev] = 3
         "test3"
 >>> Definitions that replace any file variable of same name:
     T1 = 1
         "test1"
     AIRT = 2
     A = GLOBAL_PRE-EMPT
 >>> Definitions used if no file variable of this name exists:
     T2 (/D default) = 2
         "test2"
     AIRT (/D default) = 2
     A (/D default) = GLOBAL_DEFAULT
 
! selective cancelling
canc var/d/all
show var	! LET/D, only, deleted
 Created by DEFINE VARIABLE:
     T3[D=clim_airt_lev] = 3
         "test3"
 >>> Definitions that replace any file variable of same name:
     T1 = 1
         "test1"
     AIRT = 2
     A = GLOBAL_PRE-EMPT
can var t3[d=clim_airt_lev]
show var
 Created by DEFINE VARIABLE:
 >>> Definitions that replace any file variable of same name:
     T1 = 1
         "test1"
     AIRT = 2
     A = GLOBAL_PRE-EMPT
set mode ignore; can var; set mode/last ignore
can var/all
show var
 Created by DEFINE VARIABLE:
 
! cancelling various categiries in various ways
let/d=clim_airt_lev t1 = 1
let/d=clim_airt_lev t2 = 2
let/d=clim_airt_lev t3 = 3
show var
 Created by DEFINE VARIABLE:
     T3[D=clim_airt_lev] = 3
     T2[D=clim_airt_lev] = 2
     T1[D=clim_airt_lev] = 1
can var/d=clim_airt_lev t1
show var
 Created by DEFINE VARIABLE:
     T3[D=clim_airt_lev] = 3
     T2[D=clim_airt_lev] = 2
can var/all/d=clim_airt_lev
show var
 Created by DEFINE VARIABLE:
let/d=clim_airt_lev t1 = 1
let/d=clim_airt_lev t2 = 2
let/d=clim_airt_lev t3 = 3
can var/d=clim_airt_lev	! implied "/all"
show var
 Created by DEFINE VARIABLE:
let/d t1 = 1
let/d t2 = 2
let/d t3 = 3
can var/d	! implied/d/all
show var
 Created by DEFINE VARIABLE:
 
! test for the behavior of bug 1336 by listing contents of variables;
 
let v1 = x[x=1:8]
let v2 = x[x=1:8] + y[y=1:3]
save/clobber/file=v12file.nc v1, v2
save/clobber/file=v1file.nc/i=3:8 v1
can var v1
can var v2
 
use v12file
use v1file
 
list v1  ! from vfile
             VARIABLE : X[X=1:8]
             FILENAME : v1file.nc
             SUBSET   : 6 points (X)
 3   / 1:  3.000
 4   / 2:  4.000
 5   / 3:  5.000
 6   / 4:  6.000
 7   / 5:  7.000
 8   / 6:  8.000
let/d v1 = 0
let/d v2 = 2
 
list v1  ! v1 exists in default data set so use dataset variable
             VARIABLE : X[X=1:8]
             FILENAME : v1file.nc
             SUBSET   : 6 points (X)
 3   / 1:  3.000
 4   / 2:  4.000
 5   / 3:  5.000
 6   / 4:  6.000
 7   / 5:  7.000
 8   / 6:  8.000
 
list v2  ! v2 does not exist in default dset so use let/d definition
             VARIABLE : 2
             FILENAME : v1file.nc
          2.000
 
let/d q = v2
list q
             VARIABLE : V2
             FILENAME : v1file.nc
          2.000
list q[d=v12file]
             VARIABLE : V2
             FILENAME : v12file.nc
             SUBSET   : 8 by 3 points (X-Y)
             1      2      3      4      5      6      7      8    
             1      2      3      4      5      6      7      8
 1   / 1:   2.00   3.00   4.00   5.00   6.00   7.00   8.00   9.00
 2   / 2:   3.00   4.00   5.00   6.00   7.00   8.00   9.00  10.00
 3   / 3:   4.00   5.00   6.00   7.00   8.00   9.00  10.00  11.00
 
*** Running ferret script: bn_if.jnl
! bn430_if
! 5/6/96
! 5/22/96 - added nested multi-line IF with nesting in REJECTED clause
 
! 8/97 bn430_if -> bn450_if: added test of symbol substitution with IF
 
CANC MODE VERIFY
---->CORRECT
---->CORRECT
---->CORRECT
---->CORRECT
---->CORRECT
---->CORRECT
---->CORRECT
---->all is well after checking TRUE
---->CORRECT
---->CORRECT
---->CORRECT
---->CORRECT
---->CORRECT
---->CORRECT
---->CORRECT
---->CORRECT
---->all is well after checking FALSE
---->CORRECT
---->CORRECT
---->CORRECT
---->CORRECT
---->CORRECT
---->CORRECT
---->all is well after checking single line IFs
---->CORRECT
---->CORRECT, again
100
1
2
---->all is well after command group and loop tests
CORRECT:sym sub
---->CORRECT
---->CORRECT again
---->all is well
---->CORRECT
---->all is well
---->CORRECT: took ELSE
---->CORRECT again
---->all is well
---->CORRECT: took ELIF
---->all is well
---->CORRECT
---->all is well following multi-line IF tests
---->all is well following weird multi-line IF
-->CORRECT: nested single line IFs
-->CORRECT: nested single line IFs
-->CORRECT: nested single line IFs
---->CORRECT: took ELIF -- starting nested IF
---->CORRECT: took ELSE inside nested IF
----> CORRECT: took non-nested IF clause
---->all is well following nested multi-line IF
---->CORRECT: took ELIF -- starting single line nested IF
---->all is well following embedded single line IF
---->CORRECT
---->nested: all is well after single line IF
---->CORRECT
---->CORRECT, again
---->nested: all is well after command group and loop tests
---->CORRECT
---->CORRECT again
---->nested: all is well after multi-line IF
CORRECT
CORRECT
LOOP=1
more
LOOP=2
more
LOOP=1
LOOP=2
semicolon group
more
semicolon group
CORRECT
WE SEE THIS CUZ OF IMPLIED CLOSE TO THE PREVIOUS
>>> --> DELIBERATE WARNING: UNCLOSED IF in NESTED GO FILE<<<
---->... now inside of nested IF clause
---->CORRECT
---->all is well following unclosed nested IF
>>> DELIBERATE ERRORS <<<
SAY ">>> --> DELIBERATE WARNING: UNCLOSED IF <<<"
>>> --> DELIBERATE WARNING: UNCLOSED IF <<<
IF yes THEN
  say ---->... now inside of IF clause
---->... now inside of IF clause
*** Running ferret script: bn_expressions.jnl
! bn450_expressions.JNL
! test all manner of expressions
! V450 - commented out MODE POLISH test -- mode was eliminated
! V530 - new pseudo-variables XBOXLO, YBOXHI, etc.
 
! test infix expressions
! 1/96 - commented out: CANCEL MODE POLISH
 
! test grid creation for a variety of combos
let c1 = 2
let i1 = i
let k1 = k
 
! . . . constants
list 4
             VARIABLE : constant
          4.000
list 2 + 2
             VARIABLE : 2 + 2
          4.000
list c1 + 2
             VARIABLE : C1 + 2
          4.000
list 2 + c1
             VARIABLE : 2 + C1
          4.000
list c1 + c1
             VARIABLE : C1 + C1
          4.000
 
! ... constant plus variable or pseudovariable
set reg/i=1:3
list/order=x i + 2
             VARIABLE : I + 2
             SUBSET   : 3 points (X)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=x 2 + i
             VARIABLE : 2 + I
             SUBSET   : 3 points (X)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=x i1 + 2
             VARIABLE : I1 + 2
             SUBSET   : 3 points (X)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=x 2 + i1
             VARIABLE : 2 + I1
             SUBSET   : 3 points (X)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=x i + c1
             VARIABLE : I + C1
             SUBSET   : 3 points (X)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=x c1 + i
             VARIABLE : C1 + I
             SUBSET   : 3 points (X)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=x i1 + c1
             VARIABLE : I1 + C1
             SUBSET   : 3 points (X)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=x c1 + i1
             VARIABLE : C1 + I1
             SUBSET   : 3 points (X)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
 
! ... constant plus variable or pseudovariable with modified region
set reg/i=11:13
list/order=x i[i=1:3] + 2
             VARIABLE : I[I=1:3] + 2
             SUBSET   : 3 points (X)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=x 2 + i[i=1:3]
             VARIABLE : 2 + I[I=1:3]
             SUBSET   : 3 points (X)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=x i1[i=1:3] + 2
             VARIABLE : I1[I=1:3] + 2
             SUBSET   : 3 points (X)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=x 2 + i1[i=1:3]
             VARIABLE : 2 + I1[I=1:3]
             SUBSET   : 3 points (X)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=x i[i=1:3] + c1
             VARIABLE : I[I=1:3] + C1
             SUBSET   : 3 points (X)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=x c1 + i[i=1:3]
             VARIABLE : C1 + I[I=1:3]
             SUBSET   : 3 points (X)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=x i1[i=1:3] + c1
             VARIABLE : I1[I=1:3] + C1
             SUBSET   : 3 points (X)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=x c1 + i1[i=1:3]
             VARIABLE : C1 + I1[I=1:3]
             SUBSET   : 3 points (X)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
 
! ... two variables or pseudovariables
set reg/i=1:3/k=2
list/order=x i + k
             VARIABLE : I + K
             SUBSET   : 3 points (X)
             Z        : 2
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=x i + k1
             VARIABLE : I + K1
             SUBSET   : 3 points (X)
             Z        : 2
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=x k1 + i
             VARIABLE : K1 + I
             SUBSET   : 3 points (X)
             Z        : 2
            1      2      3    
            1      2      3
          3.000  4.000  5.000
 
! ... two variables or pseudovariables with modified region
set reg/i=1:3/k=1
list/order=x i + k[k=2]
             VARIABLE : I + K[K=2]
             SUBSET   : 3 points (X)
             Z        : 2
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=x i + k1[k=2]
             VARIABLE : I + K1[K=2]
             SUBSET   : 3 points (X)
             Z        : 2
            1      2      3    
            1      2      3
          3.000  4.000  5.000
! ... crash here ...
list/order=x k1[k=2] + i
             VARIABLE : K1[K=2] + I
             SUBSET   : 3 points (X)
             Z        : 2
            1      2      3    
            1      2      3
          3.000  4.000  5.000
 
 
! operators
CANCEL REGION
SET REGION/I=1:5/J=1:5
LIST 10+2
             VARIABLE : 10+2
          12.00
LIST/ORDER=X  I
             VARIABLE : I
                        axis ABSTRACT
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  2.000  3.000  4.000  5.000
LIST/ORDER=X  I*3
             VARIABLE : I*3
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
           3.00   6.00   9.00  12.00  15.00
LIST/ORDER=X  I/3
             VARIABLE : I/3
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          0.333  0.667  1.000  1.333  1.667
LIST/ORDER=X  I+3
             VARIABLE : I+3
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          4.000  5.000  6.000  7.000  8.000
LIST/ORDER=X  I-3
             VARIABLE : I-3
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
         -2.000 -1.000  0.000  1.000  2.000
LIST/ORDER=X  I^3
             VARIABLE : I^3
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
            1.0    8.0   27.0   64.0  125.0
LIST/ORDER=X  I EQ 3
             VARIABLE : I EQ 3
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          0.000  0.000  1.000  0.000  0.000
LIST/ORDER=X  I NE 3
             VARIABLE : I NE 3
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  1.000  0.000  1.000  1.000
LIST/ORDER=X  I GT 3
             VARIABLE : I GT 3
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          0.000  0.000  0.000  1.000  1.000
LIST/ORDER=X  I GE 3
             VARIABLE : I GE 3
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          0.000  0.000  1.000  1.000  1.000
LIST/ORDER=X  I LT 3
             VARIABLE : I LT 3
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  1.000  0.000  0.000  0.000
LIST/ORDER=X  I LE 3
             VARIABLE : I LE 3
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  1.000  1.000  0.000  0.000
LIST/ORDER=X  (I LT 3) OR (I GT 3)
             VARIABLE : (I LT 3) OR (I GT 3)
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  1.000  0.000  1.000  1.000
LIST/ORDER=X  (I LE 3) AND (I GE 3)
             VARIABLE : (I LE 3) AND (I GE 3)
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          0.000  0.000  1.000  0.000  0.000
LIST/ORDER=X  (I+3)*3 - 9 - (I+I+I)
             VARIABLE : (I+3)*3 - 9 - (I+I+I)
             SUBSET   : 5 points (X)
            1       2       3       4       5     
             1       2       3       4       5
          0.0000  0.0000  0.0000  0.0000  0.0000
LIST/ORDER=X  J * ( (I+3)*3 - 9 - (I+I+I) )
             VARIABLE : J * ( (I+3)*3 - 9 - (I+I+I) )
             SUBSET   : 5 by 5 points (X-Y)
             1       2       3       4       5     
              1       2       3       4       5
 1   / 1:  0.0000  0.0000  0.0000  0.0000  0.0000
 2   / 2:  0.0000  0.0000  0.0000  0.0000  0.0000
 3   / 3:  0.0000  0.0000  0.0000  0.0000  0.0000
 4   / 4:  0.0000  0.0000  0.0000  0.0000  0.0000
 5   / 5:  0.0000  0.0000  0.0000  0.0000  0.0000
 
! IF, THEN, ELSE
LIST/ORDER=X  IF I GT 3 THEN I
             VARIABLE : IF I GT 3 THEN I
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
           ....   ....   ....  4.000  5.000
LIST/ORDER=X  IF I GT 3 THEN I ELSE 0
             VARIABLE : IF I GT 3 THEN I ELSE 0
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          0.000  0.000  0.000  4.000  5.000
! error: nested IF tests
SET MODE IGNORE_ERRORS
LIST/ORDER=X  IF I GT 3 THEN ( IF I LT 5 THEN I ELSE -9 ) ELSE .333	! err
LET A = IF I LT 5 THEN I ELSE -9					! err
SET MODE/LAST IGNORE_ERRORS
LET A = IF I LT 5 THEN I ELSE (-9)
LIST/ORDER=X  IF I GT 3 THEN ( A ) ELSE .333
             VARIABLE : IF I GT 3 THEN ( A ) ELSE .333
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          0.333  0.333  0.333  4.000 -9.000
 
! functions
LIST/ORDER=X  MAX(I,3)
             VARIABLE : MAX(I,3)
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          3.000  3.000  3.000  4.000  5.000
LIST/ORDER=X  MIN(I,3)
             VARIABLE : MIN(I,3)
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  2.000  3.000  3.000  3.000
LIST/ORDER=X  INT(I/3)
             VARIABLE : INT(I/3)
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          0.000  0.000  1.000  1.000  1.000
LIST/ORDER=X  ABS(I-3)
             VARIABLE : ABS(I-3)
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          2.000  1.000  0.000  1.000  2.000
LIST/ORDER=X  EXP(I)
             VARIABLE : EXP(I)
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
            2.7    7.4   20.1   54.6  148.4
LIST/ORDER=X  LN(I)
             VARIABLE : LN(I)
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          0.000  0.693  1.099  1.386  1.609
LIST/ORDER=X  LN(EXP(I))
             VARIABLE : LN(EXP(I))
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  2.000  3.000  4.000  5.000
LIST/ORDER=X  EXP(LN(I))
             VARIABLE : EXP(LN(I))
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  2.000  3.000  4.000  5.000
LIST/ORDER=X  LOG(I)
             VARIABLE : LOG(I)
             SUBSET   : 5 points (X)
            1       2       3       4       5     
             1       2       3       4       5
          0.0000  0.3010  0.4771  0.6021  0.6990
LIST/ORDER=X  LOG(10^I)
             VARIABLE : LOG(10^I)
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  2.000  3.000  4.000  5.000
LIST/ORDER=X  10^LOG(I)
             VARIABLE : 10^LOG(I)
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  2.000  3.000  4.000  5.000
LIST/ORDER=X  SIN(I)
             VARIABLE : SIN(I)
             SUBSET   : 5 points (X)
            1       2       3       4       5     
             1       2       3       4       5
          0.8415  0.9093  0.1411 -0.7568 -0.9589
LIST/ORDER=X  ASIN(SIN(I/3))
             VARIABLE : ASIN(SIN(I/3))
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          0.333  0.667  1.000  1.333  1.475
LIST/ORDER=X  COS(I)
             VARIABLE : COS(I)
             SUBSET   : 5 points (X)
            1       2       3       4       5     
             1       2       3       4       5
          0.5403 -0.4161 -0.9900 -0.6536  0.2837
LIST/ORDER=X  ACOS(COS(I/3))
             VARIABLE : ACOS(COS(I/3))
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          0.333  0.667  1.000  1.333  1.667
LIST/ORDER=X  TAN(I)
             VARIABLE : TAN(I)
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          1.557 -2.185 -0.143  1.158 -3.381
LIST/ORDER=X  ATAN(TAN(I/3))
             VARIABLE : ATAN(TAN(I/3))
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          0.333  0.667  1.000  1.333 -1.475
LIST/J=1:3    ATAN2(J-1,I-1)
             VARIABLE : ATAN2(J-1,I-1)
             SUBSET   : 5 by 3 points (X-Y)
             1      2      3      4      5    
             1      2      3      4      5
 1   / 1:   ....  0.000  0.000  0.000  0.000
 2   / 2:  1.571  0.785  0.464  0.322  0.245
 3   / 3:  1.571  1.107  0.785  0.588  0.464
LIST/ORDER=X  MOD(I,3)
             VARIABLE : MOD(I,3)
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  2.000  0.000  1.000  2.000
LIST/ORDER=X  IGNORE0(I-3)
             VARIABLE : IGNORE0(I-3)
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
         -2.000 -1.000   ....  1.000  2.000
LIST/ORDER=X  MISSING( IGNORE0(I-3),-9 )
             VARIABLE : MISSING( IGNORE0(I-3),-9 )
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
         -2.000 -1.000 -9.000  1.000  2.000
LIST/ORDER=X  RANDU(I)
             VARIABLE : RANDU(I)
             SUBSET   : 5 points (X)
            1       2       3       4       5     
             1       2       3       4       5
          0.3376  0.7238  0.0304  0.8499  0.1694
LIST/ORDER=X  RANDN(I)
             VARIABLE : RANDN(I)
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
         -0.267  0.283 -0.323  1.217 -0.304
 
! syntax errors
SET MODE IGNORE_ERRORS
load a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21
SET MODE/LAST IGNORE_ERRORS
 
! commented out 1/96
!! test a little postfix, too
!SET MODE POLISH
!SET REGION/I=1:5/J=1:5
!LIST/ORDER=X  I 3 LE I 3 GE AND
!LIST/ORDER=X  I 3 + 3 * 9 - I I I + + -
!LIST/J=1:3    J 1 - I 1 - ATAN2
!! ... bug - negative constants not processed properly ...
!SET MODE IGNORE_ERRORS
!LIST/ORDER=X  I 3 - IGNORE0 -9 MISSING
!SET MODE/LAST IGNORE_ERRORS
!LIST/ORDER=X  I 3 - IGNORE0 0 9 - MISSING
!CANCEL MODE POLISH
 
! test formatted output where the output field is too small
LIST/I=1:3/FORMAT=(F6.2) 1/(i-2)		! single column test
             VARIABLE : 1/(I-2)
             BAD FLAG : -1.E+34       
             SUBSET   : 3 points (X)
             X        : 0.5 to 3.5
 -1.00
******
  1.00
LIST/I=1:3/FORMAT=(2F6.2) 1/(i-2),2/(i-2)	! multi-column test
             X: 0.5 to 3.5
 Column  1: EX#1 is 1/(I-2)
 Column  2: EX#2 is 2/(I-2)
 -1.00 -2.00
************
  1.00  2.00
 
! test new grid box limit pseudo-variables
LIST/I=5:7 XBOXLO, XBOXHI
             X: 4.5 to 7.5
 Column  1: XBOXLO is XBOXLO (axis ABSTRACT)
 Column  2: XBOXHI is XBOXHI (axis ABSTRACT)
        XBOXLO  XBOXHI
5   / 5:  4.500  5.500
6   / 6:  5.500  6.500
7   / 7:  6.500  7.500
LIST/J=5:7 YBOXLO, YBOXHI
             Y: 4.5 to 7.5
 Column  1: YBOXLO is YBOXLO (axis ABSTRACT)
 Column  2: YBOXHI is YBOXHI (axis ABSTRACT)
        YBOXLO  YBOXHI
5   / 5:  4.500  5.500
6   / 6:  5.500  6.500
7   / 7:  6.500  7.500
LIST/K=5:7 ZBOXLO, ZBOXHI
             Z: 4.5 to 7.5
 Column  1: ZBOXLO is ZBOXLO (axis ABSTRACT)
 Column  2: ZBOXHI is ZBOXHI (axis ABSTRACT)
        ZBOXLO  ZBOXHI
5   / 5:  4.500  5.500
6   / 6:  5.500  6.500
7   / 7:  6.500  7.500
LIST/L=5:7 TBOXLO, TBOXHI
             T: 4.5 to 7.5
 Column  1: TBOXLO is TBOXLO (axis ABSTRACT)
 Column  2: TBOXHI is TBOXHI (axis ABSTRACT)
        TBOXLO  TBOXHI
5   / 5:  4.500  5.500
6   / 6:  5.500  6.500
7   / 7:  6.500  7.500
*** Running ferret script: bn_geometry.jnl
! bn200_geometry.JNL
! benchmark various geometries for accessing FERRET data
! similar tests are performed on:
!	abstract variable
!	(user variable) transformed file variable
!	memory-resident file variable
!	disk-resident file variable
!	diagnostic variable
 
! ******** abstract variable ************
LET v_abst = i + 10*j + 100*k + 1000*l
DEFINE REGION/I=1 IPT
DEFINE REGION/J=1 JPT
DEFINE REGION/K=1 KPT
DEFINE REGION/L=1 LPT
DEFINE REGION/I=1:5/J=1:5/K=1:5/L=1:5 R4D
SET REG R4D
SET EXPRESSION v_abst
GO bn_geometry.sub
! BN200_GEOMETRY.SUB
! list the variable vtest on variuos geometries
 
! this routine assumes that a 4-D region and an expression are already set
 
! lines of data
LIST/@JPT/@KPT/@LPT/ORDER=X
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 5 points (X)
             Y        : 1
             Z        : 1
             T        : 1
            1      2      3      4      5    
            1      2      3      4      5
          1111.  1112.  1113.  1114.  1115.
LIST/@IPT/@KPT/@LPT/ORDER=Y
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 5 points (Y)
             X        : 1
             Z        : 1
             T        : 1
            1      2      3      4      5    
            1      2      3      4      5
          1111.  1121.  1131.  1141.  1151.
LIST/@IPT/@JPT/@LPT/ORDER=Z
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 5 points (Z)
             X        : 1
             Y        : 1
             T        : 1
            1      2      3      4      5    
            1      2      3      4      5
          1111.  1211.  1311.  1411.  1511.
LIST/@IPT/@JPT/@KPT/ORDER=T
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 5 points (T)
             X        : 1
             Y        : 1
             Z        : 1
            1      2      3      4      5    
            1      2      3      4      5
          1111.  2111.  3111.  4111.  5111.
 
! planes of data
LIST/@KPT/@LPT	!XY
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 5 by 5 points (X-Y)
             Z        : 1
             T        : 1
             1      2      3      4      5    
             1      2      3      4      5
 1   / 1:  1111.  1112.  1113.  1114.  1115.
 2   / 2:  1121.  1122.  1123.  1124.  1125.
 3   / 3:  1131.  1132.  1133.  1134.  1135.
 4   / 4:  1141.  1142.  1143.  1144.  1145.
 5   / 5:  1151.  1152.  1153.  1154.  1155.
LIST/@JPT/@LPT	!XZ
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 5 by 5 points (X-Z)
             Y        : 1
             T        : 1
             1      2      3      4      5    
             1      2      3      4      5
 1   / 1:  1111.  1112.  1113.  1114.  1115.
 2   / 2:  1211.  1212.  1213.  1214.  1215.
 3   / 3:  1311.  1312.  1313.  1314.  1315.
 4   / 4:  1411.  1412.  1413.  1414.  1415.
 5   / 5:  1511.  1512.  1513.  1514.  1515.
LIST/@JPT/@KPT	!XT
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 5 by 5 points (X-T)
             Y        : 1
             Z        : 1
             1      2      3      4      5    
             1      2      3      4      5
 1   / 1:  1111.  1112.  1113.  1114.  1115.
 2   / 2:  2111.  2112.  2113.  2114.  2115.
 3   / 3:  3111.  3112.  3113.  3114.  3115.
 4   / 4:  4111.  4112.  4113.  4114.  4115.
 5   / 5:  5111.  5112.  5113.  5114.  5115.
LIST/@IPT/@LPT	!YZ
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 5 by 5 points (Y-Z)
             X        : 1
             T        : 1
             1      2      3      4      5    
             1      2      3      4      5
 1   / 1:  1111.  1121.  1131.  1141.  1151.
 2   / 2:  1211.  1221.  1231.  1241.  1251.
 3   / 3:  1311.  1321.  1331.  1341.  1351.
 4   / 4:  1411.  1421.  1431.  1441.  1451.
 5   / 5:  1511.  1521.  1531.  1541.  1551.
LIST/@IPT/@KPT	!YT
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 5 by 5 points (Y-T)
             X        : 1
             Z        : 1
             1      2      3      4      5    
             1      2      3      4      5
 1   / 1:  1111.  1121.  1131.  1141.  1151.
 2   / 2:  2111.  2121.  2131.  2141.  2151.
 3   / 3:  3111.  3121.  3131.  3141.  3151.
 4   / 4:  4111.  4121.  4131.  4141.  4151.
 5   / 5:  5111.  5121.  5131.  5141.  5151.
LIST/@IPT/@JPT	!ZT
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 5 by 5 points (Z-T)
             X        : 1
             Y        : 1
             1      2      3      4      5    
             1      2      3      4      5
 1   / 1:  1111.  1211.  1311.  1411.  1511.
 2   / 2:  2111.  2211.  2311.  2411.  2511.
 3   / 3:  3111.  3211.  3311.  3411.  3511.
 4   / 4:  4111.  4211.  4311.  4411.  4511.
 5   / 5:  5111.  5211.  5311.  5411.  5511.
 
! cubes of data
LIST/@LPT
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 5 by 5 by 5 points (X-Y-Z)
             T        : 1
             1      2      3      4      5    
             1      2      3      4      5
 ---- K:1 Z:   1
 1   / 1:  1111.  1112.  1113.  1114.  1115.
 2   / 2:  1121.  1122.  1123.  1124.  1125.
 3   / 3:  1131.  1132.  1133.  1134.  1135.
 4   / 4:  1141.  1142.  1143.  1144.  1145.
 5   / 5:  1151.  1152.  1153.  1154.  1155.
 ---- K:2 Z:   2
 1   / 1:  1211.  1212.  1213.  1214.  1215.
 2   / 2:  1221.  1222.  1223.  1224.  1225.
 3   / 3:  1231.  1232.  1233.  1234.  1235.
 4   / 4:  1241.  1242.  1243.  1244.  1245.
 5   / 5:  1251.  1252.  1253.  1254.  1255.
 ---- K:3 Z:   3
 1   / 1:  1311.  1312.  1313.  1314.  1315.
 2   / 2:  1321.  1322.  1323.  1324.  1325.
 3   / 3:  1331.  1332.  1333.  1334.  1335.
 4   / 4:  1341.  1342.  1343.  1344.  1345.
 5   / 5:  1351.  1352.  1353.  1354.  1355.
 ---- K:4 Z:   4
 1   / 1:  1411.  1412.  1413.  1414.  1415.
 2   / 2:  1421.  1422.  1423.  1424.  1425.
 3   / 3:  1431.  1432.  1433.  1434.  1435.
 4   / 4:  1441.  1442.  1443.  1444.  1445.
 5   / 5:  1451.  1452.  1453.  1454.  1455.
 ---- K:5 Z:   5
 1   / 1:  1511.  1512.  1513.  1514.  1515.
 2   / 2:  1521.  1522.  1523.  1524.  1525.
 3   / 3:  1531.  1532.  1533.  1534.  1535.
 4   / 4:  1541.  1542.  1543.  1544.  1545.
 5   / 5:  1551.  1552.  1553.  1554.  1555.
LIST/@KPT
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 5 by 5 by 5 points (X-Y-T)
             Z        : 1
             1      2      3      4      5    
             1      2      3      4      5
 ---- L:1 T:   1
 1   / 1:  1111.  1112.  1113.  1114.  1115.
 2   / 2:  1121.  1122.  1123.  1124.  1125.
 3   / 3:  1131.  1132.  1133.  1134.  1135.
 4   / 4:  1141.  1142.  1143.  1144.  1145.
 5   / 5:  1151.  1152.  1153.  1154.  1155.
 ---- L:2 T:   2
 1   / 1:  2111.  2112.  2113.  2114.  2115.
 2   / 2:  2121.  2122.  2123.  2124.  2125.
 3   / 3:  2131.  2132.  2133.  2134.  2135.
 4   / 4:  2141.  2142.  2143.  2144.  2145.
 5   / 5:  2151.  2152.  2153.  2154.  2155.
 ---- L:3 T:   3
 1   / 1:  3111.  3112.  3113.  3114.  3115.
 2   / 2:  3121.  3122.  3123.  3124.  3125.
 3   / 3:  3131.  3132.  3133.  3134.  3135.
 4   / 4:  3141.  3142.  3143.  3144.  3145.
 5   / 5:  3151.  3152.  3153.  3154.  3155.
 ---- L:4 T:   4
 1   / 1:  4111.  4112.  4113.  4114.  4115.
 2   / 2:  4121.  4122.  4123.  4124.  4125.
 3   / 3:  4131.  4132.  4133.  4134.  4135.
 4   / 4:  4141.  4142.  4143.  4144.  4145.
 5   / 5:  4151.  4152.  4153.  4154.  4155.
 ---- L:5 T:   5
 1   / 1:  5111.  5112.  5113.  5114.  5115.
 2   / 2:  5121.  5122.  5123.  5124.  5125.
 3   / 3:  5131.  5132.  5133.  5134.  5135.
 4   / 4:  5141.  5142.  5143.  5144.  5145.
 5   / 5:  5151.  5152.  5153.  5154.  5155.
LIST/@JPT
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 5 by 5 by 5 points (X-Z-T)
             Y        : 1
             1      2      3      4      5    
             1      2      3      4      5
 ---- L:1 T:   1
 1   / 1:  1111.  1112.  1113.  1114.  1115.
 2   / 2:  1211.  1212.  1213.  1214.  1215.
 3   / 3:  1311.  1312.  1313.  1314.  1315.
 4   / 4:  1411.  1412.  1413.  1414.  1415.
 5   / 5:  1511.  1512.  1513.  1514.  1515.
 ---- L:2 T:   2
 1   / 1:  2111.  2112.  2113.  2114.  2115.
 2   / 2:  2211.  2212.  2213.  2214.  2215.
 3   / 3:  2311.  2312.  2313.  2314.  2315.
 4   / 4:  2411.  2412.  2413.  2414.  2415.
 5   / 5:  2511.  2512.  2513.  2514.  2515.
 ---- L:3 T:   3
 1   / 1:  3111.  3112.  3113.  3114.  3115.
 2   / 2:  3211.  3212.  3213.  3214.  3215.
 3   / 3:  3311.  3312.  3313.  3314.  3315.
 4   / 4:  3411.  3412.  3413.  3414.  3415.
 5   / 5:  3511.  3512.  3513.  3514.  3515.
 ---- L:4 T:   4
 1   / 1:  4111.  4112.  4113.  4114.  4115.
 2   / 2:  4211.  4212.  4213.  4214.  4215.
 3   / 3:  4311.  4312.  4313.  4314.  4315.
 4   / 4:  4411.  4412.  4413.  4414.  4415.
 5   / 5:  4511.  4512.  4513.  4514.  4515.
 ---- L:5 T:   5
 1   / 1:  5111.  5112.  5113.  5114.  5115.
 2   / 2:  5211.  5212.  5213.  5214.  5215.
 3   / 3:  5311.  5312.  5313.  5314.  5315.
 4   / 4:  5411.  5412.  5413.  5414.  5415.
 5   / 5:  5511.  5512.  5513.  5514.  5515.
LIST/@IPT
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 5 by 5 by 5 points (Y-Z-T)
             X        : 1
             1      2      3      4      5    
             1      2      3      4      5
 ---- L:1 T:   1
 1   / 1:  1111.  1121.  1131.  1141.  1151.
 2   / 2:  1211.  1221.  1231.  1241.  1251.
 3   / 3:  1311.  1321.  1331.  1341.  1351.
 4   / 4:  1411.  1421.  1431.  1441.  1451.
 5   / 5:  1511.  1521.  1531.  1541.  1551.
 ---- L:2 T:   2
 1   / 1:  2111.  2121.  2131.  2141.  2151.
 2   / 2:  2211.  2221.  2231.  2241.  2251.
 3   / 3:  2311.  2321.  2331.  2341.  2351.
 4   / 4:  2411.  2421.  2431.  2441.  2451.
 5   / 5:  2511.  2521.  2531.  2541.  2551.
 ---- L:3 T:   3
 1   / 1:  3111.  3121.  3131.  3141.  3151.
 2   / 2:  3211.  3221.  3231.  3241.  3251.
 3   / 3:  3311.  3321.  3331.  3341.  3351.
 4   / 4:  3411.  3421.  3431.  3441.  3451.
 5   / 5:  3511.  3521.  3531.  3541.  3551.
 ---- L:4 T:   4
 1   / 1:  4111.  4121.  4131.  4141.  4151.
 2   / 2:  4211.  4221.  4231.  4241.  4251.
 3   / 3:  4311.  4321.  4331.  4341.  4351.
 4   / 4:  4411.  4421.  4431.  4441.  4451.
 5   / 5:  4511.  4521.  4531.  4541.  4551.
 ---- L:5 T:   5
 1   / 1:  5111.  5121.  5131.  5141.  5151.
 2   / 2:  5211.  5221.  5231.  5241.  5251.
 3   / 3:  5311.  5321.  5331.  5341.  5351.
 4   / 4:  5411.  5421.  5431.  5441.  5451.
 5   / 5:  5511.  5521.  5531.  5541.  5551.
 
! 4D region
LOAD
 
! ******** transformed file variable ************
USE gt4d011
LET temp_sq = temp^2
DEFINE REGION/I=101 IPT
DEFINE REGION/J=46 JPT
DEFINE REGION/K=1 KPT
DEFINE REGION/L=1 LPT
DEFINE REGION/I=101:105/J=46:50/K=1:5/L=1:5 R4D
SET REG R4D
SET EXPRESSION temp_sq
GO bn_geometry.sub
! BN200_GEOMETRY.SUB
! list the variable vtest on variuos geometries
 
! this routine assumes that a 4-D region and an expression are already set
 
! lines of data
LIST/@JPT/@KPT/@LPT/ORDER=X
             VARIABLE : TEMP^2
             FILENAME : gt4d011.cdf
             SUBSET   : 5 points (LONGITUDE)
             LATITUDE : 0.167N
             DEPTH (m): 5
             TIME     : 17-AUG-1982 12:00
          129.5W 128.5W 127.5W 126.5W 125.5W 
          101    102    103    104    105
          664.8  665.8  666.6  665.4  662.8
LIST/@IPT/@KPT/@LPT/ORDER=Y
             VARIABLE : TEMP^2
             FILENAME : gt4d011.cdf
             SUBSET   : 5 points (LATITUDE)
             LONGITUDE: 129.5W
             DEPTH (m): 5
             TIME     : 17-AUG-1982 12:00
           0.17N  0.5N   0.83N  1.17N  1.5N  
           46     47     48     49     50
          664.8  670.7  678.3  687.3  698.1
LIST/@IPT/@JPT/@LPT/ORDER=Z
             VARIABLE : TEMP^2
             FILENAME : gt4d011.cdf
             SUBSET   : 5 points (DEPTH (m))
             LONGITUDE: 129.5W
             LATITUDE : 0.167N
             TIME     : 17-AUG-1982 12:00
           5      15     25     35     45    
            1      2      3      4      5
          664.8  658.8  650.5  642.6  633.2
LIST/@IPT/@JPT/@KPT/ORDER=T
             VARIABLE : TEMP^2
             FILENAME : gt4d011.cdf
             SUBSET   : 5 points (TIME)
             LONGITUDE: 129.5W
             LATITUDE : 0.167N
             DEPTH (m): 5
           1982   1982   1982   1982   1982  
            1      2      3      4      5
          664.8  674.8  685.3  696.6  708.4
 
! planes of data
LIST/@KPT/@LPT	!XY
             VARIABLE : TEMP^2
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 17-AUG-1982 12:00
              129.5W 128.5W 127.5W 126.5W 125.5W 
              101    102    103    104    105
 1.5N  / 50:  698.1  699.9  702.0  702.5  701.2
 1.17N / 49:  687.3  690.0  691.9  691.7  689.5
 0.83N / 48:  678.3  681.0  682.6  681.7  678.9
 0.5N  / 47:  670.7  672.9  674.1  672.9  670.1
 0.17N / 46:  664.8  665.8  666.6  665.4  662.8
LIST/@JPT/@LPT	!XZ
             VARIABLE : TEMP^2
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-DEPTH (m))
             LATITUDE : 0.167N
             TIME     : 17-AUG-1982 12:00
             129.5W 128.5W 127.5W 126.5W 125.5W 
             101    102    103    104    105
 5     / 1:  664.8  665.8  666.6  665.4  662.8
 15    / 2:  658.8  659.8  660.6  659.5  657.0
 25    / 3:  650.5  651.6  652.5  651.8  649.5
 35    / 4:  642.6  643.2  643.2  642.2  639.8
 45    / 5:  633.2  632.6  631.0  628.7  625.8
LIST/@JPT/@KPT	!XT
             VARIABLE : TEMP^2
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-TIME)
             LATITUDE : 0.167N
             DEPTH (m): 5
                      129.5W 128.5W 127.5W 126.5W 125.5W 
                      101    102    103    104    105
 17-AUG-1982 12 / 1:  664.8  665.8  666.6  665.4  662.8
 23-AUG-1982 14 / 2:  674.8  674.4  672.8  670.1  667.2
 29-AUG-1982 16 / 3:  685.3  682.5  679.4  676.5  674.4
 04-SEP-1982 18 / 4:  696.6  692.3  688.4  685.6  684.0
 10-SEP-1982 20 / 5:  708.4  704.7  700.4  697.1  695.1
LIST/@IPT/@LPT	!YZ
             VARIABLE : TEMP^2
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 points (LATITUDE-DEPTH (m))
             LONGITUDE: 129.5W
             TIME     : 17-AUG-1982 12:00
              0.17N  0.5N   0.83N  1.17N  1.5N  
              46     47     48     49     50
 5     / 1:  664.8  670.7  678.3  687.3  698.1
 15    / 2:  658.8  665.4  673.8  683.5  694.9
 25    / 3:  650.5  659.6  670.7  682.2  694.3
 35    / 4:  642.6  654.3  668.7  681.9  694.4
 45    / 5:  633.2  645.7  664.2  681.4  694.5
LIST/@IPT/@KPT	!YT
             VARIABLE : TEMP^2
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 points (LATITUDE-TIME)
             LONGITUDE: 129.5W
             DEPTH (m): 5
                       0.17N  0.5N   0.83N  1.17N  1.5N  
                       46     47     48     49     50
 17-AUG-1982 12 / 1:  664.8  670.7  678.3  687.3  698.1
 23-AUG-1982 14 / 2:  674.8  681.5  689.5  699.0  710.0
 29-AUG-1982 16 / 3:  685.3  691.9  700.1  710.3  721.6
 04-SEP-1982 18 / 4:  696.6  702.9  711.1  721.2  731.5
 10-SEP-1982 20 / 5:  708.4  714.1  721.8  730.4  738.2
LIST/@IPT/@JPT	!ZT
             VARIABLE : TEMP^2
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 points (DEPTH (m)-TIME)
             LONGITUDE: 129.5W
             LATITUDE : 0.167N
                       5      15     25     35     45    
                        1      2      3      4      5
 17-AUG-1982 12 / 1:  664.8  658.8  650.5  642.6  633.2
 23-AUG-1982 14 / 2:  674.8  669.2  660.6  652.7  643.1
 29-AUG-1982 16 / 3:  685.3  680.3  672.3  665.2  655.3
 04-SEP-1982 18 / 4:  696.6  692.0  684.3  677.9  667.3
 10-SEP-1982 20 / 5:  708.4  704.0  695.0  688.9  678.3
 
! cubes of data
LIST/@LPT
             VARIABLE : TEMP^2
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 by 5 points (LONGITUDE-LATITUDE-DEPTH (m))
             TIME     : 17-AUG-1982 12:00
              129.5W 128.5W 127.5W 126.5W 125.5W 
              101    102    103    104    105
 ---- K:1 Z:   5
 1.5N  / 50:  698.1  699.9  702.0  702.5  701.2
 1.17N / 49:  687.3  690.0  691.9  691.7  689.5
 0.83N / 48:  678.3  681.0  682.6  681.7  678.9
 0.5N  / 47:  670.7  672.9  674.1  672.9  670.1
 0.17N / 46:  664.8  665.8  666.6  665.4  662.8
 ---- K:2 Z:   15
 1.5N  / 50:  694.9  696.6  698.7  699.4  698.2
 1.17N / 49:  683.5  686.1  688.3  688.2  686.2
 0.83N / 48:  673.8  676.5  678.3  677.6  675.0
 0.5N  / 47:  665.4  667.6  669.0  668.0  665.2
 0.17N / 46:  658.8  659.8  660.6  659.5  657.0
 ---- K:3 Z:   25
 1.5N  / 50:  694.3  695.9  698.0  698.9  697.7
 1.17N / 49:  682.2  684.7  687.1  687.4  685.4
 0.83N / 48:  670.7  673.5  675.7  675.5  673.0
 0.5N  / 47:  659.6  661.9  663.6  663.2  660.6
 0.17N / 46:  650.5  651.6  652.5  651.8  649.5
 ---- K:4 Z:   35
 1.5N  / 50:  694.4  696.0  698.1  699.0  697.8
 1.17N / 49:  681.9  684.4  686.8  687.2  685.2
 0.83N / 48:  668.7  671.3  673.3  673.5  671.0
 0.5N  / 47:  654.3  656.2  657.3  656.9  654.3
 0.17N / 46:  642.6  643.2  643.2  642.2  639.8
 ---- K:5 Z:   45
 1.5N  / 50:  694.5  696.1  698.2  699.0  697.9
 1.17N / 49:  681.4  683.8  685.9  686.5  684.5
 0.83N / 48:  664.2  665.9  666.5  666.0  663.3
 0.5N  / 47:  645.7  646.5  645.8  644.0  641.0
 0.17N / 46:  633.2  632.6  631.0  628.7  625.8
LIST/@KPT
             VARIABLE : TEMP^2
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 by 5 points (LONGITUDE-LATITUDE-TIME)
             DEPTH (m): 5
              129.5W 128.5W 127.5W 126.5W 125.5W 
              101    102    103    104    105
 ---- L:1 T:   17-AUG-1982 12:00
 1.5N  / 50:  698.1  699.9  702.0  702.5  701.2
 1.17N / 49:  687.3  690.0  691.9  691.7  689.5
 0.83N / 48:  678.3  681.0  682.6  681.7  678.9
 0.5N  / 47:  670.7  672.9  674.1  672.9  670.1
 0.17N / 46:  664.8  665.8  666.6  665.4  662.8
 ---- L:2 T:   23-AUG-1982 14:00
 1.5N  / 50:  710.0  709.0  707.8  706.0  703.5
 1.17N / 49:  699.0  698.2  697.0  694.4  691.4
 0.83N / 48:  689.5  689.0  687.5  684.5  681.3
 0.5N  / 47:  681.5  681.1  679.5  676.5  673.4
 0.17N / 46:  674.8  674.4  672.8  670.1  667.2
 ---- L:3 T:   29-AUG-1982 16:00
 1.5N  / 50:  721.6  717.3  712.8  709.6  707.5
 1.17N / 49:  710.3  705.9  701.5  698.1  695.9
 0.83N / 48:  700.1  696.1  692.1  688.7  686.5
 0.5N  / 47:  691.9  688.4  684.9  681.7  679.5
 0.17N / 46:  685.3  682.5  679.4  676.5  674.4
 ---- L:4 T:   04-SEP-1982 18:00
 1.5N  / 50:  731.5  725.7  718.0  713.9  713.0
 1.17N / 49:  721.2  714.2  707.1  703.4  702.5
 0.83N / 48:  711.1  704.5  698.6  695.2  694.3
 0.5N  / 47:  702.9  697.4  692.6  689.5  688.3
 0.17N / 46:  696.6  692.3  688.4  685.6  684.0
 ---- L:5 T:   10-SEP-1982 20:00
 1.5N  / 50:  738.2  735.8  726.4  720.5  720.1
 1.17N / 49:  730.4  725.1  716.1  711.0  710.5
 0.83N / 48:  721.8  715.7  708.5  704.2  703.4
 0.5N  / 47:  714.1  708.9  703.4  699.8  698.4
 0.17N / 46:  708.4  704.7  700.4  697.1  695.1
LIST/@JPT
             VARIABLE : TEMP^2
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 by 5 points (LONGITUDE-DEPTH (m)-TIME)
             LATITUDE : 0.167N
             129.5W 128.5W 127.5W 126.5W 125.5W 
             101    102    103    104    105
 ---- L:1 T:   17-AUG-1982 12:00
 5     / 1:  664.8  665.8  666.6  665.4  662.8
 15    / 2:  658.8  659.8  660.6  659.5  657.0
 25    / 3:  650.5  651.6  652.5  651.8  649.5
 35    / 4:  642.6  643.2  643.2  642.2  639.8
 45    / 5:  633.2  632.6  631.0  628.7  625.8
 ---- L:2 T:   23-AUG-1982 14:00
 5     / 1:  674.8  674.4  672.8  670.1  667.2
 15    / 2:  669.2  668.9  667.3  664.6  661.6
 25    / 3:  660.6  660.8  659.4  656.7  653.6
 35    / 4:  652.7  652.9  651.0  648.1  644.9
 45    / 5:  643.1  642.3  639.7  636.2  633.0
 ---- L:3 T:   29-AUG-1982 16:00
 5     / 1:  685.3  682.5  679.4  676.5  674.4
 15    / 2:  680.3  677.5  674.3  671.3  669.0
 25    / 3:  672.3  670.2  666.5  662.8  660.1
 35    / 4:  665.2  663.6  659.6  655.6  652.4
 45    / 5:  655.3  653.6  649.7  645.7  642.6
 ---- L:4 T:   04-SEP-1982 18:00
 5     / 1:  696.6  692.3  688.4  685.6  684.0
 15    / 2:  692.0  687.7  683.5  680.5  678.8
 25    / 3:  684.3  680.5  675.0  670.7  668.3
 35    / 4:  677.9  674.9  669.3  664.5  661.4
 45    / 5:  667.3  665.0  660.5  656.2  653.0
 ---- L:5 T:   10-SEP-1982 20:00
 5     / 1:  708.4  704.7  700.4  697.1  695.1
 15    / 2:  704.0  700.2  695.7  692.1  690.1
 25    / 3:  695.0  692.2  685.8  680.4  677.6
 35    / 4:  688.9  687.1  680.9  675.2  671.8
 45    / 5:  678.3  676.6  672.2  667.7  664.3
LIST/@IPT
             VARIABLE : TEMP^2
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 by 5 points (LATITUDE-DEPTH (m)-TIME)
             LONGITUDE: 129.5W
              0.17N  0.5N   0.83N  1.17N  1.5N  
              46     47     48     49     50
 ---- L:1 T:   17-AUG-1982 12:00
 5     / 1:  664.8  670.7  678.3  687.3  698.1
 15    / 2:  658.8  665.4  673.8  683.5  694.9
 25    / 3:  650.5  659.6  670.7  682.2  694.3
 35    / 4:  642.6  654.3  668.7  681.9  694.4
 45    / 5:  633.2  645.7  664.2  681.4  694.5
 ---- L:2 T:   23-AUG-1982 14:00
 5     / 1:  674.8  681.5  689.5  699.0  710.0
 15    / 2:  669.2  676.7  685.5  695.7  707.2
 25    / 3:  660.6  671.4  683.3  694.9  706.9
 35    / 4:  652.7  666.4  681.9  694.9  707.0
 45    / 5:  643.1  657.3  677.1  694.8  707.0
 ---- L:3 T:   29-AUG-1982 16:00
 5     / 1:  685.3  691.9  700.1  710.3  721.6
 15    / 2:  680.3  687.7  696.8  707.5  719.1
 25    / 3:  672.3  683.9  695.6  707.2  718.8
 35    / 4:  665.2  680.2  695.2  707.3  718.9
 45    / 5:  655.3  670.9  691.1  707.3  718.9
 ---- L:4 T:   04-SEP-1982 18:00
 5     / 1:  696.6  702.9  711.1  721.2  731.5
 15    / 2:  692.0  699.1  708.1  718.5  728.9
 25    / 3:  684.3  696.0  707.3  718.3  728.5
 35    / 4:  677.9  693.1  707.2  718.3  728.7
 45    / 5:  667.3  683.1  703.1  718.3  728.7
 ---- L:5 T:   10-SEP-1982 20:00
 5     / 1:  708.4  714.1  721.8  730.4  738.2
 15    / 2:  704.0  710.4  718.6  727.4  735.1
 25    / 3:  695.0  706.8  717.4  726.4  733.8
 35    / 4:  688.9  703.8  717.2  726.4  733.8
 45    / 5:  678.3  692.9  712.0  726.2  733.9
 
! 4D region
LOAD
 
! ******** memory-resident file variable ************
USE gt4d011
CANCEL MEMORY/ALL
SET MODE DIAGNOSTIC
DEFINE REGION/I=101 IPT
DEFINE REGION/J=46 JPT
DEFINE REGION/K=1 KPT
DEFINE REGION/L=1 LPT
DEFINE REGION/I=101:105/J=46:50/K=1:5/L=1:5 R4D
SET REG R4D
SET EXPRESSION temp
LOAD		! load full 4-D region
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DT2          PSXT      PSYT      PSZT      TIME1
 eval    EX#1     C:  4 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
 reading TEMP     M: 28 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
GO bn_geometry.sub
! BN200_GEOMETRY.SUB
! list the variable vtest on variuos geometries
 
! this routine assumes that a 4-D region and an expression are already set
 
! lines of data
LIST/@JPT/@KPT/@LPT/ORDER=X
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    105  J:   46   46  K:    1    1  L:      1      1
 found   TEMP     M: 28 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 points (LONGITUDE)
             LATITUDE : 0.167N
             DEPTH (m): 5
             TIME     : 17-AUG-1982 12:00
          129.5W 128.5W 127.5W 126.5W 125.5W 
          101    102    103    104    105
          25.78  25.80  25.82  25.80  25.74
 -DELETE TEMP     M: 26 dset:   1 I:    101    105  J:   46   46  K:    1    1  L:      1      1
LIST/@IPT/@KPT/@LPT/ORDER=Y
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    101  J:   46   50  K:    1    1  L:      1      1
 found   TEMP     M: 28 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 points (LATITUDE)
             LONGITUDE: 129.5W
             DEPTH (m): 5
             TIME     : 17-AUG-1982 12:00
           0.17N  0.5N   0.83N  1.17N  1.5N  
           46     47     48     49     50
          25.78  25.90  26.04  26.22  26.42
 -DELETE TEMP     M: 26 dset:   1 I:     46     50  J:  101  101  K:    1    1  L:      1      1
LIST/@IPT/@JPT/@LPT/ORDER=Z
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    101  J:   46   46  K:    1    5  L:      1      1
 found   TEMP     M: 28 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 points (DEPTH (m))
             LONGITUDE: 129.5W
             LATITUDE : 0.167N
             TIME     : 17-AUG-1982 12:00
           5      15     25     35     45    
            1      2      3      4      5
          25.78  25.67  25.51  25.35  25.16
 -DELETE TEMP     M: 26 dset:   1 I:      1      5  J:  101  101  K:   46   46  L:      1      1
LIST/@IPT/@JPT/@KPT/ORDER=T
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    101  J:   46   46  K:    1    1  L:      1      5
 found   TEMP     M: 28 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 points (TIME)
             LONGITUDE: 129.5W
             LATITUDE : 0.167N
             DEPTH (m): 5
           1982   1982   1982   1982   1982  
            1      2      3      4      5
          25.78  25.98  26.18  26.39  26.62
 -DELETE TEMP     M: 26 dset:   1 I:      1      5  J:  101  101  K:   46   46  L:      1      1
 
! planes of data
LIST/@KPT/@LPT	!XY
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    105  J:   46   50  K:    1    1  L:      1      1
 found   TEMP     M: 28 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 17-AUG-1982 12:00
              129.5W 128.5W 127.5W 126.5W 125.5W 
              101    102    103    104    105
 1.5N  / 50:  26.42  26.46  26.50  26.51  26.48
 1.17N / 49:  26.22  26.27  26.30  26.30  26.26
 0.83N / 48:  26.04  26.10  26.13  26.11  26.06
 0.5N  / 47:  25.90  25.94  25.96  25.94  25.89
 0.17N / 46:  25.78  25.80  25.82  25.80  25.74
 -DELETE TEMP     M: 26 dset:   1 I:    101    105  J:   46   50  K:    1    1  L:      1      1
LIST/@JPT/@LPT	!XZ
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    105  J:   46   46  K:    1    5  L:      1      1
 found   TEMP     M: 28 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-DEPTH (m))
             LATITUDE : 0.167N
             TIME     : 17-AUG-1982 12:00
             129.5W 128.5W 127.5W 126.5W 125.5W 
             101    102    103    104    105
 5     / 1:  25.78  25.80  25.82  25.80  25.74
 15    / 2:  25.67  25.69  25.70  25.68  25.63
 25    / 3:  25.51  25.53  25.54  25.53  25.48
 35    / 4:  25.35  25.36  25.36  25.34  25.29
 45    / 5:  25.16  25.15  25.12  25.07  25.02
 -DELETE TEMP     M: 26 dset:   1 I:    101    105  J:    1    5  K:   46   46  L:      1      1
LIST/@JPT/@KPT	!XT
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    105  J:   46   46  K:    1    1  L:      1      5
 found   TEMP     M: 28 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-TIME)
             LATITUDE : 0.167N
             DEPTH (m): 5
                      129.5W 128.5W 127.5W 126.5W 125.5W 
                      101    102    103    104    105
 17-AUG-1982 12 / 1:  25.78  25.80  25.82  25.80  25.74
 23-AUG-1982 14 / 2:  25.98  25.97  25.94  25.89  25.83
 29-AUG-1982 16 / 3:  26.18  26.13  26.07  26.01  25.97
 04-SEP-1982 18 / 4:  26.39  26.31  26.24  26.18  26.15
 10-SEP-1982 20 / 5:  26.62  26.55  26.47  26.40  26.36
 -DELETE TEMP     M: 26 dset:   1 I:    101    105  J:    1    5  K:   46   46  L:      1      1
LIST/@IPT/@LPT	!YZ
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    101  J:   46   50  K:    1    5  L:      1      1
 found   TEMP     M: 28 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 points (LATITUDE-DEPTH (m))
             LONGITUDE: 129.5W
             TIME     : 17-AUG-1982 12:00
              0.17N  0.5N   0.83N  1.17N  1.5N  
              46     47     48     49     50
 5     / 1:  25.78  25.90  26.04  26.22  26.42
 15    / 2:  25.67  25.80  25.96  26.14  26.36
 25    / 3:  25.51  25.68  25.90  26.12  26.35
 35    / 4:  25.35  25.58  25.86  26.11  26.35
 45    / 5:  25.16  25.41  25.77  26.10  26.35
 -DELETE TEMP     M: 26 dset:   1 I:     46     50  J:    1    5  K:  101  101  L:      1      1
LIST/@IPT/@KPT	!YT
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    101  J:   46   50  K:    1    1  L:      1      5
 found   TEMP     M: 28 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 points (LATITUDE-TIME)
             LONGITUDE: 129.5W
             DEPTH (m): 5
                       0.17N  0.5N   0.83N  1.17N  1.5N  
                       46     47     48     49     50
 17-AUG-1982 12 / 1:  25.78  25.90  26.04  26.22  26.42
 23-AUG-1982 14 / 2:  25.98  26.10  26.26  26.44  26.65
 29-AUG-1982 16 / 3:  26.18  26.30  26.46  26.65  26.86
 04-SEP-1982 18 / 4:  26.39  26.51  26.67  26.85  27.05
 10-SEP-1982 20 / 5:  26.62  26.72  26.87  27.03  27.17
 -DELETE TEMP     M: 26 dset:   1 I:     46     50  J:    1    5  K:  101  101  L:      1      1
LIST/@IPT/@JPT	!ZT
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    101  J:   46   46  K:    1    5  L:      1      5
 found   TEMP     M: 28 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 points (DEPTH (m)-TIME)
             LONGITUDE: 129.5W
             LATITUDE : 0.167N
                       5      15     25     35     45    
                        1      2      3      4      5
 17-AUG-1982 12 / 1:  25.78  25.67  25.51  25.35  25.16
 23-AUG-1982 14 / 2:  25.98  25.87  25.70  25.55  25.36
 29-AUG-1982 16 / 3:  26.18  26.08  25.93  25.79  25.60
 04-SEP-1982 18 / 4:  26.39  26.31  26.16  26.04  25.83
 10-SEP-1982 20 / 5:  26.62  26.53  26.36  26.25  26.04
 -DELETE TEMP     M: 26 dset:   1 I:      1      5  J:    1    5  K:  101  101  L:     46     46
 
! cubes of data
LIST/@LPT
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      1
 found   TEMP     M: 28 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 by 5 points (LONGITUDE-LATITUDE-DEPTH (m))
             TIME     : 17-AUG-1982 12:00
              129.5W 128.5W 127.5W 126.5W 125.5W 
              101    102    103    104    105
 ---- K:1 Z:   5
 1.5N  / 50:  26.42  26.46  26.50  26.51  26.48
 1.17N / 49:  26.22  26.27  26.30  26.30  26.26
 0.83N / 48:  26.04  26.10  26.13  26.11  26.06
 0.5N  / 47:  25.90  25.94  25.96  25.94  25.89
 0.17N / 46:  25.78  25.80  25.82  25.80  25.74
 ---- K:2 Z:   15
 1.5N  / 50:  26.36  26.39  26.43  26.45  26.42
 1.17N / 49:  26.14  26.19  26.23  26.23  26.19
 0.83N / 48:  25.96  26.01  26.04  26.03  25.98
 0.5N  / 47:  25.80  25.84  25.87  25.85  25.79
 0.17N / 46:  25.67  25.69  25.70  25.68  25.63
 ---- K:3 Z:   25
 1.5N  / 50:  26.35  26.38  26.42  26.44  26.41
 1.17N / 49:  26.12  26.17  26.21  26.22  26.18
 0.83N / 48:  25.90  25.95  25.99  25.99  25.94
 0.5N  / 47:  25.68  25.73  25.76  25.75  25.70
 0.17N / 46:  25.51  25.53  25.54  25.53  25.48
 ---- K:4 Z:   35
 1.5N  / 50:  26.35  26.38  26.42  26.44  26.42
 1.17N / 49:  26.11  26.16  26.21  26.22  26.18
 0.83N / 48:  25.86  25.91  25.95  25.95  25.90
 0.5N  / 47:  25.58  25.62  25.64  25.63  25.58
 0.17N / 46:  25.35  25.36  25.36  25.34  25.29
 ---- K:5 Z:   45
 1.5N  / 50:  26.35  26.38  26.42  26.44  26.42
 1.17N / 49:  26.10  26.15  26.19  26.20  26.16
 0.83N / 48:  25.77  25.81  25.82  25.81  25.76
 0.5N  / 47:  25.41  25.43  25.41  25.38  25.32
 0.17N / 46:  25.16  25.15  25.12  25.07  25.02
 -DELETE TEMP     M: 26 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      1
LIST/@KPT
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    105  J:   46   50  K:    1    1  L:      1      5
 found   TEMP     M: 28 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 by 5 points (LONGITUDE-LATITUDE-TIME)
             DEPTH (m): 5
              129.5W 128.5W 127.5W 126.5W 125.5W 
              101    102    103    104    105
 ---- L:1 T:   17-AUG-1982 12:00
 1.5N  / 50:  26.42  26.46  26.50  26.51  26.48
 1.17N / 49:  26.22  26.27  26.30  26.30  26.26
 0.83N / 48:  26.04  26.10  26.13  26.11  26.06
 0.5N  / 47:  25.90  25.94  25.96  25.94  25.89
 0.17N / 46:  25.78  25.80  25.82  25.80  25.74
 ---- L:2 T:   23-AUG-1982 14:00
 1.5N  / 50:  26.65  26.63  26.60  26.57  26.52
 1.17N / 49:  26.44  26.42  26.40  26.35  26.29
 0.83N / 48:  26.26  26.25  26.22  26.16  26.10
 0.5N  / 47:  26.10  26.10  26.07  26.01  25.95
 0.17N / 46:  25.98  25.97  25.94  25.89  25.83
 ---- L:3 T:   29-AUG-1982 16:00
 1.5N  / 50:  26.86  26.78  26.70  26.64  26.60
 1.17N / 49:  26.65  26.57  26.49  26.42  26.38
 0.83N / 48:  26.46  26.38  26.31  26.24  26.20
 0.5N  / 47:  26.30  26.24  26.17  26.11  26.07
 0.17N / 46:  26.18  26.13  26.07  26.01  25.97
 ---- L:4 T:   04-SEP-1982 18:00
 1.5N  / 50:  27.05  26.94  26.80  26.72  26.70
 1.17N / 49:  26.85  26.72  26.59  26.52  26.51
 0.83N / 48:  26.67  26.54  26.43  26.37  26.35
 0.5N  / 47:  26.51  26.41  26.32  26.26  26.23
 0.17N / 46:  26.39  26.31  26.24  26.18  26.15
 ---- L:5 T:   10-SEP-1982 20:00
 1.5N  / 50:  27.17  27.13  26.95  26.84  26.83
 1.17N / 49:  27.03  26.93  26.76  26.66  26.65
 0.83N / 48:  26.87  26.75  26.62  26.54  26.52
 0.5N  / 47:  26.72  26.63  26.52  26.45  26.43
 0.17N / 46:  26.62  26.55  26.47  26.40  26.36
 -DELETE TEMP     M: 26 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      1
LIST/@JPT
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    105  J:   46   46  K:    1    5  L:      1      5
 found   TEMP     M: 28 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 by 5 points (LONGITUDE-DEPTH (m)-TIME)
             LATITUDE : 0.167N
             129.5W 128.5W 127.5W 126.5W 125.5W 
             101    102    103    104    105
 ---- L:1 T:   17-AUG-1982 12:00
 5     / 1:  25.78  25.80  25.82  25.80  25.74
 15    / 2:  25.67  25.69  25.70  25.68  25.63
 25    / 3:  25.51  25.53  25.54  25.53  25.48
 35    / 4:  25.35  25.36  25.36  25.34  25.29
 45    / 5:  25.16  25.15  25.12  25.07  25.02
 ---- L:2 T:   23-AUG-1982 14:00
 5     / 1:  25.98  25.97  25.94  25.89  25.83
 15    / 2:  25.87  25.86  25.83  25.78  25.72
 25    / 3:  25.70  25.71  25.68  25.63  25.57
 35    / 4:  25.55  25.55  25.52  25.46  25.40
 45    / 5:  25.36  25.34  25.29  25.22  25.16
 ---- L:3 T:   29-AUG-1982 16:00
 5     / 1:  26.18  26.13  26.07  26.01  25.97
 15    / 2:  26.08  26.03  25.97  25.91  25.87
 25    / 3:  25.93  25.89  25.82  25.75  25.69
 35    / 4:  25.79  25.76  25.68  25.60  25.54
 45    / 5:  25.60  25.56  25.49  25.41  25.35
 ---- L:4 T:   04-SEP-1982 18:00
 5     / 1:  26.39  26.31  26.24  26.18  26.15
 15    / 2:  26.31  26.22  26.14  26.09  26.05
 25    / 3:  26.16  26.09  25.98  25.90  25.85
 35    / 4:  26.04  25.98  25.87  25.78  25.72
 45    / 5:  25.83  25.79  25.70  25.62  25.55
 ---- L:5 T:   10-SEP-1982 20:00
 5     / 1:  26.62  26.55  26.47  26.40  26.36
 15    / 2:  26.53  26.46  26.38  26.31  26.27
 25    / 3:  26.36  26.31  26.19  26.08  26.03
 35    / 4:  26.25  26.21  26.09  25.98  25.92
 45    / 5:  26.04  26.01  25.93  25.84  25.77
 -DELETE TEMP     M: 26 dset:   1 I:    101    105  J:    1    5  K:    1    5  L:     46     46
LIST/@IPT
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    101  J:   46   50  K:    1    5  L:      1      5
 found   TEMP     M: 28 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 by 5 points (LATITUDE-DEPTH (m)-TIME)
             LONGITUDE: 129.5W
              0.17N  0.5N   0.83N  1.17N  1.5N  
              46     47     48     49     50
 ---- L:1 T:   17-AUG-1982 12:00
 5     / 1:  25.78  25.90  26.04  26.22  26.42
 15    / 2:  25.67  25.80  25.96  26.14  26.36
 25    / 3:  25.51  25.68  25.90  26.12  26.35
 35    / 4:  25.35  25.58  25.86  26.11  26.35
 45    / 5:  25.16  25.41  25.77  26.10  26.35
 ---- L:2 T:   23-AUG-1982 14:00
 5     / 1:  25.98  26.10  26.26  26.44  26.65
 15    / 2:  25.87  26.01  26.18  26.38  26.59
 25    / 3:  25.70  25.91  26.14  26.36  26.59
 35    / 4:  25.55  25.82  26.11  26.36  26.59
 45    / 5:  25.36  25.64  26.02  26.36  26.59
 ---- L:3 T:   29-AUG-1982 16:00
 5     / 1:  26.18  26.30  26.46  26.65  26.86
 15    / 2:  26.08  26.22  26.40  26.60  26.82
 25    / 3:  25.93  26.15  26.38  26.59  26.81
 35    / 4:  25.79  26.08  26.37  26.59  26.81
 45    / 5:  25.60  25.90  26.29  26.59  26.81
 ---- L:4 T:   04-SEP-1982 18:00
 5     / 1:  26.39  26.51  26.67  26.85  27.05
 15    / 2:  26.31  26.44  26.61  26.81  27.00
 25    / 3:  26.16  26.38  26.60  26.80  26.99
 35    / 4:  26.04  26.33  26.59  26.80  26.99
 45    / 5:  25.83  26.14  26.52  26.80  26.99
 ---- L:5 T:   10-SEP-1982 20:00
 5     / 1:  26.62  26.72  26.87  27.03  27.17
 15    / 2:  26.53  26.65  26.81  26.97  27.11
 25    / 3:  26.36  26.59  26.78  26.95  27.09
 35    / 4:  26.25  26.53  26.78  26.95  27.09
 45    / 5:  26.04  26.32  26.68  26.95  27.09
 -DELETE TEMP     M: 26 dset:   1 I:     46     50  J:    1    5  K:    1    5  L:    101    101
 
! 4D region
LOAD
 eval    EX#1     C:  4 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
 found   TEMP     M: 28 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
SET MODE/LAST DIAGNOSTIC
 
! ******** disk-resident file variable ************
USE gt4d011
CANCEL MEMORY/ALL
SET MODE DIAGNOSTIC
DEFINE REGION/I=101 IPT
DEFINE REGION/J=46 JPT
DEFINE REGION/K=1 KPT
DEFINE REGION/L=1 LPT
DEFINE REGION/I=101:105/J=46:50/K=1:5/L=1:5 R4D
SET REG R4D
SET EXPRESSION temp
GO bn_geometry.sub
! BN200_GEOMETRY.SUB
! list the variable vtest on variuos geometries
 
! this routine assumes that a 4-D region and an expression are already set
 
! lines of data
LIST/@JPT/@KPT/@LPT/ORDER=X
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DT2          PSXT      PSYT      PSZT      TIME1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    105  J:   46   46  K:    1    1  L:      1      1
 reading TEMP     M: 28 dset:   1 I:    101    105  J:   46   46  K:    1    1  L:      1      1
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 points (LONGITUDE)
             LATITUDE : 0.167N
             DEPTH (m): 5
             TIME     : 17-AUG-1982 12:00
          129.5W 128.5W 127.5W 126.5W 125.5W 
          101    102    103    104    105
          25.78  25.80  25.82  25.80  25.74
LIST/@IPT/@KPT/@LPT/ORDER=Y
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    101  J:   46   50  K:    1    1  L:      1      1
 reading TEMP     M: 26 dset:   1 I:    101    101  J:   46   50  K:    1    1  L:      1      1
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 points (LATITUDE)
             LONGITUDE: 129.5W
             DEPTH (m): 5
             TIME     : 17-AUG-1982 12:00
           0.17N  0.5N   0.83N  1.17N  1.5N  
           46     47     48     49     50
          25.78  25.90  26.04  26.22  26.42
LIST/@IPT/@JPT/@LPT/ORDER=Z
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    101  J:   46   46  K:    1    5  L:      1      1
 reading TEMP     M: 24 dset:   1 I:    101    101  J:   46   46  K:    1    5  L:      1      1
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 points (DEPTH (m))
             LONGITUDE: 129.5W
             LATITUDE : 0.167N
             TIME     : 17-AUG-1982 12:00
           5      15     25     35     45    
            1      2      3      4      5
          25.78  25.67  25.51  25.35  25.16
LIST/@IPT/@JPT/@KPT/ORDER=T
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    101  J:   46   46  K:    1    1  L:      1      5
 reading TEMP     M: 22 dset:   1 I:    101    101  J:   46   46  K:    1    1  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 points (TIME)
             LONGITUDE: 129.5W
             LATITUDE : 0.167N
             DEPTH (m): 5
           1982   1982   1982   1982   1982  
            1      2      3      4      5
          25.78  25.98  26.18  26.39  26.62
 
! planes of data
LIST/@KPT/@LPT	!XY
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    105  J:   46   50  K:    1    1  L:      1      1
 reading TEMP     M: 20 dset:   1 I:    101    105  J:   46   50  K:    1    1  L:      1      1
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 17-AUG-1982 12:00
              129.5W 128.5W 127.5W 126.5W 125.5W 
              101    102    103    104    105
 1.5N  / 50:  26.42  26.46  26.50  26.51  26.48
 1.17N / 49:  26.22  26.27  26.30  26.30  26.26
 0.83N / 48:  26.04  26.10  26.13  26.11  26.06
 0.5N  / 47:  25.90  25.94  25.96  25.94  25.89
 0.17N / 46:  25.78  25.80  25.82  25.80  25.74
LIST/@JPT/@LPT	!XZ
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    105  J:   46   46  K:    1    5  L:      1      1
 reading TEMP     M: 17 dset:   1 I:    101    105  J:   46   46  K:    1    5  L:      1      1
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-DEPTH (m))
             LATITUDE : 0.167N
             TIME     : 17-AUG-1982 12:00
             129.5W 128.5W 127.5W 126.5W 125.5W 
             101    102    103    104    105
 5     / 1:  25.78  25.80  25.82  25.80  25.74
 15    / 2:  25.67  25.69  25.70  25.68  25.63
 25    / 3:  25.51  25.53  25.54  25.53  25.48
 35    / 4:  25.35  25.36  25.36  25.34  25.29
 45    / 5:  25.16  25.15  25.12  25.07  25.02
LIST/@JPT/@KPT	!XT
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    105  J:   46   46  K:    1    1  L:      1      5
 reading TEMP     M: 16 dset:   1 I:    101    105  J:   46   46  K:    1    1  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-TIME)
             LATITUDE : 0.167N
             DEPTH (m): 5
                      129.5W 128.5W 127.5W 126.5W 125.5W 
                      101    102    103    104    105
 17-AUG-1982 12 / 1:  25.78  25.80  25.82  25.80  25.74
 23-AUG-1982 14 / 2:  25.98  25.97  25.94  25.89  25.83
 29-AUG-1982 16 / 3:  26.18  26.13  26.07  26.01  25.97
 04-SEP-1982 18 / 4:  26.39  26.31  26.24  26.18  26.15
 10-SEP-1982 20 / 5:  26.62  26.55  26.47  26.40  26.36
LIST/@IPT/@LPT	!YZ
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    101  J:   46   50  K:    1    5  L:      1      1
 reading TEMP     M: 14 dset:   1 I:    101    101  J:   46   50  K:    1    5  L:      1      1
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 points (LATITUDE-DEPTH (m))
             LONGITUDE: 129.5W
             TIME     : 17-AUG-1982 12:00
              0.17N  0.5N   0.83N  1.17N  1.5N  
              46     47     48     49     50
 5     / 1:  25.78  25.90  26.04  26.22  26.42
 15    / 2:  25.67  25.80  25.96  26.14  26.36
 25    / 3:  25.51  25.68  25.90  26.12  26.35
 35    / 4:  25.35  25.58  25.86  26.11  26.35
 45    / 5:  25.16  25.41  25.77  26.10  26.35
LIST/@IPT/@KPT	!YT
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    101  J:   46   50  K:    1    1  L:      1      5
 reading TEMP     M: 12 dset:   1 I:    101    101  J:   46   50  K:    1    1  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 points (LATITUDE-TIME)
             LONGITUDE: 129.5W
             DEPTH (m): 5
                       0.17N  0.5N   0.83N  1.17N  1.5N  
                       46     47     48     49     50
 17-AUG-1982 12 / 1:  25.78  25.90  26.04  26.22  26.42
 23-AUG-1982 14 / 2:  25.98  26.10  26.26  26.44  26.65
 29-AUG-1982 16 / 3:  26.18  26.30  26.46  26.65  26.86
 04-SEP-1982 18 / 4:  26.39  26.51  26.67  26.85  27.05
 10-SEP-1982 20 / 5:  26.62  26.72  26.87  27.03  27.17
LIST/@IPT/@JPT	!ZT
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    101  J:   46   46  K:    1    5  L:      1      5
 reading TEMP     M: 10 dset:   1 I:    101    101  J:   46   46  K:    1    5  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 points (DEPTH (m)-TIME)
             LONGITUDE: 129.5W
             LATITUDE : 0.167N
                       5      15     25     35     45    
                        1      2      3      4      5
 17-AUG-1982 12 / 1:  25.78  25.67  25.51  25.35  25.16
 23-AUG-1982 14 / 2:  25.98  25.87  25.70  25.55  25.36
 29-AUG-1982 16 / 3:  26.18  26.08  25.93  25.79  25.60
 04-SEP-1982 18 / 4:  26.39  26.31  26.16  26.04  25.83
 10-SEP-1982 20 / 5:  26.62  26.53  26.36  26.25  26.04
 
! cubes of data
LIST/@LPT
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      1
 reading TEMP     M:  8 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      1
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 by 5 points (LONGITUDE-LATITUDE-DEPTH (m))
             TIME     : 17-AUG-1982 12:00
              129.5W 128.5W 127.5W 126.5W 125.5W 
              101    102    103    104    105
 ---- K:1 Z:   5
 1.5N  / 50:  26.42  26.46  26.50  26.51  26.48
 1.17N / 49:  26.22  26.27  26.30  26.30  26.26
 0.83N / 48:  26.04  26.10  26.13  26.11  26.06
 0.5N  / 47:  25.90  25.94  25.96  25.94  25.89
 0.17N / 46:  25.78  25.80  25.82  25.80  25.74
 ---- K:2 Z:   15
 1.5N  / 50:  26.36  26.39  26.43  26.45  26.42
 1.17N / 49:  26.14  26.19  26.23  26.23  26.19
 0.83N / 48:  25.96  26.01  26.04  26.03  25.98
 0.5N  / 47:  25.80  25.84  25.87  25.85  25.79
 0.17N / 46:  25.67  25.69  25.70  25.68  25.63
 ---- K:3 Z:   25
 1.5N  / 50:  26.35  26.38  26.42  26.44  26.41
 1.17N / 49:  26.12  26.17  26.21  26.22  26.18
 0.83N / 48:  25.90  25.95  25.99  25.99  25.94
 0.5N  / 47:  25.68  25.73  25.76  25.75  25.70
 0.17N / 46:  25.51  25.53  25.54  25.53  25.48
 ---- K:4 Z:   35
 1.5N  / 50:  26.35  26.38  26.42  26.44  26.42
 1.17N / 49:  26.11  26.16  26.21  26.22  26.18
 0.83N / 48:  25.86  25.91  25.95  25.95  25.90
 0.5N  / 47:  25.58  25.62  25.64  25.63  25.58
 0.17N / 46:  25.35  25.36  25.36  25.34  25.29
 ---- K:5 Z:   45
 1.5N  / 50:  26.35  26.38  26.42  26.44  26.42
 1.17N / 49:  26.10  26.15  26.19  26.20  26.16
 0.83N / 48:  25.77  25.81  25.82  25.81  25.76
 0.5N  / 47:  25.41  25.43  25.41  25.38  25.32
 0.17N / 46:  25.16  25.15  25.12  25.07  25.02
LIST/@KPT
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    105  J:   46   50  K:    1    1  L:      1      5
 reading TEMP     M:  6 dset:   1 I:    101    105  J:   46   50  K:    1    1  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 by 5 points (LONGITUDE-LATITUDE-TIME)
             DEPTH (m): 5
              129.5W 128.5W 127.5W 126.5W 125.5W 
              101    102    103    104    105
 ---- L:1 T:   17-AUG-1982 12:00
 1.5N  / 50:  26.42  26.46  26.50  26.51  26.48
 1.17N / 49:  26.22  26.27  26.30  26.30  26.26
 0.83N / 48:  26.04  26.10  26.13  26.11  26.06
 0.5N  / 47:  25.90  25.94  25.96  25.94  25.89
 0.17N / 46:  25.78  25.80  25.82  25.80  25.74
 ---- L:2 T:   23-AUG-1982 14:00
 1.5N  / 50:  26.65  26.63  26.60  26.57  26.52
 1.17N / 49:  26.44  26.42  26.40  26.35  26.29
 0.83N / 48:  26.26  26.25  26.22  26.16  26.10
 0.5N  / 47:  26.10  26.10  26.07  26.01  25.95
 0.17N / 46:  25.98  25.97  25.94  25.89  25.83
 ---- L:3 T:   29-AUG-1982 16:00
 1.5N  / 50:  26.86  26.78  26.70  26.64  26.60
 1.17N / 49:  26.65  26.57  26.49  26.42  26.38
 0.83N / 48:  26.46  26.38  26.31  26.24  26.20
 0.5N  / 47:  26.30  26.24  26.17  26.11  26.07
 0.17N / 46:  26.18  26.13  26.07  26.01  25.97
 ---- L:4 T:   04-SEP-1982 18:00
 1.5N  / 50:  27.05  26.94  26.80  26.72  26.70
 1.17N / 49:  26.85  26.72  26.59  26.52  26.51
 0.83N / 48:  26.67  26.54  26.43  26.37  26.35
 0.5N  / 47:  26.51  26.41  26.32  26.26  26.23
 0.17N / 46:  26.39  26.31  26.24  26.18  26.15
 ---- L:5 T:   10-SEP-1982 20:00
 1.5N  / 50:  27.17  27.13  26.95  26.84  26.83
 1.17N / 49:  27.03  26.93  26.76  26.66  26.65
 0.83N / 48:  26.87  26.75  26.62  26.54  26.52
 0.5N  / 47:  26.72  26.63  26.52  26.45  26.43
 0.17N / 46:  26.62  26.55  26.47  26.40  26.36
LIST/@JPT
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    105  J:   46   46  K:    1    5  L:      1      5
 reading TEMP     M:  4 dset:   1 I:    101    105  J:   46   46  K:    1    5  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 by 5 points (LONGITUDE-DEPTH (m)-TIME)
             LATITUDE : 0.167N
             129.5W 128.5W 127.5W 126.5W 125.5W 
             101    102    103    104    105
 ---- L:1 T:   17-AUG-1982 12:00
 5     / 1:  25.78  25.80  25.82  25.80  25.74
 15    / 2:  25.67  25.69  25.70  25.68  25.63
 25    / 3:  25.51  25.53  25.54  25.53  25.48
 35    / 4:  25.35  25.36  25.36  25.34  25.29
 45    / 5:  25.16  25.15  25.12  25.07  25.02
 ---- L:2 T:   23-AUG-1982 14:00
 5     / 1:  25.98  25.97  25.94  25.89  25.83
 15    / 2:  25.87  25.86  25.83  25.78  25.72
 25    / 3:  25.70  25.71  25.68  25.63  25.57
 35    / 4:  25.55  25.55  25.52  25.46  25.40
 45    / 5:  25.36  25.34  25.29  25.22  25.16
 ---- L:3 T:   29-AUG-1982 16:00
 5     / 1:  26.18  26.13  26.07  26.01  25.97
 15    / 2:  26.08  26.03  25.97  25.91  25.87
 25    / 3:  25.93  25.89  25.82  25.75  25.69
 35    / 4:  25.79  25.76  25.68  25.60  25.54
 45    / 5:  25.60  25.56  25.49  25.41  25.35
 ---- L:4 T:   04-SEP-1982 18:00
 5     / 1:  26.39  26.31  26.24  26.18  26.15
 15    / 2:  26.31  26.22  26.14  26.09  26.05
 25    / 3:  26.16  26.09  25.98  25.90  25.85
 35    / 4:  26.04  25.98  25.87  25.78  25.72
 45    / 5:  25.83  25.79  25.70  25.62  25.55
 ---- L:5 T:   10-SEP-1982 20:00
 5     / 1:  26.62  26.55  26.47  26.40  26.36
 15    / 2:  26.53  26.46  26.38  26.31  26.27
 25    / 3:  26.36  26.31  26.19  26.08  26.03
 35    / 4:  26.25  26.21  26.09  25.98  25.92
 45    / 5:  26.04  26.01  25.93  25.84  25.77
LIST/@IPT
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:    101    101  J:   46   50  K:    1    5  L:      1      5
 reading TEMP     M:  3 dset:   1 I:    101    101  J:   46   50  K:    1    5  L:      1      5
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 5 by 5 by 5 points (LATITUDE-DEPTH (m)-TIME)
             LONGITUDE: 129.5W
              0.17N  0.5N   0.83N  1.17N  1.5N  
              46     47     48     49     50
 ---- L:1 T:   17-AUG-1982 12:00
 5     / 1:  25.78  25.90  26.04  26.22  26.42
 15    / 2:  25.67  25.80  25.96  26.14  26.36
 25    / 3:  25.51  25.68  25.90  26.12  26.35
 35    / 4:  25.35  25.58  25.86  26.11  26.35
 45    / 5:  25.16  25.41  25.77  26.10  26.35
 ---- L:2 T:   23-AUG-1982 14:00
 5     / 1:  25.98  26.10  26.26  26.44  26.65
 15    / 2:  25.87  26.01  26.18  26.38  26.59
 25    / 3:  25.70  25.91  26.14  26.36  26.59
 35    / 4:  25.55  25.82  26.11  26.36  26.59
 45    / 5:  25.36  25.64  26.02  26.36  26.59
 ---- L:3 T:   29-AUG-1982 16:00
 5     / 1:  26.18  26.30  26.46  26.65  26.86
 15    / 2:  26.08  26.22  26.40  26.60  26.82
 25    / 3:  25.93  26.15  26.38  26.59  26.81
 35    / 4:  25.79  26.08  26.37  26.59  26.81
 45    / 5:  25.60  25.90  26.29  26.59  26.81
 ---- L:4 T:   04-SEP-1982 18:00
 5     / 1:  26.39  26.51  26.67  26.85  27.05
 15    / 2:  26.31  26.44  26.61  26.81  27.00
 25    / 3:  26.16  26.38  26.60  26.80  26.99
 35    / 4:  26.04  26.33  26.59  26.80  26.99
 45    / 5:  25.83  26.14  26.52  26.80  26.99
 ---- L:5 T:   10-SEP-1982 20:00
 5     / 1:  26.62  26.72  26.87  27.03  27.17
 15    / 2:  26.53  26.65  26.81  26.97  27.11
 25    / 3:  26.36  26.59  26.78  26.95  27.09
 35    / 4:  26.25  26.53  26.78  26.95  27.09
 45    / 5:  26.04  26.32  26.68  26.95  27.09
 
! 4D region
LOAD
 eval    EX#1     C:  4 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
 reading TEMP     M:  1 dset:   1 I:    101    105  J:   46   50  K:    1    5  L:      1      5
SET MODE/LAST DIAGNOSTIC
 
! ******** diagnostic variable ************
! *3/99* *kob* comment out look at qady variable - no longer important
!USE gt160w011
!DEFINE REGION/I=70 IPT
!DEFINE REGION/J=50 JPT
!DEFINE REGION/K=1 KPT
!DEFINE REGION/L=1 LPT
!DEFINE REGION/I=70:72/J=46:50/K=1:5/L=1:3 R4D
!SET REG R4D
!SET EXPRESSION qady
!GO bn_geometry.sub
 
! generate error through non-comformable limits
SET MODE IGNORE_ERRORS
LIST X[I=1:5] - X[I=6:9]
SET MODE/LAST IGNORE_ERRORS
 
 
*** Running ferret script: bn_output.jnl
! bn200_output.JNL
! - test various output methods in FERRET
! rev 0.0  4/27/90 *sh*
! 4/17 *acm* LIST/CLOBBER files (these are removed by run_all too)
 
LET v = 1000*i + 100*j + 10*k + l
SET REGION/I=1:2/J=3:4/K=5:6/L=7:8
SET EXPRESSION v
LOAD
 
! ------------------------------------------
! single variable list
GO bn_output.sub
! BN200_OUTPUT.SUB
! - test various output order permutations FERRET
! rev 0.0  9/18/90 *sh*
 
! test permutations on output
! ------ 4D region
SET REGION/I=1:2/J=3:4/K=5:6/L=7:8
LIST/ORDER=XYZT
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:7 T:   7
 ---- K:5 Z:   5
 3   / 3:  1357.  2357.
 4   / 4:  1457.  2457.
 ---- K:6 Z:   6
 3   / 3:  1367.  2367.
 4   / 4:  1467.  2467.
 ---- L:8 T:   8
 ---- K:5 Z:   5
 3   / 3:  1358.  2358.
 4   / 4:  1458.  2458.
 ---- K:6 Z:   6
 3   / 3:  1368.  2368.
 4   / 4:  1468.  2468.
LIST/ORDER=XYTZ
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (X-Y-T-Z)
             1      2    
             1      2
 ---- K:5 Z:   5
 ---- L:7 T:   7
 3   / 3:  1357.  2357.
 4   / 4:  1457.  2457.
 ---- L:8 T:   8
 3   / 3:  1358.  2358.
 4   / 4:  1458.  2458.
 ---- K:6 Z:   6
 ---- L:7 T:   7
 3   / 3:  1367.  2367.
 4   / 4:  1467.  2467.
 ---- L:8 T:   8
 3   / 3:  1368.  2368.
 4   / 4:  1468.  2468.
LIST/ORDER=XZYT
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (X-Z-Y-T)
             1      2    
             1      2
 ---- L:7 T:   7
 ---- J:3 Y:   3
 5   / 5:  1357.  2357.
 6   / 6:  1367.  2367.
 ---- J:4 Y:   4
 5   / 5:  1457.  2457.
 6   / 6:  1467.  2467.
 ---- L:8 T:   8
 ---- J:3 Y:   3
 5   / 5:  1358.  2358.
 6   / 6:  1368.  2368.
 ---- J:4 Y:   4
 5   / 5:  1458.  2458.
 6   / 6:  1468.  2468.
LIST/ORDER=XZTY
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (X-Z-T-Y)
             1      2    
             1      2
 ---- J:3 Y:   3
 ---- L:7 T:   7
 5   / 5:  1357.  2357.
 6   / 6:  1367.  2367.
 ---- L:8 T:   8
 5   / 5:  1358.  2358.
 6   / 6:  1368.  2368.
 ---- J:4 Y:   4
 ---- L:7 T:   7
 5   / 5:  1457.  2457.
 6   / 6:  1467.  2467.
 ---- L:8 T:   8
 5   / 5:  1458.  2458.
 6   / 6:  1468.  2468.
LIST/ORDER=XTYZ
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (X-T-Y-Z)
             1      2    
             1      2
 ---- K:5 Z:   5
 ---- J:3 Y:   3
 7   / 7:  1357.  2357.
 8   / 8:  1358.  2358.
 ---- J:4 Y:   4
 7   / 7:  1457.  2457.
 8   / 8:  1458.  2458.
 ---- K:6 Z:   6
 ---- J:3 Y:   3
 7   / 7:  1367.  2367.
 8   / 8:  1368.  2368.
 ---- J:4 Y:   4
 7   / 7:  1467.  2467.
 8   / 8:  1468.  2468.
LIST/ORDER=XTZY
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (X-T-Z-Y)
             1      2    
             1      2
 ---- J:3 Y:   3
 ---- K:5 Z:   5
 7   / 7:  1357.  2357.
 8   / 8:  1358.  2358.
 ---- K:6 Z:   6
 7   / 7:  1367.  2367.
 8   / 8:  1368.  2368.
 ---- J:4 Y:   4
 ---- K:5 Z:   5
 7   / 7:  1457.  2457.
 8   / 8:  1458.  2458.
 ---- K:6 Z:   6
 7   / 7:  1467.  2467.
 8   / 8:  1468.  2468.
LIST/ORDER=YXZT
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (Y-X-Z-T)
             3      4    
             3      4
 ---- L:7 T:   7
 ---- K:5 Z:   5
 1   / 1:  1357.  1457.
 2   / 2:  2357.  2457.
 ---- K:6 Z:   6
 1   / 1:  1367.  1467.
 2   / 2:  2367.  2467.
 ---- L:8 T:   8
 ---- K:5 Z:   5
 1   / 1:  1358.  1458.
 2   / 2:  2358.  2458.
 ---- K:6 Z:   6
 1   / 1:  1368.  1468.
 2   / 2:  2368.  2468.
LIST/ORDER=YXTZ
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (Y-X-T-Z)
             3      4    
             3      4
 ---- K:5 Z:   5
 ---- L:7 T:   7
 1   / 1:  1357.  1457.
 2   / 2:  2357.  2457.
 ---- L:8 T:   8
 1   / 1:  1358.  1458.
 2   / 2:  2358.  2458.
 ---- K:6 Z:   6
 ---- L:7 T:   7
 1   / 1:  1367.  1467.
 2   / 2:  2367.  2467.
 ---- L:8 T:   8
 1   / 1:  1368.  1468.
 2   / 2:  2368.  2468.
LIST/ORDER=YZXT
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (Y-Z-X-T)
             3      4    
             3      4
 ---- L:7 T:   7
 ---- I:1 X:   1
 5   / 5:  1357.  1457.
 6   / 6:  1367.  1467.
 ---- I:2 X:   2
 5   / 5:  2357.  2457.
 6   / 6:  2367.  2467.
 ---- L:8 T:   8
 ---- I:1 X:   1
 5   / 5:  1358.  1458.
 6   / 6:  1368.  1468.
 ---- I:2 X:   2
 5   / 5:  2358.  2458.
 6   / 6:  2368.  2468.
LIST/ORDER=YZTX
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (Y-Z-T-X)
             3      4    
             3      4
 ---- I:1 X:   1
 ---- L:7 T:   7
 5   / 5:  1357.  1457.
 6   / 6:  1367.  1467.
 ---- L:8 T:   8
 5   / 5:  1358.  1458.
 6   / 6:  1368.  1468.
 ---- I:2 X:   2
 ---- L:7 T:   7
 5   / 5:  2357.  2457.
 6   / 6:  2367.  2467.
 ---- L:8 T:   8
 5   / 5:  2358.  2458.
 6   / 6:  2368.  2468.
LIST/ORDER=YTXZ
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (Y-T-X-Z)
             3      4    
             3      4
 ---- K:5 Z:   5
 ---- I:1 X:   1
 7   / 7:  1357.  1457.
 8   / 8:  1358.  1458.
 ---- I:2 X:   2
 7   / 7:  2357.  2457.
 8   / 8:  2358.  2458.
 ---- K:6 Z:   6
 ---- I:1 X:   1
 7   / 7:  1367.  1467.
 8   / 8:  1368.  1468.
 ---- I:2 X:   2
 7   / 7:  2367.  2467.
 8   / 8:  2368.  2468.
LIST/ORDER=YTZX
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (Y-T-Z-X)
             3      4    
             3      4
 ---- I:1 X:   1
 ---- K:5 Z:   5
 7   / 7:  1357.  1457.
 8   / 8:  1358.  1458.
 ---- K:6 Z:   6
 7   / 7:  1367.  1467.
 8   / 8:  1368.  1468.
 ---- I:2 X:   2
 ---- K:5 Z:   5
 7   / 7:  2357.  2457.
 8   / 8:  2358.  2458.
 ---- K:6 Z:   6
 7   / 7:  2367.  2467.
 8   / 8:  2368.  2468.
LIST/ORDER=ZXYT
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (Z-X-Y-T)
             5      6    
             5      6
 ---- L:7 T:   7
 ---- J:3 Y:   3
 1   / 1:  1357.  1367.
 2   / 2:  2357.  2367.
 ---- J:4 Y:   4
 1   / 1:  1457.  1467.
 2   / 2:  2457.  2467.
 ---- L:8 T:   8
 ---- J:3 Y:   3
 1   / 1:  1358.  1368.
 2   / 2:  2358.  2368.
 ---- J:4 Y:   4
 1   / 1:  1458.  1468.
 2   / 2:  2458.  2468.
LIST/ORDER=ZXTY
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (Z-X-T-Y)
             5      6    
             5      6
 ---- J:3 Y:   3
 ---- L:7 T:   7
 1   / 1:  1357.  1367.
 2   / 2:  2357.  2367.
 ---- L:8 T:   8
 1   / 1:  1358.  1368.
 2   / 2:  2358.  2368.
 ---- J:4 Y:   4
 ---- L:7 T:   7
 1   / 1:  1457.  1467.
 2   / 2:  2457.  2467.
 ---- L:8 T:   8
 1   / 1:  1458.  1468.
 2   / 2:  2458.  2468.
LIST/ORDER=ZYXT
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (Z-Y-X-T)
             5      6    
             5      6
 ---- L:7 T:   7
 ---- I:1 X:   1
 3   / 3:  1357.  1367.
 4   / 4:  1457.  1467.
 ---- I:2 X:   2
 3   / 3:  2357.  2367.
 4   / 4:  2457.  2467.
 ---- L:8 T:   8
 ---- I:1 X:   1
 3   / 3:  1358.  1368.
 4   / 4:  1458.  1468.
 ---- I:2 X:   2
 3   / 3:  2358.  2368.
 4   / 4:  2458.  2468.
LIST/ORDER=ZYTX
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (Z-Y-T-X)
             5      6    
             5      6
 ---- I:1 X:   1
 ---- L:7 T:   7
 3   / 3:  1357.  1367.
 4   / 4:  1457.  1467.
 ---- L:8 T:   8
 3   / 3:  1358.  1368.
 4   / 4:  1458.  1468.
 ---- I:2 X:   2
 ---- L:7 T:   7
 3   / 3:  2357.  2367.
 4   / 4:  2457.  2467.
 ---- L:8 T:   8
 3   / 3:  2358.  2368.
 4   / 4:  2458.  2468.
LIST/ORDER=ZTXY
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (Z-T-X-Y)
             5      6    
             5      6
 ---- J:3 Y:   3
 ---- I:1 X:   1
 7   / 7:  1357.  1367.
 8   / 8:  1358.  1368.
 ---- I:2 X:   2
 7   / 7:  2357.  2367.
 8   / 8:  2358.  2368.
 ---- J:4 Y:   4
 ---- I:1 X:   1
 7   / 7:  1457.  1467.
 8   / 8:  1458.  1468.
 ---- I:2 X:   2
 7   / 7:  2457.  2467.
 8   / 8:  2458.  2468.
LIST/ORDER=ZTYX
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (Z-T-Y-X)
             5      6    
             5      6
 ---- I:1 X:   1
 ---- J:3 Y:   3
 7   / 7:  1357.  1367.
 8   / 8:  1358.  1368.
 ---- J:4 Y:   4
 7   / 7:  1457.  1467.
 8   / 8:  1458.  1468.
 ---- I:2 X:   2
 ---- J:3 Y:   3
 7   / 7:  2357.  2367.
 8   / 8:  2358.  2368.
 ---- J:4 Y:   4
 7   / 7:  2457.  2467.
 8   / 8:  2458.  2468.
LIST/ORDER=TXYZ
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (T-X-Y-Z)
             7      8    
             7      8
 ---- K:5 Z:   5
 ---- J:3 Y:   3
 1   / 1:  1357.  1358.
 2   / 2:  2357.  2358.
 ---- J:4 Y:   4
 1   / 1:  1457.  1458.
 2   / 2:  2457.  2458.
 ---- K:6 Z:   6
 ---- J:3 Y:   3
 1   / 1:  1367.  1368.
 2   / 2:  2367.  2368.
 ---- J:4 Y:   4
 1   / 1:  1467.  1468.
 2   / 2:  2467.  2468.
LIST/ORDER=TXZY
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (T-X-Z-Y)
             7      8    
             7      8
 ---- J:3 Y:   3
 ---- K:5 Z:   5
 1   / 1:  1357.  1358.
 2   / 2:  2357.  2358.
 ---- K:6 Z:   6
 1   / 1:  1367.  1368.
 2   / 2:  2367.  2368.
 ---- J:4 Y:   4
 ---- K:5 Z:   5
 1   / 1:  1457.  1458.
 2   / 2:  2457.  2458.
 ---- K:6 Z:   6
 1   / 1:  1467.  1468.
 2   / 2:  2467.  2468.
LIST/ORDER=TYXZ
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (T-Y-X-Z)
             7      8    
             7      8
 ---- K:5 Z:   5
 ---- I:1 X:   1
 3   / 3:  1357.  1358.
 4   / 4:  1457.  1458.
 ---- I:2 X:   2
 3   / 3:  2357.  2358.
 4   / 4:  2457.  2458.
 ---- K:6 Z:   6
 ---- I:1 X:   1
 3   / 3:  1367.  1368.
 4   / 4:  1467.  1468.
 ---- I:2 X:   2
 3   / 3:  2367.  2368.
 4   / 4:  2467.  2468.
LIST/ORDER=TYZX
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (T-Y-Z-X)
             7      8    
             7      8
 ---- I:1 X:   1
 ---- K:5 Z:   5
 3   / 3:  1357.  1358.
 4   / 4:  1457.  1458.
 ---- K:6 Z:   6
 3   / 3:  1367.  1368.
 4   / 4:  1467.  1468.
 ---- I:2 X:   2
 ---- K:5 Z:   5
 3   / 3:  2357.  2358.
 4   / 4:  2457.  2458.
 ---- K:6 Z:   6
 3   / 3:  2367.  2368.
 4   / 4:  2467.  2468.
LIST/ORDER=TZXY
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (T-Z-X-Y)
             7      8    
             7      8
 ---- J:3 Y:   3
 ---- I:1 X:   1
 5   / 5:  1357.  1358.
 6   / 6:  1367.  1368.
 ---- I:2 X:   2
 5   / 5:  2357.  2358.
 6   / 6:  2367.  2368.
 ---- J:4 Y:   4
 ---- I:1 X:   1
 5   / 5:  1457.  1458.
 6   / 6:  1467.  1468.
 ---- I:2 X:   2
 5   / 5:  2457.  2458.
 6   / 6:  2467.  2468.
LIST/ORDER=TZYX
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 by 2 points (T-Z-Y-X)
             7      8    
             7      8
 ---- I:1 X:   1
 ---- J:3 Y:   3
 5   / 5:  1357.  1358.
 6   / 6:  1367.  1368.
 ---- J:4 Y:   4
 5   / 5:  1457.  1458.
 6   / 6:  1467.  1468.
 ---- I:2 X:   2
 ---- J:3 Y:   3
 5   / 5:  2357.  2358.
 6   / 6:  2367.  2368.
 ---- J:4 Y:   4
 5   / 5:  2457.  2458.
 6   / 6:  2467.  2468.
 
! ------ 3D regions
SET REGION/I=1/J=3:4/K=5:6/L=7:8
LIST/ORDER=YZT
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (Y-Z-T)
             X        : 1
             3      4    
             3      4
 ---- L:7 T:   7
 5   / 5:  1357.  1457.
 6   / 6:  1367.  1467.
 ---- L:8 T:   8
 5   / 5:  1358.  1458.
 6   / 6:  1368.  1468.
LIST/ORDER=YTZ
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (Y-T-Z)
             X        : 1
             3      4    
             3      4
 ---- K:5 Z:   5
 7   / 7:  1357.  1457.
 8   / 8:  1358.  1458.
 ---- K:6 Z:   6
 7   / 7:  1367.  1467.
 8   / 8:  1368.  1468.
LIST/ORDER=ZYT
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (Z-Y-T)
             X        : 1
             5      6    
             5      6
 ---- L:7 T:   7
 3   / 3:  1357.  1367.
 4   / 4:  1457.  1467.
 ---- L:8 T:   8
 3   / 3:  1358.  1368.
 4   / 4:  1458.  1468.
LIST/ORDER=ZTY
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (Z-T-Y)
             X        : 1
             5      6    
             5      6
 ---- J:3 Y:   3
 7   / 7:  1357.  1367.
 8   / 8:  1358.  1368.
 ---- J:4 Y:   4
 7   / 7:  1457.  1467.
 8   / 8:  1458.  1468.
LIST/ORDER=TYZ
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (T-Y-Z)
             X        : 1
             7      8    
             7      8
 ---- K:5 Z:   5
 3   / 3:  1357.  1358.
 4   / 4:  1457.  1458.
 ---- K:6 Z:   6
 3   / 3:  1367.  1368.
 4   / 4:  1467.  1468.
LIST/ORDER=TZY
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (T-Z-Y)
             X        : 1
             7      8    
             7      8
 ---- J:3 Y:   3
 5   / 5:  1357.  1358.
 6   / 6:  1367.  1368.
 ---- J:4 Y:   4
 5   / 5:  1457.  1458.
 6   / 6:  1467.  1468.
 
SET REGION/I=1:2/J=3/K=5:6/L=7:8
LIST/ORDER=XZT
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (X-Z-T)
             Y        : 3
             1      2    
             1      2
 ---- L:7 T:   7
 5   / 5:  1357.  2357.
 6   / 6:  1367.  2367.
 ---- L:8 T:   8
 5   / 5:  1358.  2358.
 6   / 6:  1368.  2368.
LIST/ORDER=XTZ
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (X-T-Z)
             Y        : 3
             1      2    
             1      2
 ---- K:5 Z:   5
 7   / 7:  1357.  2357.
 8   / 8:  1358.  2358.
 ---- K:6 Z:   6
 7   / 7:  1367.  2367.
 8   / 8:  1368.  2368.
LIST/ORDER=ZXT
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (Z-X-T)
             Y        : 3
             5      6    
             5      6
 ---- L:7 T:   7
 1   / 1:  1357.  1367.
 2   / 2:  2357.  2367.
 ---- L:8 T:   8
 1   / 1:  1358.  1368.
 2   / 2:  2358.  2368.
LIST/ORDER=ZTX
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (Z-T-X)
             Y        : 3
             5      6    
             5      6
 ---- I:1 X:   1
 7   / 7:  1357.  1367.
 8   / 8:  1358.  1368.
 ---- I:2 X:   2
 7   / 7:  2357.  2367.
 8   / 8:  2358.  2368.
LIST/ORDER=TXZ
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (T-X-Z)
             Y        : 3
             7      8    
             7      8
 ---- K:5 Z:   5
 1   / 1:  1357.  1358.
 2   / 2:  2357.  2358.
 ---- K:6 Z:   6
 1   / 1:  1367.  1368.
 2   / 2:  2367.  2368.
LIST/ORDER=TZX
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (T-Z-X)
             Y        : 3
             7      8    
             7      8
 ---- I:1 X:   1
 5   / 5:  1357.  1358.
 6   / 6:  1367.  1368.
 ---- I:2 X:   2
 5   / 5:  2357.  2358.
 6   / 6:  2367.  2368.
 
SET REGION/I=1:2/J=3:4/K=5/L=7:8
LIST/ORDER=XYT
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (X-Y-T)
             Z        : 5
             1      2    
             1      2
 ---- L:7 T:   7
 3   / 3:  1357.  2357.
 4   / 4:  1457.  2457.
 ---- L:8 T:   8
 3   / 3:  1358.  2358.
 4   / 4:  1458.  2458.
LIST/ORDER=XTY
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (X-T-Y)
             Z        : 5
             1      2    
             1      2
 ---- J:3 Y:   3
 7   / 7:  1357.  2357.
 8   / 8:  1358.  2358.
 ---- J:4 Y:   4
 7   / 7:  1457.  2457.
 8   / 8:  1458.  2458.
LIST/ORDER=YXT
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (Y-X-T)
             Z        : 5
             3      4    
             3      4
 ---- L:7 T:   7
 1   / 1:  1357.  1457.
 2   / 2:  2357.  2457.
 ---- L:8 T:   8
 1   / 1:  1358.  1458.
 2   / 2:  2358.  2458.
LIST/ORDER=YTX
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (Y-T-X)
             Z        : 5
             3      4    
             3      4
 ---- I:1 X:   1
 7   / 7:  1357.  1457.
 8   / 8:  1358.  1458.
 ---- I:2 X:   2
 7   / 7:  2357.  2457.
 8   / 8:  2358.  2458.
LIST/ORDER=TXY
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (T-X-Y)
             Z        : 5
             7      8    
             7      8
 ---- J:3 Y:   3
 1   / 1:  1357.  1358.
 2   / 2:  2357.  2358.
 ---- J:4 Y:   4
 1   / 1:  1457.  1458.
 2   / 2:  2457.  2458.
LIST/ORDER=TYX
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (T-Y-X)
             Z        : 5
             7      8    
             7      8
 ---- I:1 X:   1
 3   / 3:  1357.  1358.
 4   / 4:  1457.  1458.
 ---- I:2 X:   2
 3   / 3:  2357.  2358.
 4   / 4:  2457.  2458.
 
SET REGION/I=1:2/J=3:4/K=5:6/L=7
LIST/ORDER=XYZ
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 7
             1      2    
             1      2
 ---- K:5 Z:   5
 3   / 3:  1357.  2357.
 4   / 4:  1457.  2457.
 ---- K:6 Z:   6
 3   / 3:  1367.  2367.
 4   / 4:  1467.  2467.
LIST/ORDER=XZY
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (X-Z-Y)
             T        : 7
             1      2    
             1      2
 ---- J:3 Y:   3
 5   / 5:  1357.  2357.
 6   / 6:  1367.  2367.
 ---- J:4 Y:   4
 5   / 5:  1457.  2457.
 6   / 6:  1467.  2467.
LIST/ORDER=YXZ
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (Y-X-Z)
             T        : 7
             3      4    
             3      4
 ---- K:5 Z:   5
 1   / 1:  1357.  1457.
 2   / 2:  2357.  2457.
 ---- K:6 Z:   6
 1   / 1:  1367.  1467.
 2   / 2:  2367.  2467.
LIST/ORDER=YZX
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (Y-Z-X)
             T        : 7
             3      4    
             3      4
 ---- I:1 X:   1
 5   / 5:  1357.  1457.
 6   / 6:  1367.  1467.
 ---- I:2 X:   2
 5   / 5:  2357.  2457.
 6   / 6:  2367.  2467.
LIST/ORDER=ZXY
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (Z-X-Y)
             T        : 7
             5      6    
             5      6
 ---- J:3 Y:   3
 1   / 1:  1357.  1367.
 2   / 2:  2357.  2367.
 ---- J:4 Y:   4
 1   / 1:  1457.  1467.
 2   / 2:  2457.  2467.
LIST/ORDER=ZYX
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 by 2 points (Z-Y-X)
             T        : 7
             5      6    
             5      6
 ---- I:1 X:   1
 3   / 3:  1357.  1367.
 4   / 4:  1457.  1467.
 ---- I:2 X:   2
 3   / 3:  2357.  2367.
 4   / 4:  2457.  2467.
 
! ------ 2D regions
SET REGION/I=1/J=3/K=5:6/L=7:8
LIST/ORDER=ZT
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 points (Z-T)
             X        : 1
             Y        : 3
             5      6    
             5      6
 7   / 7:  1357.  1367.
 8   / 8:  1358.  1368.
LIST/ORDER=TZ
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 points (T-Z)
             X        : 1
             Y        : 3
             7      8    
             7      8
 5   / 5:  1357.  1358.
 6   / 6:  1367.  1368.
 
SET REGION/I=1/J=3:4/K=5/L=7:8
LIST/ORDER=YT
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 points (Y-T)
             X        : 1
             Z        : 5
             3      4    
             3      4
 7   / 7:  1357.  1457.
 8   / 8:  1358.  1458.
LIST/ORDER=TY
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 points (T-Y)
             X        : 1
             Z        : 5
             7      8    
             7      8
 3   / 3:  1357.  1358.
 4   / 4:  1457.  1458.
 
SET REGION/I=1/J=3:4/K=5:6/L=7
LIST/ORDER=YZ
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 points (Y-Z)
             X        : 1
             T        : 7
             3      4    
             3      4
 5   / 5:  1357.  1457.
 6   / 6:  1367.  1467.
LIST/ORDER=ZY
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 points (Z-Y)
             X        : 1
             T        : 7
             5      6    
             5      6
 3   / 3:  1357.  1367.
 4   / 4:  1457.  1467.
 
SET REGION/I=1:2/J=3/K=5/L=7:8
LIST/ORDER=XT
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 points (X-T)
             Y        : 3
             Z        : 5
             1      2    
             1      2
 7   / 7:  1357.  2357.
 8   / 8:  1358.  2358.
LIST/ORDER=TX
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 points (T-X)
             Y        : 3
             Z        : 5
             7      8    
             7      8
 1   / 1:  1357.  1358.
 2   / 2:  2357.  2358.
 
SET REGION/I=1:2/J=3/K=5:6/L=7
LIST/ORDER=XZ
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 points (X-Z)
             Y        : 3
             T        : 7
             1      2    
             1      2
 5   / 5:  1357.  2357.
 6   / 6:  1367.  2367.
LIST/ORDER=ZX
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 points (Z-X)
             Y        : 3
             T        : 7
             5      6    
             5      6
 1   / 1:  1357.  1367.
 2   / 2:  2357.  2367.
 
SET REGION/I=1:2/J=3:4/K=5/L=7
LIST/ORDER=XY
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 points (X-Y)
             Z        : 5
             T        : 7
             1      2    
             1      2
 3   / 3:  1357.  2357.
 4   / 4:  1457.  2457.
LIST/ORDER=YX
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 by 2 points (Y-X)
             Z        : 5
             T        : 7
             3      4    
             3      4
 1   / 1:  1357.  1457.
 2   / 2:  2357.  2457.
 
! ------ 1D regions
LIST/I=1:2/J=3/K=5/L=7
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 points (X)
             Y        : 3
             Z        : 5
             T        : 7
             3    
             3
 1   / 1:  1357.
 2   / 2:  2357.
LIST/I=1/J=3:4/K=5/L=7
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 points (Y)
             X        : 1
             Z        : 5
             T        : 7
             1    
             1
 3   / 3:  1357.
 4   / 4:  1457.
LIST/I=1/J=3/K=5:6/L=7
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 points (Z)
             X        : 1
             Y        : 3
             T        : 7
             1    
             1
 5   / 5:  1357.
 6   / 6:  1367.
LIST/I=1/J=3/K=5/L=7:8
             VARIABLE : 1000*I + 100*J + 10*K + L
             SUBSET   : 2 points (T)
             X        : 1
             Y        : 3
             Z        : 5
             1    
             1
 7   / 7:  1357.
 8   / 8:  1358.
 
! multiple variable list
SET EXPRESSION v,i,j,k,l
GO bn_output.sub
! BN200_OUTPUT.SUB
! - test various output order permutations FERRET
! rev 0.0  9/18/90 *sh*
 
! test permutations on output
! ------ 4D region
SET REGION/I=1:2/J=3:4/K=5:6/L=7:8
LIST/ORDER=XYZT
             X: 0.5 to 2.5
             Y: 2.5 to 4.5
             Z: 4.5 to 6.5
             T: 6.5 to 8.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- L:7 T:   7
 ---- K:5 Z:   5
 ---- J:3 Y:   3
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
 ---- J:4 Y:   4
1   / 1:  1457.  1.000  4.000  5.000  7.000
2   / 2:  2457.  2.000  4.000  5.000  7.000
 ---- K:6 Z:   6
 ---- J:3 Y:   3
1   / 1:  1367.  1.000  3.000  6.000  7.000
2   / 2:  2367.  2.000  3.000  6.000  7.000
 ---- J:4 Y:   4
1   / 1:  1467.  1.000  4.000  6.000  7.000
2   / 2:  2467.  2.000  4.000  6.000  7.000
 ---- L:8 T:   8
 ---- K:5 Z:   5
 ---- J:3 Y:   3
1   / 1:  1358.  1.000  3.000  5.000  8.000
2   / 2:  2358.  2.000  3.000  5.000  8.000
 ---- J:4 Y:   4
1   / 1:  1458.  1.000  4.000  5.000  8.000
2   / 2:  2458.  2.000  4.000  5.000  8.000
 ---- K:6 Z:   6
 ---- J:3 Y:   3
1   / 1:  1368.  1.000  3.000  6.000  8.000
2   / 2:  2368.  2.000  3.000  6.000  8.000
 ---- J:4 Y:   4
1   / 1:  1468.  1.000  4.000  6.000  8.000
2   / 2:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=XYTZ
             X: 0.5 to 2.5
             Y: 2.5 to 4.5
             T: 6.5 to 8.5
             Z: 4.5 to 6.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- K:5 Z:   5
 ---- L:7 T:   7
 ---- J:3 Y:   3
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
 ---- J:4 Y:   4
1   / 1:  1457.  1.000  4.000  5.000  7.000
2   / 2:  2457.  2.000  4.000  5.000  7.000
 ---- L:8 T:   8
 ---- J:3 Y:   3
1   / 1:  1358.  1.000  3.000  5.000  8.000
2   / 2:  2358.  2.000  3.000  5.000  8.000
 ---- J:4 Y:   4
1   / 1:  1458.  1.000  4.000  5.000  8.000
2   / 2:  2458.  2.000  4.000  5.000  8.000
 ---- K:6 Z:   6
 ---- L:7 T:   7
 ---- J:3 Y:   3
1   / 1:  1367.  1.000  3.000  6.000  7.000
2   / 2:  2367.  2.000  3.000  6.000  7.000
 ---- J:4 Y:   4
1   / 1:  1467.  1.000  4.000  6.000  7.000
2   / 2:  2467.  2.000  4.000  6.000  7.000
 ---- L:8 T:   8
 ---- J:3 Y:   3
1   / 1:  1368.  1.000  3.000  6.000  8.000
2   / 2:  2368.  2.000  3.000  6.000  8.000
 ---- J:4 Y:   4
1   / 1:  1468.  1.000  4.000  6.000  8.000
2   / 2:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=XZYT
             X: 0.5 to 2.5
             Z: 4.5 to 6.5
             Y: 2.5 to 4.5
             T: 6.5 to 8.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- L:7 T:   7
 ---- J:3 Y:   3
 ---- K:5 Z:   5
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
 ---- K:6 Z:   6
1   / 1:  1367.  1.000  3.000  6.000  7.000
2   / 2:  2367.  2.000  3.000  6.000  7.000
 ---- J:4 Y:   4
 ---- K:5 Z:   5
1   / 1:  1457.  1.000  4.000  5.000  7.000
2   / 2:  2457.  2.000  4.000  5.000  7.000
 ---- K:6 Z:   6
1   / 1:  1467.  1.000  4.000  6.000  7.000
2   / 2:  2467.  2.000  4.000  6.000  7.000
 ---- L:8 T:   8
 ---- J:3 Y:   3
 ---- K:5 Z:   5
1   / 1:  1358.  1.000  3.000  5.000  8.000
2   / 2:  2358.  2.000  3.000  5.000  8.000
 ---- K:6 Z:   6
1   / 1:  1368.  1.000  3.000  6.000  8.000
2   / 2:  2368.  2.000  3.000  6.000  8.000
 ---- J:4 Y:   4
 ---- K:5 Z:   5
1   / 1:  1458.  1.000  4.000  5.000  8.000
2   / 2:  2458.  2.000  4.000  5.000  8.000
 ---- K:6 Z:   6
1   / 1:  1468.  1.000  4.000  6.000  8.000
2   / 2:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=XZTY
             X: 0.5 to 2.5
             Z: 4.5 to 6.5
             T: 6.5 to 8.5
             Y: 2.5 to 4.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- J:3 Y:   3
 ---- L:7 T:   7
 ---- K:5 Z:   5
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
 ---- K:6 Z:   6
1   / 1:  1367.  1.000  3.000  6.000  7.000
2   / 2:  2367.  2.000  3.000  6.000  7.000
 ---- L:8 T:   8
 ---- K:5 Z:   5
1   / 1:  1358.  1.000  3.000  5.000  8.000
2   / 2:  2358.  2.000  3.000  5.000  8.000
 ---- K:6 Z:   6
1   / 1:  1368.  1.000  3.000  6.000  8.000
2   / 2:  2368.  2.000  3.000  6.000  8.000
 ---- J:4 Y:   4
 ---- L:7 T:   7
 ---- K:5 Z:   5
1   / 1:  1457.  1.000  4.000  5.000  7.000
2   / 2:  2457.  2.000  4.000  5.000  7.000
 ---- K:6 Z:   6
1   / 1:  1467.  1.000  4.000  6.000  7.000
2   / 2:  2467.  2.000  4.000  6.000  7.000
 ---- L:8 T:   8
 ---- K:5 Z:   5
1   / 1:  1458.  1.000  4.000  5.000  8.000
2   / 2:  2458.  2.000  4.000  5.000  8.000
 ---- K:6 Z:   6
1   / 1:  1468.  1.000  4.000  6.000  8.000
2   / 2:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=XTYZ
             X: 0.5 to 2.5
             T: 6.5 to 8.5
             Y: 2.5 to 4.5
             Z: 4.5 to 6.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- K:5 Z:   5
 ---- J:3 Y:   3
 ---- L:7 T:   7
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
 ---- L:8 T:   8
1   / 1:  1358.  1.000  3.000  5.000  8.000
2   / 2:  2358.  2.000  3.000  5.000  8.000
 ---- J:4 Y:   4
 ---- L:7 T:   7
1   / 1:  1457.  1.000  4.000  5.000  7.000
2   / 2:  2457.  2.000  4.000  5.000  7.000
 ---- L:8 T:   8
1   / 1:  1458.  1.000  4.000  5.000  8.000
2   / 2:  2458.  2.000  4.000  5.000  8.000
 ---- K:6 Z:   6
 ---- J:3 Y:   3
 ---- L:7 T:   7
1   / 1:  1367.  1.000  3.000  6.000  7.000
2   / 2:  2367.  2.000  3.000  6.000  7.000
 ---- L:8 T:   8
1   / 1:  1368.  1.000  3.000  6.000  8.000
2   / 2:  2368.  2.000  3.000  6.000  8.000
 ---- J:4 Y:   4
 ---- L:7 T:   7
1   / 1:  1467.  1.000  4.000  6.000  7.000
2   / 2:  2467.  2.000  4.000  6.000  7.000
 ---- L:8 T:   8
1   / 1:  1468.  1.000  4.000  6.000  8.000
2   / 2:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=XTZY
             X: 0.5 to 2.5
             T: 6.5 to 8.5
             Z: 4.5 to 6.5
             Y: 2.5 to 4.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- J:3 Y:   3
 ---- K:5 Z:   5
 ---- L:7 T:   7
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
 ---- L:8 T:   8
1   / 1:  1358.  1.000  3.000  5.000  8.000
2   / 2:  2358.  2.000  3.000  5.000  8.000
 ---- K:6 Z:   6
 ---- L:7 T:   7
1   / 1:  1367.  1.000  3.000  6.000  7.000
2   / 2:  2367.  2.000  3.000  6.000  7.000
 ---- L:8 T:   8
1   / 1:  1368.  1.000  3.000  6.000  8.000
2   / 2:  2368.  2.000  3.000  6.000  8.000
 ---- J:4 Y:   4
 ---- K:5 Z:   5
 ---- L:7 T:   7
1   / 1:  1457.  1.000  4.000  5.000  7.000
2   / 2:  2457.  2.000  4.000  5.000  7.000
 ---- L:8 T:   8
1   / 1:  1458.  1.000  4.000  5.000  8.000
2   / 2:  2458.  2.000  4.000  5.000  8.000
 ---- K:6 Z:   6
 ---- L:7 T:   7
1   / 1:  1467.  1.000  4.000  6.000  7.000
2   / 2:  2467.  2.000  4.000  6.000  7.000
 ---- L:8 T:   8
1   / 1:  1468.  1.000  4.000  6.000  8.000
2   / 2:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=YXZT
             Y: 2.5 to 4.5
             X: 0.5 to 2.5
             Z: 4.5 to 6.5
             T: 6.5 to 8.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- L:7 T:   7
 ---- K:5 Z:   5
 ---- I:1 X:   1
3   / 3:  1357.  1.000  3.000  5.000  7.000
4   / 4:  1457.  1.000  4.000  5.000  7.000
 ---- I:2 X:   2
3   / 3:  2357.  2.000  3.000  5.000  7.000
4   / 4:  2457.  2.000  4.000  5.000  7.000
 ---- K:6 Z:   6
 ---- I:1 X:   1
3   / 3:  1367.  1.000  3.000  6.000  7.000
4   / 4:  1467.  1.000  4.000  6.000  7.000
 ---- I:2 X:   2
3   / 3:  2367.  2.000  3.000  6.000  7.000
4   / 4:  2467.  2.000  4.000  6.000  7.000
 ---- L:8 T:   8
 ---- K:5 Z:   5
 ---- I:1 X:   1
3   / 3:  1358.  1.000  3.000  5.000  8.000
4   / 4:  1458.  1.000  4.000  5.000  8.000
 ---- I:2 X:   2
3   / 3:  2358.  2.000  3.000  5.000  8.000
4   / 4:  2458.  2.000  4.000  5.000  8.000
 ---- K:6 Z:   6
 ---- I:1 X:   1
3   / 3:  1368.  1.000  3.000  6.000  8.000
4   / 4:  1468.  1.000  4.000  6.000  8.000
 ---- I:2 X:   2
3   / 3:  2368.  2.000  3.000  6.000  8.000
4   / 4:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=YXTZ
             Y: 2.5 to 4.5
             X: 0.5 to 2.5
             T: 6.5 to 8.5
             Z: 4.5 to 6.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- K:5 Z:   5
 ---- L:7 T:   7
 ---- I:1 X:   1
3   / 3:  1357.  1.000  3.000  5.000  7.000
4   / 4:  1457.  1.000  4.000  5.000  7.000
 ---- I:2 X:   2
3   / 3:  2357.  2.000  3.000  5.000  7.000
4   / 4:  2457.  2.000  4.000  5.000  7.000
 ---- L:8 T:   8
 ---- I:1 X:   1
3   / 3:  1358.  1.000  3.000  5.000  8.000
4   / 4:  1458.  1.000  4.000  5.000  8.000
 ---- I:2 X:   2
3   / 3:  2358.  2.000  3.000  5.000  8.000
4   / 4:  2458.  2.000  4.000  5.000  8.000
 ---- K:6 Z:   6
 ---- L:7 T:   7
 ---- I:1 X:   1
3   / 3:  1367.  1.000  3.000  6.000  7.000
4   / 4:  1467.  1.000  4.000  6.000  7.000
 ---- I:2 X:   2
3   / 3:  2367.  2.000  3.000  6.000  7.000
4   / 4:  2467.  2.000  4.000  6.000  7.000
 ---- L:8 T:   8
 ---- I:1 X:   1
3   / 3:  1368.  1.000  3.000  6.000  8.000
4   / 4:  1468.  1.000  4.000  6.000  8.000
 ---- I:2 X:   2
3   / 3:  2368.  2.000  3.000  6.000  8.000
4   / 4:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=YZXT
             Y: 2.5 to 4.5
             Z: 4.5 to 6.5
             X: 0.5 to 2.5
             T: 6.5 to 8.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- L:7 T:   7
 ---- I:1 X:   1
 ---- K:5 Z:   5
3   / 3:  1357.  1.000  3.000  5.000  7.000
4   / 4:  1457.  1.000  4.000  5.000  7.000
 ---- K:6 Z:   6
3   / 3:  1367.  1.000  3.000  6.000  7.000
4   / 4:  1467.  1.000  4.000  6.000  7.000
 ---- I:2 X:   2
 ---- K:5 Z:   5
3   / 3:  2357.  2.000  3.000  5.000  7.000
4   / 4:  2457.  2.000  4.000  5.000  7.000
 ---- K:6 Z:   6
3   / 3:  2367.  2.000  3.000  6.000  7.000
4   / 4:  2467.  2.000  4.000  6.000  7.000
 ---- L:8 T:   8
 ---- I:1 X:   1
 ---- K:5 Z:   5
3   / 3:  1358.  1.000  3.000  5.000  8.000
4   / 4:  1458.  1.000  4.000  5.000  8.000
 ---- K:6 Z:   6
3   / 3:  1368.  1.000  3.000  6.000  8.000
4   / 4:  1468.  1.000  4.000  6.000  8.000
 ---- I:2 X:   2
 ---- K:5 Z:   5
3   / 3:  2358.  2.000  3.000  5.000  8.000
4   / 4:  2458.  2.000  4.000  5.000  8.000
 ---- K:6 Z:   6
3   / 3:  2368.  2.000  3.000  6.000  8.000
4   / 4:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=YZTX
             Y: 2.5 to 4.5
             Z: 4.5 to 6.5
             T: 6.5 to 8.5
             X: 0.5 to 2.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- I:1 X:   1
 ---- L:7 T:   7
 ---- K:5 Z:   5
3   / 3:  1357.  1.000  3.000  5.000  7.000
4   / 4:  1457.  1.000  4.000  5.000  7.000
 ---- K:6 Z:   6
3   / 3:  1367.  1.000  3.000  6.000  7.000
4   / 4:  1467.  1.000  4.000  6.000  7.000
 ---- L:8 T:   8
 ---- K:5 Z:   5
3   / 3:  1358.  1.000  3.000  5.000  8.000
4   / 4:  1458.  1.000  4.000  5.000  8.000
 ---- K:6 Z:   6
3   / 3:  1368.  1.000  3.000  6.000  8.000
4   / 4:  1468.  1.000  4.000  6.000  8.000
 ---- I:2 X:   2
 ---- L:7 T:   7
 ---- K:5 Z:   5
3   / 3:  2357.  2.000  3.000  5.000  7.000
4   / 4:  2457.  2.000  4.000  5.000  7.000
 ---- K:6 Z:   6
3   / 3:  2367.  2.000  3.000  6.000  7.000
4   / 4:  2467.  2.000  4.000  6.000  7.000
 ---- L:8 T:   8
 ---- K:5 Z:   5
3   / 3:  2358.  2.000  3.000  5.000  8.000
4   / 4:  2458.  2.000  4.000  5.000  8.000
 ---- K:6 Z:   6
3   / 3:  2368.  2.000  3.000  6.000  8.000
4   / 4:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=YTXZ
             Y: 2.5 to 4.5
             T: 6.5 to 8.5
             X: 0.5 to 2.5
             Z: 4.5 to 6.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- K:5 Z:   5
 ---- I:1 X:   1
 ---- L:7 T:   7
3   / 3:  1357.  1.000  3.000  5.000  7.000
4   / 4:  1457.  1.000  4.000  5.000  7.000
 ---- L:8 T:   8
3   / 3:  1358.  1.000  3.000  5.000  8.000
4   / 4:  1458.  1.000  4.000  5.000  8.000
 ---- I:2 X:   2
 ---- L:7 T:   7
3   / 3:  2357.  2.000  3.000  5.000  7.000
4   / 4:  2457.  2.000  4.000  5.000  7.000
 ---- L:8 T:   8
3   / 3:  2358.  2.000  3.000  5.000  8.000
4   / 4:  2458.  2.000  4.000  5.000  8.000
 ---- K:6 Z:   6
 ---- I:1 X:   1
 ---- L:7 T:   7
3   / 3:  1367.  1.000  3.000  6.000  7.000
4   / 4:  1467.  1.000  4.000  6.000  7.000
 ---- L:8 T:   8
3   / 3:  1368.  1.000  3.000  6.000  8.000
4   / 4:  1468.  1.000  4.000  6.000  8.000
 ---- I:2 X:   2
 ---- L:7 T:   7
3   / 3:  2367.  2.000  3.000  6.000  7.000
4   / 4:  2467.  2.000  4.000  6.000  7.000
 ---- L:8 T:   8
3   / 3:  2368.  2.000  3.000  6.000  8.000
4   / 4:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=YTZX
             Y: 2.5 to 4.5
             T: 6.5 to 8.5
             Z: 4.5 to 6.5
             X: 0.5 to 2.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- I:1 X:   1
 ---- K:5 Z:   5
 ---- L:7 T:   7
3   / 3:  1357.  1.000  3.000  5.000  7.000
4   / 4:  1457.  1.000  4.000  5.000  7.000
 ---- L:8 T:   8
3   / 3:  1358.  1.000  3.000  5.000  8.000
4   / 4:  1458.  1.000  4.000  5.000  8.000
 ---- K:6 Z:   6
 ---- L:7 T:   7
3   / 3:  1367.  1.000  3.000  6.000  7.000
4   / 4:  1467.  1.000  4.000  6.000  7.000
 ---- L:8 T:   8
3   / 3:  1368.  1.000  3.000  6.000  8.000
4   / 4:  1468.  1.000  4.000  6.000  8.000
 ---- I:2 X:   2
 ---- K:5 Z:   5
 ---- L:7 T:   7
3   / 3:  2357.  2.000  3.000  5.000  7.000
4   / 4:  2457.  2.000  4.000  5.000  7.000
 ---- L:8 T:   8
3   / 3:  2358.  2.000  3.000  5.000  8.000
4   / 4:  2458.  2.000  4.000  5.000  8.000
 ---- K:6 Z:   6
 ---- L:7 T:   7
3   / 3:  2367.  2.000  3.000  6.000  7.000
4   / 4:  2467.  2.000  4.000  6.000  7.000
 ---- L:8 T:   8
3   / 3:  2368.  2.000  3.000  6.000  8.000
4   / 4:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=ZXYT
             Z: 4.5 to 6.5
             X: 0.5 to 2.5
             Y: 2.5 to 4.5
             T: 6.5 to 8.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- L:7 T:   7
 ---- J:3 Y:   3
 ---- I:1 X:   1
5   / 5:  1357.  1.000  3.000  5.000  7.000
6   / 6:  1367.  1.000  3.000  6.000  7.000
 ---- I:2 X:   2
5   / 5:  2357.  2.000  3.000  5.000  7.000
6   / 6:  2367.  2.000  3.000  6.000  7.000
 ---- J:4 Y:   4
 ---- I:1 X:   1
5   / 5:  1457.  1.000  4.000  5.000  7.000
6   / 6:  1467.  1.000  4.000  6.000  7.000
 ---- I:2 X:   2
5   / 5:  2457.  2.000  4.000  5.000  7.000
6   / 6:  2467.  2.000  4.000  6.000  7.000
 ---- L:8 T:   8
 ---- J:3 Y:   3
 ---- I:1 X:   1
5   / 5:  1358.  1.000  3.000  5.000  8.000
6   / 6:  1368.  1.000  3.000  6.000  8.000
 ---- I:2 X:   2
5   / 5:  2358.  2.000  3.000  5.000  8.000
6   / 6:  2368.  2.000  3.000  6.000  8.000
 ---- J:4 Y:   4
 ---- I:1 X:   1
5   / 5:  1458.  1.000  4.000  5.000  8.000
6   / 6:  1468.  1.000  4.000  6.000  8.000
 ---- I:2 X:   2
5   / 5:  2458.  2.000  4.000  5.000  8.000
6   / 6:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=ZXTY
             Z: 4.5 to 6.5
             X: 0.5 to 2.5
             T: 6.5 to 8.5
             Y: 2.5 to 4.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- J:3 Y:   3
 ---- L:7 T:   7
 ---- I:1 X:   1
5   / 5:  1357.  1.000  3.000  5.000  7.000
6   / 6:  1367.  1.000  3.000  6.000  7.000
 ---- I:2 X:   2
5   / 5:  2357.  2.000  3.000  5.000  7.000
6   / 6:  2367.  2.000  3.000  6.000  7.000
 ---- L:8 T:   8
 ---- I:1 X:   1
5   / 5:  1358.  1.000  3.000  5.000  8.000
6   / 6:  1368.  1.000  3.000  6.000  8.000
 ---- I:2 X:   2
5   / 5:  2358.  2.000  3.000  5.000  8.000
6   / 6:  2368.  2.000  3.000  6.000  8.000
 ---- J:4 Y:   4
 ---- L:7 T:   7
 ---- I:1 X:   1
5   / 5:  1457.  1.000  4.000  5.000  7.000
6   / 6:  1467.  1.000  4.000  6.000  7.000
 ---- I:2 X:   2
5   / 5:  2457.  2.000  4.000  5.000  7.000
6   / 6:  2467.  2.000  4.000  6.000  7.000
 ---- L:8 T:   8
 ---- I:1 X:   1
5   / 5:  1458.  1.000  4.000  5.000  8.000
6   / 6:  1468.  1.000  4.000  6.000  8.000
 ---- I:2 X:   2
5   / 5:  2458.  2.000  4.000  5.000  8.000
6   / 6:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=ZYXT
             Z: 4.5 to 6.5
             Y: 2.5 to 4.5
             X: 0.5 to 2.5
             T: 6.5 to 8.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- L:7 T:   7
 ---- I:1 X:   1
 ---- J:3 Y:   3
5   / 5:  1357.  1.000  3.000  5.000  7.000
6   / 6:  1367.  1.000  3.000  6.000  7.000
 ---- J:4 Y:   4
5   / 5:  1457.  1.000  4.000  5.000  7.000
6   / 6:  1467.  1.000  4.000  6.000  7.000
 ---- I:2 X:   2
 ---- J:3 Y:   3
5   / 5:  2357.  2.000  3.000  5.000  7.000
6   / 6:  2367.  2.000  3.000  6.000  7.000
 ---- J:4 Y:   4
5   / 5:  2457.  2.000  4.000  5.000  7.000
6   / 6:  2467.  2.000  4.000  6.000  7.000
 ---- L:8 T:   8
 ---- I:1 X:   1
 ---- J:3 Y:   3
5   / 5:  1358.  1.000  3.000  5.000  8.000
6   / 6:  1368.  1.000  3.000  6.000  8.000
 ---- J:4 Y:   4
5   / 5:  1458.  1.000  4.000  5.000  8.000
6   / 6:  1468.  1.000  4.000  6.000  8.000
 ---- I:2 X:   2
 ---- J:3 Y:   3
5   / 5:  2358.  2.000  3.000  5.000  8.000
6   / 6:  2368.  2.000  3.000  6.000  8.000
 ---- J:4 Y:   4
5   / 5:  2458.  2.000  4.000  5.000  8.000
6   / 6:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=ZYTX
             Z: 4.5 to 6.5
             Y: 2.5 to 4.5
             T: 6.5 to 8.5
             X: 0.5 to 2.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- I:1 X:   1
 ---- L:7 T:   7
 ---- J:3 Y:   3
5   / 5:  1357.  1.000  3.000  5.000  7.000
6   / 6:  1367.  1.000  3.000  6.000  7.000
 ---- J:4 Y:   4
5   / 5:  1457.  1.000  4.000  5.000  7.000
6   / 6:  1467.  1.000  4.000  6.000  7.000
 ---- L:8 T:   8
 ---- J:3 Y:   3
5   / 5:  1358.  1.000  3.000  5.000  8.000
6   / 6:  1368.  1.000  3.000  6.000  8.000
 ---- J:4 Y:   4
5   / 5:  1458.  1.000  4.000  5.000  8.000
6   / 6:  1468.  1.000  4.000  6.000  8.000
 ---- I:2 X:   2
 ---- L:7 T:   7
 ---- J:3 Y:   3
5   / 5:  2357.  2.000  3.000  5.000  7.000
6   / 6:  2367.  2.000  3.000  6.000  7.000
 ---- J:4 Y:   4
5   / 5:  2457.  2.000  4.000  5.000  7.000
6   / 6:  2467.  2.000  4.000  6.000  7.000
 ---- L:8 T:   8
 ---- J:3 Y:   3
5   / 5:  2358.  2.000  3.000  5.000  8.000
6   / 6:  2368.  2.000  3.000  6.000  8.000
 ---- J:4 Y:   4
5   / 5:  2458.  2.000  4.000  5.000  8.000
6   / 6:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=ZTXY
             Z: 4.5 to 6.5
             T: 6.5 to 8.5
             X: 0.5 to 2.5
             Y: 2.5 to 4.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- J:3 Y:   3
 ---- I:1 X:   1
 ---- L:7 T:   7
5   / 5:  1357.  1.000  3.000  5.000  7.000
6   / 6:  1367.  1.000  3.000  6.000  7.000
 ---- L:8 T:   8
5   / 5:  1358.  1.000  3.000  5.000  8.000
6   / 6:  1368.  1.000  3.000  6.000  8.000
 ---- I:2 X:   2
 ---- L:7 T:   7
5   / 5:  2357.  2.000  3.000  5.000  7.000
6   / 6:  2367.  2.000  3.000  6.000  7.000
 ---- L:8 T:   8
5   / 5:  2358.  2.000  3.000  5.000  8.000
6   / 6:  2368.  2.000  3.000  6.000  8.000
 ---- J:4 Y:   4
 ---- I:1 X:   1
 ---- L:7 T:   7
5   / 5:  1457.  1.000  4.000  5.000  7.000
6   / 6:  1467.  1.000  4.000  6.000  7.000
 ---- L:8 T:   8
5   / 5:  1458.  1.000  4.000  5.000  8.000
6   / 6:  1468.  1.000  4.000  6.000  8.000
 ---- I:2 X:   2
 ---- L:7 T:   7
5   / 5:  2457.  2.000  4.000  5.000  7.000
6   / 6:  2467.  2.000  4.000  6.000  7.000
 ---- L:8 T:   8
5   / 5:  2458.  2.000  4.000  5.000  8.000
6   / 6:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=ZTYX
             Z: 4.5 to 6.5
             T: 6.5 to 8.5
             Y: 2.5 to 4.5
             X: 0.5 to 2.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- I:1 X:   1
 ---- J:3 Y:   3
 ---- L:7 T:   7
5   / 5:  1357.  1.000  3.000  5.000  7.000
6   / 6:  1367.  1.000  3.000  6.000  7.000
 ---- L:8 T:   8
5   / 5:  1358.  1.000  3.000  5.000  8.000
6   / 6:  1368.  1.000  3.000  6.000  8.000
 ---- J:4 Y:   4
 ---- L:7 T:   7
5   / 5:  1457.  1.000  4.000  5.000  7.000
6   / 6:  1467.  1.000  4.000  6.000  7.000
 ---- L:8 T:   8
5   / 5:  1458.  1.000  4.000  5.000  8.000
6   / 6:  1468.  1.000  4.000  6.000  8.000
 ---- I:2 X:   2
 ---- J:3 Y:   3
 ---- L:7 T:   7
5   / 5:  2357.  2.000  3.000  5.000  7.000
6   / 6:  2367.  2.000  3.000  6.000  7.000
 ---- L:8 T:   8
5   / 5:  2358.  2.000  3.000  5.000  8.000
6   / 6:  2368.  2.000  3.000  6.000  8.000
 ---- J:4 Y:   4
 ---- L:7 T:   7
5   / 5:  2457.  2.000  4.000  5.000  7.000
6   / 6:  2467.  2.000  4.000  6.000  7.000
 ---- L:8 T:   8
5   / 5:  2458.  2.000  4.000  5.000  8.000
6   / 6:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=TXYZ
             T: 6.5 to 8.5
             X: 0.5 to 2.5
             Y: 2.5 to 4.5
             Z: 4.5 to 6.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- K:5 Z:   5
 ---- J:3 Y:   3
 ---- I:1 X:   1
7   / 7:  1357.  1.000  3.000  5.000  7.000
8   / 8:  1358.  1.000  3.000  5.000  8.000
 ---- I:2 X:   2
7   / 7:  2357.  2.000  3.000  5.000  7.000
8   / 8:  2358.  2.000  3.000  5.000  8.000
 ---- J:4 Y:   4
 ---- I:1 X:   1
7   / 7:  1457.  1.000  4.000  5.000  7.000
8   / 8:  1458.  1.000  4.000  5.000  8.000
 ---- I:2 X:   2
7   / 7:  2457.  2.000  4.000  5.000  7.000
8   / 8:  2458.  2.000  4.000  5.000  8.000
 ---- K:6 Z:   6
 ---- J:3 Y:   3
 ---- I:1 X:   1
7   / 7:  1367.  1.000  3.000  6.000  7.000
8   / 8:  1368.  1.000  3.000  6.000  8.000
 ---- I:2 X:   2
7   / 7:  2367.  2.000  3.000  6.000  7.000
8   / 8:  2368.  2.000  3.000  6.000  8.000
 ---- J:4 Y:   4
 ---- I:1 X:   1
7   / 7:  1467.  1.000  4.000  6.000  7.000
8   / 8:  1468.  1.000  4.000  6.000  8.000
 ---- I:2 X:   2
7   / 7:  2467.  2.000  4.000  6.000  7.000
8   / 8:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=TXZY
             T: 6.5 to 8.5
             X: 0.5 to 2.5
             Z: 4.5 to 6.5
             Y: 2.5 to 4.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- J:3 Y:   3
 ---- K:5 Z:   5
 ---- I:1 X:   1
7   / 7:  1357.  1.000  3.000  5.000  7.000
8   / 8:  1358.  1.000  3.000  5.000  8.000
 ---- I:2 X:   2
7   / 7:  2357.  2.000  3.000  5.000  7.000
8   / 8:  2358.  2.000  3.000  5.000  8.000
 ---- K:6 Z:   6
 ---- I:1 X:   1
7   / 7:  1367.  1.000  3.000  6.000  7.000
8   / 8:  1368.  1.000  3.000  6.000  8.000
 ---- I:2 X:   2
7   / 7:  2367.  2.000  3.000  6.000  7.000
8   / 8:  2368.  2.000  3.000  6.000  8.000
 ---- J:4 Y:   4
 ---- K:5 Z:   5
 ---- I:1 X:   1
7   / 7:  1457.  1.000  4.000  5.000  7.000
8   / 8:  1458.  1.000  4.000  5.000  8.000
 ---- I:2 X:   2
7   / 7:  2457.  2.000  4.000  5.000  7.000
8   / 8:  2458.  2.000  4.000  5.000  8.000
 ---- K:6 Z:   6
 ---- I:1 X:   1
7   / 7:  1467.  1.000  4.000  6.000  7.000
8   / 8:  1468.  1.000  4.000  6.000  8.000
 ---- I:2 X:   2
7   / 7:  2467.  2.000  4.000  6.000  7.000
8   / 8:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=TYXZ
             T: 6.5 to 8.5
             Y: 2.5 to 4.5
             X: 0.5 to 2.5
             Z: 4.5 to 6.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- K:5 Z:   5
 ---- I:1 X:   1
 ---- J:3 Y:   3
7   / 7:  1357.  1.000  3.000  5.000  7.000
8   / 8:  1358.  1.000  3.000  5.000  8.000
 ---- J:4 Y:   4
7   / 7:  1457.  1.000  4.000  5.000  7.000
8   / 8:  1458.  1.000  4.000  5.000  8.000
 ---- I:2 X:   2
 ---- J:3 Y:   3
7   / 7:  2357.  2.000  3.000  5.000  7.000
8   / 8:  2358.  2.000  3.000  5.000  8.000
 ---- J:4 Y:   4
7   / 7:  2457.  2.000  4.000  5.000  7.000
8   / 8:  2458.  2.000  4.000  5.000  8.000
 ---- K:6 Z:   6
 ---- I:1 X:   1
 ---- J:3 Y:   3
7   / 7:  1367.  1.000  3.000  6.000  7.000
8   / 8:  1368.  1.000  3.000  6.000  8.000
 ---- J:4 Y:   4
7   / 7:  1467.  1.000  4.000  6.000  7.000
8   / 8:  1468.  1.000  4.000  6.000  8.000
 ---- I:2 X:   2
 ---- J:3 Y:   3
7   / 7:  2367.  2.000  3.000  6.000  7.000
8   / 8:  2368.  2.000  3.000  6.000  8.000
 ---- J:4 Y:   4
7   / 7:  2467.  2.000  4.000  6.000  7.000
8   / 8:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=TYZX
             T: 6.5 to 8.5
             Y: 2.5 to 4.5
             Z: 4.5 to 6.5
             X: 0.5 to 2.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- I:1 X:   1
 ---- K:5 Z:   5
 ---- J:3 Y:   3
7   / 7:  1357.  1.000  3.000  5.000  7.000
8   / 8:  1358.  1.000  3.000  5.000  8.000
 ---- J:4 Y:   4
7   / 7:  1457.  1.000  4.000  5.000  7.000
8   / 8:  1458.  1.000  4.000  5.000  8.000
 ---- K:6 Z:   6
 ---- J:3 Y:   3
7   / 7:  1367.  1.000  3.000  6.000  7.000
8   / 8:  1368.  1.000  3.000  6.000  8.000
 ---- J:4 Y:   4
7   / 7:  1467.  1.000  4.000  6.000  7.000
8   / 8:  1468.  1.000  4.000  6.000  8.000
 ---- I:2 X:   2
 ---- K:5 Z:   5
 ---- J:3 Y:   3
7   / 7:  2357.  2.000  3.000  5.000  7.000
8   / 8:  2358.  2.000  3.000  5.000  8.000
 ---- J:4 Y:   4
7   / 7:  2457.  2.000  4.000  5.000  7.000
8   / 8:  2458.  2.000  4.000  5.000  8.000
 ---- K:6 Z:   6
 ---- J:3 Y:   3
7   / 7:  2367.  2.000  3.000  6.000  7.000
8   / 8:  2368.  2.000  3.000  6.000  8.000
 ---- J:4 Y:   4
7   / 7:  2467.  2.000  4.000  6.000  7.000
8   / 8:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=TZXY
             T: 6.5 to 8.5
             Z: 4.5 to 6.5
             X: 0.5 to 2.5
             Y: 2.5 to 4.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- J:3 Y:   3
 ---- I:1 X:   1
 ---- K:5 Z:   5
7   / 7:  1357.  1.000  3.000  5.000  7.000
8   / 8:  1358.  1.000  3.000  5.000  8.000
 ---- K:6 Z:   6
7   / 7:  1367.  1.000  3.000  6.000  7.000
8   / 8:  1368.  1.000  3.000  6.000  8.000
 ---- I:2 X:   2
 ---- K:5 Z:   5
7   / 7:  2357.  2.000  3.000  5.000  7.000
8   / 8:  2358.  2.000  3.000  5.000  8.000
 ---- K:6 Z:   6
7   / 7:  2367.  2.000  3.000  6.000  7.000
8   / 8:  2368.  2.000  3.000  6.000  8.000
 ---- J:4 Y:   4
 ---- I:1 X:   1
 ---- K:5 Z:   5
7   / 7:  1457.  1.000  4.000  5.000  7.000
8   / 8:  1458.  1.000  4.000  5.000  8.000
 ---- K:6 Z:   6
7   / 7:  1467.  1.000  4.000  6.000  7.000
8   / 8:  1468.  1.000  4.000  6.000  8.000
 ---- I:2 X:   2
 ---- K:5 Z:   5
7   / 7:  2457.  2.000  4.000  5.000  7.000
8   / 8:  2458.  2.000  4.000  5.000  8.000
 ---- K:6 Z:   6
7   / 7:  2467.  2.000  4.000  6.000  7.000
8   / 8:  2468.  2.000  4.000  6.000  8.000
LIST/ORDER=TZYX
             T: 6.5 to 8.5
             Z: 4.5 to 6.5
             Y: 2.5 to 4.5
             X: 0.5 to 2.5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- I:1 X:   1
 ---- J:3 Y:   3
 ---- K:5 Z:   5
7   / 7:  1357.  1.000  3.000  5.000  7.000
8   / 8:  1358.  1.000  3.000  5.000  8.000
 ---- K:6 Z:   6
7   / 7:  1367.  1.000  3.000  6.000  7.000
8   / 8:  1368.  1.000  3.000  6.000  8.000
 ---- J:4 Y:   4
 ---- K:5 Z:   5
7   / 7:  1457.  1.000  4.000  5.000  7.000
8   / 8:  1458.  1.000  4.000  5.000  8.000
 ---- K:6 Z:   6
7   / 7:  1467.  1.000  4.000  6.000  7.000
8   / 8:  1468.  1.000  4.000  6.000  8.000
 ---- I:2 X:   2
 ---- J:3 Y:   3
 ---- K:5 Z:   5
7   / 7:  2357.  2.000  3.000  5.000  7.000
8   / 8:  2358.  2.000  3.000  5.000  8.000
 ---- K:6 Z:   6
7   / 7:  2367.  2.000  3.000  6.000  7.000
8   / 8:  2368.  2.000  3.000  6.000  8.000
 ---- J:4 Y:   4
 ---- K:5 Z:   5
7   / 7:  2457.  2.000  4.000  5.000  7.000
8   / 8:  2458.  2.000  4.000  5.000  8.000
 ---- K:6 Z:   6
7   / 7:  2467.  2.000  4.000  6.000  7.000
8   / 8:  2468.  2.000  4.000  6.000  8.000
 
! ------ 3D regions
SET REGION/I=1/J=3:4/K=5:6/L=7:8
LIST/ORDER=YZT
             Y: 2.5 to 4.5
             Z: 4.5 to 6.5
             T: 6.5 to 8.5
             X: 1
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- L:7 T:   7
 ---- K:5 Z:   5
3   / 3:  1357.  1.000  3.000  5.000  7.000
4   / 4:  1457.  1.000  4.000  5.000  7.000
 ---- K:6 Z:   6
3   / 3:  1367.  1.000  3.000  6.000  7.000
4   / 4:  1467.  1.000  4.000  6.000  7.000
 ---- L:8 T:   8
 ---- K:5 Z:   5
3   / 3:  1358.  1.000  3.000  5.000  8.000
4   / 4:  1458.  1.000  4.000  5.000  8.000
 ---- K:6 Z:   6
3   / 3:  1368.  1.000  3.000  6.000  8.000
4   / 4:  1468.  1.000  4.000  6.000  8.000
LIST/ORDER=YTZ
             Y: 2.5 to 4.5
             T: 6.5 to 8.5
             Z: 4.5 to 6.5
             X: 1
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- K:5 Z:   5
 ---- L:7 T:   7
3   / 3:  1357.  1.000  3.000  5.000  7.000
4   / 4:  1457.  1.000  4.000  5.000  7.000
 ---- L:8 T:   8
3   / 3:  1358.  1.000  3.000  5.000  8.000
4   / 4:  1458.  1.000  4.000  5.000  8.000
 ---- K:6 Z:   6
 ---- L:7 T:   7
3   / 3:  1367.  1.000  3.000  6.000  7.000
4   / 4:  1467.  1.000  4.000  6.000  7.000
 ---- L:8 T:   8
3   / 3:  1368.  1.000  3.000  6.000  8.000
4   / 4:  1468.  1.000  4.000  6.000  8.000
LIST/ORDER=ZYT
             Z: 4.5 to 6.5
             Y: 2.5 to 4.5
             T: 6.5 to 8.5
             X: 1
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- L:7 T:   7
 ---- J:3 Y:   3
5   / 5:  1357.  1.000  3.000  5.000  7.000
6   / 6:  1367.  1.000  3.000  6.000  7.000
 ---- J:4 Y:   4
5   / 5:  1457.  1.000  4.000  5.000  7.000
6   / 6:  1467.  1.000  4.000  6.000  7.000
 ---- L:8 T:   8
 ---- J:3 Y:   3
5   / 5:  1358.  1.000  3.000  5.000  8.000
6   / 6:  1368.  1.000  3.000  6.000  8.000
 ---- J:4 Y:   4
5   / 5:  1458.  1.000  4.000  5.000  8.000
6   / 6:  1468.  1.000  4.000  6.000  8.000
LIST/ORDER=ZTY
             Z: 4.5 to 6.5
             T: 6.5 to 8.5
             Y: 2.5 to 4.5
             X: 1
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- J:3 Y:   3
 ---- L:7 T:   7
5   / 5:  1357.  1.000  3.000  5.000  7.000
6   / 6:  1367.  1.000  3.000  6.000  7.000
 ---- L:8 T:   8
5   / 5:  1358.  1.000  3.000  5.000  8.000
6   / 6:  1368.  1.000  3.000  6.000  8.000
 ---- J:4 Y:   4
 ---- L:7 T:   7
5   / 5:  1457.  1.000  4.000  5.000  7.000
6   / 6:  1467.  1.000  4.000  6.000  7.000
 ---- L:8 T:   8
5   / 5:  1458.  1.000  4.000  5.000  8.000
6   / 6:  1468.  1.000  4.000  6.000  8.000
LIST/ORDER=TYZ
             T: 6.5 to 8.5
             Y: 2.5 to 4.5
             Z: 4.5 to 6.5
             X: 1
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- K:5 Z:   5
 ---- J:3 Y:   3
7   / 7:  1357.  1.000  3.000  5.000  7.000
8   / 8:  1358.  1.000  3.000  5.000  8.000
 ---- J:4 Y:   4
7   / 7:  1457.  1.000  4.000  5.000  7.000
8   / 8:  1458.  1.000  4.000  5.000  8.000
 ---- K:6 Z:   6
 ---- J:3 Y:   3
7   / 7:  1367.  1.000  3.000  6.000  7.000
8   / 8:  1368.  1.000  3.000  6.000  8.000
 ---- J:4 Y:   4
7   / 7:  1467.  1.000  4.000  6.000  7.000
8   / 8:  1468.  1.000  4.000  6.000  8.000
LIST/ORDER=TZY
             T: 6.5 to 8.5
             Z: 4.5 to 6.5
             Y: 2.5 to 4.5
             X: 1
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- J:3 Y:   3
 ---- K:5 Z:   5
7   / 7:  1357.  1.000  3.000  5.000  7.000
8   / 8:  1358.  1.000  3.000  5.000  8.000
 ---- K:6 Z:   6
7   / 7:  1367.  1.000  3.000  6.000  7.000
8   / 8:  1368.  1.000  3.000  6.000  8.000
 ---- J:4 Y:   4
 ---- K:5 Z:   5
7   / 7:  1457.  1.000  4.000  5.000  7.000
8   / 8:  1458.  1.000  4.000  5.000  8.000
 ---- K:6 Z:   6
7   / 7:  1467.  1.000  4.000  6.000  7.000
8   / 8:  1468.  1.000  4.000  6.000  8.000
 
SET REGION/I=1:2/J=3/K=5:6/L=7:8
LIST/ORDER=XZT
             X: 0.5 to 2.5
             Z: 4.5 to 6.5
             T: 6.5 to 8.5
             Y: 3
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- L:7 T:   7
 ---- K:5 Z:   5
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
 ---- K:6 Z:   6
1   / 1:  1367.  1.000  3.000  6.000  7.000
2   / 2:  2367.  2.000  3.000  6.000  7.000
 ---- L:8 T:   8
 ---- K:5 Z:   5
1   / 1:  1358.  1.000  3.000  5.000  8.000
2   / 2:  2358.  2.000  3.000  5.000  8.000
 ---- K:6 Z:   6
1   / 1:  1368.  1.000  3.000  6.000  8.000
2   / 2:  2368.  2.000  3.000  6.000  8.000
LIST/ORDER=XTZ
             X: 0.5 to 2.5
             T: 6.5 to 8.5
             Z: 4.5 to 6.5
             Y: 3
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- K:5 Z:   5
 ---- L:7 T:   7
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
 ---- L:8 T:   8
1   / 1:  1358.  1.000  3.000  5.000  8.000
2   / 2:  2358.  2.000  3.000  5.000  8.000
 ---- K:6 Z:   6
 ---- L:7 T:   7
1   / 1:  1367.  1.000  3.000  6.000  7.000
2   / 2:  2367.  2.000  3.000  6.000  7.000
 ---- L:8 T:   8
1   / 1:  1368.  1.000  3.000  6.000  8.000
2   / 2:  2368.  2.000  3.000  6.000  8.000
LIST/ORDER=ZXT
             Z: 4.5 to 6.5
             X: 0.5 to 2.5
             T: 6.5 to 8.5
             Y: 3
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- L:7 T:   7
 ---- I:1 X:   1
5   / 5:  1357.  1.000  3.000  5.000  7.000
6   / 6:  1367.  1.000  3.000  6.000  7.000
 ---- I:2 X:   2
5   / 5:  2357.  2.000  3.000  5.000  7.000
6   / 6:  2367.  2.000  3.000  6.000  7.000
 ---- L:8 T:   8
 ---- I:1 X:   1
5   / 5:  1358.  1.000  3.000  5.000  8.000
6   / 6:  1368.  1.000  3.000  6.000  8.000
 ---- I:2 X:   2
5   / 5:  2358.  2.000  3.000  5.000  8.000
6   / 6:  2368.  2.000  3.000  6.000  8.000
LIST/ORDER=ZTX
             Z: 4.5 to 6.5
             T: 6.5 to 8.5
             X: 0.5 to 2.5
             Y: 3
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- I:1 X:   1
 ---- L:7 T:   7
5   / 5:  1357.  1.000  3.000  5.000  7.000
6   / 6:  1367.  1.000  3.000  6.000  7.000
 ---- L:8 T:   8
5   / 5:  1358.  1.000  3.000  5.000  8.000
6   / 6:  1368.  1.000  3.000  6.000  8.000
 ---- I:2 X:   2
 ---- L:7 T:   7
5   / 5:  2357.  2.000  3.000  5.000  7.000
6   / 6:  2367.  2.000  3.000  6.000  7.000
 ---- L:8 T:   8
5   / 5:  2358.  2.000  3.000  5.000  8.000
6   / 6:  2368.  2.000  3.000  6.000  8.000
LIST/ORDER=TXZ
             T: 6.5 to 8.5
             X: 0.5 to 2.5
             Z: 4.5 to 6.5
             Y: 3
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- K:5 Z:   5
 ---- I:1 X:   1
7   / 7:  1357.  1.000  3.000  5.000  7.000
8   / 8:  1358.  1.000  3.000  5.000  8.000
 ---- I:2 X:   2
7   / 7:  2357.  2.000  3.000  5.000  7.000
8   / 8:  2358.  2.000  3.000  5.000  8.000
 ---- K:6 Z:   6
 ---- I:1 X:   1
7   / 7:  1367.  1.000  3.000  6.000  7.000
8   / 8:  1368.  1.000  3.000  6.000  8.000
 ---- I:2 X:   2
7   / 7:  2367.  2.000  3.000  6.000  7.000
8   / 8:  2368.  2.000  3.000  6.000  8.000
LIST/ORDER=TZX
             T: 6.5 to 8.5
             Z: 4.5 to 6.5
             X: 0.5 to 2.5
             Y: 3
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- I:1 X:   1
 ---- K:5 Z:   5
7   / 7:  1357.  1.000  3.000  5.000  7.000
8   / 8:  1358.  1.000  3.000  5.000  8.000
 ---- K:6 Z:   6
7   / 7:  1367.  1.000  3.000  6.000  7.000
8   / 8:  1368.  1.000  3.000  6.000  8.000
 ---- I:2 X:   2
 ---- K:5 Z:   5
7   / 7:  2357.  2.000  3.000  5.000  7.000
8   / 8:  2358.  2.000  3.000  5.000  8.000
 ---- K:6 Z:   6
7   / 7:  2367.  2.000  3.000  6.000  7.000
8   / 8:  2368.  2.000  3.000  6.000  8.000
 
SET REGION/I=1:2/J=3:4/K=5/L=7:8
LIST/ORDER=XYT
             X: 0.5 to 2.5
             Y: 2.5 to 4.5
             T: 6.5 to 8.5
             Z: 5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- L:7 T:   7
 ---- J:3 Y:   3
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
 ---- J:4 Y:   4
1   / 1:  1457.  1.000  4.000  5.000  7.000
2   / 2:  2457.  2.000  4.000  5.000  7.000
 ---- L:8 T:   8
 ---- J:3 Y:   3
1   / 1:  1358.  1.000  3.000  5.000  8.000
2   / 2:  2358.  2.000  3.000  5.000  8.000
 ---- J:4 Y:   4
1   / 1:  1458.  1.000  4.000  5.000  8.000
2   / 2:  2458.  2.000  4.000  5.000  8.000
LIST/ORDER=XTY
             X: 0.5 to 2.5
             T: 6.5 to 8.5
             Y: 2.5 to 4.5
             Z: 5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- J:3 Y:   3
 ---- L:7 T:   7
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
 ---- L:8 T:   8
1   / 1:  1358.  1.000  3.000  5.000  8.000
2   / 2:  2358.  2.000  3.000  5.000  8.000
 ---- J:4 Y:   4
 ---- L:7 T:   7
1   / 1:  1457.  1.000  4.000  5.000  7.000
2   / 2:  2457.  2.000  4.000  5.000  7.000
 ---- L:8 T:   8
1   / 1:  1458.  1.000  4.000  5.000  8.000
2   / 2:  2458.  2.000  4.000  5.000  8.000
LIST/ORDER=YXT
             Y: 2.5 to 4.5
             X: 0.5 to 2.5
             T: 6.5 to 8.5
             Z: 5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- L:7 T:   7
 ---- I:1 X:   1
3   / 3:  1357.  1.000  3.000  5.000  7.000
4   / 4:  1457.  1.000  4.000  5.000  7.000
 ---- I:2 X:   2
3   / 3:  2357.  2.000  3.000  5.000  7.000
4   / 4:  2457.  2.000  4.000  5.000  7.000
 ---- L:8 T:   8
 ---- I:1 X:   1
3   / 3:  1358.  1.000  3.000  5.000  8.000
4   / 4:  1458.  1.000  4.000  5.000  8.000
 ---- I:2 X:   2
3   / 3:  2358.  2.000  3.000  5.000  8.000
4   / 4:  2458.  2.000  4.000  5.000  8.000
LIST/ORDER=YTX
             Y: 2.5 to 4.5
             T: 6.5 to 8.5
             X: 0.5 to 2.5
             Z: 5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- I:1 X:   1
 ---- L:7 T:   7
3   / 3:  1357.  1.000  3.000  5.000  7.000
4   / 4:  1457.  1.000  4.000  5.000  7.000
 ---- L:8 T:   8
3   / 3:  1358.  1.000  3.000  5.000  8.000
4   / 4:  1458.  1.000  4.000  5.000  8.000
 ---- I:2 X:   2
 ---- L:7 T:   7
3   / 3:  2357.  2.000  3.000  5.000  7.000
4   / 4:  2457.  2.000  4.000  5.000  7.000
 ---- L:8 T:   8
3   / 3:  2358.  2.000  3.000  5.000  8.000
4   / 4:  2458.  2.000  4.000  5.000  8.000
LIST/ORDER=TXY
             T: 6.5 to 8.5
             X: 0.5 to 2.5
             Y: 2.5 to 4.5
             Z: 5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- J:3 Y:   3
 ---- I:1 X:   1
7   / 7:  1357.  1.000  3.000  5.000  7.000
8   / 8:  1358.  1.000  3.000  5.000  8.000
 ---- I:2 X:   2
7   / 7:  2357.  2.000  3.000  5.000  7.000
8   / 8:  2358.  2.000  3.000  5.000  8.000
 ---- J:4 Y:   4
 ---- I:1 X:   1
7   / 7:  1457.  1.000  4.000  5.000  7.000
8   / 8:  1458.  1.000  4.000  5.000  8.000
 ---- I:2 X:   2
7   / 7:  2457.  2.000  4.000  5.000  7.000
8   / 8:  2458.  2.000  4.000  5.000  8.000
LIST/ORDER=TYX
             T: 6.5 to 8.5
             Y: 2.5 to 4.5
             X: 0.5 to 2.5
             Z: 5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- I:1 X:   1
 ---- J:3 Y:   3
7   / 7:  1357.  1.000  3.000  5.000  7.000
8   / 8:  1358.  1.000  3.000  5.000  8.000
 ---- J:4 Y:   4
7   / 7:  1457.  1.000  4.000  5.000  7.000
8   / 8:  1458.  1.000  4.000  5.000  8.000
 ---- I:2 X:   2
 ---- J:3 Y:   3
7   / 7:  2357.  2.000  3.000  5.000  7.000
8   / 8:  2358.  2.000  3.000  5.000  8.000
 ---- J:4 Y:   4
7   / 7:  2457.  2.000  4.000  5.000  7.000
8   / 8:  2458.  2.000  4.000  5.000  8.000
 
SET REGION/I=1:2/J=3:4/K=5:6/L=7
LIST/ORDER=XYZ
             X: 0.5 to 2.5
             Y: 2.5 to 4.5
             Z: 4.5 to 6.5
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- K:5 Z:   5
 ---- J:3 Y:   3
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
 ---- J:4 Y:   4
1   / 1:  1457.  1.000  4.000  5.000  7.000
2   / 2:  2457.  2.000  4.000  5.000  7.000
 ---- K:6 Z:   6
 ---- J:3 Y:   3
1   / 1:  1367.  1.000  3.000  6.000  7.000
2   / 2:  2367.  2.000  3.000  6.000  7.000
 ---- J:4 Y:   4
1   / 1:  1467.  1.000  4.000  6.000  7.000
2   / 2:  2467.  2.000  4.000  6.000  7.000
LIST/ORDER=XZY
             X: 0.5 to 2.5
             Z: 4.5 to 6.5
             Y: 2.5 to 4.5
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- J:3 Y:   3
 ---- K:5 Z:   5
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
 ---- K:6 Z:   6
1   / 1:  1367.  1.000  3.000  6.000  7.000
2   / 2:  2367.  2.000  3.000  6.000  7.000
 ---- J:4 Y:   4
 ---- K:5 Z:   5
1   / 1:  1457.  1.000  4.000  5.000  7.000
2   / 2:  2457.  2.000  4.000  5.000  7.000
 ---- K:6 Z:   6
1   / 1:  1467.  1.000  4.000  6.000  7.000
2   / 2:  2467.  2.000  4.000  6.000  7.000
LIST/ORDER=YXZ
             Y: 2.5 to 4.5
             X: 0.5 to 2.5
             Z: 4.5 to 6.5
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- K:5 Z:   5
 ---- I:1 X:   1
3   / 3:  1357.  1.000  3.000  5.000  7.000
4   / 4:  1457.  1.000  4.000  5.000  7.000
 ---- I:2 X:   2
3   / 3:  2357.  2.000  3.000  5.000  7.000
4   / 4:  2457.  2.000  4.000  5.000  7.000
 ---- K:6 Z:   6
 ---- I:1 X:   1
3   / 3:  1367.  1.000  3.000  6.000  7.000
4   / 4:  1467.  1.000  4.000  6.000  7.000
 ---- I:2 X:   2
3   / 3:  2367.  2.000  3.000  6.000  7.000
4   / 4:  2467.  2.000  4.000  6.000  7.000
LIST/ORDER=YZX
             Y: 2.5 to 4.5
             Z: 4.5 to 6.5
             X: 0.5 to 2.5
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- I:1 X:   1
 ---- K:5 Z:   5
3   / 3:  1357.  1.000  3.000  5.000  7.000
4   / 4:  1457.  1.000  4.000  5.000  7.000
 ---- K:6 Z:   6
3   / 3:  1367.  1.000  3.000  6.000  7.000
4   / 4:  1467.  1.000  4.000  6.000  7.000
 ---- I:2 X:   2
 ---- K:5 Z:   5
3   / 3:  2357.  2.000  3.000  5.000  7.000
4   / 4:  2457.  2.000  4.000  5.000  7.000
 ---- K:6 Z:   6
3   / 3:  2367.  2.000  3.000  6.000  7.000
4   / 4:  2467.  2.000  4.000  6.000  7.000
LIST/ORDER=ZXY
             Z: 4.5 to 6.5
             X: 0.5 to 2.5
             Y: 2.5 to 4.5
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- J:3 Y:   3
 ---- I:1 X:   1
5   / 5:  1357.  1.000  3.000  5.000  7.000
6   / 6:  1367.  1.000  3.000  6.000  7.000
 ---- I:2 X:   2
5   / 5:  2357.  2.000  3.000  5.000  7.000
6   / 6:  2367.  2.000  3.000  6.000  7.000
 ---- J:4 Y:   4
 ---- I:1 X:   1
5   / 5:  1457.  1.000  4.000  5.000  7.000
6   / 6:  1467.  1.000  4.000  6.000  7.000
 ---- I:2 X:   2
5   / 5:  2457.  2.000  4.000  5.000  7.000
6   / 6:  2467.  2.000  4.000  6.000  7.000
LIST/ORDER=ZYX
             Z: 4.5 to 6.5
             Y: 2.5 to 4.5
             X: 0.5 to 2.5
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- I:1 X:   1
 ---- J:3 Y:   3
5   / 5:  1357.  1.000  3.000  5.000  7.000
6   / 6:  1367.  1.000  3.000  6.000  7.000
 ---- J:4 Y:   4
5   / 5:  1457.  1.000  4.000  5.000  7.000
6   / 6:  1467.  1.000  4.000  6.000  7.000
 ---- I:2 X:   2
 ---- J:3 Y:   3
5   / 5:  2357.  2.000  3.000  5.000  7.000
6   / 6:  2367.  2.000  3.000  6.000  7.000
 ---- J:4 Y:   4
5   / 5:  2457.  2.000  4.000  5.000  7.000
6   / 6:  2467.  2.000  4.000  6.000  7.000
 
! ------ 2D regions
SET REGION/I=1/J=3/K=5:6/L=7:8
LIST/ORDER=ZT
             Z: 4.5 to 6.5
             T: 6.5 to 8.5
             X: 1
             Y: 3
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- L:7 T:   7
5   / 5:  1357.  1.000  3.000  5.000  7.000
6   / 6:  1367.  1.000  3.000  6.000  7.000
 ---- L:8 T:   8
5   / 5:  1358.  1.000  3.000  5.000  8.000
6   / 6:  1368.  1.000  3.000  6.000  8.000
LIST/ORDER=TZ
             T: 6.5 to 8.5
             Z: 4.5 to 6.5
             X: 1
             Y: 3
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- K:5 Z:   5
7   / 7:  1357.  1.000  3.000  5.000  7.000
8   / 8:  1358.  1.000  3.000  5.000  8.000
 ---- K:6 Z:   6
7   / 7:  1367.  1.000  3.000  6.000  7.000
8   / 8:  1368.  1.000  3.000  6.000  8.000
 
SET REGION/I=1/J=3:4/K=5/L=7:8
LIST/ORDER=YT
             Y: 2.5 to 4.5
             T: 6.5 to 8.5
             X: 1
             Z: 5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- L:7 T:   7
3   / 3:  1357.  1.000  3.000  5.000  7.000
4   / 4:  1457.  1.000  4.000  5.000  7.000
 ---- L:8 T:   8
3   / 3:  1358.  1.000  3.000  5.000  8.000
4   / 4:  1458.  1.000  4.000  5.000  8.000
LIST/ORDER=TY
             T: 6.5 to 8.5
             Y: 2.5 to 4.5
             X: 1
             Z: 5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- J:3 Y:   3
7   / 7:  1357.  1.000  3.000  5.000  7.000
8   / 8:  1358.  1.000  3.000  5.000  8.000
 ---- J:4 Y:   4
7   / 7:  1457.  1.000  4.000  5.000  7.000
8   / 8:  1458.  1.000  4.000  5.000  8.000
 
SET REGION/I=1/J=3:4/K=5:6/L=7
LIST/ORDER=YZ
             Y: 2.5 to 4.5
             Z: 4.5 to 6.5
             X: 1
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- K:5 Z:   5
3   / 3:  1357.  1.000  3.000  5.000  7.000
4   / 4:  1457.  1.000  4.000  5.000  7.000
 ---- K:6 Z:   6
3   / 3:  1367.  1.000  3.000  6.000  7.000
4   / 4:  1467.  1.000  4.000  6.000  7.000
LIST/ORDER=ZY
             Z: 4.5 to 6.5
             Y: 2.5 to 4.5
             X: 1
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- J:3 Y:   3
5   / 5:  1357.  1.000  3.000  5.000  7.000
6   / 6:  1367.  1.000  3.000  6.000  7.000
 ---- J:4 Y:   4
5   / 5:  1457.  1.000  4.000  5.000  7.000
6   / 6:  1467.  1.000  4.000  6.000  7.000
 
SET REGION/I=1:2/J=3/K=5/L=7:8
LIST/ORDER=XT
             X: 0.5 to 2.5
             T: 6.5 to 8.5
             Y: 3
             Z: 5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- L:7 T:   7
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
 ---- L:8 T:   8
1   / 1:  1358.  1.000  3.000  5.000  8.000
2   / 2:  2358.  2.000  3.000  5.000  8.000
LIST/ORDER=TX
             T: 6.5 to 8.5
             X: 0.5 to 2.5
             Y: 3
             Z: 5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- I:1 X:   1
7   / 7:  1357.  1.000  3.000  5.000  7.000
8   / 8:  1358.  1.000  3.000  5.000  8.000
 ---- I:2 X:   2
7   / 7:  2357.  2.000  3.000  5.000  7.000
8   / 8:  2358.  2.000  3.000  5.000  8.000
 
SET REGION/I=1:2/J=3/K=5:6/L=7
LIST/ORDER=XZ
             X: 0.5 to 2.5
             Z: 4.5 to 6.5
             Y: 3
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- K:5 Z:   5
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
 ---- K:6 Z:   6
1   / 1:  1367.  1.000  3.000  6.000  7.000
2   / 2:  2367.  2.000  3.000  6.000  7.000
LIST/ORDER=ZX
             Z: 4.5 to 6.5
             X: 0.5 to 2.5
             Y: 3
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- I:1 X:   1
5   / 5:  1357.  1.000  3.000  5.000  7.000
6   / 6:  1367.  1.000  3.000  6.000  7.000
 ---- I:2 X:   2
5   / 5:  2357.  2.000  3.000  5.000  7.000
6   / 6:  2367.  2.000  3.000  6.000  7.000
 
SET REGION/I=1:2/J=3:4/K=5/L=7
LIST/ORDER=XY
             X: 0.5 to 2.5
             Y: 2.5 to 4.5
             Z: 5
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- J:3 Y:   3
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
 ---- J:4 Y:   4
1   / 1:  1457.  1.000  4.000  5.000  7.000
2   / 2:  2457.  2.000  4.000  5.000  7.000
LIST/ORDER=YX
             Y: 2.5 to 4.5
             X: 0.5 to 2.5
             Z: 5
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- I:1 X:   1
3   / 3:  1357.  1.000  3.000  5.000  7.000
4   / 4:  1457.  1.000  4.000  5.000  7.000
 ---- I:2 X:   2
3   / 3:  2357.  2.000  3.000  5.000  7.000
4   / 4:  2457.  2.000  4.000  5.000  7.000
 
! ------ 1D regions
LIST/I=1:2/J=3/K=5/L=7
             X: 0.5 to 2.5
             Y: 3
             Z: 5
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
LIST/I=1/J=3:4/K=5/L=7
             Y: 2.5 to 4.5
             X: 1
             Z: 5
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
3   / 3:  1357.  1.000  3.000  5.000  7.000
4   / 4:  1457.  1.000  4.000  5.000  7.000
LIST/I=1/J=3/K=5:6/L=7
             Z: 4.5 to 6.5
             X: 1
             Y: 3
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
5   / 5:  1357.  1.000  3.000  5.000  7.000
6   / 6:  1367.  1.000  3.000  6.000  7.000
LIST/I=1/J=3/K=5/L=7:8
             T: 6.5 to 8.5
             X: 1
             Y: 3
             Z: 5
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
7   / 7:  1357.  1.000  3.000  5.000  7.000
8   / 8:  1358.  1.000  3.000  5.000  8.000
 
! ------------------------------------------
! test other output mechanisms
SET REGION/I=1:2/J=3:4/K=5:6/L=7
LIST/NOHEAD
 ---- K:5 Z:   5
 ---- J:3 Y:   3
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
 ---- J:4 Y:   4
1   / 1:  1457.  1.000  4.000  5.000  7.000
2   / 2:  2457.  2.000  4.000  5.000  7.000
 ---- K:6 Z:   6
 ---- J:3 Y:   3
1   / 1:  1367.  1.000  3.000  6.000  7.000
2   / 2:  2367.  2.000  3.000  6.000  7.000
 ---- J:4 Y:   4
1   / 1:  1467.  1.000  4.000  6.000  7.000
2   / 2:  2467.  2.000  4.000  6.000  7.000
SET LIST/PRECISION=6
LIST
             X: 0.5 to 2.5
             Y: 2.5 to 4.5
             Z: 4.5 to 6.5
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
               V      I        J        K        L
 ---- K:5 Z:   5
 ---- J:3 Y:   3
1   / 1:  1357.00  1.00000  3.00000  5.00000  7.00000
2   / 2:  2357.00  2.00000  3.00000  5.00000  7.00000
 ---- J:4 Y:   4
1   / 1:  1457.00  1.00000  4.00000  5.00000  7.00000
2   / 2:  2457.00  2.00000  4.00000  5.00000  7.00000
 ---- K:6 Z:   6
 ---- J:3 Y:   3
1   / 1:  1367.00  1.00000  3.00000  6.00000  7.00000
2   / 2:  2367.00  2.00000  3.00000  6.00000  7.00000
 ---- J:4 Y:   4
1   / 1:  1467.00  1.00000  4.00000  6.00000  7.00000
2   / 2:  2467.00  2.00000  4.00000  6.00000  7.00000
SHOW LIST
        SET LIST/PRECISION =   6
        SET LIST/FORMAT = [Default]
        SET LIST/HEADING is ENABLED
        SET LIST/APPEND is DISABLED
        SET LIST/FILE=AUTO [created by program] ( when LIST/FILE is used )
        SET LIST/OUTTYPE = [Default]
           ----
        NetCDF-4 settings:
        NetCDF file type = classic
        NetCDF chunk sizes = default
        SHUFFLE set to on
        ENDIAN set to native
CANCEL LIST/PRECISION
LIST
             X: 0.5 to 2.5
             Y: 2.5 to 4.5
             Z: 4.5 to 6.5
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- K:5 Z:   5
 ---- J:3 Y:   3
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
 ---- J:4 Y:   4
1   / 1:  1457.  1.000  4.000  5.000  7.000
2   / 2:  2457.  2.000  4.000  5.000  7.000
 ---- K:6 Z:   6
 ---- J:3 Y:   3
1   / 1:  1367.  1.000  3.000  6.000  7.000
2   / 2:  2367.  2.000  3.000  6.000  7.000
 ---- J:4 Y:   4
1   / 1:  1467.  1.000  4.000  6.000  7.000
2   / 2:  2467.  2.000  4.000  6.000  7.000
SET LIST/FORMAT=(1X,5F14.7)
LIST/FORMAT
             X: 0.5 to 2.5
             Y: 2.5 to 4.5
             Z: 4.5 to 6.5
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
   1357.0000000     1.0000000     3.0000000     5.0000000     7.0000000
   2357.0000000     2.0000000     3.0000000     5.0000000     7.0000000
   1457.0000000     1.0000000     4.0000000     5.0000000     7.0000000
   2457.0000000     2.0000000     4.0000000     5.0000000     7.0000000
   1367.0000000     1.0000000     3.0000000     6.0000000     7.0000000
   2367.0000000     2.0000000     3.0000000     6.0000000     7.0000000
   1467.0000000     1.0000000     4.0000000     6.0000000     7.0000000
   2467.0000000     2.0000000     4.0000000     6.0000000     7.0000000
LIST/FORMAT=(1X,10F6.1)
             X: 0.5 to 2.5
             Y: 2.5 to 4.5
             Z: 4.5 to 6.5
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
 1357.0   1.0   3.0   5.0   7.0
 2357.0   2.0   3.0   5.0   7.0
 1457.0   1.0   4.0   5.0   7.0
 2457.0   2.0   4.0   5.0   7.0
 1367.0   1.0   3.0   6.0   7.0
 2367.0   2.0   3.0   6.0   7.0
 1467.0   1.0   4.0   6.0   7.0
 2467.0   2.0   4.0   6.0   7.0
CANCEL LIST/FORMAT
LIST
             X: 0.5 to 2.5
             Y: 2.5 to 4.5
             Z: 4.5 to 6.5
             T: 7
 Column  1: V is 1000*I + 100*J + 10*K + L
 Column  2: I is I (axis ABSTRACT)
 Column  3: J is J (axis ABSTRACT)
 Column  4: K is K (axis ABSTRACT)
 Column  5: L is L (axis ABSTRACT)
             V     I      J      K      L
 ---- K:5 Z:   5
 ---- J:3 Y:   3
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
 ---- J:4 Y:   4
1   / 1:  1457.  1.000  4.000  5.000  7.000
2   / 2:  2457.  2.000  4.000  5.000  7.000
 ---- K:6 Z:   6
 ---- J:3 Y:   3
1   / 1:  1367.  1.000  3.000  6.000  7.000
2   / 2:  2367.  2.000  3.000  6.000  7.000
 ---- J:4 Y:   4
1   / 1:  1467.  1.000  4.000  6.000  7.000
2   / 2:  2467.  2.000  4.000  6.000  7.000
CANCEL LIST/HEAD
LIST
 ---- K:5 Z:   5
 ---- J:3 Y:   3
1   / 1:  1357.  1.000  3.000  5.000  7.000
2   / 2:  2357.  2.000  3.000  5.000  7.000
 ---- J:4 Y:   4
1   / 1:  1457.  1.000  4.000  5.000  7.000
2   / 2:  2457.  2.000  4.000  5.000  7.000
 ---- K:6 Z:   6
 ---- J:3 Y:   3
1   / 1:  1367.  1.000  3.000  6.000  7.000
2   / 2:  2367.  2.000  3.000  6.000  7.000
 ---- J:4 Y:   4
1   / 1:  1467.  1.000  4.000  6.000  7.000
2   / 2:  2467.  2.000  4.000  6.000  7.000
CANCEL LIST/ALL
SET LIST/FILE=AUTO-X
LIST/CLOBBER/FILE
LIST/CLOBBER/FILE=test.dat
LIST/FILE=test.dat/APPEND
LIST/CLOBBER/FILE=test.unf/FORMAT=UNFORMATTED
! V6.8 we no longer write this file type
SET MODE IGNORE
LIST/FILE=test.gt/FORMAT=TMAP/L=1:3 v,v^0.5
SET MODE/LAST IGNORE
CANCEL LIST
 
*** Running ferret script: bn_in_plane.jnl
! bn200_in_plane.JNL
! benchmark various geometries with in-plane transformation applied (@SBX)
! this benchmark is layered on the compress benchmark to obtain the geometries
! similar tests are performed on:
!	abstract variable
!	file variable
 
! ******** abstract variable ************
! (this case can be checked against the bn200_in_plane.sub in the same region)
! (results should be identical since v is linear along all axes)
LET v = i + 10*j + 100*k + 1000*l
SET REGION/I=2:4/J=2:4/K=2:4/L=2:4
GO bn_in_plane.sub
! BN200_COMPRESS.SUB_V
! list the variable v averaged on various geometries
 
! this routine assumes that a 4-D region and an expression are already set
 
! full data region
LIST v[x=@sbx,y=@sbx,z=@sbx,t=@sbx]
             VARIABLE : I + 10*J + 100*K + 1000*L
                        box smoothed by 3 pts on X - box smoothed by 3 pts on Y - box smoothed by 3 pts on Z - box smoothed by 3 pts on T
             SUBSET   : 3 by 3 by 3 by 3 points (X-Y-Z-T)
             2      3      4    
             2      3      4
 ---- L:2 T:   2
 ---- K:2 Z:   2
 2   / 2:  2222.  2223.  2224.
 3   / 3:  2232.  2233.  2234.
 4   / 4:  2242.  2243.  2244.
 ---- K:3 Z:   3
 2   / 2:  2322.  2323.  2324.
 3   / 3:  2332.  2333.  2334.
 4   / 4:  2342.  2343.  2344.
 ---- K:4 Z:   4
 2   / 2:  2422.  2423.  2424.
 3   / 3:  2432.  2433.  2434.
 4   / 4:  2442.  2443.  2444.
 ---- L:3 T:   3
 ---- K:2 Z:   2
 2   / 2:  3222.  3223.  3224.
 3   / 3:  3232.  3233.  3234.
 4   / 4:  3242.  3243.  3244.
 ---- K:3 Z:   3
 2   / 2:  3322.  3323.  3324.
 3   / 3:  3332.  3333.  3334.
 4   / 4:  3342.  3343.  3344.
 ---- K:4 Z:   4
 2   / 2:  3422.  3423.  3424.
 3   / 3:  3432.  3433.  3434.
 4   / 4:  3442.  3443.  3444.
 ---- L:4 T:   4
 ---- K:2 Z:   2
 2   / 2:  4222.  4223.  4224.
 3   / 3:  4232.  4233.  4234.
 4   / 4:  4242.  4243.  4244.
 ---- K:3 Z:   3
 2   / 2:  4322.  4323.  4324.
 3   / 3:  4332.  4333.  4334.
 4   / 4:  4342.  4343.  4344.
 ---- K:4 Z:   4
 2   / 2:  4422.  4423.  4424.
 3   / 3:  4432.  4433.  4434.
 4   / 4:  4442.  4443.  4444.
 
! cubes of data
LIST v[x=@sbx,y=@sbx,z=@sbx,l=@ave]
             VARIABLE : I + 10*J + 100*K + 1000*L
                        box smoothed by 3 pts on X - box smoothed by 3 pts on Y - box smoothed by 3 pts on Z
             SUBSET   : 3 by 3 by 3 points (X-Y-Z)
             T        : 1.5 to 4.5 (averaged)
             2      3      4    
             2      3      4
 ---- K:2 Z:   2
 2   / 2:  3222.  3223.  3224.
 3   / 3:  3232.  3233.  3234.
 4   / 4:  3242.  3243.  3244.
 ---- K:3 Z:   3
 2   / 2:  3322.  3323.  3324.
 3   / 3:  3332.  3333.  3334.
 4   / 4:  3342.  3343.  3344.
 ---- K:4 Z:   4
 2   / 2:  3422.  3423.  3424.
 3   / 3:  3432.  3433.  3434.
 4   / 4:  3442.  3443.  3444.
LIST v[x=@sbx,y=@sbx,t=@sbx,k=@ave]
             VARIABLE : I + 10*J + 100*K + 1000*L
                        box smoothed by 3 pts on X - box smoothed by 3 pts on Y - box smoothed by 3 pts on T
             SUBSET   : 3 by 3 by 3 points (X-Y-T)
             Z        : 1.5 to 4.5 (averaged)
             2      3      4    
             2      3      4
 ---- L:2 T:   2
 2   / 2:  2322.  2323.  2324.
 3   / 3:  2332.  2333.  2334.
 4   / 4:  2342.  2343.  2344.
 ---- L:3 T:   3
 2   / 2:  3322.  3323.  3324.
 3   / 3:  3332.  3333.  3334.
 4   / 4:  3342.  3343.  3344.
 ---- L:4 T:   4
 2   / 2:  4322.  4323.  4324.
 3   / 3:  4332.  4333.  4334.
 4   / 4:  4342.  4343.  4344.
LIST v[x=@sbx,z=@sbx,t=@sbx,j=@ave]
             VARIABLE : I + 10*J + 100*K + 1000*L
                        box smoothed by 3 pts on X - box smoothed by 3 pts on Z - box smoothed by 3 pts on T
             SUBSET   : 3 by 3 by 3 points (X-Z-T)
             Y        : 1.5 to 4.5 (averaged)
             2      3      4    
             2      3      4
 ---- L:2 T:   2
 2   / 2:  2232.  2233.  2234.
 3   / 3:  2332.  2333.  2334.
 4   / 4:  2432.  2433.  2434.
 ---- L:3 T:   3
 2   / 2:  3232.  3233.  3234.
 3   / 3:  3332.  3333.  3334.
 4   / 4:  3432.  3433.  3434.
 ---- L:4 T:   4
 2   / 2:  4232.  4233.  4234.
 3   / 3:  4332.  4333.  4334.
 4   / 4:  4432.  4433.  4434.
LIST v[y=@sbx,z=@sbx,t=@sbx,i=@ave]
             VARIABLE : I + 10*J + 100*K + 1000*L
                        box smoothed by 3 pts on Y - box smoothed by 3 pts on Z - box smoothed by 3 pts on T
             SUBSET   : 3 by 3 by 3 points (Y-Z-T)
             X        : 1.5 to 4.5 (averaged)
             2      3      4    
             2      3      4
 ---- L:2 T:   2
 2   / 2:  2223.  2233.  2243.
 3   / 3:  2323.  2333.  2343.
 4   / 4:  2423.  2433.  2443.
 ---- L:3 T:   3
 2   / 2:  3223.  3233.  3243.
 3   / 3:  3323.  3333.  3343.
 4   / 4:  3423.  3433.  3443.
 ---- L:4 T:   4
 2   / 2:  4223.  4233.  4243.
 3   / 3:  4323.  4333.  4343.
 4   / 4:  4423.  4433.  4443.
 
! planes of data
LIST v[x=@sbx,y=@sbx,k=@ave,l=@ave]	!XY
             VARIABLE : I + 10*J + 100*K + 1000*L
                        box smoothed by 3 pts on X - box smoothed by 3 pts on Y
             SUBSET   : 3 by 3 points (X-Y)
             Z        : 1.5 to 4.5 (ZT ave)
             T        : 1.5 to 4.5 (ZT ave)
             2      3      4    
             2      3      4
 2   / 2:  3322.  3323.  3324.
 3   / 3:  3332.  3333.  3334.
 4   / 4:  3342.  3343.  3344.
LIST v[x=@sbx,z=@sbx,j=@ave,l=@ave]	!XZ
             VARIABLE : I + 10*J + 100*K + 1000*L
                        box smoothed by 3 pts on X - box smoothed by 3 pts on Z
             SUBSET   : 3 by 3 points (X-Z)
             Y        : 1.5 to 4.5 (YT ave)
             T        : 1.5 to 4.5 (YT ave)
             2      3      4    
             2      3      4
 2   / 2:  3232.  3233.  3234.
 3   / 3:  3332.  3333.  3334.
 4   / 4:  3432.  3433.  3434.
LIST v[x=@sbx,t=@sbx,j=@ave,k=@ave]	!XT
             VARIABLE : I + 10*J + 100*K + 1000*L
                        box smoothed by 3 pts on X - box smoothed by 3 pts on T
             SUBSET   : 3 by 3 points (X-T)
             Y        : 1.5 to 4.5 (YZ ave)
             Z        : 1.5 to 4.5 (YZ ave)
             2      3      4    
             2      3      4
 2   / 2:  2332.  2333.  2334.
 3   / 3:  3332.  3333.  3334.
 4   / 4:  4332.  4333.  4334.
LIST v[y=@sbx,z=@sbx,i=@ave,l=@ave]	!YZ
             VARIABLE : I + 10*J + 100*K + 1000*L
                        box smoothed by 3 pts on Y - box smoothed by 3 pts on Z
             SUBSET   : 3 by 3 points (Y-Z)
             X        : 1.5 to 4.5 (XT ave)
             T        : 1.5 to 4.5 (XT ave)
             2      3      4    
             2      3      4
 2   / 2:  3223.  3233.  3243.
 3   / 3:  3323.  3333.  3343.
 4   / 4:  3423.  3433.  3443.
LIST v[y=@sbx,t=@sbx,i=@ave,k=@ave]	!YT
             VARIABLE : I + 10*J + 100*K + 1000*L
                        box smoothed by 3 pts on Y - box smoothed by 3 pts on T
             SUBSET   : 3 by 3 points (Y-T)
             X        : 1.5 to 4.5 (XZ ave)
             Z        : 1.5 to 4.5 (XZ ave)
             2      3      4    
             2      3      4
 2   / 2:  2323.  2333.  2343.
 3   / 3:  3323.  3333.  3343.
 4   / 4:  4323.  4333.  4343.
LIST v[z=@sbx,t=@sbx,i=@ave,j=@ave]	!ZT
             VARIABLE : I + 10*J + 100*K + 1000*L
                        box smoothed by 3 pts on Z - box smoothed by 3 pts on T
             SUBSET   : 3 by 3 points (Z-T)
             X        : 1.5 to 4.5 (XY ave)
             Y        : 1.5 to 4.5 (XY ave)
             2      3      4    
             2      3      4
 2   / 2:  2233.  2333.  2433.
 3   / 3:  3233.  3333.  3433.
 4   / 4:  4233.  4333.  4433.
 
! lines of data
LIST/ORDER=X v[x=@sbx,j=@ave,k=@ave,l=@ave]
             VARIABLE : I + 10*J + 100*K + 1000*L
                        box smoothed by 3 pts on X
             SUBSET   : 3 points (X)
             Y        : 1.5 to 4.5 (YZT ave)
             Z        : 1.5 to 4.5 (YZT ave)
             T        : 1.5 to 4.5 (YZT ave)
            2      3      4    
            2      3      4
          3332.  3333.  3334.
LIST/ORDER=Y v[y=@sbx,i=@ave,k=@ave,l=@ave]
             VARIABLE : I + 10*J + 100*K + 1000*L
                        box smoothed by 3 pts on Y
             SUBSET   : 3 points (Y)
             X        : 1.5 to 4.5 (XZT ave)
             Z        : 1.5 to 4.5 (XZT ave)
             T        : 1.5 to 4.5 (XZT ave)
            2      3      4    
            2      3      4
          3323.  3333.  3343.
LIST/ORDER=Z v[z=@sbx,i=@ave,j=@ave,l=@ave]
             VARIABLE : I + 10*J + 100*K + 1000*L
                        box smoothed by 3 pts on Z
             SUBSET   : 3 points (Z)
             X        : 1.5 to 4.5 (XYT ave)
             Y        : 1.5 to 4.5 (XYT ave)
             T        : 1.5 to 4.5 (XYT ave)
            2      3      4    
            2      3      4
          3233.  3333.  3433.
LIST/ORDER=T v[t=@sbx,i=@ave,j=@ave,k=@ave]
             VARIABLE : I + 10*J + 100*K + 1000*L
                        box smoothed by 3 pts on T
             SUBSET   : 3 points (T)
             X        : 1.5 to 4.5 (XYZ ave)
             Y        : 1.5 to 4.5 (XYZ ave)
             Z        : 1.5 to 4.5 (XYZ ave)
            2      3      4    
            2      3      4
          2333.  3333.  4333.
 
! ******** file variable ************
CANCEL VARIABLE V
USE gt4d011
SET REGION/I=101:103/J=46:48/K=2:4/L=2:4
SET EXPRESSION v
GO bn_in_plane.sub
! BN200_COMPRESS.SUB_V
! list the variable v averaged on various geometries
 
! this routine assumes that a 4-D region and an expression are already set
 
! full data region
LIST v[x=@sbx,y=@sbx,z=@sbx,t=@sbx]
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
                        box smoothed by 3 pts on X - box smoothed by 3 pts on Y - box smoothed by 3 pts on Z - box smoothed by 3 pts on T
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 by 3 by 3 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              129W   128W   127W   
              101    102    103
 ---- L:2 T:   23-AUG-1982 14:00
 ---- K:2 Z:   15
 1N    / 48:  2.849  4.058  5.125
 0.67N / 47:  1.415  2.665  3.817
 0.33N / 46: -0.848  0.534  1.821
 ---- K:3 Z:   25
 1N    / 48: -2.896 -1.523 -0.356
 0.67N / 47: -4.228 -2.855 -1.590
 0.33N / 46: -5.712 -4.222 -2.782
 ---- K:4 Z:   35
 1N    / 48: -6.759 -5.268 -4.029
 0.67N / 47: -7.824 -6.405 -5.032
 0.33N / 46: -8.195 -6.626 -5.019
 ---- L:3 T:   29-AUG-1982 16:00
 ---- K:2 Z:   15
 1N    / 48:  2.921  4.900  6.164
 0.67N / 47:  1.949  4.139  5.405
 0.33N / 46:  0.232  2.556  3.808
 ---- K:3 Z:   25
 1N    / 48: -2.893 -0.649  0.564
 0.67N / 47: -3.906 -1.567 -0.284
 0.33N / 46: -5.003 -2.591 -1.204
 ---- K:4 Z:   35
 1N    / 48: -6.685 -4.117 -2.890
 0.67N / 47: -7.574 -5.111 -3.733
 0.33N / 46: -7.680 -5.189 -3.608
 ---- L:4 T:   04-SEP-1982 18:00
 ---- K:2 Z:   15
 1N    / 48:  3.252  5.404  6.662
 0.67N / 47:  2.651  5.141  6.269
 0.33N / 46:  1.418  4.032  4.953
 ---- K:3 Z:   25
 1N    / 48: -2.821 -0.259  0.807
 0.67N / 47: -3.539 -0.836  0.184
 0.33N / 46: -4.302 -1.591 -0.594
 ---- K:4 Z:   35
 1N    / 48: -6.758 -3.638 -2.600
 0.67N / 47: -7.392 -4.438 -3.362
 0.33N / 46: -7.280 -4.436 -3.244
 
! cubes of data
LIST v[x=@sbx,y=@sbx,z=@sbx,l=@ave]
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
                        box smoothed by 3 pts on X - box smoothed by 3 pts on Y - box smoothed by 3 pts on Z
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 by 3 points (LONGITUDE-LATITUDE-DEPTH (m))
             TIME     : 20-AUG-1982 13:00 to 07-SEP-1982 19:00 (averaged)
              129W   128W   127W   
              101    102    103
 ---- K:2 Z:   15
 1N    / 48:  2.921  4.900  6.164
 0.67N / 47:  1.949  4.139  5.405
 0.33N / 46:  0.232  2.556  3.808
 ---- K:3 Z:   25
 1N    / 48: -2.893 -0.649  0.564
 0.67N / 47: -3.906 -1.567 -0.284
 0.33N / 46: -5.003 -2.591 -1.204
 ---- K:4 Z:   35
 1N    / 48: -6.685 -4.117 -2.890
 0.67N / 47: -7.574 -5.111 -3.733
 0.33N / 46: -7.680 -5.189 -3.608
LIST v[x=@sbx,y=@sbx,t=@sbx,k=@ave]
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
                        box smoothed by 3 pts on X - box smoothed by 3 pts on Y - box smoothed by 3 pts on T
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 by 3 points (LONGITUDE-LATITUDE-TIME)
             DEPTH (m): 10 to 40 (averaged)
              129W   128W   127W   
              101    102    103
 ---- L:2 T:   23-AUG-1982 14:00
 1N    / 48: -2.896 -1.523 -0.356
 0.67N / 47: -4.228 -2.855 -1.590
 0.33N / 46: -5.712 -4.222 -2.782
 ---- L:3 T:   29-AUG-1982 16:00
 1N    / 48: -2.893 -0.649  0.564
 0.67N / 47: -3.906 -1.567 -0.284
 0.33N / 46: -5.003 -2.591 -1.204
 ---- L:4 T:   04-SEP-1982 18:00
 1N    / 48: -2.821 -0.259  0.807
 0.67N / 47: -3.539 -0.836  0.184
 0.33N / 46: -4.302 -1.591 -0.594
LIST v[x=@sbx,z=@sbx,t=@sbx,j=@ave]
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
                        box smoothed by 3 pts on X - box smoothed by 3 pts on Z - box smoothed by 3 pts on T
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 by 3 points (LONGITUDE-DEPTH (m)-TIME)
             LATITUDE : 0.167N to 1.167N (averaged)
             129W   128W   127W   
             101    102    103
 ---- L:2 T:   23-AUG-1982 14:00
 15    / 2:  1.415  2.665  3.817
 25    / 3: -4.228 -2.855 -1.590
 35    / 4: -7.824 -6.405 -5.032
 ---- L:3 T:   29-AUG-1982 16:00
 15    / 2:  1.949  4.139  5.405
 25    / 3: -3.906 -1.567 -0.284
 35    / 4: -7.574 -5.111 -3.733
 ---- L:4 T:   04-SEP-1982 18:00
 15    / 2:  2.651  5.141  6.269
 25    / 3: -3.539 -0.836  0.184
 35    / 4: -7.392 -4.438 -3.362
LIST v[y=@sbx,z=@sbx,t=@sbx,i=@ave]
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
                        box smoothed by 3 pts on Y - box smoothed by 3 pts on Z - box smoothed by 3 pts on T
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 by 3 points (LATITUDE-DEPTH (m)-TIME)
             LONGITUDE: 129.5W to 126.5W (averaged)
              0.33N  0.67N  1N    
              46     47     48
 ---- L:2 T:   23-AUG-1982 14:00
 15    / 2:  0.534  2.665  4.058
 25    / 3: -4.222 -2.855 -1.523
 35    / 4: -6.626 -6.405 -5.268
 ---- L:3 T:   29-AUG-1982 16:00
 15    / 2:  2.556  4.139  4.900
 25    / 3: -2.591 -1.567 -0.649
 35    / 4: -5.189 -5.111 -4.117
 ---- L:4 T:   04-SEP-1982 18:00
 15    / 2:  4.032  5.141  5.404
 25    / 3: -1.591 -0.836 -0.259
 35    / 4: -4.436 -4.438 -3.638
 
! planes of data
LIST v[x=@sbx,y=@sbx,k=@ave,l=@ave]	!XY
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
                        box smoothed by 3 pts on X - box smoothed by 3 pts on Y
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 points (LONGITUDE-LATITUDE)
             DEPTH (m): 10 to 40 (ZT ave)
             TIME     : 20-AUG-1982 13:00 to 07-SEP-1982 19:00 (ZT ave)
              129W   128W   127W   
              101    102    103
 1N    / 48: -2.893 -0.649  0.564
 0.67N / 47: -3.906 -1.567 -0.284
 0.33N / 46: -5.003 -2.591 -1.204
LIST v[x=@sbx,z=@sbx,j=@ave,l=@ave]	!XZ
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
                        box smoothed by 3 pts on X - box smoothed by 3 pts on Z
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 points (LONGITUDE-DEPTH (m))
             LATITUDE : 0.167N to 1.167N (YT ave)
             TIME     : 20-AUG-1982 13:00 to 07-SEP-1982 19:00 (YT ave)
             129W   128W   127W   
             101    102    103
 15    / 2:  1.949  4.139  5.405
 25    / 3: -3.906 -1.567 -0.284
 35    / 4: -7.574 -5.111 -3.733
LIST v[x=@sbx,t=@sbx,j=@ave,k=@ave]	!XT
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
                        box smoothed by 3 pts on X - box smoothed by 3 pts on T
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 points (LONGITUDE-TIME)
             LATITUDE : 0.167N to 1.167N (YZ ave)
             DEPTH (m): 10 to 40 (YZ ave)
                      129W   128W   127W   
                      101    102    103
 23-AUG-1982 14 / 2: -4.228 -2.855 -1.590
 29-AUG-1982 16 / 3: -3.906 -1.567 -0.284
 04-SEP-1982 18 / 4: -3.539 -0.836  0.184
LIST v[y=@sbx,z=@sbx,i=@ave,l=@ave]	!YZ
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
                        box smoothed by 3 pts on Y - box smoothed by 3 pts on Z
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 points (LATITUDE-DEPTH (m))
             LONGITUDE: 129.5W to 126.5W (XT ave)
             TIME     : 20-AUG-1982 13:00 to 07-SEP-1982 19:00 (XT ave)
              0.33N  0.67N  1N    
              46     47     48
 15    / 2:  2.556  4.139  4.900
 25    / 3: -2.591 -1.567 -0.649
 35    / 4: -5.189 -5.111 -4.117
LIST v[y=@sbx,t=@sbx,i=@ave,k=@ave]	!YT
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
                        box smoothed by 3 pts on Y - box smoothed by 3 pts on T
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 points (LATITUDE-TIME)
             LONGITUDE: 129.5W to 126.5W (XZ ave)
             DEPTH (m): 10 to 40 (XZ ave)
                       0.33N  0.67N  1N    
                       46     47     48
 23-AUG-1982 14 / 2: -4.222 -2.855 -1.523
 29-AUG-1982 16 / 3: -2.591 -1.567 -0.649
 04-SEP-1982 18 / 4: -1.591 -0.836 -0.259
LIST v[z=@sbx,t=@sbx,i=@ave,j=@ave]	!ZT
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
                        box smoothed by 3 pts on Z - box smoothed by 3 pts on T
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 points (DEPTH (m)-TIME)
             LONGITUDE: 129.5W to 126.5W (XY ave)
             LATITUDE : 0.167N to 1.167N (XY ave)
                       15     25     35    
                        2      3      4
 23-AUG-1982 14 / 2:  2.665 -2.855 -6.405
 29-AUG-1982 16 / 3:  4.139 -1.567 -5.111
 04-SEP-1982 18 / 4:  5.141 -0.836 -4.438
 
! lines of data
LIST/ORDER=X v[x=@sbx,j=@ave,k=@ave,l=@ave]
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
                        box smoothed by 3 pts on X
             FILENAME : gt4d011.cdf
             SUBSET   : 3 points (LONGITUDE)
             LATITUDE : 0.167N to 1.167N (YZT ave)
             DEPTH (m): 10 to 40 (YZT ave)
             TIME     : 20-AUG-1982 13:00 to 07-SEP-1982 19:00 (YZT ave)
          129W   128W   127W   
          101    102    103
         -3.906 -1.567 -0.284
LIST/ORDER=Y v[y=@sbx,i=@ave,k=@ave,l=@ave]
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
                        box smoothed by 3 pts on Y
             FILENAME : gt4d011.cdf
             SUBSET   : 3 points (LATITUDE)
             LONGITUDE: 129.5W to 126.5W (XZT ave)
             DEPTH (m): 10 to 40 (XZT ave)
             TIME     : 20-AUG-1982 13:00 to 07-SEP-1982 19:00 (XZT ave)
           0.33N  0.67N  1N    
           46     47     48
         -2.591 -1.567 -0.649
LIST/ORDER=Z v[z=@sbx,i=@ave,j=@ave,l=@ave]
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
                        box smoothed by 3 pts on Z
             FILENAME : gt4d011.cdf
             SUBSET   : 3 points (DEPTH (m))
             LONGITUDE: 129.5W to 126.5W (XYT ave)
             LATITUDE : 0.167N to 1.167N (XYT ave)
             TIME     : 20-AUG-1982 13:00 to 07-SEP-1982 19:00 (XYT ave)
           15     25     35    
            2      3      4
          4.139 -1.567 -5.111
LIST/ORDER=T v[t=@sbx,i=@ave,j=@ave,k=@ave]
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
                        box smoothed by 3 pts on T
             FILENAME : gt4d011.cdf
             SUBSET   : 3 points (TIME)
             LONGITUDE: 129.5W to 126.5W (XYZ ave)
             LATITUDE : 0.167N to 1.167N (XYZ ave)
             DEPTH (m): 10 to 40 (XYZ ave)
           1982   1982   1982  
            2      3      4
         -2.855 -1.567 -0.836
*** Running ferret script: bn_compress.jnl
! bn200_compress.JNL
! benchmark various geometries obtained by compressing FERRET data with @AVE
! similar tests are performed on:
!	abstract variable
!	file variable
!	diagnostic variable
 
! ******** abstract variable ************
LET v = i + 10*j + 100*k + 1000*l
SET REGION/I=1:3/J=1:3/K=1:3/L=1:3
GO bn_compress.sub_v
! BN200_COMPRESS.SUB_V
! list the variable v averaged on various geometries
 
! this routine assumes that a 4-D region and an expression are already set
 
! full data region
LIST v
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 3 by 3 by 3 by 3 points (X-Y-Z-T)
             1      2      3    
             1      2      3
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:  1111.  1112.  1113.
 2   / 2:  1121.  1122.  1123.
 3   / 3:  1131.  1132.  1133.
 ---- K:2 Z:   2
 1   / 1:  1211.  1212.  1213.
 2   / 2:  1221.  1222.  1223.
 3   / 3:  1231.  1232.  1233.
 ---- K:3 Z:   3
 1   / 1:  1311.  1312.  1313.
 2   / 2:  1321.  1322.  1323.
 3   / 3:  1331.  1332.  1333.
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:  2111.  2112.  2113.
 2   / 2:  2121.  2122.  2123.
 3   / 3:  2131.  2132.  2133.
 ---- K:2 Z:   2
 1   / 1:  2211.  2212.  2213.
 2   / 2:  2221.  2222.  2223.
 3   / 3:  2231.  2232.  2233.
 ---- K:3 Z:   3
 1   / 1:  2311.  2312.  2313.
 2   / 2:  2321.  2322.  2323.
 3   / 3:  2331.  2332.  2333.
 ---- L:3 T:   3
 ---- K:1 Z:   1
 1   / 1:  3111.  3112.  3113.
 2   / 2:  3121.  3122.  3123.
 3   / 3:  3131.  3132.  3133.
 ---- K:2 Z:   2
 1   / 1:  3211.  3212.  3213.
 2   / 2:  3221.  3222.  3223.
 3   / 3:  3231.  3232.  3233.
 ---- K:3 Z:   3
 1   / 1:  3311.  3312.  3313.
 2   / 2:  3321.  3322.  3323.
 3   / 3:  3331.  3332.  3333.
 
! cubes of data
LIST v[l=@ave]
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 3 by 3 by 3 points (X-Y-Z)
             T        : 0.5 to 3.5 (averaged)
             1      2      3    
             1      2      3
 ---- K:1 Z:   1
 1   / 1:  2111.  2112.  2113.
 2   / 2:  2121.  2122.  2123.
 3   / 3:  2131.  2132.  2133.
 ---- K:2 Z:   2
 1   / 1:  2211.  2212.  2213.
 2   / 2:  2221.  2222.  2223.
 3   / 3:  2231.  2232.  2233.
 ---- K:3 Z:   3
 1   / 1:  2311.  2312.  2313.
 2   / 2:  2321.  2322.  2323.
 3   / 3:  2331.  2332.  2333.
LIST v[k=@ave]
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 3 by 3 by 3 points (X-Y-T)
             Z        : 0.5 to 3.5 (averaged)
             1      2      3    
             1      2      3
 ---- L:1 T:   1
 1   / 1:  1211.  1212.  1213.
 2   / 2:  1221.  1222.  1223.
 3   / 3:  1231.  1232.  1233.
 ---- L:2 T:   2
 1   / 1:  2211.  2212.  2213.
 2   / 2:  2221.  2222.  2223.
 3   / 3:  2231.  2232.  2233.
 ---- L:3 T:   3
 1   / 1:  3211.  3212.  3213.
 2   / 2:  3221.  3222.  3223.
 3   / 3:  3231.  3232.  3233.
LIST v[j=@ave]
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 3 by 3 by 3 points (X-Z-T)
             Y        : 0.5 to 3.5 (averaged)
             1      2      3    
             1      2      3
 ---- L:1 T:   1
 1   / 1:  1121.  1122.  1123.
 2   / 2:  1221.  1222.  1223.
 3   / 3:  1321.  1322.  1323.
 ---- L:2 T:   2
 1   / 1:  2121.  2122.  2123.
 2   / 2:  2221.  2222.  2223.
 3   / 3:  2321.  2322.  2323.
 ---- L:3 T:   3
 1   / 1:  3121.  3122.  3123.
 2   / 2:  3221.  3222.  3223.
 3   / 3:  3321.  3322.  3323.
LIST v[i=@ave]
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 3 by 3 by 3 points (Y-Z-T)
             X        : 0.5 to 3.5 (averaged)
             1      2      3    
             1      2      3
 ---- L:1 T:   1
 1   / 1:  1112.  1122.  1132.
 2   / 2:  1212.  1222.  1232.
 3   / 3:  1312.  1322.  1332.
 ---- L:2 T:   2
 1   / 1:  2112.  2122.  2132.
 2   / 2:  2212.  2222.  2232.
 3   / 3:  2312.  2322.  2332.
 ---- L:3 T:   3
 1   / 1:  3112.  3122.  3132.
 2   / 2:  3212.  3222.  3232.
 3   / 3:  3312.  3322.  3332.
 
! planes of data
LIST v[k=@ave,l=@ave]	!XY
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 3 by 3 points (X-Y)
             Z        : 0.5 to 3.5 (ZT ave)
             T        : 0.5 to 3.5 (ZT ave)
             1      2      3    
             1      2      3
 1   / 1:  2211.  2212.  2213.
 2   / 2:  2221.  2222.  2223.
 3   / 3:  2231.  2232.  2233.
LIST v[j=@ave,l=@ave]	!XZ
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 3 by 3 points (X-Z)
             Y        : 0.5 to 3.5 (YT ave)
             T        : 0.5 to 3.5 (YT ave)
             1      2      3    
             1      2      3
 1   / 1:  2121.  2122.  2123.
 2   / 2:  2221.  2222.  2223.
 3   / 3:  2321.  2322.  2323.
LIST v[j=@ave,k=@ave]	!XT
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 3 by 3 points (X-T)
             Y        : 0.5 to 3.5 (YZ ave)
             Z        : 0.5 to 3.5 (YZ ave)
             1      2      3    
             1      2      3
 1   / 1:  1221.  1222.  1223.
 2   / 2:  2221.  2222.  2223.
 3   / 3:  3221.  3222.  3223.
LIST v[i=@ave,l=@ave]	!YZ
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 3 by 3 points (Y-Z)
             X        : 0.5 to 3.5 (XT ave)
             T        : 0.5 to 3.5 (XT ave)
             1      2      3    
             1      2      3
 1   / 1:  2112.  2122.  2132.
 2   / 2:  2212.  2222.  2232.
 3   / 3:  2312.  2322.  2332.
LIST v[i=@ave,k=@ave]	!YT
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 3 by 3 points (Y-T)
             X        : 0.5 to 3.5 (XZ ave)
             Z        : 0.5 to 3.5 (XZ ave)
             1      2      3    
             1      2      3
 1   / 1:  1212.  1222.  1232.
 2   / 2:  2212.  2222.  2232.
 3   / 3:  3212.  3222.  3232.
LIST v[i=@ave,j=@ave]	!ZT
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 3 by 3 points (Z-T)
             X        : 0.5 to 3.5 (XY ave)
             Y        : 0.5 to 3.5 (XY ave)
             1      2      3    
             1      2      3
 1   / 1:  1122.  1222.  1322.
 2   / 2:  2122.  2222.  2322.
 3   / 3:  3122.  3222.  3322.
 
! lines of data
LIST/ORDER=X v[j=@ave,k=@ave,l=@ave]
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 3 points (X)
             Y        : 0.5 to 3.5 (YZT ave)
             Z        : 0.5 to 3.5 (YZT ave)
             T        : 0.5 to 3.5 (YZT ave)
            1      2      3    
            1      2      3
          2221.  2222.  2223.
LIST/ORDER=Y v[i=@ave,k=@ave,l=@ave]
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 3 points (Y)
             X        : 0.5 to 3.5 (XZT ave)
             Z        : 0.5 to 3.5 (XZT ave)
             T        : 0.5 to 3.5 (XZT ave)
            1      2      3    
            1      2      3
          2212.  2222.  2232.
LIST/ORDER=Z v[i=@ave,j=@ave,l=@ave]
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 3 points (Z)
             X        : 0.5 to 3.5 (XYT ave)
             Y        : 0.5 to 3.5 (XYT ave)
             T        : 0.5 to 3.5 (XYT ave)
            1      2      3    
            1      2      3
          2122.  2222.  2322.
LIST/ORDER=T v[i=@ave,j=@ave,k=@ave]
             VARIABLE : I + 10*J + 100*K + 1000*L
             SUBSET   : 3 points (T)
             X        : 0.5 to 3.5 (XYZ ave)
             Y        : 0.5 to 3.5 (XYZ ave)
             Z        : 0.5 to 3.5 (XYZ ave)
            1      2      3    
            1      2      3
          1222.  2222.  3222.
 
! point of data
LIST/ORDER=X v[i=@ave,j=@ave,k=@ave,l=@ave]
             VARIABLE : I + 10*J + 100*K + 1000*L
             X        : 0.5 to 3.5 (XYZT ave)
             Y        : 0.5 to 3.5 (XYZT ave)
             Z        : 0.5 to 3.5 (XYZT ave)
             T        : 0.5 to 3.5 (XYZT ave)
          2222.
 
! ******** file variable ************
CANCEL VARIABLE V
USE gt4d011
CANCEL MEMORY/ALL
SET REGION/I=101:103/J=46:48/K=1:3/L=1:3
SET EXPRESSION v
GO bn_compress.sub_v
! BN200_COMPRESS.SUB_V
! list the variable v averaged on various geometries
 
! this routine assumes that a 4-D region and an expression are already set
 
! full data region
LIST v
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 by 3 by 3 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              129W   128W   127W   
              101    102    103
 ---- L:1 T:   17-AUG-1982 12:00
 ---- K:1 Z:   5
 1N    / 48:  10.50  11.05  11.24
 0.67N / 47:   7.89   7.84   8.33
 0.33N / 46:   4.10   4.06   4.78
 ---- K:2 Z:   15
 1N    / 48:   2.85   3.45   3.89
 0.67N / 47:   0.69   0.73   1.38
 0.33N / 46:  -2.43  -2.33  -1.49
 ---- K:3 Z:   25
 1N    / 48:  -3.15  -2.57  -1.79
 0.67N / 47:  -5.26  -5.17  -4.37
 0.33N / 46:  -7.30  -7.07  -6.17
 ---- L:2 T:   23-AUG-1982 14:00
 ---- K:1 Z:   5
 1N    / 48:  10.27  12.27  13.17
 0.67N / 47:   8.14   9.98  11.31
 0.33N / 46:   4.79   6.72   8.32
 ---- K:2 Z:   15
 1N    / 48:   2.19   4.29   5.39
 0.67N / 47:   0.46   2.40   3.88
 0.33N / 46:  -2.18  -0.16   1.57
 ---- K:3 Z:   25
 1N    / 48:  -3.70  -1.52  -0.17
 0.67N / 47:  -5.96  -3.85  -2.20
 0.33N / 46:  -7.70  -5.56  -3.69
 ---- L:3 T:   29-AUG-1982 16:00
 ---- K:1 Z:   5
 1N    / 48:  10.11  13.41  14.78
 0.67N / 47:   9.46  12.65  13.99
 0.33N / 46:   6.97  10.15  11.50
 ---- K:2 Z:   15
 1N    / 48:   1.84   5.11   6.48
 0.67N / 47:   1.43   4.64   6.01
 0.33N / 46:  -0.46   2.80   4.22
 ---- K:3 Z:   25
 1N    / 48:  -3.16  -0.23   0.86
 0.67N / 47:  -4.97  -1.70  -0.50
 0.33N / 46:  -6.73  -3.24  -1.70
 
! cubes of data
LIST v[l=@ave]
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 by 3 points (LONGITUDE-LATITUDE-DEPTH (m))
             TIME     : 14-AUG-1982 11:00 to 01-SEP-1982 17:00 (averaged)
              129W   128W   127W   
              101    102    103
 ---- K:1 Z:   5
 1N    / 48:  10.29  12.24  13.06
 0.67N / 47:   8.50  10.16  11.21
 0.33N / 46:   5.29   6.98   8.20
 ---- K:2 Z:   15
 1N    / 48:   2.29   4.28   5.25
 0.67N / 47:   0.86   2.59   3.76
 0.33N / 46:  -1.69   0.10   1.43
 ---- K:3 Z:   25
 1N    / 48:  -3.34  -1.44  -0.37
 0.67N / 47:  -5.40  -3.57  -2.36
 0.33N / 46:  -7.25  -5.29  -3.85
LIST v[k=@ave]
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 by 3 points (LONGITUDE-LATITUDE-TIME)
             DEPTH (m): 0 to 30 (averaged)
              129W   128W   127W   
              101    102    103
 ---- L:1 T:   17-AUG-1982 12:00
 1N    / 48:  3.398  3.976  4.445
 0.67N / 47:  1.107  1.133  1.784
 0.33N / 46: -1.881 -1.779 -0.959
 ---- L:2 T:   23-AUG-1982 14:00
 1N    / 48:  2.920  5.015  6.129
 0.67N / 47:  0.881  2.845  4.328
 0.33N / 46: -1.696  0.334  2.067
 ---- L:3 T:   29-AUG-1982 16:00
 1N    / 48:  2.933  6.096  7.372
 0.67N / 47:  1.975  5.195  6.502
 0.33N / 46: -0.073  3.238  4.671
LIST v[j=@ave]
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 by 3 points (LONGITUDE-DEPTH (m)-TIME)
             LATITUDE : 0.167N to 1.167N (averaged)
             129W   128W   127W   
             101    102    103
 ---- L:1 T:   17-AUG-1982 12:00
 5     / 1:   7.50   7.65   8.12
 15    / 2:   0.37   0.62   1.26
 25    / 3:  -5.24  -4.94  -4.11
 ---- L:2 T:   23-AUG-1982 14:00
 5     / 1:   7.73   9.66  10.93
 15    / 2:   0.16   2.18   3.61
 25    / 3:  -5.79  -3.64  -2.02
 ---- L:3 T:   29-AUG-1982 16:00
 5     / 1:   8.85  12.07  13.42
 15    / 2:   0.94   4.18   5.57
 25    / 3:  -4.95  -1.72  -0.45
LIST v[i=@ave]
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 by 3 points (LATITUDE-DEPTH (m)-TIME)
             LONGITUDE: 129.5W to 126.5W (averaged)
              0.33N  0.67N  1N    
              46     47     48
 ---- L:1 T:   17-AUG-1982 12:00
 5     / 1:   4.31   8.02  10.93
 15    / 2:  -2.08   0.93   3.39
 25    / 3:  -6.85  -4.93  -2.51
 ---- L:2 T:   23-AUG-1982 14:00
 5     / 1:   6.61   9.81  11.90
 15    / 2:  -0.25   2.25   3.96
 25    / 3:  -5.65  -4.00  -1.80
 ---- L:3 T:   29-AUG-1982 16:00
 5     / 1:   9.54  12.04  12.77
 15    / 2:   2.19   4.03   4.48
 25    / 3:  -3.89  -2.39  -0.84
 
! planes of data
LIST v[k=@ave,l=@ave]	!XY
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 points (LONGITUDE-LATITUDE)
             DEPTH (m): 0 to 30 (ZT ave)
             TIME     : 14-AUG-1982 11:00 to 01-SEP-1982 17:00 (ZT ave)
              129W   128W   127W   
              101    102    103
 1N    / 48:  3.084  5.029  5.982
 0.67N / 47:  1.321  3.057  4.204
 0.33N / 46: -1.217  0.598  1.927
LIST v[j=@ave,l=@ave]	!XZ
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 points (LONGITUDE-DEPTH (m))
             LATITUDE : 0.167N to 1.167N (YT ave)
             TIME     : 14-AUG-1982 11:00 to 01-SEP-1982 17:00 (YT ave)
             129W   128W   127W   
             101    102    103
 5     / 1:   8.03   9.79  10.82
 15    / 2:   0.49   2.33   3.48
 25    / 3:  -5.33  -3.43  -2.19
LIST v[j=@ave,k=@ave]	!XT
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 points (LONGITUDE-TIME)
             LATITUDE : 0.167N to 1.167N (YZ ave)
             DEPTH (m): 0 to 30 (YZ ave)
                      129W   128W   127W   
                      101    102    103
 17-AUG-1982 12 / 1:  0.875  1.110  1.757
 23-AUG-1982 14 / 2:  0.701  2.731  4.175
 29-AUG-1982 16 / 3:  1.612  4.843  6.182
LIST v[i=@ave,l=@ave]	!YZ
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 points (LATITUDE-DEPTH (m))
             LONGITUDE: 129.5W to 126.5W (XT ave)
             TIME     : 14-AUG-1982 11:00 to 01-SEP-1982 17:00 (XT ave)
              0.33N  0.67N  1N    
              46     47     48
 5     / 1:   6.82   9.96  11.87
 15    / 2:  -0.05   2.40   3.94
 25    / 3:  -5.46  -3.78  -1.72
LIST v[i=@ave,k=@ave]	!YT
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 points (LATITUDE-TIME)
             LONGITUDE: 129.5W to 126.5W (XZ ave)
             DEPTH (m): 0 to 30 (XZ ave)
                       0.33N  0.67N  1N    
                       46     47     48
 17-AUG-1982 12 / 1: -1.540  1.341  3.940
 23-AUG-1982 14 / 2:  0.235  2.684  4.688
 29-AUG-1982 16 / 3:  2.612  4.557  5.467
LIST v[i=@ave,j=@ave]	!ZT
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 3 points (DEPTH (m)-TIME)
             LONGITUDE: 129.5W to 126.5W (XY ave)
             LATITUDE : 0.167N to 1.167N (XY ave)
                       5      15     25    
                        1      2      3
 17-AUG-1982 12 / 1:   7.75   0.75  -4.76
 23-AUG-1982 14 / 2:   9.44   1.98  -3.82
 29-AUG-1982 16 / 3:  11.45   3.56  -2.37
 
! lines of data
LIST/ORDER=X v[j=@ave,k=@ave,l=@ave]
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 points (LONGITUDE)
             LATITUDE : 0.167N to 1.167N (YZT ave)
             DEPTH (m): 0 to 30 (YZT ave)
             TIME     : 14-AUG-1982 11:00 to 01-SEP-1982 17:00 (YZT ave)
          129W   128W   127W   
          101    102    103
          1.063  2.895  4.038
LIST/ORDER=Y v[i=@ave,k=@ave,l=@ave]
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 points (LATITUDE)
             LONGITUDE: 129.5W to 126.5W (XZT ave)
             DEPTH (m): 0 to 30 (XZT ave)
             TIME     : 14-AUG-1982 11:00 to 01-SEP-1982 17:00 (XZT ave)
           0.33N  0.67N  1N    
           46     47     48
          0.436  2.861  4.698
LIST/ORDER=Z v[i=@ave,j=@ave,l=@ave]
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 points (DEPTH (m))
             LONGITUDE: 129.5W to 126.5W (XYT ave)
             LATITUDE : 0.167N to 1.167N (XYT ave)
             TIME     : 14-AUG-1982 11:00 to 01-SEP-1982 17:00 (XYT ave)
           5      15     25    
            1      2      3
          9.547  2.099 -3.651
LIST/ORDER=T v[i=@ave,j=@ave,k=@ave]
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 points (TIME)
             LONGITUDE: 129.5W to 126.5W (XYZ ave)
             LATITUDE : 0.167N to 1.167N (XYZ ave)
             DEPTH (m): 0 to 30 (XYZ ave)
           1982   1982   1982  
            1      2      3
          1.247  2.536  4.212
 
! point of data
LIST/ORDER=X v[i=@ave,j=@ave,k=@ave,l=@ave]
             VARIABLE : MERIDIONAL VELOCITY (cm/sec)
             FILENAME : gt4d011.cdf
             LONGITUDE: 129.5W to 126.5W (XYZT ave)
             LATITUDE : 0.167N to 1.167N (XYZT ave)
             DEPTH (m): 0 to 30 (XYZT ave)
             TIME     : 14-AUG-1982 11:00 to 01-SEP-1982 17:00 (XYZT ave)
          2.665
 
! ****
! remove call to bn200_compress.sub_qady for portable benchmarks *kob* 5/99
! ****
*** Running ferret script: bn_interpolate.jnl
! bn200_interpolate.JNL
! benchmark interpolation along various axes
 
SET LIST/PRECISION=6
SET MODE LATITUDE:4
 
LET v = x + 10*y + 100*z + 1000*t
SET REGION/I=1:3/J=1:3/K=1:3/L=1:3
DEF REG/x=1.5 xpt
DEF REG/y=1.05 ypt
DEF REG/z=1.005 zpt
DEF REG/t=1.0005 tpt
 
! first without interpolation
CANCEL MODE INTERPOLATE
GO bn_interpolate.sub
! BN200_INTERPOLATE.SUB
! interpolate in various geometries
 
! this routine assumes that a 4-D region and an expression are already set
 
! cubes of data
LIST v[@xpt]
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 by 3 points (Y-Z-T)
             X        : 1
              1        2        3     
              1        2        3
 ---- L:1 T:   1
 1   / 1:  1111.00  1121.00  1131.00
 2   / 2:  1211.00  1221.00  1231.00
 3   / 3:  1311.00  1321.00  1331.00
 ---- L:2 T:   2
 1   / 1:  2111.00  2121.00  2131.00
 2   / 2:  2211.00  2221.00  2231.00
 3   / 3:  2311.00  2321.00  2331.00
 ---- L:3 T:   3
 1   / 1:  3111.00  3121.00  3131.00
 2   / 2:  3211.00  3221.00  3231.00
 3   / 3:  3311.00  3321.00  3331.00
LIST v[@ypt]
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 by 3 points (X-Z-T)
             Y        : 1
              1        2        3     
              1        2        3
 ---- L:1 T:   1
 1   / 1:  1111.00  1112.00  1113.00
 2   / 2:  1211.00  1212.00  1213.00
 3   / 3:  1311.00  1312.00  1313.00
 ---- L:2 T:   2
 1   / 1:  2111.00  2112.00  2113.00
 2   / 2:  2211.00  2212.00  2213.00
 3   / 3:  2311.00  2312.00  2313.00
 ---- L:3 T:   3
 1   / 1:  3111.00  3112.00  3113.00
 2   / 2:  3211.00  3212.00  3213.00
 3   / 3:  3311.00  3312.00  3313.00
LIST v[@zpt]
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 by 3 points (X-Y-T)
             Z        : 1
              1        2        3     
              1        2        3
 ---- L:1 T:   1
 1   / 1:  1111.00  1112.00  1113.00
 2   / 2:  1121.00  1122.00  1123.00
 3   / 3:  1131.00  1132.00  1133.00
 ---- L:2 T:   2
 1   / 1:  2111.00  2112.00  2113.00
 2   / 2:  2121.00  2122.00  2123.00
 3   / 3:  2131.00  2132.00  2133.00
 ---- L:3 T:   3
 1   / 1:  3111.00  3112.00  3113.00
 2   / 2:  3121.00  3122.00  3123.00
 3   / 3:  3131.00  3132.00  3133.00
LIST v[@tpt]
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 by 3 points (X-Y-Z)
             T        : 1
              1        2        3     
              1        2        3
 ---- K:1 Z:   1
 1   / 1:  1111.00  1112.00  1113.00
 2   / 2:  1121.00  1122.00  1123.00
 3   / 3:  1131.00  1132.00  1133.00
 ---- K:2 Z:   2
 1   / 1:  1211.00  1212.00  1213.00
 2   / 2:  1221.00  1222.00  1223.00
 3   / 3:  1231.00  1232.00  1233.00
 ---- K:3 Z:   3
 1   / 1:  1311.00  1312.00  1313.00
 2   / 2:  1321.00  1322.00  1323.00
 3   / 3:  1331.00  1332.00  1333.00
 
! planes of data
LIST v[@zpt,@tpt]	!XY
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 points (X-Y)
             Z        : 1
             T        : 1
              1        2        3     
              1        2        3
 1   / 1:  1111.00  1112.00  1113.00
 2   / 2:  1121.00  1122.00  1123.00
 3   / 3:  1131.00  1132.00  1133.00
LIST v[@ypt,@tpt]	!XZ
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 points (X-Z)
             Y        : 1
             T        : 1
              1        2        3     
              1        2        3
 1   / 1:  1111.00  1112.00  1113.00
 2   / 2:  1211.00  1212.00  1213.00
 3   / 3:  1311.00  1312.00  1313.00
LIST v[@ypt,@zpt]	!XT
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 points (X-T)
             Y        : 1
             Z        : 1
              1        2        3     
              1        2        3
 1   / 1:  1111.00  1112.00  1113.00
 2   / 2:  2111.00  2112.00  2113.00
 3   / 3:  3111.00  3112.00  3113.00
LIST v[@xpt,@tpt]	!YZ
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 points (Y-Z)
             X        : 1
             T        : 1
              1        2        3     
              1        2        3
 1   / 1:  1111.00  1121.00  1131.00
 2   / 2:  1211.00  1221.00  1231.00
 3   / 3:  1311.00  1321.00  1331.00
LIST v[@xpt,@zpt]	!YT
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 points (Y-T)
             X        : 1
             Z        : 1
              1        2        3     
              1        2        3
 1   / 1:  1111.00  1121.00  1131.00
 2   / 2:  2111.00  2121.00  2131.00
 3   / 3:  3111.00  3121.00  3131.00
LIST v[@xpt,@ypt]	!ZT
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 points (Z-T)
             X        : 1
             Y        : 1
              1        2        3     
              1        2        3
 1   / 1:  1111.00  1211.00  1311.00
 2   / 2:  2111.00  2211.00  2311.00
 3   / 3:  3111.00  3211.00  3311.00
 
! lines of data
LIST/ORDER=T v[@xpt,@ypt,@zpt]	! T
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 points (T)
             X        : 1
             Y        : 1
             Z        : 1
             1        2        3     
             1        2        3
          1111.00  2111.00  3111.00
LIST/ORDER=Z v[@xpt,@ypt,@tpt]	! Z
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 points (Z)
             X        : 1
             Y        : 1
             T        : 1
             1        2        3     
             1        2        3
          1111.00  1211.00  1311.00
LIST/ORDER=Y v[@xpt,@zpt,@tpt]	! Y
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 points (Y)
             X        : 1
             Z        : 1
             T        : 1
             1        2        3     
             1        2        3
          1111.00  1121.00  1131.00
LIST/ORDER=X v[@ypt,@zpt,@tpt]	! X
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 points (X)
             Y        : 1
             Z        : 1
             T        : 1
             1        2        3     
             1        2        3
          1111.00  1112.00  1113.00
 
! point of data
LIST v[@xpt,@ypt,@zpt,@tpt]
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             X        : 1
             Y        : 1
             Z        : 1
             T        : 1
          1111.00
 
! then with interpolation
SET MODE INTERPOLATE
GO bn_interpolate.sub
! BN200_INTERPOLATE.SUB
! interpolate in various geometries
 
! this routine assumes that a 4-D region and an expression are already set
 
! cubes of data
LIST v[@xpt]
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 by 3 points (Y-Z-T)
             X        : 1.5 (interpolated)
              1        2        3     
              1        2        3
 ---- L:1 T:   1
 1   / 1:  1111.50  1121.50  1131.50
 2   / 2:  1211.50  1221.50  1231.50
 3   / 3:  1311.50  1321.50  1331.50
 ---- L:2 T:   2
 1   / 1:  2111.50  2121.50  2131.50
 2   / 2:  2211.50  2221.50  2231.50
 3   / 3:  2311.50  2321.50  2331.50
 ---- L:3 T:   3
 1   / 1:  3111.50  3121.50  3131.50
 2   / 2:  3211.50  3221.50  3231.50
 3   / 3:  3311.50  3321.50  3331.50
LIST v[@ypt]
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 by 3 points (X-Z-T)
             Y        : 1.05 (interpolated)
              1        2        3     
              1        2        3
 ---- L:1 T:   1
 1   / 1:  1111.50  1112.50  1113.50
 2   / 2:  1211.50  1212.50  1213.50
 3   / 3:  1311.50  1312.50  1313.50
 ---- L:2 T:   2
 1   / 1:  2111.50  2112.50  2113.50
 2   / 2:  2211.50  2212.50  2213.50
 3   / 3:  2311.50  2312.50  2313.50
 ---- L:3 T:   3
 1   / 1:  3111.50  3112.50  3113.50
 2   / 2:  3211.50  3212.50  3213.50
 3   / 3:  3311.50  3312.50  3313.50
LIST v[@zpt]
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 by 3 points (X-Y-T)
             Z        : 1.005 (interpolated)
              1        2        3     
              1        2        3
 ---- L:1 T:   1
 1   / 1:  1111.50  1112.50  1113.50
 2   / 2:  1121.50  1122.50  1123.50
 3   / 3:  1131.50  1132.50  1133.50
 ---- L:2 T:   2
 1   / 1:  2111.50  2112.50  2113.50
 2   / 2:  2121.50  2122.50  2123.50
 3   / 3:  2131.50  2132.50  2133.50
 ---- L:3 T:   3
 1   / 1:  3111.50  3112.50  3113.50
 2   / 2:  3121.50  3122.50  3123.50
 3   / 3:  3131.50  3132.50  3133.50
LIST v[@tpt]
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 by 3 points (X-Y-Z)
             T        : 1.0005 (interpolated)
              1        2        3     
              1        2        3
 ---- K:1 Z:   1
 1   / 1:  1111.50  1112.50  1113.50
 2   / 2:  1121.50  1122.50  1123.50
 3   / 3:  1131.50  1132.50  1133.50
 ---- K:2 Z:   2
 1   / 1:  1211.50  1212.50  1213.50
 2   / 2:  1221.50  1222.50  1223.50
 3   / 3:  1231.50  1232.50  1233.50
 ---- K:3 Z:   3
 1   / 1:  1311.50  1312.50  1313.50
 2   / 2:  1321.50  1322.50  1323.50
 3   / 3:  1331.50  1332.50  1333.50
 
! planes of data
LIST v[@zpt,@tpt]	!XY
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 points (X-Y)
             Z        : 1.005 (interpolated)
             T        : 1.0005 (interpolated)
              1        2        3     
              1        2        3
 1   / 1:  1112.00  1113.00  1114.00
 2   / 2:  1122.00  1123.00  1124.00
 3   / 3:  1132.00  1133.00  1134.00
LIST v[@ypt,@tpt]	!XZ
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 points (X-Z)
             Y        : 1.05 (interpolated)
             T        : 1.0005 (interpolated)
              1        2        3     
              1        2        3
 1   / 1:  1112.00  1113.00  1114.00
 2   / 2:  1212.00  1213.00  1214.00
 3   / 3:  1312.00  1313.00  1314.00
LIST v[@ypt,@zpt]	!XT
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 points (X-T)
             Y        : 1.05 (interpolated)
             Z        : 1.005 (interpolated)
              1        2        3     
              1        2        3
 1   / 1:  1112.00  1113.00  1114.00
 2   / 2:  2112.00  2113.00  2114.00
 3   / 3:  3112.00  3113.00  3114.00
LIST v[@xpt,@tpt]	!YZ
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 points (Y-Z)
             X        : 1.5 (interpolated)
             T        : 1.0005 (interpolated)
              1        2        3     
              1        2        3
 1   / 1:  1112.00  1122.00  1132.00
 2   / 2:  1212.00  1222.00  1232.00
 3   / 3:  1312.00  1322.00  1332.00
LIST v[@xpt,@zpt]	!YT
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 points (Y-T)
             X        : 1.5 (interpolated)
             Z        : 1.005 (interpolated)
              1        2        3     
              1        2        3
 1   / 1:  1112.00  1122.00  1132.00
 2   / 2:  2112.00  2122.00  2132.00
 3   / 3:  3112.00  3122.00  3132.00
LIST v[@xpt,@ypt]	!ZT
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 by 3 points (Z-T)
             X        : 1.5 (interpolated)
             Y        : 1.05 (interpolated)
              1        2        3     
              1        2        3
 1   / 1:  1112.00  1212.00  1312.00
 2   / 2:  2112.00  2212.00  2312.00
 3   / 3:  3112.00  3212.00  3312.00
 
! lines of data
LIST/ORDER=T v[@xpt,@ypt,@zpt]	! T
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 points (T)
             X        : 1.5 (interpolated)
             Y        : 1.05 (interpolated)
             Z        : 1.005 (interpolated)
             1        2        3     
             1        2        3
          1112.50  2112.50  3112.50
LIST/ORDER=Z v[@xpt,@ypt,@tpt]	! Z
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 points (Z)
             X        : 1.5 (interpolated)
             Y        : 1.05 (interpolated)
             T        : 1.0005 (interpolated)
             1        2        3     
             1        2        3
          1112.50  1212.50  1312.50
LIST/ORDER=Y v[@xpt,@zpt,@tpt]	! Y
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 points (Y)
             X        : 1.5 (interpolated)
             Z        : 1.005 (interpolated)
             T        : 1.0005 (interpolated)
             1        2        3     
             1        2        3
          1112.50  1122.50  1132.50
LIST/ORDER=X v[@ypt,@zpt,@tpt]	! X
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             SUBSET   : 3 points (X)
             Y        : 1.05 (interpolated)
             Z        : 1.005 (interpolated)
             T        : 1.0005 (interpolated)
             1        2        3     
             1        2        3
          1112.50  1113.50  1114.50
 
! point of data
LIST v[@xpt,@ypt,@zpt,@tpt]
             VARIABLE : X + 10*Y + 100*Z + 1000*T
             X        : 1.5 (interpolated)
             Y        : 1.05 (interpolated)
             Z        : 1.005 (interpolated)
             T        : 1.0005 (interpolated)
          1113.00
*** Running ferret script: bn_regrid.jnl
! bn200_regrid.JNL
! test regridding
! first test consists of regridding and re-regridding back and comparing
! when the variable, v is linear along all axes results should be exact
 
! second test checks area-averaging regridding
! both with and without COS(latitude) factors computed
 
! third test consists of time axis regridding with differing time steps
 
set mode latit_label -4
set mode long_label -4
 
define axis/x=2:20:2 xeven
define axis/x=1:19:2 xodd
define axis/y=2:20:2 yeven
define axis/y=1:19:2 yodd
define axis/z=2:20:2 zeven
define axis/z=1:19:2 zodd
define axis/t=2:20:2/t0="1-jan-1980"/unit=days teven
define axis/t=1:19:2/t0="1-jan-1980"/unit=days todd
 
! default grid
define grid/x=xeven/y=yeven/z=zeven/t=teven even
 
! 1 axis different
define grid/x=xodd/y=yeven/z=zeven/t=teven g1
define grid/x=xeven/y=yodd/z=zeven/t=teven g2
define grid/x=xeven/y=yeven/z=zodd/t=teven g3
define grid/x=xeven/y=yeven/z=zeven/t=todd g4
 
! 2 axes different
define grid/x=xodd/y=yodd/z=zeven/t=teven g12
define grid/x=xodd/y=yeven/z=zodd/t=teven g13
define grid/x=xodd/y=yeven/z=zeven/t=todd g14
define grid/x=xeven/y=yodd/z=zodd/t=teven g23
define grid/x=xeven/y=yodd/z=zeven/t=todd g24
define grid/x=xeven/y=yeven/z=zodd/t=todd g33
 
! 3 axes different
define grid/x=xeven/y=yodd/z=zodd/t=todd g234
define grid/x=xodd/y=yeven/z=zodd/t=todd g134
define grid/x=xodd/y=yodd/z=zeven/t=todd g124
define grid/x=xodd/y=yodd/z=zodd/t=teven g123
 
! all axes different
define grid/x=xodd/y=yodd/z=zodd/t=todd g1234
 
LET veven = 1000*i[g=even] + 100*j[g=even] + 10*k[g=even] + l[g=even]
 
LET v1    = veven[g=g1]
LET v2    = veven[g=g2]
LET v3    = veven[g=g3]
LET v4    = veven[g=g4]
LET v12   = veven[g=g12]
LET v13   = veven[g=g13]
LET v14   = veven[g=g14]
LET v23   = veven[g=g23]
LET v24   = veven[g=g24]
LET v33   = veven[g=g33]
LET v234  = veven[g=g234]
LET v134  = veven[g=g134]
LET v124  = veven[g=g124]
LET v123  = veven[g=g123]
LET v1234 = veven[g=g1234]
 
SET REGION/X=4.01:8.99/Y=4.01:8.99/Z=4.01:8.99/T=4.01:8.99
 
! background
list veven
             VARIABLE : 1000*I[G=EVEN] + 100*J[G=EVEN] + 10*K[G=EVEN] + L[G=EVEN]
             SUBSET   : 3 by 3 by 3 by 3 points (X-Y-Z-TIME)
             4      6      8    
             2      3      4
 ---- L:2 T:   05-JAN-1980 00:00
 ---- K:2 Z:   4
 4   / 2:  2222.  3222.  4222.
 6   / 3:  2322.  3322.  4322.
 8   / 4:  2422.  3422.  4422.
 ---- K:3 Z:   6
 4   / 2:  2232.  3232.  4232.
 6   / 3:  2332.  3332.  4332.
 8   / 4:  2432.  3432.  4432.
 ---- K:4 Z:   8
 4   / 2:  2242.  3242.  4242.
 6   / 3:  2342.  3342.  4342.
 8   / 4:  2442.  3442.  4442.
 ---- L:3 T:   07-JAN-1980 00:00
 ---- K:2 Z:   4
 4   / 2:  2223.  3223.  4223.
 6   / 3:  2323.  3323.  4323.
 8   / 4:  2423.  3423.  4423.
 ---- K:3 Z:   6
 4   / 2:  2233.  3233.  4233.
 6   / 3:  2333.  3333.  4333.
 8   / 4:  2433.  3433.  4433.
 ---- K:4 Z:   8
 4   / 2:  2243.  3243.  4243.
 6   / 3:  2343.  3343.  4343.
 8   / 4:  2443.  3443.  4443.
 ---- L:4 T:   09-JAN-1980 00:00
 ---- K:2 Z:   4
 4   / 2:  2224.  3224.  4224.
 6   / 3:  2324.  3324.  4324.
 8   / 4:  2424.  3424.  4424.
 ---- K:3 Z:   6
 4   / 2:  2234.  3234.  4234.
 6   / 3:  2334.  3334.  4334.
 8   / 4:  2434.  3434.  4434.
 ---- K:4 Z:   8
 4   / 2:  2244.  3244.  4244.
 6   / 3:  2344.  3344.  4344.
 8   / 4:  2444.  3444.  4444.
list v1234
             VARIABLE : VEVEN[G=G1234]
             SUBSET   : 3 by 3 by 3 by 3 points (X-Y-Z-TIME)
             5      7      9    
             3      4      5
 ---- L:3 T:   06-JAN-1980 00:00
 ---- K:3 Z:   5
 5   / 3:  2778.  3778.  4778.
 7   / 4:  2878.  3878.  4878.
 9   / 5:  2978.  3978.  4978.
 ---- K:4 Z:   7
 5   / 3:  2788.  3788.  4788.
 7   / 4:  2888.  3888.  4888.
 9   / 5:  2988.  3988.  4988.
 ---- K:5 Z:   9
 5   / 3:  2798.  3798.  4798.
 7   / 4:  2898.  3898.  4898.
 9   / 5:  2998.  3998.  4998.
 ---- L:4 T:   08-JAN-1980 00:00
 ---- K:3 Z:   5
 5   / 3:  2778.  3778.  4778.
 7   / 4:  2878.  3878.  4878.
 9   / 5:  2978.  3978.  4978.
 ---- K:4 Z:   7
 5   / 3:  2788.  3788.  4788.
 7   / 4:  2888.  3888.  4888.
 9   / 5:  2988.  3988.  4988.
 ---- K:5 Z:   9
 5   / 3:  2798.  3798.  4798.
 7   / 4:  2898.  3898.  4898.
 9   / 5:  2998.  3998.  4998.
 ---- L:5 T:   10-JAN-1980 00:00
 ---- K:3 Z:   5
 5   / 3:  2780.  3780.  4780.
 7   / 4:  2880.  3880.  4880.
 9   / 5:  2980.  3980.  4980.
 ---- K:4 Z:   7
 5   / 3:  2790.  3790.  4790.
 7   / 4:  2890.  3890.  4890.
 9   / 5:  2990.  3990.  4990.
 ---- K:5 Z:   9
 5   / 3:  2800.  3800.  4800.
 7   / 4:  2900.  3900.  4900.
 9   / 5:  3000.  4000.  5000.
stat veven
 
             1000*I[G=EVEN] + 100*J[G=EVEN] + 10*K[G=EVEN] + L[G=EVEN]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2222
 Maximum value: 4444
 Mean    value: 3333 (unweighted average)
 Standard deviation: 825.72
 
! first all from one memory variable
load/x=1:11/y=1:11/z=1:11/t=1:11 veven
GO bn_regrid.sub
! BN200_REGRID.SUB
! compare various regriddings to the original data
 
stat v1[g=even]-veven, v1
 
             V1[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G1]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2722
 Maximum value: 4944
 Mean    value: 3833 (unweighted average)
 Standard deviation: 825.72
stat v2[g=even]-veven, v2
 
             V2[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G2]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2272
 Maximum value: 4494
 Mean    value: 3383 (unweighted average)
 Standard deviation: 825.72
stat v3[g=even]-veven, v3
 
             V3[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G3]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2227
 Maximum value: 4449
 Mean    value: 3338 (unweighted average)
 Standard deviation: 825.72
stat v4[g=even]-veven, v4
 
             V4[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G4]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2222.5
 Maximum value: 4444.5
 Mean    value: 3333.5 (unweighted average)
 Standard deviation: 825.72
stat v12[g=even]-veven, v12
 
             V12[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G12]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2772
 Maximum value: 4994
 Mean    value: 3883 (unweighted average)
 Standard deviation: 825.72
stat v13[g=even]-veven, v13
 
             V13[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G13]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2727
 Maximum value: 4949
 Mean    value: 3838 (unweighted average)
 Standard deviation: 825.72
stat v14[g=even]-veven, v14
 
             V14[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G14]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2722.5
 Maximum value: 4944.5
 Mean    value: 3833.5 (unweighted average)
 Standard deviation: 825.72
stat v23[g=even]-veven, v23
 
             V23[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G23]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2277
 Maximum value: 4499
 Mean    value: 3388 (unweighted average)
 Standard deviation: 825.72
stat v24[g=even]-veven, v24
 
             V24[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G24]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2272.5
 Maximum value: 4494.5
 Mean    value: 3383.5 (unweighted average)
 Standard deviation: 825.72
stat v33[g=even]-veven, v33
 
             V33[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G33]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2227.5
 Maximum value: 4449.5
 Mean    value: 3338.5 (unweighted average)
 Standard deviation: 825.72
stat v234[g=even]-veven, v234
 
             V234[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G234]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2277.5
 Maximum value: 4499.5
 Mean    value: 3388.5 (unweighted average)
 Standard deviation: 825.72
stat v134[g=even]-veven, v134
 
             V134[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G134]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2727.5
 Maximum value: 4949.5
 Mean    value: 3838.5 (unweighted average)
 Standard deviation: 825.72
stat v124[g=even]-veven, v124
 
             V124[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G124]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2772.5
 Maximum value: 4994.5
 Mean    value: 3883.5 (unweighted average)
 Standard deviation: 825.72
stat v123[g=even]-veven, v123
 
             V123[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G123]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2777
 Maximum value: 4999
 Mean    value: 3888 (unweighted average)
 Standard deviation: 825.72
stat v1234[g=even]-veven, v1234
 
             V1234[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G1234]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2777.5
 Maximum value: 4999.5
 Mean    value: 3888.5 (unweighted average)
 Standard deviation: 825.72
 
! and now with recalculations at every step
CANCEL MEMORY/ALL
SET MODE STUPID
GO bn_regrid.sub
! BN200_REGRID.SUB
! compare various regriddings to the original data
 
stat v1[g=even]-veven, v1
 
             V1[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G1]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2722
 Maximum value: 4944
 Mean    value: 3833 (unweighted average)
 Standard deviation: 825.72
stat v2[g=even]-veven, v2
 
             V2[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G2]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2272
 Maximum value: 4494
 Mean    value: 3383 (unweighted average)
 Standard deviation: 825.72
stat v3[g=even]-veven, v3
 
             V3[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G3]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2227
 Maximum value: 4449
 Mean    value: 3338 (unweighted average)
 Standard deviation: 825.72
stat v4[g=even]-veven, v4
 
             V4[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G4]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2222.5
 Maximum value: 4444.5
 Mean    value: 3333.5 (unweighted average)
 Standard deviation: 825.72
stat v12[g=even]-veven, v12
 
             V12[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G12]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2772
 Maximum value: 4994
 Mean    value: 3883 (unweighted average)
 Standard deviation: 825.72
stat v13[g=even]-veven, v13
 
             V13[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G13]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2727
 Maximum value: 4949
 Mean    value: 3838 (unweighted average)
 Standard deviation: 825.72
stat v14[g=even]-veven, v14
 
             V14[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G14]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2722.5
 Maximum value: 4944.5
 Mean    value: 3833.5 (unweighted average)
 Standard deviation: 825.72
stat v23[g=even]-veven, v23
 
             V23[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G23]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2277
 Maximum value: 4499
 Mean    value: 3388 (unweighted average)
 Standard deviation: 825.72
stat v24[g=even]-veven, v24
 
             V24[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G24]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2272.5
 Maximum value: 4494.5
 Mean    value: 3383.5 (unweighted average)
 Standard deviation: 825.72
stat v33[g=even]-veven, v33
 
             V33[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G33]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2227.5
 Maximum value: 4449.5
 Mean    value: 3338.5 (unweighted average)
 Standard deviation: 825.72
stat v234[g=even]-veven, v234
 
             V234[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G234]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2277.5
 Maximum value: 4499.5
 Mean    value: 3388.5 (unweighted average)
 Standard deviation: 825.72
stat v134[g=even]-veven, v134
 
             V134[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G134]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2727.5
 Maximum value: 4949.5
 Mean    value: 3838.5 (unweighted average)
 Standard deviation: 825.72
stat v124[g=even]-veven, v124
 
             V124[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G124]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2772.5
 Maximum value: 4994.5
 Mean    value: 3883.5 (unweighted average)
 Standard deviation: 825.72
stat v123[g=even]-veven, v123
 
             V123[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G123]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2777
 Maximum value: 4999
 Mean    value: 3888 (unweighted average)
 Standard deviation: 825.72
stat v1234[g=even]-veven, v1234
 
             V1234[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G1234]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2777.5
 Maximum value: 4999.5
 Mean    value: 3888.5 (unweighted average)
 Standard deviation: 825.72
 
!****************** area-averaging regrids *******************
! check easily computable area-averaged regrid
LET vfine = X+Y
LET vcoarse = vfine[g=gcoarse]
 
! first test without COS(latitude) corrections
define axis/x=1:100:1/unit=cm xfine
define axis/x=5.5:95.5:10/unit=cm xcoarse
define axis/y=1:100:1/unit=cm yfine
define axis/y=5.5:95.5:10/unit=cm ycoarse
define grid/x=xfine/y=yfine gfine
define grid/x=xcoarse/y=ycoarse gcoarse
 
set grid gfine
set reg/x=20.5:80.5/y=20.5:80.5
list vcoarse
             VARIABLE : VFINE[G=GCOARSE]
             SUBSET   : 6 by 6 points (X (CM)-Y (CM))
             25.5   35.5   45.5   55.5   65.5   75.5  
              3      4      5      6      7      8
 25.5 / 3:   51.0   61.0   71.0   81.0   91.0  101.0
 35.5 / 4:   61.0   71.0   81.0   91.0  101.0  111.0
 45.5 / 5:   71.0   81.0   91.0  101.0  111.0  121.0
 55.5 / 6:   81.0   91.0  101.0  111.0  121.0  131.0
 65.5 / 7:   91.0  101.0  111.0  121.0  131.0  141.0
 75.5 / 8:  101.0  111.0  121.0  131.0  141.0  151.0
stat vcoarse,vfine
 
             VFINE[G=GCOARSE]
             X (CM): 20.5 to 80.5
             Y (CM): 20.5 to 80.5
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 36 (6*6*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 51
 Maximum value: 151
 Mean    value: 101 (unweighted average)
 Standard deviation: 24.495
 
             X+Y
             X (CM): 20.5 to 80.5
             Y (CM): 20.5 to 80.5
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 3600 (60*60*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 42
 Maximum value: 160
 Mean    value: 101 (unweighted average)
 Standard deviation: 24.495
list vcoarse[x=@ave,y=@ave],vfine[x=@ave,y=@ave]
             X (CM): 20.5 to 80.5 (XY ave)
             Y (CM): 20.5 to 80.5 (XY ave)
 Column  1: VCOARSE is VFINE[G=GCOARSE]
 Column  2: VFINE is X+Y
         VCOARSE   VFINE
I / *:      101.0  101.0
 
! then test with COS(latitude) corrections
define axis/x=1:100:1/unit=degrees xfine
define axis/x=5.5:95.5:10/unit=degrees xcoarse
define axis/y=1:100:1/unit=degrees yfine
define axis/y=5.5:95.5:10/unit=degrees ycoarse
define grid/x=xfine/y=yfine gfine
define grid/x=xcoarse/y=ycoarse gcoarse
 
set grid gfine
set reg/x=20.5:80.5/y=20.5:80.5
list vcoarse
             VARIABLE : VFINE[G=GCOARSE]
             SUBSET   : 6 by 6 points (LONGITUDE-LATITUDE)
              25.5E  35.5E  45.5E  55.5E  65.5E  75.5E 
               3      4      5      6      7      8
 75.5N / 8:  101.0  111.0  121.0  131.0  141.0  151.0
 65.5N / 7:   91.0  101.0  111.0  121.0  131.0  141.0
 55.5N / 6:   81.0   91.0  101.0  111.0  121.0  131.0
 45.5N / 5:   71.0   81.0   91.0  101.0  111.0  121.0
 35.5N / 4:   61.0   71.0   81.0   91.0  101.0  111.0
 25.5N / 3:   51.0   61.0   71.0   81.0   91.0  101.0
stat vcoarse,vfine
 
             VFINE[G=GCOARSE]
             LONGITUDE: 20.5E to 80.5E
             LATITUDE: 20.5N to 80.5N
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 36 (6*6*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 51
 Maximum value: 151
 Mean    value: 101 (unweighted average)
 Standard deviation: 24.495
 
             X+Y
             LONGITUDE: 20.5E to 80.5E
             LATITUDE: 20.5N to 80.5N
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 3600 (60*60*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 42
 Maximum value: 160
 Mean    value: 101 (unweighted average)
 Standard deviation: 24.495
list vcoarse[x=@ave,y=@ave],vfine[x=@ave,y=@ave]
             LONGITUDE: 20.5E to 80.5E (XY ave)
             LATITUDE: 20.5N to 80.5N (XY ave)
 Column  1: VCOARSE is VFINE[G=GCOARSE]
 Column  2: VFINE is X+Y
         VCOARSE   VFINE
I / *:      94.71  94.53
 
!****************** time axis regridding *******************
define axis/t="1-jan-1980":"1-jan-1982":24/t0="1-jan-1970" tax24
define axis/t="1-jan-1980":"1-jan-1982":48/t0="1-jan-1920" tax48
define grid/t=tax24 g24
define grid/t=tax48 g48
!show grid/l=1:4 g24,g48    ! requires blank separators: 11/1/91 *sh*
show grid/l=1:4 g24 g48
    GRID G24
 name       axis              # pts   start                end
 normal    X
 normal    Y
 normal    Z
 TAX24     TIME               732 r   01-JAN-1980 00:00    01-JAN-1982 00:00
 
       L     T                       TBOX          TBOXLO                TSTEP (HOURS)
       1>  01-JAN-1980 00:00:00      24         31-DEC-1979 12:00:00       87648
       2>  02-JAN-1980 00:00:00      24         01-JAN-1980 12:00:00       87672
       3>  03-JAN-1980 00:00:00      24         02-JAN-1980 12:00:00       87696
       4>  04-JAN-1980 00:00:00      24         03-JAN-1980 12:00:00       87720
    GRID G48
 name       axis              # pts   start                end
 normal    X
 normal    Y
 normal    Z
 TAX48     TIME               367 r   01-JAN-1980 00:00    02-JAN-1982 00:00
 
       L     T                       TBOX          TBOXLO                TSTEP (HOURS)
       1>  01-JAN-1980 00:00:00      48         31-DEC-1979 00:00:00       525960
       2>  03-JAN-1980 00:00:00      48         02-JAN-1980 00:00:00       526008
       3>  05-JAN-1980 00:00:00      48         04-JAN-1980 00:00:00       526056
       4>  07-JAN-1980 00:00:00      48         06-JAN-1980 00:00:00       526104
set region/t="1-jan-1980":"8-jan-1980"
let a24 = t[g=g24]
let a48 = t[g=g48]
list a24
             VARIABLE : T[G=G24]
             SUBSET   : 8 points (TIME)
 01-JAN-1980 00 / 1:  87648.
 02-JAN-1980 00 / 2:  87672.
 03-JAN-1980 00 / 3:  87696.
 04-JAN-1980 00 / 4:  87720.
 05-JAN-1980 00 / 5:  87744.
 06-JAN-1980 00 / 6:  87768.
 07-JAN-1980 00 / 7:  87792.
 08-JAN-1980 00 / 8:  87816.
list a48
             VARIABLE : T[G=G48]
             SUBSET   : 4 points (TIME)
 01-JAN-1980 00 / 1:  525960.
 03-JAN-1980 00 / 2:  526008.
 05-JAN-1980 00 / 3:  526056.
 07-JAN-1980 00 / 4:  526104.
list a24[g=g48]
             VARIABLE : T[G=G24]
                        regrid: G48
             SUBSET   : 4 points (TIME)
 01-JAN-1980 00 / 1:  87648.
 03-JAN-1980 00 / 2:  87696.
 05-JAN-1980 00 / 3:  87744.
 07-JAN-1980 00 / 4:  87792.
list a24[g=g48]-a48
             VARIABLE : A24[G=G48]-A48
             SUBSET   : 4 points (TIME)
 01-JAN-1980 00 / 1: -438312.
 03-JAN-1980 00 / 2: -438312.
 05-JAN-1980 00 / 3: -438312.
 07-JAN-1980 00 / 4: -438312.
*** Running ferret script: bn_ez.jnl
! bn401_ez.JNL
! test all manner of accessing non-TMAP data files
! V401 modified from bn200_ez.jnl by the addition of a test of UNF reading
 
 
! quick and dirty
FILE EZ.DAT
SHOW DATA/FULL
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 
 name     title                             I         J         K         L
 V1       V1                               1:5       ...       ...       ...
               on grid (G###) with -1.E+34 for missing data
             X=0.5:5.5  
 
 /FORMAT = FREE
 /SKIP = 0
 /COLUMNS = 1
LIST V1
             VARIABLE : V1
             FILENAME : EZ.DAT
             SUBSET   : 5 points (X)
 1   / 1:  0.0060
 2   / 2:  0.3550
 3   / 3:  0.4100
 4   / 4:  0.4350
 5   / 5:  0.4780
SHOW DATA
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 name     title                             I         J         K         L
 V1       V1                               1:5       ...       ...       ...
 
 
! first 2 values from each line
FILE/VAR="X1,X2" EZ.DAT
SHOW DATA/FULL
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 
 name     title                             I         J         K         L
 X1       X1                               1:5       ...       ...       ...
               on grid (G###) with -1.E+34 for missing data
             X=0.5:5.5  
 X2       X2                               1:5       ...       ...       ...
               on grid (G###) with -1.E+34 for missing data
             X=0.5:5.5  
 
 /FORMAT = FREE
 /SKIP = 0
 /COLUMNS = 2
LIST X1,X2
             DATA SET: ./data/EZ.DAT
             X: 0.5 to 5.5
 Column  1: X1
 Column  2: X2
             X1     X2
1   / 1:  0.0060  0.8865
2   / 2:  0.3550  0.6643
3   / 3:  0.4100  0.6071
4   / 4:  0.4350  0.5535
5   / 5:  0.4780  0.5337
SHOW DATA
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 name     title                             I         J         K         L
 X1       X1                               1:5       ...       ...       ...
 X2       X2                               1:5       ...       ...       ...
 
 
! all 6 values on each line
FILE/VAR="X1,X2"/COLUMNS=6 EZ.DAT
SHOW DATA/FULL
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 
 name     title                             I         J         K         L
 X1       X1                               1:15      ...       ...       ...
               on grid (G###) with -1.E+34 for missing data
             X=0.5:15.5  
 X2       X2                               1:15      ...       ...       ...
               on grid (G###) with -1.E+34 for missing data
             X=0.5:15.5  
 
 /FORMAT = FREE
 /SKIP = 0
 /COLUMNS = 6
LIST X1
             VARIABLE : X1
             FILENAME : EZ.DAT
             SUBSET   : 15 points (X)
 1    /  1:  0.0060
 2    /  2:  0.1760
 3    /  3:  0.2820
 4    /  4:  0.3550
 5    /  5:  0.3790
 6    /  6:  0.3930
 7    /  7:  0.4100
 8    /  8:  0.4170
 9    /  9:  0.4670
 10   / 10:  0.4350
 11   / 11:  0.4440
 12   / 12:  0.4700
 13   / 13:  0.4780
 14   / 14:  0.5150
 15   / 15:  0.4690
SHOW DATA
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 name     title                             I         J         K         L
 X1       X1                               1:15      ...       ...       ...
 X2       X2                               1:15      ...       ...       ...
 
 
! all 6 but skip first 2 lines
FILE/VAR="X1,X2"/COLUMNS=6/SKIP=2 EZ.DAT
SHOW DATA/FULL
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 
 name     title                             I         J         K         L
 X1       X1                               1:9       ...       ...       ...
               on grid (G###) with -1.E+34 for missing data
             X=0.5:9.5  
 X2       X2                               1:9       ...       ...       ...
               on grid (G###) with -1.E+34 for missing data
             X=0.5:9.5  
 
 /FORMAT = FREE
 /SKIP = 2
 /COLUMNS = 6
LIST X1
             VARIABLE : X1
             FILENAME : EZ.DAT
             SUBSET   : 9 points (X)
 1   / 1:  0.4100
 2   / 2:  0.4170
 3   / 3:  0.4670
 4   / 4:  0.4350
 5   / 5:  0.4440
 6   / 6:  0.4700
 7   / 7:  0.4780
 8   / 8:  0.5150
 9   / 9:  0.4690
SHOW DATA
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 name     title                             I         J         K         L
 X1       X1                               1:9       ...       ...       ...
 X2       X2                               1:9       ...       ...       ...
 
 
! take 1st and 4th values on each line as X1
FILE/VAR="X1,-,X2"/COLUMNS=6/SKIP=2 EZ.DAT
SHOW DATA/FULL
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 
 name     title                             I         J         K         L
 X1       X1                               1:9       ...       ...       ...
               on grid (G###) with -1.E+34 for missing data
             X=0.5:9.5  
 X2       X2                               1:9       ...       ...       ...
               on grid (G###) with -1.E+34 for missing data
             X=0.5:9.5  
 
 /FORMAT = FREE
 /SKIP = 2
 /COLUMNS = 6
LIST X1
             VARIABLE : X1
             FILENAME : EZ.DAT
             SUBSET   : 6 points (X)
 1   / 1:  0.4100
 2   / 2:  0.5935
 3   / 3:  0.4350
 4   / 4:  0.5458
 5   / 5:  0.4780
 6   / 6:  0.5147
SHOW DATA
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 name     title                             I         J         K         L
 X1       X1                               1:6       ...       ...       ...
 X2       X2                               1:6       ...       ...       ...
 
 
! specify the format explicitly
FILE/VAR="X1,X2"/COLUMNS=6/SKIP=2/FORMAT=(3(F14.0,F7.0)) EZ.DAT
SHOW DATA/FULL
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 
 name     title                             I         J         K         L
 X1       X1                               1:9       ...       ...       ...
               on grid (G###) with -1.E+34 for missing data
             X=0.5:9.5  
 X2       X2                               1:9       ...       ...       ...
               on grid (G###) with -1.E+34 for missing data
             X=0.5:9.5  
 
 /FORMAT = (3(F14.0,F7.0))
 /SKIP = 2
 /COLUMNS = 6
LIST X1
             VARIABLE : X1
             FILENAME : EZ.DAT
             SUBSET   : 9 points (X)
 1   / 1:  0.4100
 2   / 2:  0.4170
 3   / 3:  0.4670
 4   / 4:  0.4350
 5   / 5:  0.4440
 6   / 6:  0.4700
 7   / 7:  0.4780
 8   / 8:  0.5150
 9   / 9:  0.4690
SHOW DATA
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 name     title                             I         J         K         L
 X1       X1                               1:9       ...       ...       ...
 X2       X2                               1:9       ...       ...       ...
 
 
! specify the format to skip every second line
FILE/VAR="X1,X2"/COLUMNS=6/SKIP=1/FORMAT="(3(F14.0,F7.0)/)" EZ.DAT
SHOW DATA/FULL
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 
 name     title                             I         J         K         L
 X1       X1                               1:12      ...       ...       ...
               on grid (G###) with -1.E+34 for missing data
             X=0.5:12.5  
 X2       X2                               1:12      ...       ...       ...
               on grid (G###) with -1.E+34 for missing data
             X=0.5:12.5  
 
 /FORMAT = (3(F14.0,F7.0)/)
 /SKIP = 1
 /COLUMNS = 6
LIST X1
             VARIABLE : X1
             FILENAME : EZ.DAT
             SUBSET   : 6 points (X)
 1   / 1:  0.3550
 2   / 2:  0.3790
 3   / 3:  0.3930
 4   / 4:  0.4350
 5   / 5:  0.4440
 6   / 6:  0.4700
SHOW DATA
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 name     title                             I         J         K         L
 X1       X1                               1:6       ...       ...       ...
 X2       X2                               1:6       ...       ...       ...
 
 
! modify variable title
SET VARIABLE/TITLE="first variable" X1
SHOW DATA
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 name     title                             I         J         K         L
 X1       first variable                   1:6       ...       ...       ...
 X2       X2                               1:6       ...       ...       ...
 
 
! read onto a 2D grid
DEFINE AXIS/X=1:3:1 xez1
DEFINE GRID/X=XEZ1/Y=EZ GEZ1
FILE/VAR="X1,X2"/COLUMNS=6/GRID=GEZ1 EZ.DAT
SHOW DATA/FULL
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 
 name     title                             I         J         K         L
 X1       X1                               1:3       1:20480   ...       ...
               on grid GEZ1 with -1.E+34 for missing data
             X=0.5:3.5  Y=0.5:2.05E+04  
 X2       X2                               1:3       1:20480   ...       ...
               on grid GEZ1 with -1.E+34 for missing data
             X=0.5:3.5  Y=0.5:2.05E+04  
 
 /FORMAT = FREE
 /SKIP = 0
 /COLUMNS = 6
LIST X1
             VARIABLE : X1
             FILENAME : EZ.DAT
             SUBSET   : 3 by 5 points (X-Y)
             1       2       3     
              1       2       3
 1   / 1:  0.0060  0.1760  0.2820
 2   / 2:  0.3550  0.3790  0.3930
 3   / 3:  0.4100  0.4170  0.4670
 4   / 4:  0.4350  0.4440  0.4700
 5   / 5:  0.4780  0.5150  0.4690
SHOW DATA
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 name     title                             I         J         K         L
 X1       X1                               1:3       1:5       ...       ...
 X2       X2                               1:3       1:5       ...       ...
 
 
! read onto a 4D grid
DEFINE AXIS/X=1:1:1 xez2
DEFINE AXIS/Y=1:3:1 yez
DEFINE AXIS/Z=1:2:1 zez
DEFINE GRID/X=XEZ2/Y=YEZ/Z=ZEZ/T=EZ GEZ2
FILE/VAR="X1,X2"/COLUMNS=6/GRID=GEZ2 EZ.DAT
SHOW DATA/FULL
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 
 name     title                             I         J         K         L
 X1       X1                               1:1       1:3       1:2       1:20480
               on grid GEZ2 with -1.E+34 for missing data
             X=0.5:1.5  Y=0.5:3.5  Z=0.5:2.5  
 X2       X2                               1:1       1:3       1:2       1:20480
               on grid GEZ2 with -1.E+34 for missing data
             X=0.5:1.5  Y=0.5:3.5  Z=0.5:2.5  
 
 /FORMAT = FREE
 /SKIP = 0
 /COLUMNS = 6
LIST X1
             VARIABLE : X1
             FILENAME : EZ.DAT
             SUBSET   : 3 by 2 by 2 points (Y-Z-T)
             X        : 1
             1       2       3     
              1       2       3
 ---- L:1 T:   1
 1   / 1:  0.0060  0.1760  0.2820
 2   / 2:  0.3550  0.3790  0.3930
 ---- L:2 T:   2
 1   / 1:  0.4100  0.4170  0.4670
 2   / 2:  0.4350  0.4440  0.4700
SHOW DATA
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 name     title                             I         J         K         L
 X1       X1                               1:1       1:3       1:2       1:2
 X2       X2                               1:1       1:3       1:2       1:2
 
 
! truncate reading by grid size limit
! V702: *sh* note that with 3 columns of pairs and a request to read only
! 8 values total, the final record is incomplete.  These final values
! **do not get initialized**.  This has been reported in trac #2509
! The presence of uninitialized values can throw off the formatting of the output
DEFINE AXIS/X=1:8:1 xez3
DEFINE GRID/X=XEZ3 GEZ3
FILE/VAR="X1,X2"/COLUMNS=6/GRID=GEZ3 EZ.DAT
SHOW DATA/FULL
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 
 name     title                             I         J         K         L
 X1       X1                               1:8       ...       ...       ...
               on grid GEZ3 with -1.E+34 for missing data
             X=0.5:8.5  
 X2       X2                               1:8       ...       ...       ...
               on grid GEZ3 with -1.E+34 for missing data
             X=0.5:8.5  
 
 /FORMAT = FREE
 /SKIP = 0
 /COLUMNS = 6
LIST X1
             VARIABLE : X1
             FILENAME : EZ.DAT
             SUBSET   : 8 points (X)
 1   / 1:  0.0060
 2   / 2:  0.1760
 3   / 3:  0.2820
 4   / 4:  0.3550
 5   / 5:  0.3790
 6   / 6:  0.3930
 7   / 7:  0.0000
 8   / 8:  0.0000
SHOW DATA
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 name     title                             I         J         K         L
 X1       X1                               1:8       ...       ...       ...
 X2       X2                               1:8       ...       ...       ...
 
 
! 8/10/95 -- added tests of unformatted writing and reading
SP rm -f test.unf
LIST/FILE=test.unf/format=unf/i=1:10 i
file/form=unf/var=my_var test.unf
list my_var
             VARIABLE : my_var
             FILENAME : test.unf
             SUBSET   : 10 points (X)
 1    /  1:   1.00
 2    /  2:   2.00
 3    /  3:   3.00
 4    /  4:   4.00
 5    /  5:   5.00
 6    /  6:   6.00
 7    /  7:   7.00
 8    /  8:   8.00
 9    /  9:   9.00
 10   / 10:  10.00
*** Running ferret script: bn_plot.jnl
! bn450_plot.JNL - updated 9/97 from bn320_plot.jnl
! upgraded from bn320 to provide method for testing batch mode.  Also remove
! all labels to create "master" gif and ps files to compare against
! *kob*
! V530 - added tests of PLOT/STEP[=connected] to existing plots
! v581 - for the last set, cancel mode logo, so that .plt files are comparable.
 
! define a 6 viewport window (modified definitions 11/92)
def view/xlim=0,.333/ylim=0,.5    ll6
def view/xlim=0,.333/ylim=.5,1    ul6
def view/xlim=.333,.666/ylim=0,.5 lm6
def view/xlim=.333,.666/ylim=.5,1 um6
def view/xlim=.666,1/ylim=0,.5    lr6
def view/xlim=.666,1/ylim=.5,1    ur6
show view
 
 name             text    xlimits     ylimits    mode
 
 UPPER            1.00   0.00,1.00   0.50,1.00   edges
 LOWER            1.00   0.00,1.00   0.00,0.50   edges
 RIGHT            1.00   0.50,1.00   0.00,1.00   edges
 LEFT             1.00   0.00,0.50   0.00,1.00   edges
 LL               0.50   0.00,0.50   0.00,0.50   edges
 LR               0.50   0.50,1.00   0.00,0.50   edges
 UL               0.50   0.00,0.50   0.50,1.00   edges
 UR               0.50   0.50,1.00   0.50,1.00   edges
 FULL             1.00   0.00,1.00   0.00,1.00   edges
 LL6              0.41   0.00,0.33   0.00,0.50   edges
 UL6              0.41   0.00,0.33   0.50,1.00   edges
 LM6              0.41   0.33,0.67   0.00,0.50   edges
 UM6              0.41   0.33,0.67   0.50,1.00   edges
 LR6              0.41   0.67,1.00   0.00,0.50   edges
 UR6              0.41   0.67,1.00   0.50,1.00   edges
   current viewport is NONE
 
! some variables for plotting
let a = 0.8*sin(l/10)
let b = 0.6*cos(l/10)
let c = sin(100/(l+k))
let d = l/50
let e = k-(l/25)
let f = -.5+(l/125)
let g = (l-25)/(k*35)
let h = 0.1
let m = 0.2
 
! illegal plot commands
set mode ignore
plot/i=1:10/j=1:20/nolabel i+j			! not a line
plot/i=1:10/j=1:20/nolabel i,i+j		! not a line
plot/i=1:10/j=1:20/nolabel i+j,i		! not a line
plot/i=1:10/j=1:20/nolabel j,i			! differing axes
plot/i=1:10/j=1:20/vs/line/nolabel j,i		! unequal lengths
contour/i=1:10/j=1:20/nolabel i			! only 1 D
contour/i=1:10/j=1:20/nolabel i/j,j/i		! multiple fields
vector/i=1:10/j=1:20/nolabel i/j		! only 1 field
vector/i=1:10/j=1:20/nolabel i/j,j/i,i+j	! 3 fields
set mode/last ignore
 
! notice the default window size is 10.2,width x 8.8,height
ppl list plot
         WIDTH=   10.20  HEIGHT=    8.80  TKTYPE=    0  BAUD=  110
         WINDOW= ON   BOX= OFF  CROSS= 0  PLTYPE=  3
         PLOT MODE=   A
         PLOT FILE= .gif                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 
! enlarge it to accomodate an additional 50% width
ppl size 15.3,8.8
 
! turn on metafile (enabled 10/29/91)
! commented out 9/97 - instead set in bn450_all.jnl
! set mode metafile
 
! draw a plot into a viewport - to be deleted (check hard copy)
set view ll6
contour/i=1:50/j=1:50/nolabel i/(j+20)
 
! 4 frames testing PLOT output
set view ul6
plot/l=1:50/k=1/trans/nolabel a,b,c
plot/l=1:50/k=1/trans/over/line=6/nolabel d
plot/l=1:50/k=1/trans/over/symbol=88/nolabel e
plot/l=1:50/k=1/trans/over/symbol=47/line/nolabel f
def view/xlim=.333,1/ylim=0,.5 lm6   ! redefine longer in x (11/92)
set view lm6
!ppl axlen 16
set region/k=1
plot/l=1:50/nolabel a,b,c,d,e,f,g[k=1],g[k=2],a+h,b+h,c+h,d+h,e+h,f+h,g[k=1]+h,g[k=2]+h,a+m,b+m,c+m
def view/xlim=.333,1/ylim=.5,1 um6    ! redefine it longer in x (11/92)
set view um6
!ppl axlen 17,5
plot/l=1:50/nolabel sin(100/(l+5))
plot/l=1:50/over/nolabel a,b,c,d,e,f,g[k=1],g[k=2],a+h,b+h,c+h,d+h,e+h,f+h,g[k=1]+h,g[k=2]+h,a+m,b+m,c+m
set view ll6
!ppl axlen 8,6
plot/l=1:99000/nolabel sin(200000/(l+10000))
 
! reset to normal axis lengths and prepare for a new piccie
!ppl axlen 8
set wind/clear
 
! draw six frames
set view ll6
contour/i=1:50/j=1:50/levels=(0,2.5,.25)/nolabel i/(j+20)
plot/over/nolab/vs/line/i=1:50/j=1:50/nolabel 6*i/j,5*j/i
set view ul6
vector/i=1:50/j=1:50/length=50/aspect/nolabel sin(i/20)*10+j-20,-1*cos(j/10)*10+i-20
def view/text=.1/xlim=.333,.666/ylim=0,.5 lm6  ! redefine it (11/92)
set view lm6
shade/i=1:50/j=1:50/nolabel i/(j+20)
set view lr6
ppl lev () (0,2.5,.1)
shade/i=1:50/j=1:50/line/level/nolabel i/(j+20)
set view ur6
let icomp = (sin(i/20)*10+j-20)
let jcomp = (-1*cos(j/10)*10+i-20)
contour/i=1:50/j=1:50/nolabel icomp^2+jcomp^2
contour/i=1:50/j=1:50/over/level/nolabel icomp^2+(-1*cos(i/10)*80)^2
! note: "i-i" and "j-j" are needed to create 2D structures
vector/i=1:50/j=1:50/overlay/nolabel j-20+(i-i),i-20+(j-j)
vector/i=1:50/j=1:50/overlay/length/nolabel i-20+(j-j),40-j+(i-i)
def view/text=.6/xlim=.333,.666/ylim=.5,1 um6    ! redefine it (11/92)
set view um6
shade/i=1:50/j=1:50/nolabel i/(j+20)
contour/i=1:50/j=1:50/over/nolabel (sin(i/20)+j-20)^2+(-1*cos(j/10)+i-20)^2
vector/i=1:50/j=1:50/overlay/nolabel j-20+(i-i),i-20+(j-j)
 
! additions for version 3.01 "/TITLE=" controls
cancel viewports
set view ul6
plot/title="My Custom Title"/i=1:100/nolabel sin(i/6)
plot/title="My Custom Key"/i=1:100/over/nolabel sin(i/5)
set view um6
plot/title="My Custom Title"/i=1:100/nolabel sin(i/6),sin(i/9)
plot/title="My Custom Key"/i=1:100/over/nolabel sin(i/7),sin(i/10)
set view ur6
plot/vs/line/title="My Custom Title"/i=1:100/nolabel sin(i/6),sin(i/9)
plot/vs/line/title="My Custom Key"/i=1:100/over/nolabel sin(i/7),sin(i/10)
set view ll6
plot/vs/line/title="My Custom Title"/i=1:100/nolabel sin(i/6),sin(i/9),sin(i/12)
plot/vs/line/title="My Custom Key"/i=1:100/over/nolabel sin(i/7),sin(i/10)
set view lm6
contour/i=1:20/j=1:20/title="My Contour Title"/nolabel sin(i/3)*cos(j/4)
contour/over/i=5:30/j=5:30/title="My Contour Overlay"/nolabel sin(i/2)*cos(j/3)
set view lr6
wire/view=0,0,2/i=1:20/j=1:20/title="My Egg Carton"/nolabel sin(i/3)*cos(j/4)
 
! addition for 3.20 showing changed default behavior of plot/vs
! return to window and redraw with symbols
set view ll6
plot/vs/title="My Custom Title"/i=1:100/nolabel sin(i/6),sin(i/9),sin(i/12)
plot/vs/title="My Custom Key"/i=1:100/over/nolabel sin(i/7),sin(i/10)
 
! test of qualifiers added for V510
cancel viewport
set wind/asp=.75/clear
set view ul
plot/i=1:10/ylimits=1:40/nolabel i      ! note that /nolabel supresses XLAB
plot/i=1:10/over/sym=2 i^1.1
plot/i=1:10/over/sym=2/size=.12 i^1.2
plot/i=1:10/over/sym=2/color=red i^1.3
plot/i=1:10/over/thick/step/color=light_blue i^1.4
plot/i=1:10/over/thick/color=blue/step=connected i^1.5
plot/i=1:10/over/thick=3/color=purple/size=.14 i^1.6
 
! deliberate error
set mode ignore
plot/over/i=1:10/color=noexist i
plot/over/i=1:10/thick=4 i
plot/over/i=1:10/size=-1 i
set mode/last ignore
 
can mode logo
set view ur
let eps = .1; plot/vs RANDU(I[i=1:10]+eps), RANDU(I[i=1:10]+10+eps)
let eps = .2; plot/vs/over/sym=2  RANDU(I[i=1:10]+eps), RANDU(I[i=1:10]+10+eps)
let eps = .3; plot/vs/over/line/size=.12 RANDU(I[i=1:10]+eps), RANDU(I[i=1:10]+10+eps)
let eps = .4; plot/vs/over/line/sym=2/color=red RANDU(I[i=1:10]+eps), RANDU(I[i=1:10]+10+eps)
let eps = .5; plot/vs/over/thick RANDU(I[i=1:10]+eps), RANDU(I[i=1:10]+10+eps)
let eps = .6; plot/vs/over/thick/color=blue RANDU(I[i=1:10]+eps), RANDU(I[i=1:10]+10+eps)
let eps = .7; plot/vs/over/thick=3/color=purple/size=.14 RANDU(I[i=1:10]+eps), RANDU(I[i=1:10]+10+eps)
 
set view ll
contour/color=lightBlue/sig=1/size=.12 x[x=0:1:.1]*SIN(Y[y=0:6.3:.2])
vector/over/thick=3/color=green x[x=0:1:.1]*SIN(Y[y=0:6.3:.2]),x[x=0:1:.1]*COS(Y[y=0:6.3:.2])
 
! deliberate error
set mode ignore
cont/over/i=1:10/color=noexist i
cont/over/i=1:10/thick=4 i
cont/over/i=1:10/sigdig=-1 i
set mode/last ignore
 
set view lr
polygon/thick/color=red/palette=blue {1,2,1}, {2,1,0.5}
 
set mode/last logo
*** Running ferret script: bn_curv.jnl
cancel mode ignore
!
! Your basic map projection
!
! v 4.91 - *kob* 2/98 - just clean up window a bit before plotting and remove
!		        all the ferret labels in order to be able to automate
!			metafile checking.
can view all
! 2/98 *kob* just clean up the window a bit
! 4/05 *acm* save only one of the plots as a metafile for checking; had four of them.
 
can mode meta
set view full
set wind/clear/asp=1
 
use coads_climatology
set region/l=3
go mp_sinusoidal
set grid sst
shade/nolabel sst, x_page, y_page
 
!
! A more complex projection
!
set mode meta bnplot.plt
go mp_orthographic 210 45
set grid sst
let masked_sst = sst * mp_mask
fill/nolabel/title="Orthographic View" masked_sst, x_page, y_page
 
!
! Some of the utility functions
!
!go mp_fland
go mp_land
go mp_label 237.7 47.6 -1 0 .1 @IISeattle
go mp_label 204.4 19.5 -1 0 .1 @IIHawaii
go mp_graticule
go mp_graticule 160 200 40 50 65 15 11
go mp_label 180 45 0 -22 .15 "@p5@DRThe Bering Sea"
 
! move the cancel mode meta to avoid changes in the plot output
can mode meta
 
!  Some map projections use 1-D x_page and y_page
!  (mp_mercator, mp_plate_caree, mp_lambert_cyl). Test the
!  whole zoo of map projection scripts.
 
go bn_mp_zoo.jnl
! bn_mp_zoo.jnl
! taken from mp_demo.jnl
! acm 9/2005
!
 
define viewport/xlimits=0.000,0.333/ylim=0.666,0.999 tl
define viewport/xlimits=0.000,0.333/ylim=0.333,0.666 ml
define viewport/xlimits=0.000,0.333/ylim=0.000,0.333 bl
define viewport/xlimits=0.333,0.666/ylim=0.666,0.999 tm
define viewport/xlimits=0.333,0.666/ylim=0.333,0.666 mm
define viewport/xlimits=0.333,0.666/ylim=0.000,0.333 bm
define viewport/xlimits=0.666,0.999/ylim=0.666,0.999 tr
define viewport/xlimits=0.666,0.999/ylim=0.333,0.666 mr
define viewport/xlimits=0.666,0.999/ylim=0.000,0.333 br
 
use coads_climatology
set region/l=1/y=0:90
 
set view tl
go margins .2, .6, .2, .2
go mp_hammer
set grid sst
shade/nolab/nokey/noaxes sst, x_page, y_page
label/nouser `($PPL$XLEN)*0.5`,-0.4,0,0,.20 Hammer
 !-> PPL %LABEL/nouser 2.5335,-0.4,0,0,.20 Hammer
 
set view tm
go mp_sinusoidal
go margins .2, .6, .2, .2
shade/nolab/nokey/noaxes sst, x_page, y_page
label/nouser `($PPL$XLEN)*0.5`,-0.4,0,0,.20 Sinusoidal
 !-> PPL %LABEL/nouser 2.5335,-0.4,0,0,.20 Sinusoidal
 
set view tr
go mp_lambert_cyl
go margins .2, .6, .2, .2
shade/nolab/nokey/noaxes sst, x_page, y_page
label/nouser `($PPL$XLEN)*0.5`,-0.4,0,0,.20 Lambert Equal Area
 !-> PPL %LABEL/nouser 2.5335,-0.4,0,0,.20 Lambert Equal Area
 
set view ml
go mp_bonne
go margins .2, .6, .2, .2
shade/nolab/nokey/noaxes sst, x_page, y_page
label/nouser `($PPL$XLEN)*0.5`,-0.4,0,0,.20 Bonne
 !-> PPL %LABEL/nouser 2.5335,-0.4,0,0,.20 Bonne
 
set view mm
go mp_mcbryde_fpp
go margins .2, .6, .2, .2
shade/nolab/nokey/noaxes sst, x_page, y_page
label/nouser `($PPL$XLEN)*0.5`,-0.4,0,0,.20 McBryde Flat Polar
 !-> PPL %LABEL/nouser 2.5335,-0.4,0,0,.20 McBryde Flat Polar
 
set view mr
go mp_polyconic
go margins .2, .6, .2, .2
shade/nolab/nokey/noaxes sst, x_page, y_page
label/nouser `($PPL$XLEN)*0.5`,-0.4,0,0,.20 Polyconic
 !-> PPL %LABEL/nouser 2.5335,-0.4,0,0,.20 Polyconic
 
set view bl
go mp_orthographic 300 45
go margins .2, .6, .2, .2
let masked_sst = sst * mp_mask
shade/nolab/nokey/noaxes masked_sst, x_page, y_page
label/nouser `($PPL$XLEN)*0.5`,-0.4,0,0,.20 OrthoGraphic
 !-> PPL %LABEL/nouser 2.5335,-0.4,0,0,.20 OrthoGraphic
 
set view bm
set region/x=240:420
go mp_stereographic_eq
go margins .2, .6, .2, .2
shade/nolab/nokey/noaxes sst, x_page, y_page

 PPL warning: You're attempting to use more colors than are available.
             Using PPL SHASET RESET to re-use protected colors may help.

label/nouser `($PPL$XLEN)*0.5`,-0.4,0,0,.20 Stereographic Equatorial
 !-> PPL %LABEL/nouser 2.5335,-0.4,0,0,.20 Stereographic Equatorial
 
set view br
set region/x=0:360/y=00:90
go mp_stereographic_north
go margins .2, .6, .2, .2
shade/nolab/nokey/noaxes sst, x_page, y_page

 PPL warning: You're attempting to use more colors than are available.
             Using PPL SHASET RESET to re-use protected colors may help.

label/nouser `($PPL$XLEN)*0.5`,-0.4,0,0,.20 Stereographic North
 !-> PPL %LABEL/nouser 2.5335,-0.4,0,0,.20 Stereographic North
 
can region
cancel viewport
exit
 
!
! What can go wrong
!
 
! Do we catch incorrect region specifications?
can region
go mp_sinusoidal
set grid sst
set region/x=145
set mode ignore
shade/nolabel sst, x_page, y_page ! DELIBERATE ERROR
can region
 
! Crazy stuff with the transformation fields:
set region/l=1
let phi = y * deg2rad
shade/nolabel sst, 0*x_page, y_page ! DELIBERATE ERROR
shade/nolabel sst, x_page, 0*y_page ! DELIBERATE ERROR
shade/nolabel sst, x_page, sin(y_page)
shade/nolabel sst, randn(x_page), randn(y_page)
!2/98 *kob* - can mode meta before this plot
can mode meta
shade/nolabel sst, x_page[j=1:12], y_page ! DELIBERATE ERROR
shade/nolabel sst, x_page, asin(y_page) ! DELIBERATE ERROR
 
shade/nolabel sst, x_page, y_page ! DELIBERATE gsetviewport() ERROR
 
 
can win 1
set win 1
 
!2/98 *kob* - set mode meta again
!sset mode meta bnplot.plt
let phi = l * deg2rad
shade/nolabel sst, x_page, y_page
shade/nolabel sst, x_page[j=1:12], y_page ! DELIBERATE ERROR
can mode ignore
 
set mode meta bnplot.plt
*** Running ferret script: bn_symbols.jnl
! bn420_symbols
! benchmark to test machinery of symbol definition and use
! requires FERRET version 4.00 or later
 
! note on max number of symbols:
! As of 6/95 (version 4.01) an attempt to define more that 1000 symbols
! will encounter a PLOT+   "STOP 'exceeded symbol storage'"
 
! bn420 - 10/95 -- make sure that symbols at start and end aren't
!		confused with enclosing parens
!	  4/96 -- test symbol editing in the style of dollar args
!	       -- use template notation for SHOW SYMBOL and CANCEL SYMBOL
 
! V510: added tests of backslash escaping
! V533: *sh* 7/01 - Ferret allows single quoted strings -- syntax change
 
cancel symbols/all
show symbols/all
PPL$XPIXEL = "0"
PPL$YPIXEL = "0"
BYTEORDER = "LITTLE"
FERRET_VERSION = "7.6"
FERRET_PLATFORM = "Linux 3.10.0-1127.10.1.el7.x86_64 64-bit"
FERRET_PRECISION = "double"
NETCDF_VERSION = "4.6.3 of Mar 21 2019 12:17:08 $"
FERRET_MEMORY = "62.5"
FERRET_BYTES_MEM = "500Mb"
SESSION_DATE = "DD-MON-YY"
SESSION_TIME = "HH:MM"
SESSION_PID = "#####"
DELTA_CPU = "######"
CLOCK_SECS = "######"
CURRENT_DATE = "DD-MON-YY"
CURRENT_TIME = "HH:MM:SS"
N_OPEN_DSETS = "0"
PROGRAM_NAME = "Ferret"
PEAK_MEMORY = "0"
SPAWN_OK = "1"
SPAWN_STATUS = "0"
 
! define some symbols ... syntax variations
define symbol s1 = hello
define symbol s2 = "hello"
define symbol s3  "hello and goodbye"
define symbol num = 3
define symbol t$dollar = hi
define symbol t_($s1) = hi	! define "t_hello" as a symbol
 !-> define symbol t_hello = hi
 
! exercise SHOW SYMBOL
show symbol/all
PPL$XPIXEL = "0"
PPL$YPIXEL = "0"
BYTEORDER = "LITTLE"
FERRET_VERSION = "7.6"
FERRET_PLATFORM = "Linux 3.10.0-1127.10.1.el7.x86_64 64-bit"
FERRET_PRECISION = "double"
NETCDF_VERSION = "4.6.3 of Mar 21 2019 12:17:08 $"
FERRET_MEMORY = "62.5"
FERRET_BYTES_MEM = "500Mb"
SESSION_DATE = "DD-MON-YY"
SESSION_TIME = "HH:MM"
SESSION_PID = "#####"
DELTA_CPU = "######"
CLOCK_SECS = "######"
CURRENT_DATE = "DD-MON-YY"
CURRENT_TIME = "HH:MM:SS"
N_OPEN_DSETS = "0"
PROGRAM_NAME = "Ferret"
PEAK_MEMORY = "0"
SPAWN_OK = "1"
SPAWN_STATUS = "0"
S1 = "hello"
S2 = ""hello""
S3 = "hello and goodbye"
NUM = "3"
T$DOLLAR = "hi"
T_HELLO = "hi"
show symbol s*
SESSION_DATE = "DD-MON-YY"
SESSION_TIME = "HH:MM"
SESSION_PID = "#####"
SPAWN_OK = "1"
SPAWN_STATUS = "0"
S1 = "hello"
S2 = ""hello""
S3 = "hello and goodbye"
show symbol s2
S2 = ""hello""
 
! exercise CANCEL SYMBOL
cancel symbol s2
show symbol s*
SESSION_DATE = "DD-MON-YY"
SESSION_TIME = "HH:MM"
SESSION_PID = "#####"
SPAWN_OK = "1"
SPAWN_STATUS = "0"
S1 = "hello"
S3 = "hello and goodbye"
show symbol S*
SESSION_DATE = "DD-MON-YY"
SESSION_TIME = "HH:MM"
SESSION_PID = "#####"
SPAWN_OK = "1"
SPAWN_STATUS = "0"
S1 = "hello"
S3 = "hello and goodbye"
cancel symbol s2	! already deleted
 
! exercise symbol translation
message/continue ($s1)
 !-> message/continue hello
hello
message/continue ($s1) and ($S3)
 !-> message/continue hello and hello and goodbye
hello and hello and goodbye
message/continue ($s1) and ($s`3`)	! no good - grave accent evaluated AFTER
 !-> message/continue hello and
hello and
message/continue ($s1) and ($s($num))	! nested symbol translation gets ($S3)
 !-> message/continue hello and hello and goodbye
hello and hello and goodbye
 
! demonstrate the 30 character cap on symbol length
! In Ferret v6.85+ this becomse a 120-character length.
define symbol q23456789012345678901234567890 = 4
show symbol q*
Q23456789012345678901234567890 = "4"
define symbol q23456789012345678901234567890aaaaa = 5
define symbol q23456789012345678901234567xxxaaaaa = 6
show symbol q*
Q23456789012345678901234567890 = "4"
Q23456789012345678901234567890AAAAA = "5"
Q23456789012345678901234567XXXAAAAA = "6"
 
! show the upper left coordinate limits labels as symbols
plot/i=1:100/y=10/z=5/set_up SIN(I/6)+Y+Z
show symbol lab*
LABX = "X"
LAB1 = "Y : 10"
LABNUM_Y = "1"
LAB2 = "Z : 5"
LABNUM_Z = "2"
LABY = ""
LABTIT = "SIN(I/6)+Y+Z"
message/continue Z value saved as  ($LAB($LABNUM_Z))
 !-> message/continue Z value saved as  Z : 5
Z value saved as  Z : 5
message/continue Y value saved as "($LAB($LABNUM_Y))"
 !-> message/continue Y value saved as "Y : 10"
Y value saved as "Y : 10"
message/continue No T value saved: "($LAB($LABNUM_T))"
 !-> message/continue No T value saved: " "
No T value saved: " "
 
! template tests (4/23/96)
cancel symbol lab?
show symbol lab*
LABNUM_Y = "1"
LABNUM_Z = "2"
LABTIT = "SIN(I/6)+Y+Z"
show symbol lab*y
LABNUM_Y = "1"
 
! deliberate errors
set mode ignore_errors
define symbol test* = hello
define symbol t$5 = hi
set mode/last ignore_errors
 
! bn420 - check enclosing parens
define symbol cmnd "show symbol"; define symbol arg "cmnd"
($cmnd) ($arg)
 !-> show symbol cmnd
CMND = "show symbol"
 
! bn420 - check symbol editing
define symbol test "\"I'm here\""   ! added surrounding quotes V533
define symbol t2 hello
cancel symbol test2
message/continue ($test)
 !-> message/continue "I'm here"
I'm here
message/continue ($test"default")
 !-> message/continue "I'm here"
I'm here
message/continue ($test2"default")
 !-> message/continue default
default
 
message/continue ($t2"|hello|bye|")
 !-> message/continue hello
hello
message/continue ($t2"|hello>really hello|bye|")
 !-> message/continue really hello
really hello
message/continue ($t2"|hello>you said: *|bye|")
 !-> message/continue you said: hello
you said: hello
message/continue ($test"|*>you said: *|bye|")
 !-> message/continue you said: "I'm here"
you said: "I'm here"
 
! deliberate errors
set mode ignore_errors
message/continue ($test2"<error message")
message/continue ($test2"|hello|bye|")
message/continue ($test2"|hello|bye|<error message")	! silent error
message/continue ($t2"|solong>really hello|bye|")
set mode/last ignore_errors
 
! V510 - added processing of backslash escapes
define symbol ss \"hello\"
show symbol ss
SS = ""hello""
define symbol ss "\"hello\""
show symbol ss
SS = ""hello""
define symbol delayed_eval \`1+1\`
show symbol delayed_eval
DELAYED_EVAL = "`1+1`"
say ($delayed_eval)         ! translate symbol and then evaluate
 !-> MESSAGE/CONTINUE 2
2
 
 
! cleanup
cancel symbols/all
show symbols/all
PPL$XPIXEL = "0"
PPL$YPIXEL = "0"
BYTEORDER = "LITTLE"
FERRET_VERSION = "7.6"
FERRET_PLATFORM = "Linux 3.10.0-1127.10.1.el7.x86_64 64-bit"
FERRET_PRECISION = "double"
NETCDF_VERSION = "4.6.3 of Mar 21 2019 12:17:08 $"
FERRET_MEMORY = "62.5"
FERRET_BYTES_MEM = "500Mb"
SESSION_DATE = "DD-MON-YY"
SESSION_TIME = "HH:MM"
SESSION_PID = "#####"
DELTA_CPU = "######"
CLOCK_SECS = "######"
CURRENT_DATE = "DD-MON-YY"
CURRENT_TIME = "HH:MM:SS"
N_OPEN_DSETS = "0"
PROGRAM_NAME = "Ferret"
PEAK_MEMORY = "201"
SPAWN_OK = "1"
SPAWN_STATUS = "0"
 
*** Running ferret script: bn_comma_delimited.jnl
! bn420_comma_delimited
 
! 10/2/95 - test comma and tab-delimited outputs
! 3/2018: Note with changes for high-resolution time
! axes,the output of LIST/FORM=COMMA var on a time
! axis will format the time as 10-SEP-1982 20:00,
! where previously the :mm minutes were left off.
 
use gt4d011
 
! all possible 1, 2, and 3 dimensional lists
!XYZT
set region/i=95:96/j=41:42/k=2:3/l=5:6
go bn_comma_delimited.sub comma temp
! bn420_comma_delimited.sub
! 10/95 benchmark various permutations for FERRET listed output
 
! similar to bn200_permute except that a "format" argument can be passed
! and the region and expression information are external
 
! usage:
!	SET REGION/xxxx
!	GO bn420_permute tab_delimited  TEMP
 
LOAD $2
 !-> LOAD temp
 
LIST/ORDER=XYZT $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=XYZT /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
   135.5W   ,134.5W   
 ---- L:5 T:   10-SEP-1982 20:00
 ---- K:2 Z:   15
1.5S,27.33,27.22
1.167S,27.24,27.12
 ---- K:3 Z:   25
1.5S,27.25,27.12
1.167S,27.13,27.01
 ---- L:6 T:   16-SEP-1982 22:00
 ---- K:2 Z:   15
1.5S,27.78,27.62
1.167S,27.68,27.52
 ---- K:3 Z:   25
1.5S,27.65,27.49
1.167S,27.51,27.35
LIST/ORDER=XYTZ $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=XYTZ /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (LONGITUDE-LATITUDE-TIME-DEPTH (m))
   135.5W   ,134.5W   
 ---- K:2 Z:   15
 ---- L:5 T:   10-SEP-1982 20:00
1.5S,27.33,27.22
1.167S,27.24,27.12
 ---- L:6 T:   16-SEP-1982 22:00
1.5S,27.78,27.62
1.167S,27.68,27.52
 ---- K:3 Z:   25
 ---- L:5 T:   10-SEP-1982 20:00
1.5S,27.25,27.12
1.167S,27.13,27.01
 ---- L:6 T:   16-SEP-1982 22:00
1.5S,27.65,27.49
1.167S,27.51,27.35
LIST/ORDER=XZYT $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=XZYT /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (LONGITUDE-DEPTH (m)-LATITUDE-TIME)
   135.5W   ,134.5W   
 ---- L:5 T:   10-SEP-1982 20:00
 ---- J:41 Y:   1.5S
15,27.33,27.22
25,27.25,27.12
 ---- J:42 Y:   1.167S
15,27.24,27.12
25,27.13,27.01
 ---- L:6 T:   16-SEP-1982 22:00
 ---- J:41 Y:   1.5S
15,27.78,27.62
25,27.65,27.49
 ---- J:42 Y:   1.167S
15,27.68,27.52
25,27.51,27.35
LIST/ORDER=XZTY $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=XZTY /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (LONGITUDE-DEPTH (m)-TIME-LATITUDE)
   135.5W   ,134.5W   
 ---- J:41 Y:   1.5S
 ---- L:5 T:   10-SEP-1982 20:00
15,27.33,27.22
25,27.25,27.12
 ---- L:6 T:   16-SEP-1982 22:00
15,27.78,27.62
25,27.65,27.49
 ---- J:42 Y:   1.167S
 ---- L:5 T:   10-SEP-1982 20:00
15,27.24,27.12
25,27.13,27.01
 ---- L:6 T:   16-SEP-1982 22:00
15,27.68,27.52
25,27.51,27.35
LIST/ORDER=XTYZ $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=XTYZ /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (LONGITUDE-TIME-LATITUDE-DEPTH (m))
          135.5W   ,134.5W   
 ---- K:2 Z:   15
 ---- J:41 Y:   1.5S
10-SEP-1982 20:00,27.33,27.22
16-SEP-1982 22:00,27.78,27.62
 ---- J:42 Y:   1.167S
10-SEP-1982 20:00,27.24,27.12
16-SEP-1982 22:00,27.68,27.52
 ---- K:3 Z:   25
 ---- J:41 Y:   1.5S
10-SEP-1982 20:00,27.25,27.12
16-SEP-1982 22:00,27.65,27.49
 ---- J:42 Y:   1.167S
10-SEP-1982 20:00,27.13,27.01
16-SEP-1982 22:00,27.51,27.35
LIST/ORDER=XTZY $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=XTZY /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (LONGITUDE-TIME-DEPTH (m)-LATITUDE)
          135.5W   ,134.5W   
 ---- J:41 Y:   1.5S
 ---- K:2 Z:   15
10-SEP-1982 20:00,27.33,27.22
16-SEP-1982 22:00,27.78,27.62
 ---- K:3 Z:   25
10-SEP-1982 20:00,27.25,27.12
16-SEP-1982 22:00,27.65,27.49
 ---- J:42 Y:   1.167S
 ---- K:2 Z:   15
10-SEP-1982 20:00,27.24,27.12
16-SEP-1982 22:00,27.68,27.52
 ---- K:3 Z:   25
10-SEP-1982 20:00,27.13,27.01
16-SEP-1982 22:00,27.51,27.35
LIST/ORDER=YXZT $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=YXZT /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (LATITUDE-LONGITUDE-DEPTH (m)-TIME)
   1.5S  ,1.167S
 ---- L:5 T:   10-SEP-1982 20:00
 ---- K:2 Z:   15
135.5W,27.33,27.24
134.5W,27.22,27.12
 ---- K:3 Z:   25
135.5W,27.25,27.13
134.5W,27.12,27.01
 ---- L:6 T:   16-SEP-1982 22:00
 ---- K:2 Z:   15
135.5W,27.78,27.68
134.5W,27.62,27.52
 ---- K:3 Z:   25
135.5W,27.65,27.51
134.5W,27.49,27.35
LIST/ORDER=YXTZ $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=YXTZ /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (LATITUDE-LONGITUDE-TIME-DEPTH (m))
   1.5S  ,1.167S
 ---- K:2 Z:   15
 ---- L:5 T:   10-SEP-1982 20:00
135.5W,27.33,27.24
134.5W,27.22,27.12
 ---- L:6 T:   16-SEP-1982 22:00
135.5W,27.78,27.68
134.5W,27.62,27.52
 ---- K:3 Z:   25
 ---- L:5 T:   10-SEP-1982 20:00
135.5W,27.25,27.13
134.5W,27.12,27.01
 ---- L:6 T:   16-SEP-1982 22:00
135.5W,27.65,27.51
134.5W,27.49,27.35
LIST/ORDER=YZXT $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=YZXT /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (LATITUDE-DEPTH (m)-LONGITUDE-TIME)
   1.5S  ,1.167S
 ---- L:5 T:   10-SEP-1982 20:00
 ---- I:95 X:   135.5W
15,27.33,27.24
25,27.25,27.13
 ---- I:96 X:   134.5W
15,27.22,27.12
25,27.12,27.01
 ---- L:6 T:   16-SEP-1982 22:00
 ---- I:95 X:   135.5W
15,27.78,27.68
25,27.65,27.51
 ---- I:96 X:   134.5W
15,27.62,27.52
25,27.49,27.35
LIST/ORDER=YZTX $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=YZTX /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (LATITUDE-DEPTH (m)-TIME-LONGITUDE)
   1.5S  ,1.167S
 ---- I:95 X:   135.5W
 ---- L:5 T:   10-SEP-1982 20:00
15,27.33,27.24
25,27.25,27.13
 ---- L:6 T:   16-SEP-1982 22:00
15,27.78,27.68
25,27.65,27.51
 ---- I:96 X:   134.5W
 ---- L:5 T:   10-SEP-1982 20:00
15,27.22,27.12
25,27.12,27.01
 ---- L:6 T:   16-SEP-1982 22:00
15,27.62,27.52
25,27.49,27.35
LIST/ORDER=YTXZ $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=YTXZ /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (LATITUDE-TIME-LONGITUDE-DEPTH (m))
          1.5S  ,1.167S
 ---- K:2 Z:   15
 ---- I:95 X:   135.5W
10-SEP-1982 20:00,27.33,27.24
16-SEP-1982 22:00,27.78,27.68
 ---- I:96 X:   134.5W
10-SEP-1982 20:00,27.22,27.12
16-SEP-1982 22:00,27.62,27.52
 ---- K:3 Z:   25
 ---- I:95 X:   135.5W
10-SEP-1982 20:00,27.25,27.13
16-SEP-1982 22:00,27.65,27.51
 ---- I:96 X:   134.5W
10-SEP-1982 20:00,27.12,27.01
16-SEP-1982 22:00,27.49,27.35
LIST/ORDER=YTZX $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=YTZX /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (LATITUDE-TIME-DEPTH (m)-LONGITUDE)
          1.5S  ,1.167S
 ---- I:95 X:   135.5W
 ---- K:2 Z:   15
10-SEP-1982 20:00,27.33,27.24
16-SEP-1982 22:00,27.78,27.68
 ---- K:3 Z:   25
10-SEP-1982 20:00,27.25,27.13
16-SEP-1982 22:00,27.65,27.51
 ---- I:96 X:   134.5W
 ---- K:2 Z:   15
10-SEP-1982 20:00,27.22,27.12
16-SEP-1982 22:00,27.62,27.52
 ---- K:3 Z:   25
10-SEP-1982 20:00,27.12,27.01
16-SEP-1982 22:00,27.49,27.35
LIST/ORDER=ZXYT $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=ZXYT /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (DEPTH (m)-LONGITUDE-LATITUDE-TIME)
   15      ,25      
 ---- L:5 T:   10-SEP-1982 20:00
 ---- J:41 Y:   1.5S
135.5W,27.33,27.25
134.5W,27.22,27.12
 ---- J:42 Y:   1.167S
135.5W,27.24,27.13
134.5W,27.12,27.01
 ---- L:6 T:   16-SEP-1982 22:00
 ---- J:41 Y:   1.5S
135.5W,27.78,27.65
134.5W,27.62,27.49
 ---- J:42 Y:   1.167S
135.5W,27.68,27.51
134.5W,27.52,27.35
LIST/ORDER=ZXTY $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=ZXTY /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (DEPTH (m)-LONGITUDE-TIME-LATITUDE)
   15      ,25      
 ---- J:41 Y:   1.5S
 ---- L:5 T:   10-SEP-1982 20:00
135.5W,27.33,27.25
134.5W,27.22,27.12
 ---- L:6 T:   16-SEP-1982 22:00
135.5W,27.78,27.65
134.5W,27.62,27.49
 ---- J:42 Y:   1.167S
 ---- L:5 T:   10-SEP-1982 20:00
135.5W,27.24,27.13
134.5W,27.12,27.01
 ---- L:6 T:   16-SEP-1982 22:00
135.5W,27.68,27.51
134.5W,27.52,27.35
LIST/ORDER=ZYXT $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=ZYXT /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (DEPTH (m)-LATITUDE-LONGITUDE-TIME)
   15      ,25      
 ---- L:5 T:   10-SEP-1982 20:00
 ---- I:95 X:   135.5W
1.5S,27.33,27.25
1.167S,27.24,27.13
 ---- I:96 X:   134.5W
1.5S,27.22,27.12
1.167S,27.12,27.01
 ---- L:6 T:   16-SEP-1982 22:00
 ---- I:95 X:   135.5W
1.5S,27.78,27.65
1.167S,27.68,27.51
 ---- I:96 X:   134.5W
1.5S,27.62,27.49
1.167S,27.52,27.35
LIST/ORDER=ZYTX $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=ZYTX /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (DEPTH (m)-LATITUDE-TIME-LONGITUDE)
   15      ,25      
 ---- I:95 X:   135.5W
 ---- L:5 T:   10-SEP-1982 20:00
1.5S,27.33,27.25
1.167S,27.24,27.13
 ---- L:6 T:   16-SEP-1982 22:00
1.5S,27.78,27.65
1.167S,27.68,27.51
 ---- I:96 X:   134.5W
 ---- L:5 T:   10-SEP-1982 20:00
1.5S,27.22,27.12
1.167S,27.12,27.01
 ---- L:6 T:   16-SEP-1982 22:00
1.5S,27.62,27.49
1.167S,27.52,27.35
LIST/ORDER=ZTXY $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=ZTXY /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (DEPTH (m)-TIME-LONGITUDE-LATITUDE)
          15      ,25      
 ---- J:41 Y:   1.5S
 ---- I:95 X:   135.5W
10-SEP-1982 20:00,27.33,27.25
16-SEP-1982 22:00,27.78,27.65
 ---- I:96 X:   134.5W
10-SEP-1982 20:00,27.22,27.12
16-SEP-1982 22:00,27.62,27.49
 ---- J:42 Y:   1.167S
 ---- I:95 X:   135.5W
10-SEP-1982 20:00,27.24,27.13
16-SEP-1982 22:00,27.68,27.51
 ---- I:96 X:   134.5W
10-SEP-1982 20:00,27.12,27.01
16-SEP-1982 22:00,27.52,27.35
LIST/ORDER=ZTYX $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=ZTYX /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (DEPTH (m)-TIME-LATITUDE-LONGITUDE)
          15      ,25      
 ---- I:95 X:   135.5W
 ---- J:41 Y:   1.5S
10-SEP-1982 20:00,27.33,27.25
16-SEP-1982 22:00,27.78,27.65
 ---- J:42 Y:   1.167S
10-SEP-1982 20:00,27.24,27.13
16-SEP-1982 22:00,27.68,27.51
 ---- I:96 X:   134.5W
 ---- J:41 Y:   1.5S
10-SEP-1982 20:00,27.22,27.12
16-SEP-1982 22:00,27.62,27.49
 ---- J:42 Y:   1.167S
10-SEP-1982 20:00,27.12,27.01
16-SEP-1982 22:00,27.52,27.35
LIST/ORDER=TXYZ $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=TXYZ /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (TIME-LONGITUDE-LATITUDE-DEPTH (m))
   10-SEP-1982 20:00,16-SEP-1982 22:00
 ---- K:2 Z:   15
 ---- J:41 Y:   1.5S
135.5W,27.33,27.78
134.5W,27.22,27.62
 ---- J:42 Y:   1.167S
135.5W,27.24,27.68
134.5W,27.12,27.52
 ---- K:3 Z:   25
 ---- J:41 Y:   1.5S
135.5W,27.25,27.65
134.5W,27.12,27.49
 ---- J:42 Y:   1.167S
135.5W,27.13,27.51
134.5W,27.01,27.35
LIST/ORDER=TXZY $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=TXZY /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (TIME-LONGITUDE-DEPTH (m)-LATITUDE)
   10-SEP-1982 20:00,16-SEP-1982 22:00
 ---- J:41 Y:   1.5S
 ---- K:2 Z:   15
135.5W,27.33,27.78
134.5W,27.22,27.62
 ---- K:3 Z:   25
135.5W,27.25,27.65
134.5W,27.12,27.49
 ---- J:42 Y:   1.167S
 ---- K:2 Z:   15
135.5W,27.24,27.68
134.5W,27.12,27.52
 ---- K:3 Z:   25
135.5W,27.13,27.51
134.5W,27.01,27.35
LIST/ORDER=TYXZ $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=TYXZ /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (TIME-LATITUDE-LONGITUDE-DEPTH (m))
   10-SEP-1982 20:00,16-SEP-1982 22:00
 ---- K:2 Z:   15
 ---- I:95 X:   135.5W
1.5S,27.33,27.78
1.167S,27.24,27.68
 ---- I:96 X:   134.5W
1.5S,27.22,27.62
1.167S,27.12,27.52
 ---- K:3 Z:   25
 ---- I:95 X:   135.5W
1.5S,27.25,27.65
1.167S,27.13,27.51
 ---- I:96 X:   134.5W
1.5S,27.12,27.49
1.167S,27.01,27.35
LIST/ORDER=TYZX $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=TYZX /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (TIME-LATITUDE-DEPTH (m)-LONGITUDE)
   10-SEP-1982 20:00,16-SEP-1982 22:00
 ---- I:95 X:   135.5W
 ---- K:2 Z:   15
1.5S,27.33,27.78
1.167S,27.24,27.68
 ---- K:3 Z:   25
1.5S,27.25,27.65
1.167S,27.13,27.51
 ---- I:96 X:   134.5W
 ---- K:2 Z:   15
1.5S,27.22,27.62
1.167S,27.12,27.52
 ---- K:3 Z:   25
1.5S,27.12,27.49
1.167S,27.01,27.35
LIST/ORDER=TZXY $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=TZXY /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (TIME-DEPTH (m)-LONGITUDE-LATITUDE)
   10-SEP-1982 20:00,16-SEP-1982 22:00
 ---- J:41 Y:   1.5S
 ---- I:95 X:   135.5W
15,27.33,27.78
25,27.25,27.65
 ---- I:96 X:   134.5W
15,27.22,27.62
25,27.12,27.49
 ---- J:42 Y:   1.167S
 ---- I:95 X:   135.5W
15,27.24,27.68
25,27.13,27.51
 ---- I:96 X:   134.5W
15,27.12,27.52
25,27.01,27.35
LIST/ORDER=TZYX $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=TZYX /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (TIME-DEPTH (m)-LATITUDE-LONGITUDE)
   10-SEP-1982 20:00,16-SEP-1982 22:00
 ---- I:95 X:   135.5W
 ---- J:41 Y:   1.5S
15,27.33,27.78
25,27.25,27.65
 ---- J:42 Y:   1.167S
15,27.24,27.68
25,27.13,27.51
 ---- I:96 X:   134.5W
 ---- J:41 Y:   1.5S
15,27.22,27.62
25,27.12,27.49
 ---- J:42 Y:   1.167S
15,27.12,27.52
25,27.01,27.35
 
!XYZ
set region/i=95:96/j=41:42/k=2:3/l=5
go bn_comma_delimited.sub comma temp
! bn420_comma_delimited.sub
! 10/95 benchmark various permutations for FERRET listed output
 
! similar to bn200_permute except that a "format" argument can be passed
! and the region and expression information are external
 
! usage:
!	SET REGION/xxxx
!	GO bn420_permute tab_delimited  TEMP
 
LOAD $2
 !-> LOAD temp
 
LIST/ORDER=XYZT $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=XYZT /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m))
             TIME     : 10-SEP-1982 20:00
   135.5W   ,134.5W   
 ---- K:2 Z:   15
1.5S,27.33,27.22
1.167S,27.24,27.12
 ---- K:3 Z:   25
1.5S,27.25,27.12
1.167S,27.13,27.01
LIST/ORDER=XYTZ $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=XYTZ /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m))
             TIME     : 10-SEP-1982 20:00
   135.5W   ,134.5W   
 ---- K:2 Z:   15
 ---- L:5 T:   10-SEP-1982 20:00
1.5S,27.33,27.22
1.167S,27.24,27.12
 ---- K:3 Z:   25
 ---- L:5 T:   10-SEP-1982 20:00
1.5S,27.25,27.12
1.167S,27.13,27.01
LIST/ORDER=XZYT $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=XZYT /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (LONGITUDE-DEPTH (m)-LATITUDE)
             TIME     : 10-SEP-1982 20:00
   135.5W   ,134.5W   
 ---- J:41 Y:   1.5S
15,27.33,27.22
25,27.25,27.12
 ---- J:42 Y:   1.167S
15,27.24,27.12
25,27.13,27.01
LIST/ORDER=XZTY $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=XZTY /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (LONGITUDE-DEPTH (m)-LATITUDE)
             TIME     : 10-SEP-1982 20:00
   135.5W   ,134.5W   
 ---- J:41 Y:   1.5S
 ---- L:5 T:   10-SEP-1982 20:00
15,27.33,27.22
25,27.25,27.12
 ---- J:42 Y:   1.167S
 ---- L:5 T:   10-SEP-1982 20:00
15,27.24,27.12
25,27.13,27.01
LIST/ORDER=XTYZ $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=XTYZ /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m))
             TIME     : 10-SEP-1982 20:00
          135.5W   ,134.5W   
 ---- K:2 Z:   15
 ---- J:41 Y:   1.5S
10-SEP-1982 20:00,27.33,27.22
 ---- J:42 Y:   1.167S
10-SEP-1982 20:00,27.24,27.12
 ---- K:3 Z:   25
 ---- J:41 Y:   1.5S
10-SEP-1982 20:00,27.25,27.12
 ---- J:42 Y:   1.167S
10-SEP-1982 20:00,27.13,27.01
LIST/ORDER=XTZY $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=XTZY /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (LONGITUDE-DEPTH (m)-LATITUDE)
             TIME     : 10-SEP-1982 20:00
          135.5W   ,134.5W   
 ---- J:41 Y:   1.5S
 ---- K:2 Z:   15
10-SEP-1982 20:00,27.33,27.22
 ---- K:3 Z:   25
10-SEP-1982 20:00,27.25,27.12
 ---- J:42 Y:   1.167S
 ---- K:2 Z:   15
10-SEP-1982 20:00,27.24,27.12
 ---- K:3 Z:   25
10-SEP-1982 20:00,27.13,27.01
LIST/ORDER=YXZT $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=YXZT /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (LATITUDE-LONGITUDE-DEPTH (m))
             TIME     : 10-SEP-1982 20:00
   1.5S  ,1.167S
 ---- K:2 Z:   15
135.5W,27.33,27.24
134.5W,27.22,27.12
 ---- K:3 Z:   25
135.5W,27.25,27.13
134.5W,27.12,27.01
LIST/ORDER=YXTZ $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=YXTZ /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (LATITUDE-LONGITUDE-DEPTH (m))
             TIME     : 10-SEP-1982 20:00
   1.5S  ,1.167S
 ---- K:2 Z:   15
 ---- L:5 T:   10-SEP-1982 20:00
135.5W,27.33,27.24
134.5W,27.22,27.12
 ---- K:3 Z:   25
 ---- L:5 T:   10-SEP-1982 20:00
135.5W,27.25,27.13
134.5W,27.12,27.01
LIST/ORDER=YZXT $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=YZXT /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (LATITUDE-DEPTH (m)-LONGITUDE)
             TIME     : 10-SEP-1982 20:00
   1.5S  ,1.167S
 ---- I:95 X:   135.5W
15,27.33,27.24
25,27.25,27.13
 ---- I:96 X:   134.5W
15,27.22,27.12
25,27.12,27.01
LIST/ORDER=YZTX $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=YZTX /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (LATITUDE-DEPTH (m)-LONGITUDE)
             TIME     : 10-SEP-1982 20:00
   1.5S  ,1.167S
 ---- I:95 X:   135.5W
 ---- L:5 T:   10-SEP-1982 20:00
15,27.33,27.24
25,27.25,27.13
 ---- I:96 X:   134.5W
 ---- L:5 T:   10-SEP-1982 20:00
15,27.22,27.12
25,27.12,27.01
LIST/ORDER=YTXZ $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=YTXZ /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (LATITUDE-LONGITUDE-DEPTH (m))
             TIME     : 10-SEP-1982 20:00
          1.5S  ,1.167S
 ---- K:2 Z:   15
 ---- I:95 X:   135.5W
10-SEP-1982 20:00,27.33,27.24
 ---- I:96 X:   134.5W
10-SEP-1982 20:00,27.22,27.12
 ---- K:3 Z:   25
 ---- I:95 X:   135.5W
10-SEP-1982 20:00,27.25,27.13
 ---- I:96 X:   134.5W
10-SEP-1982 20:00,27.12,27.01
LIST/ORDER=YTZX $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=YTZX /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (LATITUDE-DEPTH (m)-LONGITUDE)
             TIME     : 10-SEP-1982 20:00
          1.5S  ,1.167S
 ---- I:95 X:   135.5W
 ---- K:2 Z:   15
10-SEP-1982 20:00,27.33,27.24
 ---- K:3 Z:   25
10-SEP-1982 20:00,27.25,27.13
 ---- I:96 X:   134.5W
 ---- K:2 Z:   15
10-SEP-1982 20:00,27.22,27.12
 ---- K:3 Z:   25
10-SEP-1982 20:00,27.12,27.01
LIST/ORDER=ZXYT $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=ZXYT /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (DEPTH (m)-LONGITUDE-LATITUDE)
             TIME     : 10-SEP-1982 20:00
   15      ,25      
 ---- J:41 Y:   1.5S
135.5W,27.33,27.25
134.5W,27.22,27.12
 ---- J:42 Y:   1.167S
135.5W,27.24,27.13
134.5W,27.12,27.01
LIST/ORDER=ZXTY $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=ZXTY /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (DEPTH (m)-LONGITUDE-LATITUDE)
             TIME     : 10-SEP-1982 20:00
   15      ,25      
 ---- J:41 Y:   1.5S
 ---- L:5 T:   10-SEP-1982 20:00
135.5W,27.33,27.25
134.5W,27.22,27.12
 ---- J:42 Y:   1.167S
 ---- L:5 T:   10-SEP-1982 20:00
135.5W,27.24,27.13
134.5W,27.12,27.01
LIST/ORDER=ZYXT $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=ZYXT /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (DEPTH (m)-LATITUDE-LONGITUDE)
             TIME     : 10-SEP-1982 20:00
   15      ,25      
 ---- I:95 X:   135.5W
1.5S,27.33,27.25
1.167S,27.24,27.13
 ---- I:96 X:   134.5W
1.5S,27.22,27.12
1.167S,27.12,27.01
LIST/ORDER=ZYTX $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=ZYTX /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (DEPTH (m)-LATITUDE-LONGITUDE)
             TIME     : 10-SEP-1982 20:00
   15      ,25      
 ---- I:95 X:   135.5W
 ---- L:5 T:   10-SEP-1982 20:00
1.5S,27.33,27.25
1.167S,27.24,27.13
 ---- I:96 X:   134.5W
 ---- L:5 T:   10-SEP-1982 20:00
1.5S,27.22,27.12
1.167S,27.12,27.01
LIST/ORDER=ZTXY $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=ZTXY /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (DEPTH (m)-LONGITUDE-LATITUDE)
             TIME     : 10-SEP-1982 20:00
          15      ,25      
 ---- J:41 Y:   1.5S
 ---- I:95 X:   135.5W
10-SEP-1982 20:00,27.33,27.25
 ---- I:96 X:   134.5W
10-SEP-1982 20:00,27.22,27.12
 ---- J:42 Y:   1.167S
 ---- I:95 X:   135.5W
10-SEP-1982 20:00,27.24,27.13
 ---- I:96 X:   134.5W
10-SEP-1982 20:00,27.12,27.01
LIST/ORDER=ZTYX $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=ZTYX /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (DEPTH (m)-LATITUDE-LONGITUDE)
             TIME     : 10-SEP-1982 20:00
          15      ,25      
 ---- I:95 X:   135.5W
 ---- J:41 Y:   1.5S
10-SEP-1982 20:00,27.33,27.25
 ---- J:42 Y:   1.167S
10-SEP-1982 20:00,27.24,27.13
 ---- I:96 X:   134.5W
 ---- J:41 Y:   1.5S
10-SEP-1982 20:00,27.22,27.12
 ---- J:42 Y:   1.167S
10-SEP-1982 20:00,27.12,27.01
LIST/ORDER=TXYZ $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=TXYZ /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m))
             TIME     : 10-SEP-1982 20:00
   10-SEP-1982 20:00
 ---- K:2 Z:   15
 ---- J:41 Y:   1.5S
135.5W,27.33
134.5W,27.22
 ---- J:42 Y:   1.167S
135.5W,27.24
134.5W,27.12
 ---- K:3 Z:   25
 ---- J:41 Y:   1.5S
135.5W,27.25
134.5W,27.12
 ---- J:42 Y:   1.167S
135.5W,27.13
134.5W,27.01
LIST/ORDER=TXZY $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=TXZY /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (LONGITUDE-DEPTH (m)-LATITUDE)
             TIME     : 10-SEP-1982 20:00
   10-SEP-1982 20:00
 ---- J:41 Y:   1.5S
 ---- K:2 Z:   15
135.5W,27.33
134.5W,27.22
 ---- K:3 Z:   25
135.5W,27.25
134.5W,27.12
 ---- J:42 Y:   1.167S
 ---- K:2 Z:   15
135.5W,27.24
134.5W,27.12
 ---- K:3 Z:   25
135.5W,27.13
134.5W,27.01
LIST/ORDER=TYXZ $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=TYXZ /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (LATITUDE-LONGITUDE-DEPTH (m))
             TIME     : 10-SEP-1982 20:00
   10-SEP-1982 20:00
 ---- K:2 Z:   15
 ---- I:95 X:   135.5W
1.5S,27.33
1.167S,27.24
 ---- I:96 X:   134.5W
1.5S,27.22
1.167S,27.12
 ---- K:3 Z:   25
 ---- I:95 X:   135.5W
1.5S,27.25
1.167S,27.13
 ---- I:96 X:   134.5W
1.5S,27.12
1.167S,27.01
LIST/ORDER=TYZX $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=TYZX /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (LATITUDE-DEPTH (m)-LONGITUDE)
             TIME     : 10-SEP-1982 20:00
   10-SEP-1982 20:00
 ---- I:95 X:   135.5W
 ---- K:2 Z:   15
1.5S,27.33
1.167S,27.24
 ---- K:3 Z:   25
1.5S,27.25
1.167S,27.13
 ---- I:96 X:   134.5W
 ---- K:2 Z:   15
1.5S,27.22
1.167S,27.12
 ---- K:3 Z:   25
1.5S,27.12
1.167S,27.01
LIST/ORDER=TZXY $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=TZXY /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (DEPTH (m)-LONGITUDE-LATITUDE)
             TIME     : 10-SEP-1982 20:00
   10-SEP-1982 20:00
 ---- J:41 Y:   1.5S
 ---- I:95 X:   135.5W
15,27.33
25,27.25
 ---- I:96 X:   134.5W
15,27.22
25,27.12
 ---- J:42 Y:   1.167S
 ---- I:95 X:   135.5W
15,27.24
25,27.13
 ---- I:96 X:   134.5W
15,27.12
25,27.01
LIST/ORDER=TZYX $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=TZYX /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 points (DEPTH (m)-LATITUDE-LONGITUDE)
             TIME     : 10-SEP-1982 20:00
   10-SEP-1982 20:00
 ---- I:95 X:   135.5W
 ---- J:41 Y:   1.5S
15,27.33
25,27.25
 ---- J:42 Y:   1.167S
15,27.24
25,27.13
 ---- I:96 X:   134.5W
 ---- J:41 Y:   1.5S
15,27.22
25,27.12
 ---- J:42 Y:   1.167S
15,27.12
25,27.01
 
!!XYT
!set region/i=95:96/j=41:42/k=2/l=5:6
!go bn_comma_delimited.sub comma temp
!!XZT
!set region/i=95:96/j=41/k=2:3/l=5:6
!go bn_comma_delimited.sub comma temp
!!YZT
!set region/i=95/j=41:42/k=2:3/l=5:6
!!go bn_comma_delimited.sub comma temp
!XY
set region/i=95:96/j=41:42/k=2/l=5
go bn_comma_delimited.sub comma temp
! bn420_comma_delimited.sub
! 10/95 benchmark various permutations for FERRET listed output
 
! similar to bn200_permute except that a "format" argument can be passed
! and the region and expression information are external
 
! usage:
!	SET REGION/xxxx
!	GO bn420_permute tab_delimited  TEMP
 
LOAD $2
 !-> LOAD temp
 
LIST/ORDER=XYZT $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=XYZT /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
   135.5W   ,134.5W   
1.5S,27.33,27.22
1.167S,27.24,27.12
LIST/ORDER=XYTZ $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=XYTZ /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             TIME     : 10-SEP-1982 20:00
             DEPTH (m): 15
   135.5W   ,134.5W   
1.5S,27.33,27.22
1.167S,27.24,27.12
LIST/ORDER=XZYT $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=XZYT /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
   135.5W   ,134.5W   
 ---- J:41 Y:   1.5S
15,27.33,27.22
 ---- J:42 Y:   1.167S
15,27.24,27.12
LIST/ORDER=XZTY $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=XZTY /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
   135.5W   ,134.5W   
 ---- J:41 Y:   1.5S
 ---- L:5 T:   10-SEP-1982 20:00
15,27.33,27.22
 ---- J:42 Y:   1.167S
 ---- L:5 T:   10-SEP-1982 20:00
15,27.24,27.12
LIST/ORDER=XTYZ $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=XTYZ /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             TIME     : 10-SEP-1982 20:00
             DEPTH (m): 15
          135.5W   ,134.5W   
 ---- J:41 Y:   1.5S
10-SEP-1982 20:00,27.33,27.22
 ---- J:42 Y:   1.167S
10-SEP-1982 20:00,27.24,27.12
LIST/ORDER=XTZY $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=XTZY /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             TIME     : 10-SEP-1982 20:00
             DEPTH (m): 15
          135.5W   ,134.5W   
 ---- J:41 Y:   1.5S
 ---- K:2 Z:   15
10-SEP-1982 20:00,27.33,27.22
 ---- J:42 Y:   1.167S
 ---- K:2 Z:   15
10-SEP-1982 20:00,27.24,27.12
LIST/ORDER=YXZT $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=YXZT /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LATITUDE-LONGITUDE)
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
   1.5S  ,1.167S
135.5W,27.33,27.24
134.5W,27.22,27.12
LIST/ORDER=YXTZ $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=YXTZ /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LATITUDE-LONGITUDE)
             TIME     : 10-SEP-1982 20:00
             DEPTH (m): 15
   1.5S  ,1.167S
135.5W,27.33,27.24
134.5W,27.22,27.12
LIST/ORDER=YZXT $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=YZXT /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LATITUDE-LONGITUDE)
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
   1.5S  ,1.167S
 ---- I:95 X:   135.5W
15,27.33,27.24
 ---- I:96 X:   134.5W
15,27.22,27.12
LIST/ORDER=YZTX $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=YZTX /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LATITUDE-LONGITUDE)
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
   1.5S  ,1.167S
 ---- I:95 X:   135.5W
 ---- L:5 T:   10-SEP-1982 20:00
15,27.33,27.24
 ---- I:96 X:   134.5W
 ---- L:5 T:   10-SEP-1982 20:00
15,27.22,27.12
LIST/ORDER=YTXZ $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=YTXZ /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LATITUDE-LONGITUDE)
             TIME     : 10-SEP-1982 20:00
             DEPTH (m): 15
          1.5S  ,1.167S
 ---- I:95 X:   135.5W
10-SEP-1982 20:00,27.33,27.24
 ---- I:96 X:   134.5W
10-SEP-1982 20:00,27.22,27.12
LIST/ORDER=YTZX $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=YTZX /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LATITUDE-LONGITUDE)
             TIME     : 10-SEP-1982 20:00
             DEPTH (m): 15
          1.5S  ,1.167S
 ---- I:95 X:   135.5W
 ---- K:2 Z:   15
10-SEP-1982 20:00,27.33,27.24
 ---- I:96 X:   134.5W
 ---- K:2 Z:   15
10-SEP-1982 20:00,27.22,27.12
LIST/ORDER=ZXYT $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=ZXYT /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
   15      
 ---- J:41 Y:   1.5S
135.5W,27.33
134.5W,27.22
 ---- J:42 Y:   1.167S
135.5W,27.24
134.5W,27.12
LIST/ORDER=ZXTY $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=ZXTY /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
   15      
 ---- J:41 Y:   1.5S
 ---- L:5 T:   10-SEP-1982 20:00
135.5W,27.33
134.5W,27.22
 ---- J:42 Y:   1.167S
 ---- L:5 T:   10-SEP-1982 20:00
135.5W,27.24
134.5W,27.12
LIST/ORDER=ZYXT $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=ZYXT /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LATITUDE-LONGITUDE)
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
   15      
 ---- I:95 X:   135.5W
1.5S,27.33
1.167S,27.24
 ---- I:96 X:   134.5W
1.5S,27.22
1.167S,27.12
LIST/ORDER=ZYTX $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=ZYTX /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LATITUDE-LONGITUDE)
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
   15      
 ---- I:95 X:   135.5W
 ---- L:5 T:   10-SEP-1982 20:00
1.5S,27.33
1.167S,27.24
 ---- I:96 X:   134.5W
 ---- L:5 T:   10-SEP-1982 20:00
1.5S,27.22
1.167S,27.12
LIST/ORDER=ZTXY $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=ZTXY /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
          15      
 ---- J:41 Y:   1.5S
 ---- I:95 X:   135.5W
10-SEP-1982 20:00,27.33
 ---- I:96 X:   134.5W
10-SEP-1982 20:00,27.22
 ---- J:42 Y:   1.167S
 ---- I:95 X:   135.5W
10-SEP-1982 20:00,27.24
 ---- I:96 X:   134.5W
10-SEP-1982 20:00,27.12
LIST/ORDER=ZTYX $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=ZTYX /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LATITUDE-LONGITUDE)
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
          15      
 ---- I:95 X:   135.5W
 ---- J:41 Y:   1.5S
10-SEP-1982 20:00,27.33
 ---- J:42 Y:   1.167S
10-SEP-1982 20:00,27.24
 ---- I:96 X:   134.5W
 ---- J:41 Y:   1.5S
10-SEP-1982 20:00,27.22
 ---- J:42 Y:   1.167S
10-SEP-1982 20:00,27.12
LIST/ORDER=TXYZ $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=TXYZ /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             TIME     : 10-SEP-1982 20:00
             DEPTH (m): 15
   10-SEP-1982 20:00
 ---- J:41 Y:   1.5S
135.5W,27.33
134.5W,27.22
 ---- J:42 Y:   1.167S
135.5W,27.24
134.5W,27.12
LIST/ORDER=TXZY $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=TXZY /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             TIME     : 10-SEP-1982 20:00
             DEPTH (m): 15
   10-SEP-1982 20:00
 ---- J:41 Y:   1.5S
 ---- K:2 Z:   15
135.5W,27.33
134.5W,27.22
 ---- J:42 Y:   1.167S
 ---- K:2 Z:   15
135.5W,27.24
134.5W,27.12
LIST/ORDER=TYXZ $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=TYXZ /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LATITUDE-LONGITUDE)
             TIME     : 10-SEP-1982 20:00
             DEPTH (m): 15
   10-SEP-1982 20:00
 ---- I:95 X:   135.5W
1.5S,27.33
1.167S,27.24
 ---- I:96 X:   134.5W
1.5S,27.22
1.167S,27.12
LIST/ORDER=TYZX $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=TYZX /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LATITUDE-LONGITUDE)
             TIME     : 10-SEP-1982 20:00
             DEPTH (m): 15
   10-SEP-1982 20:00
 ---- I:95 X:   135.5W
 ---- K:2 Z:   15
1.5S,27.33
1.167S,27.24
 ---- I:96 X:   134.5W
 ---- K:2 Z:   15
1.5S,27.22
1.167S,27.12
LIST/ORDER=TZXY $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=TZXY /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             TIME     : 10-SEP-1982 20:00
             DEPTH (m): 15
   10-SEP-1982 20:00
 ---- J:41 Y:   1.5S
 ---- I:95 X:   135.5W
15,27.33
 ---- I:96 X:   134.5W
15,27.22
 ---- J:42 Y:   1.167S
 ---- I:95 X:   135.5W
15,27.24
 ---- I:96 X:   134.5W
15,27.12
LIST/ORDER=TZYX $1" |*>/FORMAT=*" $2
 !-> LIST/ORDER=TZYX /FORMAT=comma temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LATITUDE-LONGITUDE)
             TIME     : 10-SEP-1982 20:00
             DEPTH (m): 15
   10-SEP-1982 20:00
 ---- I:95 X:   135.5W
 ---- J:41 Y:   1.5S
15,27.33
 ---- J:42 Y:   1.167S
15,27.24
 ---- I:96 X:   134.5W
 ---- J:41 Y:   1.5S
15,27.22
 ---- J:42 Y:   1.167S
15,27.12
 
!XZ
set region/i=95:96/j=41/k=2:3/l=5
LIST/FORMAT=comma/precision=5/order=xz temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LONGITUDE-DEPTH (m))
             LATITUDE : 1.5S
             TIME     : 10-SEP-1982 20:00
   135.5W   ,134.5W   
15,27.335,27.222
25,27.248,27.125
LIST/FORMAT=comma/precision=5/order=zx temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (DEPTH (m)-LONGITUDE)
             LATITUDE : 1.5S
             TIME     : 10-SEP-1982 20:00
   15      ,25      
135.5W,27.335,27.248
134.5W,27.222,27.125
!XT
set region/i=95:96/j=41/k=2/l=5:6
LIST/FORMAT=comma/precision=5/order=xt temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LONGITUDE-TIME)
             LATITUDE : 1.5S
             DEPTH (m): 15
          135.5W   ,134.5W   
10-SEP-1982 20:00,27.335,27.222
16-SEP-1982 22:00,27.775,27.622
LIST/FORMAT=comma/precision=5/order=tx temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (TIME-LONGITUDE)
             LATITUDE : 1.5S
             DEPTH (m): 15
   10-SEP-1982 20:00,16-SEP-1982 22:00
135.5W,27.335,27.775
134.5W,27.222,27.622
!YZ
set region/i=95/j=41:42/k=2:3/l=5
LIST/FORMAT=comma/precision=5/order=yz temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LATITUDE-DEPTH (m))
             LONGITUDE: 135.5W
             TIME     : 10-SEP-1982 20:00
   1.5S  ,1.167S
15,27.335,27.238
25,27.248,27.129
LIST/FORMAT=comma/precision=5/order=zy temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (DEPTH (m)-LATITUDE)
             LONGITUDE: 135.5W
             TIME     : 10-SEP-1982 20:00
   15      ,25      
1.5S,27.335,27.248
1.167S,27.238,27.129
!YT
set region/i=95/j=41:42/k=2/l=5:6
LIST/FORMAT=comma/precision=5/order=yt temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LATITUDE-TIME)
             LONGITUDE: 135.5W
             DEPTH (m): 15
          1.5S  ,1.167S
10-SEP-1982 20:00,27.335,27.238
16-SEP-1982 22:00,27.775,27.678
LIST/FORMAT=comma/precision=5/order=ty temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (TIME-LATITUDE)
             LONGITUDE: 135.5W
             DEPTH (m): 15
   10-SEP-1982 20:00,16-SEP-1982 22:00
1.5S,27.335,27.775
1.167S,27.238,27.678
!ZT
set region/i=95/j=41/k=2:3/l=5:6
LIST/FORMAT=comma/precision=5/order=zt temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (DEPTH (m)-TIME)
             LONGITUDE: 135.5W
             LATITUDE : 1.5S
          15      ,25      
10-SEP-1982 20:00,27.335,27.248
16-SEP-1982 22:00,27.775,27.652
LIST/FORMAT=comma/precision=5/order=tz temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (TIME-DEPTH (m))
             LONGITUDE: 135.5W
             LATITUDE : 1.5S
   10-SEP-1982 20:00,16-SEP-1982 22:00
15,27.335,27.775
25,27.248,27.652
!X
set region/i=95:96/j=41/k=2/l=5
LIST/FORMAT=comma/precision=5/order=x temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 points (LONGITUDE)
             LATITUDE : 1.5S
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
   135.5W   ,134.5W   
27.335 ,27.222
LIST/FORMAT=comma/precision=5/order=y temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 points (LONGITUDE)
             LATITUDE : 1.5S
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
   1.5S  
135.5W,27.335
134.5W,27.222
!Y
set region/i=95/j=41:42/k=2/l=5
LIST/FORMAT=comma/precision=5/order=y temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 points (LATITUDE)
             LONGITUDE: 135.5W
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
   1.5S  ,1.167S
27.335 ,27.238
LIST/FORMAT=comma/precision=5/order=x temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 points (LATITUDE)
             LONGITUDE: 135.5W
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
   135.5W   
1.5S,27.335
1.167S,27.238
!Z
set region/i=95/j=41/k=2:3/l=5
LIST/FORMAT=comma/precision=5/order=z temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 points (DEPTH (m))
             LONGITUDE: 135.5W
             LATITUDE : 1.5S
             TIME     : 10-SEP-1982 20:00
   15      ,25      
27.335 ,27.248
LIST/FORMAT=comma/precision=5/order=x temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 points (DEPTH (m))
             LONGITUDE: 135.5W
             LATITUDE : 1.5S
             TIME     : 10-SEP-1982 20:00
   135.5W   
 ---- K:2 Z:   15
1.5S,27.335
 ---- K:3 Z:   25
1.5S,27.248
!T
set region/i=95/j=41/k=2/l=5:6
LIST/FORMAT=comma/precision=5/order=t temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 points (TIME)
             LONGITUDE: 135.5W
             LATITUDE : 1.5S
             DEPTH (m): 15
   10-SEP-1982 20:00,16-SEP-1982 22:00
27.335 ,27.775
LIST/FORMAT=comma/precision=5/order=x temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 points (TIME)
             LONGITUDE: 135.5W
             LATITUDE : 1.5S
             DEPTH (m): 15
   135.5W   
 ---- L:5 T:   10-SEP-1982 20:00
 ---- K:2 Z:   15
1.5S,27.335
 ---- L:6 T:   16-SEP-1982 22:00
 ---- K:2 Z:   15
1.5S,27.775
 
! tab-delimited test
set region/i=95:96/j=41:42/k=2:3/l=5:6
LIST/FORMAT=tab temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
  	135.5W   	134.5W   
 ---- L:5 T:   10-SEP-1982 20:00
 ---- K:2 Z:   15
1.5S	27.33	27.22
1.167S	27.24	27.12
 ---- K:3 Z:   25
1.5S	27.25	27.12
1.167S	27.13	27.01
 ---- L:6 T:   16-SEP-1982 22:00
 ---- K:2 Z:   15
1.5S	27.78	27.62
1.167S	27.68	27.52
 ---- K:3 Z:   25
1.5S	27.65	27.49
1.167S	27.51	27.35
 
! big number formatting test
set region/i=95:96/j=41:42/k=2/l=5
LIST/FORMAT=comma/precision=1 randu(i)*temp*1e7
             VARIABLE : RANDU(I)*TEMP*1E7
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
   135.5W   ,134.5W   
1.5S,2.E+08,2.E+08
1.167S,2.E+08,2.E+08
LIST/FORMAT=comma/precision=9 randu(i)*temp*1e7
             VARIABLE : RANDU(I)*TEMP*1E7
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
   135.5W   ,134.5W   
1.5S,166750845,202088412
1.167S,166162833,201366579
 
! small number formatting test
set region/i=95:96/j=41:42/k=2/l=5
LIST/FORMAT=comma/precision=1 randu(i)*temp*1e-7
             VARIABLE : RANDU(I)*TEMP*1E-7
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
   135.5W   ,134.5W   
1.5S,2.E-06,2.E-06
1.167S,2.E-06,2.E-06
LIST/FORMAT=comma/precision=9 randu(i)*temp*1e-7
             VARIABLE : RANDU(I)*TEMP*1E-7
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             DEPTH (m): 15
             TIME     : 10-SEP-1982 20:00
   135.5W   ,134.5W   
1.5S,1.66750845E-06,2.02088412E-06
1.167S,1.66162833E-06,2.01366579E-06
 
! multiple variable test
set region/i=95:96/j=41:42/k=2/l=5
LIST/FORMAT=comma/precision=5 u,v
             DATA SET: ./data/gt4d011.cdf
             LONGITUDE: 135.5W to 133.5W
             LATITUDE: 1.5S to 0.833S
             DEPTH (m): 15
             TIME: 10-SEP-1982 20:00
 Column  1: U is ZONAL VELOCITY (cm/sec)   BAD FLAG : -1.E+34
 Column  2: V is MERIDIONAL VELOCITY (cm/sec)   BAD FLAG : -1.E+34
           U,V
 ---- J:41 Y:   1.333S
135W   / 95:41.597,-1.5366  
134W   / 96:39.163,-1.7415  
 ---- J:42 Y:   1S
135W   / 95:42.39,1.4695  
134W   / 96:40.019,1.5182  
 
! abstract expression test
set region/i=1:5/j=1:3
LIST/FORMAT=comma/precision=5 10*j+i
             VARIABLE : 10*J+I
             BAD FLAG : -1.E+34       
             SUBSET   : 5 by 3 points (X-Y)
   1     ,2     ,3     ,4     ,5     
1,11,12,13,14,15
2,21,22,23,24,25
3,31,32,33,34,35
*** Running ferret script: bn_dynamic_grids.jnl
! bn420_dynamic_grids
! 9/95-9/11/95 - test the creation, destruction, and use of dynamic grids
! 2/96 - added GX=lo:hi:delta notation
! 4/98 *sh* changes once again to confine_axis -- earlier trapped error is once
!		again an error
! V500beta1.1 5/26/99 *kob* - As of v500beta1.1, there is a modification to
!			      tm_world_recur.c which fixes a previous problem
!		 	      w/ implicit strides on an underlying irregular grid.
!			      This caused numerical differences in the output benchmark
!			      log files when compared to pre beta5001.1 logs.  The
!			      numericals results found here are verified to be correct
! V550 11/02 *sh* - documentation change only reflecting new modulo behavior
! V603  5/07 *acm*  documentation changew - some of the context errors have gone away.
! V698  3/16 *acm* Removed Philander-Seigel code including diagnostic variables,
! pre-defined axes and grids.
 
! deliberate dynamic grid errors
 
can mode diag
 
use gtsa056_1
 
set region/l=1/k=1/i=101:105/j=46:50
 
! what the implicit grids look like
load temp[gx=u]
show grid/dynamic
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 PSXU      LONGITUDE          160mr   131E                 70W
 PSYT      LATITUDE           100 i   28.836S              48.568N
 PSZT      DEPTH (m)           27 i-  5                    3824
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
 
 
set mode ignore_errors
 
list temp[gx=noexist]		! err during get_context_mods
show grid/dynamic
Dynamic grids:
    no implicit grids
Dynamic axes:
    no implicit axes
 
list temp[gx=u,p=noexist]	! err during get_context_mods
show grid/dynamic
Dynamic grids:
    no implicit grids
Dynamic axes:
    no implicit axes
 
! new error checks 2/96
list temp[gx=130e:80w:10,x=160e:160w]	! err during get_context_mods
list temp[gx=130e:80w:10,i=2:5]		! err during get_context_mods
list temp[i=2:5,gx=130e:80w:10]		! err during get_context_mods
list temp[gx=130e:80w]			! err during get_context_mods
 
list temp[gx=u]	+ noexist 	! err during is_algebra
show grid/dynamic
Dynamic grids:
    no implicit grids
Dynamic axes:
    no implicit axes
 
list temp[gx=u,k=30]		! err during get_var_context
show grid/dynamic
Dynamic grids:
    no implicit grids
Dynamic axes:
    no implicit axes
 
list temp[gx=u,k=20]		! err during read
show grid/dynamic
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 PSXU      LONGITUDE          160mr   131E                 70W
 PSYT      LATITUDE           100 i   28.836S              48.568N
 PSZT      DEPTH (m)           27 i-  5                    3824
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
 
list temp[gx=psyu]		! err during get_context_grid - axis mismatch
show grid/dynamic
Dynamic grids:
    no implicit grids
Dynamic axes:
    no implicit axes
 
list/i=3:6 X[gx=PSYT]		! same err but on pseudo-variable
show grid/dynamic
Dynamic grids:
    no implicit grids
Dynamic axes:
    no implicit axes
 
! now similar error tests but nested one level down on stack
 
let a = u
list temp[gx=a]			! uvar for grid name
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: 1 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              129W   128W   127W   126W   125W   
              101    102    103    104    105
 1.5N  / 50:  24.44  24.28  24.23  24.33  24.62
 1.17N / 49:  24.24  24.10  24.04  24.12  24.37
 0.83N / 48:  24.08  23.94  23.87  23.92  24.11
 0.5N  / 47:  23.96  23.84  23.76  23.75  23.87
 0.17N / 46:  23.90  23.79  23.70  23.65  23.69
show grid/dynamic
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 PSXU      LONGITUDE          160mr   131E                 70W
 PSYT      LATITUDE           100 i   28.836S              48.568N
 PSZT      DEPTH (m)           27 i-  5                    3824
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
 
let  tu = temp[gx=noexist]
list tu				! err during get_context_mods
show grid/dynamic
Dynamic grids:
    no implicit grids
Dynamic axes:
    no implicit axes
 
let  tu = temp[gx=u,p=noexist]
list tu				! err during get_context_mods
show grid/dynamic
Dynamic grids:
    no implicit grids
Dynamic axes:
    no implicit axes
 
let  tu = temp[gx=u] + noexist
list tu			 	! err during is_algebra
show grid/dynamic
Dynamic grids:
    no implicit grids
Dynamic axes:
    no implicit axes
 
let  tu = temp[gx=u,k=30]
list tu				! err during get_var_context
show grid/dynamic
Dynamic grids:
    no implicit grids
Dynamic axes:
    no implicit axes
 
let  tu = temp[gx=u,k=20]
list tu				! err during read
show grid/dynamic
Dynamic grids:
    GRID (G###)                          use count:   2
 name       axis              # pts   start                end
 PSXU      LONGITUDE          160mr   131E                 70W
 PSYT      LATITUDE           100 i   28.836S              48.568N
 PSZT      DEPTH (m)           27 i-  5                    3824
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
 
let  tu = temp[gx=psyu]
list tu				! err during get_context_grid - axis mismatch
show grid/dynamic
Dynamic grids:
    no implicit grids
Dynamic axes:
    no implicit axes
 
define axis/z=5:15/npoints=999999/unit=meters/depth z999999
 
!    SET MEM smaller to make sure to get the intended error,
!    else we list huge amount of adata
 
let save_mem = ($ferret_memory)
 !-> DEFINE VARIABLE save_mem = 62.5
set mem/siz = 10
 
list temp[gz=z999999,z=5:15]	! err during regrid
    To fulfill this request would exceed the current SET MEMORY/MAX= limit of 80Mb
    At the moment that the memory limit was reached
    memory was committed as follows:
        - to objects used in computation: 50 (0%)
    The size of the requested object was: 200 Mb (250%)
show grid/dynamic
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 PSXT      LONGITUDE          160mr   130.5E               70.5W
 PSYT      LATITUDE           100 i   28.836S              48.568N
 Z999999   DEPTH (m)       999999 r-  5                    15
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
set mem/siz=`save_mem`
 !-> set mem/siz=62.5
 
shade 1/0 * temp[gx=u]		! err during plot
show grid/dynamic
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 PSXU      LONGITUDE          160mr   131E                 70W
 PSYT      LATITUDE           100 i   28.836S              48.568N
 PSZT      DEPTH (m)           27 i-  5                    3824
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
 
set mode/last ignore
 
! =================================
 
! basic implicit grid accesses
list temp[gx=psxu]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: 1 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              129W   128W   127W   126W   125W   
              101    102    103    104    105
 1.5N  / 50:  24.44  24.28  24.23  24.33  24.62
 1.17N / 49:  24.24  24.10  24.04  24.12  24.37
 0.83N / 48:  24.08  23.94  23.87  23.92  24.11
 0.5N  / 47:  23.96  23.84  23.76  23.75  23.87
 0.17N / 46:  23.90  23.79  23.70  23.65  23.69
show grid/dyn
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 PSXU      LONGITUDE          160mr   131E                 70W
 PSYT      LATITUDE           100 i   28.836S              48.568N
 PSZT      DEPTH (m)           27 i-  5                    3824
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
 
list temp[gy=psyu]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: on Y
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              129.5W 128.5W 127.5W 126.5W 125.5W 
              101    102    103    104    105
 1.67N / 50:  24.66  24.43  24.31  24.32  24.52
 1.33N / 49:  24.44  24.24  24.14  24.14  24.31
 1N    / 48:  24.25  24.08  23.97  23.95  24.09
 0.67N / 47:  24.09  23.95  23.84  23.79  23.87
 0.33N / 46:  23.99  23.87  23.77  23.70  23.71
 
list temp[gx=u]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: 1 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              129W   128W   127W   126W   125W   
              101    102    103    104    105
 1.5N  / 50:  24.44  24.28  24.23  24.33  24.62
 1.17N / 49:  24.24  24.10  24.04  24.12  24.37
 0.83N / 48:  24.08  23.94  23.87  23.92  24.11
 0.5N  / 47:  23.96  23.84  23.76  23.75  23.87
 0.17N / 46:  23.90  23.79  23.70  23.65  23.69
show grid/dyn
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 PSXU      LONGITUDE          160mr   131E                 70W
 PSYT      LATITUDE           100 i   28.836S              48.568N
 PSZT      DEPTH (m)           27 i-  5                    3824
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
 
list temp[gx=w]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: TEMP
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              129.5W 128.5W 127.5W 126.5W 125.5W 
              101    102    103    104    105
 1.5N  / 50:  24.54  24.34  24.23  24.23  24.42
 1.17N / 49:  24.34  24.15  24.05  24.04  24.20
 0.83N / 48:  24.16  24.00  23.89  23.86  23.98
 0.5N  / 47:  24.02  23.89  23.79  23.73  23.77
 0.17N / 46:  23.96  23.85  23.74  23.66  23.64
 
list  temp[gx=psxu] + 5
             VARIABLE : TEMP[GX=PSXU] + 5
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              129W   128W   127W   126W   125W   
              101    102    103    104    105
 1.5N  / 50:  29.44  29.28  29.23  29.33  29.62
 1.17N / 49:  29.24  29.10  29.04  29.12  29.37
 0.83N / 48:  29.08  28.94  28.87  28.92  29.11
 0.5N  / 47:  28.96  28.84  28.76  28.75  28.87
 0.17N / 46:  28.90  28.79  28.70  28.65  28.69
show grid/dyn
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 PSXU      LONGITUDE          160mr   131E                 70W
 PSYT      LATITUDE           100 i   28.836S              48.568N
 PSZT      DEPTH (m)           27 i-  5                    3824
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
 
list  5 + temp[gx=psxu]
             VARIABLE : 5 + TEMP[GX=PSXU]
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              129W   128W   127W   126W   125W   
              101    102    103    104    105
 1.5N  / 50:  29.44  29.28  29.23  29.33  29.62
 1.17N / 49:  29.24  29.10  29.04  29.12  29.37
 0.83N / 48:  29.08  28.94  28.87  28.92  29.11
 0.5N  / 47:  28.96  28.84  28.76  28.75  28.87
 0.17N / 46:  28.90  28.79  28.70  28.65  28.69
show grid/dyn
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 PSXU      LONGITUDE          160mr   131E                 70W
 PSYT      LATITUDE           100 i   28.836S              48.568N
 PSZT      DEPTH (m)           27 i-  5                    3824
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
 
let tu = temp[gx=psxu]
list tu
             VARIABLE : TEMP[GX=PSXU]
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              129W   128W   127W   126W   125W   
              101    102    103    104    105
 1.5N  / 50:  24.44  24.28  24.23  24.33  24.62
 1.17N / 49:  24.24  24.10  24.04  24.12  24.37
 0.83N / 48:  24.08  23.94  23.87  23.92  24.11
 0.5N  / 47:  23.96  23.84  23.76  23.75  23.87
 0.17N / 46:  23.90  23.79  23.70  23.65  23.69
show grid/dyn
Dynamic grids:
    GRID (G###)                          use count:   2
 name       axis              # pts   start                end
 PSXU      LONGITUDE          160mr   131E                 70W
 PSYT      LATITUDE           100 i   28.836S              48.568N
 PSZT      DEPTH (m)           27 i-  5                    3824
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
show grid tu
    GRID (G###)
 name       axis              # pts   start                end                 subset
 PSXU      LONGITUDE          160mr   131E                 70W                 full
 PSYT      LATITUDE           100 i   28.836S              48.568N             full
 PSZT      DEPTH (m)           27 i-  5                    3824                full
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00   full
 
let tu = temp[gx=psxu] + 5
list tu
             VARIABLE : TEMP[GX=PSXU] + 5
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              129W   128W   127W   126W   125W   
              101    102    103    104    105
 1.5N  / 50:  29.44  29.28  29.23  29.33  29.62
 1.17N / 49:  29.24  29.10  29.04  29.12  29.37
 0.83N / 48:  29.08  28.94  28.87  28.92  29.11
 0.5N  / 47:  28.96  28.84  28.76  28.75  28.87
 0.17N / 46:  28.90  28.79  28.70  28.65  28.69
show grid/dyn
Dynamic grids:
    GRID (G###)                          use count:   2
 name       axis              # pts   start                end
 PSXU      LONGITUDE          160mr   131E                 70W
 PSYT      LATITUDE           100 i   28.836S              48.568N
 PSZT      DEPTH (m)           27 i-  5                    3824
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
 
 
! implicit grid conformability
set reg/x=180:175w/y=0:2n/z=0/l=1
list taux[g=temp]		! grid to temp w/out Z axis
             VARIABLE : ZONAL WIND STRESS (dynes/cm**2)
                        regrid: 1 deg on X, on Y, 73 hour on T
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 7 points (LONGITUDE-LATITUDE)
             TIME     : 15-JAN-1982 14:00
               179.5W  178.5W  177.5W  176.5W  175.5W 
                51      52      53      54      55
 1.83N / 51: -0.6280 -0.6522 -0.6598 -0.6632 -0.6626
 1.5N  / 50: -0.6316 -0.6539 -0.6537 -0.6505 -0.6444
 1.17N / 49: -0.6352 -0.6556 -0.6477 -0.6379 -0.6262
 0.83N / 48: -0.6270 -0.6471 -0.6371 -0.6267 -0.6161
 0.5N  / 47: -0.6072 -0.6285 -0.6218 -0.6170 -0.6141
 0.17N / 46: -0.5873 -0.6098 -0.6066 -0.6074 -0.6121
 0.17S / 45: -0.5674 -0.5912 -0.5914 -0.5977 -0.6101
list temp[g=taux]		! grid to taux w/ Z axis (same grid as "U")
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: 1 deg on X, on Y, 73 hour on T
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 7 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
               180E  179W   178W   177W   176W   175W   
               50     51     52     53     54     55
 2N    / 51:  27.58  27.54  27.50  27.45  27.37  27.27
 1.67N / 50:  27.61  27.56  27.52  27.47  27.39  27.29
 1.33N / 49:  27.66  27.60  27.55  27.49  27.41  27.32
 1N    / 48:  27.70  27.64  27.58  27.52  27.44  27.34
 0.67N / 47:  27.75  27.68  27.61  27.55  27.46  27.36
 0.33N / 46:  27.80  27.72  27.65  27.58  27.49  27.39
 0     / 45:  27.85  27.76  27.70  27.62  27.53  27.43
list temp[gx=taux,gy=taux]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: U
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 7 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
               180E  179W   178W   177W   176W   175W   
               50     51     52     53     54     55
 2N    / 51:  27.58  27.54  27.50  27.45  27.37  27.27
 1.67N / 50:  27.61  27.56  27.52  27.47  27.39  27.29
 1.33N / 49:  27.66  27.60  27.55  27.49  27.41  27.32
 1N    / 48:  27.70  27.64  27.58  27.52  27.44  27.34
 0.67N / 47:  27.75  27.68  27.61  27.55  27.46  27.36
 0.33N / 46:  27.80  27.72  27.65  27.58  27.49  27.39
 0     / 45:  27.85  27.76  27.70  27.62  27.53  27.43
list temp[gx=taux]		! X only
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: 1 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 7 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
               180E  179W   178W   177W   176W   175W   
               50     51     52     53     54     55
 1.83N / 51:  27.59  27.55  27.50  27.46  27.38  27.28
 1.5N  / 50:  27.64  27.58  27.53  27.48  27.40  27.30
 1.17N / 49:  27.68  27.62  27.57  27.51  27.43  27.33
 0.83N / 48:  27.73  27.66  27.60  27.53  27.45  27.35
 0.5N  / 47:  27.78  27.70  27.63  27.56  27.48  27.38
 0.17N / 46:  27.82  27.74  27.67  27.60  27.51  27.40
 0.17S / 45:  27.87  27.79  27.72  27.65  27.56  27.45
show grid/dynamic
Dynamic grids:
    GRID (G###)                          use count:   2
 name       axis              # pts   start                end
 PSXU      LONGITUDE          160mr   131E                 70W
 PSYT      LATITUDE           100 i   28.836S              48.568N
 PSZT      DEPTH (m)           27 i-  5                    3824
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
 
! regridding between grids with mutually exclusive axes
cancel region
define grid/y=`temp,return=grid` gy
 !-> define grid/y=PS3DT2 gy
define grid/x=`temp,return=grid` gx
 !-> define grid/x=PS3DT2 gx
LET/QUIET a = x[g=gx]
list/i=1:4 a,a[g=gy]   ! nothing to regrid - both are same
             LONGITUDE: 130E to 134E
 Column  1: A is X[G=GX]
 Column  2: A is X[G=GX]
                A     A
130.5E / 1:  130.5  130.5
131.5E / 2:  131.5  131.5
132.5E / 3:  132.5  132.5
133.5E / 4:  133.5  133.5
 
 
!!!!!!!!!!!!!!!!!!!!!!!!
! pseudo-variables
set data gtsa056_1
 
list/i=3:6 X		! abstract
             VARIABLE : X
                        axis ABSTRACT
             SUBSET   : 4 points (X)
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
 6   / 6:  6.000
list/i=3:6 X[g=u]	! PS3DU
             VARIABLE : X
                        axis PSXU
             FILENAME : gtsa056_1.cdf
             SUBSET   : 4 points (LONGITUDE)
 133E   / 3:  133.0
 134E   / 4:  134.0
 135E   / 5:  135.0
 136E   / 6:  136.0
list/i=3:6 X[gx=u]	! PS3DU
             VARIABLE : X
                        axis PSXU
             FILENAME : gtsa056_1.cdf
             SUBSET   : 4 points (LONGITUDE)
 133E   / 3:  133.0
 134E   / 4:  134.0
 135E   / 5:  135.0
 136E   / 6:  136.0
list/i=3:6 X[gx=PSXT]	! PS3DT
             VARIABLE : X
                        axis PSXT
             SUBSET   : 4 points (LONGITUDE)
 132.5E / 3:  132.5
 133.5E / 4:  133.5
 134.5E / 5:  134.5
 135.5E / 6:  135.5
 
let ax = x
list/i=3:6 ax		! abstract
             VARIABLE : X
             SUBSET   : 4 points (X)
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
 6   / 6:  6.000
let ax = X[g=u]
list/i=3:6 ax		! PS3DU
             VARIABLE : X[G=U]
             FILENAME : gtsa056_1.cdf
             SUBSET   : 4 points (LONGITUDE)
 133E   / 3:  133.0
 134E   / 4:  134.0
 135E   / 5:  135.0
 136E   / 6:  136.0
let ax = X[gx=u]
list/i=3:6 ax		! PS3DU
             VARIABLE : X[GX=U]
             FILENAME : gtsa056_1.cdf
             SUBSET   : 4 points (LONGITUDE)
 133E   / 3:  133.0
 134E   / 4:  134.0
 135E   / 5:  135.0
 136E   / 6:  136.0
let ax = X[gx=PSXT]
list/i=3:6 ax		! PS3DT
             VARIABLE : X[GX=PSXT]
             SUBSET   : 4 points (LONGITUDE)
 132.5E / 3:  132.5
 133.5E / 4:  133.5
 134.5E / 5:  134.5
 135.5E / 6:  135.5
show grid/dyn
Dynamic grids:
    no implicit grids
Dynamic axes:
    no implicit axes
 
!!!!!!!!!!!!!!!!!!!!!!!!
! dynamic axes
! * * * dynamic generation of pseudo-variables * * *
list x[x=.1:1:.1]			! dynamic abstract
             VARIABLE : X
                        axis (AX###)
             SUBSET   : 10 points (X)
 0.1  /  1:  0.100
 0.2  /  2:  0.200
 0.3  /  3:  0.300
 0.4  /  4:  0.400
 0.5  /  5:  0.500
 0.6  /  6:  0.600
 0.7  /  7:  0.700
 0.8  /  8:  0.800
 0.9  /  9:  0.900
 1    / 10:  1.000
list x[gx=psxu,x=130:150:2.5]		! dynamic based on named axis
             VARIABLE : X
                        axis (AX###)
             SUBSET   : 9 points (LONGITUDE)
 130E   / 1:  130.0
 132.5E / 2:  132.5
 135E   / 3:  135.0
 137.5E / 4:  137.5
 140E   / 5:  140.0
 142.5E / 6:  142.5
 145E   / 7:  145.0
 147.5E / 8:  147.5
 150E   / 9:  150.0
! abstract variables
cancel region
LET/QUIET a = x[x=0.1:10:1.5] + y[y=101:110:1]
list a
             VARIABLE : X[X=0.1:10:1.5] + Y[Y=101:110:1]
             SUBSET   : 7 by 10 points (X-Y)
                0.1    1.6    3.1    4.6    6.1    7.6    9.1  
                1      2      3      4      5      6      7
 101   /  1:  101.1  102.6  104.1  105.6  107.1  108.6  110.1
 102   /  2:  102.1  103.6  105.1  106.6  108.1  109.6  111.1
 103   /  3:  103.1  104.6  106.1  107.6  109.1  110.6  112.1
 104   /  4:  104.1  105.6  107.1  108.6  110.1  111.6  113.1
 105   /  5:  105.1  106.6  108.1  109.6  111.1  112.6  114.1
 106   /  6:  106.1  107.6  109.1  110.6  112.1  113.6  115.1
 107   /  7:  107.1  108.6  110.1  111.6  113.1  114.6  116.1
 108   /  8:  108.1  109.6  111.1  112.6  114.1  115.6  117.1
 109   /  9:  109.1  110.6  112.1  113.6  115.1  116.6  118.1
 110   / 10:  110.1  111.6  113.1  114.6  116.1  117.6  119.1
list a[i=1:10:3]
             VARIABLE : X[X=0.1:10:1.5] + Y[Y=101:110:1]
                        regrid: 4.5 delta on X
             SUBSET   : 3 by 10 points (X-Y)
                0.1    4.6    9.1  
                1      2      3
 101   /  1:  101.1  105.6  110.1
 102   /  2:  102.1  106.6  111.1
 103   /  3:  103.1  107.6  112.1
 104   /  4:  104.1  108.6  113.1
 105   /  5:  105.1  109.6  114.1
 106   /  6:  106.1  110.6  115.1
 107   /  7:  107.1  111.6  116.1
 108   /  8:  108.1  112.6  117.1
 109   /  9:  109.1  113.6  118.1
 110   / 10:  110.1  114.6  119.1
list a[i=-1:20:5]		! clips to allowed limits
             VARIABLE : X[X=0.1:10:1.5] + Y[Y=101:110:1]
                        regrid: 7.5 delta on X
             SUBSET   : 2 by 10 points (X-Y)
                0.1    7.6  
                1      2
 101   /  1:  101.1  108.6
 102   /  2:  102.1  109.6
 103   /  3:  103.1  110.6
 104   /  4:  104.1  111.6
 105   /  5:  105.1  112.6
 106   /  6:  106.1  113.6
 107   /  7:  107.1  114.6
 108   /  8:  108.1  115.6
 109   /  9:  109.1  116.6
 110   / 10:  110.1  117.6
list a[y=102:105:.5]
             VARIABLE : X[X=0.1:10:1.5] + Y[Y=101:110:1]
                        regrid: 0.5 delta on Y
             SUBSET   : 7 by 7 points (X-Y)
                0.1    1.6    3.1    4.6    6.1    7.6    9.1  
                1      2      3      4      5      6      7
 102    / 1:  102.1  103.6  105.1  106.6  108.1  109.6  111.1
 102.5  / 2:  102.6  104.1  105.6  107.1  108.6  110.1  111.6
 103    / 3:  103.1  104.6  106.1  107.6  109.1  110.6  112.1
 103.5  / 4:  103.6  105.1  106.6  108.1  109.6  111.1  112.6
 104    / 5:  104.1  105.6  107.1  108.6  110.1  111.6  113.1
 104.5  / 6:  104.6  106.1  107.6  109.1  110.6  112.1  113.6
 105    / 7:  105.1  106.6  108.1  109.6  111.1  112.6  114.1
list a[y=95:115:7]
             VARIABLE : X[X=0.1:10:1.5] + Y[Y=101:110:1]
                        regrid: 7 delta on Y
             SUBSET   : 7 by 3 points (X-Y)
               0.1    1.6    3.1    4.6    6.1    7.6    9.1  
               1      2      3      4      5      6      7
 95    / 1:   ....   ....   ....   ....   ....   ....   ....
 102   / 2:  102.1  103.6  105.1  106.6  108.1  109.6  111.1
 109   / 3:  109.1  110.6  112.1  113.6  115.1  116.6  118.1
show grid/dyn
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 (AX###)   X                    7 r   0.1                  9.1
 (AX###)   Y                    3 r   95                   109
 normal    Z
 normal    T
 
! ambiguous coordinate tests
list/order=x  x[x=0.1:10:1.5] +  x[x=1.1:11:1.5]
             VARIABLE : X[X=0.1:10:1.5] +  X[X=1.1:11:1.5]
             SUBSET   : 7 points (X)
            0.1    1.6    3.1    4.6    6.1    7.6    9.1  
            1      2      3      4      5      6      7
           1.20   4.20   7.20  10.20  13.20  16.20  19.20
LET/QUIET a = x[x=0.1:10:1.5] +  x[x=1.1:11:1.5]
list/order=x a
             VARIABLE : X[X=0.1:10:1.5] +  X[X=1.1:11:1.5]
             SUBSET   : 7 points (X)
            0.1    1.6    3.1    4.6    6.1    7.6    9.1  
            1      2      3      4      5      6      7
           1.20   4.20   7.20  10.20  13.20  16.20  19.20
show grid/dyn
Dynamic grids:
    GRID (G###)                          use count:   2
 name       axis              # pts   start                end
 (AX###)   X                    7 r   0.1                  9.1
 normal    Y
 normal    Z
 normal    T
 
! box size on dynamic axes
cancel region
define axis/from/x/name=xirreg x[x=1:100:10]^2
define grid/x=xirreg girreg
let/quiet a = xbox[gx=xirreg]
list a    ! "normal" irregular axis
             VARIABLE : XBOX[GX=XIRREG]
             SUBSET   : 10 points (X)
 1      /  1:   120.
 121    /  2:   220.
 441    /  3:   420.
 961    /  4:   620.
 1681   /  5:   820.
 2601   /  6:  1020.
 3721   /  7:  1220.
 5041   /  8:  1420.
 6561   /  9:  1620.
 8281   / 10:  1720.
let/quiet b = a[i=1:10:2]
load b     ! "child" irregular axis
show grid/x
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 (AX###)   X                    5 i   1                    6561                5 pts
 normal    Y
 normal    Z
 normal    T
 
       I     X                       XBOX          XBOXLO
       1>  1                         280        -59
       2>  441                       840        221
       3>  1681                      1640       1061
       4>  3721                      2440       2701
       5>  6561                      4000       5141
 
use gtsa056_1
list/i=1:10 x[gx=temp]			! from named variable
             VARIABLE : X
                        axis PSXT
             FILENAME : gtsa056_1.cdf
             SUBSET   : 10 points (LONGITUDE)
 130.5E /  1:  130.5
 131.5E /  2:  131.5
 132.5E /  3:  132.5
 133.5E /  4:  133.5
 134.5E /  5:  134.5
 135.5E /  6:  135.5
 136.5E /  7:  136.5
 137.5E /  8:  137.5
 138.5E /  9:  138.5
 139.5E / 10:  139.5
list x[g=temp,x=150w:130w:2.5]		! dynamic based on named variable
             VARIABLE : X
                        axis (AX###)
             FILENAME : gtsa056_1.cdf
             SUBSET   : 9 points (LONGITUDE)
 150W   / 1:  210.0
 147.5W / 2:  212.5
 145W   / 3:  215.0
 142.5W / 4:  217.5
 140W   / 5:  220.0
 137.5W / 6:  222.5
 135W   / 7:  225.0
 132.5W / 8:  227.5
 130W   / 9:  230.0
list x[gx=temp,x=150w:130w:2.5]		! dynamic based on named variable
             VARIABLE : X
                        axis (AX###)
             FILENAME : gtsa056_1.cdf
             SUBSET   : 9 points (LONGITUDE)
 150W   / 1:  210.0
 147.5W / 2:  212.5
 145W   / 3:  215.0
 142.5W / 4:  217.5
 140W   / 5:  220.0
 137.5W / 6:  222.5
 135W   / 7:  225.0
 132.5W / 8:  227.5
 130W   / 9:  230.0
 
list/i=101:105/j=46:50/l=1/k=1 temp+x	! grid inherited from expression
             VARIABLE : TEMP+X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              129.5W 128.5W 127.5W 126.5W 125.5W 
              101    102    103    104    105
 1.5N  / 50:  255.0  255.8  256.7  257.7  258.9
 1.17N / 49:  254.8  255.7  256.5  257.5  258.7
 0.83N / 48:  254.7  255.5  256.4  257.4  258.5
 0.5N  / 47:  254.5  255.4  256.3  257.2  258.3
 0.17N / 46:  254.5  255.3  256.2  257.2  258.1
show grid/dyn
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 (AX###)   X                    5 i   1                    6561
 normal    Y
 normal    Z
 normal    T
 
! this expression does NOT inherit the X axis -- the result is
!	i) ambiguous X axis coordinates
!	ii) 2 dynamic axes are created in the course of processing
list/j=46:50/l=1/k=1 temp[i=101:120:4]+x[i=101:120:4]	! NOT !!!
             VARIABLE : TEMP[I=101:120:4]+X[I=101:120:4]
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              129.5W 125.5W 121.5W 117.5W 113.5W 
                1      2      3      4      5
 1.5N  / 50:  125.5  129.4  134.5  137.1  141.6
 1.17N / 49:  125.3  129.2  134.2  136.9  141.3
 0.83N / 48:  125.2  129.0  133.7  136.7  141.0
 0.5N  / 47:  125.0  128.8  133.3  136.5  140.6
 0.17N / 46:  125.0  128.6  133.0  136.4  140.4
show grid/dynamic
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 (AX###)   LONGITUDE            5 r   129.5W               113.5W
 PSYT      LATITUDE           100 i   28.836S              48.568N
 PSZT      DEPTH (m)           27 i-  5                    3824
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
 
list/j=46:50/l=1/k=1 temp[i=101:120:4]+x[g=temp,i=101:120:4]
             VARIABLE : TEMP[I=101:120:4]+X[G=TEMP,I=101:120:4]
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              129.5W 125.5W 121.5W 117.5W 113.5W 
                1      2      3      4      5
 1.5N  / 50:  255.0  258.9  264.0  266.6  271.1
 1.17N / 49:  254.8  258.7  263.7  266.4  270.8
 0.83N / 48:  254.7  258.5  263.2  266.2  270.5
 0.5N  / 47:  254.5  258.3  262.8  266.0  270.1
 0.17N / 46:  254.5  258.1  262.5  265.9  269.9
 
 
! * * * dynamic axis generation used to regrid variables * * *
SET REGION/I=101:105/J=46:50/l=1/k=1
 
! deliberate errors:  ****
list x[i=5:1:1]		! not an error: inverted order
             VARIABLE : X
                        axis (AX###)
             SUBSET   : 5 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
set mode ignore
list x[i=1:5:-1]	! error: negative delta
list x[i=1:5:0]		! error: delta=0
list x[x=1:5:-1]	! error: negative delta
list x[x=1:5:0]		! error: delta=0
list temp[i=200:210:2]	! was: "completely out of range"  now: ok - subspan modulo 11/02
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              168.5E 170.5E 172.5E 174.5E 176.5E 178.5E 
                1      2      3      4      5      6
 1.5N  / 50:  29.22  29.18  28.93  28.67  28.12  27.73
 1.17N / 49:  29.25  29.18  28.97  28.71  28.22  27.80
 0.83N / 48:  29.27  29.18  28.98  28.72  28.30  27.88
 0.5N  / 47:  29.30  29.19  28.98  28.73  28.36  27.95
 0.17N / 46:  29.34  29.22  28.99  28.75  28.40  28.01
list temp[i=-200:-190:2]! was: "completely out of range"  now: ok - subspan modulo 11/0
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              108.5W 106.5W 104.5W 102.5W 100.5W 98.5W  
                1      2      3      4      5      6
 1.5N  / 50:  25.42  25.24  25.05  25.23  25.49  25.81
 1.17N / 49:  25.02  24.88  24.74  24.91  25.20  25.55
 0.83N / 48:  24.65  24.54  24.42  24.56  24.88  25.25
 0.5N  / 47:  24.28  24.20  24.10  24.22  24.52  24.90
 0.17N / 46:  23.97  23.90  23.82  23.92  24.19  24.56
canc mode ignore
show grid/dyn
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 (AX###)   LONGITUDE            6 i   108.5W(-468.5)       98.5W(-458.5)
 PSYT      LATITUDE           100 i   28.836S              48.568N
 PSZT      DEPTH (m)           27 i-  5                    3824
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
 
! regular dynamic axis
! ... by subscript
list temp[i=100:110:2]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: 2 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              130.5W 128.5W 126.5W 124.5W 122.5W 120.5W 
                1      2      3      4      5      6
 1.5N  / 50:  24.86  24.34  24.23  24.82  25.60  25.22
 1.17N / 49:  24.60  24.15  24.04  24.53  25.22  24.82
 0.83N / 48:  24.37  24.00  23.86  24.25  24.77  24.40
 0.5N  / 47:  24.19  23.89  23.73  23.97  24.36  24.07
 0.17N / 46:  24.09  23.85  23.66  23.74  24.03  23.83
! ... by world coord
list temp[x=130w:120W:3]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: 3 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 4 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              130W   127W   124W   121W   
                1      2      3      4
 1.5N  / 50:  24.70  24.23  25.06  25.38
 1.17N / 49:  24.47  24.04  24.74  24.99
 0.83N / 48:  24.26  23.87  24.41  24.55
 0.5N  / 47:  24.11  23.76  24.09  24.18
 0.17N / 46:  24.02  23.70  23.83  23.91
 
! irregular dynamic axis (Y axis of model grid)
! ... by subscript
list temp[j=45:55:3]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: on Y
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 4 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
            129.5W 128.5W 127.5W 126.5W 125.5W 
            101    102    103    104    105
 2.8N / 4:  25.51  25.10  24.82  24.76  24.94
 1.8N / 3:  24.77  24.52  24.40  24.40  24.62
 0.8N / 2:  24.16  24.00  23.89  23.86  23.98
 0.2S / 1:  23.98  23.88  23.78  23.69  23.62
! ... by world coord
list temp[y=0.5s:5n:1.5]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: 1.5 deg on Y
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 4 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
            129.5W 128.5W 127.5W 126.5W 125.5W 
            101    102    103    104    105
 4N   / 4:  26.07  25.76  25.43  25.17  25.18
 2.5N / 3:  25.27  24.90  24.69  24.66  24.88
 1N   / 2:  24.25  24.08  23.97  23.95  24.09
 0.5S / 1:  24.07  23.99  23.89  23.79  23.70
show grid/dyn
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 PSXT      LONGITUDE          160mr   130.5E               70.5W
 (AX###)   LATITUDE             4 r   0.5S                 4N
 PSZT      DEPTH (m)           27 i-  5                    3824
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
 
! ========
! 2/96: repeat the very same commands using GX=lo:hi:delta notation
! regular dynamic axis
! ... by subscript
list temp[gi=100:110:2]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: 2 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              130.5W 128.5W 126.5W 124.5W 122.5W 120.5W 
                1      2      3      4      5      6
 1.5N  / 50:  24.86  24.34  24.23  24.82  25.60  25.22
 1.17N / 49:  24.60  24.15  24.04  24.53  25.22  24.82
 0.83N / 48:  24.37  24.00  23.86  24.25  24.77  24.40
 0.5N  / 47:  24.19  23.89  23.73  23.97  24.36  24.07
 0.17N / 46:  24.09  23.85  23.66  23.74  24.03  23.83
! ... by world coord
list temp[gx=130w:120W:3]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: 3 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 4 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              130W   127W   124W   121W   
                1      2      3      4
 1.5N  / 50:  24.70  24.23  25.06  25.38
 1.17N / 49:  24.47  24.04  24.74  24.99
 0.83N / 48:  24.26  23.87  24.41  24.55
 0.5N  / 47:  24.11  23.76  24.09  24.18
 0.17N / 46:  24.02  23.70  23.83  23.91
 
! irregular dynamic axis (Y axis of model grid)
! ... by subscript
list temp[gj=45:55:3]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: on Y
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 4 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
            129.5W 128.5W 127.5W 126.5W 125.5W 
            101    102    103    104    105
 2.8N / 4:  25.51  25.10  24.82  24.76  24.94
 1.8N / 3:  24.77  24.52  24.40  24.40  24.62
 0.8N / 2:  24.16  24.00  23.89  23.86  23.98
 0.2S / 1:  23.98  23.88  23.78  23.69  23.62
! ... by world coord
list temp[gy=0.5s:5n:1.5]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: 1.5 deg on Y
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 4 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
            129.5W 128.5W 127.5W 126.5W 125.5W 
            101    102    103    104    105
 4N   / 4:  26.07  25.76  25.43  25.17  25.18
 2.5N / 3:  25.27  24.90  24.69  24.66  24.88
 1N   / 2:  24.25  24.08  23.97  23.95  24.09
 0.5S / 1:  24.07  23.99  23.89  23.79  23.70
 
! and a few more for pseudo-variables
list/nohead X[GX=130e:80w:40]
 130E   / 1:  130.0
 170E   / 2:  170.0
 150W   / 3:  210.0
 110W   / 4:  250.0
list/nohead Y[GY=10s:10n:8]
 6N    / 3:   6.00
 2S    / 2:  -2.00
 10S   / 1: -10.00
list/nohead Z[GZ=0:100:30]
 0    / 1:   0.00
 30   / 2:  30.00
 60   / 3:  60.00
 90   / 4:  90.00
list/nohead T[GT=0:100:30]
 0    / 1:   0.00
 30   / 2:  30.00
 60   / 3:  60.00
 90   / 4:  90.00
list/nohead i[gi=1:11:5]
 1    / 1:  1.000
 6    / 2:  2.000
 11   / 3:  3.000
list/nohead j[gj=1:11:5]
 1    / 1:  1.000
 6    / 2:  2.000
 11   / 3:  3.000
list/nohead k[gk=1:11:5]
 1    / 1:  1.000
 6    / 2:  2.000
 11   / 3:  3.000
list/nohead l[gl=1:11:5]
 1    / 1:  1.000
 6    / 2:  2.000
 11   / 3:  3.000
 
! ========
 
! multiple axes, simultaneously
list temp[i=100:110:2,j=45:55:3]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: 2 deg on X, on Y
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 4 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
            130.5W 128.5W 126.5W 124.5W 122.5W 120.5W 
              1      2      3      4      5      6
 2.8N / 4:  25.88  25.10  24.76  25.36  25.95  26.11
 1.8N / 3:  25.15  24.52  24.40  25.06  25.84  25.57
 0.8N / 2:  24.37  24.00  23.86  24.25  24.77  24.40
 0.2S / 1:  24.08  23.88  23.69  23.63  23.81  23.67
list temp[i=100:110:2,y=0.5s:5n:1.5]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: 2 deg on X, 1.5 deg on Y
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 4 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
            130.5W 128.5W 126.5W 124.5W 122.5W 120.5W 
              1      2      3      4      5      6
 4N   / 4:  26.31  25.76  25.17  25.42  26.09  26.43
 2.5N / 3:  25.69  24.90  24.66  25.33  25.96  26.00
 1N   / 2:  24.48  24.08  23.95  24.39  25.00  24.61
 0.5S / 1:  24.15  23.99  23.79  23.65  23.71  23.60
list temp[x=130w:120W:3,j=45:55:3]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: 3 deg on X, on Y
             FILENAME : gtsa056_1.cdf
             SUBSET   : 4 by 4 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
            130W   127W   124W   121W   
              1      2      3      4
 2.8N / 4:  25.69  24.79  25.55  26.09
 1.8N / 3:  24.96  24.40  25.31  25.68
 0.8N / 2:  24.26  23.87  24.41  24.55
 0.2S / 1:  24.03  23.73  23.67  23.72
list temp[x=130w:120W:3,y=0.5s:5n:1.5]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: 3 deg on X, 1.5 deg on Y
             FILENAME : gtsa056_1.cdf
             SUBSET   : 4 by 4 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
            130W   127W   124W   121W   
              1      2      3      4
 4N   / 4:  26.19  25.30  25.58  26.39
 2.5N / 3:  25.48  24.68  25.55  26.02
 1N   / 2:  24.36  23.96  24.57  24.77
 0.5S / 1:  24.11  23.84  23.66  23.64
show grid/dyn
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 (AX###)   LONGITUDE            4 r   130W                 121W
 (AX###)   LATITUDE             4 r   0.5S                 4N
 PSZT      DEPTH (m)           27 i-  5                    3824
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
 
! the same tests but now on a nested definition
! regular dynamic axis
! ... by subscript
LET/QUIET a temp[i=90:110:2]
! changes on 11/29 in CONFINE_AXIS this no longer an error ... a bit mysterious
! changes on 4/98 in CONFINE_AXIS this is once again an error
! Changes 11/2018 in FLESH_OUT_AXIS, this is not an error
set mode ignore; list a; cancel mode ignore	! SET REGION mis-applied
             VARIABLE : TEMP[I=90:110:2]
             FILENAME : gtsa056_1.cdf
             SUBSET   : 11 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              140.5W 138.5W 136.5W 134.5W 132.5W 130.5W 128.5W 126.5W 124.5W 122.5W 120.5W 
                1      2      3      4      5      6      7      8      9     10     11
 1.5N  / 50:  24.93  24.49  25.47  25.95  25.62  24.86  24.34  24.23  24.82  25.60  25.22
 1.17N / 49:  24.82  24.37  25.17  25.83  25.37  24.60  24.15  24.04  24.53  25.22  24.82
 0.83N / 48:  24.69  24.25  24.80  25.67  25.14  24.37  24.00  23.86  24.25  24.77  24.40
 0.5N  / 47:  24.57  24.17  24.47  25.48  24.92  24.19  23.89  23.73  23.97  24.36  24.07
 0.17N / 46:  24.47  24.12  24.28  25.17  24.70  24.09  23.85  23.66  23.74  24.03  23.83
list a[i=1:6]
             VARIABLE : TEMP[I=90:110:2]
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              140.5W 138.5W 136.5W 134.5W 132.5W 130.5W 
                1      2      3      4      5      6
 1.5N  / 50:  24.93  24.49  25.47  25.95  25.62  24.86
 1.17N / 49:  24.82  24.37  25.17  25.83  25.37  24.60
 0.83N / 48:  24.69  24.25  24.80  25.67  25.14  24.37
 0.5N  / 47:  24.57  24.17  24.47  25.48  24.92  24.19
 0.17N / 46:  24.47  24.12  24.28  25.17  24.70  24.09
list a[i=1:6:2]
             VARIABLE : TEMP[I=90:110:2]
                        regrid: 4 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 3 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              140.5W 136.5W 132.5W 
                1      2      3
 1.5N  / 50:  24.93  25.47  25.62
 1.17N / 49:  24.82  25.17  25.37
 0.83N / 48:  24.69  24.80  25.14
 0.5N  / 47:  24.57  24.47  24.92
 0.17N / 46:  24.47  24.28  24.70
list a[i=-2:8:2]		! clips to allowed limits
             VARIABLE : TEMP[I=90:110:2]
                        regrid: 4 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 4 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              140.5W 136.5W 132.5W 128.5W 
                1      2      3      4
 1.5N  / 50:  24.93  25.47  25.62  24.34
 1.17N / 49:  24.82  25.17  25.37  24.15
 0.83N / 48:  24.69  24.80  25.14  24.00
 0.5N  / 47:  24.57  24.47  24.92  23.89
 0.17N / 46:  24.47  24.28  24.70  23.85
list a[x=135w:125w]
             VARIABLE : TEMP[I=90:110:2]
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              134.5W 132.5W 130.5W 128.5W 126.5W 124.5W 
                4      5      6      7      8      9
 1.5N  / 50:  25.95  25.62  24.86  24.34  24.23  24.82
 1.17N / 49:  25.83  25.37  24.60  24.15  24.04  24.53
 0.83N / 48:  25.67  25.14  24.37  24.00  23.86  24.25
 0.5N  / 47:  25.48  24.92  24.19  23.89  23.73  23.97
 0.17N / 46:  25.17  24.70  24.09  23.85  23.66  23.74
list a[x=135w:125w:3]
             VARIABLE : TEMP[I=90:110:2]
                        regrid: 3 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 4 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              135W   132W   129W   126W   
                1      2      3      4
 1.5N  / 50:  25.83  25.43  24.47  24.38
 1.17N / 49:  25.67  25.18  24.26  24.17
 0.83N / 48:  25.45  24.95  24.09  23.96
 0.5N  / 47:  25.23  24.74  23.97  23.79
 0.17N / 46:  24.94  24.55  23.91  23.68
! ... by world coord
LET/QUIET a = temp[x=130w:120W:3]
! changes on 11/29 in CONFINE_AXIS this no longer an error ... a bit mysterious
! changes on 4/98 in CONFINE_AXIS this is once again an error
! Changes 5/2007 in GET_VAR_CONTEXT this is no longer an error (acm) !
set mode ignore; list a; cancel mode ignore	! SET REGION mis-applied
             VARIABLE : TEMP[X=130W:120W:3]
             FILENAME : gtsa056_1.cdf
             SUBSET   : 4 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              130W   127W   124W   121W   
                1      2      3      4
 1.5N  / 50:  24.70  24.23  25.06  25.38
 1.17N / 49:  24.47  24.04  24.74  24.99
 0.83N / 48:  24.26  23.87  24.41  24.55
 0.5N  / 47:  24.11  23.76  24.09  24.18
 0.17N / 46:  24.02  23.70  23.83  23.91
list a[i=1:4]
             VARIABLE : TEMP[X=130W:120W:3]
             FILENAME : gtsa056_1.cdf
             SUBSET   : 4 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              130W   127W   124W   121W   
                1      2      3      4
 1.5N  / 50:  24.70  24.23  25.06  25.38
 1.17N / 49:  24.47  24.04  24.74  24.99
 0.83N / 48:  24.26  23.87  24.41  24.55
 0.5N  / 47:  24.11  23.76  24.09  24.18
 0.17N / 46:  24.02  23.70  23.83  23.91
list a[i=1:4:2]
             VARIABLE : TEMP[X=130W:120W:3]
                        regrid: 6 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 2 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              130W   124W   
                1      2
 1.5N  / 50:  24.70  25.06
 1.17N / 49:  24.47  24.74
 0.83N / 48:  24.26  24.41
 0.5N  / 47:  24.11  24.09
 0.17N / 46:  24.02  23.83
list a[i=-2:8:2]		! clips to allowed limits
             VARIABLE : TEMP[X=130W:120W:3]
                        regrid: 6 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 2 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              130W   124W   
                1      2
 1.5N  / 50:  24.70  25.06
 1.17N / 49:  24.47  24.74
 0.83N / 48:  24.26  24.41
 0.5N  / 47:  24.11  24.09
 0.17N / 46:  24.02  23.83
list a[x=129w:120w:2]
             VARIABLE : TEMP[X=130W:120W:3]
                        regrid: 2 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              129W   127W   125W   123W   121W   
                1      2      3      4      5
 1.5N  / 50:  24.54  24.23  24.78  25.17  25.38
 1.17N / 49:  24.33  24.04  24.51  24.82  24.99
 0.83N / 48:  24.13  23.87  24.23  24.46  24.55
 0.5N  / 47:  23.99  23.76  23.98  24.12  24.18
 0.17N / 46:  23.92  23.70  23.79  23.86  23.91
list a[x=138w:110w:5]
             VARIABLE : TEMP[X=130W:120W:3]
                        regrid: 5 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              138W   133W   128W   123W   118W   113W   
                1      2      3      4      5      6
 1.5N  / 50:   ....   ....  24.39  25.17   ....   ....
 1.17N / 49:   ....   ....  24.18  24.82   ....   ....
 0.83N / 48:   ....   ....  24.00  24.46   ....   ....
 0.5N  / 47:   ....   ....  23.87  24.12   ....   ....
 0.17N / 46:   ....   ....  23.81  23.86   ....   ....
show grid/dyn
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 (AX###)   LONGITUDE            6 r   138W                 113W
 PSYT      LATITUDE           100 i   28.836S              48.568N
 PSZT      DEPTH (m)           27 i-  5                    3824
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
 
! irregular dynamic axis
! ... by subscript
LET/QUIET a = temp[j=45:65:3]
! changes on 11/29 in CONFINE_AXIS this no longer an error ... a bit mysterious
! changes on 4/98 in CONFINE_AXIS this is once again an error
! Changes 11/2018 in FLESH_OUT_AXIS, this is not an error
set mode ignore; list a; cancel mode ignore	! SET REGION mis-applied
             VARIABLE : TEMP[J=45:65:3]
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 7 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
            129.5W 128.5W 127.5W 126.5W 125.5W 
            101    102    103    104    105
 5.8N / 7:  26.63  26.57  26.54  26.56  26.66
 4.8N / 6:  26.37  26.19  26.03  25.93  25.99
 3.8N / 5:  26.00  25.68  25.32  25.06  25.09
 2.8N / 4:  25.51  25.10  24.82  24.76  24.94
 1.8N / 3:  24.77  24.52  24.40  24.40  24.62
 0.8N / 2:  24.16  24.00  23.89  23.86  23.98
 0.2S / 1:  23.98  23.88  23.78  23.69  23.62
list a[j=1:6]
             VARIABLE : TEMP[J=45:65:3]
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 6 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
            129.5W 128.5W 127.5W 126.5W 125.5W 
            101    102    103    104    105
 4.8N / 6:  26.37  26.19  26.03  25.93  25.99
 3.8N / 5:  26.00  25.68  25.32  25.06  25.09
 2.8N / 4:  25.51  25.10  24.82  24.76  24.94
 1.8N / 3:  24.77  24.52  24.40  24.40  24.62
 0.8N / 2:  24.16  24.00  23.89  23.86  23.98
 0.2S / 1:  23.98  23.88  23.78  23.69  23.62
list a[j=1:6:2]
             VARIABLE : TEMP[J=45:65:3]
                        regrid: on Y
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 3 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
            129.5W 128.5W 127.5W 126.5W 125.5W 
            101    102    103    104    105
 3.8N / 3:  26.00  25.68  25.32  25.06  25.09
 1.8N / 2:  24.77  24.52  24.40  24.40  24.62
 0.2S / 1:  23.98  23.88  23.78  23.69  23.62
list a[j=-2:8:2]		! clips to allowed limits
             VARIABLE : TEMP[J=45:65:3]
                        regrid: on Y
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 4 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
            129.5W 128.5W 127.5W 126.5W 125.5W 
            101    102    103    104    105
 5.8N / 4:  26.63  26.57  26.54  26.56  26.66
 3.8N / 3:  26.00  25.68  25.32  25.06  25.09
 1.8N / 2:  24.77  24.52  24.40  24.40  24.62
 0.2S / 1:  23.98  23.88  23.78  23.69  23.62
list a[y=1S:8N:2]
             VARIABLE : TEMP[J=45:65:3]
                        regrid: 2 deg on Y
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
            129.5W 128.5W 127.5W 126.5W 125.5W 
            101    102    103    104    105
 7N   / 5:   ....   ....   ....   ....   ....
 5N   / 4:  26.41  26.25  26.11  26.03  26.10
 3N   / 3:  25.59  25.20  24.91  24.81  24.96
 1N   / 2:  24.26  24.09  23.97  23.95  24.08
 1S   / 1:   ....   ....   ....   ....   ....
! ... by world coord
LET/QUIET a = temp[y=3.5s:5n:1.5]
list a[j=1:6:2]
             VARIABLE : TEMP[Y=3.5S:5N:1.5]
                        regrid: 3 deg on Y
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 3 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
            129.5W 128.5W 127.5W 126.5W 125.5W 
            101    102    103    104    105
 2.5N / 3:  25.27  24.90  24.69  24.66  24.88
 0.5S / 2:  24.07  23.99  23.89  23.79  23.70
 3.5S / 1:  25.19  25.15  25.09  25.04  25.03
list a[j=-2:8:2]
             VARIABLE : TEMP[Y=3.5S:5N:1.5]
                        regrid: 3 deg on Y
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 3 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
            129.5W 128.5W 127.5W 126.5W 125.5W 
            101    102    103    104    105
 2.5N / 3:  25.27  24.90  24.69  24.66  24.88
 0.5S / 2:  24.07  23.99  23.89  23.79  23.70
 3.5S / 1:  25.19  25.15  25.09  25.04  25.03
list a[y=1S:8N:2]
             VARIABLE : TEMP[Y=3.5S:5N:1.5]
                        regrid: 2 deg on Y
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
            129.5W 128.5W 127.5W 126.5W 125.5W 
            101    102    103    104    105
 7N   / 5:   ....   ....   ....   ....   ....
 5N   / 4:   ....   ....   ....   ....   ....
 3N   / 3:  25.54  25.19  24.94  24.83  24.98
 1N   / 2:  24.25  24.08  23.97  23.95  24.09
 1S   / 1:  24.28  24.22  24.14  24.07  23.98
 
! modulo (regular) dynamic axis
set axis/modulo psxt
! ... by subscript
list temp[i=155:170:2]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: 2 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 8 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
               75.5W  73.5W  71.5W  69.5W  67.5W  65.5W  63.5W  61.5W 
                1      2      3      4      5      6      7      8
 1.5N  / 50:   ....   ....   ....   ....  29.50  29.40  29.41  29.51
 1.17N / 49:   ....   ....   ....   ....  29.54  29.42  29.45  29.53
 0.83N / 48:   ....   ....   ....   ....  29.60  29.47  29.49  29.55
 0.5N  / 47:   ....   ....   ....   ....  29.68  29.53  29.54  29.59
 0.17N / 46:   ....   ....   ....   ....  29.79  29.60  29.59  29.62
! ... by world coord
list temp[x=90w:60W:4]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: 4 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 8 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
               90W    86W    82W    78W    74W    70W    66W    62W   
                1      2      3      4      5      6      7      8
 1.5N  / 50:  27.22  27.56  27.95   ....   ....   ....  29.35  29.49
 1.17N / 49:  27.11  27.41  27.89   ....   ....   ....  29.39  29.51
 0.83N / 48:  26.96  27.25  27.76   ....   ....   ....  29.46  29.54
 0.5N  / 47:  26.78  27.09  27.56   ....   ....   ....  29.55  29.57
 0.17N / 46:  26.54  26.90  27.28   ....   ....   ....  29.63  29.61
show grid/dyn
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 (AX###)   LONGITUDE            8 r   90W                  62W
 PSYT      LATITUDE           100 i   28.836S              48.568N
 PSZT      DEPTH (m)           27 i-  5                    3824
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
 
! nested modulo (the dynamic axis is **NOT** modulo)
! ... by subscript
LET/QUIET a temp[i=155:170:2]
! changes on 11/29 in CONFINE_AXIS this no longer an error ... a bit mysterious
! changes on 4/98 in CONFINE_AXIS this is once again an error
! Changes 11/2018 in FLESH_OUT_AXIS, this is not an error
set mode ignore; list a; cancel mode ignore	! SET REGION mis-applied
             VARIABLE : TEMP[I=155:170:2]
             FILENAME : gtsa056_1.cdf
             SUBSET   : 8 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
               75.5W  73.5W  71.5W  69.5W  67.5W  65.5W  63.5W  61.5W 
                1      2      3      4      5      6      7      8
 1.5N  / 50:   ....   ....   ....   ....  29.50  29.40  29.41  29.51
 1.17N / 49:   ....   ....   ....   ....  29.54  29.42  29.45  29.53
 0.83N / 48:   ....   ....   ....   ....  29.60  29.47  29.49  29.55
 0.5N  / 47:   ....   ....   ....   ....  29.68  29.53  29.54  29.59
 0.17N / 46:   ....   ....   ....   ....  29.79  29.60  29.59  29.62
list a[i=1:6]
             VARIABLE : TEMP[I=155:170:2]
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
               75.5W  73.5W  71.5W  69.5W  67.5W  65.5W 
                1      2      3      4      5      6
 1.5N  / 50:   ....   ....   ....   ....  29.50  29.40
 1.17N / 49:   ....   ....   ....   ....  29.54  29.42
 0.83N / 48:   ....   ....   ....   ....  29.60  29.47
 0.5N  / 47:   ....   ....   ....   ....  29.68  29.53
 0.17N / 46:   ....   ....   ....   ....  29.79  29.60
list a[i=1:6:2]
             VARIABLE : TEMP[I=155:170:2]
                        regrid: 4 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 3 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
               75.5W  71.5W  67.5W 
                1      2      3
 1.5N  / 50:   ....   ....  29.50
 1.17N / 49:   ....   ....  29.54
 0.83N / 48:   ....   ....  29.60
 0.5N  / 47:   ....   ....  29.68
 0.17N / 46:   ....   ....  29.79
list a[i=-2:8:2]		! clips to allowed limits
             VARIABLE : TEMP[I=155:170:2]
                        regrid: 4 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 4 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
               75.5W  71.5W  67.5W  63.5W 
                1      2      3      4
 1.5N  / 50:   ....   ....  29.50  29.41
 1.17N / 49:   ....   ....  29.54  29.45
 0.83N / 48:   ....   ....  29.60  29.49
 0.5N  / 47:   ....   ....  29.68  29.54
 0.17N / 46:   ....   ....  29.79  29.59
list a[x=75w:65w]		! limits ignored --> behavior could be improved
             VARIABLE : TEMP[I=155:170:2]
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
               75.5W  73.5W  71.5W  69.5W  67.5W  65.5W 
                1      2      3      4      5      6
 1.5N  / 50:   ....   ....   ....   ....  29.50  29.40
 1.17N / 49:   ....   ....   ....   ....  29.54  29.42
 0.83N / 48:   ....   ....   ....   ....  29.60  29.47
 0.5N  / 47:   ....   ....   ....   ....  29.68  29.53
 0.17N / 46:   ....   ....   ....   ....  29.79  29.60
list a[x=85w:45w:5]
             VARIABLE : TEMP[I=155:170:2]
                        regrid: 5 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 9 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
               85W    80W    75W    70W    65W    60W    55W    50W    45W   
                1      2      3      4      5      6      7      8      9
 1.5N  / 50:   ....   ....   ....   ....  29.40   ....   ....   ....   ....
 1.17N / 49:   ....   ....   ....   ....  29.43   ....   ....   ....   ....
 0.83N / 48:   ....   ....   ....   ....  29.47   ....   ....   ....   ....
 0.5N  / 47:   ....   ....   ....   ....  29.53   ....   ....   ....   ....
 0.17N / 46:   ....   ....   ....   ....  29.59   ....   ....   ....   ....
! ... by world coord
LET/QUIET a = temp[x=90w:60W:4]
! changes on 11/29 in CONFINE_AXIS this no longer an error ... a bit mysterious
! changes on 4/98 in CONFINE_AXIS this is once again an error
! Changes 5/2007 in GET_VAR_CONTEXT this is no longer an error (acm) !
set mode ignore; list a; cancel mode ignore	! SET REGION mis-applied
             VARIABLE : TEMP[X=90W:60W:4]
             FILENAME : gtsa056_1.cdf
             SUBSET   : 8 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
               90W    86W    82W    78W    74W    70W    66W    62W   
                1      2      3      4      5      6      7      8
 1.5N  / 50:  27.22  27.56  27.95   ....   ....   ....  29.35  29.49
 1.17N / 49:  27.11  27.41  27.89   ....   ....   ....  29.39  29.51
 0.83N / 48:  26.96  27.25  27.76   ....   ....   ....  29.46  29.54
 0.5N  / 47:  26.78  27.09  27.56   ....   ....   ....  29.55  29.57
 0.17N / 46:  26.54  26.90  27.28   ....   ....   ....  29.63  29.61
list a[i=1:6]
             VARIABLE : TEMP[X=90W:60W:4]
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
               90W    86W    82W    78W    74W    70W   
                1      2      3      4      5      6
 1.5N  / 50:  27.22  27.56  27.95   ....   ....   ....
 1.17N / 49:  27.11  27.41  27.89   ....   ....   ....
 0.83N / 48:  26.96  27.25  27.76   ....   ....   ....
 0.5N  / 47:  26.78  27.09  27.56   ....   ....   ....
 0.17N / 46:  26.54  26.90  27.28   ....   ....   ....
list a[i=1:6:2]
             VARIABLE : TEMP[X=90W:60W:4]
                        regrid: 8 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 3 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
               90W    82W    74W   
                1      2      3
 1.5N  / 50:  27.22  27.95   ....
 1.17N / 49:  27.11  27.89   ....
 0.83N / 48:  26.96  27.76   ....
 0.5N  / 47:  26.78  27.56   ....
 0.17N / 46:  26.54  27.28   ....
list a[i=-2:8:2]
             VARIABLE : TEMP[X=90W:60W:4]
                        regrid: 8 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 4 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
               90W    82W    74W    66W   
                1      2      3      4
 1.5N  / 50:  27.22  27.95   ....  29.35
 1.17N / 49:  27.11  27.89   ....  29.39
 0.83N / 48:  26.96  27.76   ....  29.46
 0.5N  / 47:  26.78  27.56   ....  29.55
 0.17N / 46:  26.54  27.28   ....  29.63
list a[x=129w:120w:2]		! no overlap
             VARIABLE : TEMP[X=90W:60W:4]
                        regrid: 2 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              129W127W125W123W121W
               1   2   3   4   5
 1.5N  / 50:....................
 1.17N / 49:....................
 0.83N / 48:....................
 0.5N  / 47:....................
 0.17N / 46:....................
list a[x=92w:75w:3]
             VARIABLE : TEMP[X=90W:60W:4]
                        regrid: 3 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
               92W    89W    86W    83W    80W    77W   
                1      2      3      4      5      6
 1.5N  / 50:   ....  27.30  27.56  27.85   ....   ....
 1.17N / 49:   ....  27.19  27.41  27.77   ....   ....
 0.83N / 48:   ....  27.04  27.25  27.64   ....   ....
 0.5N  / 47:   ....  26.85  27.09  27.44   ....   ....
 0.17N / 46:   ....  26.63  26.90  27.18   ....   ....
list a[x=101w:50w:6]
             VARIABLE : TEMP[X=90W:60W:4]
                        regrid: 6 deg on X
             FILENAME : gtsa056_1.cdf
             SUBSET   : 9 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 15-JAN-1982 14:00
              101W    95W    89W    83W    77W    71W    65W    59W    53W   
                1      2      3      4      5      6      7      8      9
 1.5N  / 50:   ....   ....  27.30  27.85   ....   ....  29.39   ....   ....
 1.17N / 49:   ....   ....  27.19  27.77   ....   ....  29.42   ....   ....
 0.83N / 48:   ....   ....  27.04  27.64   ....   ....  29.48   ....   ....
 0.5N  / 47:   ....   ....  26.85  27.44   ....   ....  29.55   ....   ....
 0.17N / 46:   ....   ....  26.63  27.18   ....   ....  29.62   ....   ....
cancel axis/modulo psxt
show grid/dyn
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 (AX###)   LONGITUDE            9 r   101W                 53W
 PSYT      LATITUDE           100 i   28.836S              48.568N
 PSZT      DEPTH (m)           27 i-  5                    3824
 TIME2     TIME                 5mr   15-JAN-1982 14:00    27-JAN-1982 18:00
 
! calendar axes
list/k=1/y=0/x=180 temp[t=15-JAN-1982:11-FEB-1982:`24*6`@ave]   ! 6-day ave
 !-> list/k=1/y=0/x=180 temp[t=15-JAN-1982:11-FEB-1982:144@ave]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: 144 hour on T@AVE
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 points (TIME)
             LONGITUDE: 179.5E
             LATITUDE : 0.167S
             DEPTH (m): 5
                      179.5E 
                       50
 15-JAN-1982 00 / 1:  27.85
 21-JAN-1982 00 / 2:  27.85
 27-JAN-1982 00 / 3:  27.77
 02-FEB-1982 00 / 4:  27.90
 08-FEB-1982 00 / 5:  27.80
! ... note that the "explicit limits" changes to Ferret V4.20 mean that
! ... an explicit L=1 qualifying the command **WILL** apply
list/k=1/y=0/x=180/l=1 temp[t=15-JAN-1982:11-FEB-1982:`24*6`@ave]
 !-> list/k=1/y=0/x=180/l=1 temp[t=15-JAN-1982:11-FEB-1982:144@ave]
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: 144 hour on T@AVE
             FILENAME : gtsa056_1.cdf
             LONGITUDE: 179.5E
             LATITUDE : 0.167S
             DEPTH (m): 5
             TIME     : 15-JAN-1982 00:00
          27.85
list/l=1:3 T[t=15-JAN-1982:11-FEB-1982:`24*2`]			! pseudo-var
 !-> list/l=1:3 T[t=15-JAN-1982:11-FEB-1982:48]
             VARIABLE : T
                        axis (AX###)
             SUBSET   : 3 points (TIME)
 15-JAN-1982 00 / 1:  723925.
 17-JAN-1982 00 / 2:  723927.
 19-JAN-1982 00 / 3:  723929.
 
cancel var/all
show grid/dyn
Dynamic grids:
    no implicit grids
Dynamic axes:
    no implicit axes
set axis/modulo psxt
 
set mode/last diag
*** Running ferret script: bn_cdf.jnl
! bn320_cdf
! benchmark to test netCDF input and output
! requires version 3.20 or later
! updated from version 2.3 1/26/95
!      added reverse-axis tests 3/2/95
! V5 *sh* 7/99 -- added /clobber
 
! test many simultaneous netCDF files
GO bn_cdf.sub1
! bn230_cdf.sub1
! benchmark to test multiple netCDF simultaneous accesses
! requires version 2.30 or later
! 6/92
 
! V5 *sh* 7/99 -- clean up files before writing
 
cancel region
canc var/all
cancel data/all
 
! delete old ones
sp rm -f test0[a-p].cdf
 
! write a bunch of em
list/format=cdf/append/l=1:500/file=test0a.cdf l
list/format=cdf/append/l=1:500/file=test0b.cdf/rigid l
list/format=cdf/append/l=1:500/file=test0c.cdf/rigid l
list/format=cdf/append/l=1:500/file=test0d.cdf/rigid l
list/format=cdf/append/l=1:500/file=test0e.cdf/rigid l
list/format=cdf/append/l=1:500/file=test0f.cdf/rigid l
list/format=cdf/append/l=1:500/file=test0g.cdf/rigid l
list/format=cdf/append/l=1:500/file=test0h.cdf/rigid l
list/format=cdf/append/l=1:500/file=test0i.cdf/rigid l
list/format=cdf/append/l=1:500/file=test0j.cdf/rigid l
list/format=cdf/append/l=1:500/file=test0k.cdf/rigid l
list/format=cdf/append/l=1:500/file=test0l.cdf/rigid l
list/format=cdf/append/l=1:500/file=test0m.cdf/rigid l
list/format=cdf/append/l=1:500/file=test0n.cdf/rigid l
list/format=cdf/append/l=1:500/file=test0o.cdf/rigid l
list/format=cdf/append/l=1:500/file=test0p.cdf/rigid l
 
! initialize all at once
set data/format=cdf test0a, test0b, test0c, test0d, test0e, test0f, test0g, test0h, test0i, test0j, test0k, test0l, test0n, test0m, test0o, test0p
show data 1
     currently SET data sets:
    1> ./test0a.cdf
 name     title                             I         J         K         L
 L_       L                                ...       ...       ...       1:500
       (axis ABSTRACT)
 
show data/br
     currently SET data sets:
    1> ./test0a.cdf
    2> ./test0b.cdf
    3> ./test0c.cdf
    4> ./test0d.cdf
    5> ./test0e.cdf
    6> ./test0f.cdf
    7> ./test0g.cdf
    8> ./test0h.cdf
    9> ./test0i.cdf
   10> ./test0j.cdf
   11> ./test0k.cdf
   12> ./test0l.cdf
   13> ./test0n.cdf
   14> ./test0m.cdf
   15> ./test0o.cdf
   16> ./test0p.cdf  (default)
 
! test access to one
stat l_[d=1]
 
             L
             axis ABSTRACT
             X:  N/A
             Y:  N/A
             Z:  N/A
             T: 0.5 to 500.5
             E:  N/A
             F:  N/A
             DATA SET: ./test0a.cdf
 
 Total # of data points: 500 (1*1*1*500*1*1)
 # flagged as bad  data: 0
 Minimum value: 1
 Maximum value: 500
 Mean    value: 250.5 (unweighted average)
 Standard deviation: 144.48
 
! test access to all
stat l_[d=1]-l_[d=2]+l_[d=3]-l_[d=4]+l_[d=5]-l_[d=6]+l_[d=7]-l_[d=8]+l_[d=9]-l_[d=10]+l_[d=11]-l_[d=12]+l_[d=13]-l_[d=14]+l_[d=15]-l_[d=16]
 
             L_[D=test0a]-L_[D=test0b]+L_[D=test0c]-L_[D=test0d]+L_[D=test0e]-L_[D=test0f]+L_[D=test0g]-L_[D=test0h]+L_[D=test0i]-L_[D=test0j]+L_[D=test0k]-L_[D=test0l]+L_[D=test0n]-L_[D=test0m
             X:  N/A
             Y:  N/A
             Z:  N/A
             T: 0.5 to 500.5
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 500 (1*1*1*500*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
cancel data/all
 
 
! test abstract variable io
GO bn_cdf.sub2
! bn230_cdf.sub2
! benchmark to test abstract variable netCDF input and output
! requires version 2.30 or later
! 6/92
 
! V5 *sh* 7/99 added /CLOBBER
 
cancel region
canc var/all
cancel data/all
 
! define a realistic time series grid
define axis/t="1-jan-1902":"1-jan-2010":1/unit=day tcentury
define grid/like=abstract/t=tcentury gcentury
let tlong = t[g=gcentury]
 
let i1 = i
let j1 = j
let k1 = k
let l1 = l[g=gcentury]
let l2 = l
let ij = i+j
let ik = i+k
let il = i+l1
let jk = j+k
let jl = j+l1
let kl = k+l1
let ijk = i+j+k
let ikl = i+k+l1
let ijl = i+j+l1
let jkl = j+k+l1
let ijkl = i+j+k+l1
let ijk2 = i+j+k
let ikl2 = i+k+l1
let ijl2 = i+j+l1
let jkl2 = j+k+l1
let iavejkl = ijkl[i=@ave]
let ijavekl = ijkl[j=@ave]
let ijkavel = ijkl[k=@ave]
let ijklave = ijkl[l=@ave]
 
! a bunch of basic geometries
! 1d
list/format=cdf/i=1:10/clobber/file=test_abs.cdf i1   ! not /APPEND - must be new
list/format=cdf/j=1:20/append/file=test_abs.cdf j1
list/format=cdf/k=1:100/append/file=test_abs.cdf k1
list/format=cdf/l=1:10/append/file=test_abs.cdf l1           ! record axis
list/format=cdf/l=1:10/append/file=test_abs.cdf l2           ! rigid axis
 
! 2D
list/format=cdf/i=1:10/j=1:20/append/file=test_abs.cdf ij
list/format=cdf/i=1:10/k=1:100/append/file=test_abs.cdf ik
list/format=cdf/i=1:10/l=5:10/append/file=test_abs.cdf il
list/format=cdf/k=1:100/j=1:20/append/file=test_abs.cdf jk
 
!3D
set region/i=1:10/j=1:20/k=1:100/l=4:8
list/format=cdf/append/file=test_abs.cdf ijk
list/format=cdf/append/file=test_abs.cdf ikl
list/format=cdf/append/file=test_abs.cdf ijl
list/format=cdf/append/file=test_abs.cdf jkl
 
!4D
list/format=cdf/append/file=test_abs.cdf ijkl
 
! extend along time axis and write sub-regions
! (note: this may leave undefined regions in other variables)
list/format=cdf/append/file=test_abs.cdf/i=1:5 /j=1:5 /l=11:12 ijl
list/format=cdf/append/file=test_abs.cdf/i=6:10/j=1:5 /l=11:12 ijl
list/format=cdf/append/file=test_abs.cdf/i=1:5 /j=6:10/l=11:12 ijl
list/format=cdf/append/file=test_abs.cdf/i=6:10/j=6:10/l=11:12 ijl
 
! rewrite a sub-region in the middle of the data
list/format=cdf/append/file=test_abs.cdf/i=6:8/j=6:8/l=8:10/k=3:5 ijkl
 
! check documentation of transforms
list/format=cdf/append/file=test_abs.cdf ijk2[i=@ave]
list/format=cdf/append/file=test_abs.cdf ikl2[i=@ave,k=@sbx:3]
list/format=cdf/append/file=test_abs.cdf ijl2[i=@ave,j=@ave]
list/format=cdf/append/file=test_abs.cdf jkl2[k=@ave,l=@ave]
list/format=cdf/append/file=test_abs.cdf iavejkl
list/format=cdf/append/file=test_abs.cdf ijavekl
list/format=cdf/append/file=test_abs.cdf ijkavel
list/format=cdf/append/file=test_abs.cdf ijklave
 
! look at what we've created - time axis should be regular
set data/format=cdf test_abs
show data/full
     currently SET data sets:
    1> ./test_abs.cdf  (default)
 
 name     title                             I         J         K         L
 I1       I                                1:10      ...       ...       ...
               on grid GEU1 with -1.E+34 for missing data
             X=0.5:10.5  
 J1       J                                ...       1:20      ...       ...
               on grid GEU2 with -1.E+34 for missing data
             Y=0.5:20.5  
 K1       K                                ...       ...       1:100     ...
               on grid GEU3 with -1.E+34 for missing data
             Z=0.5:100.5  
 L1       L[G=GCENTURY]                    ...       ...       ...       1:12
               on grid GEU4 with -1.E+34 for missing data
             
 L2       L                                ...       ...       ...       1:10
               on grid GEU5 with -1.E+34 for missing data
             
 IJ       I+J                              1:10      1:20      ...       ...
               on grid GEU6 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  
 IK       I+K                              1:10      ...       1:100     ...
               on grid GEU7 with -1.E+34 for missing data
             X=0.5:10.5  Z=0.5:100.5  
 IL       I+L1                             1:10      ...       ...       1:12
               on grid GEU8 with -1.E+34 for missing data
             X=0.5:10.5  
 JK       J+K                              ...       1:20      1:100     ...
               on grid GEU9 with -1.E+34 for missing data
             Y=0.5:20.5  Z=0.5:100.5  
 IJK      I+J+K                            1:10      1:20      1:100     ...
               on grid GEU10 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  Z=0.5:100.5  
 IKL      I+K+L1                           1:10      ...       1:100     1:12
               on grid GEU11 with -1.E+34 for missing data
             X=0.5:10.5  Z=0.5:100.5  
 IJL      I+J+L1                           1:10      1:20      ...       1:12
               on grid GEU12 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  
 JKL      J+K+L1                           ...       1:20      1:100     1:12
               on grid GEU13 with -1.E+34 for missing data
             Y=0.5:20.5  Z=0.5:100.5  
 IJKL     I+J+K+L1                         1:10      1:20      1:100     1:12
               on grid GEU14 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  Z=0.5:100.5  
 IJK2     I+J+K                            ...       1:20      1:100     ...
       (X=0.5:10.5@AVE)
               on grid GEU9 with -1.E+34 for missing data
             Y=0.5:20.5  Z=0.5:100.5  
 IKL2     I+K+L1                           ...       ...       1:100     1:12
       (X=0.5:10.5@AVE, box smoothed by 3 pts on Z)
               on grid GEU15 with -1.E+34 for missing data
             Z=0.5:100.5  
 IJL2     I+J+L1                           ...       ...       ...       1:12
       (X=0.5:10.5@AV4, Y=0.5:20.5@AV4)
               on grid GEU4 with -1.E+34 for missing data
             
 JKL2     J+K+L1                           ...       1:20      ...       ...
       (Z=0.5:100.5@AV4, T=03-JAN-1902 12:00:08-JAN-1902 12:00@AV4)
               on grid GEU2 with -1.E+34 for missing data
             Y=0.5:20.5  
 IAVEJKL  IJKL[I=@AVE]                     ...       1:20      1:100     1:12
       (X=0.5:10.5)
               on grid GEU13 with -1.E+34 for missing data
             Y=0.5:20.5  Z=0.5:100.5  
 IJAVEKL  IJKL[J=@AVE]                     1:10      ...       1:100     1:12
       (Y=0.5:20.5)
               on grid GEU11 with -1.E+34 for missing data
             X=0.5:10.5  Z=0.5:100.5  
 IJKAVEL  IJKL[K=@AVE]                     1:10      1:20      ...       1:12
       (Z=0.5:100.5)
               on grid GEU12 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  
 IJKLAVE  IJKL[L=@AVE]                     1:10      1:20      1:100     ...
       (T=03-JAN-1902 12:00:08-JAN-1902 12:00)
               on grid GEU10 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  Z=0.5:100.5  
 
  time range: 01-JAN-1902 00:00 to 12-JAN-1902 00:00
 
cancel variable ijkl
show grid ijkl
    GRID GEU14
 name       axis              # pts   start                end                 subset
 XAX1_10   X                   10 r   1                    10                  full
 YAX1_20   Y                   20 r   1                    20                  full
 ZAX1_100  Z                  100 r   1                    100                 full
 TCENTURY1 TIME                12 r   01-JAN-1902 00:00    12-JAN-1902 00:00   full
cancel data test_abs
 
! make the time axis irregular by leaving out l=13
list/format=cdf/l=14:16/append/file=test_abs.cdf l1
set data/format=cdf test_abs
show data/full
     currently SET data sets:
    1> ./test_abs.cdf  (default)
 
 name     title                             I         J         K         L
 I1       I                                1:10      ...       ...       ...
               on grid GEU1 with -1.E+34 for missing data
             X=0.5:10.5  
 J1       J                                ...       1:20      ...       ...
               on grid GEU2 with -1.E+34 for missing data
             Y=0.5:20.5  
 K1       K                                ...       ...       1:100     ...
               on grid GEU3 with -1.E+34 for missing data
             Z=0.5:100.5  
 L1       L[G=GCENTURY]                    ...       ...       ...       1:15
               on grid GEU4 with -1.E+34 for missing data
             
 L2       L                                ...       ...       ...       1:10
               on grid GEU5 with -1.E+34 for missing data
             
 IJ       I+J                              1:10      1:20      ...       ...
               on grid GEU6 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  
 IK       I+K                              1:10      ...       1:100     ...
               on grid GEU7 with -1.E+34 for missing data
             X=0.5:10.5  Z=0.5:100.5  
 IL       I+L1                             1:10      ...       ...       1:15
               on grid GEU8 with -1.E+34 for missing data
             X=0.5:10.5  
 JK       J+K                              ...       1:20      1:100     ...
               on grid GEU9 with -1.E+34 for missing data
             Y=0.5:20.5  Z=0.5:100.5  
 IJK      I+J+K                            1:10      1:20      1:100     ...
               on grid GEU10 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  Z=0.5:100.5  
 IKL      I+K+L1                           1:10      ...       1:100     1:15
               on grid GEU11 with -1.E+34 for missing data
             X=0.5:10.5  Z=0.5:100.5  
 IJL      I+J+L1                           1:10      1:20      ...       1:15
               on grid GEU12 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  
 JKL      J+K+L1                           ...       1:20      1:100     1:15
               on grid GEU13 with -1.E+34 for missing data
             Y=0.5:20.5  Z=0.5:100.5  
 IJKL     I+J+K+L1                         1:10      1:20      1:100     1:15
               on grid GEU14 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  Z=0.5:100.5  
 IJK2     I+J+K                            ...       1:20      1:100     ...
       (X=0.5:10.5@AVE)
               on grid GEU9 with -1.E+34 for missing data
             Y=0.5:20.5  Z=0.5:100.5  
 IKL2     I+K+L1                           ...       ...       1:100     1:15
       (X=0.5:10.5@AVE, box smoothed by 3 pts on Z)
               on grid GEU15 with -1.E+34 for missing data
             Z=0.5:100.5  
 IJL2     I+J+L1                           ...       ...       ...       1:15
       (X=0.5:10.5@AV4, Y=0.5:20.5@AV4)
               on grid GEU4 with -1.E+34 for missing data
             
 JKL2     J+K+L1                           ...       1:20      ...       ...
       (Z=0.5:100.5@AV4, T=03-JAN-1902 12:00:08-JAN-1902 12:00@AV4)
               on grid GEU2 with -1.E+34 for missing data
             Y=0.5:20.5  
 IAVEJKL  IJKL[I=@AVE]                     ...       1:20      1:100     1:15
       (X=0.5:10.5)
               on grid GEU13 with -1.E+34 for missing data
             Y=0.5:20.5  Z=0.5:100.5  
 IJAVEKL  IJKL[J=@AVE]                     1:10      ...       1:100     1:15
       (Y=0.5:20.5)
               on grid GEU11 with -1.E+34 for missing data
             X=0.5:10.5  Z=0.5:100.5  
 IJKAVEL  IJKL[K=@AVE]                     1:10      1:20      ...       1:15
       (Z=0.5:100.5)
               on grid GEU12 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  
 IJKLAVE  IJKL[L=@AVE]                     1:10      1:20      1:100     ...
       (T=03-JAN-1902 12:00:08-JAN-1902 12:00)
               on grid GEU10 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  Z=0.5:100.5  
 
  time range: 01-JAN-1902 00:00 to 16-JAN-1902 00:00
 
show grid ijkl
    GRID GEU14
 name       axis              # pts   start                end                 subset
 XAX1_10   X                   10 r   1                    10                  full
 YAX1_20   Y                   20 r   1                    20                  full
 ZAX1_100  Z                  100 r   1                    100                 full
 TCENTURY1 TIME                15 i   01-JAN-1902 00:00    16-JAN-1902 00:00   full
 
 
! list long time series using a rigid (non-record axis) time axis --> FAST
list/clobber/format=cdf/l=1:300000/rigid/file=test2.cdf l  ! without record dimension
! list time series using the record dimension --> SLOW (1/50th as long axis)
list/clobber/format=cdf/l=1:5000 l                               ! auto-filename
list/clobber/format=cdf/t="1-jan-1902":"1-jan-2010"/rigid tlong  ! auto-filename
 
 
cancel data/all
! deliberate errors
set mode ignore
list/format=cdf/l=1:10/file=test_abs.cdf l    ! file exists error
list/format=cdf/i=5:15/l=5:10/append/file=test_abs.cdf il  ! inconsistent i limits
list/format=cdf/i=1:10/j=20:25/append/file=test_abs.cdf ij ! inconsistent j limits
list/format=cdf/append/file=test_abs.cdf ijl2              ! i and j not avg'd
list/format=cdf/append/file=test_abs.cdf ijkl[k=@ave]      ! k axis averaged
list/format=cdf/l=13/append/file=test_abs.cdf l1           ! inconsistent time pt
set data/format=cdf test0a, test0b, test0c, test0d, test0e, test0f, test0g, test0h, test0i, test0j, test0k, test0l, test0n, test0m, test0o, test0p
list/clobber/format=cdf/i=1:10 i                                ! too many netcdf files
canc data/all
cancel mode ignore
 
! show the grids created
cancel variables/all
set data/format=cdf test_abs
show grid j1 jkl jkl2 iavejkl ijkl
    GRID GEU2
 name       axis              # pts   start                end                 subset
 normal    X
 YAX1_20   Y                   20 r   1                    20                  full
 normal    Z
 normal    T
    GRID GEU13
 name       axis              # pts   start                end                 subset
 normal    X
 YAX1_20   Y                   20 r   1                    20                  full
 ZAX1_100  Z                  100 r   1                    100                 full
 TCENTURY1 TIME                15 i   01-JAN-1902 00:00    16-JAN-1902 00:00   full
    GRID GEU2
 name       axis              # pts   start                end                 subset
 normal    X
 YAX1_20   Y                   20 r   1                    20                  full
 normal    Z
 normal    T
    GRID GEU13
 name       axis              # pts   start                end                 subset
 normal    X
 YAX1_20   Y                   20 r   1                    20                  full
 ZAX1_100  Z                  100 r   1                    100                 full
 TCENTURY1 TIME                15 i   01-JAN-1902 00:00    16-JAN-1902 00:00   full
    GRID GEU14
 name       axis              # pts   start                end                 subset
 XAX1_10   X                   10 r   1                    10                  full
 YAX1_20   Y                   20 r   1                    20                  full
 ZAX1_100  Z                  100 r   1                    100                 full
 TCENTURY1 TIME                15 i   01-JAN-1902 00:00    16-JAN-1902 00:00   full
cancel data test_abs
 
! test TMAP data io
GO bn_cdf.sub3 	! matches old outputs by using /HEADING=enhanced
! bn320_cdf.sub3
! benchmark to test netCDF input and output of TMAP data set variables
! this routine added 1/26/95 to test the SAVE/HEADING=enhanced option
 
! V5 *sh* 7/99 added /CLOBBER
 
cancel data/all
cancel variables/all
cancel region
 
use gtbc011
 
let i1 = x[g=temp,i=1:10]
let j1 = y[g=temp,j=5:10]
let k1 = z[g=u,k=5:15]
let l1 = l[g=u,l=1:3]
let l2 = l
let ij = taux[l=@ave]
let ik = i1+k1
let il = i1+l1
let jk = j1+k1
let jl = j1+l1
let kl = k1+l1
let ijk = temp[l=@ave]
let ikl = temp[j=@ave]
let ijl = temp[k=@ave]
let jkl = temp[i=@ave]
let ijkl = u
let ijk2 = temp
let iavejkl = ijkl[i=@ave]
let ijavekl = ijkl[j=@ave]
let ijkavel = ijkl[k=@ave]
let ijklave = ijkl[l=@ave]
 
set region/l=1:2  ! i,j, and k unspecified
 
! a bunch of basic geometries
! 1d
list/format=cdf/clobber/file=test_fil0.cdf/heading="enh" i1      ! not /APPEND - must be new
list/format=cdf/append/file=test_fil0.cdf/heading="enh" j1
list/format=cdf/append/file=test_fil0.cdf/heading="enh" k1
list/format=cdf/append/file=test_fil0.cdf/heading="enh" l1       ! record axis
list/format=cdf/append/file=test_fil0.cdf/heading="enh" l2       ! rigid axis
 
! 2D
list/format=cdf/append/file=test_fil0.cdf/heading="enh" ij
list/format=cdf/append/file=test_fil0.cdf/heading="enh" ik
list/format=cdf/append/file=test_fil0.cdf/heading="enh" il
list/format=cdf/append/file=test_fil0.cdf/heading="enh" jk
 
!3D
list/format=cdf/append/file=test_fil0.cdf/heading="enh" ijk
list/format=cdf/append/file=test_fil0.cdf/heading="enh" ikl
list/format=cdf/append/file=test_fil0.cdf/heading="enh" ijl
list/format=cdf/append/file=test_fil0.cdf/heading="enh" jkl
 
!4D
list/format=cdf/append/file=test_fil0.cdf/heading="enh" ijkl
 
! extend along time axis and write sub-regions
! (note: this may leave undefined regions in other variables)
list/format=cdf/append/file=test_fil0.cdf/heading="enh"/j=1:50/l=2:3 ijl
list/format=cdf/append/file=test_fil0.cdf/heading="enh"/j=51:100/l=2:3 ijl
 
! rewrite a sub-region in the middle of the data
list/format=cdf/append/file=test_fil0.cdf/heading="enh"/j=30:40/k=5/l=1:3 ijkl
 
! check documentation of transforms
list/format=cdf/append/file=test_fil0.cdf/heading="enh" iavejkl
list/format=cdf/append/file=test_fil0.cdf/heading="enh" ijavekl
list/format=cdf/append/file=test_fil0.cdf/heading="enh" ijkavel
list/format=cdf/append/file=test_fil0.cdf/heading="enh" ijklave
 
! look at what we've created - time axis should be regular
set data/format=cdf test_fil0
show data/full
     currently SET data sets:
    1> ./data/gtbc011.cdf
 
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                     70:72      1:100     1:27      1:3
             deg. C on grid PS3DT1 with -1.E+34 for missing data
             X=161W:158W  Y=30S:50N  Z=0:4149  
 SALT     (SALINITY(ppt) - 35) /1000      70:71      1:100     1:27      1:3
             frac. by wt. less .035 on grid PS3DT1 with 0.01 for missing data
             X=161W:159W  Y=30S:50N  Z=0:4149  
 U        ZONAL VELOCITY                  69:72      1:100     1:27      1:3
             cm/sec on grid PS3DU1 with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  Z=0:4149  
 V        MERIDIONAL VELOCITY             69:72      1:100     1:27      1:3
             cm/sec on grid PS3DU1 with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  Z=0:4149  
 W        VERTICAL VELOCITY               70:71      1:100     1:27      1:3
             cm/sec on grid PS3DW1 with -1.E+34 for missing data
             X=161W:159W  Y=30S:50N  Z=5:4149  
 TAUX     ZONAL WIND STRESS               69:71      1:100     ...       1:3
             dynes/cm**2 on grid PS2DU1 with -1.E+34 for missing data
             X=161.5W:158.5W  Y=28.8S:51.4N  
 TAUY     MERIDIONAL WIND STRESS          69:71      1:100     ...       1:3
             dynes/cm**2 on grid PS2DU1 with -1.E+34 for missing data
             X=161.5W:158.5W  Y=28.8S:51.4N  
 PSI      STREAM FUNCTION                 69:73      1:100     ...       1:3
             cm**3/sec on grid PS2DU1 with -1.E+34 for missing data
             X=161.5W:156.5W  Y=28.8S:51.4N  
 
  time range: 15-MAR-1983 10:00 to 15-MAR-1983 12:00
 
    2> ./test_fil0.cdf  (default)
 
 name     title                             I         J         K         L
 I1       X[G=TEMP,I=1:10]                 1:10      ...       ...       ...
               on grid PS3DT1_NYZT with -1.E+34 for missing data
             X=130E:140E  
 J1       Y[G=TEMP,J=5:10]                 ...       5:10      ...       ...
               on grid PS3DT1_NXZT with -1.E+34 for missing data
             Y=21.1S:12.5S  
 K1       Z[G=U,K=5:15]                    ...       ...       5:15      ...
               on grid PS3DU1_NXYT with -1.E+34 for missing data
             Z=40:190  
 L1       L[G=U,L=1:3]                     ...       ...       ...       1:3
               on grid GRH1 with -1.E+34 for missing data
             
 L2       L                                ...       ...       ...       1:2
               on grid GRH2 with -1.E+34 for missing data
             
 IJ       TAUX[L=@AVE]                    69:71      1:100     ...       ...
       (T=15-MAR-1983 09:30:15-MAR-1983 11:30)
               on grid PS2DU1_NT with -1.E+34 for missing data
             X=161.5W:158.5W  Y=28.8S:51.4N  
 IK       I1+K1                            1:10      ...       5:15      ...
               on grid G016_NYT with -1.E+34 for missing data
             X=130E:140E  Z=40:190  
 IL       I1+L1                            1:10      ...       ...       1:3
               on grid G016_NYZ with -1.E+34 for missing data
             X=130E:140E  
 JK       J1+K1                            ...       5:10      5:15      ...
               on grid G002_NXT with -1.E+34 for missing data
             Y=21.1S:12.5S  Z=40:190  
 IJK      TEMP[L=@AVE]                    70:72      1:100     1:27      ...
       (T=15-MAR-1983 09:30:15-MAR-1983 11:30)
               on grid PS3DT1_NT with -1.E+34 for missing data
             X=161W:158W  Y=30S:50N  Z=0:4149  
 IKL      TEMP[J=@AVE]                    70:72      ...       1:27      1:3
       (Y=30S:50N)
               on grid PS3DT1_NY with -1.E+34 for missing data
             X=161W:158W  Z=0:4149  
 IJL      TEMP[K=@AVE]                    70:72      1:100     ...       1:3
       (Z=0:4149)
               on grid PS3DT1_NZ with -1.E+34 for missing data
             X=161W:158W  Y=30S:50N  
 JKL      TEMP[I=@AVE]                     ...       1:100     1:27      1:3
       (X=130E:70W)
               on grid GRH3 with -1.E+34 for missing data
             Y=30S:50N  Z=0:4149  
 IJKL     U                               69:72      1:100     1:27      1:3
               on grid PS3DU1 with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  Z=0:4149  
 IAVEJKL  IJKL[I=@AVE]                     ...       1:100     1:27      1:3
       (X=130.5E:69.5W)
               on grid GRH4 with -1.E+34 for missing data
             Y=28.8S:51.4N  Z=0:4149  
 IJAVEKL  IJKL[J=@AVE]                    69:72      ...       1:27      1:3
       (Y=28.836S:51.432N)
               on grid PS3DU1_NY with -1.E+34 for missing data
             X=161.5W:157.5W  Z=0:4149  
 IJKAVEL  IJKL[K=@AVE]                    69:72      1:100     ...       1:3
       (Z=0:4149)
               on grid PS3DU1_NZ with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  
 IJKLAVE  IJKL[L=@AVE]                    69:72      1:100     1:27      ...
       (T=15-MAR-1983 09:30:15-MAR-1983 11:30)
               on grid PS3DU1_NT with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  Z=0:4149  
 
  time range: 15-MAR-1983 10:00 to 15-MAR-1983 12:00
 
cancel variable ijkl
show grid ijkl
    GRID PS3DU1
 name       axis              # pts   start                end                 subset
 PSXU      LONGITUDE          160mr   131E                 70W                 full
 PSYU      LATITUDE           100 i   27.672S              50N                 full
 PSZT      DEPTH (m)           27 i-  5                    3824                full
 TIME      TIME                 3 r   15-MAR-1983 10:00    15-MAR-1983 12:00   full
cancel data test_fil0
! 5/99 moved old bn230_cdf.sub3 to bn_cdf.sub4 to stay inline w/ old benchmarks *kob*
GO bn_cdf.sub4
! bn230_cdf
! benchmark to test netCDF input and output of TMAP data set variables
! requires version 2.30 or later
! 6/92
 
! V5 *sh* 7/99 -- added /CLOBBER
 
cancel data/all
cancel variables/all
cancel region
 
use gtbc011
 
let i1 = x[g=temp,i=1:10]
let j1 = y[g=temp,j=5:10]
let k1 = z[g=u,k=5:15]
let l1 = l[g=u,l=1:3]
let l2 = l
let ij = taux[l=@ave]
let ik = i1+k1
let il = i1+l1
let jk = j1+k1
let jl = j1+l1
let kl = k1+l1
let ijk = temp[l=@ave]
let ikl = temp[j=@ave]
let ijl = temp[k=@ave]
let jkl = temp[i=@ave]
let ijkl = u
let ijk2 = temp
let iavejkl = ijkl[i=@ave]
let ijavekl = ijkl[j=@ave]
let ijkavel = ijkl[k=@ave]
let ijklave = ijkl[l=@ave]
 
set region/l=1:2  ! i,j, and k unspecified
 
! a bunch of basic geometries
! 1d
list/format=cdf/clobber/file=test_fil.cdf i1      ! not /APPEND - must be new
list/format=cdf/append/file=test_fil.cdf j1
list/format=cdf/append/file=test_fil.cdf k1
list/format=cdf/append/file=test_fil.cdf l1           ! record axis
list/format=cdf/append/file=test_fil.cdf l2          ! rigid axis
 
! 2D
list/format=cdf/append/file=test_fil.cdf ij
list/format=cdf/append/file=test_fil.cdf ik
list/format=cdf/append/file=test_fil.cdf il
list/format=cdf/append/file=test_fil.cdf jk
 
!3D
list/format=cdf/append/file=test_fil.cdf ijk
list/format=cdf/append/file=test_fil.cdf ikl
list/format=cdf/append/file=test_fil.cdf ijl
list/format=cdf/append/file=test_fil.cdf jkl
 
!4D
list/format=cdf/append/file=test_fil.cdf ijkl
 
! extend along time axis and write sub-regions
! (note: this may leave undefined regions in other variables)
list/format=cdf/append/file=test_fil.cdf/j=1:50/l=2:3 ijl
list/format=cdf/append/file=test_fil.cdf/j=51:100/l=2:3 ijl
 
! rewrite a sub-region in the middle of the data
list/format=cdf/append/file=test_fil.cdf/j=30:40/k=5/l=1:3 ijkl
 
! check documentation of transforms
list/format=cdf/append/file=test_fil.cdf iavejkl
list/format=cdf/append/file=test_fil.cdf ijavekl
list/format=cdf/append/file=test_fil.cdf ijkavel
list/format=cdf/append/file=test_fil.cdf ijklave
 
! look at what we've created - time axis should be regular
set data/format=cdf test_fil
show data/full
     currently SET data sets:
    1> ./data/gtbc011.cdf
 
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                     70:72      1:100     1:27      1:3
             deg. C on grid PS3DT1 with -1.E+34 for missing data
             X=161W:158W  Y=30S:50N  Z=0:4149  
 SALT     (SALINITY(ppt) - 35) /1000      70:71      1:100     1:27      1:3
             frac. by wt. less .035 on grid PS3DT1 with 0.01 for missing data
             X=161W:159W  Y=30S:50N  Z=0:4149  
 U        ZONAL VELOCITY                  69:72      1:100     1:27      1:3
             cm/sec on grid PS3DU1 with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  Z=0:4149  
 V        MERIDIONAL VELOCITY             69:72      1:100     1:27      1:3
             cm/sec on grid PS3DU1 with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  Z=0:4149  
 W        VERTICAL VELOCITY               70:71      1:100     1:27      1:3
             cm/sec on grid PS3DW1 with -1.E+34 for missing data
             X=161W:159W  Y=30S:50N  Z=5:4149  
 TAUX     ZONAL WIND STRESS               69:71      1:100     ...       1:3
             dynes/cm**2 on grid PS2DU1 with -1.E+34 for missing data
             X=161.5W:158.5W  Y=28.8S:51.4N  
 TAUY     MERIDIONAL WIND STRESS          69:71      1:100     ...       1:3
             dynes/cm**2 on grid PS2DU1 with -1.E+34 for missing data
             X=161.5W:158.5W  Y=28.8S:51.4N  
 PSI      STREAM FUNCTION                 69:73      1:100     ...       1:3
             cm**3/sec on grid PS2DU1 with -1.E+34 for missing data
             X=161.5W:156.5W  Y=28.8S:51.4N  
 
  time range: 15-MAR-1983 10:00 to 15-MAR-1983 12:00
 
    2> ./test_fil.cdf  (default)
 
 name     title                             I         J         K         L
 I1       X[G=TEMP,I=1:10]                 1:10      ...       ...       ...
               on grid GLZ1 with -1.E+34 for missing data
             X=130E:140E  
 J1       Y[G=TEMP,J=5:10]                 ...       1:6       ...       ...
               on grid GLZ2 with -1.E+34 for missing data
             Y=21.1S:12.5S  
 K1       Z[G=U,K=5:15]                    ...       ...       1:11      ...
               on grid GLZ3 with -1.E+34 for missing data
             Z=40:190  
 L1       L[G=U,L=1:3]                     ...       ...       ...       1:3
               on grid GLZ4 with -1.E+34 for missing data
             
 L2       L                                ...       ...       ...       1:2
               on grid GLZ5 with -1.E+34 for missing data
             
 IJ       TAUX[L=@AVE]                     1:3       1:100     ...       ...
       (T=15-MAR-1983 09:30:15-MAR-1983 11:30)
               on grid GLZ6 with -1.E+34 for missing data
             X=161.5W:158.5W  Y=28.8S:51.4N  
 IK       I1+K1                            1:10      ...       1:11      ...
               on grid GLZ7 with -1.E+34 for missing data
             X=130E:140E  Z=40:190  
 IL       I1+L1                            1:10      ...       ...       1:3
               on grid GLZ8 with -1.E+34 for missing data
             X=130E:140E  
 JK       J1+K1                            ...       1:6       1:11      ...
               on grid GLZ9 with -1.E+34 for missing data
             Y=21.1S:12.5S  Z=40:190  
 IJK      TEMP[L=@AVE]                     1:3       1:100     1:27      ...
       (T=15-MAR-1983 09:30:15-MAR-1983 11:30)
               on grid GLZ10 with -1.E+34 for missing data
             X=161W:158W  Y=30S:50N  Z=0:4149  
 IKL      TEMP[J=@AVE]                     1:3       ...       1:27      1:3
       (Y=30S:50N)
               on grid GLZ11 with -1.E+34 for missing data
             X=161W:158W  Z=0:4149  
 IJL      TEMP[K=@AVE]                     1:3       1:100     ...       1:3
       (Z=0:4149)
               on grid GLZ12 with -1.E+34 for missing data
             X=161W:158W  Y=30S:50N  
 JKL      TEMP[I=@AVE]                     ...       1:100     1:27      1:3
       (X=130E:70W)
               on grid GLZ13 with -1.E+34 for missing data
             Y=30S:50N  Z=0:4149  
 IJKL     U                                1:4       1:100     1:27      1:3
               on grid GLZ14 with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  Z=0:4149  
 IAVEJKL  IJKL[I=@AVE]                     ...       1:100     1:27      1:3
       (X=130.5E:69.5W)
               on grid GLZ15 with -1.E+34 for missing data
             Y=28.8S:51.4N  Z=0:4149  
 IJAVEKL  IJKL[J=@AVE]                     1:4       ...       1:27      1:3
       (Y=28.836S:51.432N)
               on grid GLZ16 with -1.E+34 for missing data
             X=161.5W:157.5W  Z=0:4149  
 IJKAVEL  IJKL[K=@AVE]                     1:4       1:100     ...       1:3
       (Z=0:4149)
               on grid GLZ17 with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  
 IJKLAVE  IJKL[L=@AVE]                     1:4       1:100     1:27      ...
       (T=15-MAR-1983 09:30:15-MAR-1983 11:30)
               on grid GLZ18 with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  Z=0:4149  
 
  time range: 15-MAR-1983 10:00 to 15-MAR-1983 12:00
 
cancel variable ijkl
show grid ijkl
    GRID GLZ14
 name       axis              # pts   start                end                 subset
 PSXU69_72 LONGITUDE            4mr   161W                 158W                full
 PSYU      LATITUDE           100 i   27.672S              50N                 full
 PSZT      DEPTH (m)           27 i-  5                    3824                full
 TIME      TIME                 3 r   15-MAR-1983 10:00    15-MAR-1983 12:00   full
cancel data test_fil
GO bn_cdf_reversed.sub
! bn320_cdf_reversed.sub
! benchmark to test netCDF input of reverse-coordinate axes
! this routine added 3/2/95
 
cancel data/all
cancel variables/all
cancel region
 
set data reverse_axes
 
show data/var
     currently SET data sets:
    1> ./data/reverse_axes.cdf  (default)
 
 name     title                             I         J         K         L
 FCN_NORM COS(X/10)*SIN(Y/2)               1:51      1:21      ...       ...
               on grid GAF1 with -1.E+34 for missing data
             X=129.5E:179.5W  Y=10.5S:10.5N  
 FCN_REV  COS(X/10)*SIN(Y/2)               1:51      1:21      ...       ...
               on grid GAF2 with -1.E+34 for missing data
             X=129.5E:179.5W  Y=10.5S:10.5N  
 FCN_REV_SUB
          COS(X/10)*SIN(Y/2)               1:51     10:19      ...       ...
               on grid GREV with -1.E+34 for missing data
             X=129.5E:179.5W  Y=1.5S:8.5N  
 
 
list/x=180 fcn_norm,fcn_rev
 WARNING: Listed variables have ambiguous coordinates on axes: Y
             DATA SET: ./data/reverse_axes.cdf
             LONGITUDE: 180E
 Column  1: FCN_NORM is COS(X/10)*SIN(Y/2)
 Column  2: FCN_REV is COS(X/10)*SIN(Y/2)
       FCN_NOR  FCN_REV
J /  1:  0.6332 -0.6332
J /  2:  0.6455 -0.6455
J /  3:  0.4997 -0.4997
J /  4:  0.2316 -0.2316
J /  5: -0.0932  0.0932
J /  6: -0.3952  0.3952
J /  7: -0.6004  0.6004
J /  8: -0.6587  0.6587
J /  9: -0.5556  0.5556
J / 10: -0.3166  0.3166
J / 11:  0.0000  0.0000
J / 12:  0.3166 -0.3166
J / 13:  0.5556 -0.5556
J / 14:  0.6587 -0.6587
J / 15:  0.6004 -0.6004
J / 16:  0.3952 -0.3952
J / 17:  0.0932 -0.0932
J / 18: -0.2316  0.2316
J / 19: -0.4997  0.4997
J / 20: -0.6455  0.6455
J / 21: -0.6332  0.6332
list/x=180 fcn_rev_sub
             VARIABLE : COS(X/10)*SIN(Y/2)
             FILENAME : reverse_axes.cdf
             SUBSET   : 10 points (LATITUDE)
             LONGITUDE: 180E
              180E   
               51
 8N   / 19:  0.4997
 7N   / 18:  0.2316
 6N   / 17: -0.0932
 5N   / 16: -0.3952
 4N   / 15: -0.6004
 3N   / 14: -0.6587
 2N   / 13: -0.5556
 1N   / 12: -0.3166
 0    / 11:  0.0000
 1S   / 10:  0.3166
*** Running ferret script: bn_regrid_transforms.jnl
! bn500_regrid_transforms
! benchmark to test regridding transformations and syntax
! requires version 2.30 or later
! 8/92
 
! 9/95 - modified reflecting the new interpretation of var[GX=u]
!	 previously this meant to fully regrid to U
! 	 Now it means to regrid only the X axis to U (other axes as in "var")
!	 ==> this is an implicit grid creation
! 2/99 *sh* - The behavior of regridding in cases where the region is
!	unspecified has been changed in V.5 of Ferret. The behavior is now to
!	attempt to obtain the full destination axis span. This means that
!	an unspecified region regrid request applied to a sliced TMAP data
!	set will error: Requested data range is outside of data set limits
!	A "SET MODE IGNORE" has been added in this benchmark script fo rthese
!	cases. (The proper fix to this is in tm_read ... to trim the region
!	when a sliced data set is being read.
! 1/00 *sh* @MIN and @MAX bugs corrected. @AVE, @SUM, @VAR to handle partial
!       grid boxes
 
!set data gtsa056
!use gtsa056
use gtsa056_1
use gtsa056_2
set mode diag
 
define axis/t=15-jan-1982:15-mar-1984:120/unit=hour tax5day
define axis/x=120e:60w:10/unit=degrees xax10
define grid/like=u/t=tax5day g5day
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
define grid/like=u/x=xax10/z=w/t=tax5day g5_10
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 getgrid EX#1     C:  6 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 getgrid EX#1     C:  7 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DW11         PSXT      PSYT      PSZW      TIME1
 
set reg/x=130w:125w/y=0:1.5/z=0:15/t=21-JAN-1982:24-jan-1982
!set reg/i=101:105/j=41:42/k=1:2/l=3:4
 
use gtsa056_1    	!kob 4/99
 
! deliberate errors
set mode ignore
load temp[g=@lin]    ! no target grid specified
 dealloc  dynamic grid PS3DW11         PSXT      PSYT      PSZW      TIME1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DT2          PSXT      PSYT      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    101    105  J:   45   50  K:    1    2  L:      3      4
 reading TEMP     M:  1 dset:   1 I:    101    105  J:   45   50  K:    1    2  L:      3      4
load temp[gx=@ave]   ! no target grid specified
 dealloc  dynamic grid PS3DT2          PSXT      PSYT      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DT2          PSXT      PSYT      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    101    105  J:   45   50  K:    1    2  L:      3      4
 found   TEMP     M:  1 dset:   1 I:    101    105  J:   45   50  K:    1    2  L:      3      4
load temp[g=u,g=w]   ! more than 1 target grid
 dealloc  dynamic grid PS3DT2          PSXT      PSYT      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
load temp[g=x]       ! g=user-or-pseudo-var not allowed
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
set mode/last ignore
 
! valid syntax tests
load temp
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DT2          PSXT      PSYT      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    101    105  J:   45   50  K:    1    2  L:      3      4
 found   TEMP     M:  1 dset:   1 I:    101    105  J:   45   50  K:    1    2  L:      3      4
load temp[g=u]
 dealloc  dynamic grid PS3DT2          PSXT      PSYT      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 strip regrid on X: TEMP --> PS3DU2           @LIN
 reading TEMP     M:  2 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      3      4
 regrid XY
 regrid  TEMP     M:  3 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
load temp[g=u@lin]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 found   TEMP     M:  3 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
load temp[g=u@ave,gy=@asn]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 strip regrid on X: TEMP --> PS3DU2           @AVE
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 found   TEMP     M:  2 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      3      4
 regrid  TEMP     M:  4 dset:   1 I:    100    106  J:   45   49  K:    1    2  L:      3      4
 regrid  TEMP     M:  5 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 -DELETE TEMP     M:  4 dset:   1 I:    100    106  J:   45   49  K:    1    2  L:      3      4  M: -999 -999  N: -999 -999
load temp[g=u@lin,gy=@asn]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 strip regrid on X: TEMP --> PS3DU2           @LIN
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 found   TEMP     M:  2 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      3      4
 regrid  TEMP     M:  4 dset:   1 I:    100    106  J:   45   49  K:    1    2  L:      3      4
 regrid  TEMP     M:  6 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 -DELETE TEMP     M:  4 dset:   1 I:    100    106  J:   45   49  K:    1    2  L:      3      4  M: -999 -999  N: -999 -999
load temp[g=u,gx=@ave,gy=@asn]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 found   TEMP     M:  5 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
load temp[gx=u]  		! changed V4.20 --> implicit regrid
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          PSXU      PSYT      PSZT      TIME2
 dealloc  dynamic grid (G###)          PSXU      PSYT      PSZT      TIME2
 allocate dynamic grid (G###)          PSXU      PSYT      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   50  K:    1    2  L:      3      4
 allocate dynamic grid (G###)          PSXU      PSYT      PSZT      TIME2
 strip regrid on X: TEMP --> (G###)           @LIN
 found   TEMP     M:  2 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      3      4
 regrid  TEMP     M:  4 dset:   1 I:    100    105  J:   45   50  K:    1    2  L:      3      4
 dealloc  dynamic grid (G###)          PSXU      PSYT      PSZT      TIME2
stat temp[g=u] - temp[g=u@ave,gx=u@lin,gy=u@lin,gz=u@lin,gt=u@lin]  ! == 0
 dealloc  dynamic grid (G###)          PSXU      PSYT      PSZT      TIME2
 -DELETE TEMP     M:  4 dset:   1 I:    100    105  J:   45   50  K:    1    2  L:      3      4
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 found   TEMP     M:  3 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 found   TEMP     M:  3 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 
             TEMP[G=U] - TEMP[G=U@AVE,GX=U@LIN,GY=U@LIN,GZ=U@LIN,GT=U@LIN]
             LONGITUDE: 130W to 125W
             LATITUDE: 0 to 1.5N
             DEPTH (m): 0 to 15
             TIME: 21-JAN-1982 00:00 to 24-JAN-1982 00:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/gtsa056_1.cdf
 
 Total # of data points: 120 (6*5*2*2*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
stat temp[g=u,gx=@ave] - temp[gx=@ave,g=u]    ! == 0
 -DELETE EX#1     M:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 strip regrid on X: TEMP --> PS3DU2           @AVE
 strip regrid on Y: TEMP --> XNTERMED         @LIN
 found   TEMP     M:  2 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      3      4
 regrid  TEMP     M:  4 dset:   1 I:    100    106  J:   45   49  K:    1    2  L:      3      4
 regrid  TEMP     M:  7 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 -DELETE TEMP     M:  4 dset:   1 I:    100    106  J:   45   49  K:    1    2  L:      3      4  M: -999 -999  N: -999 -999
 found   TEMP     M:  7 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 
             TEMP[G=U,GX=@AVE] - TEMP[GX=@AVE,G=U]
             LONGITUDE: 130W to 125W
             LATITUDE: 0 to 1.5N
             DEPTH (m): 0 to 15
             TIME: 21-JAN-1982 00:00 to 24-JAN-1982 00:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/gtsa056_1.cdf
 
 Total # of data points: 120 (6*5*2*2*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
! basic regrid tests
LIST temp[g=u@ave]
 -DELETE EX#1     M:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 strip regrid on X: TEMP --> PS3DU2           @AAV
 found   TEMP     M:  2 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      3      4
 regrid XY
 regrid  TEMP     M:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: U on X@AAV, on Y@AAV
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:3 T:   21-JAN-1982 16:00
 ---- K:1 Z:   5
 1.33N / 49:  24.28  24.27  24.36  24.64  25.06  25.44
 1N    / 48:  24.11  24.10  24.16  24.38  24.75  25.10
 0.67N / 47:  23.99  23.96  23.98  24.12  24.42  24.73
 0.33N / 46:  23.93  23.89  23.86  23.91  24.12  24.37
 0     / 45:  23.96  23.89  23.82  23.79  23.89  24.08
 ---- K:2 Z:   15
 1.33N / 49:  24.03  24.02  24.11  24.39  24.85  25.28
 1N    / 48:  23.82  23.80  23.87  24.10  24.50  24.91
 0.67N / 47:  23.64  23.61  23.64  23.80  24.13  24.49
 0.33N / 46:  23.53  23.49  23.46  23.53  23.77  24.07
 0     / 45:  23.53  23.46  23.39  23.37  23.48  23.71
 ---- L:4 T:   24-JAN-1982 17:00
 ---- K:1 Z:   5
 1.33N / 49:  24.32  24.43  24.70  25.13  25.51  25.65
 1N    / 48:  24.15  24.23  24.45  24.82  25.18  25.31
 0.67N / 47:  24.02  24.06  24.20  24.49  24.81  24.93
 0.33N / 46:  23.95  23.94  23.99  24.18  24.44  24.57
 0     / 45:  23.96  23.89  23.87  23.95  24.13  24.26
 ---- K:2 Z:   15
 1.33N / 49:  24.07  24.18  24.45  24.91  25.35  25.53
 1N    / 48:  23.85  23.94  24.16  24.56  24.98  25.16
 0.67N / 47:  23.67  23.71  23.86  24.18  24.55  24.73
 0.33N / 46:  23.55  23.54  23.61  23.81  24.12  24.30
 0     / 45:  23.54  23.47  23.45  23.53  23.74  23.92
LIST temp[g=u,gx=u@ave]	! V4.20 mod
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 found   TEMP     M:  7 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: U on X@AVE, on Y@LIN
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:3 T:   21-JAN-1982 16:00
 ---- K:1 Z:   5
 1.33N / 49:  24.28  24.27  24.36  24.64  25.06  25.44
 1N    / 48:  24.11  24.10  24.16  24.38  24.75  25.10
 0.67N / 47:  23.99  23.96  23.98  24.12  24.42  24.73
 0.33N / 46:  23.93  23.89  23.86  23.91  24.12  24.37
 0     / 45:  23.96  23.89  23.82  23.79  23.89  24.08
 ---- K:2 Z:   15
 1.33N / 49:  24.03  24.02  24.11  24.39  24.85  25.28
 1N    / 48:  23.82  23.80  23.87  24.10  24.50  24.91
 0.67N / 47:  23.64  23.61  23.64  23.80  24.13  24.49
 0.33N / 46:  23.53  23.49  23.46  23.53  23.77  24.07
 0     / 45:  23.53  23.46  23.39  23.37  23.48  23.71
 ---- L:4 T:   24-JAN-1982 17:00
 ---- K:1 Z:   5
 1.33N / 49:  24.32  24.43  24.70  25.13  25.51  25.65
 1N    / 48:  24.15  24.23  24.45  24.82  25.18  25.31
 0.67N / 47:  24.02  24.06  24.20  24.49  24.81  24.93
 0.33N / 46:  23.95  23.94  23.99  24.18  24.44  24.57
 0     / 45:  23.96  23.89  23.87  23.95  24.13  24.26
 ---- K:2 Z:   15
 1.33N / 49:  24.07  24.18  24.45  24.91  25.35  25.53
 1N    / 48:  23.85  23.94  24.16  24.56  24.98  25.16
 0.67N / 47:  23.67  23.71  23.86  24.18  24.55  24.73
 0.33N / 46:  23.55  23.54  23.61  23.81  24.12  24.30
 0     / 45:  23.54  23.47  23.45  23.53  23.74  23.92
LIST temp[g=u,gy=u@ave]	! V4.20 mod
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 strip regrid on X: TEMP --> PS3DU2           @LIN
 strip regrid on Y: TEMP --> XNTERMED         @AVE
 found   TEMP     M:  2 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      3      4
 regrid  TEMP     M:  8 dset:   1 I:    100    106  J:   45   49  K:    1    2  L:      3      4
 regrid  TEMP     M:  9 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 -DELETE TEMP     M:  8 dset:   1 I:    100    106  J:   45   49  K:    1    2  L:      3      4  M: -999 -999  N: -999 -999
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: U on X@LIN, on Y@AVE
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:3 T:   21-JAN-1982 16:00
 ---- K:1 Z:   5
 1.33N / 49:  24.28  24.27  24.36  24.64  25.06  25.44
 1N    / 48:  24.11  24.10  24.16  24.38  24.75  25.10
 0.67N / 47:  23.99  23.96  23.98  24.12  24.42  24.73
 0.33N / 46:  23.93  23.89  23.86  23.91  24.12  24.37
 0     / 45:  23.96  23.89  23.82  23.79  23.89  24.08
 ---- K:2 Z:   15
 1.33N / 49:  24.03  24.02  24.11  24.39  24.85  25.28
 1N    / 48:  23.82  23.80  23.87  24.10  24.50  24.91
 0.67N / 47:  23.64  23.61  23.64  23.80  24.13  24.49
 0.33N / 46:  23.53  23.49  23.46  23.53  23.77  24.07
 0     / 45:  23.53  23.46  23.39  23.37  23.48  23.71
 ---- L:4 T:   24-JAN-1982 17:00
 ---- K:1 Z:   5
 1.33N / 49:  24.32  24.43  24.70  25.13  25.51  25.65
 1N    / 48:  24.15  24.23  24.45  24.82  25.18  25.31
 0.67N / 47:  24.02  24.06  24.20  24.49  24.81  24.93
 0.33N / 46:  23.95  23.94  23.99  24.18  24.44  24.57
 0     / 45:  23.96  23.89  23.87  23.95  24.13  24.26
 ---- K:2 Z:   15
 1.33N / 49:  24.07  24.18  24.45  24.91  25.35  25.53
 1N    / 48:  23.85  23.94  24.16  24.56  24.98  25.16
 0.67N / 47:  23.67  23.71  23.86  24.18  24.55  24.73
 0.33N / 46:  23.55  23.54  23.61  23.81  24.12  24.30
 0     / 45:  23.54  23.47  23.45  23.53  23.74  23.92
LIST temp[g=u,gz=u@ave]	! V4.20 mod
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 found   TEMP     M:  3 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: U
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:3 T:   21-JAN-1982 16:00
 ---- K:1 Z:   5
 1.33N / 49:  24.28  24.27  24.36  24.64  25.06  25.44
 1N    / 48:  24.11  24.10  24.16  24.38  24.75  25.10
 0.67N / 47:  23.99  23.96  23.98  24.12  24.42  24.73
 0.33N / 46:  23.93  23.89  23.86  23.91  24.12  24.37
 0     / 45:  23.96  23.89  23.82  23.79  23.89  24.08
 ---- K:2 Z:   15
 1.33N / 49:  24.03  24.02  24.11  24.39  24.85  25.28
 1N    / 48:  23.82  23.80  23.87  24.10  24.50  24.91
 0.67N / 47:  23.64  23.61  23.64  23.80  24.13  24.49
 0.33N / 46:  23.53  23.49  23.46  23.53  23.77  24.07
 0     / 45:  23.53  23.46  23.39  23.37  23.48  23.71
 ---- L:4 T:   24-JAN-1982 17:00
 ---- K:1 Z:   5
 1.33N / 49:  24.32  24.43  24.70  25.13  25.51  25.65
 1N    / 48:  24.15  24.23  24.45  24.82  25.18  25.31
 0.67N / 47:  24.02  24.06  24.20  24.49  24.81  24.93
 0.33N / 46:  23.95  23.94  23.99  24.18  24.44  24.57
 0     / 45:  23.96  23.89  23.87  23.95  24.13  24.26
 ---- K:2 Z:   15
 1.33N / 49:  24.07  24.18  24.45  24.91  25.35  25.53
 1N    / 48:  23.85  23.94  24.16  24.56  24.98  25.16
 0.67N / 47:  23.67  23.71  23.86  24.18  24.55  24.73
 0.33N / 46:  23.55  23.54  23.61  23.81  24.12  24.30
 0     / 45:  23.54  23.47  23.45  23.53  23.74  23.92
LIST temp[g=u,gt=u@ave]	! V4.20 mod, etc --> many more similar syntax chgs
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 found   TEMP     M:  3 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: U
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:3 T:   21-JAN-1982 16:00
 ---- K:1 Z:   5
 1.33N / 49:  24.28  24.27  24.36  24.64  25.06  25.44
 1N    / 48:  24.11  24.10  24.16  24.38  24.75  25.10
 0.67N / 47:  23.99  23.96  23.98  24.12  24.42  24.73
 0.33N / 46:  23.93  23.89  23.86  23.91  24.12  24.37
 0     / 45:  23.96  23.89  23.82  23.79  23.89  24.08
 ---- K:2 Z:   15
 1.33N / 49:  24.03  24.02  24.11  24.39  24.85  25.28
 1N    / 48:  23.82  23.80  23.87  24.10  24.50  24.91
 0.67N / 47:  23.64  23.61  23.64  23.80  24.13  24.49
 0.33N / 46:  23.53  23.49  23.46  23.53  23.77  24.07
 0     / 45:  23.53  23.46  23.39  23.37  23.48  23.71
 ---- L:4 T:   24-JAN-1982 17:00
 ---- K:1 Z:   5
 1.33N / 49:  24.32  24.43  24.70  25.13  25.51  25.65
 1N    / 48:  24.15  24.23  24.45  24.82  25.18  25.31
 0.67N / 47:  24.02  24.06  24.20  24.49  24.81  24.93
 0.33N / 46:  23.95  23.94  23.99  24.18  24.44  24.57
 0     / 45:  23.96  23.89  23.87  23.95  24.13  24.26
 ---- K:2 Z:   15
 1.33N / 49:  24.07  24.18  24.45  24.91  25.35  25.53
 1N    / 48:  23.85  23.94  24.16  24.56  24.98  25.16
 0.67N / 47:  23.67  23.71  23.86  24.18  24.55  24.73
 0.33N / 46:  23.55  23.54  23.61  23.81  24.12  24.30
 0     / 45:  23.54  23.47  23.45  23.53  23.74  23.92
 
LIST temp[g=u]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 found   TEMP     M:  3 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: U
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:3 T:   21-JAN-1982 16:00
 ---- K:1 Z:   5
 1.33N / 49:  24.28  24.27  24.36  24.64  25.06  25.44
 1N    / 48:  24.11  24.10  24.16  24.38  24.75  25.10
 0.67N / 47:  23.99  23.96  23.98  24.12  24.42  24.73
 0.33N / 46:  23.93  23.89  23.86  23.91  24.12  24.37
 0     / 45:  23.96  23.89  23.82  23.79  23.89  24.08
 ---- K:2 Z:   15
 1.33N / 49:  24.03  24.02  24.11  24.39  24.85  25.28
 1N    / 48:  23.82  23.80  23.87  24.10  24.50  24.91
 0.67N / 47:  23.64  23.61  23.64  23.80  24.13  24.49
 0.33N / 46:  23.53  23.49  23.46  23.53  23.77  24.07
 0     / 45:  23.53  23.46  23.39  23.37  23.48  23.71
 ---- L:4 T:   24-JAN-1982 17:00
 ---- K:1 Z:   5
 1.33N / 49:  24.32  24.43  24.70  25.13  25.51  25.65
 1N    / 48:  24.15  24.23  24.45  24.82  25.18  25.31
 0.67N / 47:  24.02  24.06  24.20  24.49  24.81  24.93
 0.33N / 46:  23.95  23.94  23.99  24.18  24.44  24.57
 0     / 45:  23.96  23.89  23.87  23.95  24.13  24.26
 ---- K:2 Z:   15
 1.33N / 49:  24.07  24.18  24.45  24.91  25.35  25.53
 1N    / 48:  23.85  23.94  24.16  24.56  24.98  25.16
 0.67N / 47:  23.67  23.71  23.86  24.18  24.55  24.73
 0.33N / 46:  23.55  23.54  23.61  23.81  24.12  24.30
 0     / 45:  23.54  23.47  23.45  23.53  23.74  23.92
LIST temp[g=u@asn]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 strip regrid on X: TEMP --> PS3DU2           @ASN
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 found   TEMP     M:  2 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      3      4
 regrid  TEMP     M:  8 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 regrid  TEMP     M: 10 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 -DELETE TEMP     M:  8 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: U on X@ASN, on Y@ASN
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:3 T:   21-JAN-1982 16:00
 ---- K:1 Z:   5
 1.33N / 49:  24.20  24.17  24.19  24.33  24.69  25.14
 1N    / 48:  24.06  24.02  24.01  24.10  24.39  24.79
 0.67N / 47:  23.97  23.93  23.90  23.91  24.09  24.43
 0.33N / 46:  23.95  23.89  23.84  23.79  23.86  24.10
 0     / 45:  24.03  23.95  23.86  23.77  23.74  23.87
 ---- K:2 Z:   15
 1.33N / 49:  23.94  23.91  23.92  24.07  24.44  24.94
 1N    / 48:  23.74  23.69  23.69  23.79  24.10  24.54
 0.67N / 47:  23.59  23.54  23.52  23.55  23.75  24.13
 0.33N / 46:  23.52  23.47  23.42  23.37  23.46  23.73
 0     / 45:  23.61  23.53  23.43  23.34  23.30  23.45
 ---- L:4 T:   24-JAN-1982 17:00
 ---- K:1 Z:   5
 1.33N / 49:  24.20  24.26  24.41  24.75  25.21  25.50
 1N    / 48:  24.06  24.08  24.18  24.45  24.86  25.13
 0.67N / 47:  23.98  23.96  24.00  24.16  24.48  24.75
 0.33N / 46:  23.96  23.90  23.88  23.93  24.14  24.38
 0     / 45:  24.04  23.94  23.85  23.82  23.91  24.09
 ---- K:2 Z:   15
 1.33N / 49:  23.93  23.99  24.14  24.49  25.01  25.36
 1N    / 48:  23.73  23.76  23.87  24.15  24.61  24.94
 0.67N / 47:  23.60  23.59  23.63  23.81  24.17  24.49
 0.33N / 46:  23.54  23.48  23.46  23.52  23.76  24.05
 0     / 45:  23.62  23.51  23.42  23.38  23.48  23.69
LIST temp[g=u,gx=u@asn]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 strip regrid on X: TEMP --> PS3DU2           @ASN
 strip regrid on Y: TEMP --> XNTERMED         @LIN
 found   TEMP     M:  2 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      3      4
 regrid  TEMP     M:  8 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 regrid  TEMP     M: 11 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 -DELETE TEMP     M:  8 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4  M: -999 -999  N: -999 -999
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: U on X@ASN, on Y@LIN
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:3 T:   21-JAN-1982 16:00
 ---- K:1 Z:   5
 1.33N / 49:  24.29  24.26  24.28  24.45  24.83  25.29
 1N    / 48:  24.13  24.10  24.10  24.22  24.54  24.96
 0.67N / 47:  24.01  23.97  23.95  24.01  24.24  24.61
 0.33N / 46:  23.96  23.91  23.87  23.85  23.98  24.26
 0     / 45:  23.99  23.92  23.85  23.78  23.80  23.98
 ---- K:2 Z:   15
 1.33N / 49:  24.05  24.01  24.03  24.20  24.59  25.10
 1N    / 48:  23.84  23.80  23.81  23.93  24.27  24.74
 0.67N / 47:  23.66  23.62  23.61  23.67  23.92  24.33
 0.33N / 46:  23.55  23.50  23.47  23.46  23.60  23.93
 0     / 45:  23.57  23.50  23.43  23.36  23.38  23.59
 ---- L:4 T:   24-JAN-1982 17:00
 ---- K:1 Z:   5
 1.33N / 49:  24.29  24.35  24.52  24.89  25.37  25.65
 1N    / 48:  24.13  24.17  24.30  24.60  25.04  25.32
 0.67N / 47:  24.02  24.02  24.09  24.30  24.67  24.94
 0.33N / 46:  23.97  23.93  23.94  24.05  24.31  24.56
 0     / 45:  24.00  23.92  23.87  23.88  24.02  24.23
 ---- K:2 Z:   15
 1.33N / 49:  24.04  24.10  24.26  24.65  25.17  25.52
 1N    / 48:  23.83  23.88  24.01  24.32  24.81  25.15
 0.67N / 47:  23.66  23.68  23.75  23.98  24.39  24.72
 0.33N / 46:  23.57  23.54  23.55  23.66  23.97  24.27
 0     / 45:  23.58  23.50  23.44  23.45  23.62  23.87
LIST temp[g=u,gy=u@asn]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 found   TEMP     M:  6 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: U on X@LIN, on Y@ASN
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:3 T:   21-JAN-1982 16:00
 ---- K:1 Z:   5
 1.33N / 49:  24.19  24.18  24.26  24.51  24.91  25.28
 1N    / 48:  24.04  24.02  24.06  24.24  24.59  24.92
 0.67N / 47:  23.95  23.91  23.90  24.00  24.26  24.54
 0.33N / 46:  23.92  23.86  23.81  23.83  23.98  24.21
 0     / 45:  23.99  23.91  23.82  23.76  23.80  23.96
 ---- K:2 Z:   15
 1.33N / 49:  23.92  23.91  24.00  24.25  24.69  25.11
 1N    / 48:  23.71  23.69  23.74  23.95  24.32  24.70
 0.67N / 47:  23.56  23.53  23.53  23.65  23.94  24.27
 0.33N / 46:  23.50  23.44  23.40  23.41  23.59  23.87
 0     / 45:  23.57  23.48  23.39  23.32  23.37  23.56
 ---- L:4 T:   24-JAN-1982 17:00
 ---- K:1 Z:   5
 1.33N / 49:  24.23  24.33  24.58  24.98  25.36  25.50
 1N    / 48:  24.07  24.13  24.32  24.65  25.00  25.12
 0.67N / 47:  23.97  23.98  24.08  24.32  24.62  24.74
 0.33N / 46:  23.93  23.89  23.91  24.04  24.26  24.40
 0     / 45:  23.99  23.90  23.84  23.86  24.00  24.12
 ---- K:2 Z:   15
 1.33N / 49:  23.96  24.06  24.32  24.75  25.18  25.37
 1N    / 48:  23.75  23.82  24.01  24.38  24.77  24.95
 0.67N / 47:  23.59  23.61  23.72  23.99  24.33  24.51
 0.33N / 46:  23.51  23.47  23.49  23.64  23.90  24.09
 0     / 45:  23.57  23.47  23.40  23.43  23.58  23.74
LIST temp[g=u,gz=u@asn]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 found   TEMP     M:  3 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: U
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:3 T:   21-JAN-1982 16:00
 ---- K:1 Z:   5
 1.33N / 49:  24.28  24.27  24.36  24.64  25.06  25.44
 1N    / 48:  24.11  24.10  24.16  24.38  24.75  25.10
 0.67N / 47:  23.99  23.96  23.98  24.12  24.42  24.73
 0.33N / 46:  23.93  23.89  23.86  23.91  24.12  24.37
 0     / 45:  23.96  23.89  23.82  23.79  23.89  24.08
 ---- K:2 Z:   15
 1.33N / 49:  24.03  24.02  24.11  24.39  24.85  25.28
 1N    / 48:  23.82  23.80  23.87  24.10  24.50  24.91
 0.67N / 47:  23.64  23.61  23.64  23.80  24.13  24.49
 0.33N / 46:  23.53  23.49  23.46  23.53  23.77  24.07
 0     / 45:  23.53  23.46  23.39  23.37  23.48  23.71
 ---- L:4 T:   24-JAN-1982 17:00
 ---- K:1 Z:   5
 1.33N / 49:  24.32  24.43  24.70  25.13  25.51  25.65
 1N    / 48:  24.15  24.23  24.45  24.82  25.18  25.31
 0.67N / 47:  24.02  24.06  24.20  24.49  24.81  24.93
 0.33N / 46:  23.95  23.94  23.99  24.18  24.44  24.57
 0     / 45:  23.96  23.89  23.87  23.95  24.13  24.26
 ---- K:2 Z:   15
 1.33N / 49:  24.07  24.18  24.45  24.91  25.35  25.53
 1N    / 48:  23.85  23.94  24.16  24.56  24.98  25.16
 0.67N / 47:  23.67  23.71  23.86  24.18  24.55  24.73
 0.33N / 46:  23.55  23.54  23.61  23.81  24.12  24.30
 0     / 45:  23.54  23.47  23.45  23.53  23.74  23.92
LIST temp[g=u,gt=u@asn]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 found   TEMP     M:  3 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      3      4
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: U
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:3 T:   21-JAN-1982 16:00
 ---- K:1 Z:   5
 1.33N / 49:  24.28  24.27  24.36  24.64  25.06  25.44
 1N    / 48:  24.11  24.10  24.16  24.38  24.75  25.10
 0.67N / 47:  23.99  23.96  23.98  24.12  24.42  24.73
 0.33N / 46:  23.93  23.89  23.86  23.91  24.12  24.37
 0     / 45:  23.96  23.89  23.82  23.79  23.89  24.08
 ---- K:2 Z:   15
 1.33N / 49:  24.03  24.02  24.11  24.39  24.85  25.28
 1N    / 48:  23.82  23.80  23.87  24.10  24.50  24.91
 0.67N / 47:  23.64  23.61  23.64  23.80  24.13  24.49
 0.33N / 46:  23.53  23.49  23.46  23.53  23.77  24.07
 0     / 45:  23.53  23.46  23.39  23.37  23.48  23.71
 ---- L:4 T:   24-JAN-1982 17:00
 ---- K:1 Z:   5
 1.33N / 49:  24.32  24.43  24.70  25.13  25.51  25.65
 1N    / 48:  24.15  24.23  24.45  24.82  25.18  25.31
 0.67N / 47:  24.02  24.06  24.20  24.49  24.81  24.93
 0.33N / 46:  23.95  23.94  23.99  24.18  24.44  24.57
 0     / 45:  23.96  23.89  23.87  23.95  24.13  24.26
 ---- K:2 Z:   15
 1.33N / 49:  24.07  24.18  24.45  24.91  25.35  25.53
 1N    / 48:  23.85  23.94  24.16  24.56  24.98  25.16
 0.67N / 47:  23.67  23.71  23.86  24.18  24.55  24.73
 0.33N / 46:  23.55  23.54  23.61  23.81  24.12  24.30
 0     / 45:  23.54  23.47  23.45  23.53  23.74  23.92
 
! Z and T axes different
LIST temp[g=g5day@ave]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 strip regrid on X: TEMP --> G5DAY            @AAV
 strip regrid on T: TEMP --> XNTERMED         @AVE
 reading TEMP     M:  8 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M: 12 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      3
 regrid XY
 regrid  TEMP     M: 13 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 -DELETE TEMP     M: 12 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5DAY on X@AAV, on Y@AAV, on T@AVE
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:2 T:   20-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.32  24.26  24.28  24.46  24.80  25.20
 1N    / 48:  24.15  24.09  24.09  24.22  24.52  24.87
 0.67N / 47:  24.02  23.96  23.93  24.01  24.23  24.53
 0.33N / 46:  23.95  23.89  23.83  23.84  23.97  24.21
 0     / 45:  23.96  23.89  23.81  23.76  23.80  23.95
 ---- K:2 Z:   15
 1.33N / 49:  24.09  24.01  24.03  24.21  24.57  25.01
 1N    / 48:  23.87  23.80  23.80  23.94  24.26  24.66
 0.67N / 47:  23.67  23.61  23.59  23.67  23.92  24.26
 0.33N / 46:  23.55  23.48  23.44  23.45  23.61  23.88
 0     / 45:  23.54  23.46  23.38  23.33  23.38  23.57
 ---- L:3 T:   25-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.36  24.50  24.78  25.17  25.50  25.60
 1N    / 48:  24.18  24.29  24.52  24.86  25.17  25.26
 0.67N / 47:  24.04  24.10  24.26  24.53  24.80  24.88
 0.33N / 46:  23.96  23.96  24.04  24.22  24.44  24.53
 0     / 45:  23.96  23.90  23.90  23.98  24.14  24.24
 ---- K:2 Z:   15
 1.33N / 49:  24.10  24.24  24.54  24.96  25.34  25.48
 1N    / 48:  23.89  24.00  24.24  24.62  24.97  25.11
 0.67N / 47:  23.69  23.76  23.93  24.24  24.55  24.68
 0.33N / 46:  23.56  23.57  23.66  23.87  24.13  24.26
 0     / 45:  23.54  23.48  23.48  23.57  23.76  23.89
LIST temp[g=g5day,gx=g5day@ave]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 -DELETE TEMP     M: 13 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 strip regrid on X: TEMP --> G5DAY            @AVE
 strip regrid on Y: TEMP --> XNTERMED         @LIN
 strip regrid on T: TEMP --> YNTERMED         @LIN
 found   TEMP     M:  8 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M: 13 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      3
 regrid  TEMP     M: 12 dset:   1 I:    100    106  J:   45   49  K:    1    2  L:      2      3
 -DELETE TEMP     M: 13 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 13 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 -DELETE TEMP     M: 12 dset:   1 I:    100    106  J:   45   49  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5DAY on X@AVE, on Y@LIN, on T@LIN
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:2 T:   20-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.32  24.26  24.28  24.45  24.79  25.19
 1N    / 48:  24.15  24.09  24.09  24.22  24.51  24.87
 0.67N / 47:  24.02  23.96  23.93  24.00  24.22  24.52
 0.33N / 46:  23.95  23.89  23.83  23.84  23.97  24.20
 0     / 45:  23.96  23.89  23.81  23.76  23.80  23.95
 ---- K:2 Z:   15
 1.33N / 49:  24.09  24.01  24.03  24.20  24.56  25.00
 1N    / 48:  23.87  23.80  23.80  23.94  24.25  24.65
 0.67N / 47:  23.67  23.61  23.58  23.67  23.92  24.26
 0.33N / 46:  23.55  23.48  23.43  23.45  23.60  23.87
 0     / 45:  23.54  23.46  23.38  23.33  23.38  23.56
 ---- L:3 T:   25-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.34  24.47  24.75  25.17  25.53  25.64
 1N    / 48:  24.16  24.26  24.49  24.86  25.19  25.30
 0.67N / 47:  24.03  24.08  24.23  24.52  24.82  24.92
 0.33N / 46:  23.96  23.95  24.02  24.21  24.46  24.57
 0     / 45:  23.96  23.90  23.88  23.97  24.14  24.26
 ---- K:2 Z:   15
 1.33N / 49:  24.08  24.21  24.50  24.96  25.37  25.53
 1N    / 48:  23.87  23.97  24.21  24.61  25.00  25.15
 0.67N / 47:  23.68  23.73  23.90  24.22  24.57  24.72
 0.33N / 46:  23.56  23.55  23.63  23.85  24.14  24.29
 0     / 45:  23.54  23.47  23.46  23.56  23.76  23.92
LIST temp[g=g5day,gy=g5day@ave]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 strip regrid on X: TEMP --> G5DAY            @LIN
 strip regrid on Y: TEMP --> XNTERMED         @AVE
 strip regrid on T: TEMP --> YNTERMED         @LIN
 found   TEMP     M:  8 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M: 12 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      3
 regrid  TEMP     M: 14 dset:   1 I:    100    106  J:   45   49  K:    1    2  L:      2      3
 -DELETE TEMP     M: 12 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 12 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 -DELETE TEMP     M: 14 dset:   1 I:    100    106  J:   45   49  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5DAY on X@LIN, on Y@AVE, on T@LIN
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:2 T:   20-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.32  24.26  24.28  24.45  24.79  25.19
 1N    / 48:  24.15  24.09  24.09  24.22  24.51  24.87
 0.67N / 47:  24.02  23.96  23.93  24.00  24.22  24.52
 0.33N / 46:  23.95  23.89  23.83  23.84  23.97  24.20
 0     / 45:  23.96  23.89  23.81  23.76  23.80  23.95
 ---- K:2 Z:   15
 1.33N / 49:  24.09  24.01  24.03  24.20  24.56  25.00
 1N    / 48:  23.87  23.80  23.80  23.94  24.25  24.65
 0.67N / 47:  23.67  23.61  23.58  23.67  23.92  24.26
 0.33N / 46:  23.55  23.48  23.43  23.45  23.60  23.87
 0     / 45:  23.54  23.46  23.38  23.33  23.38  23.56
 ---- L:3 T:   25-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.34  24.47  24.75  25.17  25.53  25.64
 1N    / 48:  24.16  24.26  24.49  24.86  25.19  25.30
 0.67N / 47:  24.03  24.08  24.23  24.52  24.82  24.92
 0.33N / 46:  23.96  23.95  24.02  24.21  24.46  24.57
 0     / 45:  23.96  23.90  23.88  23.97  24.14  24.26
 ---- K:2 Z:   15
 1.33N / 49:  24.08  24.21  24.50  24.96  25.37  25.53
 1N    / 48:  23.87  23.97  24.21  24.61  25.00  25.15
 0.67N / 47:  23.68  23.73  23.90  24.22  24.57  24.72
 0.33N / 46:  23.56  23.55  23.63  23.85  24.14  24.29
 0     / 45:  23.54  23.47  23.46  23.56  23.76  23.92
LIST temp[g=g5day,gz=g5day@ave]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 strip regrid on X: TEMP --> G5DAY            @LIN
 strip regrid on T: TEMP --> XNTERMED         @LIN
 found   TEMP     M:  8 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M: 14 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      3
 regrid XY
 regrid  TEMP     M: 15 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 -DELETE TEMP     M: 14 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5DAY
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:2 T:   20-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.32  24.26  24.28  24.45  24.79  25.19
 1N    / 48:  24.15  24.09  24.09  24.22  24.51  24.87
 0.67N / 47:  24.02  23.96  23.93  24.00  24.22  24.52
 0.33N / 46:  23.95  23.89  23.83  23.84  23.97  24.20
 0     / 45:  23.96  23.89  23.81  23.76  23.80  23.95
 ---- K:2 Z:   15
 1.33N / 49:  24.09  24.01  24.03  24.20  24.56  25.00
 1N    / 48:  23.87  23.80  23.80  23.94  24.25  24.65
 0.67N / 47:  23.67  23.61  23.58  23.67  23.92  24.26
 0.33N / 46:  23.55  23.48  23.43  23.45  23.60  23.87
 0     / 45:  23.54  23.46  23.38  23.33  23.38  23.56
 ---- L:3 T:   25-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.34  24.47  24.75  25.17  25.53  25.64
 1N    / 48:  24.16  24.26  24.49  24.86  25.19  25.30
 0.67N / 47:  24.03  24.08  24.23  24.52  24.82  24.92
 0.33N / 46:  23.96  23.95  24.02  24.21  24.46  24.57
 0     / 45:  23.96  23.90  23.88  23.97  24.14  24.26
 ---- K:2 Z:   15
 1.33N / 49:  24.08  24.21  24.50  24.96  25.37  25.53
 1N    / 48:  23.87  23.97  24.21  24.61  25.00  25.15
 0.67N / 47:  23.68  23.73  23.90  24.22  24.57  24.72
 0.33N / 46:  23.56  23.55  23.63  23.85  24.14  24.29
 0     / 45:  23.54  23.47  23.46  23.56  23.76  23.92
LIST temp[g=g5day,gt=g5day@ave]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 strip regrid on X: TEMP --> G5DAY            @LIN
 strip regrid on T: TEMP --> XNTERMED         @AVE
 found   TEMP     M:  8 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M: 14 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      3
 regrid XY
 regrid  TEMP     M: 16 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 -DELETE TEMP     M: 14 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5DAY on X@LIN, on Y@LIN, on T@AVE
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:2 T:   20-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.32  24.26  24.28  24.46  24.80  25.20
 1N    / 48:  24.15  24.09  24.09  24.22  24.52  24.87
 0.67N / 47:  24.02  23.96  23.93  24.01  24.23  24.53
 0.33N / 46:  23.95  23.89  23.83  23.84  23.97  24.21
 0     / 45:  23.96  23.89  23.81  23.76  23.80  23.95
 ---- K:2 Z:   15
 1.33N / 49:  24.09  24.01  24.03  24.21  24.57  25.01
 1N    / 48:  23.87  23.80  23.80  23.94  24.26  24.66
 0.67N / 47:  23.67  23.61  23.59  23.67  23.92  24.26
 0.33N / 46:  23.55  23.48  23.44  23.45  23.61  23.88
 0     / 45:  23.54  23.46  23.38  23.33  23.38  23.57
 ---- L:3 T:   25-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.36  24.50  24.78  25.17  25.50  25.60
 1N    / 48:  24.18  24.29  24.52  24.86  25.17  25.26
 0.67N / 47:  24.04  24.10  24.26  24.53  24.80  24.88
 0.33N / 46:  23.96  23.96  24.04  24.22  24.44  24.53
 0     / 45:  23.96  23.90  23.90  23.98  24.14  24.24
 ---- K:2 Z:   15
 1.33N / 49:  24.10  24.24  24.54  24.96  25.34  25.48
 1N    / 48:  23.89  24.00  24.24  24.62  24.97  25.11
 0.67N / 47:  23.69  23.76  23.93  24.24  24.55  24.68
 0.33N / 46:  23.56  23.57  23.66  23.87  24.13  24.26
 0     / 45:  23.54  23.48  23.48  23.57  23.76  23.89
 
LIST temp[g=g5day]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 found   TEMP     M: 15 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5DAY
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:2 T:   20-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.32  24.26  24.28  24.45  24.79  25.19
 1N    / 48:  24.15  24.09  24.09  24.22  24.51  24.87
 0.67N / 47:  24.02  23.96  23.93  24.00  24.22  24.52
 0.33N / 46:  23.95  23.89  23.83  23.84  23.97  24.20
 0     / 45:  23.96  23.89  23.81  23.76  23.80  23.95
 ---- K:2 Z:   15
 1.33N / 49:  24.09  24.01  24.03  24.20  24.56  25.00
 1N    / 48:  23.87  23.80  23.80  23.94  24.25  24.65
 0.67N / 47:  23.67  23.61  23.58  23.67  23.92  24.26
 0.33N / 46:  23.55  23.48  23.43  23.45  23.60  23.87
 0     / 45:  23.54  23.46  23.38  23.33  23.38  23.56
 ---- L:3 T:   25-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.34  24.47  24.75  25.17  25.53  25.64
 1N    / 48:  24.16  24.26  24.49  24.86  25.19  25.30
 0.67N / 47:  24.03  24.08  24.23  24.52  24.82  24.92
 0.33N / 46:  23.96  23.95  24.02  24.21  24.46  24.57
 0     / 45:  23.96  23.90  23.88  23.97  24.14  24.26
 ---- K:2 Z:   15
 1.33N / 49:  24.08  24.21  24.50  24.96  25.37  25.53
 1N    / 48:  23.87  23.97  24.21  24.61  25.00  25.15
 0.67N / 47:  23.68  23.73  23.90  24.22  24.57  24.72
 0.33N / 46:  23.56  23.55  23.63  23.85  24.14  24.29
 0     / 45:  23.54  23.47  23.46  23.56  23.76  23.92
LIST temp[g=g5day@asn]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 strip regrid on X: TEMP --> G5DAY            @ASN
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 strip regrid on T: TEMP --> YNTERMED         @ASN
 found   TEMP     M:  8 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M: 14 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 regrid  TEMP     M: 17 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 -DELETE TEMP     M: 14 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 14 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 -DELETE TEMP     M: 17 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5DAY on X@ASN, on Y@ASN, on T@ASN
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:2 T:   20-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.33  24.20  24.11  24.11  24.27  24.62
 1N    / 48:  24.15  24.05  23.96  23.93  24.03  24.33
 0.67N / 47:  24.03  23.94  23.87  23.81  23.83  24.04
 0.33N / 46:  23.98  23.90  23.83  23.75  23.71  23.81
 0     / 45:  24.03  23.95  23.87  23.77  23.68  23.69
 ---- K:2 Z:   15
 1.33N / 49:  24.10  23.94  23.85  23.85  24.01  24.37
 1N    / 48:  23.86  23.73  23.64  23.61  23.73  24.05
 0.67N / 47:  23.66  23.56  23.49  23.43  23.47  23.71
 0.33N / 46:  23.56  23.47  23.40  23.32  23.28  23.41
 0     / 45:  23.61  23.52  23.44  23.34  23.24  23.24
 ---- L:3 T:   25-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.20  24.17  24.19  24.33  24.69  25.14
 1N    / 48:  24.06  24.02  24.01  24.10  24.39  24.79
 0.67N / 47:  23.97  23.93  23.90  23.91  24.09  24.43
 0.33N / 46:  23.95  23.89  23.84  23.79  23.86  24.10
 0     / 45:  24.03  23.95  23.86  23.77  23.74  23.87
 ---- K:2 Z:   15
 1.33N / 49:  23.94  23.91  23.92  24.07  24.44  24.94
 1N    / 48:  23.74  23.69  23.69  23.79  24.10  24.54
 0.67N / 47:  23.59  23.54  23.52  23.55  23.75  24.13
 0.33N / 46:  23.52  23.47  23.42  23.37  23.46  23.73
 0     / 45:  23.61  23.53  23.43  23.34  23.30  23.45
LIST temp[g=g5day,gx=g5day@asn]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 strip regrid on X: TEMP --> G5DAY            @ASN
 strip regrid on Y: TEMP --> XNTERMED         @LIN
 strip regrid on T: TEMP --> YNTERMED         @LIN
 found   TEMP     M:  8 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M: 17 dset:   1 I:    100    105  J:   45   50  K:    1    2  L:      2      3
 regrid  TEMP     M: 18 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 -DELETE TEMP     M: 17 dset:   1 I:    100    105  J:   45   50  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 17 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 -DELETE TEMP     M: 18 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5DAY on X@ASN, on Y@LIN, on T@LIN
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:2 T:   20-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.37  24.28  24.24  24.31  24.58  25.00
 1N    / 48:  24.19  24.11  24.07  24.11  24.33  24.70
 0.67N / 47:  24.06  23.98  23.93  23.93  24.07  24.38
 0.33N / 46:  23.98  23.92  23.86  23.81  23.86  24.08
 0     / 45:  24.00  23.93  23.85  23.77  23.74  23.85
 ---- K:2 Z:   15
 1.33N / 49:  24.15  24.03  23.99  24.07  24.34  24.78
 1N    / 48:  23.92  23.82  23.77  23.82  24.05  24.45
 0.67N / 47:  23.71  23.63  23.58  23.59  23.75  24.08
 0.33N / 46:  23.59  23.51  23.45  23.41  23.48  23.73
 0     / 45:  23.58  23.50  23.42  23.34  23.31  23.45
 ---- L:3 T:   25-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.30  24.37  24.56  24.94  25.40  25.66
 1N    / 48:  24.14  24.19  24.33  24.65  25.07  25.32
 0.67N / 47:  24.02  24.04  24.12  24.34  24.70  24.94
 0.33N / 46:  23.97  23.94  23.96  24.08  24.34  24.57
 0     / 45:  24.00  23.92  23.87  23.90  24.05  24.24
 ---- K:2 Z:   15
 1.33N / 49:  24.05  24.12  24.30  24.70  25.21  25.53
 1N    / 48:  23.84  23.89  24.04  24.37  24.85  25.16
 0.67N / 47:  23.67  23.69  23.78  24.02  24.43  24.72
 0.33N / 46:  23.57  23.54  23.57  23.70  24.00  24.28
 0     / 45:  23.58  23.50  23.45  23.47  23.64  23.88
LIST temp[g=g5day,gy=g5day@asn]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 strip regrid on X: TEMP --> G5DAY            @LIN
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 strip regrid on T: TEMP --> YNTERMED         @LIN
 found   TEMP     M:  8 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M: 18 dset:   1 I:    100    106  J:   45   49  K:    1    2  L:      2      3
 regrid  TEMP     M: 19 dset:   1 I:    100    106  J:   45   49  K:    1    2  L:      2      3
 -DELETE TEMP     M: 18 dset:   1 I:    100    106  J:   45   49  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 18 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 -DELETE TEMP     M: 19 dset:   1 I:    100    106  J:   45   49  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5DAY on X@LIN, on Y@ASN, on T@LIN
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:2 T:   20-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.23  24.17  24.18  24.33  24.66  25.04
 1N    / 48:  24.07  24.01  24.00  24.10  24.37  24.69
 0.67N / 47:  23.97  23.91  23.87  23.90  24.08  24.35
 0.33N / 46:  23.93  23.86  23.80  23.77  23.86  24.05
 0     / 45:  23.99  23.91  23.82  23.74  23.74  23.85
 ---- K:2 Z:   15
 1.33N / 49:  23.98  23.90  23.92  24.08  24.42  24.84
 1N    / 48:  23.76  23.69  23.68  23.79  24.08  24.46
 0.67N / 47:  23.59  23.53  23.49  23.54  23.75  24.06
 0.33N / 46:  23.51  23.44  23.38  23.35  23.46  23.69
 0     / 45:  23.57  23.48  23.39  23.30  23.30  23.43
 ---- L:3 T:   25-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.24  24.36  24.62  25.02  25.38  25.49
 1N    / 48:  24.08  24.16  24.35  24.69  25.01  25.11
 0.67N / 47:  23.98  24.00  24.11  24.36  24.63  24.74
 0.33N / 46:  23.93  23.90  23.93  24.06  24.28  24.40
 0     / 45:  23.98  23.90  23.84  23.88  24.01  24.13
 ---- K:2 Z:   15
 1.33N / 49:  23.98  24.09  24.36  24.80  25.21  25.37
 1N    / 48:  23.76  23.84  24.05  24.42  24.80  24.94
 0.67N / 47:  23.60  23.63  23.75  24.03  24.35  24.50
 0.33N / 46:  23.51  23.48  23.51  23.67  23.93  24.09
 0     / 45:  23.56  23.47  23.41  23.45  23.60  23.75
LIST temp[g=g5day,gz=g5day@asn]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 found   TEMP     M: 15 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5DAY
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:2 T:   20-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.32  24.26  24.28  24.45  24.79  25.19
 1N    / 48:  24.15  24.09  24.09  24.22  24.51  24.87
 0.67N / 47:  24.02  23.96  23.93  24.00  24.22  24.52
 0.33N / 46:  23.95  23.89  23.83  23.84  23.97  24.20
 0     / 45:  23.96  23.89  23.81  23.76  23.80  23.95
 ---- K:2 Z:   15
 1.33N / 49:  24.09  24.01  24.03  24.20  24.56  25.00
 1N    / 48:  23.87  23.80  23.80  23.94  24.25  24.65
 0.67N / 47:  23.67  23.61  23.58  23.67  23.92  24.26
 0.33N / 46:  23.55  23.48  23.43  23.45  23.60  23.87
 0     / 45:  23.54  23.46  23.38  23.33  23.38  23.56
 ---- L:3 T:   25-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.34  24.47  24.75  25.17  25.53  25.64
 1N    / 48:  24.16  24.26  24.49  24.86  25.19  25.30
 0.67N / 47:  24.03  24.08  24.23  24.52  24.82  24.92
 0.33N / 46:  23.96  23.95  24.02  24.21  24.46  24.57
 0     / 45:  23.96  23.90  23.88  23.97  24.14  24.26
 ---- K:2 Z:   15
 1.33N / 49:  24.08  24.21  24.50  24.96  25.37  25.53
 1N    / 48:  23.87  23.97  24.21  24.61  25.00  25.15
 0.67N / 47:  23.68  23.73  23.90  24.22  24.57  24.72
 0.33N / 46:  23.56  23.55  23.63  23.85  24.14  24.29
 0     / 45:  23.54  23.47  23.46  23.56  23.76  23.92
LIST temp[g=g5day,gt=g5day@asn]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 strip regrid on X: TEMP --> G5DAY            @LIN
 strip regrid on T: TEMP --> XNTERMED         @ASN
 found   TEMP     M:  8 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M: 19 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      3
 regrid XY
 regrid  TEMP     M: 20 dset:   1 I:    100    105  J:   45   49  K:    1    2  L:      2      3
 -DELETE TEMP     M: 19 dset:   1 I:    100    106  J:   45   50  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5DAY on X@LIN, on Y@LIN, on T@ASN
             FILENAME : gtsa056_1.cdf
             SUBSET   : 6 by 5 by 2 by 2 points (LONGITUDE-LATITUDE-DEPTH (m)-TIME)
              130W   129W   128W   127W   126W   125W   
              100    101    102    103    104    105
 ---- L:2 T:   20-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.36  24.25  24.20  24.29  24.57  24.98
 1N    / 48:  24.18  24.08  24.03  24.09  24.31  24.67
 0.67N / 47:  24.04  23.96  23.89  23.90  24.06  24.35
 0.33N / 46:  23.96  23.89  23.81  23.77  23.85  24.06
 0     / 45:  23.97  23.89  23.80  23.73  23.72  23.84
 ---- K:2 Z:   15
 1.33N / 49:  24.14  24.01  23.96  24.05  24.33  24.77
 1N    / 48:  23.91  23.79  23.74  23.80  24.04  24.43
 0.67N / 47:  23.70  23.60  23.54  23.56  23.74  24.07
 0.33N / 46:  23.56  23.48  23.41  23.38  23.47  23.71
 0     / 45:  23.54  23.46  23.38  23.30  23.29  23.44
 ---- L:3 T:   25-JAN-1982 00:00
 ---- K:1 Z:   5
 1.33N / 49:  24.28  24.27  24.36  24.64  25.06  25.44
 1N    / 48:  24.11  24.10  24.16  24.38  24.75  25.10
 0.67N / 47:  23.99  23.96  23.98  24.12  24.42  24.73
 0.33N / 46:  23.93  23.89  23.86  23.91  24.12  24.37
 0     / 45:  23.96  23.89  23.82  23.79  23.89  24.08
 ---- K:2 Z:   15
 1.33N / 49:  24.03  24.02  24.11  24.39  24.85  25.28
 1N    / 48:  23.82  23.80  23.87  24.10  24.50  24.91
 0.67N / 47:  23.64  23.61  23.64  23.80  24.13  24.49
 0.33N / 46:  23.53  23.49  23.46  23.53  23.77  24.07
 0     / 45:  23.53  23.46  23.39  23.37  23.48  23.71
 
! all 4 axes different
LIST temp[g=g5_10@ave]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10            @AAV
 strip regrid on Z: TEMP --> XNTERMED         @AVE
 strip regrid on T: TEMP --> ZNTERMED         @AVE
 reading TEMP     M: 19 dset:   1 I:     95    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M: 21 dset:   1 I:     95    106  J:   45   50  K:    1    2  L:      2      3
 regrid  TEMP     M: 22 dset:   1 I:     95    106  J:   45   50  K:    1    1  L:      2      3
 -DELETE TEMP     M: 21 dset:   1 I:     95    106  J:   45   50  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid XY
 regrid  TEMP     M: 21 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M: 22 dset:   1 I:     95    106  J:   45   50  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5_10 on X@AAV, on Y@AAV, on Z@AVE, on T@AVE
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 2 points (LATITUDE-TIME)
             LONGITUDE: 130W
             DEPTH (m): 10
                       0      0.33N  0.67N  1N     1.33N 
                       45     46     47     48     49
 20-JAN-1982 00 / 2:  23.88  23.97  24.15  24.37  24.63
 25-JAN-1982 00 / 3:  23.89  23.98  24.17  24.40  24.65
LIST temp[g=g5_10,gx=g5_10@ave]
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 -DELETE TEMP     M: 21 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10            @AVE
 strip regrid on Y: TEMP --> XNTERMED         @LIN
 strip regrid on Z: TEMP --> YNTERMED         @LIN
 strip regrid on T: TEMP --> ZNTERMED         @LIN
 found   TEMP     M: 19 dset:   1 I:     95    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M: 21 dset:   1 I:     95    106  J:   45   50  K:    1    2  L:      2      3
 regrid  TEMP     M: 22 dset:   1 I:     95    106  J:   45   50  K:    1    1  L:      2      3
 -DELETE TEMP     M: 21 dset:   1 I:     95    106  J:   45   50  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 21 dset:   1 I:     95    106  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M: 22 dset:   1 I:     95    106  J:   45   50  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 22 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M: 21 dset:   1 I:     95    106  J:   45   49  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5_10 on X@AVE, on Y@LIN, on Z@LIN, on T@LIN
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 2 points (LATITUDE-TIME)
             LONGITUDE: 130W
             DEPTH (m): 10
                       0      0.33N  0.67N  1N     1.33N 
                       45     46     47     48     49
 20-JAN-1982 00 / 2:  23.88  23.98  24.15  24.38  24.63
 25-JAN-1982 00 / 3:  23.88  23.97  24.15  24.39  24.64
LIST temp[g=g5_10,gy=g5_10@ave]
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10            @LIN
 strip regrid on Y: TEMP --> XNTERMED         @AVE
 strip regrid on Z: TEMP --> YNTERMED         @LIN
 strip regrid on T: TEMP --> ZNTERMED         @LIN
 found   TEMP     M: 19 dset:   1 I:     95    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M: 21 dset:   1 I:    100    101  J:   45   50  K:    1    2  L:      2      3
 regrid  TEMP     M: 23 dset:   1 I:    100    101  J:   45   50  K:    1    1  L:      2      3
 -DELETE TEMP     M: 21 dset:   1 I:    100    101  J:   45   50  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 21 dset:   1 I:    100    101  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M: 23 dset:   1 I:    100    101  J:   45   50  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 23 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M: 21 dset:   1 I:    100    101  J:   45   49  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5_10 on X@LIN, on Y@AVE, on Z@LIN, on T@LIN
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 2 points (LATITUDE-TIME)
             LONGITUDE: 130W
             DEPTH (m): 10
                       0      0.33N  0.67N  1N     1.33N 
                       45     46     47     48     49
 20-JAN-1982 00 / 2:  23.75  23.75  23.85  24.01  24.21
 25-JAN-1982 00 / 3:  23.75  23.76  23.85  24.02  24.21
LIST temp[g=g5_10,gz=g5_10@ave]
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10            @LIN
 strip regrid on Z: TEMP --> XNTERMED         @AVE
 strip regrid on T: TEMP --> ZNTERMED         @LIN
 found   TEMP     M: 19 dset:   1 I:     95    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M: 21 dset:   1 I:    100    101  J:   45   50  K:    1    2  L:      2      3
 regrid  TEMP     M: 24 dset:   1 I:    100    101  J:   45   50  K:    1    1  L:      2      3
 -DELETE TEMP     M: 21 dset:   1 I:    100    101  J:   45   50  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid XY
 regrid  TEMP     M: 21 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M: 24 dset:   1 I:    100    101  J:   45   50  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5_10 on X@LIN, on Y@LIN, on Z@AVE, on T@LIN
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 2 points (LATITUDE-TIME)
             LONGITUDE: 130W
             DEPTH (m): 10
                       0      0.33N  0.67N  1N     1.33N 
                       45     46     47     48     49
 20-JAN-1982 00 / 2:  23.75  23.75  23.85  24.01  24.21
 25-JAN-1982 00 / 3:  23.75  23.76  23.85  24.02  24.21
LIST temp[g=g5_10,gt=g5_10@ave]
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10            @LIN
 strip regrid on Z: TEMP --> XNTERMED         @LIN
 strip regrid on T: TEMP --> ZNTERMED         @AVE
 found   TEMP     M: 19 dset:   1 I:     95    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M: 24 dset:   1 I:    100    101  J:   45   50  K:    1    2  L:      2      3
 regrid  TEMP     M: 25 dset:   1 I:    100    101  J:   45   50  K:    1    1  L:      2      3
 -DELETE TEMP     M: 24 dset:   1 I:    100    101  J:   45   50  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid XY
 regrid  TEMP     M: 24 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M: 25 dset:   1 I:    100    101  J:   45   50  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5_10 on X@LIN, on Y@LIN, on Z@LIN, on T@AVE
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 2 points (LATITUDE-TIME)
             LONGITUDE: 130W
             DEPTH (m): 10
                       0      0.33N  0.67N  1N     1.33N 
                       45     46     47     48     49
 20-JAN-1982 00 / 2:  23.75  23.75  23.85  24.01  24.21
 25-JAN-1982 00 / 3:  23.75  23.76  23.87  24.03  24.23
 
LIST temp[g=g5_10@asn]
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10            @ASN
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 strip regrid on Z: TEMP --> YNTERMED         @ASN
 strip regrid on T: TEMP --> ZNTERMED         @ASN
 reading TEMP     M: 25 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 regrid  TEMP     M: 26 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 regrid  TEMP     M: 27 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M: 26 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 26 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M: 27 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 27 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M: 26 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5_10 on X@ASN, on Y@ASN, on Z@ASN, on T@ASN
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 2 points (LATITUDE-TIME)
             LONGITUDE: 130W
             DEPTH (m): 10
                       0      0.33N  0.67N  1N     1.33N 
                       45     46     47     48     49
 20-JAN-1982 00 / 2:  29.59  29.58  29.58  29.57  29.56
 25-JAN-1982 00 / 3:  29.58  29.57  29.57  29.55  29.54
LIST temp[g=g5_10,gx=g5_10@asn]
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10            @ASN
 strip regrid on Y: TEMP --> XNTERMED         @LIN
 strip regrid on Z: TEMP --> YNTERMED         @LIN
 strip regrid on T: TEMP --> ZNTERMED         @LIN
 reading TEMP     M: 26 dset:   1 I:     12     12  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M: 28 dset:   1 I:     12     12  J:   45   50  K:    1    2  L:      2      3
 regrid  TEMP     M: 29 dset:   1 I:     12     12  J:   45   50  K:    1    1  L:      2      3
 -DELETE TEMP     M: 28 dset:   1 I:     12     12  J:   45   50  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 28 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M: 29 dset:   1 I:     12     12  J:   45   50  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 29 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M: 28 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5_10 on X@ASN, on Y@LIN, on Z@LIN, on T@LIN
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 2 points (LATITUDE-TIME)
             LONGITUDE: 130W
             DEPTH (m): 10
                       0      0.33N  0.67N  1N     1.33N 
                       45     46     47     48     49
 20-JAN-1982 00 / 2:  29.57  29.57  29.55  29.53  29.53
 25-JAN-1982 00 / 3:  29.56  29.55  29.54  29.51  29.51
LIST temp[g=g5_10,gy=g5_10@asn]
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10            @LIN
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 strip regrid on Z: TEMP --> YNTERMED         @LIN
 strip regrid on T: TEMP --> ZNTERMED         @LIN
 found   TEMP     M: 19 dset:   1 I:     95    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M: 28 dset:   1 I:    100    101  J:   45   49  K:    1    2  L:      2      3
 regrid  TEMP     M: 30 dset:   1 I:    100    101  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M: 28 dset:   1 I:    100    101  J:   45   49  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 28 dset:   1 I:    100    101  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M: 30 dset:   1 I:    100    101  J:   45   49  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 30 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M: 28 dset:   1 I:    100    101  J:   45   49  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5_10 on X@LIN, on Y@ASN, on Z@LIN, on T@LIN
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 2 points (LATITUDE-TIME)
             LONGITUDE: 130W
             DEPTH (m): 10
                       0      0.33N  0.67N  1N     1.33N 
                       45     46     47     48     49
 20-JAN-1982 00 / 2:  23.78  23.72  23.78  23.91  24.10
 25-JAN-1982 00 / 3:  23.77  23.72  23.79  23.92  24.11
LIST temp[g=g5_10,gz=g5_10@asn]
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10            @LIN
 strip regrid on Z: TEMP --> XNTERMED         @ASN
 strip regrid on T: TEMP --> ZNTERMED         @LIN
 found   TEMP     M: 19 dset:   1 I:     95    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M: 28 dset:   1 I:    100    101  J:   45   50  K:    1    1  L:      2      3
 regrid  TEMP     M: 31 dset:   1 I:    100    101  J:   45   50  K:    1    1  L:      2      3
 -DELETE TEMP     M: 28 dset:   1 I:    100    101  J:   45   50  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 regrid XY
 regrid  TEMP     M: 28 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M: 31 dset:   1 I:    100    101  J:   45   50  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5_10 on X@LIN, on Y@LIN, on Z@ASN, on T@LIN
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 2 points (LATITUDE-TIME)
             LONGITUDE: 130W
             DEPTH (m): 10
                       0      0.33N  0.67N  1N     1.33N 
                       45     46     47     48     49
 20-JAN-1982 00 / 2:  23.96  23.95  24.02  24.15  24.32
 25-JAN-1982 00 / 3:  23.96  23.96  24.03  24.16  24.34
LIST temp[g=g5_10,gt=g5_10@asn]
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10            @LIN
 strip regrid on Z: TEMP --> XNTERMED         @LIN
 strip regrid on T: TEMP --> ZNTERMED         @ASN
 found   TEMP     M: 19 dset:   1 I:     95    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M: 31 dset:   1 I:    100    101  J:   45   50  K:    1    2  L:      2      3
 regrid  TEMP     M: 32 dset:   1 I:    100    101  J:   45   50  K:    1    1  L:      2      3
 -DELETE TEMP     M: 31 dset:   1 I:    100    101  J:   45   50  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid XY
 regrid  TEMP     M: 31 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M: 32 dset:   1 I:    100    101  J:   45   50  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5_10 on X@LIN, on Y@LIN, on Z@LIN, on T@ASN
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 2 points (LATITUDE-TIME)
             LONGITUDE: 130W
             DEPTH (m): 10
                       0      0.33N  0.67N  1N     1.33N 
                       45     46     47     48     49
 20-JAN-1982 00 / 2:  23.75  23.76  23.87  24.04  24.25
 25-JAN-1982 00 / 3:  23.74  23.73  23.82  23.97  24.15
 
! unspecified regions
SET MODE IGNORE	! V.5 change
canc reg
set reg/l=1:3  ! x,y,z unspecified
load temp
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DT2          PSXT      PSYT      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:      1    160  J:    1  100  K:    1   27  L:      1      3
 reading TEMP     M: 32 dset:   1 I:      1    160  J:    5   89  K:    1    2  L:      1      3
load temp[g=u]
 dealloc  dynamic grid PS3DT2          PSXT      PSYT      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:      1    160  J:    1  100  K:    1   27  L:      1      3
 strip regrid on X: TEMP --> PS3DU2           @LIN
 strip modulo-void-filling TEMP on X axis:        1      161 dset:   1
 found   TEMP     M: 32 dset:   1 I:      1    160  J:    5   89  K:    1    2  L:      1      3
 doing modulo-void-filling TEMP on X axis:        1      160 dset:   1
 regrid XY
 regrid  TEMP     M: 34 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
load temp[g=u@lin]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:      1    160  J:    1  100  K:    1   27  L:      1      3
 strip regrid on X: TEMP --> PS3DU2           @LIN
 strip modulo-void-filling TEMP on X axis:        1      161 dset:   1
 found   TEMP     M: 33 dset:   1 I:      1    161  J:    5   89  K:    1    2  L:      1      3
 doing modulo-void-filling TEMP on X axis:        1      160 dset:   1
 regrid XY
 regrid  TEMP     M: 36 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
 
load temp[g=u@ave]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:      1    160  J:    1  100  K:    1   27  L:      1      3
 strip regrid on X: TEMP --> PS3DU2           @AAV
 strip modulo-void-filling TEMP on X axis:        1      161 dset:   1
 found   TEMP     M: 35 dset:   1 I:      1    161  J:    5   89  K:    1    2  L:      1      3
 doing modulo-void-filling TEMP on X axis:        1      160 dset:   1
 regrid XY
 regrid  TEMP     M: 38 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
load temp[g=u,gx=u@ave]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:      1    160  J:    1  100  K:    1   27  L:      1      3
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 strip regrid on X: TEMP --> PS3DU2           @AVE
 strip modulo-void-filling TEMP on X axis:        1      161 dset:   1
 strip regrid on Y: TEMP --> XNTERMED         @LIN
 found   TEMP     M: 37 dset:   1 I:      1    161  J:    5   89  K:    1    2  L:      1      3
 regrid  TEMP     M: 39 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
 doing modulo-void-filling TEMP on X axis:        1      160 dset:   1
 regrid  TEMP     M: 41 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
 -DELETE TEMP     M: 40 dset:   1 I:      1    161  J:    1  100  K:    1    2  L:      1      3  M: -999 -999  N: -999 -999
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
load temp[g=u,gy=u@ave]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:      1    160  J:    1  100  K:    1   27  L:      1      3
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 strip regrid on X: TEMP --> PS3DU2           @LIN
 strip modulo-void-filling TEMP on X axis:        1      161 dset:   1
 strip regrid on Y: TEMP --> XNTERMED         @AVE
 found   TEMP     M: 37 dset:   1 I:      1    161  J:    5   89  K:    1    2  L:      1      3
 regrid  TEMP     M: 40 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
 doing modulo-void-filling TEMP on X axis:        1      160 dset:   1
 regrid  TEMP     M: 43 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
 -DELETE TEMP     M: 42 dset:   1 I:      1    161  J:    1  100  K:    1    2  L:      1      3  M: -999 -999  N: -999 -999
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 
load temp[g=u@asn]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:      1    160  J:    1  100  K:    1   27  L:      1      3
 strip regrid on X: TEMP --> PS3DU2           @ASN
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 found   TEMP     M: 37 dset:   1 I:      1    161  J:    5   89  K:    1    2  L:      1      3
 regrid  TEMP     M: 42 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
 regrid  TEMP     M: 44 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
 -DELETE TEMP     M: 42 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3  M: -999 -999  N: -999 -999
load temp[g=u,gx=u@asn]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:      1    160  J:    1  100  K:    1   27  L:      1      3
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 strip regrid on X: TEMP --> PS3DU2           @ASN
 strip regrid on Y: TEMP --> XNTERMED         @LIN
 found   TEMP     M: 37 dset:   1 I:      1    161  J:    5   89  K:    1    2  L:      1      3
 regrid  TEMP     M: 42 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
 regrid  TEMP     M: 45 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
 -DELETE TEMP     M: 42 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3  M: -999 -999  N: -999 -999
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
load temp[g=u,gy=u@asn]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 eval    EX#1     C:  4 dset:   1 I:      1    160  J:    1  100  K:    1   27  L:      1      3
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 strip regrid on X: TEMP --> PS3DU2           @LIN
 strip modulo-void-filling TEMP on X axis:        1      161 dset:   1
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 found   TEMP     M: 37 dset:   1 I:      1    161  J:    5   89  K:    1    2  L:      1      3
 regrid  TEMP     M: 42 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
 doing modulo-void-filling TEMP on X axis:        1      160 dset:   1
 regrid  TEMP     M: 47 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
 -DELETE TEMP     M: 46 dset:   1 I:      1    161  J:    1  100  K:    1    2  L:      1      3  M: -999 -999  N: -999 -999
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 
canc reg
use gtsa056_2		!kob 4/99
set reg/i=101:105/j=41:42  ! z,t unspecified
load temp[g=u]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 eval    EX#1     C:  4 dset:   2 I:    101    105  J:   41   42  K:    1   27  L:      1    168
 strip regrid on X: TEMP --> PS3DU1           @LIN
 reading TEMP     M: 46 dset:   2 I:    101    106  J:   41   43  K:    1    2  L:      1    168
 regrid XY
 regrid  TEMP     M: 48 dset:   2 I:    101    105  J:   41   42  K:    1    2  L:      1    168
 
load temp[g=u@ave]
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 eval    EX#1     C:  4 dset:   2 I:    101    105  J:   41   42  K:    1   27  L:      1    168
 strip regrid on X: TEMP --> PS3DU1           @AAV
 found   TEMP     M: 46 dset:   2 I:    101    106  J:   41   43  K:    1    2  L:      1    168
 regrid XY
 regrid  TEMP     M: 49 dset:   2 I:    101    105  J:   41   42  K:    1    2  L:      1    168
load temp[g=u,gz=u@ave]
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 eval    EX#1     C:  4 dset:   2 I:    101    105  J:   41   42  K:    1   27  L:      1    168
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 strip regrid on X: TEMP --> PS3DU1           @LIN
 found   TEMP     M: 46 dset:   2 I:    101    106  J:   41   43  K:    1    2  L:      1    168
 regrid XY
 regrid  TEMP     M: 50 dset:   2 I:    101    105  J:   41   42  K:    1    2  L:      1    168
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
load temp[g=u,gt=u@ave]
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 eval    EX#1     C:  4 dset:   2 I:    101    105  J:   41   42  K:    1   27  L:      1    168
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 strip regrid on X: TEMP --> PS3DU1           @LIN
 found   TEMP     M: 46 dset:   2 I:    101    106  J:   41   43  K:    1    2  L:      1    168
 regrid XY
 regrid  TEMP     M: 51 dset:   2 I:    101    105  J:   41   42  K:    1    2  L:      1    168
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 
load temp[g=u@asn]
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 eval    EX#1     C:  4 dset:   2 I:    101    105  J:   41   42  K:    1   27  L:      1    168
 strip regrid on X: TEMP --> PS3DU1           @ASN
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 found   TEMP     M: 46 dset:   2 I:    101    106  J:   41   43  K:    1    2  L:      1    168
 regrid  TEMP     M: 52 dset:   2 I:    101    105  J:   41   42  K:    1    2  L:      1    168
 regrid  TEMP     M: 53 dset:   2 I:    101    105  J:   41   42  K:    1    2  L:      1    168
 -DELETE TEMP     M: 52 dset:   2 I:    101    105  J:   41   42  K:    1    2  L:      1    168  M: -999 -999  N: -999 -999
load temp[g=u,gz=u@asn]
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 eval    EX#1     C:  4 dset:   2 I:    101    105  J:   41   42  K:    1   27  L:      1    168
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 strip regrid on X: TEMP --> PS3DU1           @LIN
 found   TEMP     M: 46 dset:   2 I:    101    106  J:   41   43  K:    1    2  L:      1    168
 regrid XY
 regrid  TEMP     M: 52 dset:   2 I:    101    105  J:   41   42  K:    1    2  L:      1    168
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
load temp[g=u,gt=u@asn]
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 eval    EX#1     C:  4 dset:   2 I:    101    105  J:   41   42  K:    1   27  L:      1    168
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 strip regrid on X: TEMP --> PS3DU1           @LIN
 found   TEMP     M: 46 dset:   2 I:    101    106  J:   41   43  K:    1    2  L:      1    168
 regrid XY
 regrid  TEMP     M: 54 dset:   2 I:    101    105  J:   41   42  K:    1    2  L:      1    168
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
SET MODE/LAST IGNORE	! V.5 change
 
! plot verifications
set mode interp    ! regridding is also an interpolation
cancel viewports
set window/size=.5/aspect=.4 1
 
! X axis
use gtsa056_1 		!kob 4/99
set region/x=130E:90W/y=0/z=5/t=21-JAN-1982
plot temp
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DT2          PSXT      PSYT      PSZT      TIME2
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 strip --> EX#1[Y=0@ITP,D=1]
 eval    EX#1     C:  6 dset:   1 I:      1    140  J:   45   46  K:    1    1  L:      2      3
 found   TEMP     M: 37 dset:   1 I:      1    161  J:    5   89  K:    1    2  L:      1      3
 doing --> TEMP[Y=0@ITP,D=1]
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 1    complete
plot/over temp[g=u]
 dealloc  dynamic grid PS3DT2          PSXT      PSYT      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 strip --> EX#1[Y=0@ITP,D=1]
 eval    EX#1     C:  6 dset:   1 I:      0    140  J:   44   45  K:    1    1  L:      2      3
 strip moduloing TEMP on X axis:        0      140 dset:   1
 found   TEMP     M: 36 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
 doing moduloing TEMP on X axis:        1      140 dset:   1
 doing --> TEMP[Y=0@ITP,D=1]
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 2    complete
plot/over temp[g=g5day]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 strip --> EX#1[Y=0@ITP,D=1]
 eval    EX#1     C:  6 dset:   1 I:      0    140  J:   44   45  K:    1    1  L:      2      3
 strip moduloing TEMP on X axis:        0      140 dset:   1
 strip regrid on X: TEMP --> G5DAY            @LIN
 strip regrid on T: TEMP --> XNTERMED         @LIN
 reading TEMP     M: 60 dset:   1 I:      1    141  J:   44   46  K:    1    1  L:      2      5
 regrid  TEMP     M: 61 dset:   1 I:      1    141  J:   44   46  K:    1    1  L:      2      3
 regrid XY
 regrid  TEMP     M: 62 dset:   1 I:      1    140  J:   44   45  K:    1    1  L:      2      3
 -DELETE TEMP     M: 61 dset:   1 I:      1    141  J:   44   46  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 doing moduloing TEMP on X axis:        1      140 dset:   1
 doing --> TEMP[Y=0@ITP,D=1]
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 3    complete
plot/over temp[g=g5_10]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 strip --> EX#1[Z=5@ITP,D=1]
 strip --> EX#1[Y=0@ITP,D=1]
 eval    EX#1     C:  7 dset:   1 I:      2     16  J:   44   45  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10            @LIN
 strip moduloing TEMP on X axis:        0      141 dset:   1
 strip regrid on Z: TEMP --> XNTERMED         @LIN
 strip regrid on T: TEMP --> ZNTERMED         @LIN
 reading TEMP     M: 65 dset:   1 I:      1    141  J:   44   46  K:    1    2  L:      2      5
 regrid  TEMP     M: 66 dset:   1 I:      1    141  J:   44   46  K:    1    2  L:      2      3
 regrid  TEMP     M: 67 dset:   1 I:      1    141  J:   44   46  K:    1    1  L:      2      3
 -DELETE TEMP     M: 66 dset:   1 I:      1    141  J:   44   46  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 doing moduloing TEMP on X axis:        1      141 dset:   1
 regrid XY
 regrid  TEMP     M: 68 dset:   1 I:      2     16  J:   44   45  K:    1    1  L:      2      3
 -DELETE TEMP     M: 66 dset:   1 I:      0    141  J:   44   46  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 doing --> TEMP[Y=0@ITP,D=1]
 doing --> TEMP[Z=5@ITP,D=1]
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 4    complete
plot/over temp[g=u@ave]
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 strip --> EX#1[Y=0@ITP,D=1]
 eval    EX#1     C:  6 dset:   1 I:      0    140  J:   44   45  K:    1    1  L:      2      3
 strip moduloing TEMP on X axis:        0      140 dset:   1
 found   TEMP     M: 38 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
 doing moduloing TEMP on X axis:        1      140 dset:   1
 doing --> TEMP[Y=0@ITP,D=1]
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 5    complete
plot/over temp[g=g5day@ave]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 strip --> EX#1[Y=0@ITP,D=1]
 eval    EX#1     C:  6 dset:   1 I:      0    140  J:   44   45  K:    1    1  L:      2      3
 strip moduloing TEMP on X axis:        0      140 dset:   1
 strip regrid on X: TEMP --> G5DAY            @AAV
 strip regrid on T: TEMP --> XNTERMED         @AVE
 found   TEMP     M: 65 dset:   1 I:      1    141  J:   44   46  K:    1    2  L:      2      5
 regrid  TEMP     M: 74 dset:   1 I:      1    141  J:   44   46  K:    1    1  L:      2      3
 regrid XY
 regrid  TEMP     M: 75 dset:   1 I:      1    140  J:   44   45  K:    1    1  L:      2      3
 -DELETE TEMP     M: 74 dset:   1 I:      1    141  J:   44   46  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 doing moduloing TEMP on X axis:        1      140 dset:   1
 doing --> TEMP[Y=0@ITP,D=1]
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 6    complete
plot/over temp[g=g5_10@ave]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 strip --> EX#1[Z=5@ITP,D=1]
 strip --> EX#1[Y=0@ITP,D=1]
 eval    EX#1     C:  7 dset:   1 I:      2     16  J:   44   45  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10            @AAV
 strip moduloing TEMP on X axis:        0      146 dset:   1
 strip regrid on Z: TEMP --> XNTERMED         @AVE
 strip regrid on T: TEMP --> ZNTERMED         @AVE
 reading TEMP     M: 78 dset:   1 I:      1    146  J:   44   46  K:    1    2  L:      2      5
 regrid  TEMP     M: 79 dset:   1 I:      1    146  J:   44   46  K:    1    2  L:      2      3
 regrid  TEMP     M: 80 dset:   1 I:      1    146  J:   44   46  K:    1    1  L:      2      3
 -DELETE TEMP     M: 79 dset:   1 I:      1    146  J:   44   46  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 doing moduloing TEMP on X axis:        1      146 dset:   1
 regrid XY
 regrid  TEMP     M: 81 dset:   1 I:      2     16  J:   44   45  K:    1    1  L:      2      3
 -DELETE TEMP     M: 79 dset:   1 I:      0    146  J:   44   46  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 doing --> TEMP[Y=0@ITP,D=1]
 doing --> TEMP[Z=5@ITP,D=1]
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 7    complete
plot/over temp[g=u@asn]
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 strip --> EX#1[Y=0@ITP,D=1]
 eval    EX#1     C:  6 dset:   1 I:      0    140  J:   44   45  K:    1    1  L:      2      3
 strip moduloing TEMP on X axis:        0      140 dset:   1
 found   TEMP     M: 44 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
 doing moduloing TEMP on X axis:        1      140 dset:   1
 doing --> TEMP[Y=0@ITP,D=1]
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 8    complete
plot/over temp[g=g5day@asn]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 strip --> EX#1[Y=0@ITP,D=1]
 eval    EX#1     C:  6 dset:   1 I:      0    140  J:   44   45  K:    1    1  L:      2      3
 strip moduloing TEMP on X axis:        0      140 dset:   1
 strip regrid on X: TEMP --> G5DAY            @ASN
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 strip regrid on T: TEMP --> YNTERMED         @ASN
 found   TEMP     M: 78 dset:   1 I:      1    146  J:   44   46  K:    1    2  L:      2      5
 regrid  TEMP     M: 87 dset:   1 I:      1    140  J:   44   45  K:    1    1  L:      2      3
 regrid  TEMP     M: 88 dset:   1 I:      1    140  J:   44   45  K:    1    1  L:      2      3
 -DELETE TEMP     M: 87 dset:   1 I:      1    140  J:   44   45  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 87 dset:   1 I:      1    140  J:   44   45  K:    1    1  L:      2      3
 -DELETE TEMP     M: 88 dset:   1 I:      1    140  J:   44   45  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 doing moduloing TEMP on X axis:        1      140 dset:   1
 doing --> TEMP[Y=0@ITP,D=1]
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 9    complete
plot/over temp[g=u,gx=u@ave]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 strip --> EX#1[Y=0@ITP,D=1]
 eval    EX#1     C:  6 dset:   1 I:      0    140  J:   44   45  K:    1    1  L:      2      3
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 strip moduloing TEMP on X axis:        0      140 dset:   1
 found   TEMP     M: 41 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
 doing moduloing TEMP on X axis:        1      140 dset:   1
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 doing --> TEMP[Y=0@ITP,D=1]
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 10   complete
plot/over temp[g=g5day,gx=g5day@ave]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 strip --> EX#1[Y=0@ITP,D=1]
 eval    EX#1     C:  6 dset:   1 I:      0    140  J:   44   45  K:    1    1  L:      2      3
 strip moduloing TEMP on X axis:        0      140 dset:   1
 strip regrid on X: TEMP --> G5DAY            @AVE
 strip regrid on Y: TEMP --> XNTERMED         @LIN
 strip regrid on T: TEMP --> YNTERMED         @LIN
 found   TEMP     M: 78 dset:   1 I:      1    146  J:   44   46  K:    1    2  L:      2      5
 regrid  TEMP     M: 94 dset:   1 I:      1    141  J:   44   46  K:    1    1  L:      2      3
 regrid  TEMP     M: 95 dset:   1 I:      1    141  J:   44   45  K:    1    1  L:      2      3
 -DELETE TEMP     M: 94 dset:   1 I:      1    141  J:   44   46  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 94 dset:   1 I:      1    140  J:   44   45  K:    1    1  L:      2      3
 -DELETE TEMP     M: 95 dset:   1 I:      1    141  J:   44   45  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 doing moduloing TEMP on X axis:        1      140 dset:   1
 doing --> TEMP[Y=0@ITP,D=1]
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 11   complete
plot/over temp[g=g5_10,gx=g5_10@ave]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 strip --> EX#1[Z=5@ITP,D=1]
 strip --> EX#1[Y=0@ITP,D=1]
 eval    EX#1     C:  7 dset:   1 I:      2     16  J:   44   45  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10            @AVE
 strip moduloing TEMP on X axis:        0      146 dset:   1
 strip regrid on Y: TEMP --> XNTERMED         @LIN
 strip regrid on Z: TEMP --> YNTERMED         @LIN
 strip regrid on T: TEMP --> ZNTERMED         @LIN
 found   TEMP     M: 78 dset:   1 I:      1    146  J:   44   46  K:    1    2  L:      2      5
 regrid  TEMP     M: 98 dset:   1 I:      1    146  J:   44   46  K:    1    2  L:      2      3
 regrid  TEMP     M: 99 dset:   1 I:      1    146  J:   44   46  K:    1    1  L:      2      3
 -DELETE TEMP     M: 98 dset:   1 I:      1    146  J:   44   46  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 98 dset:   1 I:      1    146  J:   44   45  K:    1    1  L:      2      3
 -DELETE TEMP     M: 99 dset:   1 I:      1    146  J:   44   46  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 doing moduloing TEMP on X axis:        1      146 dset:   1
 regrid  TEMP     M:100 dset:   1 I:      2     16  J:   44   45  K:    1    1  L:      2      3
 -DELETE TEMP     M: 99 dset:   1 I:      0    146  J:   44   45  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 doing --> TEMP[Y=0@ITP,D=1]
 doing --> TEMP[Z=5@ITP,D=1]
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 12   complete
plot/over temp[g=g5_10@asn]   ! invalid interpretation of data
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 strip --> EX#1[Z=5@ITP,D=1]
 strip --> EX#1[Y=0@ITP,D=1]
 eval    EX#1     C:  7 dset:   1 I:      2     16  J:   44   45  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10            @ASN
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 strip regrid on Z: TEMP --> YNTERMED         @ASN
 strip regrid on T: TEMP --> ZNTERMED         @ASN
 found   TEMP     M: 78 dset:   1 I:      1    146  J:   44   46  K:    1    2  L:      2      5
 regrid  TEMP     M:103 dset:   1 I:      2     16  J:   44   45  K:    1    1  L:      2      3
 regrid  TEMP     M:104 dset:   1 I:      2     16  J:   44   45  K:    1    1  L:      2      3
 -DELETE TEMP     M:103 dset:   1 I:      2     16  J:   44   45  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M:103 dset:   1 I:      2     16  J:   44   45  K:    1    1  L:      2      3
 -DELETE TEMP     M:104 dset:   1 I:      2     16  J:   44   45  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M:104 dset:   1 I:      2     16  J:   44   45  K:    1    1  L:      2      3
 -DELETE TEMP     M:103 dset:   1 I:      2     16  J:   44   45  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 doing --> TEMP[Y=0@ITP,D=1]
 doing --> TEMP[Z=5@ITP,D=1]
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 13   complete
 
! Y axis
set region/x=180/y=20s:20n/z=5/t=21-JAN-1982
plot temp
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DT2          PSXT      PSYT      PSZT      TIME2
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 strip --> EX#1[X=180E@ITP,D=1]
 eval    EX#1     C:  6 dset:   1 I:     50     51  J:    5   88  K:    1    1  L:      2      3
 found   TEMP     M: 37 dset:   1 I:      1    161  J:    5   89  K:    1    2  L:      1      3
 doing --> TEMP[X=180E@ITP,D=1]
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 14   complete
plot/over temp[g=u]
 dealloc  dynamic grid PS3DT2          PSXT      PSYT      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 eval    EX#1     C:  5 dset:   1 I:     50     50  J:    5   88  K:    1    1  L:      2      3
 found   TEMP     M: 36 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 15   complete
plot/over temp[g=g5day]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 eval    EX#1     C:  5 dset:   1 I:     50     50  J:    5   88  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5DAY            @LIN
 strip regrid on T: TEMP --> XNTERMED         @LIN
 reading TEMP     M:110 dset:   1 I:     50     51  J:    5   89  K:    1    1  L:      2      5
 regrid  TEMP     M:111 dset:   1 I:     50     51  J:    5   89  K:    1    1  L:      2      3
 regrid XY
 regrid  TEMP     M:112 dset:   1 I:     50     50  J:    5   88  K:    1    1  L:      2      3
 -DELETE TEMP     M:111 dset:   1 I:     50     51  J:    5   89  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 16   complete
plot/over temp[g=g5_10]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 strip --> EX#1[Z=5@ITP,D=1]
 eval    EX#1     C:  6 dset:   1 I:      7      7  J:    5   88  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10            @LIN
 strip regrid on Z: TEMP --> XNTERMED         @LIN
 strip regrid on T: TEMP --> ZNTERMED         @LIN
 reading TEMP     M:113 dset:   1 I:     50     51  J:    5   89  K:    1    2  L:      2      5
 regrid  TEMP     M:114 dset:   1 I:     50     51  J:    5   89  K:    1    2  L:      2      3
 regrid  TEMP     M:115 dset:   1 I:     50     51  J:    5   89  K:    1    1  L:      2      3
 -DELETE TEMP     M:114 dset:   1 I:     50     51  J:    5   89  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid XY
 regrid  TEMP     M:114 dset:   1 I:      7      7  J:    5   88  K:    1    1  L:      2      3
 -DELETE TEMP     M:115 dset:   1 I:     50     51  J:    5   89  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 doing --> TEMP[Z=5@ITP,D=1]
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 17   complete
plot/over temp[g=u@ave]
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 eval    EX#1     C:  5 dset:   1 I:     50     50  J:    5   88  K:    1    1  L:      2      3
 found   TEMP     M: 38 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 18   complete
plot/over temp[g=g5day@ave]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 eval    EX#1     C:  5 dset:   1 I:     50     50  J:    5   88  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5DAY            @AAV
 strip regrid on T: TEMP --> XNTERMED         @AVE
 found   TEMP     M:113 dset:   1 I:     50     51  J:    5   89  K:    1    2  L:      2      5
 regrid  TEMP     M:118 dset:   1 I:     50     51  J:    5   89  K:    1    1  L:      2      3
 regrid XY
 regrid  TEMP     M:119 dset:   1 I:     50     50  J:    5   88  K:    1    1  L:      2      3
 -DELETE TEMP     M:118 dset:   1 I:     50     51  J:    5   89  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 19   complete
plot/over temp[g=g5_10@ave]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 strip --> EX#1[Z=5@ITP,D=1]
 eval    EX#1     C:  6 dset:   1 I:      7      7  J:    5   88  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10            @AAV
 strip regrid on Z: TEMP --> XNTERMED         @AVE
 strip regrid on T: TEMP --> ZNTERMED         @AVE
 reading TEMP     M:120 dset:   1 I:     45     56  J:    5   89  K:    1    2  L:      2      5
 regrid  TEMP     M:121 dset:   1 I:     45     56  J:    5   89  K:    1    2  L:      2      3
 regrid  TEMP     M:122 dset:   1 I:     45     56  J:    5   89  K:    1    1  L:      2      3
 -DELETE TEMP     M:121 dset:   1 I:     45     56  J:    5   89  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid XY
 regrid  TEMP     M:121 dset:   1 I:      7      7  J:    5   88  K:    1    1  L:      2      3
 -DELETE TEMP     M:122 dset:   1 I:     45     56  J:    5   89  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 doing --> TEMP[Z=5@ITP,D=1]
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 20   complete
plot/over temp[g=u@asn]
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 eval    EX#1     C:  5 dset:   1 I:     50     50  J:    5   88  K:    1    1  L:      2      3
 found   TEMP     M: 44 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 21   complete
plot/over temp[g=g5day@asn]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 eval    EX#1     C:  5 dset:   1 I:     50     50  J:    5   88  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5DAY            @ASN
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 strip regrid on T: TEMP --> YNTERMED         @ASN
 found   TEMP     M:120 dset:   1 I:     45     56  J:    5   89  K:    1    2  L:      2      5
 regrid  TEMP     M:125 dset:   1 I:     50     50  J:    5   88  K:    1    1  L:      2      3
 regrid  TEMP     M:126 dset:   1 I:     50     50  J:    5   88  K:    1    1  L:      2      3
 -DELETE TEMP     M:125 dset:   1 I:     50     50  J:    5   88  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M:125 dset:   1 I:     50     50  J:    5   88  K:    1    1  L:      2      3
 -DELETE TEMP     M:126 dset:   1 I:     50     50  J:    5   88  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 22   complete
plot/over temp[g=u,gy=u@ave]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 eval    EX#1     C:  5 dset:   1 I:     50     50  J:    5   88  K:    1    1  L:      2      3
 allocate dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 found   TEMP     M: 43 dset:   1 I:      1    160  J:    1  100  K:    1    2  L:      1      3
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 23   complete
plot/over temp[g=g5day,gy=g5day@ave]
 dealloc  dynamic grid PS3DU2          PSXU      PSYU      PSZT      TIME2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 eval    EX#1     C:  5 dset:   1 I:     50     50  J:    5   88  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5DAY            @LIN
 strip regrid on Y: TEMP --> XNTERMED         @AVE
 strip regrid on T: TEMP --> YNTERMED         @LIN
 found   TEMP     M:120 dset:   1 I:     45     56  J:    5   89  K:    1    2  L:      2      5
 regrid  TEMP     M:128 dset:   1 I:     50     51  J:    5   89  K:    1    1  L:      2      3
 regrid  TEMP     M:129 dset:   1 I:     50     51  J:    5   88  K:    1    1  L:      2      3
 -DELETE TEMP     M:128 dset:   1 I:     50     51  J:    5   89  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M:128 dset:   1 I:     50     50  J:    5   88  K:    1    1  L:      2      3
 -DELETE TEMP     M:129 dset:   1 I:     50     51  J:    5   88  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 24   complete
plot/over temp[g=g5_10,gy=g5_10@ave]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 strip --> EX#1[Z=5@ITP,D=1]
 eval    EX#1     C:  6 dset:   1 I:      7      7  J:    5   88  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10            @LIN
 strip regrid on Y: TEMP --> XNTERMED         @AVE
 strip regrid on Z: TEMP --> YNTERMED         @LIN
 strip regrid on T: TEMP --> ZNTERMED         @LIN
 found   TEMP     M:120 dset:   1 I:     45     56  J:    5   89  K:    1    2  L:      2      5
 regrid  TEMP     M:130 dset:   1 I:     50     51  J:    5   89  K:    1    2  L:      2      3
 regrid  TEMP     M:131 dset:   1 I:     50     51  J:    5   89  K:    1    1  L:      2      3
 -DELETE TEMP     M:130 dset:   1 I:     50     51  J:    5   89  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M:130 dset:   1 I:     50     51  J:    5   88  K:    1    1  L:      2      3
 -DELETE TEMP     M:131 dset:   1 I:     50     51  J:    5   89  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M:131 dset:   1 I:      7      7  J:    5   88  K:    1    1  L:      2      3
 -DELETE TEMP     M:130 dset:   1 I:     50     51  J:    5   88  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 doing --> TEMP[Z=5@ITP,D=1]
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 25   complete
plot/over temp[g=g5_10@asn]  ! invalid interpretation of data
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=21-JAN-198200:00@ITP,D=1]
 strip --> EX#1[Z=5@ITP,D=1]
 eval    EX#1     C:  6 dset:   1 I:      7      7  J:    5   88  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10            @ASN
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 strip regrid on Z: TEMP --> YNTERMED         @ASN
 strip regrid on T: TEMP --> ZNTERMED         @ASN
 found   TEMP     M: 37 dset:   1 I:      1    161  J:    5   89  K:    1    2  L:      1      3
 regrid  TEMP     M:133 dset:   1 I:      7      7  J:    5   88  K:    1    1  L:      2      3
 regrid  TEMP     M:134 dset:   1 I:      7      7  J:    5   88  K:    1    1  L:      2      3
 -DELETE TEMP     M:133 dset:   1 I:      7      7  J:    5   88  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M:133 dset:   1 I:      7      7  J:    5   88  K:    1    1  L:      2      3
 -DELETE TEMP     M:134 dset:   1 I:      7      7  J:    5   88  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M:134 dset:   1 I:      7      7  J:    5   88  K:    1    1  L:      2      3
 -DELETE TEMP     M:133 dset:   1 I:      7      7  J:    5   88  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 doing --> TEMP[Z=5@ITP,D=1]
 doing --> TEMP[T=21-JAN-198200:00@ITP,D=1]
setting up plot
PPL plot 26   complete
 
! T axis
use gtsa056_2	!kob  4/99
set region/x=180W/y=0/z=5/t=21-JAN-1982:13-JUN-1983
load temp[i=50:51,j=45:56,k=1:2,l=1:172]  ! preload to save time
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DT1          PSXT      PSYT      PSZT      TIME1
 eval    EX#1     C:  4 dset:   2 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 strip moduloing TEMP on T axis:        1      172 dset:   2
 reading TEMP     M:136 dset:   2 I:     50     51  J:   45   50  K:    1    2  L:      1    168
 doing moduloing TEMP on T axis:        1      168 dset:   2
plot temp
 dealloc  dynamic grid PS3DT1          PSXT      PSYT      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DT1          PSXT      PSYT      PSZT      TIME1
 strip --> EX#1[Y=0@ITP,D=2]
 strip --> EX#1[X=180E@ITP,D=2]
 eval    EX#1     C:  6 dset:   2 I:     50     51  J:   45   46  K:    1    1  L:      3    170
 found   TEMP     M:137 dset:   2 I:     50     51  J:   45   50  K:    1    2  L:      1    172
 doing --> TEMP[X=180E@ITP,D=2]
 doing --> TEMP[Y=0@ITP,D=2]
setting up plot
PPL plot 27   complete
plot/over temp[g=u]
 dealloc  dynamic grid PS3DT1          PSXT      PSYT      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 strip --> EX#1[Y=0@ITP,D=2]
 eval    EX#1     C:  5 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      3    170
 strip moduloing TEMP on T axis:        3      170 dset:   2
 strip regrid on X: TEMP --> PS3DU1           @LIN
 reading TEMP     M:140 dset:   2 I:     50     51  J:   44   46  K:    1    1  L:      3    168
 regrid XY
 regrid  TEMP     M:141 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      3    168
 doing moduloing TEMP on T axis:        3      168 dset:   2
 strip regrid on X: TEMP --> PS3DU1           @LIN
 reading TEMP     M:143 dset:   2 I:     50     51  J:   44   46  K:    1    1  L:      1      2
 regrid XY
 regrid  TEMP     M:144 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      1      2
 doing moduloing TEMP on T axis:        1        2 dset:   2
 doing --> TEMP[Y=0@ITP,D=2]
setting up plot
PPL plot 28   complete
plot/over temp[g=g5day]
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[Y=0@ITP,D=2]
 eval    EX#1     C:  5 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      2    104
 strip regrid on X: TEMP --> G5DAY            @LIN
 strip regrid on T: TEMP --> XNTERMED         @LIN
 strip moduloing TEMP on T axis:        2      171 dset:   2
 reading TEMP     M:146 dset:   2 I:     50     51  J:   44   46  K:    1    1  L:      1    168
 doing moduloing TEMP on T axis:        1      168 dset:   2
 regrid  TEMP     M:148 dset:   2 I:     50     51  J:   44   46  K:    1    1  L:      2    104
 regrid XY
 regrid  TEMP     M:149 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      2    104
 -DELETE TEMP     M:148 dset:   2 I:     50     51  J:   44   46  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
 doing --> TEMP[Y=0@ITP,D=2]
setting up plot
PPL plot 29   complete
plot/over temp[g=g5_10]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[Z=5@ITP,D=2]
 strip --> EX#1[Y=0@ITP,D=2]
 eval    EX#1     C:  6 dset:   2 I:      7      7  J:   44   45  K:    1    1  L:      2    104
 strip regrid on X: TEMP --> G5_10            @LIN
 strip regrid on Z: TEMP --> XNTERMED         @LIN
 strip regrid on T: TEMP --> ZNTERMED         @LIN
 strip moduloing TEMP on T axis:        2      171 dset:   2
 reading TEMP     M:150 dset:   2 I:     50     51  J:   44   46  K:    1    2  L:      1    168
 doing moduloing TEMP on T axis:        1      168 dset:   2
 regrid  TEMP     M:152 dset:   2 I:     50     51  J:   44   46  K:    1    2  L:      2    104
 regrid  TEMP     M:153 dset:   2 I:     50     51  J:   44   46  K:    1    1  L:      2    104
 -DELETE TEMP     M:152 dset:   2 I:     50     51  J:   44   46  K:    1    2  L:      2    104  M: -999 -999  N: -999 -999
 regrid XY
 regrid  TEMP     M:152 dset:   2 I:      7      7  J:   44   45  K:    1    1  L:      2    104
 -DELETE TEMP     M:153 dset:   2 I:     50     51  J:   44   46  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
 doing --> TEMP[Y=0@ITP,D=2]
 doing --> TEMP[Z=5@ITP,D=2]
setting up plot
PPL plot 30   complete
plot/over temp[g=u@ave]
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 strip --> EX#1[Y=0@ITP,D=2]
 eval    EX#1     C:  5 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      3    170
 strip moduloing TEMP on T axis:        3      170 dset:   2
 strip regrid on X: TEMP --> PS3DU1           @AAV
 found   TEMP     M:151 dset:   2 I:     50     51  J:   44   46  K:    1    2  L:      2    171
 regrid XY
 regrid  TEMP     M:155 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      3    168
 doing moduloing TEMP on T axis:        3      168 dset:   2
 strip regrid on X: TEMP --> PS3DU1           @AAV
 found   TEMP     M:150 dset:   2 I:     50     51  J:   44   46  K:    1    2  L:      1    168
 regrid XY
 regrid  TEMP     M:157 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      1      2
 doing moduloing TEMP on T axis:        1        2 dset:   2
 doing --> TEMP[Y=0@ITP,D=2]
setting up plot
PPL plot 31   complete
plot/over temp[g=g5day@ave]
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[Y=0@ITP,D=2]
 eval    EX#1     C:  5 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      2    104
 strip regrid on X: TEMP --> G5DAY            @AAV
 strip regrid on T: TEMP --> XNTERMED         @AVE
 found   TEMP     M:151 dset:   2 I:     50     51  J:   44   46  K:    1    2  L:      2    171
 regrid  TEMP     M:159 dset:   2 I:     50     51  J:   44   46  K:    1    1  L:      2    104
 regrid XY
 regrid  TEMP     M:160 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      2    104
 -DELETE TEMP     M:159 dset:   2 I:     50     51  J:   44   46  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
 doing --> TEMP[Y=0@ITP,D=2]
setting up plot
PPL plot 32   complete
plot/over temp[g=g5_10@ave]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[Z=5@ITP,D=2]
 strip --> EX#1[Y=0@ITP,D=2]
 eval    EX#1     C:  6 dset:   2 I:      7      7  J:   44   45  K:    1    1  L:      2    104
 strip regrid on X: TEMP --> G5_10            @AAV
 strip regrid on Z: TEMP --> XNTERMED         @AVE
 strip regrid on T: TEMP --> ZNTERMED         @AVE
 strip moduloing TEMP on T axis:        2      171 dset:   2
 reading TEMP     M:161 dset:   2 I:     45     56  J:   44   46  K:    1    2  L:      1    168
 doing moduloing TEMP on T axis:        1      168 dset:   2
 regrid  TEMP     M:163 dset:   2 I:     45     56  J:   44   46  K:    1    2  L:      2    104
 regrid  TEMP     M:164 dset:   2 I:     45     56  J:   44   46  K:    1    1  L:      2    104
 -DELETE TEMP     M:163 dset:   2 I:     45     56  J:   44   46  K:    1    2  L:      2    104  M: -999 -999  N: -999 -999
 regrid XY
 regrid  TEMP     M:163 dset:   2 I:      7      7  J:   44   45  K:    1    1  L:      2    104
 -DELETE TEMP     M:164 dset:   2 I:     45     56  J:   44   46  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
 doing --> TEMP[Y=0@ITP,D=2]
 doing --> TEMP[Z=5@ITP,D=2]
setting up plot
PPL plot 33   complete
plot/over temp[g=u@asn]
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 strip --> EX#1[Y=0@ITP,D=2]
 eval    EX#1     C:  5 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      3    170
 strip moduloing TEMP on T axis:        3      170 dset:   2
 strip regrid on X: TEMP --> PS3DU1           @ASN
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 found   TEMP     M:162 dset:   2 I:     45     56  J:   44   46  K:    1    2  L:      2    171
 regrid  TEMP     M:166 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      3    168
 regrid  TEMP     M:167 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      3    168
 -DELETE TEMP     M:166 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      3    168  M: -999 -999  N: -999 -999
 doing moduloing TEMP on T axis:        3      168 dset:   2
 strip regrid on X: TEMP --> PS3DU1           @ASN
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 found   TEMP     M:161 dset:   2 I:     45     56  J:   44   46  K:    1    2  L:      1    168
 regrid  TEMP     M:168 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      1      2
 regrid  TEMP     M:169 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      1      2
 -DELETE TEMP     M:168 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      1      2  M: -999 -999  N: -999 -999
 doing moduloing TEMP on T axis:        1        2 dset:   2
 doing --> TEMP[Y=0@ITP,D=2]
setting up plot
PPL plot 34   complete
plot/over temp[g=g5_10@asn]
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[Z=5@ITP,D=2]
 strip --> EX#1[Y=0@ITP,D=2]
 eval    EX#1     C:  6 dset:   2 I:      7      7  J:   44   45  K:    1    1  L:      2    104
 strip regrid on X: TEMP --> G5_10            @ASN
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 strip regrid on Z: TEMP --> YNTERMED         @ASN
 strip regrid on T: TEMP --> ZNTERMED         @ASN
 reading TEMP     M:170 dset:   2 I:      7      7  J:   44   45  K:    1    1  L:      2    104
 regrid  TEMP     M:171 dset:   2 I:      7      7  J:   44   45  K:    1    1  L:      2    104
 regrid  TEMP     M:172 dset:   2 I:      7      7  J:   44   45  K:    1    1  L:      2    104
 -DELETE TEMP     M:171 dset:   2 I:      7      7  J:   44   45  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
 regrid  TEMP     M:171 dset:   2 I:      7      7  J:   44   45  K:    1    1  L:      2    104
 -DELETE TEMP     M:172 dset:   2 I:      7      7  J:   44   45  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
 regrid  TEMP     M:172 dset:   2 I:      7      7  J:   44   45  K:    1    1  L:      2    104
 -DELETE TEMP     M:171 dset:   2 I:      7      7  J:   44   45  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
 doing --> TEMP[Y=0@ITP,D=2]
 doing --> TEMP[Z=5@ITP,D=2]
setting up plot
PPL plot 35   complete
plot/over temp[g=u,gt=u@ave]
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 strip --> EX#1[Y=0@ITP,D=2]
 eval    EX#1     C:  5 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      3    170
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 found   TEMP     M:142 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      3    170
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 doing --> TEMP[Y=0@ITP,D=2]
setting up plot
PPL plot 36   complete
plot/over temp[g=g5day,gt=g5day@ave]
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[Y=0@ITP,D=2]
 eval    EX#1     C:  5 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      2    104
 strip regrid on X: TEMP --> G5DAY            @LIN
 strip regrid on T: TEMP --> XNTERMED         @AVE
 found   TEMP     M:162 dset:   2 I:     45     56  J:   44   46  K:    1    2  L:      2    171
 regrid  TEMP     M:175 dset:   2 I:     50     51  J:   44   46  K:    1    1  L:      2    104
 regrid XY
 regrid  TEMP     M:176 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      2    104
 -DELETE TEMP     M:175 dset:   2 I:     50     51  J:   44   46  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
 doing --> TEMP[Y=0@ITP,D=2]
setting up plot
PPL plot 37   complete
plot/over temp[g=g5_10,gt=g5_10@ave]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[Z=5@ITP,D=2]
 strip --> EX#1[Y=0@ITP,D=2]
 eval    EX#1     C:  6 dset:   2 I:      7      7  J:   44   45  K:    1    1  L:      2    104
 strip regrid on X: TEMP --> G5_10            @LIN
 strip regrid on Z: TEMP --> XNTERMED         @LIN
 strip regrid on T: TEMP --> ZNTERMED         @AVE
 found   TEMP     M:162 dset:   2 I:     45     56  J:   44   46  K:    1    2  L:      2    171
 regrid  TEMP     M:177 dset:   2 I:     50     51  J:   44   46  K:    1    2  L:      2    104
 regrid  TEMP     M:178 dset:   2 I:     50     51  J:   44   46  K:    1    1  L:      2    104
 -DELETE TEMP     M:177 dset:   2 I:     50     51  J:   44   46  K:    1    2  L:      2    104  M: -999 -999  N: -999 -999
 regrid XY
 regrid  TEMP     M:177 dset:   2 I:      7      7  J:   44   45  K:    1    1  L:      2    104
 -DELETE TEMP     M:178 dset:   2 I:     50     51  J:   44   46  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
 doing --> TEMP[Y=0@ITP,D=2]
 doing --> TEMP[Z=5@ITP,D=2]
setting up plot
PPL plot 38   complete
plot/over temp[g=g5day,gt=g5day@asn]  ! invalid interpretation of data
 dealloc  dynamic grid G5_10           XAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[Y=0@ITP,D=2]
 eval    EX#1     C:  5 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      2    104
 strip regrid on X: TEMP --> G5DAY            @LIN
 strip regrid on T: TEMP --> XNTERMED         @ASN
 found   TEMP     M:162 dset:   2 I:     45     56  J:   44   46  K:    1    2  L:      2    171
 regrid  TEMP     M:180 dset:   2 I:     50     51  J:   44   46  K:    1    1  L:      2    104
 regrid XY
 regrid  TEMP     M:181 dset:   2 I:     50     50  J:   44   45  K:    1    1  L:      2    104
 -DELETE TEMP     M:180 dset:   2 I:     50     51  J:   44   46  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
 doing --> TEMP[Y=0@ITP,D=2]
setting up plot
PPL plot 39   complete
 
set mode/last interp
cancel region
 
! 1/00 additions to check details of @AVE bevavior
define axis/x=1.1:7.1:1 xoffset
define axis/x=5/npoints=1 x1pt
define axis/x=5:6:1 x2pt
 
! test 1D regrid
let a1 = x[gx=x1pt]	! single point
let a2 = x[gx=x2pt]
 
list a1[gx=xoffset@ave]
 dealloc  dynamic grid G5DAY           PSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A1       C:  7 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          X1PT      NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          X1PT      NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          X1PT      NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 strip regrid on X: A1 --> (G###)           @AVE
 eval    A1       C:  7 dset:   0 I:      1      1  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          X1PT      NORMAL    NORMAL    NORMAL
 pseudo  X        M:182 dset:   0 I:      1      1  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X1PT      NORMAL    NORMAL    NORMAL
 regrid  A1       M:184 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
             VARIABLE : X[GX=X1PT]
                        regrid: 1 delta on X@AVE
             SUBSET   : 7 points (X)
 1.1 / 1:   ....
 2.1 / 2:   ....
 3.1 / 3:   ....
 4.1 / 4:  5.000
 5.1 / 5:  5.000
 6.1 / 6:   ....
 7.1 / 7:   ....
list a1[gx=xoffset@sum] ! should sum to 5
 -DELETE X        M:182 dset:   0 I:      1      1  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 -DELETE A1       M:184 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 strip regrid on X: A1 --> (G###)           @SUM
 found   A1       M:183 dset:   0 I:      1      1  J: -999 -999  K: -999 -999  L:   -999   -999
 regrid  A1       M:184 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
             VARIABLE : X[GX=X1PT]
                        regrid: 1 delta on X@SUM
             SUBSET   : 7 points (X)
 1.1 / 1:   ....
 2.1 / 2:   ....
 3.1 / 3:   ....
 4.1 / 4:  0.500
 5.1 / 5:  4.500
 6.1 / 6:   ....
 7.1 / 7:   ....
list a1[gx=xoffset@var] ! should be all missing
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 -DELETE A1       M:184 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 strip regrid on X: A1 --> (G###)           @VAR
 found   A1       M:183 dset:   0 I:      1      1  J: -999 -999  K: -999 -999  L:   -999   -999
 regrid  A1       M:184 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
             VARIABLE : Variance of X[GX=X1PT]
                        regrid: 1 delta on X@VAR
             SUBSET   : 7 points (X)
 1.1 / 1:....
 2.1 / 2:....
 3.1 / 3:....
 4.1 / 4:....
 5.1 / 5:....
 6.1 / 6:....
 7.1 / 7:....
 
list a2[gx=xoffset@ave]
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 -DELETE A1       M:184 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A2       C:  7 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          X2PT      NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          X2PT      NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          X2PT      NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 strip regrid on X: A2 --> (G###)           @AVE
 eval    A2       C:  7 dset:   0 I:      1      2  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          X2PT      NORMAL    NORMAL    NORMAL
 pseudo  X        M:184 dset:   0 I:      1      2  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X2PT      NORMAL    NORMAL    NORMAL
 regrid  A2       M:185 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
             VARIABLE : X[GX=X2PT]
                        regrid: 1 delta on X@AVE
             SUBSET   : 7 points (X)
 1.1 / 1:   ....
 2.1 / 2:   ....
 3.1 / 3:   ....
 4.1 / 4:  5.000
 5.1 / 5:  5.100
 6.1 / 6:  6.000
 7.1 / 7:   ....
list a2[gx=xoffset@sum] ! should sum to 5+6=11
 -DELETE X        M:184 dset:   0 I:      1      2  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 -DELETE A2       M:185 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 strip regrid on X: A2 --> (G###)           @SUM
 found   A2       M:182 dset:   0 I:      1      2  J: -999 -999  K: -999 -999  L:   -999   -999
 regrid  A2       M:185 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
             VARIABLE : X[GX=X2PT]
                        regrid: 1 delta on X@SUM
             SUBSET   : 7 points (X)
 1.1 / 1:   ....
 2.1 / 2:   ....
 3.1 / 3:   ....
 4.1 / 4:  0.500
 5.1 / 5:  5.100
 6.1 / 6:  5.400
 7.1 / 7:   ....
list a2[gx=xoffset@var]
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 -DELETE A2       M:185 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 strip regrid on X: A2 --> (G###)           @VAR
 found   A2       M:182 dset:   0 I:      1      2  J: -999 -999  K: -999 -999  L:   -999   -999
 regrid  A2       M:185 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
             VARIABLE : Variance of X[GX=X2PT]
                        regrid: 1 delta on X@VAR
             SUBSET   : 7 points (X)
 1.1 / 1:     ....
 2.1 / 2:     ....
 3.1 / 3:     ....
 4.1 / 4:     ....
 5.1 / 5:  0.09000
 6.1 / 6:     ....
 7.1 / 7:     ....
 
! test 2D regrid
define axis/y=1.1:7.1:1 yoffset
define axis/y=5/npoints=1 y1pt
define axis/y=5:6:1 y2pt
 
let a1 = x[gx=x1pt]+y[gy=y1pt]
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 -DELETE A2       M:185 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE A2       M:182 dset:   0 I:      1      2  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X2PT      NORMAL    NORMAL    NORMAL
 -DELETE A1       M:183 dset:   0 I:      1      1  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X1PT      NORMAL    NORMAL    NORMAL
let a2 = x[gx=x2pt]+y[gy=y2pt]
 
list a1[gx=xoffset@ave, gy=yoffset@ave]
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A1       C:  7 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    Y1PT      NORMAL    NORMAL
 dealloc  dynamic grid (G###)          NORMAL    Y1PT      NORMAL    NORMAL
 allocate dynamic grid (G###)          X1PT      NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          X1PT      NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          X1PT      Y1PT      NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 dealloc  dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      1      7  J:    1    7  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 strip regrid on X: A1 --> (G###)           @AVE
 strip regrid on Y: A1 --> XNTERMED         @AVE
 eval    A1       C:  8 dset:   0 I:      1      1  J:    1    1  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          X1PT      NORMAL    NORMAL    NORMAL
 pseudo  X        M:183 dset:   0 I:      1      1  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          NORMAL    Y1PT      NORMAL    NORMAL
 pseudo  Y        M:182 dset:   0 I:   -999   -999  J:    1    1  K: -999 -999  L:   -999   -999
 -DELETE Y        M:182 dset:   0 I:   -999   -999  J:    1    1  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          NORMAL    Y1PT      NORMAL    NORMAL
 -DELETE X        M:183 dset:   0 I:      1      1  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X1PT      NORMAL    NORMAL    NORMAL
 regrid  A1       M:183 dset:   0 I:      1      1  J:    1    7  K: -999 -999  L:   -999   -999
 regrid  A1       M:182 dset:   0 I:      1      7  J:    1    7  K: -999 -999  L:   -999   -999
 -DELETE A1       M:183 dset:   0 I:      1      1  J:    1    7  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 dealloc  dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
             VARIABLE : X[GX=X1PT]+Y[GY=Y1PT]
                        regrid: 1 delta on X@AVE, 1 delta on Y@AVE
             SUBSET   : 7 by 7 points (X-Y)
             1.1    2.1    3.1    4.1    5.1    6.1    7.1  
             1      2      3      4      5      6      7
 1.1 / 1:   ....   ....   ....   ....   ....   ....   ....
 2.1 / 2:   ....   ....   ....   ....   ....   ....   ....
 3.1 / 3:   ....   ....   ....   ....   ....   ....   ....
 4.1 / 4:   ....   ....   ....  10.00  10.00   ....   ....
 5.1 / 5:   ....   ....   ....  10.00  10.00   ....   ....
 6.1 / 6:   ....   ....   ....   ....   ....   ....   ....
 7.1 / 7:   ....   ....   ....   ....   ....   ....   ....
list a1[gx=xoffset@sum, gy=yoffset@sum] ! should sum to 10
 dealloc  dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 -DELETE A1       M:182 dset:   0 I:      1      7  J:    1    7  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 dealloc  dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      1      7  J:    1    7  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 strip regrid on X: A1 --> (G###)           @SUM
 strip regrid on Y: A1 --> XNTERMED         @SUM
 found   A1       M:185 dset:   0 I:      1      1  J:    1    1  K: -999 -999  L:   -999   -999
 regrid  A1       M:182 dset:   0 I:      1      1  J:    1    7  K: -999 -999  L:   -999   -999
 regrid  A1       M:183 dset:   0 I:      1      7  J:    1    7  K: -999 -999  L:   -999   -999
 -DELETE A1       M:182 dset:   0 I:      1      1  J:    1    7  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 dealloc  dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
             VARIABLE : X[GX=X1PT]+Y[GY=Y1PT]
                        regrid: 1 delta on X@SUM, 1 delta on Y@SUM
             SUBSET   : 7 by 7 points (X-Y)
             1.1    2.1    3.1    4.1    5.1    6.1    7.1  
             1      2      3      4      5      6      7
 1.1 / 1:   ....   ....   ....   ....   ....   ....   ....
 2.1 / 2:   ....   ....   ....   ....   ....   ....   ....
 3.1 / 3:   ....   ....   ....   ....   ....   ....   ....
 4.1 / 4:   ....   ....   ....  0.100  0.900   ....   ....
 5.1 / 5:   ....   ....   ....  0.900  8.100   ....   ....
 6.1 / 6:   ....   ....   ....   ....   ....   ....   ....
 7.1 / 7:   ....   ....   ....   ....   ....   ....   ....
list a1[gx=xoffset@var, gy=yoffset@var] ! should be all missing
 dealloc  dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 -DELETE A1       M:183 dset:   0 I:      1      7  J:    1    7  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 dealloc  dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      1      7  J:    1    7  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 strip regrid on X: A1 --> (G###)           @VAR
 strip regrid on Y: A1 --> XNTERMED         @VAR
 found   A1       M:185 dset:   0 I:      1      1  J:    1    1  K: -999 -999  L:   -999   -999
 regrid  A1       M:183 dset:   0 I:      1      1  J:    1    7  K: -999 -999  L:   -999   -999
 regrid  A1       M:182 dset:   0 I:      1      7  J:    1    7  K: -999 -999  L:   -999   -999
 -DELETE A1       M:183 dset:   0 I:      1      1  J:    1    7  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 dealloc  dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
             VARIABLE : Variance of X[GX=X1PT]+Y[GY=Y1PT]
                        regrid: 1 delta on X@VAR, 1 delta on Y@VAR
             SUBSET   : 7 by 7 points (X-Y)
           1.1 2.1 3.1 4.1 5.1 6.1 7.1 
            1   2   3   4   5   6   7
 1.1 / 1:............................
 2.1 / 2:............................
 3.1 / 3:............................
 4.1 / 4:............................
 5.1 / 5:............................
 6.1 / 6:............................
 7.1 / 7:............................
 
list a2[gx=xoffset@ave, gy=yoffset@ave]
 dealloc  dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 -DELETE A1       M:182 dset:   0 I:      1      7  J:    1    7  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A2       C:  7 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    Y2PT      NORMAL    NORMAL
 dealloc  dynamic grid (G###)          NORMAL    Y2PT      NORMAL    NORMAL
 allocate dynamic grid (G###)          X2PT      NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          X2PT      NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          X2PT      Y2PT      NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 dealloc  dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      1      7  J:    1    7  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 strip regrid on X: A2 --> (G###)           @AVE
 strip regrid on Y: A2 --> XNTERMED         @AVE
 eval    A2       C:  8 dset:   0 I:      1      2  J:    1    2  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          X2PT      NORMAL    NORMAL    NORMAL
 pseudo  X        M:182 dset:   0 I:      1      2  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          NORMAL    Y2PT      NORMAL    NORMAL
 pseudo  Y        M:183 dset:   0 I:   -999   -999  J:    1    2  K: -999 -999  L:   -999   -999
 -DELETE Y        M:183 dset:   0 I:   -999   -999  J:    1    2  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          NORMAL    Y2PT      NORMAL    NORMAL
 -DELETE X        M:182 dset:   0 I:      1      2  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X2PT      NORMAL    NORMAL    NORMAL
 regrid  A2       M:182 dset:   0 I:      1      2  J:    1    7  K: -999 -999  L:   -999   -999
 regrid  A2       M:183 dset:   0 I:      1      7  J:    1    7  K: -999 -999  L:   -999   -999
 -DELETE A2       M:182 dset:   0 I:      1      2  J:    1    7  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 dealloc  dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
             VARIABLE : X[GX=X2PT]+Y[GY=Y2PT]
                        regrid: 1 delta on X@AVE, 1 delta on Y@AVE
             SUBSET   : 7 by 7 points (X-Y)
             1.1    2.1    3.1    4.1    5.1    6.1    7.1  
             1      2      3      4      5      6      7
 1.1 / 1:   ....   ....   ....   ....   ....   ....   ....
 2.1 / 2:   ....   ....   ....   ....   ....   ....   ....
 3.1 / 3:   ....   ....   ....   ....   ....   ....   ....
 4.1 / 4:   ....   ....   ....  10.00  10.10  11.00   ....
 5.1 / 5:   ....   ....   ....  10.10  10.20  11.10   ....
 6.1 / 6:   ....   ....   ....  11.00  11.10  12.00   ....
 7.1 / 7:   ....   ....   ....   ....   ....   ....   ....
list a2[gx=xoffset@sum, gy=yoffset@sum] ! should sum to 10+11+11+12=44
 dealloc  dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 -DELETE A2       M:183 dset:   0 I:      1      7  J:    1    7  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 dealloc  dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      1      7  J:    1    7  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 strip regrid on X: A2 --> (G###)           @SUM
 strip regrid on Y: A2 --> XNTERMED         @SUM
 found   A2       M:184 dset:   0 I:      1      2  J:    1    2  K: -999 -999  L:   -999   -999
 regrid  A2       M:183 dset:   0 I:      1      2  J:    1    7  K: -999 -999  L:   -999   -999
 regrid  A2       M:182 dset:   0 I:      1      7  J:    1    7  K: -999 -999  L:   -999   -999
 -DELETE A2       M:183 dset:   0 I:      1      2  J:    1    7  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 dealloc  dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
             VARIABLE : X[GX=X2PT]+Y[GY=Y2PT]
                        regrid: 1 delta on X@SUM, 1 delta on Y@SUM
             SUBSET   : 7 by 7 points (X-Y)
             1.1    2.1    3.1    4.1    5.1    6.1    7.1  
             1      2      3      4      5      6      7
 1.1 / 1:   ....   ....   ....   ....   ....   ....   ....
 2.1 / 2:   ....   ....   ....   ....   ....   ....   ....
 3.1 / 3:   ....   ....   ....   ....   ....   ....   ....
 4.1 / 4:   ....   ....   ....   0.10   1.01   0.99   ....
 5.1 / 5:   ....   ....   ....   1.01  10.20   9.99   ....
 6.1 / 6:   ....   ....   ....   0.99   9.99   9.72   ....
 7.1 / 7:   ....   ....   ....   ....   ....   ....   ....
 ! NOTE: as of V5.1 NO xy_var trans exists.  Need it to be complete ...!
list a2[gx=xoffset@var, gy=yoffset@var]
 dealloc  dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 -DELETE A2       M:182 dset:   0 I:      1      7  J:    1    7  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 dealloc  dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      1      7  J:    1    7  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 strip regrid on X: A2 --> (G###)           @VAR
 strip regrid on Y: A2 --> XNTERMED         @VAR
 found   A2       M:184 dset:   0 I:      1      2  J:    1    2  K: -999 -999  L:   -999   -999
 regrid  A2       M:182 dset:   0 I:      1      2  J:    1    7  K: -999 -999  L:   -999   -999
 regrid  A2       M:183 dset:   0 I:      1      7  J:    1    7  K: -999 -999  L:   -999   -999
 -DELETE A2       M:182 dset:   0 I:      1      2  J:    1    7  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 dealloc  dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
             VARIABLE : Variance of X[GX=X2PT]+Y[GY=Y2PT]
                        regrid: 1 delta on X@VAR, 1 delta on Y@VAR
             SUBSET   : 7 by 7 points (X-Y)
             1.1     2.1     3.1     4.1     5.1     6.1     7.1   
              1       2       3       4       5       6       7
 1.1 / 1:    ....    ....    ....    ....    ....    ....    ....
 2.1 / 2:    ....    ....    ....    ....    ....    ....    ....
 3.1 / 3:    ....    ....    ....    ....    ....    ....    ....
 4.1 / 4:    ....    ....    ....    ....    ....    ....    ....
 5.1 / 5:    ....    ....    ....    ....  0.0000    ....    ....
 6.1 / 6:    ....    ....    ....    ....    ....    ....    ....
 7.1 / 7:    ....    ....    ....    ....    ....    ....    ....
 
! 1/00 additions to check details of @MIN,@MAX bevavior
define axis/x=1.1:7.1:1 xoffset
define axis/x=5/npoints=1 x1pt
define axis/x=5:6:1 x2pt
define axis/x=5:6.5:.5 x4pt
 
let a1 = x[gx=x1pt]
 dealloc  dynamic grid (G###)          XOFFSET   YOFFSET   NORMAL    NORMAL
 -DELETE A2       M:183 dset:   0 I:      1      7  J:    1    7  K: -999 -999  L:   -999   -999
 -DELETE A2       M:184 dset:   0 I:      1      2  J:    1    2  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X2PT      Y2PT      NORMAL    NORMAL
 -DELETE A1       M:185 dset:   0 I:      1      1  J:    1    1  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X1PT      Y1PT      NORMAL    NORMAL
let a2 = x[gx=x2pt]
let a4 = x[gx=x4pt]
 
list a1[gx=xoffset@max]
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A1       C:  7 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          X1PT      NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          X1PT      NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          X1PT      NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 strip regrid on X: A1 --> (G###)           @MAX
 eval    A1       C:  7 dset:   0 I:      1      1  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          X1PT      NORMAL    NORMAL    NORMAL
 pseudo  X        M:185 dset:   0 I:      1      1  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X1PT      NORMAL    NORMAL    NORMAL
 regrid  A1       M:183 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
             VARIABLE : X[GX=X1PT]
                        regrid: 1 delta on X@MAX
             SUBSET   : 7 points (X)
 1.1 / 1:   ....
 2.1 / 2:   ....
 3.1 / 3:   ....
 4.1 / 4:   ....
 5.1 / 5:  5.000
 6.1 / 6:   ....
 7.1 / 7:   ....
list a2[gx=xoffset@max]
 -DELETE X        M:185 dset:   0 I:      1      1  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 -DELETE A1       M:183 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A2       C:  7 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          X2PT      NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          X2PT      NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          X2PT      NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 strip regrid on X: A2 --> (G###)           @MAX
 eval    A2       C:  7 dset:   0 I:      1      2  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          X2PT      NORMAL    NORMAL    NORMAL
 pseudo  X        M:183 dset:   0 I:      1      2  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X2PT      NORMAL    NORMAL    NORMAL
 regrid  A2       M:182 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
             VARIABLE : X[GX=X2PT]
                        regrid: 1 delta on X@MAX
             SUBSET   : 7 points (X)
 1.1 / 1:   ....
 2.1 / 2:   ....
 3.1 / 3:   ....
 4.1 / 4:   ....
 5.1 / 5:  5.000
 6.1 / 6:  6.000
 7.1 / 7:   ....
list a4[gx=xoffset@max]
 -DELETE X        M:183 dset:   0 I:      1      2  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 -DELETE A2       M:182 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A4       C:  7 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          X4PT      NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          X4PT      NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          X4PT      NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 strip regrid on X: A4 --> (G###)           @MAX
 eval    A4       C:  7 dset:   0 I:      1      4  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          X4PT      NORMAL    NORMAL    NORMAL
 pseudo  X        M:182 dset:   0 I:      1      4  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X4PT      NORMAL    NORMAL    NORMAL
 regrid  A4       M:186 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
             VARIABLE : X[GX=X4PT]
                        regrid: 1 delta on X@MAX
             SUBSET   : 7 points (X)
 1.1 / 1:   ....
 2.1 / 2:   ....
 3.1 / 3:   ....
 4.1 / 4:   ....
 5.1 / 5:  5.500
 6.1 / 6:  6.500
 7.1 / 7:   ....
list a4[gx=xoffset@min]
 -DELETE X        M:182 dset:   0 I:      1      4  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 -DELETE A4       M:186 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 strip regrid on X: A4 --> (G###)           @MIN
 found   A4       M:183 dset:   0 I:      1      4  J: -999 -999  K: -999 -999  L:   -999   -999
 regrid  A4       M:186 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
             VARIABLE : X[GX=X4PT]
                        regrid: 1 delta on X@MIN
             SUBSET   : 7 points (X)
 1.1 / 1:   ....
 2.1 / 2:   ....
 3.1 / 3:   ....
 4.1 / 4:   ....
 5.1 / 5:  5.000
 6.1 / 6:  6.000
 7.1 / 7:   ....
list a4[gx=xoffset@sum] ! 5+5.5+6+6.5=23
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 -DELETE A4       M:186 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 strip regrid on X: A4 --> (G###)           @SUM
 found   A4       M:183 dset:   0 I:      1      4  J: -999 -999  K: -999 -999  L:   -999   -999
 regrid  A4       M:186 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
             VARIABLE : X[GX=X4PT]
                        regrid: 1 delta on X@SUM
             SUBSET   : 7 points (X)
 1.1 / 1:   ....
 2.1 / 2:   ....
 3.1 / 3:   ....
 4.1 / 4:   ....
 5.1 / 5:   8.85
 6.1 / 6:  12.20
 7.1 / 7:   1.95
 
! round-off issues when source points lie on destination cell boundaries
define axis/x=1:5:1 x5
define axis/x=0.5:5.5:1 x5_edges
let a5 = x[gx=x5_edges]
list a5[gx=x5@max]   ! note: top dest axis point, only, looks at point above
 dealloc  dynamic grid (G###)          XOFFSET   NORMAL    NORMAL    NORMAL
 -DELETE A4       M:186 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A5       C:  7 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          X5_EDGES  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          X5_EDGES  NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          X5_EDGES  NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 strip regrid on X: A5 --> (G###)           @MAX
 eval    A5       C:  7 dset:   0 I:      1      6  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          X5_EDGES  NORMAL    NORMAL    NORMAL
 pseudo  X        M:186 dset:   0 I:      1      6  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X5_EDGES  NORMAL    NORMAL    NORMAL
 regrid  A5       M:187 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
             VARIABLE : X[GX=X5_EDGES]
                        regrid: 1 delta on X@MAX
             SUBSET   : 5 points (X)
 1   / 1:  0.500
 2   / 2:  1.500
 3   / 3:  2.500
 4   / 4:  3.500
 5   / 5:  5.500
let a5 = x[gx=x5_edges, i=3]
 dealloc  dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 -DELETE A5       M:187 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE A5       M:182 dset:   0 I:      1      6  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X5_EDGES  NORMAL    NORMAL    NORMAL
 -DELETE X        M:186 dset:   0 I:      1      6  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE A4       M:183 dset:   0 I:      1      4  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X4PT      NORMAL    NORMAL    NORMAL
 -DELETE A2       M:185 dset:   0 I:      1      2  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X2PT      NORMAL    NORMAL    NORMAL
 -DELETE A1       M:184 dset:   0 I:      1      1  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X1PT      NORMAL    NORMAL    NORMAL
list a5[gx=x5@max]
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A5       C:  7 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          X5_EDGES  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          X5_EDGES  NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          X5_EDGES  NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 strip regrid on X: A5 --> (G###)           @MAX
 eval    A5       C:  7 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          X5_EDGES  NORMAL    NORMAL    NORMAL
 pseudo  X        M:184 dset:   0 I:      3      3  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X5_EDGES  NORMAL    NORMAL    NORMAL
 regrid  A5       M:183 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
             VARIABLE : X[GX=X5_EDGES, I=3]
                        regrid: 1 delta on X@MAX
             SUBSET   : 5 points (X)
 1   / 1:   ....
 2   / 2:   ....
 3   / 3:  2.500
 4   / 4:   ....
 5   / 5:   ....
list a5[gx=x5@max,i=3]
 -DELETE X        M:184 dset:   0 I:      3      3  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 -DELETE A5       M:183 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 strip regrid on X: A5 --> (G###)           @MAX
 found   A5       M:185 dset:   0 I:      3      3  J: -999 -999  K: -999 -999  L:   -999   -999
 regrid  A5       M:183 dset:   0 I:      3      3  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
             VARIABLE : X[GX=X5_EDGES, I=3]
                        regrid: 1 delta on X@MAX
             X        : 3
          2.500
list a5[gx=x5@max,i=4]
 dealloc  dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 -DELETE A5       M:183 dset:   0 I:      3      3  J: -999 -999  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 strip regrid on X: A5 --> (G###)           @MAX
 found   A5       M:185 dset:   0 I:      3      3  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
             VARIABLE : X[GX=X5_EDGES, I=3]
                        regrid: 1 delta on X@MAX
             X        : 4
        ....
 
! time axes with different encodings
define axis/t=1-jan-1990:5-jan-1990:1/units=days tday
define axis/t=1-jan-1990:5-jan-1990:24/units=hours thour
let atime = T[gt=tday]
list atime
 dealloc  dynamic grid (G###)          X5        NORMAL    NORMAL    NORMAL
 -DELETE A5       M:183 dset:   0 I:      4      4  J: -999 -999  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid ATIME    C:  7 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TDAY
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TDAY
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TDAY
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TDAY
 eval    EX#1     C:  4 dset:   2 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      5
 eval    ATIME    C:  6 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      5
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TDAY
 pseudo  T        M:183 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      5
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TDAY
             VARIABLE : T[GT=TDAY]
             SUBSET   : 5 points (TIME)
 01-JAN-1990 00 / 1:  32493.
 02-JAN-1990 00 / 2:  32494.
 03-JAN-1990 00 / 3:  32495.
 04-JAN-1990 00 / 4:  32496.
 05-JAN-1990 00 / 5:  32497.
show grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TDAY      TIME                 5 r   01-JAN-1990 00:00    05-JAN-1990 00:00   full
list atime[gt=thour@max]
 -DELETE T        M:183 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      5
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TDAY
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    THOUR
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    THOUR
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    THOUR
 eval    EX#1     C:  4 dset:   2 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      5
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    THOUR
 strip regrid on T: ATIME --> (G###)           @MAX
 found   ATIME    M:184 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      5
 regrid  ATIME    M:183 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      5
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    THOUR
             VARIABLE : T[GT=TDAY]
                        regrid: 24 hour on T@MAX
             SUBSET   : 5 points (TIME)
 01-JAN-1990 00 / 1:  32493.
 02-JAN-1990 00 / 2:  32494.
 03-JAN-1990 00 / 3:  32495.
 04-JAN-1990 00 / 4:  32496.
 05-JAN-1990 00 / 5:  32497.
show grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 THOUR     TIME                 5 r   01-JAN-1990 00:00    05-JAN-1990 00:00   full
 
set mode/last diag
 
 
 
 
 
*** Running ferret script: bn_axis_limits.jnl
!bn301_axis_limits.jnl
! exercise the new-V301 /XLIMITS and /YLIMITS qualifiers
 
define axis/x=20e:10w:10/unit=degree xax
define axis/y=60s:60n/unit=degree/npoints=41 yax
define axis/z=0:1000:40/unit=meter/depth zax
define axis/t=1-jan-1960:15-dec-1999:5/unit=days tax
define grid/x=xax/y=yax/z=zax/t=tax gformat
 
set wind/asp=1:ax/size=1 1
 
define view/x=0.00,0.25/y=0.00,0.25 v11
define view/x=0.25,0.50/y=0.00,0.25 v12
define view/x=0.50,0.75/y=0.00,0.25 v13
define view/x=0.75,1.00/y=0.00,0.25 v14
define view/x=0.00,0.25/y=0.25,0.50 v21
define view/x=0.25,0.50/y=0.25,0.50 v22
define view/x=0.50,0.75/y=0.25,0.50 v23
define view/x=0.75,1.00/y=0.25,0.50 v24
define view/x=0.00,0.25/y=0.50,0.75 v31
define view/x=0.25,0.50/y=0.50,0.75 v32
define view/x=0.50,0.75/y=0.50,0.75 v33
define view/x=0.75,1.00/y=0.50,0.75 v34
define view/x=0.00,0.25/y=0.75,1.00 v41
define view/x=0.25,0.50/y=0.75,1.00 v42
define view/x=0.50,0.75/y=0.75,1.00 v43
define view/x=0.75,1.00/y=0.75,1.00 v44
 
* error checks
set grid abstract
set region/i=1:5
set mode ignore_errors
plot/xlimits i
plot/xlimits= i
plot/xlimits=text i
plot/xlimits=1 i
plot/xlimits=1: i
plot/xlimits=1:: i
plot/xlimits=1:2: i
plot/xlimits=5:5 i
set mode/last ignore_errors
 
GO bn_axis_limits.sub1   ! lines
!bn301_axis_limits.sub1
! exercise the new-V301 /XLIMITS and /YLIMITS qualifiers
! this file to exercise the PLOT command
 
set window/clear
 
* abstract X line plots
set grid abstract
set view v11
plot/x=1:100 sin(x/6)
set view v12
plot/x=1:100/xlimits=-100:200 sin(x/6)
set view v13
plot/x=1:100/xlimits=-100:200:-30/ylimits=-2:2:-0.2 sin(x/6)
set view v14
plot/x=1:100/xlimits=-100:200:-30/ylimits=-2:2:-0.2/trans sin(x/6)
 
* formatted Y line plots
set grid gformat
set view v21
plot/y=30s:30n/xlimits=50s:40n:-8 sin(y/10)
set view v22
plot/y=30s:30n/xlimits=50s:40n:-8/ylimits=0:2:-0.2 sin(y/10)
 
* plot/vs
set view v23
set grid abstract
plot/vs/x=1:100/y=101:200/xlim=1:-1:.1/ylim=-3:0:.5 sin(x/5),cos(y/9)
set view v24
set grid gformat
plot/vs/t=1-jan-1980:1-jan-1990/xlim=1:-1:-.1/ylim=-3:3:-.5 sin(t/100),cos(t/300)
 
* formatted T line plots
set grid gformat
set mode calendar
set view v31
plot/t=1-jan-1980:1-jan-1990 sin(t/500)
set view v32
plot/t=1-jan-1980:1-jan-1990/xlimits=1-mar-1977:15-jun-1994 sin(t/500)
set view v33
plot/t=1-jan-1980:1-jan-1990/xlimits=1-mar-1977:15-jun-1994:-5 sin(t/500)
set view v34
plot/t=1-jan-1980:1-jan-1990/xlimits=1-mar-1977:15-jun-1994:-5/ylimits=-2:0:-0.2 sin(t/500)
 
* unformatted T line plots
set grid gformat
cancel mode calendar
set view v41
plot/t=1-jan-1980:1-jan-1990/xlimits=1-mar-1977:15-jun-1994 sin(t/500)
set view v42
plot/t=1-jan-1980:1-jan-1990/xlimits=29400:31800/ylimits=-2:0:-0.2 sin(t/500)
set view v43
plot/t=1-jan-1980:1-jan-1990/xlimits=29400:31800:-200/ylimits=-2:0:-0.2 sin(t/500)
set view v44
plot/t=1-jan-1980:1-jan-1990/xlimits=29400:31800:-200/ylimits=-2:0:-0.2/trans sin(t/500)
GO bn_axis_limits.sub2   ! 2D graphics
! bn301_axis_limits.sub2
! exercise the new-V301 /XLIMITS and /YLIMITS qualifiers
! this file to exercise 2D graphics
 
set window/clear
 
* abstract XY contours
set grid abstract
set view v11
contour/x=1:100/y=101:200/lev=(-1,1,.5) sin(x/6)*cos(y/9)
set view v12
contour/x=1:100/y=101:200/lev=(-1,1,.5)/xlimits=-100:200 sin(x/6)*cos(y/9)
set view v13
contour/x=1:100/y=101:200/lev=(-1,1,.5)/xlimits=-100:200:-30/ylimits=250:150 sin(x/6)*cos(y/9)
set view v14
contour/x=1:100/y=101:200/lev=(-1,1,.5)/xlimits=-100:200:-30/ylimits=250:150/trans sin(x/6)*cos(y/9)
 
* formatted XY contours
set grid gformat
set view v21
contour/x=160E:160W/y=15s:25n/lev=(-1,1,.5) sin(x/3)*ABS(Y)^1.5
set view v22
contour/x=160E:160W/y=15s:25n/lev=(-1,1,.5)/xlimits=140e:110W:10 sin(x/3)*ABS(Y)^1.5
set view v23
contour/x=160E:160W/y=15s:25n/lev=(-1,1,.5)/xlimits=140e:110w:-9/ylimits=0:30N sin(x/3)*ABS(Y)^1.5
set view v24
contour/x=160E:160W/y=15s:25n/lev=(-1,1,.5)/xlimits=140e:110w:-9/ylimits=0:30N/trans sin(x/3)*ABS(Y)^1.5
 
* calendar axis contours involving T
set grid gformat
set mode calendar
set view v31
contour/x=160E:160W/t=1-jan-1980:1-jan-1982/lev=(-1,1,.25)/xlimits=140e:110w:-9/ylimits=1-jan-1978:1-jan-1984 sin(x/3)*sin(t/100)
set view v32
contour/x=160E:160W/t=1-jan-1980:1-jan-1982/lev=(-1,1,.25)/xlimits=140e:110w:-9/ylimits=28110:29115 sin(x/3)*sin(t/100)
set view v33
contour/x=160E:160W/t=1-jan-1980:1-jan-1982/lev=(-1,1,.25)/xlimits=140e:110w:-9/ylimits=28110:29115:-200 sin(x/3)*sin(t/100)   ! delta ignored
set view v34
contour/x=160E:160W/t=1-jan-1980:1-jan-1982/lev=(-1,1,.25)/xlimits=140e:110w:-9/ylimits=1-jan-1978:1-jan-1984/trans sin(x/3)*sin(t/100)
 
* non-calendar axis contours involving T
set grid gformat
cancel mode calendar
set view v41
contour/x=160E:160W/t=1-jan-1980:1-jan-1982/lev=(-1,1,.25)/xlimits=140e:110w:-9/ylimits=1-jan-1978:1-jan-1984 sin(x/3)*sin(t/100)
set view v42
contour/x=160E:160W/t=1-jan-1980:1-jan-1982/lev=(-1,1,.25)/xlimits=140e:110w:-9/ylimits=28110:29115 sin(x/3)*sin(t/100)
set view v43  ! intentionally blank
contour/x=160E:160W/t=28000:29000/lev=(-1,1,.25)/xlimits=140e:110w:-9/ylimits=1-jan-1975:1-jan-1978 sin(x/3)*sin(t/100)
set view v44
contour/x=160E:160W/t=1-jan-1980:1-jan-1982/lev=(-1,1,.25)/xlimits=140e:110w:-9/ylimits=28000:29000:-400/trans sin(x/3)*sin(t/100)
 
*** Running ferret script: bn_movie.jnl
! bn301_movie.JNL
! - test on-HDF movie creation by Program FERRET
! - FERRET ver 3.10 10/93
 
! ===> NOTE:  This may fail with an X error if the movie window is iconified
 
! Dont run this script - fails with hdf5 libraries
exit/script
*** Running ferret script: bn_ez_order.jnl
! bn420_ez_order
! updated from bn311_ez_order 9/95 - improved testing of /FORMAT=STREAM
 
! create test files
sp rm -f test_perm*.dat
list/i=1:10/nohead/form=(f4.0)/file=test_perm10.dat i
list/i=1:24/nohead/form=(f4.0)/file=test_perm24.dat i
list/i=1:48/nohead/form=(f4.0)/file=test_perm48.dat i
list/i=1:48/nohead/form=(10f8.0)/file=test_perm48_10.dat i*1000,i*500,i*200,i*100,i*50,i*20,i*10,i*5,i*2,i
 
! create test axes
define axis/x=1:2:1 x2
define axis/x=1:3:1 x3
define axis/x=1:4:1 x4
define grid/x=x2/y=x3 g6
define grid/y=x2/t=x3 g6yt
define grid/x=x2/y=x3/z=x2 g12
define grid/x=x2/y=x3/z=x2/t=x2 g24
 
! basic permutations, single variable
! *** 2D
file/grid=g6 test_perm48.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 points (X-Y)
             1      2    
             1      2
 1   / 1:  1.000  2.000
 2   / 2:  3.000  4.000
 3   / 3:  5.000  6.000
file/grid=g6/order=yx test_perm48.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 points (X-Y)
             1      2    
             1      2
 1   / 1:  1.000  4.000
 2   / 2:  2.000  5.000
 3   / 3:  3.000  6.000
file/grid=g6yt test_perm48.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 points (Y-T)
             1      2    
             1      2
 1   / 1:  1.000  2.000
 2   / 2:  3.000  4.000
 3   / 3:  5.000  6.000
file/grid=g6yt/order=ty test_perm48.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 points (Y-T)
             1      2    
             1      2
 1   / 1:  1.000  4.000
 2   / 2:  2.000  5.000
 3   / 3:  3.000  6.000
file/grid=g6yt/order=xtyz test_perm48.dat
list v1  ! should be just the same as the last
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 points (Y-T)
             1      2    
             1      2
 1   / 1:  1.000  4.000
 2   / 2:  2.000  5.000
 3   / 3:  3.000  6.000
 
! *** 3D
file/grid=g12 test_perm48.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             1      2    
             1      2
 ---- K:1 Z:   1
 1   / 1:   1.00   2.00
 2   / 2:   3.00   4.00
 3   / 3:   5.00   6.00
 ---- K:2 Z:   2
 1   / 1:   7.00   8.00
 2   / 2:   9.00  10.00
 3   / 3:  11.00  12.00
file/grid=g12/order=xzy test_perm48.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             1      2    
             1      2
 ---- K:1 Z:   1
 1   / 1:   1.00   2.00
 2   / 2:   5.00   6.00
 3   / 3:   9.00  10.00
 ---- K:2 Z:   2
 1   / 1:   3.00   4.00
 2   / 2:   7.00   8.00
 3   / 3:  11.00  12.00
file/grid=g12/order=yxz test_perm48.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             1      2    
             1      2
 ---- K:1 Z:   1
 1   / 1:   1.00   4.00
 2   / 2:   2.00   5.00
 3   / 3:   3.00   6.00
 ---- K:2 Z:   2
 1   / 1:   7.00  10.00
 2   / 2:   8.00  11.00
 3   / 3:   9.00  12.00
file/grid=g12/order=yzx test_perm48.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             1      2    
             1      2
 ---- K:1 Z:   1
 1   / 1:   1.00   7.00
 2   / 2:   2.00   8.00
 3   / 3:   3.00   9.00
 ---- K:2 Z:   2
 1   / 1:   4.00  10.00
 2   / 2:   5.00  11.00
 3   / 3:   6.00  12.00
file/grid=g12/order=zxy test_perm48.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             1      2    
             1      2
 ---- K:1 Z:   1
 1   / 1:   1.00   3.00
 2   / 2:   5.00   7.00
 3   / 3:   9.00  11.00
 ---- K:2 Z:   2
 1   / 1:   2.00   4.00
 2   / 2:   6.00   8.00
 3   / 3:  10.00  12.00
file/grid=g12/order=zyx test_perm48.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             1      2    
             1      2
 ---- K:1 Z:   1
 1   / 1:   1.00   7.00
 2   / 2:   3.00   9.00
 3   / 3:   5.00  11.00
 ---- K:2 Z:   2
 1   / 1:   2.00   8.00
 2   / 2:   4.00  10.00
 3   / 3:   6.00  12.00
 
 
! *** 4D  (incomplete - 24 in all)
file/grid=g24 test_perm48.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   1.00   2.00
 2   / 2:   3.00   4.00
 3   / 3:   5.00   6.00
 ---- K:2 Z:   2
 1   / 1:   7.00   8.00
 2   / 2:   9.00  10.00
 3   / 3:  11.00  12.00
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:  13.00  14.00
 2   / 2:  15.00  16.00
 3   / 3:  17.00  18.00
 ---- K:2 Z:   2
 1   / 1:  19.00  20.00
 2   / 2:  21.00  22.00
 3   / 3:  23.00  24.00
file/grid=g24/order=xytz test_perm48.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   1.00   2.00
 2   / 2:   3.00   4.00
 3   / 3:   5.00   6.00
 ---- K:2 Z:   2
 1   / 1:  13.00  14.00
 2   / 2:  15.00  16.00
 3   / 3:  17.00  18.00
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:   7.00   8.00
 2   / 2:   9.00  10.00
 3   / 3:  11.00  12.00
 ---- K:2 Z:   2
 1   / 1:  19.00  20.00
 2   / 2:  21.00  22.00
 3   / 3:  23.00  24.00
file/grid=g24/order=xzyt test_perm48.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   1.00   2.00
 2   / 2:   5.00   6.00
 3   / 3:   9.00  10.00
 ---- K:2 Z:   2
 1   / 1:   3.00   4.00
 2   / 2:   7.00   8.00
 3   / 3:  11.00  12.00
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:  13.00  14.00
 2   / 2:  17.00  18.00
 3   / 3:  21.00  22.00
 ---- K:2 Z:   2
 1   / 1:  15.00  16.00
 2   / 2:  19.00  20.00
 3   / 3:  23.00  24.00
file/grid=g24/order=xtyz test_perm48.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   1.00   2.00
 2   / 2:   5.00   6.00
 3   / 3:   9.00  10.00
 ---- K:2 Z:   2
 1   / 1:  13.00  14.00
 2   / 2:  17.00  18.00
 3   / 3:  21.00  22.00
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:   3.00   4.00
 2   / 2:   7.00   8.00
 3   / 3:  11.00  12.00
 ---- K:2 Z:   2
 1   / 1:  15.00  16.00
 2   / 2:  19.00  20.00
 3   / 3:  23.00  24.00
file/grid=g24/order=xtzy test_perm48.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   1.00   2.00
 2   / 2:   9.00  10.00
 3   / 3:  17.00  18.00
 ---- K:2 Z:   2
 1   / 1:   5.00   6.00
 2   / 2:  13.00  14.00
 3   / 3:  21.00  22.00
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:   3.00   4.00
 2   / 2:  11.00  12.00
 3   / 3:  19.00  20.00
 ---- K:2 Z:   2
 1   / 1:   7.00   8.00
 2   / 2:  15.00  16.00
 3   / 3:  23.00  24.00
file/grid=g24/order=ytzx test_perm48.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   1.00  13.00
 2   / 2:   2.00  14.00
 3   / 3:   3.00  15.00
 ---- K:2 Z:   2
 1   / 1:   7.00  19.00
 2   / 2:   8.00  20.00
 3   / 3:   9.00  21.00
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:   4.00  16.00
 2   / 2:   5.00  17.00
 3   / 3:   6.00  18.00
 ---- K:2 Z:   2
 1   / 1:  10.00  22.00
 2   / 2:  11.00  23.00
 3   / 3:  12.00  24.00
file/grid=g24/order=zytx test_perm48.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   1.00  13.00
 2   / 2:   3.00  15.00
 3   / 3:   5.00  17.00
 ---- K:2 Z:   2
 1   / 1:   2.00  14.00
 2   / 2:   4.00  16.00
 3   / 3:   6.00  18.00
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:   7.00  19.00
 2   / 2:   9.00  21.00
 3   / 3:  11.00  23.00
 ---- K:2 Z:   2
 1   / 1:   8.00  20.00
 2   / 2:  10.00  22.00
 3   / 3:  12.00  24.00
file/grid=g24/order=tyzx test_perm48.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   1.00  13.00
 2   / 2:   3.00  15.00
 3   / 3:   5.00  17.00
 ---- K:2 Z:   2
 1   / 1:   7.00  19.00
 2   / 2:   9.00  21.00
 3   / 3:  11.00  23.00
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:   2.00  14.00
 2   / 2:   4.00  16.00
 3   / 3:   6.00  18.00
 ---- K:2 Z:   2
 1   / 1:   8.00  20.00
 2   / 2:  10.00  22.00
 3   / 3:  12.00  24.00
file/grid=g24/order=tzyx test_perm48.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm48.dat
             SUBSET   : 2 by 3 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   1.00  13.00
 2   / 2:   5.00  17.00
 3   / 3:   9.00  21.00
 ---- K:2 Z:   2
 1   / 1:   3.00  15.00
 2   / 2:   7.00  19.00
 3   / 3:  11.00  23.00
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:   2.00  14.00
 2   / 2:   6.00  18.00
 3   / 3:  10.00  22.00
 ---- K:2 Z:   2
 1   / 1:   4.00  16.00
 2   / 2:   8.00  20.00
 3   / 3:  12.00  24.00
 
 
! basic permutations, 10 variables
! *** 2D
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g6 test_perm48_10.dat
list v10
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 points (X-Y)
             1      2    
             1      2
 1   / 1:  1.000  2.000
 2   / 2:  3.000  4.000
 3   / 3:  5.000  6.000
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g6/order=yx test_perm48_10.dat
list v10
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 points (X-Y)
             1      2    
             1      2
 1   / 1:  1.000  4.000
 2   / 2:  2.000  5.000
 3   / 3:  3.000  6.000
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g6yt test_perm48_10.dat
list v10
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 points (Y-T)
             1      2    
             1      2
 1   / 1:  1.000  2.000
 2   / 2:  3.000  4.000
 3   / 3:  5.000  6.000
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g6yt/order=ty test_perm48_10.dat
list v10
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 points (Y-T)
             1      2    
             1      2
 1   / 1:  1.000  4.000
 2   / 2:  2.000  5.000
 3   / 3:  3.000  6.000
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g6yt/order=xtyz test_perm48_10.dat
list v10 ! should be just the same as the last
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 points (Y-T)
             1      2    
             1      2
 1   / 1:  1.000  4.000
 2   / 2:  2.000  5.000
 3   / 3:  3.000  6.000
 
! *** 3D
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g12 test_perm48_10.dat
list v10
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             1      2    
             1      2
 ---- K:1 Z:   1
 1   / 1:   1.00   2.00
 2   / 2:   3.00   4.00
 3   / 3:   5.00   6.00
 ---- K:2 Z:   2
 1   / 1:   7.00   8.00
 2   / 2:   9.00  10.00
 3   / 3:  11.00  12.00
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g12/order=xzy test_perm48_10.dat
list v10
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             1      2    
             1      2
 ---- K:1 Z:   1
 1   / 1:   1.00   2.00
 2   / 2:   5.00   6.00
 3   / 3:   9.00  10.00
 ---- K:2 Z:   2
 1   / 1:   3.00   4.00
 2   / 2:   7.00   8.00
 3   / 3:  11.00  12.00
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g12/order=yxz test_perm48_10.dat
list v10
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             1      2    
             1      2
 ---- K:1 Z:   1
 1   / 1:   1.00   4.00
 2   / 2:   2.00   5.00
 3   / 3:   3.00   6.00
 ---- K:2 Z:   2
 1   / 1:   7.00  10.00
 2   / 2:   8.00  11.00
 3   / 3:   9.00  12.00
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g12/order=yzx test_perm48_10.dat
list v10
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             1      2    
             1      2
 ---- K:1 Z:   1
 1   / 1:   1.00   7.00
 2   / 2:   2.00   8.00
 3   / 3:   3.00   9.00
 ---- K:2 Z:   2
 1   / 1:   4.00  10.00
 2   / 2:   5.00  11.00
 3   / 3:   6.00  12.00
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g12/order=zxy test_perm48_10.dat
list v10
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             1      2    
             1      2
 ---- K:1 Z:   1
 1   / 1:   1.00   3.00
 2   / 2:   5.00   7.00
 3   / 3:   9.00  11.00
 ---- K:2 Z:   2
 1   / 1:   2.00   4.00
 2   / 2:   6.00   8.00
 3   / 3:  10.00  12.00
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g12/order=zyx test_perm48_10.dat
list v10
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             1      2    
             1      2
 ---- K:1 Z:   1
 1   / 1:   1.00   7.00
 2   / 2:   3.00   9.00
 3   / 3:   5.00  11.00
 ---- K:2 Z:   2
 1   / 1:   2.00   8.00
 2   / 2:   4.00  10.00
 3   / 3:   6.00  12.00
! *** 4D  (incomplete - 24 in all)
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g24 test_perm48_10.dat
list v10
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   1.00   2.00
 2   / 2:   3.00   4.00
 3   / 3:   5.00   6.00
 ---- K:2 Z:   2
 1   / 1:   7.00   8.00
 2   / 2:   9.00  10.00
 3   / 3:  11.00  12.00
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:  13.00  14.00
 2   / 2:  15.00  16.00
 3   / 3:  17.00  18.00
 ---- K:2 Z:   2
 1   / 1:  19.00  20.00
 2   / 2:  21.00  22.00
 3   / 3:  23.00  24.00
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g24/order=xytz test_perm48_10.dat
list v10
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   1.00   2.00
 2   / 2:   3.00   4.00
 3   / 3:   5.00   6.00
 ---- K:2 Z:   2
 1   / 1:  13.00  14.00
 2   / 2:  15.00  16.00
 3   / 3:  17.00  18.00
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:   7.00   8.00
 2   / 2:   9.00  10.00
 3   / 3:  11.00  12.00
 ---- K:2 Z:   2
 1   / 1:  19.00  20.00
 2   / 2:  21.00  22.00
 3   / 3:  23.00  24.00
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g24/order=xzyt test_perm48_10.dat
list v10
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   1.00   2.00
 2   / 2:   5.00   6.00
 3   / 3:   9.00  10.00
 ---- K:2 Z:   2
 1   / 1:   3.00   4.00
 2   / 2:   7.00   8.00
 3   / 3:  11.00  12.00
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:  13.00  14.00
 2   / 2:  17.00  18.00
 3   / 3:  21.00  22.00
 ---- K:2 Z:   2
 1   / 1:  15.00  16.00
 2   / 2:  19.00  20.00
 3   / 3:  23.00  24.00
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g24/order=xtyz test_perm48_10.dat
list v10
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   1.00   2.00
 2   / 2:   5.00   6.00
 3   / 3:   9.00  10.00
 ---- K:2 Z:   2
 1   / 1:  13.00  14.00
 2   / 2:  17.00  18.00
 3   / 3:  21.00  22.00
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:   3.00   4.00
 2   / 2:   7.00   8.00
 3   / 3:  11.00  12.00
 ---- K:2 Z:   2
 1   / 1:  15.00  16.00
 2   / 2:  19.00  20.00
 3   / 3:  23.00  24.00
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g24/order=xtzy test_perm48_10.dat
list v10
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   1.00   2.00
 2   / 2:   9.00  10.00
 3   / 3:  17.00  18.00
 ---- K:2 Z:   2
 1   / 1:   5.00   6.00
 2   / 2:  13.00  14.00
 3   / 3:  21.00  22.00
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:   3.00   4.00
 2   / 2:  11.00  12.00
 3   / 3:  19.00  20.00
 ---- K:2 Z:   2
 1   / 1:   7.00   8.00
 2   / 2:  15.00  16.00
 3   / 3:  23.00  24.00
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g24/order=ytzx test_perm48_10.dat
list v10
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   1.00  13.00
 2   / 2:   2.00  14.00
 3   / 3:   3.00  15.00
 ---- K:2 Z:   2
 1   / 1:   7.00  19.00
 2   / 2:   8.00  20.00
 3   / 3:   9.00  21.00
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:   4.00  16.00
 2   / 2:   5.00  17.00
 3   / 3:   6.00  18.00
 ---- K:2 Z:   2
 1   / 1:  10.00  22.00
 2   / 2:  11.00  23.00
 3   / 3:  12.00  24.00
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g24/order=zytx test_perm48_10.dat
list v10
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   1.00  13.00
 2   / 2:   3.00  15.00
 3   / 3:   5.00  17.00
 ---- K:2 Z:   2
 1   / 1:   2.00  14.00
 2   / 2:   4.00  16.00
 3   / 3:   6.00  18.00
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:   7.00  19.00
 2   / 2:   9.00  21.00
 3   / 3:  11.00  23.00
 ---- K:2 Z:   2
 1   / 1:   8.00  20.00
 2   / 2:  10.00  22.00
 3   / 3:  12.00  24.00
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g24/order=tyzx test_perm48_10.dat
list v10
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   1.00  13.00
 2   / 2:   3.00  15.00
 3   / 3:   5.00  17.00
 ---- K:2 Z:   2
 1   / 1:   7.00  19.00
 2   / 2:   9.00  21.00
 3   / 3:  11.00  23.00
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:   2.00  14.00
 2   / 2:   4.00  16.00
 3   / 3:   6.00  18.00
 ---- K:2 Z:   2
 1   / 1:   8.00  20.00
 2   / 2:  10.00  22.00
 3   / 3:  12.00  24.00
file/var="v1,v2,v3,v4,v5,v6,v7,v8,v9,v10"/grid=g24/order=tzyx test_perm48_10.dat
list v10
             VARIABLE : v10
             FILENAME : test_perm48_10.dat
             SUBSET   : 2 by 3 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   1.00  13.00
 2   / 2:   5.00  17.00
 3   / 3:   9.00  21.00
 ---- K:2 Z:   2
 1   / 1:   3.00  15.00
 2   / 2:   7.00  19.00
 3   / 3:  11.00  23.00
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:   2.00  14.00
 2   / 2:   6.00  18.00
 3   / 3:  10.00  22.00
 ---- K:2 Z:   2
 1   / 1:   4.00  16.00
 2   / 2:   8.00  20.00
 3   / 3:  12.00  24.00
 
 
! test grids that have more points than the data
cancel data/all
file/grid=g12/order=xzy test_perm10.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm10.dat
             SUBSET   : 2 by 3 points (X-Y)
             Z        : 1
             1      2    
             1      2
 1   / 1:   1.00   2.00
 2   / 2:   5.00   6.00
 3   / 3:   9.00  10.00
show data
     currently SET data sets:
    1> ./test_perm10.dat  (default)
 name     title                             I         J         K         L
 V1       V1                               1:2       1:3       1:1       ...
 
 
file/grid=g24/order=xytz test_perm10.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm10.dat
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             T        : 1
             1      2    
             1      2
 ---- K:1 Z:   1
 1   / 1:  1.000  2.000
 2   / 2:  3.000  4.000
 3   / 3:  5.000  6.000
 ---- K:2 Z:   2
 1   / 1:   ....   ....
 2   / 2:   ....   ....
 3   / 3:   ....   ....
show data
     currently SET data sets:
    1> ./test_perm10.dat  (default)
 name     title                             I         J         K         L
 V1       V1                               1:2       1:3       1:2       1:1
 
 
file/grid=g24/order=xzyt test_perm10.dat
list v1
             VARIABLE : V1
             FILENAME : test_perm10.dat
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             T        : 1
             1      2    
             1      2
 ---- K:1 Z:   1
 1   / 1:   1.00   2.00
 2   / 2:   5.00   6.00
 3   / 3:   9.00  10.00
 ---- K:2 Z:   2
 1   / 1:   3.00   4.00
 2   / 2:   7.00   8.00
 3   / 3:   ....   ....
show data
     currently SET data sets:
    1> ./test_perm10.dat  (default)
 name     title                             I         J         K         L
 V1       V1                               1:2       1:3       1:2       1:1
 
 
 
 
! limited testing of /FORMAT=STREAM
! note that as of 5/16/94 this is a fragile capability that will blow up
! NO ==> 1) on attempt to read more data than the file has
!	("BACKSPACE error" not trapped by ERR= branch)
! (This behavior was fixed 9/7/95 in ez_read.F)
! 2) on many attempts to process record length information (contained
!	at the start and end of each variable length record) as data
!	(?? illegal floating point value - formats as zero but computes as
!	something else)
 
! simple test - write a single record of 16 floating point values (encased
!	in record length information) and read it back as a 2x2x2x2 grid
 
define grid/x=x2/y=x2/z=x2/t=x2 g2222
 
! Unformatted files have a count value before and after which may be four or
! eight bytes depending on the system (gfortran version), so only verify a
! list/format=unf can then be read using file/format=unf
sp rm -f test_stream.unf
list/file=test_stream.unf/format=unf/order=x/i=1:16 i/10
file/grid=g2222/form=unf/col=16 test_stream.unf
list v1
             VARIABLE : V1
             FILENAME : test_stream.unf
             SUBSET   : 2 by 2 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:  0.100  0.200
 2   / 2:  0.300  0.400
 ---- K:2 Z:   2
 1   / 1:  0.500  0.600
 2   / 2:  0.700  0.800
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:  0.900  1.000
 2   / 2:  1.100  1.200
 ---- K:2 Z:   2
 1   / 1:  1.300  1.400
 2   / 2:  1.500  1.600
! /ORDER= applies here, too
file/grid=g2222/form=unf/order=yzxt/col=16 test_stream.unf
list v1
             VARIABLE : V1
             FILENAME : test_stream.unf
             SUBSET   : 2 by 2 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:  0.100  0.500
 2   / 2:  0.200  0.600
 ---- K:2 Z:   2
 1   / 1:  0.300  0.700
 2   / 2:  0.400  0.800
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:  0.900  1.300
 2   / 2:  1.000  1.400
 ---- K:2 Z:   2
 1   / 1:  1.100  1.500
 2   / 2:  1.200  1.600
 
! 9/95 - also test the **WRITING** of STREAM-formatted files (added 12/28/94)
sp rm -f test_stream.unf
list/file=test_stream.unf/format=stream/order=x/i=1:16 i/100
file/grid=g2222/form=stream test_stream.unf
list v1
             VARIABLE : V1
             FILENAME : test_stream.unf
             SUBSET   : 2 by 2 by 2 by 2 points (X-Y-Z-T)
             1       2     
              1       2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:  0.0100  0.0200
 2   / 2:  0.0300  0.0400
 ---- K:2 Z:   2
 1   / 1:  0.0500  0.0600
 2   / 2:  0.0700  0.0800
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:  0.0900  0.1000
 2   / 2:  0.1100  0.1200
 ---- K:2 Z:   2
 1   / 1:  0.1300  0.1400
 2   / 2:  0.1500  0.1600
! /ORDER= applies here, too
file/grid=g2222/form=stream/order=yzxt test_stream.unf
list v1
             VARIABLE : V1
             FILENAME : test_stream.unf
             SUBSET   : 2 by 2 by 2 by 2 points (X-Y-Z-T)
             1       2     
              1       2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:  0.0100  0.0500
 2   / 2:  0.0200  0.0600
 ---- K:2 Z:   2
 1   / 1:  0.0300  0.0700
 2   / 2:  0.0400  0.0800
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:  0.0900  0.1300
 2   / 2:  0.1000  0.1400
 ---- K:2 Z:   2
 1   / 1:  0.1100  0.1500
 2   / 2:  0.1200  0.1600
 
! and test /ORDER on the STREAM output listing
! ... first the default order
sp rm -f test_stream.unf
list/file=test_stream.unf/format=stream/i=1:2/j=3:4/k=5:6/l=7:8 (((((i*10)+j)*10)+k)*10)+l
file/grid=g2222/form=stream test_stream.unf
list v1
             VARIABLE : V1
             FILENAME : test_stream.unf
             SUBSET   : 2 by 2 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:  1357.  2357.
 2   / 2:  1457.  2457.
 ---- K:2 Z:   2
 1   / 1:  1367.  2367.
 2   / 2:  1467.  2467.
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:  1358.  2358.
 2   / 2:  1458.  2458.
 ---- K:2 Z:   2
 1   / 1:  1368.  2368.
 2   / 2:  1468.  2468.
file/grid=g2222/form=stream/order=yzxt test_stream.unf
list v1
             VARIABLE : V1
             FILENAME : test_stream.unf
             SUBSET   : 2 by 2 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:  1357.  1367.
 2   / 2:  2357.  2367.
 ---- K:2 Z:   2
 1   / 1:  1457.  1467.
 2   / 2:  2457.  2467.
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:  1358.  1368.
 2   / 2:  2358.  2368.
 ---- K:2 Z:   2
 1   / 1:  1458.  1468.
 2   / 2:  2458.  2468.
! ... then re-order on write and reverse the re-ordering on read
sp rm -f test_stream.unf
list/file=test_stream.unf/format=stream/order=yzxt/i=1:2/j=3:4/k=5:6/l=7:8 (((((i*10)+j)*10)+k)*10)+l
file/grid=g2222/form=stream/order=yzxt test_stream.unf
list v1
             VARIABLE : V1
             FILENAME : test_stream.unf
             SUBSET   : 2 by 2 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:  1357.  2357.
 2   / 2:  1457.  2457.
 ---- K:2 Z:   2
 1   / 1:  1367.  2367.
 2   / 2:  1467.  2467.
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:  1358.  2358.
 2   / 2:  1458.  2458.
 ---- K:2 Z:   2
 1   / 1:  1368.  2368.
 2   / 2:  1468.  2468.
 
! clean up
set grid abstract
CANCEL DATA/ALL
cancel grid g2222
cancel grid g24
cancel grid g12
cancel grid g6yt
cancel grid g6
cancel axis x4
cancel axis x3
cancel axis x2
sp rm -f test_stream.unf
sp rm -f test_perm10.dat
sp rm -f test_perm24.dat
sp rm -f test_perm48.dat
sp rm -f test_perm48_10.dat
 
*** Running ferret script: bn_user.jnl
! bn312_user.jnl
 
! test the USER command options
 
! test the SAMPLE command using the polar plotting scripts
 
! Skip for 6D: USER command not implemented
 
! These are the windows that have always been set after bn_user.jn
set window/size=.5/aspect=.75:ax 1
 
! Get rid of this empty-window definition. pyFerret running all
! the scripts under bn_all.jnl winds up crashing later in a bn_reset
! due to invalid settings in FGD_GET_VIEW_LIMITS
!set window/size=.5/aspect=.75 2
 
exit/script
*** Running ferret script: bn_stream.jnl
! bn420_stream.jnl
 
! jan 96
! note that although this benchmark was added only in 1/96 the STREAM
! reading capabilities have been available much longer
 
! read the file stream_data_link.unf as a single 10 by 5 variable
define axis/x=1:10:1 x10
define axis/y=1:5:1 y5
define grid/x=x10/y=y5 g10x5
file/var=myvar/grid=g10x5/format=stream stream_data_link.unf
list myvar
             VARIABLE : myvar
             FILENAME : stream_data_link.unf
             SUBSET   : 10 by 5 points (X-Y)
             1      2      3      4      5      6      7      8      9     10    
             1      2      3      4      5      6      7      8      9     10
 1   / 1:   1.00   2.00   3.00   4.00   5.00   6.00   7.00   8.00   9.00  10.00
 2   / 2:  11.00  12.00  13.00  14.00  15.00  16.00  17.00  18.00  19.00  20.00
 3   / 3:  21.00  22.00  23.00  24.00  25.00  26.00  27.00  28.00  29.00  30.00
 4   / 4:  31.00  32.00  33.00  34.00  35.00  36.00  37.00  38.00  39.00  40.00
 5   / 5:  41.00  42.00  43.00  44.00  45.00  46.00  47.00  48.00  49.00  50.00
cancel data stream_data_link.unf
 
! read the same file as two 10 by 2 variables skipping the first line
define axis/x=1:10:1 x10
define axis/y=1:2:1 y2
define grid/x=x10/y=y2 g10x2
file/skip=10/columns=20/grid=g10x2/var=myv1,myv2/format=stream stream_data_link.unf
list myv1,myv2
             DATA SET: ./stream_data_link.unf
             X: 0.5 to 10.5
             Y: 0.5 to 2.5
 Column  1: MYV1 is myv1
 Column  2: MYV2 is myv2
            MYV1   MYV2
 ---- J:1 Y:   1
1    /  1:  11.00  31.00
2    /  2:  12.00  32.00
3    /  3:  13.00  33.00
4    /  4:  14.00  34.00
5    /  5:  15.00  35.00
6    /  6:  16.00  36.00
7    /  7:  17.00  37.00
8    /  8:  18.00  38.00
9    /  9:  19.00  39.00
10   / 10:  20.00  40.00
 ---- J:2 Y:   2
1    /  1:  21.00  41.00
2    /  2:  22.00  42.00
3    /  3:  23.00  43.00
4    /  4:  24.00  44.00
5    /  5:  25.00  45.00
6    /  6:  26.00  46.00
7    /  7:  27.00  47.00
8    /  8:  28.00  48.00
9    /  9:  29.00  49.00
10   / 10:  30.00  50.00
cancel data stream_data_link.unf
 
*** Running ferret script: bn_mc.jnl
!bn430_mc.jnl
! kob - 9/5/96
!     - simple test of mc data access for both irregular and regular time
!       axis
!     - 9/6/96 - add tests for bad delta, out of order stepfiles, missing first step file
!		 and missing step file other than the first
!     - 11/06/97 - added a set mode/last verify
CAN MODE VERIFY
     currently SET data sets:
    1> ./data/coads_clim.des  (default)
     COAD
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:6
             Deg C on grid GHB1 with -1.E+34 for missing data
             X=20E:20E(380)  Y=90S:90N  
 
  time range: 16-JAN-1900 06:00 to 17-JUN-1900 10:25
 
    GRID GHB1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME1     TIME                 6 r   16-JAN-1900 06:00    17-JUN-1900 10:25   full
 
       L     T                       TBOX          TBOXLO                TSTEP (hour)
       1>  16-JAN-1900 06:00:00      730.485    01-JAN-1900 00:45:27        366
       2>  15-FEB-1900 16:29:06      730.485    31-JAN-1900 11:14:33        1096.485
       3>  18-MAR-1900 02:58:12      730.485    02-MAR-1900 21:43:39        1826.97
       4>  17-APR-1900 13:27:18      730.485    02-APR-1900 08:12:45        2557.455
       5>  17-MAY-1900 23:56:24      730.485    02-MAY-1900 18:41:51        3287.94
       6>  17-JUN-1900 10:25:30      730.485    02-JUN-1900 05:10:57        4018.425
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             DATA SET : COAD
             FILENAME : coads_clim.des
             SUBSET   : 8 by 6 points (LATITUDE-TIME)
             LONGITUDE: 141W
                    7S     5S     3S     1S     1N     3N     5N     7N    
                    42     43     44     45     46     47     48     49
 16-JAN-1900 / 1:  27.79  27.20  26.26  25.30  25.97  26.20  26.90  27.02
 15-FEB-1900 / 2:  27.63  27.60  26.54  26.15  26.39  26.82  27.16  27.12
 18-MAR-1900 / 3:  28.47  27.94  26.96  26.51  26.64  27.12  27.03  27.09
 17-APR-1900 / 4:  28.42  28.41  27.53  27.05  27.07  27.50  27.37  27.39
 17-MAY-1900 / 5:  28.28  28.38  26.88  26.75  27.07  27.74  27.59  27.46
 17-JUN-1900 / 6:  28.22  28.10  27.62  26.85  26.72  27.72  28.12  27.88
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             DATA SET : COAD
             FILENAME : coads_clim.des
             SUBSET   : 20 by 6 points (LONGITUDE-TIME)
             LATITUDE : 1S
      ... listing every   2th point
                   179W   175W   171W   167W   163W   159W   155W   151W   147W   143W   
                    81     83     85     87     89     91     93     95     97     99
 16-JAN-1900 / 1:  28.86  27.80  27.94  27.85  27.56  27.04  26.56  26.52  26.01  26.02
 15-FEB-1900 / 2:  28.29  28.19  27.73  27.45  27.13  26.59  26.74  26.61  26.04  26.48
 18-MAR-1900 / 3:  27.83  28.22  27.84  27.64  27.14  27.09  27.43  27.05  27.03  26.67
 17-APR-1900 / 4:  28.09  27.69  28.08  28.06  27.74  27.74  27.69  27.17  27.71  27.17
 17-MAY-1900 / 5:  28.36  27.89  28.60  28.32  28.01  27.69  27.70  27.53  26.77  27.35
 17-JUN-1900 / 6:  28.06  28.44  28.56  28.33  27.99  27.67  27.50  27.57  26.96  27.16
 
             SEA SURFACE TEMPERATURE
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 01-JAN-1900 00:45 to 02-JUL-1900 15:40
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_clim.des
 
 Total # of data points: 97200 (180*90*1*6*1*1)
 # flagged as bad  data: 44263
 Minimum value: -2.3
 Maximum value: 32
 Mean    value: 17.806 (unweighted average)
 Standard deviation: 9.6933
     currently SET data sets:
    1> ./data/coads_clim.des
     COAD
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:6
             Deg C on grid GHB1 with -1.E+34 for missing data
             X=20E:20E(380)  Y=90S:90N  
 
  time range: 16-JAN-1900 06:00 to 17-JUN-1900 10:25
 
    2> ./data/coads_clim_irreg.des  (default)
     COAD
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:3
             Deg C on grid GJR1 with -1.E+34 for missing data
             X=20E:20E(380)  Y=90S:90N  
 
  time range: 16-JAN-1900 06:00 to 17-MAY-1900 23:56
 
    GRID GJR1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME2     TIME                 3 i   16-JAN-1900 06:00    17-MAY-1900 23:56   full
 
       L     T                       TBOX          TBOXLO                TSTEP (hour)
       1>  16-JAN-1900 06:00:00      730.485    01-JAN-1900 00:45:27        366
       2>  15-FEB-1900 16:29:06      1460.97    31-JAN-1900 11:14:33        1096.485
       3>  17-MAY-1900 23:56:24      2191.455   02-APR-1900 08:12:45        3287.94
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             DATA SET : COAD
             FILENAME : coads_clim_irreg.des
             SUBSET   : 8 by 3 points (LATITUDE-TIME)
             LONGITUDE: 141W
                    7S     5S     3S     1S     1N     3N     5N     7N    
                    42     43     44     45     46     47     48     49
 16-JAN-1900 / 1:  27.79  27.20  26.26  25.30  25.97  26.20  26.90  27.02
 15-FEB-1900 / 2:  27.63  27.60  26.54  26.15  26.39  26.82  27.16  27.12
 17-MAY-1900 / 3:  28.28  28.38  26.88  26.75  27.07  27.74  27.59  27.46
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             DATA SET : COAD
             FILENAME : coads_clim_irreg.des
             SUBSET   : 20 by 3 points (LONGITUDE-TIME)
             LATITUDE : 1S
      ... listing every   2th point
                   179W   175W   171W   167W   163W   159W   155W   151W   147W   143W   
                    81     83     85     87     89     91     93     95     97     99
 16-JAN-1900 / 1:  28.86  27.80  27.94  27.85  27.56  27.04  26.56  26.52  26.01  26.02
 15-FEB-1900 / 2:  28.29  28.19  27.73  27.45  27.13  26.59  26.74  26.61  26.04  26.48
 17-MAY-1900 / 3:  28.36  27.89  28.60  28.32  28.01  27.69  27.70  27.53  26.77  27.35
 
             SEA SURFACE TEMPERATURE
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 01-JAN-1900 00:45 to 02-JUL-1900 15:40
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_clim_irreg.des
 
 Total # of data points: 48600 (180*90*1*3*1*1)
 # flagged as bad  data: 21459
 Minimum value: -2.2
 Maximum value: 31
 Mean    value: 17.359 (unweighted average)
 Standard deviation: 9.8799
     currently SET data sets:
    1> ./data/coads_clim_missing_step1.des  (default)
     COAD
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:3
             Deg C on grid GQO1 with -1.E+34 for missing data
             X=20E:20E(380)  Y=90S:90N  
 
  time range: 16-JAN-1900 06:00 to 17-MAY-1900 23:56
 
     currently SET data sets:
    1> ./data/coads_clim_missing_stepN.des  (default)
     COAD
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:3
             Deg C on grid GCQ1 with -1.E+34 for missing data
             X=20E:20E(380)  Y=90S:90N  
 
  time range: 16-JAN-1900 06:00 to 17-MAY-1900 23:56
 
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             DATA SET : COAD
             FILENAME : coads_clim_missing_stepN.des
             SUBSET   : 180 by 90 by 3 points (LONGITUDE-LATITUDE-TIME)
      ... listing every  11th point
               21E    43E    65E    87E   109E   131E   153E   175E   163W   141W   119W    97W    75W    53W    31W    9W    13E    
                1     12     23     34     45     56     67     78     89    100    111    122    133    144    155    166    177
 ---- L:1 T:   16-JAN-1900 06:00
 89N   / 90:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 87N   / 89:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 85N   / 88:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 83N   / 87:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 81N   / 86:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 79N   / 85:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 77N   / 84:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   2.94
 75N   / 83:   1.55   0.40   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   3.35
 73N   / 82:   3.72   1.55   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   4.51
 71N   / 81:   5.09   1.80   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   1.40   5.68
 69N   / 80:   5.45   0.89   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   3.00   2.27   6.05
 67N   / 79:   ....   2.00   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  -0.25   4.31   3.37   5.43
 65N   / 78:   0.07   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   0.23   5.10   4.15   4.65
 63N   / 77:   0.51   ....   ....   ....   ....   ....   ....   0.58   ....   ....   ....   ....   ....   0.42   5.96   7.30   ....
 61N   / 76:   1.23   ....   ....   ....   ....   ....   ....   0.62  -0.43   6.33   ....   ....   ....   2.13   6.22   8.43   ....
 59N   / 75:   2.90   ....   ....   ....   ....   ....  -0.71   1.56   1.83   5.92   ....   ....   ....   2.66   7.40   9.38   ....
 57N   / 74:   3.04   ....   ....   ....   ....   ....   0.23   2.22   2.80   5.65   ....   ....   ....   2.95   7.53   9.63   3.05
 55N   / 73:   3.20   ....   ....   ....   ....   ....   0.07   3.07   4.14   5.53   ....   ....   ....   1.24   7.46   9.55   2.99
 53N   / 72:   ....   ....   ....   ....   ....   ....   1.20   3.30   4.30   6.03   ....   ....   ....   0.11   7.75  10.59   4.00
 51N   / 71:   ....   ....   ....   ....   ....   ....   0.81   3.85   4.48   6.59   ....   ....   ....   0.14  10.27  10.16   ....
 49N   / 70:   ....   ....   ....   ....   ....   ....   1.94   3.87   5.09   6.85   ....   ....   ....   0.04  11.62  11.20   ....
 47N   / 69:   ....   ....   ....   ....   ....   ....   1.90   4.40   6.21   8.03   ....   ....   ....   0.92  12.68  11.99   ....
 45N   / 68:   ....   ....   ....   ....   ....   ....   2.16   5.81   7.55   9.23   ....   ....   1.85   3.28  13.78  12.68  11.93
 43N   / 67:   ....   ....   ....   ....   ....   2.42   4.14   8.17   9.12  10.53   ....   ....   ....   7.11  14.72  13.34  13.33
 41N   / 66:   ....   ....   ....   ....   ....   4.91   9.29  10.83  10.98  11.98   ....   ....   7.16  14.94  15.43  14.06  14.65
 39N   / 65:  15.44   ....   ....   ....   ....   8.73  12.17  12.90  12.46  13.51   ....   ....   7.51  18.35  16.21  14.67  14.79
 37N   / 64:  16.03   ....   ....   ....   ....  12.58  15.26  14.88  14.03  15.14   ....   ....  10.35  18.97  17.19  15.62  15.35
 35N   / 63:  16.25   ....   ....   ....   ....  14.09  17.15  16.14  15.40  16.41  14.05   ....  20.52  19.37  18.18  16.90  15.84
 33N   / 62:  16.78   ....   ....   ....   ....  15.13  18.31  17.29  16.95  17.75  14.76   ....  22.12  19.97  19.29  17.05  16.40
 31N   / 61:  17.98   ....   ....   ....   ....  19.46  19.24  18.64  18.83  19.02  15.23   ....  21.84  20.85  20.05  16.48   ....
 29N   / 60:   ....   ....   ....   ....   ....  20.76  20.55  20.11  20.20  19.82  16.36  17.91  22.49  21.93  20.68  15.08   ....
 27N   / 59:   ....   ....   ....   ....   ....  21.32  22.40  22.10  21.59  20.66  17.50  19.77  23.61  22.82  21.51   ....   ....
 25N   / 58:   ....   ....  23.69   ....   ....  22.05  23.99  23.35  22.92  21.47  18.62  22.15  24.57  23.69  22.33   ....   ....
 23N   / 57:   ....   ....  24.01   ....   ....  23.44  25.10  24.41  23.95  21.77  19.57  22.75  25.42  24.48  22.79   ....   ....
 21N   / 56:   ....   ....  24.62  24.90  20.77  24.55  26.33  25.60  24.53  22.80  21.34  22.78  26.17  25.00  22.94   ....   ....
 19N   / 55:   ....   ....  24.92  25.43  23.43  25.68  26.87  26.00  25.29  23.48  23.10  23.78  26.77  25.43  23.43   ....   ....
 17N   / 54:   ....  25.92  25.39  25.91  23.85  26.60  27.43  26.36  25.60  24.00  24.43  27.24  26.92  25.84  23.83   ....   ....
 15N   / 53:   ....  25.71  25.74  26.33  24.40  27.32  27.51  26.64  25.82  24.65  25.72  27.27  26.69  26.20  24.23   ....   ....
 13N   / 52:   ....  25.60  26.61  26.85  24.58  27.70  27.71  27.10  26.12  24.93  26.26  26.93  26.52  26.57  24.81   ....   ....
 11N   / 51:   ....  25.94  27.23  27.47  25.22  27.87  27.94  27.42  26.76  25.70  26.72  26.92  26.23  26.74  25.39   ....   ....
 9N    / 50:   ....   ....  27.37  27.58  25.82  28.02  28.36  27.91  27.43  26.86  26.73  26.86  27.74  26.89  25.90   ....   ....
 7N    / 49:   ....   ....  28.06  27.97  25.94  27.92  28.66  28.29  27.72  27.02  26.78  26.82   ....  26.99  26.59   ....   ....
 5N    / 48:   ....   ....  27.89  27.96  26.24  28.31  28.61  28.42  27.70  26.90  26.90  27.23   ....  27.23  26.99  28.18   ....
 3N    / 47:   ....   ....  28.08  28.15  27.09  28.46  29.05  28.47  27.45  26.20  25.88  26.05   ....   ....  27.05  28.01   ....
 1N    / 46:   ....  26.69  28.02  28.23  27.36  28.73  29.25  28.48  27.25  25.97  24.54  25.27   ....   ....  27.05  27.40   ....
 1S    / 45:   ....  26.50  28.00  28.31  27.87  28.92  29.43  28.31  27.56  25.30  24.47  24.28   ....  27.35  27.10  26.70   ....
 3S    / 44:   ....  27.04  28.07  28.31  28.18  28.93  29.44  29.08  27.84  26.26  24.88  24.33   ....   ....  27.16  26.37   ....
 5S    / 43:   ....  27.95  27.90  28.18  28.21  29.02  29.61  29.24  28.14  27.20  25.02  24.53   ....   ....  27.15  26.13  26.84
 7S    / 42:   ....  28.51  27.65  28.10  28.31  28.88  29.66  29.33  28.33  27.79  25.58  24.25   ....   ....  27.31  25.63  26.46
 9S    / 41:   ....  28.58  28.04  28.43  28.89  28.93  29.51  29.64  29.21  27.79  25.69  24.01   ....   ....  27.23  24.96  26.45
 11S   / 40:   ....  28.60  28.00  27.77  28.42  29.60  28.90  29.44  29.11  27.84  25.67  23.42   ....   ....  27.22  24.61  25.88
 13S   / 39:   ....  28.57  28.23  27.62  28.18  29.75  29.09  29.05  29.06  27.93  26.09  23.38   ....   ....  27.35  24.05  24.87
 15S   / 38:   ....  28.48  27.53  27.33  27.71   ....  28.84  28.98  28.70  28.23  25.90  23.41  19.39   ....  27.01  23.35  23.91
 17S   / 37:   ....  28.59  27.32  26.85  26.95   ....  28.49  28.38  28.38  27.84  26.13  22.71  21.99   ....  26.74  23.17   ....
 19S   / 36:   ....  28.40  26.80  26.23  26.37   ....  28.10  27.77  27.85  27.47  26.07  23.03  22.74   ....  26.61  23.34  18.44
 21S   / 35:   ....  28.57  26.75  25.34  25.47   ....  27.89  27.03  27.43  27.14  25.94  23.55  21.85   ....  26.43  23.76  18.73
 23S   / 34:   ....  28.19  26.36  24.88  24.26   ....  27.13  26.05  26.25  26.35  25.90  23.07  20.94   ....  26.55  23.83  18.16
 25S   / 33:   ....  27.16  25.70  24.42  23.40   ....  26.44  25.26  25.31  25.42  25.43  23.40  20.04   ....  25.43  23.71  17.48
 27S   / 32:   ....  26.11  25.25  23.88  22.40   ....  25.88  24.79  24.22  24.51  24.65  22.98  19.43   ....  24.86  23.99  19.90
 29S   / 31:   ....  25.46  24.30  22.60  21.53   ....  25.21  23.45  22.97  23.36  24.06  22.91  19.40   ....  23.41  23.31  20.16
 31S   / 30:   ....  24.10  23.48  22.27  20.80   ....  24.35  22.55  21.64  22.21  23.20  22.00  18.67  22.38  22.59  22.86  20.29
 33S   / 29:   ....  22.34  21.57  20.47  19.72  19.72  23.23  21.74  20.98  21.33  21.62  21.48  17.87  22.47  20.57  21.02  20.19
 35S   / 28:  21.08  21.20  20.15  19.19  18.41  18.12  22.56  20.53  19.55  19.30  19.89  20.78  16.71  22.10  19.94  20.03  19.66
 37S   / 27:  21.29  19.84  18.18  17.72  16.53  17.07  20.59  19.73  18.50  18.08  17.53   ....  16.00  20.88  18.64  17.95  18.46
 39S   / 26:  20.75  18.19  16.73  15.60  15.24  16.28  19.14  18.72  17.95  16.62  16.96   ....  15.95  19.17  16.74  15.68  17.75
 41S   / 25:  16.45  15.86  15.91  14.50  13.63  14.28  17.01  16.25  16.54  15.06  15.15  16.62  15.59  18.18  14.79  13.98  14.15
 43S   / 24:  14.37  11.09  13.70  12.70  12.57  12.66  15.82  15.95  15.61  13.65   ....  14.60  14.50  16.34  12.51  11.74  11.67
 45S   / 23:   8.49   8.29   9.34  10.39  11.05  11.84  13.89  13.96  14.01  13.24   ....   ....  13.81  14.65  10.51   8.58   8.23
 47S   / 22:   6.06   6.47   6.63   8.80   8.71  10.63  12.88  12.94  13.27  11.77   ....   ....  13.27  13.25   8.62   6.47   6.45
 49S   / 21:   4.42   4.75   5.05   7.73   7.14   9.54  10.88  10.63  12.28   ....   ....   ....  12.01   9.86   5.30   4.41   4.38
 51S   / 20:   1.84   3.26   3.57   5.52   5.39   8.11   9.30   9.77  11.23   ....   ....   8.72  10.74   7.96   3.63   2.21   1.85
 53S   / 19:   1.09   2.59   3.32   3.41   3.51   6.69   7.08   8.78   8.40   ....   ....   8.47   9.49   6.99   2.19   1.25   1.27
 55S   / 18:   0.65   1.42   2.61   2.72   3.28   5.49   6.32   8.06   6.83   7.20   ....   6.80   8.07   5.89   1.39   1.24   0.92
 57S   / 17:   0.41   1.20   2.42   2.73   2.58   4.13   3.83   7.20   4.81   3.67   ....   6.95   7.21   4.44   0.78   0.41   0.53
 59S   / 16:   0.62   1.37   1.61   1.79   2.03   2.67   3.39   6.06   3.88   2.15   4.70   5.80   6.27   2.30   0.07   0.19   0.56
 61S   / 15:   0.84   1.27   1.31   1.52   1.39   1.62   2.17   4.16   2.25   0.94   3.50   ....   4.23   1.02   0.08   0.07   0.18
 63S   / 14:   0.88   0.90   0.57   0.99   0.78   1.06   1.41   2.03   0.50   0.48   1.03   ....   2.28   0.75  -0.33   0.00   0.76
 65S   / 13:   0.37  -0.05   0.31   0.34  -0.34   0.27   0.28   0.74   0.16   0.11   0.20   1.89   1.58  -0.17  -0.55  -0.65   0.25
 67S   / 12:  -0.67  -0.78   0.19   ....   ....  -0.73   0.05   0.02  -0.05  -1.10   0.39   0.28   0.91   ....  -0.25  -0.52   0.08
 69S   / 11:   0.04   ....   ....   ....   ....   ....   ....  -0.47  -0.01   ....  -0.47   0.37   ....   ....   0.50  -0.72   0.43
 71S   / 10:   ....   ....   ....   ....   ....   ....   ....  -0.40  -0.46  -0.23   ....   ....   ....   ....  -1.02  -1.14   ....
 73S   /  9:   ....   ....   ....   ....   ....   ....   ....  -0.11   ....   ....   ....   ....   ....   ....  -1.20   ....   ....
 75S   /  8:   ....   ....   ....   ....   ....   ....   ....   0.28  -0.48   ....   ....   ....   ....   ....  -0.42   ....   ....
 77S   /  7:   ....   ....   ....   ....   ....   ....   ....  -0.04  -0.43   ....   ....   ....   ....   ....  -0.87   ....   ....
 79S   /  6:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 81S   /  5:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 83S   /  4:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 85S   /  3:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 87S   /  2:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 89S   /  1:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 ---- L:2 T:   15-FEB-1900 16:29
 89N   / 90:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 87N   / 89:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 85N   / 88:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 83N   / 87:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 81N   / 86:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 79N   / 85:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 77N   / 84:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   2.55
 75N   / 83:   2.53   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  -1.01   3.64
 73N   / 82:   4.10   0.68   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   5.80   4.46
 71N   / 81:   4.67   1.60   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   0.63   5.35
 69N   / 80:   4.20   0.07   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   1.54   5.61
 67N   / 79:   ....   0.00   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   0.58   3.76   1.44   4.70
 65N   / 78:  -0.06   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  -0.13   4.46   3.71   4.23
 63N   / 77:   0.07   ....   ....   ....   ....   ....   ....   1.80   ....   ....   ....   ....   ....   0.18   5.86   7.46   ....
 61N   / 76:   0.48   ....   ....   ....   ....   ....   ....   0.46   1.60   ....   ....   ....   ....   2.43   6.45   8.14   ....
 59N   / 75:   1.64   ....   ....   ....   ....   ....  -0.56   0.56   1.64   5.50   ....   ....   ....   3.19   7.08   9.06   ....
 57N   / 74:   2.04   ....   ....   ....   ....   ....  -0.10   1.45   1.80   5.04   ....   ....   ....   2.77   7.29   9.20   2.45
 55N   / 73:   2.06   ....   ....   ....   ....   ....   0.25   2.58   3.67   5.05   ....   ....   ....   0.68   7.14   9.03   2.18
 53N   / 72:   ....   ....   ....   ....   ....   ....   0.40   2.97   3.69   5.80   ....   ....   ....  -0.54   7.59   9.12   2.66
 51N   / 71:   ....   ....   ....   ....   ....   ....   1.25   3.29   3.92   6.07   ....   ....   ....  -0.24  10.03   9.66   ....
 49N   / 70:   ....   ....   ....   ....   ....   ....   1.30   3.31   4.62   6.48   ....   ....   ....  -0.58  11.39  10.77   ....
 47N   / 69:   ....   ....   ....   ....   ....   ....   1.31   3.87   5.82   7.72   ....   ....   ....   0.08  12.22  11.59   ....
 45N   / 68:   ....   ....   ....   ....   ....   ....   1.64   5.33   7.19   8.88   ....   ....   2.79   1.94  13.40  12.23  10.75
 43N   / 67:   ....   ....   ....   ....   ....   1.56   3.32   7.31   8.72  10.04   ....   ....   ....   6.23  14.22  12.95  12.83
 41N   / 66:   ....   ....   ....   ....   ....   4.14   8.12   9.90  10.40  11.47   ....   ....   4.31  14.21  15.00  13.69  14.18
 39N   / 65:  15.03   ....   ....   ....   ....   7.72  10.99  12.00  11.82  13.06   ....   ....   6.32  17.51  15.71  14.26  14.35
 37N   / 64:  15.32   ....   ....   ....   ....  10.93  13.97  14.02  13.13  14.39   ....   ....   9.22  18.20  16.56  15.23  14.69
 35N   / 63:  15.54   ....   ....   ....   ....  12.62  15.99  15.43  14.63  15.87  13.93   ....  20.07  18.58  17.46  16.40  15.09
 33N   / 62:  16.01   ....   ....   ....   ....  14.74  17.14  16.36  16.17  16.98  14.72   ....  21.44  19.24  18.55  16.62  15.90
 31N   / 61:  15.50   ....   ....   ....   ....  18.77  18.03  17.55  18.01  18.42  15.02   ....  21.21  20.15  19.32  15.77   ....
 29N   / 60:   ....   ....   ....   ....   ....  20.05  19.18  19.02  19.57  19.13  16.05  17.31  21.97  21.19  20.04  17.33   ....
 27N   / 59:   ....   ....   ....   ....   ....  20.82  21.30  21.41  21.05  20.17  17.29  19.69  23.10  22.32  20.86   ....   ....
 25N   / 58:   ....   ....  23.37   ....   ....  21.95  23.08  22.46  22.44  21.17  18.17  21.39  24.11  23.29  21.69   ....   ....
 23N   / 57:   ....   ....  23.76   ....   ....  22.77  24.49  24.04  23.57  21.92  19.09  22.31  25.07  23.98  22.17   ....   ....
 21N   / 56:   ....   ....  24.43  25.75  19.45  24.07  25.66  24.94  24.16  22.52  21.25  22.64  25.85  24.52  22.62   ....   ....
 19N   / 55:   ....   ....  24.81  25.98  22.73  25.39  26.41  25.48  24.88  23.21  22.97  23.66  26.62  24.96  22.76   ....   ....
 17N   / 54:   ....  25.77  25.47  26.44  23.56  26.23  26.90  26.12  25.11  23.95  24.19  27.76  26.61  25.31  22.99   ....   ....
 15N   / 53:   ....  25.54  26.20  26.79  24.38  27.09  27.10  26.39  25.66  24.45  25.70  27.55  26.32  25.87  23.66   ....   ....
 13N   / 52:   ....  25.62  26.40  26.95  24.65  27.47  27.43  26.96  26.33  25.18  26.39  27.20  26.10  26.30  24.16   ....   ....
 11N   / 51:   ....  25.85  27.24  27.46  25.41  27.61  27.90  27.24  26.54  25.86  26.16  27.39  26.01  26.49  24.74   ....   ....
 9N    / 50:   ....   ....  27.29  27.82  26.12  27.87  28.40  27.97  27.27  26.61  26.77  27.21  26.67  26.73  25.59   ....   ....
 7N    / 49:   ....   ....  27.98  28.19  26.26  27.63  28.89  28.31  27.93  27.12  26.51  27.17   ....  27.05  26.62   ....   ....
 5N    / 48:   ....   ....  27.92  28.15  26.59  27.78  28.71  28.56  27.42  27.16  26.90  27.57   ....  27.19  26.89  27.82   ....
 3N    / 47:   ....   ....  28.32  28.45  27.02  28.09  29.00  28.16  27.30  26.82  26.48  27.02   ....   ....  27.12  28.40   ....
 1N    / 46:   ....  26.89  28.19  28.51  27.18  28.28  29.17  28.70  27.15  26.39  26.05  26.63   ....   ....  27.25  27.95   ....
 1S    / 45:   ....  26.66  28.39  28.75  27.77  28.45  29.40  29.52  27.13  26.15  25.38  25.66   ....  27.43  27.42  27.48   ....
 3S    / 44:   ....  26.93  28.32  28.62  27.85  28.80  29.40  29.04  27.42  26.54  25.63  25.85   ....   ....  27.66  27.23   ....
 5S    / 43:   ....  27.72  28.15  28.38  28.05  28.74  29.51  29.48  28.27  27.60  25.88  25.91   ....   ....  27.63  27.00  27.81
 7S    / 42:   ....  28.66  28.47  28.45  28.13  28.71  29.63  28.80  28.44  27.63  26.16  25.85   ....   ....  27.74  26.27  27.66
 9S    / 41:   ....  28.84  28.14  28.58  28.40  28.74  29.44  28.98  29.00  28.11  26.18  25.20   ....   ....  27.66  26.42  27.63
 11S   / 40:   ....  28.78  28.12  28.05  28.39  29.34  29.01  29.20  28.82  27.84  26.23  24.59   ....   ....  27.54  25.65  26.90
 13S   / 39:   ....  28.84  28.27  28.01  28.08  29.76  28.97  28.84  28.88  28.33  26.32  24.17   ....   ....  27.33  25.16  26.03
 15S   / 38:   ....  28.80  27.97  27.48  27.83   ....  28.85  29.11  28.81  28.16  26.18  24.09  19.26   ....  27.44  24.56  24.02
 17S   / 37:   ....  28.65  27.86  26.99  27.58   ....  28.40  28.63  28.75  27.82  26.41  23.86  22.94   ....  27.51  24.62   ....
 19S   / 36:   ....  28.60  27.17  26.73  27.12   ....  27.98  28.41  28.14  27.86  26.36  23.99  23.99   ....  27.47  24.44  19.40
 21S   / 35:   ....  28.58  26.76  26.08  26.40   ....  27.84  27.29  27.70  27.50  26.32  23.67  22.88   ....  27.04  24.72  19.34
 23S   / 34:   ....  28.20  26.74  25.28  25.36   ....  27.18  26.48  27.06  26.64  25.94  24.55  21.74   ....  27.27  24.46  18.59
 25S   / 33:   ....  27.40  26.21  24.45  24.08   ....  26.85  25.76  25.77  26.21  25.99  24.70  20.97   ....  26.43  24.28  18.14
 27S   / 32:   ....  26.63  25.28  23.90  23.28   ....  26.19  24.74  24.66  25.25  25.33  24.71  20.59   ....  26.09  24.51  20.34
 29S   / 31:   ....  25.76  24.80  23.09  22.25   ....  25.61  24.09  23.82  24.13  24.93  23.40  19.74   ....  25.13  24.06  20.71
 31S   / 30:   ....  24.68  23.32  22.08  21.23   ....  24.84  22.96  22.38  23.15  23.38  23.17  18.70  22.72  23.63  23.37  20.79
 33S   / 29:   ....  23.51  22.22  20.96  20.32  20.89  23.89  22.18  21.60  21.08  22.57  21.93  18.00  23.08  22.62  21.87  20.46
 35S   / 28:  20.97  21.71  20.56  20.14  19.00  18.84  23.35  21.09  20.21  20.23  20.75  20.57  18.06  22.52  20.87  20.61  19.90
 37S   / 27:  21.72  20.72  18.87  17.47  17.40  17.75  21.59  20.96  19.64  18.50  19.62  20.35  15.97  21.01  19.53  18.35  19.24
 39S   / 26:  22.04  19.15  17.06  16.08  15.45  16.92  20.09  19.57  18.36  17.78  18.10  17.13  15.89  20.22  18.21  16.29  16.84
 41S   / 25:  17.85  16.22  16.09  14.75  14.16  15.13  18.04  16.76  17.16  16.13   ....   ....  15.35  18.12  16.49  14.76  14.40
 43S   / 24:  13.49  11.11  14.98  12.53  12.12  13.91  16.18  16.23  15.86  14.61   ....   ....  14.43  17.59  14.18  12.05  11.00
 45S   / 23:   8.38   8.86  10.08  10.48  11.53  12.13  14.32  14.53  14.51  13.91  14.42   ....  13.92  15.47  10.97  10.97   8.87
 47S   / 22:   6.72   6.81   7.42  10.57   8.81  10.99  12.94  13.07  13.77  12.05   ....  10.95  13.29  14.48   8.58   6.84   6.47
 49S   / 21:   4.89   5.10   4.94   7.05   7.28  10.12  11.23  11.09  12.24   ....   ....   ....  11.62   9.42   7.44   5.11   4.99
 51S   / 20:   2.32   3.94   4.26   4.47   5.41   8.32   9.39   9.64  10.91   9.88   ....   ....  10.94   7.71   5.20   3.20   2.24
 53S   / 19:   1.67   3.02   4.17   3.51   4.64   6.95   7.65   8.51   9.70   9.24   ....   8.19  10.25   7.31   3.81   1.86   1.46
 55S   / 18:   1.33   2.57   3.64   2.67   3.82   5.58   5.95   7.96   8.88   7.36   ....   8.18   8.69   6.56   1.84   1.25   1.05
 57S   / 17:   0.98   1.63   3.34   2.49   3.08   4.83   4.86   7.36   5.90   4.51   ....   ....   7.19   4.30   1.71   0.81   1.00
 59S   / 16:   1.16   1.61   1.97   1.96   3.52   3.47   2.90   5.87   4.63   2.35   ....   ....   6.40   2.56   1.26   0.87   1.12
 61S   / 15:   0.99   1.22   1.48   1.75   1.82   3.70   2.08   4.52   2.76   1.36   ....   5.02   4.46   1.05   0.09   0.28   0.80
 63S   / 14:   1.06   1.20   0.88   1.19   1.21   1.49   1.31   3.01   1.19   1.29   2.50   2.70   3.14  -0.02   0.31   0.36   1.16
 65S   / 13:   0.67   0.97   0.14   0.48  -0.29   0.51   0.45   1.58   0.22   0.31   0.00   2.30   1.67  -1.01   0.00  -0.22   0.45
 67S   / 12:   0.46  -0.56  -0.27  -0.18   ....   ....  -0.71   0.56  -0.16  -0.14  -0.02  -0.25   0.79  -0.75   0.21  -0.29  -0.16
 69S   / 11:  -0.34  -1.18   ....   ....   ....   ....   ....   0.15  -0.36   ....  -0.30   0.24   0.15   ....  -0.70  -0.40  -0.59
 71S   / 10:   ....   ....   ....   ....   ....   ....   ....  -0.48  -0.73   ....   ....  -1.56   ....  -1.68  -1.56  -1.23   ....
 73S   /  9:   ....   ....   ....   ....   ....   ....   ....  -0.45  -0.85   ....   ....   ....   ....   ....  -1.48   ....   ....
 75S   /  8:   ....   ....   ....   ....   ....   ....   ....  -0.28  -1.30   ....   ....   ....   ....  -1.30  -1.22   ....   ....
 77S   /  7:   ....   ....   ....   ....   ....   ....   ....  -0.12  -0.61   ....   ....   ....   ....   ....  -1.37   ....   ....
 79S   /  6:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 81S   /  5:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 83S   /  4:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 85S   /  3:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 87S   /  2:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 89S   /  1:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 ---- L:3 T:   17-MAY-1900 23:56
 89N   / 90:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 87N   / 89:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 85N   / 88:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 83N   / 87:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 81N   / 86:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 79N   / 85:   2.50   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   0.24
 77N   / 84:   3.44   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   2.62
 75N   / 83:   2.60  -0.19   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  -0.53   3.73
 73N   / 82:   4.44   0.93   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  -1.25   4.91
 71N   / 81:   5.44   1.28   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   0.02   ....   0.65   5.77
 69N   / 80:   5.98   1.91   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   0.89   7.03   2.05   6.47
 67N   / 79:   ....   3.65   ....   ....   ....   ....   ....   ....   0.00   ....   ....   ....   ....   0.64   6.28   3.36   6.32
 65N   / 78:   1.46   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   1.06   5.57   5.36   6.41
 63N   / 77:   3.42   ....   ....   ....   ....   ....   ....   1.17   ....   ....   ....   ....   ....   1.16   6.62   8.23   ....
 61N   / 76:   3.42   ....   ....   ....   ....   ....   ....   1.40   ....   6.95   ....   ....   ....   1.92   7.05   8.90   ....
 59N   / 75:   5.64   ....   ....   ....   ....   ....   1.24   2.01   3.17   7.27   ....   ....   ....   3.54   7.46  10.04   ....
 57N   / 74:   5.98   ....   ....   ....   ....   ....   1.49   3.19   2.81   7.18   ....   ....   ....   3.62   8.23  10.53   9.20
 55N   / 73:   8.03   ....   ....   ....   ....   ....   1.62   3.47   4.59   6.91   ....   ....   ....   1.57   8.40  10.75   7.90
 53N   / 72:   ....   ....   ....   ....   ....   ....   1.81   3.96   5.09   7.04   ....   ....   ....   1.57   9.22  11.85   6.67
 51N   / 71:   ....   ....   ....   ....   ....   ....   2.66   4.24   5.13   7.18   ....   ....   ....   1.42  11.30  11.58   ....
 49N   / 70:   ....   ....   ....   ....   ....   ....   2.71   4.28   5.65   7.55   ....   ....   ....   2.48  12.34  12.14   ....
 47N   / 69:   ....   ....   ....   ....   ....   ....   2.33   4.82   6.46   8.57   ....   ....   ....   2.61  13.63  13.04   ....
 45N   / 68:   ....   ....   ....   ....   ....   ....   3.22   6.02   7.83   9.78   ....   ....   9.42   4.30  14.63  13.75  16.73
 43N   / 67:   ....   ....   ....   ....   ....   7.81   5.90   8.16   9.25  10.89   ....   ....   ....   8.71  15.59  14.35  16.30
 41N   / 66:   ....   ....   ....   ....   ....  10.50  10.95  11.22  11.32  12.46   ....   ....  12.27  16.30  16.52  15.34  17.74
 39N   / 65:  18.31   ....   ....   ....   ....  13.43  13.82  13.51  13.17  13.99   ....   ....  12.90  19.04  17.14  15.93  17.96
 37N   / 64:  18.51   ....   ....   ....   ....  15.67  16.44  15.55  14.85  15.36   ....   ....  15.54  19.48  18.09  16.91  17.66
 35N   / 63:  18.74   ....   ....   ....   ....  17.00  18.35  17.10  16.64  16.54  14.51   ....  23.23  20.01  19.01  18.12  18.13
 33N   / 62:  18.95   ....   ....   ....   ....  18.51  19.07  18.50  18.28  17.75  15.68   ....  24.14  20.84  20.01  18.57  18.76
 31N   / 61:  18.70   ....   ....   ....   ....  22.40  20.43  20.12  20.33  19.09  15.68   ....  23.76  21.95  20.61  17.01   ....
 29N   / 60:   ....   ....   ....   ....   ....  23.49  22.45  21.81  21.63  19.86  16.89  24.73  24.37  23.02  21.28  16.93   ....
 27N   / 59:   ....   ....   ....   ....   ....  23.87  24.26  23.53  23.06  20.86  17.60  24.89  25.10  23.84  21.76   ....   ....
 25N   / 58:   ....   ....  28.39   ....   ....  25.27  25.56  24.55  23.81  21.60  18.80  25.35  25.89  24.48  22.46   ....   ....
 23N   / 57:   ....   ....  28.65   ....   ....  26.58  26.62  25.52  24.50  22.36  19.71  26.36  26.54  25.14  22.94   ....   ....
 21N   / 56:   ....   ....  28.83  29.39  26.76  27.80  27.41  26.06  25.19  22.91  21.44  26.76  27.19  25.58  23.07   ....   ....
 19N   / 55:   ....   ....  29.22  29.61  28.15  28.34  27.79  26.54  25.74  23.48  22.90  27.54  27.86  26.09  23.33   ....   ....
 17N   / 54:   ....  29.80  29.44  29.73  28.49  28.82  27.95  26.93  26.13  24.08  24.49  29.27  27.68  26.33  23.57   ....   ....
 15N   / 53:   ....  29.77  29.65  30.04  28.55  29.03  27.99  27.73  26.09  24.89  26.29  29.49  27.47  26.79  24.06   ....   ....
 13N   / 52:   ....  29.69  29.95  29.75  28.71  29.06  28.20  27.78  26.73  25.85  27.20  29.81  27.47  27.12  24.95   ....   ....
 11N   / 51:   ....  29.97  29.94  29.60  29.36  29.07  28.38  27.83  27.29  26.67  27.89  29.74  27.62  27.34  25.48   ....   ....
 9N    / 50:   ....   ....  29.80  29.56  29.57  29.03  28.63  28.70  27.79  27.19  28.08  29.47  28.21  27.52  26.29   ....   ....
 7N    / 49:   ....   ....  29.44  29.27  29.58  29.01  29.16  29.01  27.97  27.46  27.72  28.86   ....  27.65  26.97   ....   ....
 5N    / 48:   ....   ....  29.49  29.20  29.56  29.28  29.51  28.54  28.14  27.59  28.06  28.48   ....  27.69  27.47  28.77   ....
 3N    / 47:   ....   ....  29.48  29.01  29.60  29.26  29.46  29.15  28.53  27.74  27.54  27.32   ....   ....  27.70  28.57   ....
 1N    / 46:   ....  27.75  29.40  29.09  29.47  29.09  29.61  28.21  27.94  27.07  25.99  25.85   ....   ....  27.72  27.75   ....
 1S    / 45:   ....  27.98  29.01  29.06  29.68  29.05  29.66  28.52  28.01  26.75  25.74  24.72   ....  27.33  27.79  27.02   ....
 3S    / 44:   ....  28.12  29.14  29.10  29.67  28.95  29.61  29.55  28.63  26.88  26.73  25.35   ....   ....  27.96  27.00   ....
 5S    / 43:   ....  27.85  28.86  29.07  29.51  28.74  29.52  29.61  28.79  28.38  26.97  26.19   ....   ....  28.09  27.32  26.54
 7S    / 42:   ....  27.71  28.45  28.72  29.48  28.72  29.36  29.57  29.12  28.28  27.08  26.18   ....   ....  28.07  26.98  25.82
 9S    / 41:   ....  27.87  27.97  27.63  28.73  28.11  28.90  29.18  29.53  28.49  26.99  25.79   ....   ....  27.94  26.30  25.50
 11S   / 40:   ....  27.81  28.00  27.38  28.10  28.64  28.05  28.61  29.10  28.43  26.56  25.18   ....   ....  27.57  25.43  25.79
 13S   / 39:   ....  27.94  27.18  27.10  27.99  29.05  27.72  28.74  28.96  28.24  26.42  24.34   ....   ....  27.29  24.94  24.81
 15S   / 38:   ....  27.83  26.93  26.57  27.38  29.50  27.25  28.28  28.59  28.07  25.96  23.67  17.46   ....  26.88  24.39  22.75
 17S   / 37:   ....  27.70  26.71  26.08  26.80   ....  26.71  27.20  28.11  27.66  25.79  23.51  19.35   ....  26.92  23.76   ....
 19S   / 36:   ....  27.10  26.01  25.10  26.20   ....  26.20  26.76  27.14  27.37  25.61  23.84  20.54   ....  26.42  23.48  16.80
 21S   / 35:   ....  26.34  25.18  24.21  25.65   ....  25.71  25.85  26.28  26.54  25.41  23.07  20.10   ....  26.03  23.58  17.00
 23S   / 34:   ....  26.11  24.69  23.62  24.25   ....  24.52  24.66  25.19  25.81  24.83  22.67  19.13   ....  25.05  22.98  16.31
 25S   / 33:   ....  24.51  23.80  22.77  23.07   ....  24.19  23.80  23.65  24.54  24.17  22.24  18.81   ....  24.04  22.19  16.07
 27S   / 32:   ....  24.08  22.89  21.77  22.23   ....  23.61  23.15  22.86  23.18  23.18  21.65  18.00   ....  23.42  21.29  18.31
 29S   / 31:   ....  23.34  21.84  20.41  21.11   ....  23.00  21.48  21.45  21.88  22.51  21.69  18.38   ....  22.25  21.16  18.31
 31S   / 30:   ....  21.88  20.68  19.52  19.84   ....  22.47  20.40  20.17  20.49  20.85  20.78  17.35  20.00  21.39  20.66  18.61
 33S   / 29:   ....  20.52  19.61  18.03  18.67  17.90  21.21  19.64  19.09  19.00  18.90  18.69  16.23  18.00  19.52  19.04  18.16
 35S   / 28:  17.48  19.53  17.57  16.40  17.31  16.86  20.57  18.48  17.67  17.62  18.43  18.43  15.71  17.33  18.21  17.94  17.95
 37S   / 27:  19.04  18.81  16.36  14.90  15.83  15.70  18.56  17.52  16.85  16.55  15.83   ....  14.03  17.84  17.41  16.41  17.42
 39S   / 26:  19.37  17.10  15.80  13.67  13.97  14.76  17.36  16.24  15.54  15.33  16.30   ....  13.37  16.31  15.92  14.31  15.65
 41S   / 25:  17.51  14.46  14.94  13.06  11.90  13.05  16.39  14.31  14.78  13.95  12.76  13.27  12.85  14.97  14.11  13.89  16.27
 43S   / 24:  14.87   9.72  14.18  11.37  10.23  11.71  14.48  12.98  13.28  12.56   ....  12.33  12.19  14.04  13.23  13.28   ....
 45S   / 23:  14.83   7.24   9.90   ....   7.20  10.50  13.02  10.87  12.17  11.52  11.29  11.52  11.44  12.13   ....  13.60  12.03
 47S   / 22:   ....   6.16   6.25   ....   ....   ....  11.26  10.65  11.59  10.45   9.33   ....  10.58  11.17   7.66   ....   ....
 49S   / 21:   ....   5.08   4.65   ....   ....   ....   ....   9.53   9.98   9.33   ....   8.10   9.63   7.22   6.68   ....   ....
 51S   / 20:   ....   ....   4.39   ....   ....   ....   ....   7.80   ....   9.10   8.30   7.20   8.50   5.53   3.73   ....   ....
 53S   / 19:   ....   2.46   ....   ....   ....   ....   ....   7.15   ....   ....   7.20   7.07   9.05   5.30   1.12   ....   ....
 55S   / 18:   ....   ....   ....   ....   ....   ....   ....   7.08   ....   ....   ....   6.07   6.83   4.35   1.47   ....   ....
 57S   / 17:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   5.40   5.84   4.09   1.00   ....   ....
 59S   / 16:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   4.34   0.40  -0.80   ....   ....
 61S   / 15:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   3.62   ....   0.90   ....   ....   ....
 63S   / 14:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 65S   / 13:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 67S   / 12:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 69S   / 11:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 71S   / 10:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 73S   /  9:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 75S   /  8:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 77S   /  7:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 79S   /  6:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 81S   /  5:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 83S   /  4:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 85S   /  3:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 87S   /  2:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 89S   /  1:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 
 
*** Running ferret script: bn_negative_t.jnl
! bn450_negative_t - 10/97
 
! test behavior of negative time step values (unsupported except as absolute
! dates prior to Ferret version 4.5)
 
 
! define an axis of negative and positive time steps and test all
! transformation on it over various ranges
 
DEFINE AXIS/T=-10:10:2 tax
LET tvar = t[gt=tax]
LET tgap = IF MOD(T,4) eq 0 then  tvar
 
! ****** test transformations ********
 
GO bn_negative_t.sub tvar ave  ! like var and din
! bn450_neg_t_trans.sub
 
! support routine for bn450_negative_t.jnl
 
! call as
!   GO bn450_neg_t_sub  varname  transform
 
! tvar axis runs from -10 to 10 by 1's
 
LIST $1[t=-5:5@$2]	! neg/pos t endpoints
 !-> LIST tvar[t=-5:5@ave]
             VARIABLE : T[GT=TAX]
             T        : -5 to 5 (averaged)
          0.0000
LIST $1[t=-5:-8@$2]	! neg/neq t endpoints
 !-> LIST tvar[t=-5:-8@ave]
             VARIABLE : T[GT=TAX]
             T        : -8 to -5 (averaged)
         -6.667
LIST $1[l=2:7@$2]	! neg/pos l endpoints
 !-> LIST tvar[l=2:7@ave]
             VARIABLE : T[GT=TAX]
             T        : -9 to 3 (averaged)
         -3.000
LIST $1[l=2:4@$2]	! neg/neg l endpoints
 !-> LIST tvar[l=2:4@ave]
             VARIABLE : T[GT=TAX]
             T        : -9 to -3 (averaged)
         -6.000
LIST $1[l=@$2]	! unspecified limits (neg/pos)
 !-> LIST tvar[l=@ave]
             VARIABLE : T[GT=TAX]
             T        : -11 to 11 (averaged)
          0.0000
 
GO bn_negative_t.sub tvar iin
! bn450_neg_t_trans.sub
 
! support routine for bn450_negative_t.jnl
 
! call as
!   GO bn450_neg_t_sub  varname  transform
 
! tvar axis runs from -10 to 10 by 1's
 
LIST $1[t=-5:5@$2]	! neg/pos t endpoints
 !-> LIST tvar[t=-5:5@iin]
             VARIABLE : T[GT=TAX]
                        indef. integ. on T
             SUBSET   : 5 points (T)
 -4   / 4:  -8.00
 -2   / 5: -12.00
 0    / 6: -12.00
 2    / 7:  -8.00
 4    / 8:   0.00
LIST $1[t=-5:-8@$2]	! neg/neq t endpoints
 !-> LIST tvar[t=-5:-8@iin]
             VARIABLE : T[GT=TAX]
                        indef. integ. on T
             SUBSET   : 2 points (T)
 -8   / 2:  -8.00
 -6   / 3: -20.00
LIST $1[l=2:7@$2]	! neg/pos l endpoints
 !-> LIST tvar[l=2:7@iin]
             VARIABLE : T[GT=TAX]
                        indef. integ. on T
             SUBSET   : 6 points (T)
 -8   / 2: -16.00
 -6   / 3: -28.00
 -4   / 4: -36.00
 -2   / 5: -40.00
 0    / 6: -40.00
 2    / 7: -36.00
LIST $1[l=2:4@$2]	! neg/neg l endpoints
 !-> LIST tvar[l=2:4@iin]
             VARIABLE : T[GT=TAX]
                        indef. integ. on T
             SUBSET   : 3 points (T)
 -8   / 2: -16.00
 -6   / 3: -28.00
 -4   / 4: -36.00
LIST $1[l=@$2]	! unspecified limits (neg/pos)
 !-> LIST tvar[l=@iin]
             VARIABLE : T[GT=TAX]
                        indef. integ. on T
             SUBSET   : 11 points (T)
 -10   /  1: -20.00
 -8    /  2: -36.00
 -6    /  3: -48.00
 -4    /  4: -56.00
 -2    /  5: -60.00
 0     /  6: -60.00
 2     /  7: -56.00
 4     /  8: -48.00
 6     /  9: -36.00
 8     / 10: -20.00
 10    / 11:   0.00
 
GO bn_negative_t.sub tvar sum
! bn450_neg_t_trans.sub
 
! support routine for bn450_negative_t.jnl
 
! call as
!   GO bn450_neg_t_sub  varname  transform
 
! tvar axis runs from -10 to 10 by 1's
 
LIST $1[t=-5:5@$2]	! neg/pos t endpoints
 !-> LIST tvar[t=-5:5@sum]
             VARIABLE : T[GT=TAX]
             T        : -5 to 5 (summed)
          0.0000
LIST $1[t=-5:-8@$2]	! neg/neq t endpoints
 !-> LIST tvar[t=-5:-8@sum]
             VARIABLE : T[GT=TAX]
             T        : -8 to -5 (summed)
         -14.00
LIST $1[l=2:7@$2]	! neg/pos l endpoints
 !-> LIST tvar[l=2:7@sum]
             VARIABLE : T[GT=TAX]
             T        : -9 to 3 (summed)
         -18.00
LIST $1[l=2:4@$2]	! neg/neg l endpoints
 !-> LIST tvar[l=2:4@sum]
             VARIABLE : T[GT=TAX]
             T        : -9 to -3 (summed)
         -18.00
LIST $1[l=@$2]	! unspecified limits (neg/pos)
 !-> LIST tvar[l=@sum]
             VARIABLE : T[GT=TAX]
             T        : -11 to 11 (summed)
          0.0000
 
GO bn_negative_t.sub tvar rsu
! bn450_neg_t_trans.sub
 
! support routine for bn450_negative_t.jnl
 
! call as
!   GO bn450_neg_t_sub  varname  transform
 
! tvar axis runs from -10 to 10 by 1's
 
LIST $1[t=-5:5@$2]	! neg/pos t endpoints
 !-> LIST tvar[t=-5:5@rsu]
             VARIABLE : T[GT=TAX]
                        running sum on T
             SUBSET   : 5 points (T)
 -4   / 4: -4.000
 -2   / 5: -6.000
 0    / 6: -6.000
 2    / 7: -4.000
 4    / 8:  0.000
LIST $1[t=-5:-8@$2]	! neg/neq t endpoints
 !-> LIST tvar[t=-5:-8@rsu]
             VARIABLE : T[GT=TAX]
                        running sum on T
             SUBSET   : 2 points (T)
 -8   / 2:  -8.00
 -6   / 3: -14.00
LIST $1[l=2:7@$2]	! neg/pos l endpoints
 !-> LIST tvar[l=2:7@rsu]
             VARIABLE : T[GT=TAX]
                        running sum on T
             SUBSET   : 6 points (T)
 -8   / 2:  -8.00
 -6   / 3: -14.00
 -4   / 4: -18.00
 -2   / 5: -20.00
 0    / 6: -20.00
 2    / 7: -18.00
LIST $1[l=2:4@$2]	! neg/neg l endpoints
 !-> LIST tvar[l=2:4@rsu]
             VARIABLE : T[GT=TAX]
                        running sum on T
             SUBSET   : 3 points (T)
 -8   / 2:  -8.00
 -6   / 3: -14.00
 -4   / 4: -18.00
LIST $1[l=@$2]	! unspecified limits (neg/pos)
 !-> LIST tvar[l=@rsu]
             VARIABLE : T[GT=TAX]
                        running sum on T
             SUBSET   : 11 points (T)
 -10   /  1: -10.00
 -8    /  2: -18.00
 -6    /  3: -24.00
 -4    /  4: -28.00
 -2    /  5: -30.00
 0     /  6: -30.00
 2     /  7: -28.00
 4     /  8: -24.00
 6     /  9: -18.00
 8     / 10: -10.00
 10    / 11:   0.00
 
GO bn_negative_t.sub tvar shf
! bn450_neg_t_trans.sub
 
! support routine for bn450_negative_t.jnl
 
! call as
!   GO bn450_neg_t_sub  varname  transform
 
! tvar axis runs from -10 to 10 by 1's
 
LIST $1[t=-5:5@$2]	! neg/pos t endpoints
 !-> LIST tvar[t=-5:5@shf]
             VARIABLE : T[GT=TAX]
                        shifted by 1 pts on T
             SUBSET   : 5 points (T)
 -4   / 4: -2.000
 -2   / 5:  0.000
 0    / 6:  2.000
 2    / 7:  4.000
 4    / 8:  6.000
LIST $1[t=-5:-8@$2]	! neg/neq t endpoints
 !-> LIST tvar[t=-5:-8@shf]
             VARIABLE : T[GT=TAX]
                        shifted by 1 pts on T
             SUBSET   : 2 points (T)
 -8   / 2: -6.000
 -6   / 3: -4.000
LIST $1[l=2:7@$2]	! neg/pos l endpoints
 !-> LIST tvar[l=2:7@shf]
             VARIABLE : T[GT=TAX]
                        shifted by 1 pts on T
             SUBSET   : 6 points (T)
 -8   / 2: -6.000
 -6   / 3: -4.000
 -4   / 4: -2.000
 -2   / 5:  0.000
 0    / 6:  2.000
 2    / 7:  4.000
LIST $1[l=2:4@$2]	! neg/neg l endpoints
 !-> LIST tvar[l=2:4@shf]
             VARIABLE : T[GT=TAX]
                        shifted by 1 pts on T
             SUBSET   : 3 points (T)
 -8   / 2: -6.000
 -6   / 3: -4.000
 -4   / 4: -2.000
LIST $1[l=@$2]	! unspecified limits (neg/pos)
 !-> LIST tvar[l=@shf]
             VARIABLE : T[GT=TAX]
                        shifted by 1 pts on T
             SUBSET   : 11 points (T)
 -10   /  1:  -8.00
 -8    /  2:  -6.00
 -6    /  3:  -4.00
 -4    /  4:  -2.00
 -2    /  5:   0.00
 0     /  6:   2.00
 2     /  7:   4.00
 4     /  8:   6.00
 6     /  9:   8.00
 8     / 10:  10.00
 10    / 11:   ....
 
GO bn_negative_t.sub tvar min   ! like @max
! bn450_neg_t_trans.sub
 
! support routine for bn450_negative_t.jnl
 
! call as
!   GO bn450_neg_t_sub  varname  transform
 
! tvar axis runs from -10 to 10 by 1's
 
LIST $1[t=-5:5@$2]	! neg/pos t endpoints
 !-> LIST tvar[t=-5:5@min]
             VARIABLE : T[GT=TAX]
             T        : -5 to 5 (minimum)
         -4.000
LIST $1[t=-5:-8@$2]	! neg/neq t endpoints
 !-> LIST tvar[t=-5:-8@min]
             VARIABLE : T[GT=TAX]
             T        : -8 to -5 (minimum)
         -8.000
LIST $1[l=2:7@$2]	! neg/pos l endpoints
 !-> LIST tvar[l=2:7@min]
             VARIABLE : T[GT=TAX]
             T        : -9 to 3 (minimum)
         -8.000
LIST $1[l=2:4@$2]	! neg/neg l endpoints
 !-> LIST tvar[l=2:4@min]
             VARIABLE : T[GT=TAX]
             T        : -9 to -3 (minimum)
         -8.000
LIST $1[l=@$2]	! unspecified limits (neg/pos)
 !-> LIST tvar[l=@min]
             VARIABLE : T[GT=TAX]
             T        : -11 to 11 (minimum)
         -10.00
 
GO bn_negative_t.sub tvar ddf
! bn450_neg_t_trans.sub
 
! support routine for bn450_negative_t.jnl
 
! call as
!   GO bn450_neg_t_sub  varname  transform
 
! tvar axis runs from -10 to 10 by 1's
 
LIST $1[t=-5:5@$2]	! neg/pos t endpoints
 !-> LIST tvar[t=-5:5@ddf]
             VARIABLE : T[GT=TAX]
                        forward derivative on T
             SUBSET   : 5 points (T)
 -4   / 4:  1.000
 -2   / 5:  1.000
 0    / 6:  1.000
 2    / 7:  1.000
 4    / 8:  1.000
LIST $1[t=-5:-8@$2]	! neg/neq t endpoints
 !-> LIST tvar[t=-5:-8@ddf]
             VARIABLE : T[GT=TAX]
                        forward derivative on T
             SUBSET   : 2 points (T)
 -8   / 2:  1.000
 -6   / 3:  1.000
LIST $1[l=2:7@$2]	! neg/pos l endpoints
 !-> LIST tvar[l=2:7@ddf]
             VARIABLE : T[GT=TAX]
                        forward derivative on T
             SUBSET   : 6 points (T)
 -8   / 2:  1.000
 -6   / 3:  1.000
 -4   / 4:  1.000
 -2   / 5:  1.000
 0    / 6:  1.000
 2    / 7:  1.000
LIST $1[l=2:4@$2]	! neg/neg l endpoints
 !-> LIST tvar[l=2:4@ddf]
             VARIABLE : T[GT=TAX]
                        forward derivative on T
             SUBSET   : 3 points (T)
 -8   / 2:  1.000
 -6   / 3:  1.000
 -4   / 4:  1.000
LIST $1[l=@$2]	! unspecified limits (neg/pos)
 !-> LIST tvar[l=@ddf]
             VARIABLE : T[GT=TAX]
                        forward derivative on T
             SUBSET   : 11 points (T)
 -10   /  1:  1.000
 -8    /  2:  1.000
 -6    /  3:  1.000
 -4    /  4:  1.000
 -2    /  5:  1.000
 0     /  6:  1.000
 2     /  7:  1.000
 4     /  8:  1.000
 6     /  9:  1.000
 8     / 10:  1.000
 10    / 11:   ....
 
GO bn_negative_t.sub tvar ddb   ! @ddc like ddf and ddb
! bn450_neg_t_trans.sub
 
! support routine for bn450_negative_t.jnl
 
! call as
!   GO bn450_neg_t_sub  varname  transform
 
! tvar axis runs from -10 to 10 by 1's
 
LIST $1[t=-5:5@$2]	! neg/pos t endpoints
 !-> LIST tvar[t=-5:5@ddb]
             VARIABLE : T[GT=TAX]
                        backwards derivative on T
             SUBSET   : 5 points (T)
 -4   / 4:  1.000
 -2   / 5:  1.000
 0    / 6:  1.000
 2    / 7:  1.000
 4    / 8:  1.000
LIST $1[t=-5:-8@$2]	! neg/neq t endpoints
 !-> LIST tvar[t=-5:-8@ddb]
             VARIABLE : T[GT=TAX]
                        backwards derivative on T
             SUBSET   : 2 points (T)
 -8   / 2:  1.000
 -6   / 3:  1.000
LIST $1[l=2:7@$2]	! neg/pos l endpoints
 !-> LIST tvar[l=2:7@ddb]
             VARIABLE : T[GT=TAX]
                        backwards derivative on T
             SUBSET   : 6 points (T)
 -8   / 2:  1.000
 -6   / 3:  1.000
 -4   / 4:  1.000
 -2   / 5:  1.000
 0    / 6:  1.000
 2    / 7:  1.000
LIST $1[l=2:4@$2]	! neg/neg l endpoints
 !-> LIST tvar[l=2:4@ddb]
             VARIABLE : T[GT=TAX]
                        backwards derivative on T
             SUBSET   : 3 points (T)
 -8   / 2:  1.000
 -6   / 3:  1.000
 -4   / 4:  1.000
LIST $1[l=@$2]	! unspecified limits (neg/pos)
 !-> LIST tvar[l=@ddb]
             VARIABLE : T[GT=TAX]
                        backwards derivative on T
             SUBSET   : 11 points (T)
 -10   /  1:   ....
 -8    /  2:  1.000
 -6    /  3:  1.000
 -4    /  4:  1.000
 -2    /  5:  1.000
 0     /  6:  1.000
 2     /  7:  1.000
 4     /  8:  1.000
 6     /  9:  1.000
 8     / 10:  1.000
 10    / 11:  1.000
 
GO bn_negative_t.sub tvar sbx  ! like sbn, swl, shn, spz
! bn450_neg_t_trans.sub
 
! support routine for bn450_negative_t.jnl
 
! call as
!   GO bn450_neg_t_sub  varname  transform
 
! tvar axis runs from -10 to 10 by 1's
 
LIST $1[t=-5:5@$2]	! neg/pos t endpoints
 !-> LIST tvar[t=-5:5@sbx]
             VARIABLE : T[GT=TAX]
                        box smoothed by 3 pts on T
             SUBSET   : 5 points (T)
 -4   / 4: -4.000
 -2   / 5: -2.000
 0    / 6:  0.000
 2    / 7:  2.000
 4    / 8:  4.000
LIST $1[t=-5:-8@$2]	! neg/neq t endpoints
 !-> LIST tvar[t=-5:-8@sbx]
             VARIABLE : T[GT=TAX]
                        box smoothed by 3 pts on T
             SUBSET   : 2 points (T)
 -8   / 2: -8.000
 -6   / 3: -6.000
LIST $1[l=2:7@$2]	! neg/pos l endpoints
 !-> LIST tvar[l=2:7@sbx]
             VARIABLE : T[GT=TAX]
                        box smoothed by 3 pts on T
             SUBSET   : 6 points (T)
 -8   / 2: -8.000
 -6   / 3: -6.000
 -4   / 4: -4.000
 -2   / 5: -2.000
 0    / 6:  0.000
 2    / 7:  2.000
LIST $1[l=2:4@$2]	! neg/neg l endpoints
 !-> LIST tvar[l=2:4@sbx]
             VARIABLE : T[GT=TAX]
                        box smoothed by 3 pts on T
             SUBSET   : 3 points (T)
 -8   / 2: -8.000
 -6   / 3: -6.000
 -4   / 4: -4.000
LIST $1[l=@$2]	! unspecified limits (neg/pos)
 !-> LIST tvar[l=@sbx]
             VARIABLE : T[GT=TAX]
                        box smoothed by 3 pts on T
             SUBSET   : 11 points (T)
 -10   /  1:   ....
 -8    /  2: -8.000
 -6    /  3: -6.000
 -4    /  4: -4.000
 -2    /  5: -2.000
 0     /  6:  0.000
 2     /  7:  2.000
 4     /  8:  4.000
 6     /  9:  6.000
 8     / 10:  8.000
 10    / 11:   ....
 
GO bn_negative_t.sub tvar loc:-2.2
! bn450_neg_t_trans.sub
 
! support routine for bn450_negative_t.jnl
 
! call as
!   GO bn450_neg_t_sub  varname  transform
 
! tvar axis runs from -10 to 10 by 1's
 
LIST $1[t=-5:5@$2]	! neg/pos t endpoints
 !-> LIST tvar[t=-5:5@loc:-2.2]
             VARIABLE : T of -2.2 in T[GT=TAX]
             T        : -5 to 5 (location of -2.2)
         -2.200
LIST $1[t=-5:-8@$2]	! neg/neq t endpoints
 !-> LIST tvar[t=-5:-8@loc:-2.2]
             VARIABLE : T of -2.2 in T[GT=TAX]
             T        : -8 to -5 (location of -2.2)
        ....
LIST $1[l=2:7@$2]	! neg/pos l endpoints
 !-> LIST tvar[l=2:7@loc:-2.2]
             VARIABLE : T of -2.2 in T[GT=TAX]
             T        : -9 to 3 (location of -2.2)
         -2.200
LIST $1[l=2:4@$2]	! neg/neg l endpoints
 !-> LIST tvar[l=2:4@loc:-2.2]
             VARIABLE : T of -2.2 in T[GT=TAX]
             T        : -9 to -3 (location of -2.2)
        ....
LIST $1[l=@$2]	! unspecified limits (neg/pos)
 !-> LIST tvar[l=@loc:-2.2]
             VARIABLE : T of -2.2 in T[GT=TAX]
             T        : -11 to 11 (location of -2.2)
         -2.200
 
GO bn_negative_t.sub tvar weq:-2.2
! bn450_neg_t_trans.sub
 
! support routine for bn450_negative_t.jnl
 
! call as
!   GO bn450_neg_t_sub  varname  transform
 
! tvar axis runs from -10 to 10 by 1's
 
LIST $1[t=-5:5@$2]	! neg/pos t endpoints
 !-> LIST tvar[t=-5:5@weq:-2.2]
             VARIABLE : T[GT=TAX]
                        weighted equal of -2.2 on T
             SUBSET   : 5 points (T)
 -4   / 4:  0.1000
 -2   / 5:  0.9000
 0    / 6:    ....
 2    / 7:    ....
 4    / 8:    ....
LIST $1[t=-5:-8@$2]	! neg/neq t endpoints
 !-> LIST tvar[t=-5:-8@weq:-2.2]
             VARIABLE : T[GT=TAX]
                        weighted equal of -2.2 on T
             SUBSET   : 2 points (T)
 -8   / 2:....
 -6   / 3:....
LIST $1[l=2:7@$2]	! neg/pos l endpoints
 !-> LIST tvar[l=2:7@weq:-2.2]
             VARIABLE : T[GT=TAX]
                        weighted equal of -2.2 on T
             SUBSET   : 6 points (T)
 -8   / 2:    ....
 -6   / 3:    ....
 -4   / 4:  0.1000
 -2   / 5:  0.9000
 0    / 6:    ....
 2    / 7:    ....
LIST $1[l=2:4@$2]	! neg/neg l endpoints
 !-> LIST tvar[l=2:4@weq:-2.2]
             VARIABLE : T[GT=TAX]
                        weighted equal of -2.2 on T
             SUBSET   : 3 points (T)
 -8   / 2:....
 -6   / 3:....
 -4   / 4:....
LIST $1[l=@$2]	! unspecified limits (neg/pos)
 !-> LIST tvar[l=@weq:-2.2]
             VARIABLE : T[GT=TAX]
                        weighted equal of -2.2 on T
             SUBSET   : 11 points (T)
 -10   /  1:    ....
 -8    /  2:    ....
 -6    /  3:    ....
 -4    /  4:  0.1000
 -2    /  5:  0.9000
 0     /  6:    ....
 2     /  7:    ....
 4     /  8:    ....
 6     /  9:    ....
 8     / 10:    ....
 10    / 11:    ....
 
 
! transformations requiring gappy data to test
LIST tgap
             VARIABLE : IF MOD(T,4) EQ 0 THEN  TVAR
             SUBSET   : 11 points (T)
 -10   /  1:   ....
 -8    /  2: -8.000
 -6    /  3:   ....
 -4    /  4: -4.000
 -2    /  5:   ....
 0     /  6:  0.000
 2     /  7:   ....
 4     /  8:  4.000
 6     /  9:   ....
 8     / 10:  8.000
 10    / 11:   ....
GO bn_negative_t.sub tgap ngd   ! like @nbd
! bn450_neg_t_trans.sub
 
! support routine for bn450_negative_t.jnl
 
! call as
!   GO bn450_neg_t_sub  varname  transform
 
! tvar axis runs from -10 to 10 by 1's
 
LIST $1[t=-5:5@$2]	! neg/pos t endpoints
 !-> LIST tgap[t=-5:5@ngd]
             VARIABLE : IF MOD(T,4) EQ 0 THEN  TVAR (# of points)
             T        : -5 to 5 (number of valid)
          3.000
LIST $1[t=-5:-8@$2]	! neg/neq t endpoints
 !-> LIST tgap[t=-5:-8@ngd]
             VARIABLE : IF MOD(T,4) EQ 0 THEN  TVAR (# of points)
             T        : -8 to -5 (number of valid)
          1.000
LIST $1[l=2:7@$2]	! neg/pos l endpoints
 !-> LIST tgap[l=2:7@ngd]
             VARIABLE : IF MOD(T,4) EQ 0 THEN  TVAR (# of points)
             T        : -9 to 3 (number of valid)
          3.000
LIST $1[l=2:4@$2]	! neg/neg l endpoints
 !-> LIST tgap[l=2:4@ngd]
             VARIABLE : IF MOD(T,4) EQ 0 THEN  TVAR (# of points)
             T        : -9 to -3 (number of valid)
          2.000
LIST $1[l=@$2]	! unspecified limits (neg/pos)
 !-> LIST tgap[l=@ngd]
             VARIABLE : IF MOD(T,4) EQ 0 THEN  TVAR (# of points)
             T        : -11 to 11 (number of valid)
          5.000
 
GO bn_negative_t.sub tgap fav  ! like fln (fnr not implemented)
! bn450_neg_t_trans.sub
 
! support routine for bn450_negative_t.jnl
 
! call as
!   GO bn450_neg_t_sub  varname  transform
 
! tvar axis runs from -10 to 10 by 1's
 
LIST $1[t=-5:5@$2]	! neg/pos t endpoints
 !-> LIST tgap[t=-5:5@fav]
             VARIABLE : IF MOD(T,4) EQ 0 THEN  TVAR
                        ave-filled by 3 pts on T
             SUBSET   : 5 points (T)
 -4   / 4: -4.000
 -2   / 5: -2.000
 0    / 6:  0.000
 2    / 7:  2.000
 4    / 8:  4.000
LIST $1[t=-5:-8@$2]	! neg/neq t endpoints
 !-> LIST tgap[t=-5:-8@fav]
             VARIABLE : IF MOD(T,4) EQ 0 THEN  TVAR
                        ave-filled by 3 pts on T
             SUBSET   : 2 points (T)
 -8   / 2: -8.000
 -6   / 3: -6.000
LIST $1[l=2:7@$2]	! neg/pos l endpoints
 !-> LIST tgap[l=2:7@fav]
             VARIABLE : IF MOD(T,4) EQ 0 THEN  TVAR
                        ave-filled by 3 pts on T
             SUBSET   : 6 points (T)
 -8   / 2: -8.000
 -6   / 3: -6.000
 -4   / 4: -4.000
 -2   / 5: -2.000
 0    / 6:  0.000
 2    / 7:  2.000
LIST $1[l=2:4@$2]	! neg/neg l endpoints
 !-> LIST tgap[l=2:4@fav]
             VARIABLE : IF MOD(T,4) EQ 0 THEN  TVAR
                        ave-filled by 3 pts on T
             SUBSET   : 3 points (T)
 -8   / 2: -8.000
 -6   / 3: -6.000
 -4   / 4: -4.000
LIST $1[l=@$2]	! unspecified limits (neg/pos)
 !-> LIST tgap[l=@fav]
             VARIABLE : IF MOD(T,4) EQ 0 THEN  TVAR
                        ave-filled by 3 pts on T
             SUBSET   : 11 points (T)
 -10   /  1: -8.000
 -8    /  2: -8.000
 -6    /  3: -6.000
 -4    /  4: -4.000
 -2    /  5: -2.000
 0     /  6:  0.000
 2     /  7:  2.000
 4     /  8:  4.000
 6     /  9:  6.000
 8     / 10:  8.000
 10    / 11:  8.000
 
 
LIST tvar[t=-2.2@itp]	! test "@itp"
             VARIABLE : T[GT=TAX]
             T        : -2.2 (interpolated)
         -2.200
 
 
! ****** test regridding ********
 
! source axis
DEFINE AXIS/t=-9:9:1 tsrc
LET a  = t[gt=tsrc]
 
! destination axis
DEFINE AXIS/t=-10:10:2 tdst
 
! regrid by various means
LET blin = a[gt=tdst@lin]
LET bave = a[gt=tdst@ave]
LET basn = a[gt=tdst@asn]
 
! test each of these over various ranges
GO bn_negative_t.sub blin nul
! bn450_neg_t_trans.sub
 
! support routine for bn450_negative_t.jnl
 
! call as
!   GO bn450_neg_t_sub  varname  transform
 
! tvar axis runs from -10 to 10 by 1's
 
LIST $1[t=-5:5@$2]	! neg/pos t endpoints
 !-> LIST blin[t=-5:5@nul]
             VARIABLE : A[GT=TDST@LIN]
             SUBSET   : 5 points (T)
 -4   / 4: -4.000
 -2   / 5: -2.000
 0    / 6:  0.000
 2    / 7:  2.000
 4    / 8:  4.000
LIST $1[t=-5:-8@$2]	! neg/neq t endpoints
 !-> LIST blin[t=-5:-8@nul]
             VARIABLE : A[GT=TDST@LIN]
             SUBSET   : 2 points (T)
 -8   / 2: -8.000
 -6   / 3: -6.000
LIST $1[l=2:7@$2]	! neg/pos l endpoints
 !-> LIST blin[l=2:7@nul]
             VARIABLE : A[GT=TDST@LIN]
             SUBSET   : 6 points (T)
 -8   / 2: -8.000
 -6   / 3: -6.000
 -4   / 4: -4.000
 -2   / 5: -2.000
 0    / 6:  0.000
 2    / 7:  2.000
LIST $1[l=2:4@$2]	! neg/neg l endpoints
 !-> LIST blin[l=2:4@nul]
             VARIABLE : A[GT=TDST@LIN]
             SUBSET   : 3 points (T)
 -8   / 2: -8.000
 -6   / 3: -6.000
 -4   / 4: -4.000
LIST $1[l=@$2]	! unspecified limits (neg/pos)
 !-> LIST blin[l=@nul]
             VARIABLE : A[GT=TDST@LIN]
             SUBSET   : 11 points (T)
 -10   /  1:   ....
 -8    /  2: -8.000
 -6    /  3: -6.000
 -4    /  4: -4.000
 -2    /  5: -2.000
 0     /  6:  0.000
 2     /  7:  2.000
 4     /  8:  4.000
 6     /  9:  6.000
 8     / 10:  8.000
 10    / 11:   ....
 
GO bn_negative_t.sub bave nul
! bn450_neg_t_trans.sub
 
! support routine for bn450_negative_t.jnl
 
! call as
!   GO bn450_neg_t_sub  varname  transform
 
! tvar axis runs from -10 to 10 by 1's
 
LIST $1[t=-5:5@$2]	! neg/pos t endpoints
 !-> LIST bave[t=-5:5@nul]
             VARIABLE : A[GT=TDST@AVE]
             SUBSET   : 5 points (T)
 -4   / 4: -4.000
 -2   / 5: -2.000
 0    / 6:  0.000
 2    / 7:  2.000
 4    / 8:  4.000
LIST $1[t=-5:-8@$2]	! neg/neq t endpoints
 !-> LIST bave[t=-5:-8@nul]
             VARIABLE : A[GT=TDST@AVE]
             SUBSET   : 2 points (T)
 -8   / 2: -8.000
 -6   / 3: -6.000
LIST $1[l=2:7@$2]	! neg/pos l endpoints
 !-> LIST bave[l=2:7@nul]
             VARIABLE : A[GT=TDST@AVE]
             SUBSET   : 6 points (T)
 -8   / 2: -8.000
 -6   / 3: -6.000
 -4   / 4: -4.000
 -2   / 5: -2.000
 0    / 6:  0.000
 2    / 7:  2.000
LIST $1[l=2:4@$2]	! neg/neg l endpoints
 !-> LIST bave[l=2:4@nul]
             VARIABLE : A[GT=TDST@AVE]
             SUBSET   : 3 points (T)
 -8   / 2: -8.000
 -6   / 3: -6.000
 -4   / 4: -4.000
LIST $1[l=@$2]	! unspecified limits (neg/pos)
 !-> LIST bave[l=@nul]
             VARIABLE : A[GT=TDST@AVE]
             SUBSET   : 11 points (T)
 -10   /  1: -9.000
 -8    /  2: -8.000
 -6    /  3: -6.000
 -4    /  4: -4.000
 -2    /  5: -2.000
 0     /  6:  0.000
 2     /  7:  2.000
 4     /  8:  4.000
 6     /  9:  6.000
 8     / 10:  8.000
 10    / 11:  9.000
 
GO bn_negative_t.sub basn nul
! bn450_neg_t_trans.sub
 
! support routine for bn450_negative_t.jnl
 
! call as
!   GO bn450_neg_t_sub  varname  transform
 
! tvar axis runs from -10 to 10 by 1's
 
LIST $1[t=-5:5@$2]	! neg/pos t endpoints
 !-> LIST basn[t=-5:5@nul]
             VARIABLE : A[GT=TDST@ASN]
             SUBSET   : 5 points (T)
 -4   / 4: -6.000
 -2   / 5: -5.000
 0    / 6: -4.000
 2    / 7: -3.000
 4    / 8: -2.000
LIST $1[t=-5:-8@$2]	! neg/neq t endpoints
 !-> LIST basn[t=-5:-8@nul]
             VARIABLE : A[GT=TDST@ASN]
             SUBSET   : 2 points (T)
 -8   / 2: -8.000
 -6   / 3: -7.000
LIST $1[l=2:7@$2]	! neg/pos l endpoints
 !-> LIST basn[l=2:7@nul]
             VARIABLE : A[GT=TDST@ASN]
             SUBSET   : 6 points (T)
 -8   / 2: -8.000
 -6   / 3: -7.000
 -4   / 4: -6.000
 -2   / 5: -5.000
 0    / 6: -4.000
 2    / 7: -3.000
LIST $1[l=2:4@$2]	! neg/neg l endpoints
 !-> LIST basn[l=2:4@nul]
             VARIABLE : A[GT=TDST@ASN]
             SUBSET   : 3 points (T)
 -8   / 2: -8.000
 -6   / 3: -7.000
 -4   / 4: -6.000
LIST $1[l=@$2]	! unspecified limits (neg/pos)
 !-> LIST basn[l=@nul]
             VARIABLE : A[GT=TDST@ASN]
             SUBSET   : 11 points (T)
 -10   /  1: -9.000
 -8    /  2: -8.000
 -6    /  3: -7.000
 -4    /  4: -6.000
 -2    /  5: -5.000
 0     /  6: -4.000
 2     /  7: -3.000
 4     /  8: -2.000
 6     /  9: -1.000
 8     / 10:  0.000
 10    / 11:  1.000
 
 
! true calendar axis
DEFINE AXIS/t=1-jan-1980:30-jan-1980:24/UNITS=hours tcal
! we can regrid by association
LIST a[gt=tcal@asn]
             VARIABLE : T[GT=TSRC]
                        regrid: 24 hour on T@ASN
             SUBSET   : 30 points (TIME)
 01-JAN-1980 00 /  1: -9.000
 02-JAN-1980 00 /  2: -8.000
 03-JAN-1980 00 /  3: -7.000
 04-JAN-1980 00 /  4: -6.000
 05-JAN-1980 00 /  5: -5.000
 06-JAN-1980 00 /  6: -4.000
 07-JAN-1980 00 /  7: -3.000
 08-JAN-1980 00 /  8: -2.000
 09-JAN-1980 00 /  9: -1.000
 10-JAN-1980 00 / 10:  0.000
 11-JAN-1980 00 / 11:  1.000
 12-JAN-1980 00 / 12:  2.000
 13-JAN-1980 00 / 13:  3.000
 14-JAN-1980 00 / 14:  4.000
 15-JAN-1980 00 / 15:  5.000
 16-JAN-1980 00 / 16:  6.000
 17-JAN-1980 00 / 17:  7.000
 18-JAN-1980 00 / 18:  8.000
 19-JAN-1980 00 / 19:  9.000
 20-JAN-1980 00 / 20:   ....
 21-JAN-1980 00 / 21:   ....
 22-JAN-1980 00 / 22:   ....
 23-JAN-1980 00 / 23:   ....
 24-JAN-1980 00 / 24:   ....
 25-JAN-1980 00 / 25:   ....
 26-JAN-1980 00 / 26:   ....
 27-JAN-1980 00 / 27:   ....
 28-JAN-1980 00 / 28:   ....
 29-JAN-1980 00 / 29:   ....
 30-JAN-1980 00 / 30:   ....
LIST/t=1-jan-1980:30-jan-1980 a[gt=tcal@asn]
             VARIABLE : T[GT=TSRC]
                        regrid: 24 hour on T@ASN
             SUBSET   : 30 points (TIME)
 01-JAN-1980 00 /  1: -9.000
 02-JAN-1980 00 /  2: -8.000
 03-JAN-1980 00 /  3: -7.000
 04-JAN-1980 00 /  4: -6.000
 05-JAN-1980 00 /  5: -5.000
 06-JAN-1980 00 /  6: -4.000
 07-JAN-1980 00 /  7: -3.000
 08-JAN-1980 00 /  8: -2.000
 09-JAN-1980 00 /  9: -1.000
 10-JAN-1980 00 / 10:  0.000
 11-JAN-1980 00 / 11:  1.000
 12-JAN-1980 00 / 12:  2.000
 13-JAN-1980 00 / 13:  3.000
 14-JAN-1980 00 / 14:  4.000
 15-JAN-1980 00 / 15:  5.000
 16-JAN-1980 00 / 16:  6.000
 17-JAN-1980 00 / 17:  7.000
 18-JAN-1980 00 / 18:  8.000
 19-JAN-1980 00 / 19:  9.000
 20-JAN-1980 00 / 20:   ....
 21-JAN-1980 00 / 21:   ....
 22-JAN-1980 00 / 22:   ....
 23-JAN-1980 00 / 23:   ....
 24-JAN-1980 00 / 24:   ....
 25-JAN-1980 00 / 25:   ....
 26-JAN-1980 00 / 26:   ....
 27-JAN-1980 00 / 27:   ....
 28-JAN-1980 00 / 28:   ....
 29-JAN-1980 00 / 29:   ....
 30-JAN-1980 00 / 30:   ....
! but any other regridding operation is nonsense
SET MODE ignore_error
LIST a[gt=tcal]		! deliberate error
CANCEL MODE ignore_error
 
*** Running ferret script: bn_xact_regrid.jnl
! BN450_xact_regrid.jnl
 
! 10/97 - test "exact match" regridding
! wherein destination points are filled only if they exactly match
! the coordinate of the cooesponding point on the source grid
 
! X axis tests
CANCEL REGION
GO bn_xact_regrid.sub X
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GX=XDcoarse@XACT]
             VARIABLE : X[GX=XSCOARSE]
                        regrid: 1 delta on X@XACT
             SUBSET   : 5 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GX=XDfine@XACT]
             VARIABLE : X[GX=XSCOARSE]
                        regrid: 0.5 delta on X@XACT
             SUBSET   : 9 points (X)
 1    / 1:  1.000
 1.5  / 2:   ....
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
 4.5  / 8:   ....
 5    / 9:  5.000
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GX=XDcoarse@XACT]
             VARIABLE : X[GX=XSFINE]
                        regrid: 1 delta on X@XACT
             SUBSET   : 5 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GX=XDfine@XACT]
             VARIABLE : X[GX=XSOFFSETBIG]
                        regrid: 0.5 delta on X@XACT
             SUBSET   : 9 points (X)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GX=XDfine@XACT]
             VARIABLE : X[GX=XSOFFSETSMALL]
                        regrid: 0.5 delta on X@XACT
             SUBSET   : 9 points (X)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GX=XDcoarse@XACT]
             VARIABLE : X[GX=XSFINEOFFSET]
                        regrid: 1 delta on X@XACT
             SUBSET   : 5 points (X)
 1   / 1:....
 2   / 2:....
 3   / 3:....
 4   / 4:....
 5   / 5:....
SET REGION/X=2:4
GO bn_xact_regrid.sub X
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GX=XDcoarse@XACT]
             VARIABLE : X[GX=XSCOARSE]
                        regrid: 1 delta on X@XACT
             SUBSET   : 3 points (X)
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GX=XDfine@XACT]
             VARIABLE : X[GX=XSCOARSE]
                        regrid: 0.5 delta on X@XACT
             SUBSET   : 5 points (X)
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GX=XDcoarse@XACT]
             VARIABLE : X[GX=XSFINE]
                        regrid: 1 delta on X@XACT
             SUBSET   : 3 points (X)
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GX=XDfine@XACT]
             VARIABLE : X[GX=XSOFFSETBIG]
                        regrid: 0.5 delta on X@XACT
             SUBSET   : 5 points (X)
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GX=XDfine@XACT]
             VARIABLE : X[GX=XSOFFSETSMALL]
                        regrid: 0.5 delta on X@XACT
             SUBSET   : 5 points (X)
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GX=XDcoarse@XACT]
             VARIABLE : X[GX=XSFINEOFFSET]
                        regrid: 1 delta on X@XACT
             SUBSET   : 3 points (X)
 2   / 2:....
 3   / 3:....
 4   / 4:....
SET REGION/X=1:5
GO bn_xact_regrid.sub X
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GX=XDcoarse@XACT]
             VARIABLE : X[GX=XSCOARSE]
                        regrid: 1 delta on X@XACT
             SUBSET   : 5 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GX=XDfine@XACT]
             VARIABLE : X[GX=XSCOARSE]
                        regrid: 0.5 delta on X@XACT
             SUBSET   : 9 points (X)
 1    / 1:  1.000
 1.5  / 2:   ....
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
 4.5  / 8:   ....
 5    / 9:  5.000
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GX=XDcoarse@XACT]
             VARIABLE : X[GX=XSFINE]
                        regrid: 1 delta on X@XACT
             SUBSET   : 5 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GX=XDfine@XACT]
             VARIABLE : X[GX=XSOFFSETBIG]
                        regrid: 0.5 delta on X@XACT
             SUBSET   : 9 points (X)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GX=XDfine@XACT]
             VARIABLE : X[GX=XSOFFSETSMALL]
                        regrid: 0.5 delta on X@XACT
             SUBSET   : 9 points (X)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GX=XDcoarse@XACT]
             VARIABLE : X[GX=XSFINEOFFSET]
                        regrid: 1 delta on X@XACT
             SUBSET   : 5 points (X)
 1   / 1:....
 2   / 2:....
 3   / 3:....
 4   / 4:....
 5   / 5:....
SET REGION/X=1.5:4.5
GO bn_xact_regrid.sub X
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GX=XDcoarse@XACT]
             VARIABLE : X[GX=XSCOARSE]
                        regrid: 1 delta on X@XACT
             SUBSET   : 3 points (X)
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GX=XDfine@XACT]
             VARIABLE : X[GX=XSCOARSE]
                        regrid: 0.5 delta on X@XACT
             SUBSET   : 7 points (X)
 1.5  / 2:   ....
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
 4.5  / 8:   ....
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GX=XDcoarse@XACT]
             VARIABLE : X[GX=XSFINE]
                        regrid: 1 delta on X@XACT
             SUBSET   : 3 points (X)
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GX=XDfine@XACT]
             VARIABLE : X[GX=XSOFFSETBIG]
                        regrid: 0.5 delta on X@XACT
             SUBSET   : 7 points (X)
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GX=XDfine@XACT]
             VARIABLE : X[GX=XSOFFSETSMALL]
                        regrid: 0.5 delta on X@XACT
             SUBSET   : 7 points (X)
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GX=XDcoarse@XACT]
             VARIABLE : X[GX=XSFINEOFFSET]
                        regrid: 1 delta on X@XACT
             SUBSET   : 3 points (X)
 2   / 2:....
 3   / 3:....
 4   / 4:....
SET REGION/X=0:6
GO bn_xact_regrid.sub X
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GX=XDcoarse@XACT]
             VARIABLE : X[GX=XSCOARSE]
                        regrid: 1 delta on X@XACT
             SUBSET   : 5 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GX=XDfine@XACT]
             VARIABLE : X[GX=XSCOARSE]
                        regrid: 0.5 delta on X@XACT
             SUBSET   : 9 points (X)
 1    / 1:  1.000
 1.5  / 2:   ....
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
 4.5  / 8:   ....
 5    / 9:  5.000
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GX=XDcoarse@XACT]
             VARIABLE : X[GX=XSFINE]
                        regrid: 1 delta on X@XACT
             SUBSET   : 5 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GX=XDfine@XACT]
             VARIABLE : X[GX=XSOFFSETBIG]
                        regrid: 0.5 delta on X@XACT
             SUBSET   : 9 points (X)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GX=XDfine@XACT]
             VARIABLE : X[GX=XSOFFSETSMALL]
                        regrid: 0.5 delta on X@XACT
             SUBSET   : 9 points (X)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GX=XDcoarse@XACT]
             VARIABLE : X[GX=XSFINEOFFSET]
                        regrid: 1 delta on X@XACT
             SUBSET   : 5 points (X)
 1   / 1:....
 2   / 2:....
 3   / 3:....
 4   / 4:....
 5   / 5:....
 
! Y axis tests
CANCEL REGION
GO bn_xact_regrid.sub Y
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GY=YDcoarse@XACT]
             VARIABLE : Y[GY=YSCOARSE]
                        regrid: 1 delta on Y@XACT
             SUBSET   : 5 points (Y)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GY=YDfine@XACT]
             VARIABLE : Y[GY=YSCOARSE]
                        regrid: 0.5 delta on Y@XACT
             SUBSET   : 9 points (Y)
 1    / 1:  1.000
 1.5  / 2:   ....
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
 4.5  / 8:   ....
 5    / 9:  5.000
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GY=YDcoarse@XACT]
             VARIABLE : Y[GY=YSFINE]
                        regrid: 1 delta on Y@XACT
             SUBSET   : 5 points (Y)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GY=YDfine@XACT]
             VARIABLE : Y[GY=YSOFFSETBIG]
                        regrid: 0.5 delta on Y@XACT
             SUBSET   : 9 points (Y)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GY=YDfine@XACT]
             VARIABLE : Y[GY=YSOFFSETSMALL]
                        regrid: 0.5 delta on Y@XACT
             SUBSET   : 9 points (Y)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GY=YDcoarse@XACT]
             VARIABLE : Y[GY=YSFINEOFFSET]
                        regrid: 1 delta on Y@XACT
             SUBSET   : 5 points (Y)
 1   / 1:....
 2   / 2:....
 3   / 3:....
 4   / 4:....
 5   / 5:....
SET REGION/Y=2:4
GO bn_xact_regrid.sub Y
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GY=YDcoarse@XACT]
             VARIABLE : Y[GY=YSCOARSE]
                        regrid: 1 delta on Y@XACT
             SUBSET   : 3 points (Y)
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GY=YDfine@XACT]
             VARIABLE : Y[GY=YSCOARSE]
                        regrid: 0.5 delta on Y@XACT
             SUBSET   : 5 points (Y)
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GY=YDcoarse@XACT]
             VARIABLE : Y[GY=YSFINE]
                        regrid: 1 delta on Y@XACT
             SUBSET   : 3 points (Y)
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GY=YDfine@XACT]
             VARIABLE : Y[GY=YSOFFSETBIG]
                        regrid: 0.5 delta on Y@XACT
             SUBSET   : 5 points (Y)
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GY=YDfine@XACT]
             VARIABLE : Y[GY=YSOFFSETSMALL]
                        regrid: 0.5 delta on Y@XACT
             SUBSET   : 5 points (Y)
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GY=YDcoarse@XACT]
             VARIABLE : Y[GY=YSFINEOFFSET]
                        regrid: 1 delta on Y@XACT
             SUBSET   : 3 points (Y)
 2   / 2:....
 3   / 3:....
 4   / 4:....
SET REGION/Y=1:5
GO bn_xact_regrid.sub Y
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GY=YDcoarse@XACT]
             VARIABLE : Y[GY=YSCOARSE]
                        regrid: 1 delta on Y@XACT
             SUBSET   : 5 points (Y)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GY=YDfine@XACT]
             VARIABLE : Y[GY=YSCOARSE]
                        regrid: 0.5 delta on Y@XACT
             SUBSET   : 9 points (Y)
 1    / 1:  1.000
 1.5  / 2:   ....
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
 4.5  / 8:   ....
 5    / 9:  5.000
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GY=YDcoarse@XACT]
             VARIABLE : Y[GY=YSFINE]
                        regrid: 1 delta on Y@XACT
             SUBSET   : 5 points (Y)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GY=YDfine@XACT]
             VARIABLE : Y[GY=YSOFFSETBIG]
                        regrid: 0.5 delta on Y@XACT
             SUBSET   : 9 points (Y)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GY=YDfine@XACT]
             VARIABLE : Y[GY=YSOFFSETSMALL]
                        regrid: 0.5 delta on Y@XACT
             SUBSET   : 9 points (Y)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GY=YDcoarse@XACT]
             VARIABLE : Y[GY=YSFINEOFFSET]
                        regrid: 1 delta on Y@XACT
             SUBSET   : 5 points (Y)
 1   / 1:....
 2   / 2:....
 3   / 3:....
 4   / 4:....
 5   / 5:....
SET REGION/Y=1.5:4.5
GO bn_xact_regrid.sub Y
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GY=YDcoarse@XACT]
             VARIABLE : Y[GY=YSCOARSE]
                        regrid: 1 delta on Y@XACT
             SUBSET   : 3 points (Y)
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GY=YDfine@XACT]
             VARIABLE : Y[GY=YSCOARSE]
                        regrid: 0.5 delta on Y@XACT
             SUBSET   : 7 points (Y)
 1.5  / 2:   ....
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
 4.5  / 8:   ....
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GY=YDcoarse@XACT]
             VARIABLE : Y[GY=YSFINE]
                        regrid: 1 delta on Y@XACT
             SUBSET   : 3 points (Y)
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GY=YDfine@XACT]
             VARIABLE : Y[GY=YSOFFSETBIG]
                        regrid: 0.5 delta on Y@XACT
             SUBSET   : 7 points (Y)
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GY=YDfine@XACT]
             VARIABLE : Y[GY=YSOFFSETSMALL]
                        regrid: 0.5 delta on Y@XACT
             SUBSET   : 7 points (Y)
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GY=YDcoarse@XACT]
             VARIABLE : Y[GY=YSFINEOFFSET]
                        regrid: 1 delta on Y@XACT
             SUBSET   : 3 points (Y)
 2   / 2:....
 3   / 3:....
 4   / 4:....
SET REGION/Y=0:6
GO bn_xact_regrid.sub Y
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GY=YDcoarse@XACT]
             VARIABLE : Y[GY=YSCOARSE]
                        regrid: 1 delta on Y@XACT
             SUBSET   : 5 points (Y)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GY=YDfine@XACT]
             VARIABLE : Y[GY=YSCOARSE]
                        regrid: 0.5 delta on Y@XACT
             SUBSET   : 9 points (Y)
 1    / 1:  1.000
 1.5  / 2:   ....
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
 4.5  / 8:   ....
 5    / 9:  5.000
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GY=YDcoarse@XACT]
             VARIABLE : Y[GY=YSFINE]
                        regrid: 1 delta on Y@XACT
             SUBSET   : 5 points (Y)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GY=YDfine@XACT]
             VARIABLE : Y[GY=YSOFFSETBIG]
                        regrid: 0.5 delta on Y@XACT
             SUBSET   : 9 points (Y)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GY=YDfine@XACT]
             VARIABLE : Y[GY=YSOFFSETSMALL]
                        regrid: 0.5 delta on Y@XACT
             SUBSET   : 9 points (Y)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GY=YDcoarse@XACT]
             VARIABLE : Y[GY=YSFINEOFFSET]
                        regrid: 1 delta on Y@XACT
             SUBSET   : 5 points (Y)
 1   / 1:....
 2   / 2:....
 3   / 3:....
 4   / 4:....
 5   / 5:....
 
! Z axis tests
CANCEL REGION
GO bn_xact_regrid.sub Z
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GZ=ZDcoarse@XACT]
             VARIABLE : Z[GZ=ZSCOARSE]
                        regrid: 1 delta on Z@XACT
             SUBSET   : 5 points (Z)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GZ=ZDfine@XACT]
             VARIABLE : Z[GZ=ZSCOARSE]
                        regrid: 0.5 delta on Z@XACT
             SUBSET   : 9 points (Z)
 1    / 1:  1.000
 1.5  / 2:   ....
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
 4.5  / 8:   ....
 5    / 9:  5.000
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GZ=ZDcoarse@XACT]
             VARIABLE : Z[GZ=ZSFINE]
                        regrid: 1 delta on Z@XACT
             SUBSET   : 5 points (Z)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GZ=ZDfine@XACT]
             VARIABLE : Z[GZ=ZSOFFSETBIG]
                        regrid: 0.5 delta on Z@XACT
             SUBSET   : 9 points (Z)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GZ=ZDfine@XACT]
             VARIABLE : Z[GZ=ZSOFFSETSMALL]
                        regrid: 0.5 delta on Z@XACT
             SUBSET   : 9 points (Z)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GZ=ZDcoarse@XACT]
             VARIABLE : Z[GZ=ZSFINEOFFSET]
                        regrid: 1 delta on Z@XACT
             SUBSET   : 5 points (Z)
 1   / 1:....
 2   / 2:....
 3   / 3:....
 4   / 4:....
 5   / 5:....
SET REGION/Z=2:4
GO bn_xact_regrid.sub Z
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GZ=ZDcoarse@XACT]
             VARIABLE : Z[GZ=ZSCOARSE]
                        regrid: 1 delta on Z@XACT
             SUBSET   : 3 points (Z)
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GZ=ZDfine@XACT]
             VARIABLE : Z[GZ=ZSCOARSE]
                        regrid: 0.5 delta on Z@XACT
             SUBSET   : 5 points (Z)
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GZ=ZDcoarse@XACT]
             VARIABLE : Z[GZ=ZSFINE]
                        regrid: 1 delta on Z@XACT
             SUBSET   : 3 points (Z)
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GZ=ZDfine@XACT]
             VARIABLE : Z[GZ=ZSOFFSETBIG]
                        regrid: 0.5 delta on Z@XACT
             SUBSET   : 5 points (Z)
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GZ=ZDfine@XACT]
             VARIABLE : Z[GZ=ZSOFFSETSMALL]
                        regrid: 0.5 delta on Z@XACT
             SUBSET   : 5 points (Z)
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GZ=ZDcoarse@XACT]
             VARIABLE : Z[GZ=ZSFINEOFFSET]
                        regrid: 1 delta on Z@XACT
             SUBSET   : 3 points (Z)
 2   / 2:....
 3   / 3:....
 4   / 4:....
SET REGION/Z=1:5
GO bn_xact_regrid.sub Z
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GZ=ZDcoarse@XACT]
             VARIABLE : Z[GZ=ZSCOARSE]
                        regrid: 1 delta on Z@XACT
             SUBSET   : 5 points (Z)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GZ=ZDfine@XACT]
             VARIABLE : Z[GZ=ZSCOARSE]
                        regrid: 0.5 delta on Z@XACT
             SUBSET   : 9 points (Z)
 1    / 1:  1.000
 1.5  / 2:   ....
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
 4.5  / 8:   ....
 5    / 9:  5.000
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GZ=ZDcoarse@XACT]
             VARIABLE : Z[GZ=ZSFINE]
                        regrid: 1 delta on Z@XACT
             SUBSET   : 5 points (Z)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GZ=ZDfine@XACT]
             VARIABLE : Z[GZ=ZSOFFSETBIG]
                        regrid: 0.5 delta on Z@XACT
             SUBSET   : 9 points (Z)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GZ=ZDfine@XACT]
             VARIABLE : Z[GZ=ZSOFFSETSMALL]
                        regrid: 0.5 delta on Z@XACT
             SUBSET   : 9 points (Z)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GZ=ZDcoarse@XACT]
             VARIABLE : Z[GZ=ZSFINEOFFSET]
                        regrid: 1 delta on Z@XACT
             SUBSET   : 5 points (Z)
 1   / 1:....
 2   / 2:....
 3   / 3:....
 4   / 4:....
 5   / 5:....
SET REGION/Z=1.5:4.5
GO bn_xact_regrid.sub Z
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GZ=ZDcoarse@XACT]
             VARIABLE : Z[GZ=ZSCOARSE]
                        regrid: 1 delta on Z@XACT
             SUBSET   : 3 points (Z)
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GZ=ZDfine@XACT]
             VARIABLE : Z[GZ=ZSCOARSE]
                        regrid: 0.5 delta on Z@XACT
             SUBSET   : 7 points (Z)
 1.5  / 2:   ....
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
 4.5  / 8:   ....
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GZ=ZDcoarse@XACT]
             VARIABLE : Z[GZ=ZSFINE]
                        regrid: 1 delta on Z@XACT
             SUBSET   : 3 points (Z)
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GZ=ZDfine@XACT]
             VARIABLE : Z[GZ=ZSOFFSETBIG]
                        regrid: 0.5 delta on Z@XACT
             SUBSET   : 7 points (Z)
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GZ=ZDfine@XACT]
             VARIABLE : Z[GZ=ZSOFFSETSMALL]
                        regrid: 0.5 delta on Z@XACT
             SUBSET   : 7 points (Z)
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GZ=ZDcoarse@XACT]
             VARIABLE : Z[GZ=ZSFINEOFFSET]
                        regrid: 1 delta on Z@XACT
             SUBSET   : 3 points (Z)
 2   / 2:....
 3   / 3:....
 4   / 4:....
SET REGION/Z=0:6
GO bn_xact_regrid.sub Z
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GZ=ZDcoarse@XACT]
             VARIABLE : Z[GZ=ZSCOARSE]
                        regrid: 1 delta on Z@XACT
             SUBSET   : 5 points (Z)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GZ=ZDfine@XACT]
             VARIABLE : Z[GZ=ZSCOARSE]
                        regrid: 0.5 delta on Z@XACT
             SUBSET   : 9 points (Z)
 1    / 1:  1.000
 1.5  / 2:   ....
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
 4.5  / 8:   ....
 5    / 9:  5.000
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GZ=ZDcoarse@XACT]
             VARIABLE : Z[GZ=ZSFINE]
                        regrid: 1 delta on Z@XACT
             SUBSET   : 5 points (Z)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GZ=ZDfine@XACT]
             VARIABLE : Z[GZ=ZSOFFSETBIG]
                        regrid: 0.5 delta on Z@XACT
             SUBSET   : 9 points (Z)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GZ=ZDfine@XACT]
             VARIABLE : Z[GZ=ZSOFFSETSMALL]
                        regrid: 0.5 delta on Z@XACT
             SUBSET   : 9 points (Z)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GZ=ZDcoarse@XACT]
             VARIABLE : Z[GZ=ZSFINEOFFSET]
                        regrid: 1 delta on Z@XACT
             SUBSET   : 5 points (Z)
 1   / 1:....
 2   / 2:....
 3   / 3:....
 4   / 4:....
 5   / 5:....
 
! T axis tests
CANCEL REGION
GO bn_xact_regrid.sub T
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GT=TDcoarse@XACT]
             VARIABLE : T[GT=TSCOARSE]
                        regrid: 1 delta on T@XACT
             SUBSET   : 5 points (T)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GT=TDfine@XACT]
             VARIABLE : T[GT=TSCOARSE]
                        regrid: 0.5 delta on T@XACT
             SUBSET   : 9 points (T)
 1    / 1:  1.000
 1.5  / 2:   ....
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
 4.5  / 8:   ....
 5    / 9:  5.000
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GT=TDcoarse@XACT]
             VARIABLE : T[GT=TSFINE]
                        regrid: 1 delta on T@XACT
             SUBSET   : 5 points (T)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GT=TDfine@XACT]
             VARIABLE : T[GT=TSOFFSETBIG]
                        regrid: 0.5 delta on T@XACT
             SUBSET   : 9 points (T)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GT=TDfine@XACT]
             VARIABLE : T[GT=TSOFFSETSMALL]
                        regrid: 0.5 delta on T@XACT
             SUBSET   : 9 points (T)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GT=TDcoarse@XACT]
             VARIABLE : T[GT=TSFINEOFFSET]
                        regrid: 1 delta on T@XACT
             SUBSET   : 5 points (T)
 1   / 1:....
 2   / 2:....
 3   / 3:....
 4   / 4:....
 5   / 5:....
SET REGION/T=2:4
GO bn_xact_regrid.sub T
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GT=TDcoarse@XACT]
             VARIABLE : T[GT=TSCOARSE]
                        regrid: 1 delta on T@XACT
             SUBSET   : 3 points (T)
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GT=TDfine@XACT]
             VARIABLE : T[GT=TSCOARSE]
                        regrid: 0.5 delta on T@XACT
             SUBSET   : 5 points (T)
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GT=TDcoarse@XACT]
             VARIABLE : T[GT=TSFINE]
                        regrid: 1 delta on T@XACT
             SUBSET   : 3 points (T)
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GT=TDfine@XACT]
             VARIABLE : T[GT=TSOFFSETBIG]
                        regrid: 0.5 delta on T@XACT
             SUBSET   : 5 points (T)
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GT=TDfine@XACT]
             VARIABLE : T[GT=TSOFFSETSMALL]
                        regrid: 0.5 delta on T@XACT
             SUBSET   : 5 points (T)
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GT=TDcoarse@XACT]
             VARIABLE : T[GT=TSFINEOFFSET]
                        regrid: 1 delta on T@XACT
             SUBSET   : 3 points (T)
 2   / 2:....
 3   / 3:....
 4   / 4:....
SET REGION/T=1:5
GO bn_xact_regrid.sub T
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GT=TDcoarse@XACT]
             VARIABLE : T[GT=TSCOARSE]
                        regrid: 1 delta on T@XACT
             SUBSET   : 5 points (T)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GT=TDfine@XACT]
             VARIABLE : T[GT=TSCOARSE]
                        regrid: 0.5 delta on T@XACT
             SUBSET   : 9 points (T)
 1    / 1:  1.000
 1.5  / 2:   ....
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
 4.5  / 8:   ....
 5    / 9:  5.000
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GT=TDcoarse@XACT]
             VARIABLE : T[GT=TSFINE]
                        regrid: 1 delta on T@XACT
             SUBSET   : 5 points (T)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GT=TDfine@XACT]
             VARIABLE : T[GT=TSOFFSETBIG]
                        regrid: 0.5 delta on T@XACT
             SUBSET   : 9 points (T)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GT=TDfine@XACT]
             VARIABLE : T[GT=TSOFFSETSMALL]
                        regrid: 0.5 delta on T@XACT
             SUBSET   : 9 points (T)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GT=TDcoarse@XACT]
             VARIABLE : T[GT=TSFINEOFFSET]
                        regrid: 1 delta on T@XACT
             SUBSET   : 5 points (T)
 1   / 1:....
 2   / 2:....
 3   / 3:....
 4   / 4:....
 5   / 5:....
SET REGION/T=1.5:4.5
GO bn_xact_regrid.sub T
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GT=TDcoarse@XACT]
             VARIABLE : T[GT=TSCOARSE]
                        regrid: 1 delta on T@XACT
             SUBSET   : 3 points (T)
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GT=TDfine@XACT]
             VARIABLE : T[GT=TSCOARSE]
                        regrid: 0.5 delta on T@XACT
             SUBSET   : 7 points (T)
 1.5  / 2:   ....
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
 4.5  / 8:   ....
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GT=TDcoarse@XACT]
             VARIABLE : T[GT=TSFINE]
                        regrid: 1 delta on T@XACT
             SUBSET   : 3 points (T)
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GT=TDfine@XACT]
             VARIABLE : T[GT=TSOFFSETBIG]
                        regrid: 0.5 delta on T@XACT
             SUBSET   : 7 points (T)
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GT=TDfine@XACT]
             VARIABLE : T[GT=TSOFFSETSMALL]
                        regrid: 0.5 delta on T@XACT
             SUBSET   : 7 points (T)
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GT=TDcoarse@XACT]
             VARIABLE : T[GT=TSFINEOFFSET]
                        regrid: 1 delta on T@XACT
             SUBSET   : 3 points (T)
 2   / 2:....
 3   / 3:....
 4   / 4:....
SET REGION/T=0:6
GO bn_xact_regrid.sub T
! PERFORM REGRIDDINGS
LIST Scoarse[G$1=$1Dcoarse@XACT]! same src and dst axis
 !-> LIST Scoarse[GT=TDcoarse@XACT]
             VARIABLE : T[GT=TSCOARSE]
                        regrid: 1 delta on T@XACT
             SUBSET   : 5 points (T)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Scoarse[G$1=$1Dfine@XACT]	! coarse data onto fine grid
 !-> LIST Scoarse[GT=TDfine@XACT]
             VARIABLE : T[GT=TSCOARSE]
                        regrid: 0.5 delta on T@XACT
             SUBSET   : 9 points (T)
 1    / 1:  1.000
 1.5  / 2:   ....
 2    / 3:  2.000
 2.5  / 4:   ....
 3    / 5:  3.000
 3.5  / 6:   ....
 4    / 7:  4.000
 4.5  / 8:   ....
 5    / 9:  5.000
LIST Sfine[G$1=$1Dcoarse@XACT]	! fine data onto coarse grid
 !-> LIST Sfine[GT=TDcoarse@XACT]
             VARIABLE : T[GT=TSFINE]
                        regrid: 1 delta on T@XACT
             SUBSET   : 5 points (T)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
LIST Soffsetbig[G$1=$1Dfine@XACT]   ! non-aligning grid points coarse to fine
 !-> LIST Soffsetbig[GT=TDfine@XACT]
             VARIABLE : T[GT=TSOFFSETBIG]
                        regrid: 0.5 delta on T@XACT
             SUBSET   : 9 points (T)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Soffsetsmall[G$1=$1Dfine@XACT] ! non-aligning grid points coarse to fine
 !-> LIST Soffsetsmall[GT=TDfine@XACT]
             VARIABLE : T[GT=TSOFFSETSMALL]
                        regrid: 0.5 delta on T@XACT
             SUBSET   : 9 points (T)
 1    / 1:   ....
 1.5  / 2:  1.500
 2    / 3:   ....
 2.5  / 4:  2.500
 3    / 5:   ....
 3.5  / 6:  3.500
 4    / 7:   ....
 4.5  / 8:  4.500
 5    / 9:   ....
LIST Sfineoffset[G$1=$1Dcoarse@XACT]! non-aligning grid points fine to coarse
 !-> LIST Sfineoffset[GT=TDcoarse@XACT]
             VARIABLE : T[GT=TSFINEOFFSET]
                        regrid: 1 delta on T@XACT
             SUBSET   : 5 points (T)
 1   / 1:....
 2   / 2:....
 3   / 3:....
 4   / 4:....
 5   / 5:....
 
 
*** Running ferret script: bn_gc_functions.jnl
! bn500_gc_functions.jnl
 
! 10/97 - first version - test GC functions released in V4.9
! 3/98 - added single test of a dynamic axis passed to GC fcn
! Note: OFFSET VALUES NOT YET TESTED
 
! 2/99 "UNRAVEL" renamed to XSEQUENCE
! 1/00 changes to RESHAPE tests ==> "K=1" removed
 
CANCEL REGION
CANCEL VIEWPORTS
 
! XSEQUENCE function
LET v = X[x=1:4:1] + Y[Y=.1:.4:.1]
LIST v
             VARIABLE : X[X=1:4:1] + Y[Y=.1:.4:.1]
             SUBSET   : 4 by 4 points (X-Y)
              1      2      3      4    
              1      2      3      4
 0.1  / 1:  1.100  2.100  3.100  4.100
 0.2  / 2:  1.200  2.200  3.200  4.200
 0.3  / 3:  1.300  2.300  3.300  4.300
 0.4  / 4:  1.400  2.400  3.400  4.400
LIST SIN(v)	! preserves source grid
             VARIABLE : SIN(V)
             SUBSET   : 4 by 4 points (X-Y)
              1       2       3       4     
               1       2       3       4
 0.1  / 1:  0.8912  0.8632  0.0416 -0.8183
 0.2  / 2:  0.9320  0.8085 -0.0584 -0.8716
 0.3  / 3:  0.9636  0.7457 -0.1577 -0.9162
 0.4  / 4:  0.9854  0.6755 -0.2555 -0.9516
LIST XSEQUENCE(v)	! replaces source grid
             VARIABLE : XSEQUENCE(V)
             SUBSET   : 16 points (X)
 1    /  1:  1.100
 2    /  2:  2.100
 3    /  3:  3.100
 4    /  4:  4.100
 5    /  5:  1.200
 6    /  6:  2.200
 7    /  7:  3.200
 8    /  8:  4.200
 9    /  9:  1.300
 10   / 10:  2.300
 11   / 11:  3.300
 12   / 12:  4.300
 13   / 13:  1.400
 14   / 14:  2.400
 15   / 15:  3.400
 16   / 16:  4.400
STAT v, XSEQUENCE(v)
 
             X[X=1:4:1] + Y[Y=.1:.4:.1]
             X: 0.5 to 4.5
             Y: 0.05 to 0.45
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 16 (4*4*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 1.1
 Maximum value: 4.4
 Mean    value: 2.75 (unweighted average)
 Standard deviation: 1.1605
 
             XSEQUENCE(V)
             X: 0.5 to 16.5
             Y:  N/A
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 16 (16*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 1.1
 Maximum value: 4.4
 Mean    value: 2.75 (unweighted average)
 Standard deviation: 1.1605
 
! check regions specified on source and on destination
LIST/I=3:5 XSEQUENCE(v)	! destination region
             VARIABLE : XSEQUENCE(V)
             SUBSET   : 3 points (X)
 3   / 3:  3.100
 4   / 4:  4.100
 5   / 5:  1.200
 
LIST v[I=2:3,J=2:3]
             VARIABLE : X[X=1:4:1] + Y[Y=.1:.4:.1]
             SUBSET   : 2 by 2 points (X-Y)
              2      3    
              2      3
 0.2  / 2:  2.200  3.200
 0.3  / 3:  2.300  3.300
LIST XSEQUENCE( v[I=2:3,J=2:3] )
             VARIABLE : XSEQUENCE( V[I=2:3,J=2:3] )
             SUBSET   : 4 points (X)
 1   / 1:  2.200
 2   / 2:  3.200
 3   / 3:  2.300
 4   / 4:  3.300
LIST/I=2:3 XSEQUENCE( v[I=2:3,J=2:3] )
             VARIABLE : XSEQUENCE( V[I=2:3,J=2:3] )
             SUBSET   : 2 points (X)
 2   / 2:  3.200
 3   / 3:  2.300
 
! check grid interactions where XSEQUENCE is inside of expression
LET a = XSEQUENCE( v[I=2:3,J=2:3] ) + Z[Z=.01:.02:.01]
LIST a
             VARIABLE : XSEQUENCE( V[I=2:3,J=2:3] ) + Z[Z=.01:.02:.01]
             SUBSET   : 4 by 2 points (X-Z)
               1      2      3      4    
               1      2      3      4
 0.01  / 1:  2.210  3.210  2.310  3.310
 0.02  / 2:  2.220  3.220  2.320  3.320
 
! RESHAPE function
DEFINE AXIS/X=1:4:1 x4
DEFINE AXIS/Y=.1:.4:.1 y4
DEFINE AXIS/Z=.01:.04:.01 z4
DEFINE AXIS/T=.001:.004:.001 T4
DEFINE GRID/X=x4/Y=y4/Z=z4/T=t4 g4d
LET v4d = X[x=1:3:1] + Y[Y=.1:.3:.1] + Z[Z=.01:.03:.01] + T[T=.001:.003:.001]
LIST v4d
             VARIABLE : X[X=1:3:1] + Y[Y=.1:.3:.1] + Z[Z=.01:.03:.01] + T[T=.001:.003:.001]
             SUBSET   : 3 by 3 by 3 by 3 points (X-Y-Z-T)
              1      2      3    
              1      2      3
 ---- L:1 T:   0.001
 ---- K:1 Z:   0.01
 0.1  / 1:  1.111  2.111  3.111
 0.2  / 2:  1.211  2.211  3.211
 0.3  / 3:  1.311  2.311  3.311
 ---- K:2 Z:   0.02
 0.1  / 1:  1.121  2.121  3.121
 0.2  / 2:  1.221  2.221  3.221
 0.3  / 3:  1.321  2.321  3.321
 ---- K:3 Z:   0.03
 0.1  / 1:  1.131  2.131  3.131
 0.2  / 2:  1.231  2.231  3.231
 0.3  / 3:  1.331  2.331  3.331
 ---- L:2 T:   0.002
 ---- K:1 Z:   0.01
 0.1  / 1:  1.112  2.112  3.112
 0.2  / 2:  1.212  2.212  3.212
 0.3  / 3:  1.312  2.312  3.312
 ---- K:2 Z:   0.02
 0.1  / 1:  1.122  2.122  3.122
 0.2  / 2:  1.222  2.222  3.222
 0.3  / 3:  1.322  2.322  3.322
 ---- K:3 Z:   0.03
 0.1  / 1:  1.132  2.132  3.132
 0.2  / 2:  1.232  2.232  3.232
 0.3  / 3:  1.332  2.332  3.332
 ---- L:3 T:   0.003
 ---- K:1 Z:   0.01
 0.1  / 1:  1.113  2.113  3.113
 0.2  / 2:  1.213  2.213  3.213
 0.3  / 3:  1.313  2.313  3.313
 ---- K:2 Z:   0.02
 0.1  / 1:  1.123  2.123  3.123
 0.2  / 2:  1.223  2.223  3.223
 0.3  / 3:  1.323  2.323  3.323
 ---- K:3 Z:   0.03
 0.1  / 1:  1.133  2.133  3.133
 0.2  / 2:  1.233  2.233  3.233
 0.3  / 3:  1.333  2.333  3.333
LET V3d =  X[x=1:3:1] + Y[Y=.1:.3:.1] + Z[Z=.01:.09:.01]	! same size
LIST v3d
             VARIABLE : X[X=1:3:1] + Y[Y=.1:.3:.1] + Z[Z=.01:.09:.01]
             SUBSET   : 3 by 3 by 9 points (X-Y-Z)
              1      2      3    
              1      2      3
 ---- K:1 Z:   0.01
 0.1  / 1:  1.110  2.110  3.110
 0.2  / 2:  1.210  2.210  3.210
 0.3  / 3:  1.310  2.310  3.310
 ---- K:2 Z:   0.02
 0.1  / 1:  1.120  2.120  3.120
 0.2  / 2:  1.220  2.220  3.220
 0.3  / 3:  1.320  2.320  3.320
 ---- K:3 Z:   0.03
 0.1  / 1:  1.130  2.130  3.130
 0.2  / 2:  1.230  2.230  3.230
 0.3  / 3:  1.330  2.330  3.330
 ---- K:4 Z:   0.04
 0.1  / 1:  1.140  2.140  3.140
 0.2  / 2:  1.240  2.240  3.240
 0.3  / 3:  1.340  2.340  3.340
 ---- K:5 Z:   0.05
 0.1  / 1:  1.150  2.150  3.150
 0.2  / 2:  1.250  2.250  3.250
 0.3  / 3:  1.350  2.350  3.350
 ---- K:6 Z:   0.06
 0.1  / 1:  1.160  2.160  3.160
 0.2  / 2:  1.260  2.260  3.260
 0.3  / 3:  1.360  2.360  3.360
 ---- K:7 Z:   0.07
 0.1  / 1:  1.170  2.170  3.170
 0.2  / 2:  1.270  2.270  3.270
 0.3  / 3:  1.370  2.370  3.370
 ---- K:8 Z:   0.08
 0.1  / 1:  1.180  2.180  3.180
 0.2  / 2:  1.280  2.280  3.280
 0.3  / 3:  1.380  2.380  3.380
 ---- K:9 Z:   0.09
 0.1  / 1:  1.190  2.190  3.190
 0.2  / 2:  1.290  2.290  3.290
 0.3  / 3:  1.390  2.390  3.390
LIST RESHAPE(v4d, v3d)
             VARIABLE : RESHAPE(V4D, V3D)
             SUBSET   : 3 by 3 by 9 points (X-Y-Z)
              1      2      3    
              1      2      3
 ---- K:1 Z:   0.01
 0.1  / 1:  1.111  2.111  3.111
 0.2  / 2:  1.211  2.211  3.211
 0.3  / 3:  1.311  2.311  3.311
 ---- K:2 Z:   0.02
 0.1  / 1:  1.121  2.121  3.121
 0.2  / 2:  1.221  2.221  3.221
 0.3  / 3:  1.321  2.321  3.321
 ---- K:3 Z:   0.03
 0.1  / 1:  1.131  2.131  3.131
 0.2  / 2:  1.231  2.231  3.231
 0.3  / 3:  1.331  2.331  3.331
 ---- K:4 Z:   0.04
 0.1  / 1:  1.112  2.112  3.112
 0.2  / 2:  1.212  2.212  3.212
 0.3  / 3:  1.312  2.312  3.312
 ---- K:5 Z:   0.05
 0.1  / 1:  1.122  2.122  3.122
 0.2  / 2:  1.222  2.222  3.222
 0.3  / 3:  1.322  2.322  3.322
 ---- K:6 Z:   0.06
 0.1  / 1:  1.132  2.132  3.132
 0.2  / 2:  1.232  2.232  3.232
 0.3  / 3:  1.332  2.332  3.332
 ---- K:7 Z:   0.07
 0.1  / 1:  1.113  2.113  3.113
 0.2  / 2:  1.213  2.213  3.213
 0.3  / 3:  1.313  2.313  3.313
 ---- K:8 Z:   0.08
 0.1  / 1:  1.123  2.123  3.123
 0.2  / 2:  1.223  2.223  3.223
 0.3  / 3:  1.323  2.323  3.323
 ---- K:9 Z:   0.09
 0.1  / 1:  1.133  2.133  3.133
 0.2  / 2:  1.233  2.233  3.233
 0.3  / 3:  1.333  2.333  3.333
! if source and dest grid share an axis then the region is passed to the arg
LIST RESHAPE(v4d[i=2:3,j=2:3], v3d)		! I,J preserved
             VARIABLE : RESHAPE(V4D[I=2:3,J=2:3], V3D)
             SUBSET   : 2 by 2 by 9 points (X-Y-Z)
              2      3    
              2      3
 ---- K:1 Z:   0.01
 0.2  / 2:  2.211  3.211
 0.3  / 3:  2.311  3.311
 ---- K:2 Z:   0.02
 0.2  / 2:  2.221  3.221
 0.3  / 3:  2.321  3.321
 ---- K:3 Z:   0.03
 0.2  / 2:  2.231  3.231
 0.3  / 3:  2.331  3.331
 ---- K:4 Z:   0.04
 0.2  / 2:  2.212  3.212
 0.3  / 3:  2.312  3.312
 ---- K:5 Z:   0.05
 0.2  / 2:  2.222  3.222
 0.3  / 3:  2.322  3.322
 ---- K:6 Z:   0.06
 0.2  / 2:  2.232  3.232
 0.3  / 3:  2.332  3.332
 ---- K:7 Z:   0.07
 0.2  / 2:  2.213  3.213
 0.3  / 3:  2.313  3.313
 ---- K:8 Z:   0.08
 0.2  / 2:  2.223  3.223
 0.3  / 3:  2.323  3.323
 ---- K:9 Z:   0.09
 0.2  / 2:  2.233  3.233
 0.3  / 3:  2.333  3.333
LIST/k=2:3 RESHAPE(v4d[i=2:3,j=2:3,k=2:3], v3d)	! K,L not preserved
             VARIABLE : RESHAPE(V4D[I=2:3,J=2:3,K=2:3], V3D)
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
              2      3    
              2      3
 ---- K:2 Z:   0.02
 0.2  / 2:  2.231  3.231
 0.3  / 3:  2.331  3.331
 ---- K:3 Z:   0.03
 0.2  / 2:  2.222  3.222
 0.3  / 3:  2.322  3.322
LIST/I=2:3/J=2:3  RESHAPE(v4d, v3d)
             VARIABLE : RESHAPE(V4D, V3D)
             SUBSET   : 2 by 2 by 9 points (X-Y-Z)
              2      3    
              2      3
 ---- K:1 Z:   0.01
 0.2  / 2:  2.211  3.211
 0.3  / 3:  2.311  3.311
 ---- K:2 Z:   0.02
 0.2  / 2:  2.221  3.221
 0.3  / 3:  2.321  3.321
 ---- K:3 Z:   0.03
 0.2  / 2:  2.231  3.231
 0.3  / 3:  2.331  3.331
 ---- K:4 Z:   0.04
 0.2  / 2:  2.212  3.212
 0.3  / 3:  2.312  3.312
 ---- K:5 Z:   0.05
 0.2  / 2:  2.222  3.222
 0.3  / 3:  2.322  3.322
 ---- K:6 Z:   0.06
 0.2  / 2:  2.232  3.232
 0.3  / 3:  2.332  3.332
 ---- K:7 Z:   0.07
 0.2  / 2:  2.213  3.213
 0.3  / 3:  2.313  3.313
 ---- K:8 Z:   0.08
 0.2  / 2:  2.223  3.223
 0.3  / 3:  2.323  3.323
 ---- K:9 Z:   0.09
 0.2  / 2:  2.233  3.233
 0.3  / 3:  2.333  3.333
LIST/I=2:3/J=2:3/K=2:3  RESHAPE(v4d, v3d)	! K refers to result, only
             VARIABLE : RESHAPE(V4D, V3D)
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
              2      3    
              2      3
 ---- K:2 Z:   0.02
 0.2  / 2:  2.221  3.221
 0.3  / 3:  2.321  3.321
 ---- K:3 Z:   0.03
 0.2  / 2:  2.231  3.231
 0.3  / 3:  2.331  3.331
LIST/I=2:3/J=2:3  RESHAPE(v4d[k=1:3], v3d[k=2:5])	! output to a subregion in K
             VARIABLE : RESHAPE(V4D[K=1:3], V3D[K=2:5])
             SUBSET   : 2 by 2 by 4 points (X-Y-Z)
              2      3    
              2      3
 ---- K:2 Z:   0.02
 0.2  / 2:  2.211  3.211
 0.3  / 3:  2.311  3.311
 ---- K:3 Z:   0.03
 0.2  / 2:  2.221  3.221
 0.3  / 3:  2.321  3.321
 ---- K:4 Z:   0.04
 0.2  / 2:  2.231  3.231
 0.3  / 3:  2.331  3.331
 ---- K:5 Z:   0.05
 0.2  / 2:  2.212  3.212
 0.3  / 3:  2.312  3.312
LIST/I=2:3/J=2:3/K=4:5  RESHAPE(v4d[k=1:3], v3d[k=2:5])	! "conflicting" K specs
             VARIABLE : RESHAPE(V4D[K=1:3], V3D[K=2:5])
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
              2      3    
              2      3
 ---- K:4 Z:   0.04
 0.2  / 2:  2.231  3.231
 0.3  / 3:  2.331  3.331
 ---- K:5 Z:   0.05
 0.2  / 2:  2.212  3.212
 0.3  / 3:  2.312  3.312
 
! ZAXREPLACE function
! definitions taken from sigma_coordinate_demo.jnl 9/96 *sh*
! 1) CREATE AN ARTIFICIAL SIGMA COORDINATE MODEL OUTPUT
define axis/x=-50:50:10/unit=km xchannel
define axis/y=-30:30:10/unit=km yrise
define axis/z=1:10:2/unit=layer/depth zlayer
define axis/T=1:20:1/unit=hours time
define grid/x=xchannel/y=yrise/z=zlayer/t=time gsigma
 
! bathymetry: a channel with a rise along the axis of the channel
let pi = 3.14159
let nominal_depth = 100
let cross_channel_size = nominal_depth * (1 + COS(X[g=gsigma]/60*pi))
let xchannel = -1 * cross_channel_size
let rise_shape = (1 + COS(Y[g=gsigma]/40*pi))/6
let bathymetry = xchannel + rise_shape*CROSS_CHANNEL_SIZE
set variable/title="Channel Bathymetry"/unit=meters bathymetry
 
! sigma layer thickness: varies in X, Y, Z, and T in this example
let time_evolve = 0 + L[g=gsigma]/100
let h0 = EXP(time_evolve*K[g=gsigma])
let h_normalized = h0/h0[k=1:10@sum]
let h = h_normalized * (-1 * bathymetry)
set variable/title="layer thickness"/unit=meters h
 
! fictitious flow field:
let flow_profile = LOG((11-K[g=gsigma]))
let time_ramp = 1 + L[g=gsigma]/20 + 0.2*SIN((L[g=gsigma]-1)/2)
let flow = time_ramp * flow_profile * cross_channel_size / (1-rise_shape)
set variable/title="non-physical flow field" flow
 
! ----------------------
! "DEPTH" --  THE VERTICAL INTEGRAL OF LAYER THICKNESS
let depth = h[k=@rsum]-h/2
set variable/title="DEPTH function"/unit=meters depth
 
! Desired result axes - depth in meters
define axis/depth/z=0:200:50/units=meters z50m
define axis/depth/z=0:200:20/units=meters z20m
define axis/depth/z=0:200:2/units=meters z2m
 
LIST/x=0/l=1 flow
             VARIABLE : non-physical flow field
             SUBSET   : 7 by 6 points (Y (KM)-Z (LAYER))
             X (KM)   : 0
             T (HOURS): 1
             -30    -20    -10     0     10     20     30    
              1      2      3      4      5      6      7
 1    / 1:  220.8  252.0  293.5  315.0  293.5  252.0  220.8
 3    / 2:  210.7  240.5  280.1  300.6  280.1  240.5  210.7
 5    / 3:  199.4  227.6  265.1  284.5  265.1  227.6  199.4
 7    / 4:  186.6  213.0  248.0  266.2  248.0  213.0  186.6
 9    / 5:  171.8  196.1  228.4  245.1  228.4  196.1  171.8
 11   / 6:  154.3  176.1  205.2  220.2  205.2  176.1  154.3
LIST/x=0/l=1 depth
             VARIABLE : DEPTH function (meters)
             SUBSET   : 7 by 6 points (Y (KM)-Z (LAYER))
             X (KM)   : 0
             T (HOURS): 1
             -30    -20    -10     0     10     20     30    
              1      2      3      4      5      6      7
 1    / 1:   15.5   13.5   11.6   10.8   11.6   13.5   15.5
 3    / 2:   46.5   40.8   35.0   32.6   35.0   40.8   46.5
 5    / 3:   77.9   68.3   58.6   54.6   58.6   68.3   77.9
 7    / 4:  109.6   96.0   82.5   76.8   82.5   96.0  109.6
 9    / 5:  141.6  124.1  106.5   99.3  106.5  124.1  141.6
 11   / 6:  174.0  152.4  130.9  121.9  130.9  152.4  174.0
set view ul
shade/x=0/l=1/lev=30 flow
!LIST/x=0/l=1 ZAXREPLACE(flow,depth,z[gz=z50m])
!LIST/x=0/l=1 ZAXREPLACE(flow,depth,z[gz=z20m])
LIST/x=0/l=1 ZAXREPLACE(flow[z=0:200],depth[z=0:200],z[gz=z50m])
             VARIABLE : ZAXREPLACE(FLOW[Z=0:200],DEPTH[Z=0:200],Z[GZ=Z50M])
             SUBSET   : 7 by 5 points (Y (KM)-DEPTH (m))
             X (KM)   : 0
             T (HOURS): 1
               -30    -20    -10     0     10     20     30    
                1      2      3      4      5      6      7
 0      / 1:   ....   ....   ....   ....   ....   ....   ....
 50     / 2:  209.4  236.1  270.5  287.9  270.5  236.1  209.4
 100    / 3:  190.5  210.6  233.7  244.3  233.7  210.6  190.5
 150    / 4:  167.3  177.9   ....   ....   ....  177.9  167.3
 200    / 5:   ....   ....   ....   ....   ....   ....   ....
LIST/x=0/l=1 ZAXREPLACE(flow[z=0:200],depth[z=0:200],z[gz=z20m])
             VARIABLE : ZAXREPLACE(FLOW[Z=0:200],DEPTH[Z=0:200],Z[GZ=Z20M])
             SUBSET   : 7 by 11 points (Y (KM)-DEPTH (m))
             X (KM)   : 0
             T (HOURS): 1
                -30    -20    -10     0     10     20     30    
                 1      2      3      4      5      6      7
 0      /  1:   ....   ....   ....   ....   ....   ....   ....
 20     /  2:  219.3  249.3  288.7  308.9  288.7  249.3  219.3
 40     /  3:  212.8  240.8  276.9  295.2  276.9  240.8  212.8
 60     /  4:  205.8  231.5  264.1  280.0  264.1  231.5  205.8
 80     /  5:  198.5  221.4  249.8  263.2  249.8  221.4  198.5
 100    /  6:  190.5  210.6  233.7  244.3  233.7  210.6  190.5
 120    /  7:  181.8  198.6  215.5  222.3  215.5  198.6  181.8
 140    /  8:  172.6  184.9   ....   ....   ....  184.9  172.6
 160    /  9:  161.9   ....   ....   ....   ....   ....  161.9
 180    / 10:   ....   ....   ....   ....   ....   ....   ....
 200    / 11:   ....   ....   ....   ....   ....   ....   ....
 
set view ur
shade/x=0/l=1/lev ZAXREPLACE(flow[z=0:200],depth[z=0:200],z[gz=z20m])
 
! how do the layers get distributed?
!LET Kflow  = ZAXREPLACE(flow,depth,z[gz=z20m])
!LET Kdepth = ZAXREPLACE(k[g=gsigma],depth,z[gz=z20m])
LET Kflow  = ZAXREPLACE(flow[z=0:200],depth[z=0:200],z[gz=z20m])
LET Kdepth = ZAXREPLACE(k[z=0:200,g=gsigma],depth[z=0:200],z[gz=z20m])
LIST/x=0/l=1 Kdepth
             VARIABLE : ZAXREPLACE(K[Z=0:200,G=GSIGMA],DEPTH[Z=0:200],Z[GZ=Z20M])
             SUBSET   : 7 by 11 points (Y (KM)-DEPTH (m))
             X (KM)   : 0
             T (HOURS): 1
                -30    -20    -10     0     10     20     30    
                 1      2      3      4      5      6      7
 0      /  1:   ....   ....   ....   ....   ....   ....   ....
 20     /  2:  1.146  1.237  1.358  1.421  1.358  1.237  1.146
 40     /  3:  1.790  1.972  2.212  2.336  2.212  1.972  1.790
 60     /  4:  2.429  2.699  3.058  3.242  3.058  2.699  2.429
 80     /  5:  3.066  3.422  3.897  4.141  3.897  3.422  3.066
 100    /  6:  3.696  4.141  4.728  5.032  4.728  4.141  3.696
 120    /  7:  4.324  4.854  5.553  5.914  5.553  4.854  4.324
 140    /  8:  4.949  5.561   ....   ....   ....  5.561  4.949
 160    /  9:  5.568   ....   ....   ....   ....   ....  5.568
 180    / 10:   ....   ....   ....   ....   ....   ....   ....
 200    / 11:   ....   ....   ....   ....   ....   ....   ....
LIST/x=0/l=1 Kdepth[k=@max]
             VARIABLE : ZAXREPLACE(K[Z=0:200,G=GSIGMA],DEPTH[Z=0:200],Z[GZ=Z20M])
             SUBSET   : 7 points (Y (KM))
             X (KM)   : 0
             DEPTH (m): -10 to 210 (maximum)
             T (HOURS): 1
               0    
               6
 -30   / 1:  5.568
 -20   / 2:  5.561
 -10   / 3:  5.553
 0     / 4:  5.914
 10    / 5:  5.553
 20    / 6:  5.561
 30    / 7:  5.568
 
! mark deepest layer with a zero
LET K0 = Kdepth - Kdepth[K=@max]
LET Kkernel = K0[K=@WEQ] * Kflow
 
! compare flow at bottom
LET Z10_flow = flow[Z=10]
LIST/x=0/l=1 Z10_flow		! bottom layer in layered version
             VARIABLE : FLOW[Z=10]
             SUBSET   : 7 points (Y (KM))
             X (KM)   : 0
             Z (LAYER): 9
             T (HOURS): 1
               0    
               6
 -30   / 1:  171.8
 -20   / 2:  196.1
 -10   / 3:  228.4
 0     / 4:  245.1
 10    / 5:  228.4
 20    / 6:  196.1
 30    / 7:  171.8
 
LET bottom_flow = Kkernel[z=0:200@sum]
!message LIST/x=0/l=1 Kkernel[z=0:200]	! crash!!!
!message LIST/x=0/l=1 bottom_flow	! deepest flow in depth version
!message
 
! error using 20 meter depth resolution
LIST/x=0/l=1 Z10_flow - bottom_flow
             VARIABLE : Z10_FLOW - BOTTOM_FLOW
             SUBSET   : 7 points (Y (KM))
             X (KM)   : 0
             Z (LAYER): 9
             T (HOURS): 1
               0    
               6
 -30   / 1:   9.92
 -20   / 2:  11.20
 -10   / 3:  12.85
 0     / 4:  22.80
 10    / 5:  12.85
 20    / 6:  11.20
 30    / 7:   9.92
 
! reduced error using 2 meter depth resolution
set view ll
shade/x=0/l=1/lev ZAXREPLACE(flow[z=0:200],depth[z=0:200],z[gz=z2m])
LET Kflow  = ZAXREPLACE(flow[z=0:200],depth[z=0:200],z[gz=z2m])
LET Kdepth = ZAXREPLACE(k[g=gsigma,z=0:200],depth[z=0:200],z[gz=z2m])
LIST/x=0/l=1 Z10_flow - bottom_flow
             VARIABLE : Z10_FLOW - BOTTOM_FLOW
             SUBSET   : 7 points (Y (KM))
             X (KM)   : 0
             Z (LAYER): 9
             T (HOURS): 1
               0    
               6
 -30   / 1:  16.41
 -20   / 2:  19.65
 -10   / 3:  22.41
 0     / 4:  22.80
 10    / 5:  22.41
 20    / 6:  19.65
 30    / 7:  16.41
 
! dynamic axis passes to GC function -- 1 meter resolution (3/98)
set view lr
shade/x=0/l=1/ylim=0:200:-20/lev ZAXREPLACE(flow[z=0:200],depth[z=0:200],z[z=0:200:.5])
*** Running ferret script: bn491_bug_fixes.jnl
! bn491_bug_fixes.jnl
! test various fixes that went into version 4.91
! 2/98 *kob*
!
! 3/98 - replaced err490_repeat w/ err490_repeat_first_echo - simpler test
! 3/98 - *kob* removed err490_tilde because it was a silly test.  some systems
!         allowed use of go "~/xx" and others didnt.
! 4/98 - added err491_asn.jnl - regrid by association problem
! 4/98 - added err491_attrib_dp.jnl - problem w/ double precision attributes
 
set mode/last verify
********File successfully written******
ooooooooooooooooooooooooooooooooooooooooooo
****Variable defined successfully******
ooooooooooooooooooooooooooooooooooooooooooo
 
             T
             axis ABSTRACT
             X:  N/A
             Y:  N/A
             Z:  N/A
             T: 15
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 15
 Maximum value: 15
 Mean    value: 15 (unweighted average)
define axis/t=1-jan-1980:1-jan-1981:1/units=days tax
repeat/t=1-jan-1980:2-jan-1980:24 stat t[gt=tax]
!-> REPEAT: T=-62482752000
 
             T
             axis TAX
             X:  N/A
             Y:  N/A
             Z:  N/A
             TIME: 01-JAN-1980 00:00
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 28840
 Maximum value: 28840
 Mean    value: 28840 (unweighted average)
!-> REPEAT: T=02-JAN-1980 00:00:00
 
             T
             axis TAX
             X:  N/A
             Y:  N/A
             Z:  N/A
             TIME: 02-JAN-1980 00:00
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 28841
 Maximum value: 28841
 Mean    value: 28841 (unweighted average)
 
message/cont Note: THE ECHO-ONE REPEAT BUG HAS NOT BEEN FIXED
Note: THE ECHO-ONE REPEAT BUG HAS NOT BEEN FIXED
 
! fixed variable size
!GO bn_reset
GO err490_fixed_var_size
! 1/2/98 *sh*
 
! Situation: the component (variable) size is fixed in the definition.
! The requested result size is separately specified
! by a command qualifier. Leads to a crash.
 
! The "doo" transformations (convolve.F, do_run_sum_sub.F, etc. ) are guided
! by the size of the component rather than the size of the result.
! (Under other circumstances this is to allow "bad edges" to be filled in
! when the component is too small for the result.)
 
! In IS_TRANS we need to catch this problem and avoid it ...
! but it is fraught with pitfalls as it involves changing the apparent
! component (cx) size passed into IS_TRANS (normally considered read-only)
! Further, Ferret regards the result as self-describing on this axis
! (uvar_gvn<uvlim_gvn_xact) so exact limits are not checked when looking in
! cache. Since we are violating the assumption of self-describing we need to
! un-cache the result.
!  ==> THE FIX IS IS A KLUDGE: The "right" solution is that the full limits
!	of the variable should be computed and the requested limits used to
!	clip the result. But this would be costly in memory xxxxx
!	should never get applied to cx ... but this is too difficult to
!	implement in GET_VAR_CONTEXT and PARSE_VAR_NAME
 
 
!set mode diag - removed *sh* 10/99
 
let vx = SIN(X[X=1:60:1])
stat vx
 
             SIN(X[X=1:60:1])
             X: 0.5 to 60.5
             Y:  N/A
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 60 (60*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: -0.99999
 Maximum value: 0.99991
 Mean    value: 0.027242 (unweighted average)
 Standard deviation: 0.71199
list/i=13:18 vx[x=@sbx:3]	! CRASH in V4.90
             VARIABLE : SIN(X[X=1:60:1])
                        box smoothed by 3 pts on X
             SUBSET   : 6 points (X)
 13   / 13:  0.2914
 14   / 14:  0.6870
 15   / 15:  0.4510
 16   / 16: -0.1997
 17   / 17: -0.6668
 18   / 18: -0.5208
list/i=13:18 vx[x=@rsum]	! CRASH in V4.90
             VARIABLE : SIN(X[X=1:60:1])
                        running sum on X
             SUBSET   : 6 points (X)
 13   / 13:  0.420
 14   / 14:  1.411
 15   / 15:  2.061
 16   / 16:  1.773
 17   / 17:  0.812
 18   / 18:  0.061
 
list/i=11:20 vx[x=@sbx:3]	! wrong result if pulled from cache
             VARIABLE : SIN(X[X=1:60:1])
                        box smoothed by 3 pts on X
             SUBSET   : 10 points (X)
 11   / 11: -0.6935
 12   / 12: -0.3721
 13   / 13:  0.2914
 14   / 14:  0.6870
 15   / 15:  0.4510
 16   / 16: -0.1997
 17   / 17: -0.6668
 18   / 18: -0.5208
 19   / 19:  0.1039
 20   / 20:  0.6332
list/i=11:20 vx[x=@rsum]	! wrong result if pulled from cache
             VARIABLE : SIN(X[X=1:60:1])
                        running sum on X
             SUBSET   : 10 points (X)
 11   / 11: -1.000
 12   / 12: -1.537
 13   / 13: -1.116
 14   / 14: -0.126
 15   / 15:  0.524
 16   / 16:  0.237
 17   / 17: -0.725
 18   / 18: -1.476
 19   / 19: -1.326
 20   / 20: -0.413
 
! now test a special problem that can occur with filling transforms --
! special because in IS_TRANS they require OFFSETS but do not require filling
! "bad edges" in the result
 
DEFINE AXIS/T=-10:10:2 tax
LET tvar = t[gt=tax]
LET tgap = IF MOD(T,4) eq 0 then  tvar
list tgap
             VARIABLE : IF MOD(T,4) EQ 0 THEN  TVAR
             SUBSET   : 11 points (T)
 -10   /  1:   ....
 -8    /  2: -8.000
 -6    /  3:   ....
 -4    /  4: -4.000
 -2    /  5:   ....
 0     /  6:  0.000
 2     /  7:   ....
 4     /  8:  4.000
 6     /  9:   ....
 8     / 10:  8.000
 10    / 11:   ....
list tgap[l=2:7@fav]    ! value at L=7 should be 2
             VARIABLE : IF MOD(T,4) EQ 0 THEN  TVAR
                        ave-filled by 3 pts on T
             SUBSET   : 6 points (T)
 -8   / 2: -8.000
 -6   / 3: -6.000
 -4   / 4: -4.000
 -2   / 5: -2.000
 0    / 6:  0.000
 2    / 7:  2.000
list tgap[t=-5:-8@fav]  ! value at T=-6 should be -6
             VARIABLE : IF MOD(T,4) EQ 0 THEN  TVAR
                        ave-filled by 3 pts on T
             SUBSET   : 2 points (T)
 -8   / 2: -8.000
 -6   / 3: -6.000
 
! l=@ave compression failure
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err490_l_ave.jnl
! err490_lave.jnl 12/1/97 - *sh* (reported by Weimin Wang)
! L=@AVE is failing to compress to a point
 
! 2/28/97:
! bug from this script re-emerged 2/98 after change to MERGE_GRID
! (see err491_explicit_limits.jnl)
! This time it was fixed in MERGE_GRID by correcting inconsistent use of
! the variable expl_com_lim
 
! 12/97: ---------------------
! ==> fixed  in IS_GRID_MODE with more thorough initialization
!  probably was introduced with changes to is-uvar_grid and merge_grid
! when GCF functions were introduced
 
! the bug was introduced between ferret_c_pre_10jan (created Dec. 19 '96)
! and ferret_c_passed_bench (created Jan 22  1997). This is when the GCF
! changes were made
 
! tracing the problem (axis T):
!  in IS_TRANS the bad case enters with cx_hi_ww(cx=6)=91369
!	       the successful case with it set BAD
!			==> result is that T axis doesn't get fleshed out
 
! IS_TRANS gets the cx=6 value from IS_ALGEBRA's call to GET_VAR_CONTEXT
 
! In turn this gets it from cx=4 which is set early in INTERP_STACK (dflt_cx)
 
! INTERP_STACK works correctly when uvar_given(4,ex#1)=-1 ("uvlim_irrelevant")
! ==> for some reason uvar_given(4,ex#1) is 7 (uvlim_needed) in the bad case
 
! ... need to look in is_uvar_grid and esp. merge_grid
! ---------------------------
! *kob* 3/98 - modifed to use coads_vwnd.cdf data set.  this is a local data
!              set (ie, it resides in the bench area).  this was important for
!	        benchmarking the sgi version (on cyborg and vikenty) because
!		not all tmap disks were available.
 
cancel memory/all
!set mode diag ! removed *sh* 10/99
 
! *kob* set data coads
set data coads_vwnd
 
set region/x=160w/y=40n
set region/l=1:50
 
! 12/97: this works OK -- a single point ... with value of zero!
! 2/98: now it gets a list of values, where the first one, only is correct
let tseries =  vwnd[l=1:50]
list tseries[l=@ave]
             VARIABLE : VWND[L=1:50]
             FILENAME : coads_vwnd.cdf
             LONGITUDE: 161W
             LATITUDE : 39N
             TIME     : 01-JAN-1946 00:00 to 01-MAR-1950 00:00 (averaged)
          2.193
 
! this gets a list of values!
cancel memory/all
load tseries
list tseries[l=@ave]
             VARIABLE : VWND[L=1:50]
             FILENAME : coads_vwnd.cdf
             LONGITUDE: 161W
             LATITUDE : 39N
             TIME     : 01-JAN-1946 00:00 to 01-MAR-1950 00:00 (averaged)
          2.193
 
! and finally a crash ...
list/l=1 tseries[l=1:50@ave]
             VARIABLE : VWND[L=1:50]
             FILENAME : coads_vwnd.cdf
             LONGITUDE: 161W
             LATITUDE : 39N
             TIME     : 01-JAN-1946 00:00 to 01-MAR-1950 00:00 (averaged)
          2.193
 
quit
 
! neg time axis grid failure
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err490_neg_time_show_grid.jnl
! err490_neg_time_show_grid
 
! V4.9 fails to show the invividual grid points, so the below request would
! only show column headings, but no data.  make sure data is there
 
set data gtsa056_2
show grid/t=15-JAN-1982:15-JAN-1983 temp
    GRID PS3DT1
 name       axis              # pts   start                end                 subset
 PSXT      LONGITUDE          160mr   130.5E               70.5W               full
 PSYT      LATITUDE           100 i   28.836S              48.568N             full
 PSZT      DEPTH (m)           27 i-  5                    3824                full
 TIME      TIME               168mr   15-JAN-1982 14:00    07-JUN-1983 13:00   full
 
       L     T                       TBOX          TBOXLO                TSTEP (hour)
       1>  15-JAN-1982 14:00:00      73         14-JAN-1982 01:30:00        52632
       2>  18-JAN-1982 15:00:00      73         17-JAN-1982 02:30:00        52705
       3>  21-JAN-1982 16:00:00      73         20-JAN-1982 03:30:00        52778
       4>  24-JAN-1982 17:00:00      73         23-JAN-1982 04:30:00        52851
       5>  27-JAN-1982 18:00:00      73         26-JAN-1982 05:30:00        52924
       6>  30-JAN-1982 19:00:00      73         29-JAN-1982 06:30:00        52997
       7>  02-FEB-1982 20:00:00      73         01-FEB-1982 07:30:00        53070
       8>  05-FEB-1982 21:00:00      73         04-FEB-1982 08:30:00        53143
       9>  08-FEB-1982 22:00:00      73         07-FEB-1982 09:30:00        53216
      10>  11-FEB-1982 23:00:00      73         10-FEB-1982 10:30:00        53289
      11>  15-FEB-1982 00:00:00      73         13-FEB-1982 11:30:00        53362
      12>  18-FEB-1982 01:00:00      73         16-FEB-1982 12:30:00        53435
      13>  21-FEB-1982 02:00:00      73         19-FEB-1982 13:30:00        53508
      14>  24-FEB-1982 03:00:00      73         22-FEB-1982 14:30:00        53581
      15>  27-FEB-1982 04:00:00      73         25-FEB-1982 15:30:00        53654
      16>  02-MAR-1982 05:00:00      73         28-FEB-1982 16:30:00        53727
      17>  05-MAR-1982 06:00:00      73         03-MAR-1982 17:30:00        53800
      18>  08-MAR-1982 07:00:00      73         06-MAR-1982 18:30:00        53873
      19>  11-MAR-1982 08:00:00      73         09-MAR-1982 19:30:00        53946
      20>  14-MAR-1982 09:00:00      73         12-MAR-1982 20:30:00        54019
      21>  17-MAR-1982 10:00:00      73         15-MAR-1982 21:30:00        54092
      22>  20-MAR-1982 11:00:00      73         18-MAR-1982 22:30:00        54165
      23>  23-MAR-1982 12:00:00      73         21-MAR-1982 23:30:00        54238
      24>  26-MAR-1982 13:00:00      73         25-MAR-1982 00:30:00        54311
      25>  29-MAR-1982 14:00:00      73         28-MAR-1982 01:30:00        54384
      26>  01-APR-1982 15:00:00      73         31-MAR-1982 02:30:00        54457
      27>  04-APR-1982 16:00:00      73         03-APR-1982 03:30:00        54530
      28>  07-APR-1982 17:00:00      73         06-APR-1982 04:30:00        54603
      29>  10-APR-1982 18:00:00      73         09-APR-1982 05:30:00        54676
      30>  13-APR-1982 19:00:00      73         12-APR-1982 06:30:00        54749
      31>  16-APR-1982 20:00:00      73         15-APR-1982 07:30:00        54822
      32>  19-APR-1982 21:00:00      73         18-APR-1982 08:30:00        54895
      33>  22-APR-1982 22:00:00      73         21-APR-1982 09:30:00        54968
      34>  25-APR-1982 23:00:00      73         24-APR-1982 10:30:00        55041
      35>  29-APR-1982 00:00:00      73         27-APR-1982 11:30:00        55114
      36>  02-MAY-1982 01:00:00      73         30-APR-1982 12:30:00        55187
      37>  05-MAY-1982 02:00:00      73         03-MAY-1982 13:30:00        55260
      38>  08-MAY-1982 03:00:00      73         06-MAY-1982 14:30:00        55333
      39>  11-MAY-1982 04:00:00      73         09-MAY-1982 15:30:00        55406
      40>  14-MAY-1982 05:00:00      73         12-MAY-1982 16:30:00        55479
      41>  17-MAY-1982 06:00:00      73         15-MAY-1982 17:30:00        55552
      42>  20-MAY-1982 07:00:00      73         18-MAY-1982 18:30:00        55625
      43>  23-MAY-1982 08:00:00      73         21-MAY-1982 19:30:00        55698
      44>  26-MAY-1982 09:00:00      73         24-MAY-1982 20:30:00        55771
      45>  29-MAY-1982 10:00:00      73         27-MAY-1982 21:30:00        55844
      46>  01-JUN-1982 11:00:00      73         30-MAY-1982 22:30:00        55917
      47>  04-JUN-1982 12:00:00      73         02-JUN-1982 23:30:00        55990
      48>  07-JUN-1982 13:00:00      73         06-JUN-1982 00:30:00        56063
      49>  10-JUN-1982 14:00:00      73         09-JUN-1982 01:30:00        56136
      50>  13-JUN-1982 15:00:00      73         12-JUN-1982 02:30:00        56209
      51>  16-JUN-1982 16:00:00      73         15-JUN-1982 03:30:00        56282
      52>  19-JUN-1982 17:00:00      73         18-JUN-1982 04:30:00        56355
      53>  22-JUN-1982 18:00:00      73         21-JUN-1982 05:30:00        56428
      54>  25-JUN-1982 19:00:00      73         24-JUN-1982 06:30:00        56501
      55>  28-JUN-1982 20:00:00      73         27-JUN-1982 07:30:00        56574
      56>  01-JUL-1982 21:00:00      73         30-JUN-1982 08:30:00        56647
      57>  04-JUL-1982 22:00:00      73         03-JUL-1982 09:30:00        56720
      58>  07-JUL-1982 23:00:00      73         06-JUL-1982 10:30:00        56793
      59>  11-JUL-1982 00:00:00      73         09-JUL-1982 11:30:00        56866
      60>  14-JUL-1982 01:00:00      73         12-JUL-1982 12:30:00        56939
      61>  17-JUL-1982 02:00:00      73         15-JUL-1982 13:30:00        57012
      62>  20-JUL-1982 03:00:00      73         18-JUL-1982 14:30:00        57085
      63>  23-JUL-1982 04:00:00      73         21-JUL-1982 15:30:00        57158
      64>  26-JUL-1982 05:00:00      73         24-JUL-1982 16:30:00        57231
      65>  29-JUL-1982 06:00:00      73         27-JUL-1982 17:30:00        57304
      66>  01-AUG-1982 07:00:00      73         30-JUL-1982 18:30:00        57377
      67>  04-AUG-1982 08:00:00      73         02-AUG-1982 19:30:00        57450
      68>  07-AUG-1982 09:00:00      73         05-AUG-1982 20:30:00        57523
      69>  10-AUG-1982 10:00:00      73         08-AUG-1982 21:30:00        57596
      70>  13-AUG-1982 11:00:00      73         11-AUG-1982 22:30:00        57669
      71>  16-AUG-1982 12:00:00      73         14-AUG-1982 23:30:00        57742
      72>  19-AUG-1982 13:00:00      73         18-AUG-1982 00:30:00        57815
      73>  22-AUG-1982 14:00:00      73         21-AUG-1982 01:30:00        57888
      74>  25-AUG-1982 15:00:00      73         24-AUG-1982 02:30:00        57961
      75>  28-AUG-1982 16:00:00      73         27-AUG-1982 03:30:00        58034
      76>  31-AUG-1982 17:00:00      73         30-AUG-1982 04:30:00        58107
      77>  03-SEP-1982 18:00:00      73         02-SEP-1982 05:30:00        58180
      78>  06-SEP-1982 19:00:00      73         05-SEP-1982 06:30:00        58253
      79>  09-SEP-1982 20:00:00      73         08-SEP-1982 07:30:00        58326
      80>  12-SEP-1982 21:00:00      73         11-SEP-1982 08:30:00        58399
      81>  15-SEP-1982 22:00:00      73         14-SEP-1982 09:30:00        58472
      82>  18-SEP-1982 23:00:00      73         17-SEP-1982 10:30:00        58545
      83>  22-SEP-1982 00:00:00      73         20-SEP-1982 11:30:00        58618
      84>  25-SEP-1982 01:00:00      73         23-SEP-1982 12:30:00        58691
      85>  28-SEP-1982 02:00:00      73         26-SEP-1982 13:30:00        58764
      86>  01-OCT-1982 03:00:00      73         29-SEP-1982 14:30:00        58837
      87>  04-OCT-1982 04:00:00      73         02-OCT-1982 15:30:00        58910
      88>  07-OCT-1982 05:00:00      73         05-OCT-1982 16:30:00        58983
      89>  10-OCT-1982 06:00:00      73         08-OCT-1982 17:30:00        59056
      90>  13-OCT-1982 07:00:00      73         11-OCT-1982 18:30:00        59129
      91>  16-OCT-1982 08:00:00      73         14-OCT-1982 19:30:00        59202
      92>  19-OCT-1982 09:00:00      73         17-OCT-1982 20:30:00        59275
      93>  22-OCT-1982 10:00:00      73         20-OCT-1982 21:30:00        59348
      94>  25-OCT-1982 11:00:00      73         23-OCT-1982 22:30:00        59421
      95>  28-OCT-1982 12:00:00      73         26-OCT-1982 23:30:00        59494
      96>  31-OCT-1982 13:00:00      73         30-OCT-1982 00:30:00        59567
      97>  03-NOV-1982 14:00:00      73         02-NOV-1982 01:30:00        59640
      98>  06-NOV-1982 15:00:00      73         05-NOV-1982 02:30:00        59713
      99>  09-NOV-1982 16:00:00      73         08-NOV-1982 03:30:00        59786
     100>  12-NOV-1982 17:00:00      73         11-NOV-1982 04:30:00        59859
     101>  15-NOV-1982 18:00:00      73         14-NOV-1982 05:30:00        59932
     102>  18-NOV-1982 19:00:00      73         17-NOV-1982 06:30:00        60005
     103>  21-NOV-1982 20:00:00      73         20-NOV-1982 07:30:00        60078
     104>  24-NOV-1982 21:00:00      73         23-NOV-1982 08:30:00        60151
     105>  27-NOV-1982 22:00:00      73         26-NOV-1982 09:30:00        60224
     106>  30-NOV-1982 23:00:00      73         29-NOV-1982 10:30:00        60297
     107>  04-DEC-1982 00:00:00      73         02-DEC-1982 11:30:00        60370
     108>  07-DEC-1982 01:00:00      73         05-DEC-1982 12:30:00        60443
     109>  10-DEC-1982 02:00:00      73         08-DEC-1982 13:30:00        60516
     110>  13-DEC-1982 03:00:00      73         11-DEC-1982 14:30:00        60589
     111>  16-DEC-1982 04:00:00      73         14-DEC-1982 15:30:00        60662
     112>  19-DEC-1982 05:00:00      73         17-DEC-1982 16:30:00        60735
     113>  22-DEC-1982 06:00:00      73         20-DEC-1982 17:30:00        60808
     114>  25-DEC-1982 07:00:00      73         23-DEC-1982 18:30:00        60881
     115>  28-DEC-1982 08:00:00      73         26-DEC-1982 19:30:00        60954
     116>  31-DEC-1982 09:00:00      73         29-DEC-1982 20:30:00        61027
     117>  03-JAN-1983 10:00:00      73         01-JAN-1983 21:30:00        61100
     118>  06-JAN-1983 11:00:00      73         04-JAN-1983 22:30:00        61173
     119>  09-JAN-1983 12:00:00      73         07-JAN-1983 23:30:00        61246
     120>  12-JAN-1983 13:00:00      73         11-JAN-1983 00:30:00        61319
     121>  15-JAN-1983 14:00:00      73         14-JAN-1983 01:30:00        61392
 
 
!explicit limit problem
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err491_explicit_limits.jnl
! err491_explicit_limits
! 2/98 *sh*
! bugs reported by Mark Wetzler and Mike Knezevitch
 
! ferret was assigning uvar_given = uvlim_irrelevant to axes of uvars where
! the limits were given in square brackets.
 
! fixed by change in MERGE_GRID (2/23/98)
 
! Note that the repair caused a bug in err490_l_ave to re-emerge. That bug
! was fixed through a further repair to MERGE_GRID (2/28/98)
 
!SET MODE DIAGNOSTIC - removed *sh* 10/99
 
! Wetzler bug
! @AVE is ignored -- size of result on X is 5 points instead of 1
let p = i[i=1:5]
let q = i[i=1:5]
let pq = p*q
stat pq[i=@ave]
 
             P*Q
             X: 0.5 to 5.5 (averaged)
             Y:  N/A
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 11
 Maximum value: 11
 Mean    value: 11 (unweighted average)
 
! Knezevitch bug
! causes crash in nest_region_class.F
let timestamp = DAYS1900(1998,02,23) - DAYS1900(1998,02,1)
list timestamp[i=1:1]
             VARIABLE : DAYS1900(1998,02,23) - DAYS1900(1998,02,1)
          22.00
 
 
 
 
!regridding by association problem  *kob* 4/98
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err491_asn.jnl
! err491_asn.jnl 4/98 *sh* (extracted from bug reported by Jennifer Adams)
! Ferret crashes on regridding by association where destination
! axis does not overlap the input subscript range at all
 
! fixed with repair to RECVD_REGRID
 
!set mode diag - removed *sh* 10/99
set mode ignore	! added for benchmark suite...
 
let test = y[y=101:200:1]
let test2 = test[y=151:200]	! defined on 151:200
 
define axis/y=1:50:1 y50
list test2[gy=y50@asn]		! request association onto 1:50
             VARIABLE : TEST[Y=151:200]
                        regrid: 1 delta on Y@ASN
             SUBSET   : 50 points (Y)
 1    /  1:....
 2    /  2:....
 3    /  3:....
 4    /  4:....
 5    /  5:....
 6    /  6:....
 7    /  7:....
 8    /  8:....
 9    /  9:....
 10   / 10:....
 11   / 11:....
 12   / 12:....
 13   / 13:....
 14   / 14:....
 15   / 15:....
 16   / 16:....
 17   / 17:....
 18   / 18:....
 19   / 19:....
 20   / 20:....
 21   / 21:....
 22   / 22:....
 23   / 23:....
 24   / 24:....
 25   / 25:....
 26   / 26:....
 27   / 27:....
 28   / 28:....
 29   / 29:....
 30   / 30:....
 31   / 31:....
 32   / 32:....
 33   / 33:....
 34   / 34:....
 35   / 35:....
 36   / 36:....
 37   / 37:....
 38   / 38:....
 39   / 39:....
 40   / 40:....
 41   / 41:....
 42   / 42:....
 43   / 43:....
 44   / 44:....
 45   / 45:....
 46   / 46:....
 47   / 47:....
 48   / 48:....
 49   / 49:....
 50   / 50:....
 
!list/y=1:50 test2[gy=y50@asn]		! same misbehavior and crash
 
cancel mode ignore	! added for benchmark suite...
 
! v5.4 *kob* 10/01 - need to add exit/script - new exit command qualifiers
exit/script
 
!double precision attribute problem *kob* 4/98
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err491_attrib_dp.jnl
! err491_attrib_dp.jnl
! kob  4/23/98
 
! bug reported by  Donald S. Dunbar 4/21/98
!
! there was a difference in behavior between v445 and v491.  the problem was
! that between the versions, a bug was introduced into cd_get_attval.F
! which caused invalid values to be used if an attribute contained double
! precision values.  the lines below read in a small sample of DD's cdf file
! and list the variable elev. values should be around 2-3.
!
! routine modifed:  fmt/src/cd_get_attval.F
 
 
use err491_attval.cdf
list elev
             VARIABLE : Surface elevation (meter)
             DATA SET : K-Bay OAR3d model (200m)
             FILENAME : err491_attval.cdf
             SUBSET   : 35 by 127 points (LONGITUDE-LATITUDE)
             T (day)  : 1.78368
      ... listing every   3th point
                  135.5W 135.5W 135.4W 135.4W 135.3W 135.3W 135.3W 135.2W 135.2W 135.1W 135.1W 135.1W 
                    1      4      7     10     13     16     19     22     25     28     31     34
 59.4667N / 127:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 59.4599N / 126:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 59.453N  / 125:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 59.4462N / 124:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  2.976   ....
 59.4394N / 123:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 59.4325N / 122:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 59.4257N / 121:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 59.4189N / 120:   ....   ....   ....   ....   ....   ....   ....   ....   ....  2.975   ....   ....
 59.412N  / 119:   ....   ....   ....   ....   ....   ....   ....   ....   ....  2.975   ....   ....
 59.4052N / 118:   ....   ....   ....   ....   ....   ....   ....   ....   ....  2.975   ....   ....
 59.3983N / 117:   ....   ....   ....   ....   ....   ....   ....   ....   ....  2.975   ....   ....
 59.3915N / 116:   ....   ....   ....   ....   ....   ....   ....   ....   ....  2.975   ....   ....
 59.3846N / 115:   ....   ....   ....   ....   ....   ....   ....   ....   ....  2.976   ....   ....
 59.3778N / 114:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 59.3709N / 113:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 59.3641N / 112:   ....   ....   ....   ....   ....   ....   ....   ....  2.986   ....   ....   ....
 59.3572N / 111:   ....   ....   ....   ....   ....   ....   ....   ....  2.988   ....   ....   ....
 59.3504N / 110:   ....   ....   ....   ....   ....   ....   ....   ....  2.988   ....   ....   ....
 59.3435N / 109:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 59.3366N / 108:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 59.3298N / 107:   ....   ....   ....   ....   ....   ....   ....  2.986   ....   ....   ....   ....
 59.3229N / 106:   ....   ....   ....   ....  2.990   ....   ....  2.987   ....   ....   ....   ....
 59.3161N / 105:   ....   ....   ....   ....  2.989   ....   ....  2.986   ....   ....   ....   ....
 59.3092N / 104:   ....   ....   ....   ....  2.988   ....  2.984  2.985   ....   ....   ....   ....
 59.3023N / 103:   ....   ....   ....   ....   ....  2.984  2.983  2.984   ....   ....   ....   ....
 59.2955N / 102:   ....   ....   ....   ....   ....  2.983   ....  2.983   ....   ....   ....   ....
 59.2886N / 101:   ....  2.999   ....   ....   ....  2.983  2.981  2.981   ....   ....   ....   ....
 59.2817N / 100:   ....   ....  2.990   ....   ....   ....  2.981   ....   ....   ....   ....   ....
 59.2748N /  99:   ....   ....  2.991   ....   ....  2.985  2.980   ....   ....   ....   ....   ....
 59.268N  /  98:   ....   ....  2.993   ....   ....  2.985  2.980   ....   ....   ....   ....   ....
 59.2611N /  97:   ....   ....  2.996   ....   ....   ....  2.980   ....   ....   ....   ....   ....
 59.2542N /  96:   ....   ....  2.996  3.001   ....   ....  2.981   ....   ....   ....   ....   ....
 59.2473N /  95:   ....   ....  2.996  2.999   ....  2.984  2.987   ....   ....   ....   ....   ....
 59.2405N /  94:   ....   ....   ....  2.998   ....  2.986  2.993   ....   ....   ....   ....   ....
 59.2336N /  93:   ....   ....   ....  2.996  2.996  2.986  2.993   ....   ....   ....   ....   ....
 59.2267N /  92:   ....   ....   ....  2.994  2.995   ....  2.996  2.996   ....   ....   ....   ....
 59.2198N /  91:   ....   ....   ....  2.992  2.993   ....  2.996  2.997   ....   ....   ....   ....
 59.2129N /  90:   ....   ....   ....  2.990  2.992   ....  2.996  2.998   ....   ....   ....   ....
 59.2061N /  89:   ....   ....   ....  2.990  2.992   ....  2.994  2.997   ....   ....   ....   ....
 59.1992N /  88:   ....   ....   ....  2.990  2.992   ....   ....  2.994   ....   ....   ....   ....
 59.1923N /  87:   ....   ....   ....   ....  2.992   ....   ....  2.990   ....   ....   ....   ....
 59.1854N /  86:   ....   ....   ....   ....  2.995   ....   ....  2.990   ....   ....   ....   ....
 59.1785N /  85:   ....   ....   ....  2.993  2.997  2.999   ....  2.990   ....   ....   ....   ....
 59.1716N /  84:   ....   ....   ....  2.994  2.998   ....   ....  2.991   ....   ....   ....   ....
 59.1647N /  83:   ....   ....   ....  2.996  2.998  3.005   ....  2.991   ....   ....   ....   ....
 59.1578N /  82:   ....   ....   ....  2.996  2.998   ....   ....  2.993   ....   ....   ....   ....
 59.1509N /  81:   ....   ....   ....  2.996  2.999   ....  2.995  2.994   ....   ....   ....   ....
 59.144N  /  80:   ....   ....   ....   ....  3.000   ....  2.996  2.994   ....   ....   ....   ....
 59.1371N /  79:   ....   ....   ....   ....  3.000   ....  2.996  2.994   ....   ....   ....   ....
 59.1302N /  78:   ....   ....   ....   ....  3.001   ....  2.998  2.995   ....   ....   ....   ....
 59.1233N /  77:   ....   ....   ....   ....  3.002   ....  3.000  2.996   ....   ....   ....   ....
 59.1164N /  76:   ....   ....   ....   ....  3.004   ....  3.001  2.997   ....   ....   ....   ....
 59.1095N /  75:   ....   ....   ....   ....   ....  3.003  3.003  2.998   ....   ....   ....   ....
 59.1026N /  74:   ....   ....   ....   ....   ....  3.002   ....  2.998   ....   ....   ....   ....
 59.0957N /  73:   ....   ....   ....   ....  2.996  3.000   ....  3.000   ....   ....   ....   ....
 59.0888N /  72:   ....   ....   ....   ....  2.996  3.000   ....  3.001   ....   ....   ....   ....
 59.0819N /  71:   ....   ....   ....   ....  2.997  3.001  3.004  3.001   ....   ....   ....   ....
 59.075N  /  70:   ....   ....   ....   ....  2.998  3.001  3.003  3.001   ....   ....   ....   ....
 59.0681N /  69:   ....   ....   ....   ....  2.999  3.001  3.001  3.001   ....   ....   ....   ....
 59.0612N /  68:   ....   ....   ....   ....  2.999  3.000   ....  2.998   ....   ....   ....   ....
 59.0542N /  67:   ....   ....   ....   ....  2.998  2.998   ....  2.995   ....   ....   ....   ....
 59.0473N /  66:   ....   ....   ....   ....  2.998  2.996   ....  2.993   ....   ....   ....   ....
 59.0404N /  65:   ....   ....   ....   ....  2.998  2.996  2.994  2.991   ....   ....   ....   ....
 59.0335N /  64:   ....   ....   ....  2.998  2.998  2.995  2.993  2.988   ....   ....   ....   ....
 59.0266N /  63:   ....   ....   ....  2.998   ....  2.994  2.990  2.986   ....   ....   ....   ....
 59.0196N /  62:   ....   ....   ....  2.997   ....  2.993   ....  2.983   ....   ....   ....   ....
 59.0127N /  61:   ....   ....   ....  2.996   ....  2.992  2.986  2.980   ....   ....   ....   ....
 59.0058N /  60:   ....   ....   ....  2.994   ....  2.991  2.986  2.977   ....   ....   ....   ....
 58.9989N /  59:   ....   ....   ....  2.995   ....  2.991  2.986  2.977   ....   ....   ....   ....
 58.9919N /  58:   ....   ....   ....  2.998   ....  2.991  2.985  2.977   ....   ....   ....   ....
 58.985N  /  57:   ....   ....   ....  3.000   ....  2.990  2.984  2.977   ....   ....   ....   ....
 58.9781N /  56:   ....   ....   ....  3.001   ....  2.989  2.982  2.977   ....   ....   ....   ....
 58.9711N /  55:   ....   ....   ....  3.000   ....  2.988  2.977  2.976   ....   ....   ....   ....
 58.9642N /  54:   ....   ....   ....  2.999   ....  2.987  2.978  2.972   ....   ....   ....   ....
 58.9573N /  53:   ....   ....   ....  2.997   ....  2.987  2.978  2.965   ....   ....   ....   ....
 58.9503N /  52:   ....   ....   ....  2.996  2.992  2.987  2.978  2.967   ....   ....   ....   ....
 58.9434N /  51:   ....   ....   ....  2.996  2.992  2.987  2.977  2.968   ....   ....   ....   ....
 58.9365N /  50:   ....   ....   ....  2.998  2.993  2.986  2.977   ....   ....   ....   ....   ....
 58.9295N /  49:   ....   ....   ....   ....  2.992  2.986  2.976   ....   ....   ....   ....   ....
 58.9226N /  48:   ....   ....   ....   ....  2.993  2.985  2.976   ....   ....   ....   ....   ....
 58.9156N /  47:   ....   ....   ....  2.995  2.994  2.985  2.975   ....   ....   ....   ....   ....
 58.9087N /  46:   ....   ....   ....  2.995  2.994  2.985  2.975   ....   ....   ....   ....   ....
 58.9017N /  45:   ....   ....   ....  2.995  2.993  2.985  2.975   ....   ....   ....   ....   ....
 58.8948N /  44:   ....   ....   ....  2.995  2.992  2.985  2.975   ....   ....   ....   ....   ....
 58.8878N /  43:   ....   ....   ....  2.996  2.992  2.985  2.976   ....   ....   ....   ....   ....
 58.8809N /  42:   ....   ....   ....  2.997  2.993  2.985  2.976   ....   ....   ....   ....   ....
 58.8739N /  41:   ....   ....   ....  2.997  2.993  2.985  2.976   ....   ....   ....   ....   ....
 58.867N  /  40:   ....   ....   ....  2.997  2.993  2.985  2.974   ....   ....   ....   ....   ....
 58.86N   /  39:   ....   ....   ....  2.998  2.994  2.985  2.972   ....   ....   ....   ....   ....
 58.8531N /  38:   ....   ....   ....  2.998  2.994  2.986  2.968   ....   ....   ....   ....   ....
 58.8461N /  37:   ....   ....   ....  2.999  2.994  2.986  2.966   ....   ....   ....   ....   ....
 58.8392N /  36:   ....   ....   ....  2.999  2.994  2.985  2.968   ....   ....   ....   ....   ....
 58.8322N /  35:   ....   ....   ....   ....  2.993  2.984  2.971   ....   ....   ....   ....   ....
 58.8252N /  34:   ....   ....   ....   ....  2.993  2.982  2.969   ....   ....   ....   ....   ....
 58.8183N /  33:   ....   ....   ....   ....  2.991  2.982  2.968   ....   ....   ....   ....   ....
 58.8113N /  32:   ....   ....   ....   ....  2.991  2.982  2.969   ....   ....   ....  2.934  2.923
 58.8043N /  31:   ....   ....   ....   ....  2.993  2.983  2.968   ....   ....   ....  2.935   ....
 58.7974N /  30:   ....   ....   ....  3.002  2.993  2.982  2.966  2.948   ....   ....  2.935   ....
 58.7904N /  29:   ....   ....   ....   ....  2.991  2.981  2.966  2.948   ....   ....   ....   ....
 58.7834N /  28:   ....   ....   ....   ....  2.991  2.980  2.965  2.946   ....   ....  2.964   ....
 58.7765N /  27:   ....   ....   ....   ....  2.990  2.977  2.963  2.949   ....   ....  2.959   ....
 58.7695N /  26:   ....   ....   ....   ....  2.989  2.979  2.965  2.954   ....  2.948  2.957   ....
 58.7625N /  25:   ....   ....   ....   ....  2.988  2.982  2.969  2.960   ....  2.952  2.955   ....
 58.7555N /  24:   ....   ....   ....   ....  2.988  2.982  2.969  2.963   ....  2.954  2.953   ....
 58.7486N /  23:   ....   ....   ....  2.987  2.986  2.979  2.968  2.961   ....  2.954  2.951   ....
 58.7416N /  22:   ....   ....   ....  2.985  2.985  2.977  2.967  2.959   ....  2.953  2.946   ....
 58.7346N /  21:   ....   ....   ....  2.984  2.983  2.975  2.965  2.958  2.952  2.949  2.945   ....
 58.7276N /  20:   ....   ....   ....   ....  2.982  2.972  2.963  2.956  2.951  2.946  2.942   ....
 58.7206N /  19:   ....   ....   ....   ....  2.980  2.969  2.962  2.956  2.951  2.945   ....   ....
 58.7137N /  18:   ....   ....   ....   ....  2.979  2.971  2.963  2.954  2.949  2.944   ....   ....
 58.7067N /  17:   ....   ....   ....   ....  2.978  2.974  2.964  2.953  2.947  2.946   ....   ....
 58.6997N /  16:   ....   ....   ....   ....  2.977  2.974  2.965  2.952  2.945  2.946   ....   ....
 58.6927N /  15:   ....   ....   ....   ....  2.978  2.974  2.965  2.951  2.944  2.947   ....   ....
 58.6857N /  14:   ....   ....   ....   ....  2.980  2.974  2.966  2.948  2.944  2.947   ....   ....
 58.6787N /  13:   ....   ....   ....   ....  2.980  2.975  2.969  2.952  2.945  2.949   ....   ....
 58.6717N /  12:   ....   ....   ....   ....  2.982  2.976  2.968  2.956  2.944  2.952   ....   ....
 58.6647N /  11:   ....   ....   ....   ....  2.983  2.978  2.965  2.949   ....  2.952   ....   ....
 58.6577N /  10:   ....   ....   ....   ....  2.982  2.979  2.966  2.945   ....   ....   ....   ....
 58.6507N /   9:   ....   ....   ....  2.982  2.980  2.975  2.971  2.953   ....   ....   ....   ....
 58.6437N /   8:   ....   ....   ....   ....  2.980  2.971  2.972  2.959   ....   ....   ....   ....
 58.6367N /   7:   ....   ....   ....   ....  2.982  2.975  2.968  2.960   ....   ....   ....   ....
 58.6297N /   6:   ....   ....   ....   ....  2.981  2.977  2.969  2.963  2.949   ....   ....   ....
 58.6227N /   5:   ....   ....   ....   ....  2.982  2.977  2.971  2.962  2.952   ....   ....   ....
 58.6157N /   4:   ....   ....   ....   ....  2.970  2.968  2.965  2.957  2.951   ....   ....   ....
 58.6087N /   3:   ....   ....   ....   ....  2.953  2.951  2.944  2.961  2.946   ....   ....   ....
 58.6017N /   2:   ....   ....   ....   ....  2.940  2.940  2.940  2.940  2.940   ....   ....   ....
 58.5947N /   1:   ....   ....   ....   ....  2.940  2.940  2.940  2.940  2.940   ....   ....   ....
 
*** Running ferret script: bn_odd_variable_name.jnl
! make sure memory is limited; otherwise the abstract axis will list
let save_mem = ($ferret_memory)
 !-> DEFINE VARIABLE save_mem = 62.5
set mem /size=10
use weird_name1.cdf
sh data
     currently SET data sets:
    1> ./data/weird_name1.cdf  (default)
 name     title                             I         J         K         L
 v1       lower case v1                    1:20      ...       ...       ...
 v2-and-minus
          SIN(2+I/10)                      1:20      ...       ...       ...
 V1       Upper case V1                    1:20      ...       ...       ...
 I        SIN(4+I/10)                      1:20      ...       ...       ...
 X        SIN(5+I/10)                      1:20      ...       ...       ...
 
set mode ignore
list v1
             VARIABLE : Upper case V1
             FILENAME : weird_name1.cdf
             SUBSET   : 20 points (X)
 1    /  1:  0.0416
 2    /  2: -0.0584
 3    /  3: -0.1577
 4    /  4: -0.2555
 5    /  5: -0.3508
 6    /  6: -0.4425
 7    /  7: -0.5298
 8    /  8: -0.6119
 9    /  9: -0.6878
 10   / 10: -0.7568
 11   / 11: -0.8183
 12   / 12: -0.8716
 13   / 13: -0.9162
 14   / 14: -0.9516
 15   / 15: -0.9775
 16   / 16: -0.9937
 17   / 17: -0.9999
 18   / 18: -0.9962
 19   / 19: -0.9825
 20   / 20: -0.9589
list 'v1'
             VARIABLE : lower case v1
             FILENAME : weird_name1.cdf
             SUBSET   : 20 points (X)
 1    /  1:  0.8912
 2    /  2:  0.9320
 3    /  3:  0.9636
 4    /  4:  0.9854
 5    /  5:  0.9975
 6    /  6:  0.9996
 7    /  7:  0.9917
 8    /  8:  0.9738
 9    /  9:  0.9463
 10   / 10:  0.9093
 11   / 11:  0.8632
 12   / 12:  0.8085
 13   / 13:  0.7457
 14   / 14:  0.6755
 15   / 15:  0.5985
 16   / 16:  0.5155
 17   / 17:  0.4274
 18   / 18:  0.3350
 19   / 19:  0.2392
 20   / 20:  0.1411
list v2-and-minus    		! Deliberate error
list 'v2-and-minus'  		! Now the proper syntax
             VARIABLE : SIN(2+I/10)
             FILENAME : weird_name1.cdf
             SUBSET   : 20 points (X)
 1    /  1:  0.8632
 2    /  2:  0.8085
 3    /  3:  0.7457
 4    /  4:  0.6755
 5    /  5:  0.5985
 6    /  6:  0.5155
 7    /  7:  0.4274
 8    /  8:  0.3350
 9    /  9:  0.2392
 10   / 10:  0.1411
 11   / 11:  0.0416
 12   / 12: -0.0584
 13   / 13: -0.1577
 14   / 14: -0.2555
 15   / 15: -0.3508
 16   / 16: -0.4425
 17   / 17: -0.5298
 18   / 18: -0.6119
 19   / 19: -0.6878
 20   / 20: -0.7568
list x 				! Deliberate error
list 'X'			! Now the proper syntax
             VARIABLE : SIN(5+I/10)
             FILENAME : weird_name1.cdf
             SUBSET   : 20 points (X)
 1    /  1: -0.9258
 2    /  2: -0.8835
 3    /  3: -0.8323
 4    /  4: -0.7728
 5    /  5: -0.7055
 6    /  6: -0.6313
 7    /  7: -0.5507
 8    /  8: -0.4646
 9    /  9: -0.3739
 10   / 10: -0.2794
 11   / 11: -0.1822
 12   / 12: -0.0831
 13   / 13:  0.0168
 14   / 14:  0.1165
 15   / 15:  0.2151
 16   / 16:  0.3115
 17   / 17:  0.4048
 18   / 18:  0.4941
 19   / 19:  0.5784
 20   / 20:  0.6570
list i  			! Deliberate error
 
! v694 No longer an error: See ticket 2050
list 'i'  			!
             VARIABLE : SIN(4+I/10)
             FILENAME : weird_name1.cdf
             SUBSET   : 20 points (X)
 1    /  1: -0.8183
 2    /  2: -0.8716
 3    /  3: -0.9162
 4    /  4: -0.9516
 5    /  5: -0.9775
 6    /  6: -0.9937
 7    /  7: -0.9999
 8    /  8: -0.9962
 9    /  9: -0.9825
 10   / 10: -0.9589
 11   / 11: -0.9258
 12   / 12: -0.8835
 13   / 13: -0.8323
 14   / 14: -0.7728
 15   / 15: -0.7055
 16   / 16: -0.6313
 17   / 17: -0.5507
 18   / 18: -0.4646
 19   / 19: -0.3739
 20   / 20: -0.2794
 
list 'I'			! Now the proper syntax
             VARIABLE : SIN(4+I/10)
             FILENAME : weird_name1.cdf
             SUBSET   : 20 points (X)
 1    /  1: -0.8183
 2    /  2: -0.8716
 3    /  3: -0.9162
 4    /  4: -0.9516
 5    /  5: -0.9775
 6    /  6: -0.9937
 7    /  7: -0.9999
 8    /  8: -0.9962
 9    /  9: -0.9825
 10   / 10: -0.9589
 11   / 11: -0.9258
 12   / 12: -0.8835
 13   / 13: -0.8323
 14   / 14: -0.7728
 15   / 15: -0.7055
 16   / 16: -0.6313
 17   / 17: -0.5507
 18   / 18: -0.4646
 19   / 19: -0.3739
 20   / 20: -0.2794
list 'V1' - 'v1'
             VARIABLE : 'V1' - 'v1'
             FILENAME : weird_name1.cdf
             SUBSET   : 20 points (X)
 1    /  1: -0.850
 2    /  2: -0.990
 3    /  3: -1.121
 4    /  4: -1.241
 5    /  5: -1.348
 6    /  6: -1.442
 7    /  7: -1.522
 8    /  8: -1.586
 9    /  9: -1.634
 10   / 10: -1.666
 11   / 11: -1.681
 12   / 12: -1.680
 13   / 13: -1.662
 14   / 14: -1.627
 15   / 15: -1.576
 16   / 16: -1.509
 17   / 17: -1.427
 18   / 18: -1.331
 19   / 19: -1.222
 20   / 20: -1.100
list 'I'[i=6:15@sbx:10] - 'X'[i=6:15@ave]
             VARIABLE : 'I'[I=6:15@SBX:10] - 'X'[I=6:15@AVE]
             FILENAME : weird_name1.cdf
             SUBSET   : 10 points (X)
 6    /  6: -0.7303
 7    /  7: -0.7363
 8    /  8: -0.7327
 9    /  9: -0.7196
 10   / 10: -0.6970
 11   / 11: -0.6653
 12   / 12: -0.6247
 13   / 13: -0.5757
 14   / 14: -0.5187
 15   / 15: -0.4543
list v1[i=6:15@sbx:3]
             VARIABLE : Upper case V1
                        box smoothed by 3 pts on X
             FILENAME : weird_name1.cdf
             SUBSET   : 10 points (X)
 6    /  6: -0.4410
 7    /  7: -0.5281
 8    /  8: -0.6098
 9    /  9: -0.6855
 10   / 10: -0.7543
 11   / 11: -0.8156
 12   / 12: -0.8687
 13   / 13: -0.9131
 14   / 14: -0.9484
 15   / 15: -0.9743
list 'v1'[i=6:15@sbx:3]
             VARIABLE : lower case v1
                        box smoothed by 3 pts on X
             FILENAME : weird_name1.cdf
             SUBSET   : 10 points (X)
 6    /  6:  0.9962
 7    /  7:  0.9884
 8    /  8:  0.9706
 9    /  9:  0.9431
 10   / 10:  0.9063
 11   / 11:  0.8603
 12   / 12:  0.8058
 13   / 13:  0.7432
 14   / 14:  0.6732
 15   / 15:  0.5965
list 'I'-'X'/'v2-and-minus'
             VARIABLE : 'I'-'X'/'v2-and-minus'
             FILENAME : weird_name1.cdf
             SUBSET   : 20 points (X)
 1    /  1:  0.254
 2    /  2:  0.221
 3    /  3:  0.200
 4    /  4:  0.192
 5    /  5:  0.201
 6    /  6:  0.231
 7    /  7:  0.289
 8    /  8:  0.391
 9    /  9:  0.580
 10   / 10:  1.021
 11   / 11:  3.455
 12   / 12: -2.307
 13   / 13: -0.726
 14   / 14: -0.317
 15   / 15: -0.092
 16   / 16:  0.073
 17   / 17:  0.213
 18   / 18:  0.343
 19   / 19:  0.467
 20   / 20:  0.589
list v1[i=@max]
             VARIABLE : Upper case V1
             FILENAME : weird_name1.cdf
             X        : 0.5 to 20.5 (maximum)
          0.04158
list 'v1'[i=@max]
             VARIABLE : lower case v1
             FILENAME : weird_name1.cdf
             X        : 0.5 to 20.5 (maximum)
          0.9996
list v2-and-minus[i=5:15@ddc] 	! Deliberate error
list 'v2-and-minus'[i=5:15@ddc] ! Now the proper syntax
             VARIABLE : SIN(2+I/10)
                        centered derivative on X
             FILENAME : weird_name1.cdf
             SUBSET   : 11 points (X)
 5    /  5: -0.07998
 6    /  6: -0.08555
 7    /  7: -0.09026
 8    /  8: -0.09407
 9    /  9: -0.09693
 10   / 10: -0.09883
 11   / 11: -0.09975
 12   / 12: -0.09966
 13   / 13: -0.09858
 14   / 14: -0.09652
 15   / 15: -0.09349
! restore orginal memory size
set mem /size=`save_mem`
 !-> set mem /size=62.5
*** Running ferret script: bn_test_stream.jnl
 
canc data/all
 
sp rm -f permutedBinaryTest.dat
list/i=1:48/form=stream/file=permutedBinaryTest.dat i
 
sp rm -f junk.dat
list/i=1:5/form=stream/file=junk.dat i
 
 
 
!
! Following are intentional errors...
!
set mode ignore
 
!
! Ultra large grid
 
canc data/all
 
def axis/x=1:1000000000:1 xax
def axis/y=1:2:1 yax
def axis/z=1:3:1 zax
def axis/t=1:4:1 tax
def grid/x=xax/y=yax/z=zax/t=tax mygrid
 
file/format=stream/var=num/grid=mygrid junk.dat
load num
 
!
! Semilarge grid
!
 
canc data/all
 
def axis/x=1:1000000000:1 xax
def axis/y=1:1:1 yax
def axis/z=1:1:1 zax
def axis/t=1:1:1 tax
def grid/x=xax/y=yax/z=zax/t=tax mygrid
 
file/format=stream/var=num/grid=mygrid junk.dat
load num
 
canc data/all
 
def axis/x=1:1:1 xax
def axis/y=1:2:1 yax
def axis/z=1:3:1 zax
def axis/t=1:4:1 tax
def grid/x=xax/y=yax/z=zax/t=tax mygrid
 
 
 
! Non-existent file
file/format=stream/var=num/grid=mygrid NoSuchFile.dat
 
! File that doesn't match specified size
file/format=stream/var=num/grid=mygrid junk.dat
load num
 
! Try listing with V permutation (disable: hangs Ferret)
!list/clobber/file=foobar.dat/form=str/order=badsyntax/i=1:100 i
 
! Try reading in with V permutation for non-stream data
file/var=num/order=vxyzt/grid=mygrid junk.dat
 
! Try /type flag with non-stream data
file/type=i2/grid=mygrid junk.dat
 
! Try /swap flag with non-stream data
file/type=i2/grid=mygrid junk.dat
 
! Try bad type flag
file/var=num/type=i3/grid=mygrid/form=stream junk.dat
 
! Try list of types that is smaller than list of variables
file/var=num,num1,num2/type=i2,i1/form=stream junk.dat
 
canc dat/all
canc mode ignore
 
!!OK, load file in 'normal order'
file/format=str/var=num,num1/grid=mygrid/order=xyztv permutedBinaryTest.dat
list num
             VARIABLE : num
             FILENAME : permutedBinaryTest.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:   1.00   2.00
 2   / 2:   3.00   4.00
 3   / 3:   5.00   6.00
 ---- L:2 T:   2
 1   / 1:   7.00   8.00
 2   / 2:   9.00  10.00
 3   / 3:  11.00  12.00
 ---- L:3 T:   3
 1   / 1:  13.00  14.00
 2   / 2:  15.00  16.00
 3   / 3:  17.00  18.00
 ---- L:4 T:   4
 1   / 1:  19.00  20.00
 2   / 2:  21.00  22.00
 3   / 3:  23.00  24.00
list num1
             VARIABLE : num1
             FILENAME : permutedBinaryTest.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  25.00  26.00
 2   / 2:  27.00  28.00
 3   / 3:  29.00  30.00
 ---- L:2 T:   2
 1   / 1:  31.00  32.00
 2   / 2:  33.00  34.00
 3   / 3:  35.00  36.00
 ---- L:3 T:   3
 1   / 1:  37.00  38.00
 2   / 2:  39.00  40.00
 3   / 3:  41.00  42.00
 ---- L:4 T:   4
 1   / 1:  43.00  44.00
 2   / 2:  45.00  46.00
 3   / 3:  47.00  48.00
 
!---------- A few tests for single-precision, integer, short, byte
 
! testing real*4 write and read-back
sp rm -f permutedBinaryTest_r4.dat
list/i=1:48/form=stream/file=permutedBinaryTest_r4.dat/outtype=float i
 
file/format=str/var=num,num1/type=r4/grid=mygrid/order=xyztv permutedBinaryTest_r4.dat
list num
             VARIABLE : num
             FILENAME : permutedBinaryTest_r4.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:   1.00   2.00
 2   / 2:   3.00   4.00
 3   / 3:   5.00   6.00
 ---- L:2 T:   2
 1   / 1:   7.00   8.00
 2   / 2:   9.00  10.00
 3   / 3:  11.00  12.00
 ---- L:3 T:   3
 1   / 1:  13.00  14.00
 2   / 2:  15.00  16.00
 3   / 3:  17.00  18.00
 ---- L:4 T:   4
 1   / 1:  19.00  20.00
 2   / 2:  21.00  22.00
 3   / 3:  23.00  24.00
list num1
             VARIABLE : num1
             FILENAME : permutedBinaryTest_r4.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  25.00  26.00
 2   / 2:  27.00  28.00
 3   / 3:  29.00  30.00
 ---- L:2 T:   2
 1   / 1:  31.00  32.00
 2   / 2:  33.00  34.00
 3   / 3:  35.00  36.00
 ---- L:3 T:   3
 1   / 1:  37.00  38.00
 2   / 2:  39.00  40.00
 3   / 3:  41.00  42.00
 ---- L:4 T:   4
 1   / 1:  43.00  44.00
 2   / 2:  45.00  46.00
 3   / 3:  47.00  48.00
cancel data 2
 
! testing integer*4 write and read-back
sp rm -f permutedBinaryTest_int.dat
list/i=1:48/form=stream/file=permutedBinaryTest_int.dat/outtype=int i
 
file/format=str/var=num,num1/type=i4/grid=mygrid/order=xyztv permutedBinaryTest_int.dat
list num
             VARIABLE : num
             FILENAME : permutedBinaryTest_int.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:   1.00   2.00
 2   / 2:   3.00   4.00
 3   / 3:   5.00   6.00
 ---- L:2 T:   2
 1   / 1:   7.00   8.00
 2   / 2:   9.00  10.00
 3   / 3:  11.00  12.00
 ---- L:3 T:   3
 1   / 1:  13.00  14.00
 2   / 2:  15.00  16.00
 3   / 3:  17.00  18.00
 ---- L:4 T:   4
 1   / 1:  19.00  20.00
 2   / 2:  21.00  22.00
 3   / 3:  23.00  24.00
list num1
             VARIABLE : num1
             FILENAME : permutedBinaryTest_int.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  25.00  26.00
 2   / 2:  27.00  28.00
 3   / 3:  29.00  30.00
 ---- L:2 T:   2
 1   / 1:  31.00  32.00
 2   / 2:  33.00  34.00
 3   / 3:  35.00  36.00
 ---- L:3 T:   3
 1   / 1:  37.00  38.00
 2   / 2:  39.00  40.00
 3   / 3:  41.00  42.00
 ---- L:4 T:   4
 1   / 1:  43.00  44.00
 2   / 2:  45.00  46.00
 3   / 3:  47.00  48.00
cancel data 2
 
! testing short  write and read-back
sp rm -f permutedBinaryTest_short.dat
list/i=1:48/form=stream/file=permutedBinaryTest_short.dat/outtype=short i
 
file/format=str/var=num,num1/type=i2/grid=mygrid/order=xyztv permutedBinaryTest_short.dat
list num
             VARIABLE : num
             FILENAME : permutedBinaryTest_short.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:   1.00   2.00
 2   / 2:   3.00   4.00
 3   / 3:   5.00   6.00
 ---- L:2 T:   2
 1   / 1:   7.00   8.00
 2   / 2:   9.00  10.00
 3   / 3:  11.00  12.00
 ---- L:3 T:   3
 1   / 1:  13.00  14.00
 2   / 2:  15.00  16.00
 3   / 3:  17.00  18.00
 ---- L:4 T:   4
 1   / 1:  19.00  20.00
 2   / 2:  21.00  22.00
 3   / 3:  23.00  24.00
list num1
             VARIABLE : num1
             FILENAME : permutedBinaryTest_short.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  25.00  26.00
 2   / 2:  27.00  28.00
 3   / 3:  29.00  30.00
 ---- L:2 T:   2
 1   / 1:  31.00  32.00
 2   / 2:  33.00  34.00
 3   / 3:  35.00  36.00
 ---- L:3 T:   3
 1   / 1:  37.00  38.00
 2   / 2:  39.00  40.00
 3   / 3:  41.00  42.00
 ---- L:4 T:   4
 1   / 1:  43.00  44.00
 2   / 2:  45.00  46.00
 3   / 3:  47.00  48.00
cancel data 2
 
! testing byte write and read-back
sp rm -f permutedBinaryTest_byte.dat
list/i=1:48/form=stream/file=permutedBinaryTest_byte.dat/outtype=byte i
 
file/format=str/var=num,num1/type=i1/grid=mygrid/order=xyztv permutedBinaryTest_byte.dat
list num
             VARIABLE : num
             FILENAME : permutedBinaryTest_byte.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:   1.00   2.00
 2   / 2:   3.00   4.00
 3   / 3:   5.00   6.00
 ---- L:2 T:   2
 1   / 1:   7.00   8.00
 2   / 2:   9.00  10.00
 3   / 3:  11.00  12.00
 ---- L:3 T:   3
 1   / 1:  13.00  14.00
 2   / 2:  15.00  16.00
 3   / 3:  17.00  18.00
 ---- L:4 T:   4
 1   / 1:  19.00  20.00
 2   / 2:  21.00  22.00
 3   / 3:  23.00  24.00
list num1
             VARIABLE : num1
             FILENAME : permutedBinaryTest_byte.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  25.00  26.00
 2   / 2:  27.00  28.00
 3   / 3:  29.00  30.00
 ---- L:2 T:   2
 1   / 1:  31.00  32.00
 2   / 2:  33.00  34.00
 3   / 3:  35.00  36.00
 ---- L:3 T:   3
 1   / 1:  37.00  38.00
 2   / 2:  39.00  40.00
 3   / 3:  41.00  42.00
 ---- L:4 T:   4
 1   / 1:  43.00  44.00
 2   / 2:  45.00  46.00
 3   / 3:  47.00  48.00
cancel data 2
 
 
!----------
 
!! Load file w/o order qualifier (should be same as above)
file/format=str/var=num,num1/grid=mygrid/order=xyztv permutedBinaryTest.dat
list num
             VARIABLE : num
             FILENAME : permutedBinaryTest.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:   1.00   2.00
 2   / 2:   3.00   4.00
 3   / 3:   5.00   6.00
 ---- L:2 T:   2
 1   / 1:   7.00   8.00
 2   / 2:   9.00  10.00
 3   / 3:  11.00  12.00
 ---- L:3 T:   3
 1   / 1:  13.00  14.00
 2   / 2:  15.00  16.00
 3   / 3:  17.00  18.00
 ---- L:4 T:   4
 1   / 1:  19.00  20.00
 2   / 2:  21.00  22.00
 3   / 3:  23.00  24.00
list num1
             VARIABLE : num1
             FILENAME : permutedBinaryTest.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  25.00  26.00
 2   / 2:  27.00  28.00
 3   / 3:  29.00  30.00
 ---- L:2 T:   2
 1   / 1:  31.00  32.00
 2   / 2:  33.00  34.00
 3   / 3:  35.00  36.00
 ---- L:3 T:   3
 1   / 1:  37.00  38.00
 2   / 2:  39.00  40.00
 3   / 3:  41.00  42.00
 ---- L:4 T:   4
 1   / 1:  43.00  44.00
 2   / 2:  45.00  46.00
 3   / 3:  47.00  48.00
 
 
!! Permute tzyxv
file/format=str/var=num,num1/grid=mygrid/order=tzyxv permutedBinaryTest.dat
list num
             VARIABLE : num
             FILENAME : permutedBinaryTest.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:   1.00  13.00
 2   / 2:   5.00  17.00
 3   / 3:   9.00  21.00
 ---- L:2 T:   2
 1   / 1:   2.00  14.00
 2   / 2:   6.00  18.00
 3   / 3:  10.00  22.00
 ---- L:3 T:   3
 1   / 1:   3.00  15.00
 2   / 2:   7.00  19.00
 3   / 3:  11.00  23.00
 ---- L:4 T:   4
 1   / 1:   4.00  16.00
 2   / 2:   8.00  20.00
 3   / 3:  12.00  24.00
list num1
             VARIABLE : num1
             FILENAME : permutedBinaryTest.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  25.00  37.00
 2   / 2:  29.00  41.00
 3   / 3:  33.00  45.00
 ---- L:2 T:   2
 1   / 1:  26.00  38.00
 2   / 2:  30.00  42.00
 3   / 3:  34.00  46.00
 ---- L:3 T:   3
 1   / 1:  27.00  39.00
 2   / 2:  31.00  43.00
 3   / 3:  35.00  47.00
 ---- L:4 T:   4
 1   / 1:  28.00  40.00
 2   / 2:  32.00  44.00
 3   / 3:  36.00  48.00
 
!!Try permuted v
file/format=str/var=num,num1/grid=mygrid/order=vxyzt permutedBinaryTest.dat
list num
             VARIABLE : num
             FILENAME : permutedBinaryTest.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:   1.00   3.00
 2   / 2:   5.00   7.00
 3   / 3:   9.00  11.00
 ---- L:2 T:   2
 1   / 1:  13.00  15.00
 2   / 2:  17.00  19.00
 3   / 3:  21.00  23.00
 ---- L:3 T:   3
 1   / 1:  25.00  27.00
 2   / 2:  29.00  31.00
 3   / 3:  33.00  35.00
 ---- L:4 T:   4
 1   / 1:  37.00  39.00
 2   / 2:  41.00  43.00
 3   / 3:  45.00  47.00
list num1
             VARIABLE : num1
             FILENAME : permutedBinaryTest.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:   2.00   4.00
 2   / 2:   6.00   8.00
 3   / 3:  10.00  12.00
 ---- L:2 T:   2
 1   / 1:  14.00  16.00
 2   / 2:  18.00  20.00
 3   / 3:  22.00  24.00
 ---- L:3 T:   3
 1   / 1:  26.00  28.00
 2   / 2:  30.00  32.00
 3   / 3:  34.00  36.00
 ---- L:4 T:   4
 1   / 1:  38.00  40.00
 2   / 2:  42.00  44.00
 3   / 3:  46.00  48.00
 
!! Test stuff for different data types (files previously generated by matlab
!! for big endian architecture)
file/format=str/var=num,num1/grid=mygrid/type=i1 byte.dat
list num1
             VARIABLE : num1
             FILENAME : byte.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  24.00  25.00
 2   / 2:  26.00  27.00
 3   / 3:  28.00  29.00
 ---- L:2 T:   2
 1   / 1:  30.00  31.00
 2   / 2:  32.00  33.00
 3   / 3:  34.00  35.00
 ---- L:3 T:   3
 1   / 1:  36.00  37.00
 2   / 2:  38.00  39.00
 3   / 3:  40.00  41.00
 ---- L:4 T:   4
 1   / 1:  42.00  43.00
 2   / 2:  44.00  45.00
 3   / 3:  46.00  47.00
 
file/format=str/var=num,num1/grid=mygrid/type=i2/swap short.dat
list num1
             VARIABLE : num1
             FILENAME : short.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  24.00  25.00
 2   / 2:  26.00  27.00
 3   / 3:  28.00  29.00
 ---- L:2 T:   2
 1   / 1:  30.00  31.00
 2   / 2:  32.00  33.00
 3   / 3:  34.00  35.00
 ---- L:3 T:   3
 1   / 1:  36.00  37.00
 2   / 2:  38.00  39.00
 3   / 3:  40.00  41.00
 ---- L:4 T:   4
 1   / 1:  42.00  43.00
 2   / 2:  44.00  45.00
 3   / 3:  46.00  47.00
 
file/format=str/var=num,num1/grid=mygrid/type=i4/swap int.dat
list num1
             VARIABLE : num1
             FILENAME : int.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  24.00  25.00
 2   / 2:  26.00  27.00
 3   / 3:  28.00  29.00
 ---- L:2 T:   2
 1   / 1:  30.00  31.00
 2   / 2:  32.00  33.00
 3   / 3:  34.00  35.00
 ---- L:3 T:   3
 1   / 1:  36.00  37.00
 2   / 2:  38.00  39.00
 3   / 3:  40.00  41.00
 ---- L:4 T:   4
 1   / 1:  42.00  43.00
 2   / 2:  44.00  45.00
 3   / 3:  46.00  47.00
 
file/format=str/var=num,num1/grid=mygrid/type=r4/swap float.dat
list num1
             VARIABLE : num1
             FILENAME : float.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  24.00  25.00
 2   / 2:  26.00  27.00
 3   / 3:  28.00  29.00
 ---- L:2 T:   2
 1   / 1:  30.00  31.00
 2   / 2:  32.00  33.00
 3   / 3:  34.00  35.00
 ---- L:3 T:   3
 1   / 1:  36.00  37.00
 2   / 2:  38.00  39.00
 3   / 3:  40.00  41.00
 ---- L:4 T:   4
 1   / 1:  42.00  43.00
 2   / 2:  44.00  45.00
 3   / 3:  46.00  47.00
 
file/format=str/var=num,num1/grid=mygrid/type=r8/swap double.dat
list num1
             VARIABLE : num1
             FILENAME : double.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  24.00  25.00
 2   / 2:  26.00  27.00
 3   / 3:  28.00  29.00
 ---- L:2 T:   2
 1   / 1:  30.00  31.00
 2   / 2:  32.00  33.00
 3   / 3:  34.00  35.00
 ---- L:3 T:   3
 1   / 1:  36.00  37.00
 2   / 2:  38.00  39.00
 3   / 3:  40.00  41.00
 ---- L:4 T:   4
 1   / 1:  42.00  43.00
 2   / 2:  44.00  45.00
 3   / 3:  46.00  47.00
 
 
!! Test swapped
file/format=str/var=num,num1/grid=mygrid/type=i1 byteSwapped.dat
list num1
             VARIABLE : num1
             FILENAME : byteSwapped.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  24.00  25.00
 2   / 2:  26.00  27.00
 3   / 3:  28.00  29.00
 ---- L:2 T:   2
 1   / 1:  30.00  31.00
 2   / 2:  32.00  33.00
 3   / 3:  34.00  35.00
 ---- L:3 T:   3
 1   / 1:  36.00  37.00
 2   / 2:  38.00  39.00
 3   / 3:  40.00  41.00
 ---- L:4 T:   4
 1   / 1:  42.00  43.00
 2   / 2:  44.00  45.00
 3   / 3:  46.00  47.00
 
file/format=str/var=num,num1/grid=mygrid/type=i2 shortSwapped.dat
list num1
             VARIABLE : num1
             FILENAME : shortSwapped.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  24.00  25.00
 2   / 2:  26.00  27.00
 3   / 3:  28.00  29.00
 ---- L:2 T:   2
 1   / 1:  30.00  31.00
 2   / 2:  32.00  33.00
 3   / 3:  34.00  35.00
 ---- L:3 T:   3
 1   / 1:  36.00  37.00
 2   / 2:  38.00  39.00
 3   / 3:  40.00  41.00
 ---- L:4 T:   4
 1   / 1:  42.00  43.00
 2   / 2:  44.00  45.00
 3   / 3:  46.00  47.00
 
file/format=str/var=num,num1/grid=mygrid/type=i4 intSwapped.dat
list num1
             VARIABLE : num1
             FILENAME : intSwapped.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  24.00  25.00
 2   / 2:  26.00  27.00
 3   / 3:  28.00  29.00
 ---- L:2 T:   2
 1   / 1:  30.00  31.00
 2   / 2:  32.00  33.00
 3   / 3:  34.00  35.00
 ---- L:3 T:   3
 1   / 1:  36.00  37.00
 2   / 2:  38.00  39.00
 3   / 3:  40.00  41.00
 ---- L:4 T:   4
 1   / 1:  42.00  43.00
 2   / 2:  44.00  45.00
 3   / 3:  46.00  47.00
 
file/format=str/var=num,num1/grid=mygrid/type=r4 floatSwapped.dat
list num1
             VARIABLE : num1
             FILENAME : floatSwapped.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  24.00  25.00
 2   / 2:  26.00  27.00
 3   / 3:  28.00  29.00
 ---- L:2 T:   2
 1   / 1:  30.00  31.00
 2   / 2:  32.00  33.00
 3   / 3:  34.00  35.00
 ---- L:3 T:   3
 1   / 1:  36.00  37.00
 2   / 2:  38.00  39.00
 3   / 3:  40.00  41.00
 ---- L:4 T:   4
 1   / 1:  42.00  43.00
 2   / 2:  44.00  45.00
 3   / 3:  46.00  47.00
 
file/format=str/var=num,num1/grid=mygrid/type=r8 doubleSwapped.dat
list num1
             VARIABLE : num1
             FILENAME : doubleSwapped.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  24.00  25.00
 2   / 2:  26.00  27.00
 3   / 3:  28.00  29.00
 ---- L:2 T:   2
 1   / 1:  30.00  31.00
 2   / 2:  32.00  33.00
 3   / 3:  34.00  35.00
 ---- L:3 T:   3
 1   / 1:  36.00  37.00
 2   / 2:  38.00  39.00
 3   / 3:  40.00  41.00
 ---- L:4 T:   4
 1   / 1:  42.00  43.00
 2   / 2:  44.00  45.00
 3   / 3:  46.00  47.00
 
! Test skip
!file/format=str/var=num,num1/grid=mygrid/type=r8/skip=4/swap skip.dat
! For double-precision Ferret, /skip=4 stops with error,
! get correct result with /skip=2 (??)
file/format=str/var=num,num1/grid=mygrid/type=r8/skip=2/swap skip.dat
list num1
             VARIABLE : num1
             FILENAME : skip.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  24.00  25.00
 2   / 2:  26.00  27.00
 3   / 3:  28.00  29.00
 ---- L:2 T:   2
 1   / 1:  30.00  31.00
 2   / 2:  32.00  33.00
 3   / 3:  34.00  35.00
 ---- L:3 T:   3
 1   / 1:  36.00  37.00
 2   / 2:  38.00  39.00
 3   / 3:  40.00  41.00
 ---- L:4 T:   4
 1   / 1:  42.00  43.00
 2   / 2:  44.00  45.00
 3   / 3:  46.00  47.00
 
 
! Try list of types
file/format=str/var=num,num1/grid=mygrid/type=r8,i1/swap twoType.dat
list num
             VARIABLE : num
             FILENAME : twoType.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:   0.00   1.00
 2   / 2:   2.00   3.00
 3   / 3:   4.00   5.00
 ---- L:2 T:   2
 1   / 1:   6.00   7.00
 2   / 2:   8.00   9.00
 3   / 3:  10.00  11.00
 ---- L:3 T:   3
 1   / 1:  12.00  13.00
 2   / 2:  14.00  15.00
 3   / 3:  16.00  17.00
 ---- L:4 T:   4
 1   / 1:  18.00  19.00
 2   / 2:  20.00  21.00
 3   / 3:  22.00  23.00
list num1
             VARIABLE : num1
             FILENAME : twoType.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  24.00  25.00
 2   / 2:  26.00  27.00
 3   / 3:  28.00  29.00
 ---- L:2 T:   2
 1   / 1:  30.00  31.00
 2   / 2:  32.00  33.00
 3   / 3:  34.00  35.00
 ---- L:3 T:   3
 1   / 1:  36.00  37.00
 2   / 2:  38.00  39.00
 3   / 3:  40.00  41.00
 ---- L:4 T:   4
 1   / 1:  42.00  43.00
 2   / 2:  44.00  45.00
 3   / 3:  46.00  47.00
 
! Grand finale of xyvzt permutation with r4,i2 types
file/format=str/var=num,num1/grid=mygrid/type=r4,i2/order=xyvzt/swap finale.dat
list num
             VARIABLE : num
             FILENAME : finale.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:   0.00   1.00
 2   / 2:   2.00   3.00
 3   / 3:   4.00   5.00
 ---- L:2 T:   2
 1   / 1:   6.00   7.00
 2   / 2:   8.00   9.00
 3   / 3:  10.00  11.00
 ---- L:3 T:   3
 1   / 1:  12.00  13.00
 2   / 2:  14.00  15.00
 3   / 3:  16.00  17.00
 ---- L:4 T:   4
 1   / 1:  18.00  19.00
 2   / 2:  20.00  21.00
 3   / 3:  22.00  23.00
list num1
             VARIABLE : num1
             FILENAME : finale.dat
             SUBSET   : 2 by 3 by 4 points (Y-Z-T)
             X        : 1
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:   0.00   1.00
 2   / 2:   2.00   3.00
 3   / 3:   4.00   5.00
 ---- L:2 T:   2
 1   / 1:   6.00   7.00
 2   / 2:   8.00   9.00
 3   / 3:  10.00  11.00
 ---- L:3 T:   3
 1   / 1:  12.00  13.00
 2   / 2:  14.00  15.00
 3   / 3:  16.00  17.00
 ---- L:4 T:   4
 1   / 1:  18.00  19.00
 2   / 2:  20.00  21.00
 3   / 3:  22.00  23.00
*** Running ferret script: bn_define_axes.jnl
! bn_define_axes.jnl
! *sh* 5/99
! *sh* 12/99 -  with streamlined syntax
! *acm* 12/16 - change to a comment only
! 1/2017 *acm* changes in output due to backing off auto-detection of truemonth axes, tkt 2497
 
! exercise the DEFINE AXIS command
 
 
! ====================== REGULAR ==================
! lo:hi:delta
define axis/x=1:5:1 xax
show axis/x xax
 name       axis              # pts   start                end
 XAX       X                    5 r   1                    5
   Axis span (to cell edges) = 5
 
       I     X                       XBOX          XBOXLO
       1>  1                         1          0.5
       2>  2                         1          1.5
       3>  3                         1          2.5
       4>  4                         1          3.5
       5>  5                         1          4.5
define axis/x=1:5:1/edges xax
show axis/x xax
 name       axis              # pts   start                end
 XAX       X                    4 r   1.5                  4.5
   Axis span (to cell edges) = 4
 
       I     X                       XBOX          XBOXLO
       1>  1.5                       1          1
       2>  2.5                       1          2
       3>  3.5                       1          3
       4>  4.5                       1          4
 
! lo:hi /NPOINTS>1
define axis/x=1:5/npoints=5 xax
show axis/x xax
 name       axis              # pts   start                end
 XAX       X                    5 r   1                    5
   Axis span (to cell edges) = 5
 
       I     X                       XBOX          XBOXLO
       1>  1                         1          0.5
       2>  2                         1          1.5
       3>  3                         1          2.5
       4>  4                         1          3.5
       5>  5                         1          4.5
define axis/x=1:5/npoints=4/edges xax
show axis/x xax
 name       axis              # pts   start                end
 XAX       X                    4 r   1.5                  4.5
   Axis span (to cell edges) = 4
 
       I     X                       XBOX          XBOXLO
       1>  1.5                       1          1
       2>  2.5                       1          2
       3>  3.5                       1          3
       4>  4.5                       1          4
 
! lo:hi /NPOINTS=1
set mode ignore; define axis/x=1:5/npoints=1 xax; cancel mode ignore
define axis/x=5/npoints=1 xax
show axis/x xax
 name       axis              # pts   start                end
 XAX       X                    1 r   5                    5
   Axis span (to cell edges) = 1
 
       I     X                       XBOX          XBOXLO
       1>  5                         1          4.5
set mode ignore; define axis/x=5/npoints=1/edges xax; cancel mode ignore
define axis/x=1:5/npoints=1/edges xax
show axis/x xax
 name       axis              # pts   start                end
 XAX       X                    1 r   3                    3
   Axis span (to cell edges) = 4
 
       I     X                       XBOX          XBOXLO
       1>  3                         4          1
 
!======= calendar
! lo:hi:delta
define axis/t=15-jan-1980:25-jan-1980:1/unit=days tax
show axis/t tax
 name       axis              # pts   start                end
 TAX       TIME                11 r   15-JAN-1980 00:00    25-JAN-1980 00:00
T0 = 15-JAN-1901
   Axis span (to cell edges) = 11
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  15-JAN-1980 00:00:00      1          14-JAN-1980 12:00:00        28854
       2>  16-JAN-1980 00:00:00      1          15-JAN-1980 12:00:00        28855
       3>  17-JAN-1980 00:00:00      1          16-JAN-1980 12:00:00        28856
       4>  18-JAN-1980 00:00:00      1          17-JAN-1980 12:00:00        28857
       5>  19-JAN-1980 00:00:00      1          18-JAN-1980 12:00:00        28858
       6>  20-JAN-1980 00:00:00      1          19-JAN-1980 12:00:00        28859
       7>  21-JAN-1980 00:00:00      1          20-JAN-1980 12:00:00        28860
       8>  22-JAN-1980 00:00:00      1          21-JAN-1980 12:00:00        28861
       9>  23-JAN-1980 00:00:00      1          22-JAN-1980 12:00:00        28862
      10>  24-JAN-1980 00:00:00      1          23-JAN-1980 12:00:00        28863
      11>  25-JAN-1980 00:00:00      1          24-JAN-1980 12:00:00        28864
define axis/t=15-jan-1980:25-jan-1980:1/unit=days/edges tax
show axis/t tax
 name       axis              # pts   start                end
 TAX       TIME                10 r   15-JAN-1980 12:00    24-JAN-1980 12:00
T0 = 15-JAN-1901
   Axis span (to cell edges) = 10
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  15-JAN-1980 12:00:00      1          15-JAN-1980 00:00:00        28854.5
       2>  16-JAN-1980 12:00:00      1          16-JAN-1980 00:00:00        28855.5
       3>  17-JAN-1980 12:00:00      1          17-JAN-1980 00:00:00        28856.5
       4>  18-JAN-1980 12:00:00      1          18-JAN-1980 00:00:00        28857.5
       5>  19-JAN-1980 12:00:00      1          19-JAN-1980 00:00:00        28858.5
       6>  20-JAN-1980 12:00:00      1          20-JAN-1980 00:00:00        28859.5
       7>  21-JAN-1980 12:00:00      1          21-JAN-1980 00:00:00        28860.5
       8>  22-JAN-1980 12:00:00      1          22-JAN-1980 00:00:00        28861.5
       9>  23-JAN-1980 12:00:00      1          23-JAN-1980 00:00:00        28862.5
      10>  24-JAN-1980 12:00:00      1          24-JAN-1980 00:00:00        28863.5
 
! lo:hi /NPOINTS>1
define axis/t=15-jan-1980:25-jan-1980/npoints=11/unit=days tax
show axis/t tax
 name       axis              # pts   start                end
 TAX       TIME                11 r   15-JAN-1980 00:00    25-JAN-1980 00:00
T0 = 15-JAN-1901
   Axis span (to cell edges) = 11
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  15-JAN-1980 00:00:00      1          14-JAN-1980 12:00:00        28854
       2>  16-JAN-1980 00:00:00      1          15-JAN-1980 12:00:00        28855
       3>  17-JAN-1980 00:00:00      1          16-JAN-1980 12:00:00        28856
       4>  18-JAN-1980 00:00:00      1          17-JAN-1980 12:00:00        28857
       5>  19-JAN-1980 00:00:00      1          18-JAN-1980 12:00:00        28858
       6>  20-JAN-1980 00:00:00      1          19-JAN-1980 12:00:00        28859
       7>  21-JAN-1980 00:00:00      1          20-JAN-1980 12:00:00        28860
       8>  22-JAN-1980 00:00:00      1          21-JAN-1980 12:00:00        28861
       9>  23-JAN-1980 00:00:00      1          22-JAN-1980 12:00:00        28862
      10>  24-JAN-1980 00:00:00      1          23-JAN-1980 12:00:00        28863
      11>  25-JAN-1980 00:00:00      1          24-JAN-1980 12:00:00        28864
define axis/t=15-jan-1980:25-jan-1980/npoints=10/unit=days/edges tax
show axis/t tax
 name       axis              # pts   start                end
 TAX       TIME                10 r   15-JAN-1980 12:00    24-JAN-1980 12:00
T0 = 15-JAN-1901
   Axis span (to cell edges) = 10
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  15-JAN-1980 12:00:00      1          15-JAN-1980 00:00:00        28854.5
       2>  16-JAN-1980 12:00:00      1          16-JAN-1980 00:00:00        28855.5
       3>  17-JAN-1980 12:00:00      1          17-JAN-1980 00:00:00        28856.5
       4>  18-JAN-1980 12:00:00      1          18-JAN-1980 00:00:00        28857.5
       5>  19-JAN-1980 12:00:00      1          19-JAN-1980 00:00:00        28858.5
       6>  20-JAN-1980 12:00:00      1          20-JAN-1980 00:00:00        28859.5
       7>  21-JAN-1980 12:00:00      1          21-JAN-1980 00:00:00        28860.5
       8>  22-JAN-1980 12:00:00      1          22-JAN-1980 00:00:00        28861.5
       9>  23-JAN-1980 12:00:00      1          23-JAN-1980 00:00:00        28862.5
      10>  24-JAN-1980 12:00:00      1          24-JAN-1980 00:00:00        28863.5
 
 
! lo:hi /NPOINTS=1
set mode ignore; define axis/t=15-jan-1980:25-jan-1980/npoints=1/unit=days tax; cancel mode ignore
define axis/t=15-jan-1980/npoints=1/unit=days tax
show axis/t tax
 name       axis              # pts   start                end
 TAX       TIME                 1 r   15-JAN-1980 00:00    15-JAN-1980 00:00
T0 = 15-JAN-1901
   Axis span (to cell edges) = 1
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  15-JAN-1980 00:00:00      1          14-JAN-1980 12:00:00        28854
set mode ignore; define axis/t=15-jan-1980/npoints=1/unit=days/edges tax; cancel mode ignore
define axis/t=15-jan-1980:25-jan-1980/npoints=1/unit=days/edges tax
show axis/t tax
 name       axis              # pts   start                end
 TAX       TIME                 1 r   20-JAN-1980 00:00    20-JAN-1980 00:00
T0 = 15-JAN-1901
   Axis span (to cell edges) = 10
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  20-JAN-1980 00:00:00      10         15-JAN-1980 00:00:00        28859
 
! =============== IRREGULAR ===================
define axis/x/from_data/name=xax {1,2,5}
show axis/x xax
 name       axis              # pts   start                end
 XAX       X                    3 i   1                    5
   Axis span (to cell edges) = 6
 
       I     X                       XBOX          XBOXLO
       1>  1                         1          0.5
       2>  2                         2          1.5
       3>  5                         3          3.5
define axis/x/from_data/name=xax/edges {1,2,5}
show axis/x xax
 name       axis              # pts   start                end
 XAX       X                    2 i   1.5                  3.5
   Axis span (to cell edges) = 4
 
       I     X                       XBOX          XBOXLO
       1>  1.5                       1          1
       2>  3.5                       3          2
 
!======= calendar
define axis/t/from_data/name=tax/unit=days/t0=1-jan-1990 {1,2,5}
show axis/t tax
 name       axis              # pts   start                end
 TAX       TIME                 3 i   02-JAN-1990 00:00    06-JAN-1990 00:00
T0 = 1-JAN-1990
   Axis span (to cell edges) = 6
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  02-JAN-1990 00:00:00      1          01-JAN-1990 12:00:00        1
       2>  03-JAN-1990 00:00:00      2          02-JAN-1990 12:00:00        2
       3>  06-JAN-1990 00:00:00      3          04-JAN-1990 12:00:00        5
define axis/t/from_data/name=tax/unit=days/t0=1-jan-1990/edges {1,2,5}
show axis/t tax
 name       axis              # pts   start                end
 TAX       TIME                 2 i   02-JAN-1990 12:00    04-JAN-1990 12:00
T0 = 1-JAN-1990
   Axis span (to cell edges) = 4
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  02-JAN-1990 12:00:00      1          02-JAN-1990 00:00:00        1.5
       2>  04-JAN-1990 12:00:00      3          03-JAN-1990 00:00:00        3.5
 
! real monthly calendar
! (Note: when running pre-true-month Ferret versions, the timestep output from
! show axis/l below was eliminated by the "clean_draconian" script)
! 1/17/2017 changes due to backing off auto-detection of truemonth axes, tkt 2497
 
let month = MOD(l-1,12)+1
let add_year = INT((l-1)/12)
let tstep = DAYS1900(1980+add_year,month,1)
define axis/from_data/T/units=days/name=tax/t0=1-jan-1900/edges tstep[l=1:`20*12+1`]
 !-> define axis/from_data/T/units=days/name=tax/t0=1-jan-1900/edges tstep[l=1:241]
show axis/l=1:20 tax
 name       axis              # pts   start                end
 TAX       TIME               240 i   16-JAN-1980 12:00    16-DEC-1999 12:00
T0 = 1-JAN-1900
   Axis span (to cell edges) = 7305
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  16-JAN-1980 12:00:00      31         01-JAN-1980 00:00:00        29234.5
       2>  15-FEB-1980 12:00:00      29         01-FEB-1980 00:00:00        29264.5
       3>  16-MAR-1980 12:00:00      31         01-MAR-1980 00:00:00        29294.5
       4>  16-APR-1980 00:00:00      30         01-APR-1980 00:00:00        29325
       5>  16-MAY-1980 12:00:00      31         01-MAY-1980 00:00:00        29355.5
       6>  16-JUN-1980 00:00:00      30         01-JUN-1980 00:00:00        29386
       7>  16-JUL-1980 12:00:00      31         01-JUL-1980 00:00:00        29416.5
       8>  16-AUG-1980 12:00:00      31         01-AUG-1980 00:00:00        29447.5
       9>  16-SEP-1980 00:00:00      30         01-SEP-1980 00:00:00        29478
      10>  16-OCT-1980 12:00:00      31         01-OCT-1980 00:00:00        29508.5
      11>  16-NOV-1980 00:00:00      30         01-NOV-1980 00:00:00        29539
      12>  16-DEC-1980 12:00:00      31         01-DEC-1980 00:00:00        29569.5
      13>  16-JAN-1981 12:00:00      31         01-JAN-1981 00:00:00        29600.5
      14>  15-FEB-1981 00:00:00      28         01-FEB-1981 00:00:00        29630
      15>  16-MAR-1981 12:00:00      31         01-MAR-1981 00:00:00        29659.5
      16>  16-APR-1981 00:00:00      30         01-APR-1981 00:00:00        29690
      17>  16-MAY-1981 12:00:00      31         01-MAY-1981 00:00:00        29720.5
      18>  16-JUN-1981 00:00:00      30         01-JUN-1981 00:00:00        29751
      19>  16-JUL-1981 12:00:00      31         01-JUL-1981 00:00:00        29781.5
      20>  16-AUG-1981 12:00:00      31         01-AUG-1981 00:00:00        29812.5
show axis/l=1:240:12 tax
 name       axis              # pts   start                end
 TAX       TIME               240 i   16-JAN-1980 12:00    16-DEC-1999 12:00
T0 = 1-JAN-1900
   Axis span (to cell edges) = 7305
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  16-JAN-1980 12:00:00      31         01-JAN-1980 00:00:00        29234.5
      13>  16-JAN-1981 12:00:00      31         01-JAN-1981 00:00:00        29600.5
      25>  16-JAN-1982 12:00:00      31         01-JAN-1982 00:00:00        29965.5
      37>  16-JAN-1983 12:00:00      31         01-JAN-1983 00:00:00        30330.5
      49>  16-JAN-1984 12:00:00      31         01-JAN-1984 00:00:00        30695.5
      61>  16-JAN-1985 12:00:00      31         01-JAN-1985 00:00:00        31061.5
      73>  16-JAN-1986 12:00:00      31         01-JAN-1986 00:00:00        31426.5
      85>  16-JAN-1987 12:00:00      31         01-JAN-1987 00:00:00        31791.5
      97>  16-JAN-1988 12:00:00      31         01-JAN-1988 00:00:00        32156.5
     109>  16-JAN-1989 12:00:00      31         01-JAN-1989 00:00:00        32522.5
     121>  16-JAN-1990 12:00:00      31         01-JAN-1990 00:00:00        32887.5
     133>  16-JAN-1991 12:00:00      31         01-JAN-1991 00:00:00        33252.5
     145>  16-JAN-1992 12:00:00      31         01-JAN-1992 00:00:00        33617.5
     157>  16-JAN-1993 12:00:00      31         01-JAN-1993 00:00:00        33983.5
     169>  16-JAN-1994 12:00:00      31         01-JAN-1994 00:00:00        34348.5
     181>  16-JAN-1995 12:00:00      31         01-JAN-1995 00:00:00        34713.5
     193>  16-JAN-1996 12:00:00      31         01-JAN-1996 00:00:00        35078.5
     205>  16-JAN-1997 12:00:00      31         01-JAN-1997 00:00:00        35444.5
     217>  16-JAN-1998 12:00:00      31         01-JAN-1998 00:00:00        35809.5
     229>  16-JAN-1999 12:00:00      31         01-JAN-1999 00:00:00        36174.5
 
! modulo axis for arbitrary time interval
define axis/t=1-jan-0001:1-jan-0002:1/unit=days/t0=1-jan-0000 tencoding
let tstep = t[gt=tencoding]
let start_date = tstep[t=15-mar-0001]
let end_date = tstep[t=27-may-0001]
define axis/from_data/T/units=days/name=tax/t0=1-jan-0000/edges/modulo {`start_date,p=7`,`end_date,p=7`,`start_date+365.2425,p=7`}
 !-> define axis/from_data/T/units=days/name=tax/t0=1-jan-0000/edges/modulo {439,512,804.2425}
show axis/l=1:6 tax
 name       axis              # pts   start                end
 TAX       TIME                 2mi   20-APR 12:00         20-OCT 02:54
T0 = 1-JAN-0000
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  20-APR 12:00:00           73         15-MAR 00:00:00             475.5
       2>  20-OCT 02:54:35           292.2425   27-MAY 00:00:00             658.1212
       3>  20-APR 17:49:12           73         15-MAR 05:49:12             840.7425
       4>  20-OCT 08:43:47           292.2425   27-MAY 05:49:12             1023.364
       5>  20-APR-0003 23:38:23      73         15-MAR-0003 11:38:23        1205.985
       6>  20-OCT-0003 14:32:59      292.2425   27-MAY-0003 11:38:23        1388.606
show axis/l=1:6000:1200 tax
 name       axis              # pts   start                end
 TAX       TIME                 2mi   20-APR 12:00         20-OCT 02:54
T0 = 1-JAN-0000
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  20-APR 12:00:00           73         15-MAR 00:00:00             475.5
    1201>  20-APR-0601 23:59:59      73         15-MAR-0601 11:59:59        219621
    2401>  20-APR-1201 11:59:59      73         14-MAR-1201 23:59:59        438766.5
    3601>  20-APR-1801 23:59:59      73         15-MAR-1801 11:59:59        657912
    4801>  20-APR-2401 11:59:59      73         14-MAR-2401 23:59:59        877057.5
 
! ================ REPEATED VALUES ====================
! points
define axis/from/x/name=xax {5,6,6,7}
show axis/x xax
 name       axis              # pts   start                end
 XAX       X                    4 i   5                    7
   Axis span (to cell edges) = 2.999999
 
       I     X                       XBOX          XBOXLO
       1>  5                         1          4.5
       2>  6                         0.500001   5.5
       3>  6.000002                  0.5        6.000001
       4>  7                         0.999998   6.500001
define axis/from/x/name=xax {5,6,6,6,7}
show axis/x xax
 name       axis              # pts   start                end
 XAX       X                    5 i   5                    7
   Axis span (to cell edges) = 2.999998
 
       I     X                       XBOX          XBOXLO
       1>  5                         1          4.5
       2>  6                         0.500001   5.5
       3>  6.000002                  0.000002   6.000001
       4>  6.000004                  0.499999   6.000003
       5>  7                         0.999996   6.500002
define axis/from/x/name=xax {5,6,6,6}
show axis/x xax
 name       axis              # pts   start                end
 XAX       X                    4 i   5                    6
   Axis span (to cell edges) = 1.500003
 
       I     X                       XBOX          XBOXLO
       1>  5                         1          4.5
       2>  6                         0.5000005  5.5
       3>  6.000001                  0.000001   6.0000005
       4>  6.000002                  0.000001   6.0000015
define axis/from/x/name=xax {6,6,7}
show axis/x xax
 name       axis              # pts   start                end
 XAX       X                    3 i   6                    7
   Axis span (to cell edges) = 1.5
 
       I     X                       XBOX          XBOXLO
       1>  6                         0.000001   5.9999995
       2>  6.000001                  0.5        6.0000005
       3>  7                         0.999999   6.5000005
! edges
define axis/from/x/name=xax/edges {5,6,6,7}
show axis/x xax
 name       axis              # pts   start                end
 XAX       X                    3 i   5.5                  6.5
   Axis span (to cell edges) = 2
 
       I     X                       XBOX          XBOXLO
       1>  5.5                       1          5
       2>  6.000001                  0.000002   6
       3>  6.500001                  0.999998   6.000002
define axis/from/x/name=xax/edges {5,6,6,6,7}
show axis/x xax
 name       axis              # pts   start                end
 XAX       X                    4 i   5.5                  6.5
   Axis span (to cell edges) = 2
 
       I     X                       XBOX          XBOXLO
       1>  5.5                       1          5
       2>  6.000001                  0.000002   6
       3>  6.000003                  0.000002   6.000002
       4>  6.500002                  0.999996   6.000004
define axis/from/x/name=xax/edges {5,6,6}
show axis/x xax
 name       axis              # pts   start                end
 XAX       X                    2 i   5.5                  6
   Axis span (to cell edges) = 1.000001
 
       I     X                       XBOX          XBOXLO
       1>  5.5                       1          5
       2>  6.0000005                 0.000001   6
define axis/from/x/name=xax/edges {6,6,7}
show axis/x xax
 name       axis              # pts   start                end
 XAX       X                    2 i   6                    6.5
   Axis span (to cell edges) = 1
 
       I     X                       XBOX          XBOXLO
       1>  6.0000005                 0.000001   6
       2>  6.5000005                 0.999999   6.000001
 
! unresolvable repeated points
set mode ignore
define axis/from/x/name=xax {6,6}
define axis/from/x/name=xax/edges {6,6}
define axis/from/x/name=xax/edges {6,6,6}
define axis/from/x/name=xax {6,6,6.000001,7}
define axis/from/x/name=xax/edges {6,6,6.000001,7}
 
! ================= STREAMLINED SYNTAX ================
! name=expression syntax
define axis/x XAX2 = {1,2,5}
show axis/x xax2
 name       axis              # pts   start                end
 XAX2      X                    3 i   1                    5
   Axis span (to cell edges) = 6
 
       I     X                       XBOX          XBOXLO
       1>  1                         1          0.5
       2>  2                         2          1.5
       3>  5                         3          3.5
define axis/unit=days/t0=1-jan-1990 TAX2 = {1,2,5}	! inferred /T
show axis/t tax2
 name       axis              # pts   start                end
 TAX2      TIME                 3 i   02-JAN-1990 00:00    06-JAN-1990 00:00
T0 = 1-JAN-1990
   Axis span (to cell edges) = 6
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  02-JAN-1990 00:00:00      1          01-JAN-1990 12:00:00        1
       2>  03-JAN-1990 00:00:00      2          02-JAN-1990 12:00:00        2
       3>  06-JAN-1990 00:00:00      3          04-JAN-1990 12:00:00        5
define axis/depth ZAX2 = {1,2,5}			! inferred /Z
show axis/z zax2
 name       axis              # pts   start                end
 ZAX2      Z                    3 i-  1                    5
   Axis span (to cell edges) = 6
 
       K     Z                       ZBOX          ZBOXLO
       1>  1                         1          0.5
       2>  2                         2          1.5
       3>  5                         3          3.5
 
! units inferred from formatting
define axis/X=130e:180:5 xax2
show axis xax2
 name       axis              # pts   start                end
 XAX2      LONGITUDE           11mr   130E                 180E
   Axis span (to cell edges) = 55 (modulo length = 360)
define axis/Y=0:80n:5 yax2
show axis yax2
 name       axis              # pts   start                end
 YAX2      LATITUDE            17 r   0                    80N
   Axis span (to cell edges) = 85
define axis/X=130e:80w:5/units=blahs xax2
show axis xax2
 name       axis              # pts   start                end
 XAX2      X (BLAHS)           31 r   130                  280
   Axis span (to cell edges) = 155
 
! cleanup
set mode/last ignore
*** Running ferret script: bn_pattern.jnl
! pattern_bench.jnl
! Quick demo of Ferret pattern feature *jd* 12.18.98
 
 
set view full
 
use coads_climatology
set reg/l=3/y=50s:60n/x=100e:60w
set mode cal months
 
! Patterns not available in PyFerret
! IF ($program_name"1|PyFerret>1|Ferret>0") THEN EXIT/SCRIPT
set mode ignore
 
 
! The /pattern qualifier sets patterns to be used, like /palette sets colors.
! Files in $FER_PALETTE with extension .pat are read in to set patterns.
! Use "Fpattern '*'" to find available pattern files.
 
! Note that colors are set in the usual way...
 
set win 1
 
set mode meta pattern_plot1.plt
shade/pal=black/lev=(10,30,5,-3)/line/key/pattern=4patterns/nolabel sst
 
go land thick
 
! Colors and patterns can be overlaid; patterns are transparent
 
set win 2
 
set data coads_climatology
set data clim_airt_lev.cdf
set reg/l=1:3/y=50s:60n/x=100e:60w
set mode cal months
 
set mode meta pattern_plot2.plt
fill/lev=(0,33,3)/nolabel sst[l=@ave,d=1]
 
fill/lev=(25,27,1)/over/nolab/pal=black/pat=angled_grid/nolabel airt[l=@ave]
label/user,200,-30,-1,0,.15,@trAIRT gt 25 and lt 27 deg. C
 
go land thick
 
!can data/all
can win 2
set win 1
can mode meta
set mode/last ignore
set mode cal minutes
 
*** Running ferret script: bn_polygon.jnl
! Demo of new POLYGON command
! *jd * 3.99
 
let xsqr = YSEQUENCE({0,.1,.1,0})
let ysqr = YSEQUENCE({0,0,.1,.1})
 
let ypts = x/10
let xpts = cos(x/10)
 
set win/asp=.4
 
set mode meta polygon_plot.plt
polygon/trans/i=1:100/nolable xpts+xsqr, ypts+ysqr, x*x/10
 
polygon/trans/line=6/fill/over/lev/i=1:100/pattern=ball_bearings/nolabel xpts+xsqr, ypts+ysqr+.5, x*x/10
 
polygon/trans/line=4/over/i=1:100/nolabel xpts+xsqr-.25, ypts+ysqr, x*x/10
 
can mode meta
*** Running ferret script: bn500_bug_fixes.jnl
! bn500_bug_fixes.jnl
! test various fixes that went into version 5.00
! 5/99 *kob*
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err491_RESHAPE_ctx.jnl
! err491_RESHAPE_ctx
 
! modified 3/2000 to reflect new significance of context limits
! on arg 2
 
! 3/99 *sh* (bug reported by Jennifer Adams)
! Ferret fails to recognize that source and dest T axes are different
! so it erroneously passes T context to src argument
 
! fixed 3/99 with change to GCF_IMPOSE_ARG_LIM_DFLT
!  (and consequent bug fixes to PARSE_NAM_DSET_GRD and GRID_FROM_NAME)
 
! source data in X,TCAL
define axis/x=1:5:1 x5
define axis/y=1:1:1 y1
define axis/t=15-jan-1951:15-dec-1952/npoints=24 tcal
define grid/x=x5/y=y1/t=tcal gsrc
LET src = x[g=gsrc] + t[g=gsrc]
 
list src
             VARIABLE : X[G=GSRC] + T[G=GSRC]
             SUBSET   : 5 by 24 points (X-TIME)
                       1        2        3        4        5     
                       1        2        3        4        5
 15-JAN-1951 /  1:  438289.  438290.  438291.  438292.  438293.
 14-FEB-1951 /  2:  439019.  439020.  439021.  439022.  439023.
 16-MAR-1951 /  3:  439750.  439751.  439752.  439753.  439754.
 16-APR-1951 /  4:  440480.  440481.  440482.  440483.  440484.
 16-MAY-1951 /  5:  441211.  441212.  441213.  441214.  441215.
 16-JUN-1951 /  6:  441941.  441942.  441943.  441944.  441945.
 16-JUL-1951 /  7:  442672.  442673.  442674.  442675.  442676.
 16-AUG-1951 /  8:  443402.  443403.  443404.  443405.  443406.
 15-SEP-1951 /  9:  444132.  444133.  444134.  444135.  444136.
 15-OCT-1951 / 10:  444863.  444864.  444865.  444866.  444867.
 15-NOV-1951 / 11:  445593.  445594.  445595.  445596.  445597.
 15-DEC-1951 / 12:  446324.  446325.  446326.  446327.  446328.
 15-JAN-1952 / 13:  447054.  447055.  447056.  447057.  447058.
 14-FEB-1952 / 14:  447785.  447786.  447787.  447788.  447789.
 16-MAR-1952 / 15:  448515.  448516.  448517.  448518.  448519.
 15-APR-1952 / 16:  449246.  449247.  449248.  449249.  449250.
 15-MAY-1952 / 17:  449976.  449977.  449978.  449979.  449980.
 15-JUN-1952 / 18:  450706.  450707.  450708.  450709.  450710.
 15-JUL-1952 / 19:  451437.  451438.  451439.  451440.  451441.
 15-AUG-1952 / 20:  452167.  452168.  452169.  452170.  452171.
 14-SEP-1952 / 21:  452898.  452899.  452900.  452901.  452902.
 15-OCT-1952 / 22:  453628.  453629.  453630.  453631.  453632.
 14-NOV-1952 / 23:  454359.  454360.  454361.  454362.  454363.
 15-DEC-1952 / 24:  455089.  455090.  455091.  455092.  455093.
 
! reshaping grid - TCAL ==> 12 month by years
def axis/t=1951:1952:1 tyear
def axis/z=1:12:1 zmonth
!let out_grid = x[g=gsrc,i=1] + y[g=gsrc,j=1] + z[gz=zmonth,k=1] + t[gt=tyear,l=1]  ! pre 3/00
let out_grid = x[g=gsrc] + y[g=gsrc] + z[gz=zmonth] + t[gt=tyear]
 
! reshape the source data -- OK
let out = reshape(src,out_grid)
list out
             VARIABLE : RESHAPE(SRC,OUT_GRID)
             SUBSET   : 5 by 12 by 2 points (X-Z-T)
             Y        : 0.5 to 1.5
                1        2        3        4        5     
                1        2        3        4        5
 ---- L:1 T:   1951
 1    /  1:  438289.  438290.  438291.  438292.  438293.
 2    /  2:  439019.  439020.  439021.  439022.  439023.
 3    /  3:  439750.  439751.  439752.  439753.  439754.
 4    /  4:  440480.  440481.  440482.  440483.  440484.
 5    /  5:  441211.  441212.  441213.  441214.  441215.
 6    /  6:  441941.  441942.  441943.  441944.  441945.
 7    /  7:  442672.  442673.  442674.  442675.  442676.
 8    /  8:  443402.  443403.  443404.  443405.  443406.
 9    /  9:  444132.  444133.  444134.  444135.  444136.
 10   / 10:  444863.  444864.  444865.  444866.  444867.
 11   / 11:  445593.  445594.  445595.  445596.  445597.
 12   / 12:  446324.  446325.  446326.  446327.  446328.
 ---- L:2 T:   1952
 1    /  1:  447054.  447055.  447056.  447057.  447058.
 2    /  2:  447785.  447786.  447787.  447788.  447789.
 3    /  3:  448515.  448516.  448517.  448518.  448519.
 4    /  4:  449246.  449247.  449248.  449249.  449250.
 5    /  5:  449976.  449977.  449978.  449979.  449980.
 6    /  6:  450706.  450707.  450708.  450709.  450710.
 7    /  7:  451437.  451438.  451439.  451440.  451441.
 8    /  8:  452167.  452168.  452169.  452170.  452171.
 9    /  9:  452898.  452899.  452900.  452901.  452902.
 10   / 10:  453628.  453629.  453630.  453631.  453632.
 11   / 11:  454359.  454360.  454361.  454362.  454363.
 12   / 12:  455089.  455090.  455091.  455092.  455093.
 
! NOW THE ERROR: L LIMITS PASSED INCORRECTLY(ERRONEOUSLY) TO SRC
list/l=1 out
             VARIABLE : RESHAPE(SRC,OUT_GRID)
             SUBSET   : 5 by 12 points (X-Z)
             Y        : 0.5 to 1.5
             T        : 1951
                1        2        3        4        5     
                1        2        3        4        5
 1    /  1:  438289.  438290.  438291.  438292.  438293.
 2    /  2:  439019.  439020.  439021.  439022.  439023.
 3    /  3:  439750.  439751.  439752.  439753.  439754.
 4    /  4:  440480.  440481.  440482.  440483.  440484.
 5    /  5:  441211.  441212.  441213.  441214.  441215.
 6    /  6:  441941.  441942.  441943.  441944.  441945.
 7    /  7:  442672.  442673.  442674.  442675.  442676.
 8    /  8:  443402.  443403.  443404.  443405.  443406.
 9    /  9:  444132.  444133.  444134.  444135.  444136.
 10   / 10:  444863.  444864.  444865.  444866.  444867.
 11   / 11:  445593.  445594.  445595.  445596.  445597.
 12   / 12:  446324.  446325.  446326.  446327.  446328.
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err491_delete_child_var.jnl
! err491_delete_child_var.jnl
! *sh* 4/99
 
! when a grid-changing variable definition was redefined (replaced)
! Its child variables were not removed, leading to wrong results
 
! fixed with mod to XEQ_DEFINE
 
! why does ypolymark depend on xpolyshape ??
let xpolyshape = X[X=1:3:1]
let ypolyshape = X[X=10:30:10]
 
! THE ACT OF DEFINING XPOLYMARK CHANGES THE OUTCOME ...
LET xpolymark = XSEQUENCE(xpolyshape) * 1
LET ypolymark = XSEQUENCE(ypolyshape) * 1
 
list  ypolymark  ! correct values: 1,2,3
             VARIABLE : XSEQUENCE(YPOLYSHAPE) * 1
             SUBSET   : 3 points (X)
 1   / 1:  10.00
 2   / 2:  20.00
 3   / 3:  30.00
 
! THE ACT OF DEFINING XPOLYMARK CHANGES THE OUTCOME ...
LET xpolymark = XSEQUENCE(xpolyshape) * 1
LET ypolymark = XSEQUENCE(ypolyshape) * 1
 
list  ypolymark	! incorrect values: 10, 20, 30
             VARIABLE : XSEQUENCE(YPOLYSHAPE) * 1
             SUBSET   : 3 points (X)
 1   / 1:  10.00
 2   / 2:  20.00
 3   / 3:  30.00
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err491_dp_time_write.jnl
! err491_dp_time_write.jnl
! *sh* 10/98
 
 
! when appending ("synchronizing") a new output time to an existing
! netCDF file, Ferret fails to do a valid double precision comparison
 
 
define axis/t="18-jul-1997:14:09":"20-jul-1997:00:09":5/units=min t5
LET my_var = t[gt=t5]
 
save/clobber/file=out.cdf my_var[l=1]
sp echo "err491_dp_time_write.jnl --- 1 original file" >> all_ncdump.out
sp ncdump out.cdf >> all_ncdump.out
 
save/append/file=out.cdf my_var[l=2]
sp echo "err491_dp_time_write.jnl --- 2 after append" >> all_ncdump.out
sp ncdump out.cdf >> all_ncdump.out
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err491_gmax.jnl
! err491_gmax.jnl
! 9 Dec. 1998 *sh*
 
! .. crash when attempting a time regridding with g=@MAX
 
let ts = RANDU(T[T=1-jan-1990:15-jan-1990:1])
plot ts
define axis/t="1-jan-1990:12:00":"15-jan-1990:12:00":24/unit=hours t24
plot/over ts[gt=t24@ave]
 
! crash when attempting an @MAX regridding
load ts[gt=t24@max]
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err491_grid_from_name.jnl
! err491_grid_from_name.jnl
! *sh* 3/99
 
! implicit grid, such as "Z[gz=zax]", are allowed in places they shouldn't be
 
! fixed with change to GRID_FROM_NAME (and PARSE_NAM_DSET_GRD)
 
set mode ignore
define axis/z=1:10:1 z10
set grid z[gz=z10]
show grid
 Default grid for DEFINE VARIABLE is (G###)
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 Z10       Z                   10 r   1                    10                  full
 normal    T
can mode ignore
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err491_let_d.jnl
! err491_let_d.jnl
! *sh* 10/98
 
! using /d in the definition of a data-set independent variable causes a crash
 
let/d a = x+y
stat/i=1:3/j=1:3 a
 
             X+Y
             X: 0.5 to 3.5
             Y: 0.5 to 3.5
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 9 (3*3*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 2
 Maximum value: 6
 Mean    value: 4 (unweighted average)
 Standard deviation: 1.2247
 
! 3/01 *kob* uncomment the below - seems to run on all systems
! GO err491_long_gif_name.jnl ! moved to bn_gif.jnl
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err491_sh_var_templates.jnl
! SHOW VARIABLE templates are not robust
 
let mld5dec = 1
 
sho var m*dec		! no response ??
sho var ml*dec		! no response ??
sho var mld*dec		! works
 MLD5DEC = 1
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err491_single_char_replace.jnl
! err491_single_char_replace.jnl
 
! 4/99 *sh*
 
! erroneous error trap for single character symbol replacement
!  **ERROR: command syntax: empty argument replacement string: ($undefined|"h")
SAY ($undefined|"h")
 !-> MESSAGE/CONTINUE h
h
 
! but OK in this case
SAY ($undefined|"hh")
 !-> MESSAGE/CONTINUE hh
hh
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err491_spawn_quotes.jnl
! err491_spawn_quotes.jnl
 
! fixed in xeq_spawn 1/99 *sh*
 
! this should be a valid command
SPAWN "date"
WKD MON DD HH:MM:SS ZZZ YYYY
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err491_time_regridding.jnl
! err491_time_regridding.jnl
! from Jon 10/16/98
 
! this core dumps ... it is unable to reconcile the
! l=13:48 in the current region with the t=15-jan-1995:15-jan-1998
! (which corresponds to L=1:37) in the definition of "bad"
 
!set mode diag
set wind/siz=.3
 
set data TAO_SST_clim.cdf
 
define axis/t=15-jan-1995:15-dec-1999:1/unit=mon my_t_axis
 
let good = sst_clim[gt=my_t_axis]
let bad  = sst_clim[gt=my_t_axis,t=15-jan-1995:15-jan-1998]
 
set region/x=125w/y=0n/l=13:48
 
plot     good[x=@sbx:3]
plot/over     good[y=@sbx:3]
plot/over     good[z=@sbx:3]
plot/over     good[t=@sbx:3]
 
 
cancel memory/all
plot/over bad[x=@sbx:3]
plot/over bad[y=@sbx:3]
plot/over bad[z=@sbx:3]
plot/over bad[t=@sbx:3]
 
! 3/01 *kob* uncomment the below - seems to run on all systems
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err491_unknown_function.jnl
! err491_unknown_function
! 3/99 *sh*
 
! when unknown function occurs in the 2nd (or higher) expression in a line
! a crash occurs
 
! crash occurs processing error message in subroutine RPN.
! Cause is incorrect string limits passed from INIT_UVAR_SUB.
 
set mode ignore
stat i, noname(i)
can mode ignore
 
! *kob* added 6/11/1999
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err500_IF_THEN_ELSE_quote.jnl
! err500_IF_THEN_ELSE_quote.jnl
 
! 6/9/99 - final quotation mark is lost by parser resulting in error.
 
! solved 6/11/99 in xeq_if.F
 
 
IF 1 THEN SAY "I is too big" ENDIF
I is too big
*** Running ferret script: bn_sample.jnl
! bn_sample.jnl
! 10/99 *sh*
! V550 *sh* 11/02 - documentation change only, reflecting subspan modulo
 
! test the internally optimized version of the SAMPLE* commands
 
! basic file variable access
use coads_climatology
let/quiet a = sst
list sst[I=30:50:10,l=1,y=-2:2]		! reference listing
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
                        regrid: 20 deg on X
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 2 points (LONGITUDE-LATITUDE)
             TIME     : 16-JAN 06:00
              79E    99E   119E   
               1      2      3
 1N   / 46:  28.22  28.20  28.45
 1S   / 45:  28.15  28.56  28.83
list SAMPLEI(sst[l=1,y=0],{30,40,50})
             VARIABLE : SAMPLEI(SST[L=1,Y=0],{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (X)
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
            1S    
            45
 1   / 1:  28.15
 2   / 2:  28.56
 3   / 3:  28.83
list SAMPLEI(sst[l=1,y=-2:2],{30,40,50})
             VARIABLE : SAMPLEI(SST[L=1,Y=-2:2],{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 2 points (X-LATITUDE)
             TIME     : 16-JAN 06:00
               1      2      3    
               1      2      3
 1N   / 46:  28.22  28.20  28.45
 1S   / 45:  28.15  28.56  28.83
list SAMPLEI(sst[l=1:3,y=-2:2],{30,40,50})
             VARIABLE : SAMPLEI(SST[L=1:3,Y=-2:2],{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 2 by 3 points (X-LATITUDE-TIME)
               1      2      3    
               1      2      3
 ---- L:1 T:   16-JAN 06:00
 1N   / 46:  28.22  28.20  28.45
 1S   / 45:  28.15  28.56  28.83
 ---- L:2 T:   15-FEB 16:29
 1N   / 46:  28.58  28.59  28.15
 1S   / 45:  28.33  28.71  28.47
 ---- L:3 T:   17-MAR 02:58
 1N   / 46:  29.14  28.92  28.33
 1S   / 45:  28.90  28.82  28.54
SHOW MEM/FREE
    SET MEMORY/MAX: 500 Mb   (62.5 megawords)
    Peak demand: 0.31 Kb
    Current cache: 0.5 Kb
    Total table slots: 500
    Free table slots: 487
    Un-cached variables: 0
 
! these should break sampling up into separate reads
cancel memory/all
set mode diagnostic
list/i=2 SAMPLEI(sst[l=1,y=-2:2],{30,40,50})	! only I=2 from result
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C01,V02 C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C09,V02 C: 10 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      2      2  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C01,V02 C:  7 dset:   1 I:      2      2  J: -999 -999  K: -999 -999  L:   -999   -999
 const_v {30,...} M: 15 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 doing sampling tpry on I axis:        1        3 dset:   1
 eval    (C09,V02 C: 11 dset:   1 I:     30     30  J: -999 -999  K: -999 -999  L:   -999   -999
 reading SST      M:  8 dset:   1 I:     30     30  J:   45   46  K: -999 -999  L:      1      1
 eval    (C09,V02 C: 11 dset:   1 I:     40     40  J:   45   46  K: -999 -999  L:      1      1
 reading SST      M:  4 dset:   1 I:     40     40  J:   45   46  K: -999 -999  L:      1      1
 eval    (C09,V02 C: 11 dset:   1 I:     50     50  J:   45   46  K: -999 -999  L:      1      1
 reading SST      M:  2 dset:   1 I:     50     50  J:   45   46  K: -999 -999  L:      1      1
 -DELETE SST      M:  9 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:      3      3  M: -999 -999  N: -999 -999
 -DELETE SST      M: 12 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE tpry     M:  5 dset:   1 I:      1      3  J:   45   46  K: -999 -999  L:      1      1
 -DELETE {30,...} M: 15 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : SAMPLEI(SST[L=1,Y=-2:2],{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 2 points (LATITUDE)
             X        : 2
             TIME     : 16-JAN 06:00
               2    
               2
 1N   / 46:  28.20
 1S   / 45:  28.56
 -DELETE (C01,V02 M: 15 dset:   1 I:      2      2  J:   45   46  K: -999 -999  L:      1      1
cancel memory/all
 -DELETE (C09,V02 M:  3 dset:   1 I:     40     40  J:   45   46  K: -999 -999  L:      1      1
 -DELETE (C09,V02 M:  7 dset:   1 I:     30     30  J:   45   46  K: -999 -999  L:      1      1
 -DELETE (C09,V02 M: 13 dset:   1 I:     50     50  J:   45   46  K: -999 -999  L:      1      1
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 -DELETE (C01,V02 M: 12 dset:   1 I:      1      3  J:   45   46  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 dealloc  dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 -DELETE SST      M:  2 dset:   1 I:     50     50  J:   45   46  K: -999 -999  L:      1      1
 -DELETE SST      M:  4 dset:   1 I:     40     40  J:   45   46  K: -999 -999  L:      1      1
 -DELETE SST      M:  8 dset:   1 I:     30     30  J:   45   46  K: -999 -999  L:      1      1
list/l=1/y=-2:2  SAMPLEI(sst,{30,40,50})
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:   -999   -999  J:   45   46  K: -999 -999  L:      1      1
 const_v {30,...} M:  8 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 doing sampling tpry on I axis:        1        3 dset:   1
 reading SST      M: 12 dset:   1 I:     30     30  J:   45   46  K: -999 -999  L:      1      1
 reading SST      M:  7 dset:   1 I:     40     40  J:   45   46  K: -999 -999  L:      1      1
 reading SST      M:  3 dset:   1 I:     50     50  J:   45   46  K: -999 -999  L:      1      1
 -DELETE SST      M:  2 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:      3      3  M: -999 -999  N: -999 -999
 -DELETE SST      M:  4 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE tpry     M: 13 dset:   1 I:      1      3  J:   45   46  K: -999 -999  L:      1      1
 -DELETE {30,...} M:  8 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : SAMPLEI(SST,{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 2 points (X-LATITUDE)
             TIME     : 16-JAN 06:00
               1      2      3    
               1      2      3
 1N   / 46:  28.22  28.20  28.45
 1S   / 45:  28.15  28.56  28.83
cancel memory/all
 -DELETE EX#1     M:  4 dset:   1 I:      1      3  J:   45   46  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 -DELETE SST      M:  3 dset:   1 I:     50     50  J:   45   46  K: -999 -999  L:      1      1
 -DELETE SST      M:  7 dset:   1 I:     40     40  J:   45   46  K: -999 -999  L:      1      1
 -DELETE SST      M: 12 dset:   1 I:     30     30  J:   45   46  K: -999 -999  L:      1      1
list/l=1/y=-2:2  SAMPLEI(a  ,{30,40,50})
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  8 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:   -999   -999  J:   45   46  K: -999 -999  L:      1      1
 const_v {30,...} M: 12 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 doing sampling tpry on I axis:        1        3 dset:   1
 eval    A        C:  9 dset:   1 I:     30     30  J:   45   46  K: -999 -999  L:      1      1
 reading SST      M:  4 dset:   1 I:     30     30  J:   45   46  K: -999 -999  L:      1      1
 eval    A        C:  9 dset:   1 I:     40     40  J:   45   46  K: -999 -999  L:      1      1
 reading SST      M:  2 dset:   1 I:     40     40  J:   45   46  K: -999 -999  L:      1      1
 eval    A        C:  9 dset:   1 I:     50     50  J:   45   46  K: -999 -999  L:      1      1
 reading SST      M:  5 dset:   1 I:     50     50  J:   45   46  K: -999 -999  L:      1      1
 -DELETE SST      M:  3 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:      3      3  M: -999 -999  N: -999 -999
 -DELETE SST      M:  7 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE tpry     M: 13 dset:   1 I:      1      3  J:   45   46  K: -999 -999  L:      1      1
 -DELETE {30,...} M: 12 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : SAMPLEI(A  ,{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 2 points (X-LATITUDE)
             TIME     : 16-JAN 06:00
               1      2      3    
               1      2      3
 1N   / 46:  28.22  28.20  28.45
 1S   / 45:  28.15  28.56  28.83
 
! these should NOT break up the access into chunks
cancel memory/all
 -DELETE EX#1     M:  7 dset:   1 I:      1      3  J:   45   46  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 -DELETE A        M:  8 dset:   1 I:     30     30  J:   45   46  K: -999 -999  L:      1      1
 -DELETE A        M:  9 dset:   1 I:     50     50  J:   45   46  K: -999 -999  L:      1      1
 -DELETE A        M: 15 dset:   1 I:     40     40  J:   45   46  K: -999 -999  L:      1      1
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 -DELETE SST      M:  2 dset:   1 I:     40     40  J:   45   46  K: -999 -999  L:      1      1
 -DELETE SST      M:  4 dset:   1 I:     30     30  J:   45   46  K: -999 -999  L:      1      1
 -DELETE SST      M:  5 dset:   1 I:     50     50  J:   45   46  K: -999 -999  L:      1      1
list/l=1/y=-2:2  SAMPLEI(sst[i=30:40],{30,40,50})
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C01,V02 C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C09,V02 C: 10 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:   -999   -999  J:   45   46  K: -999 -999  L:      1      1
 eval    (C01,V02 C:  7 dset:   1 I:   -999   -999  J:   45   46  K: -999 -999  L:      1      1
 const_v {30,...} M:  5 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 doing sampling tpry on I axis:        1        3 dset:   1
 eval    (C09,V02 C: 11 dset:   1 I:   -999   -999  J:   45   46  K: -999 -999  L:      1      1
 reading SST      M: 15 dset:   1 I:     30     40  J:   45   46  K: -999 -999  L:      1      1
 -DELETE SST      M:  2 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:      3      3  M: -999 -999  N: -999 -999
 -DELETE SST      M:  4 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE tpry     M:  8 dset:   1 I:      1      3  J:   45   46  K: -999 -999  L:      1      1
 -DELETE {30,...} M:  5 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : SAMPLEI(SST[I=30:40],{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 2 points (X-LATITUDE)
             TIME     : 16-JAN 06:00
               1      2      3    
               1      2      3
 1N   / 46:  28.22  28.20   ....
 1S   / 45:  28.15  28.56   ....
let/quiet a = sst[i=30:40]
 -DELETE (C09,V02 M:  9 dset:   1 I:     30     40  J:   45   46  K: -999 -999  L:      1      1
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 -DELETE (C01,V02 M:  4 dset:   1 I:      1      3  J:   45   46  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 dealloc  dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
cancel memory/all
 -DELETE SST      M: 15 dset:   1 I:     30     40  J:   45   46  K: -999 -999  L:      1      1
list/l=1/y=-2:2  SAMPLEI(a,{30,40,50})
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  8 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:   -999   -999  J:   45   46  K: -999 -999  L:      1      1
 const_v {30,...} M: 15 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 doing sampling tpry on I axis:        1        3 dset:   1
 eval    A        C:  9 dset:   1 I:   -999   -999  J:   45   46  K: -999 -999  L:      1      1
 reading SST      M:  5 dset:   1 I:     30     40  J:   45   46  K: -999 -999  L:      1      1
 -DELETE          M:  9 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:      3      3  M: -999 -999  N: -999 -999
 -DELETE          M:  4 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE tpry     M:  2 dset:   1 I:      1      3  J:   45   46  K: -999 -999  L:      1      1
 -DELETE {30,...} M: 15 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : SAMPLEI(A,{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 2 points (X-LATITUDE)
             TIME     : 16-JAN 06:00
               1      2      3    
               1      2      3
 1N   / 46:  28.22  28.20   ....
 1S   / 45:  28.15  28.56   ....
cancel memory/all
 -DELETE EX#1     M:  4 dset:   1 I:      1      3  J:   45   46  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 -DELETE A        M:  8 dset:   1 I:     30     40  J:   45   46  K: -999 -999  L:      1      1
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 -DELETE SST      M:  5 dset:   1 I:     30     40  J:   45   46  K: -999 -999  L:      1      1
list/l=1/y=-2:2  SAMPLEI(a,{30})		! sample at just 1 point
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  8 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:   -999   -999  J:   45   46  K: -999 -999  L:      1      1
 const_v {30}     M:  5 dset:   0 I:      1      1  J: -999 -999  K: -999 -999  L:   -999   -999
 doing sampling tpry on I axis:        1        1 dset:   1
 eval    A        C:  9 dset:   1 I:   -999   -999  J:   45   46  K: -999 -999  L:      1      1
 reading SST      M: 15 dset:   1 I:     30     40  J:   45   46  K: -999 -999  L:      1      1
 -DELETE EX#1     M:  4 dset:   1 I:      1      1  J: -999 -999  K: -999 -999  L:      1      1  M: -999 -999  N: -999 -999
 -DELETE A        M:  8 dset:   1 I:      1      1  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE tpry     M:  9 dset:   1 I:      1      1  J:   45   46  K: -999 -999  L:      1      1
 -DELETE {30}     M:  5 dset:   0 I:      1      1  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : SAMPLEI(A,{30})
             FILENAME : coads_climatology.cdf
             SUBSET   : 2 points (LATITUDE)
             X        : 1
             TIME     : 16-JAN 06:00
               1    
               1
 1N   / 46:  28.22
 1S   / 45:  28.15
cancel memory/all
 -DELETE EX#1     M:  8 dset:   1 I:      1      1  J:   45   46  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 -DELETE A        M:  2 dset:   1 I:     30     40  J:   45   46  K: -999 -999  L:      1      1
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 -DELETE SST      M: 15 dset:   1 I:     30     40  J:   45   46  K: -999 -999  L:      1      1
list/l=1/y=-2:2  SAMPLEI(a,30)			! sample at just 1 point
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C01,V02 C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C11,V02 C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C: 10 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:   -999   -999  J:   45   46  K: -999 -999  L:      1      1
 eval    (C01,V02 C:  7 dset:   1 I:   -999   -999  J:   45   46  K: -999 -999  L:      1      1
 eval    (C11,V02 C:  9 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 constan cnst     M: 15 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE cnst     M: 15 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 doing sampling tpry on I axis:        1        1 dset:   1
 eval    A        C: 11 dset:   1 I:   -999   -999  J:   45   46  K: -999 -999  L:      1      1
 reading SST      M:  5 dset:   1 I:     30     40  J:   45   46  K: -999 -999  L:      1      1
 -DELETE EX#1     M:  8 dset:   1 I:      1      1  J: -999 -999  K: -999 -999  L:      1      1  M: -999 -999  N: -999 -999
 -DELETE cnst     M: 15 dset:   0 I:      1      1  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE tpry     M:  4 dset:   1 I:      1      1  J:   45   46  K: -999 -999  L:      1      1
             VARIABLE : SAMPLEI(A,30)
             FILENAME : coads_climatology.cdf
             SUBSET   : 2 points (LATITUDE)
             X        : 1
             TIME     : 16-JAN 06:00
               1    
               1
 1N   / 46:  28.22
 1S   / 45:  28.15
cancel memory/all
 -DELETE (C11,V02 M:  2 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 -DELETE (C01,V02 M: 15 dset:   1 I:      1      1  J:   45   46  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 dealloc  dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 -DELETE A        M:  9 dset:   1 I:     30     40  J:   45   46  K: -999 -999  L:      1      1
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 -DELETE SST      M:  5 dset:   1 I:     30     40  J:   45   46  K: -999 -999  L:      1      1
let/quiet fsst = sst[x=@fln] 		! fill holes to allow @iin to work
let/quiet a = fsst[i=@iin]		! @iin forces all-at-once
list/l=1/y=-2:2  SAMPLEI(a,{30,40,50})
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  8 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid FSST     C: 10 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:   -999   -999  J:   45   46  K: -999 -999  L:      1      1
 const_v {30,...} M:  5 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 doing sampling tpry on I axis:        1        3 dset:   1
 eval    A        C:  9 dset:   1 I:      1    180  J:   45   46  K: -999 -999  L:      1      1
 strip --> FSST[X=20E:20E(380)@IIN,D=1]
 eval    FSST     C: 12 dset:   1 I:      1    180  J:   45   46  K: -999 -999  L:      1      1
 strip --> SST[I=1:180@FLN:1,D=1]
 strip moduloing SST on X axis:        0      181 dset:   1
 reading SST      M:  2 dset:   1 I:      1    180  J:   45   46  K: -999 -999  L:      1      1
 doing moduloing SST on X axis:        1      180 dset:   1
 doing --> SST[I=1:180@FLN:1,D=1]
 doing --> FSST[X=20E:20E(380)@IIN,D=1]
 -DELETE          M: 15 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:      3      3  M: -999 -999  N: -999 -999
 -DELETE A        M:  9 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE tpry     M:  3 dset:   1 I:      1      3  J:   45   46  K: -999 -999  L:      1      1
 -DELETE {30,...} M:  5 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : SAMPLEI(A,{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 2 points (X-LATITUDE)
             TIME     : 16-JAN 06:00
                 1          2          3      
                 1          2          3
 1N   / 46:  1.829E+08  2.458E+08  3.068E+08
 1S   / 45:  1.837E+08  2.469E+08  3.095E+08
cancel memory/all
 -DELETE EX#1     M:  9 dset:   1 I:      1      3  J:   45   46  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 -DELETE A        M: 13 dset:   1 I:      1    180  J:   45   46  K: -999 -999  L:      1      1
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 -DELETE FSST     M:  7 dset:   1 I:      1    180  J:   45   46  K: -999 -999  L:      1      1
 -DELETE FSST     M: 12 dset:   1 I:      1    180  J:   45   46  K: -999 -999  L:      1      1
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 -DELETE SST      M:  2 dset:   1 I:      1    180  J:   45   46  K: -999 -999  L:      1      1
 -DELETE SST      M:  4 dset:   1 I:      0    181  J:   45   46  K: -999 -999  L:      1      1
 -DELETE SST      M:  8 dset:   1 I:      1    180  J:   45   46  K: -999 -999  L:      1      1
 
! now test optimization that uses large memory chunks if available
cancel memory/all
load/l=1/y=0 sst[I=30:50]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:   -999   -999  J:   45   45  K: -999 -999  L:      1      1
 reading SST      M:  8 dset:   1 I:     30     50  J:   45   45  K: -999 -999  L:      1      1
list/l=1/y=0  SAMPLEI(sst,{30,40,50})
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:   -999   -999  J:   45   45  K: -999 -999  L:      1      1
 const_v {30,...} M:  4 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 doing sampling tpry on I axis:        1        3 dset:   1
 found   SST      M:  8 dset:   1 I:     30     50  J:   45   45  K: -999 -999  L:      1      1
 -DELETE FSST     M: 12 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:      3      3  M: -999 -999  N: -999 -999
 -DELETE SST      M:  2 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE tpry     M:  7 dset:   1 I:      1      3  J:   45   45  K: -999 -999  L:      1      1
 -DELETE {30,...} M:  4 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : SAMPLEI(SST,{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (X)
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
            1S    
            45
 1   / 1:  28.15
 2   / 2:  28.56
 3   / 3:  28.83
cancel memory/all
 -DELETE EX#1     M:  2 dset:   1 I:      1      3  J:   45   45  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 -DELETE SST      M:  8 dset:   1 I:     30     50  J:   45   45  K: -999 -999  L:      1      1
load/l=1/y=0 sst[I=30:39]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:   -999   -999  J:   45   45  K: -999 -999  L:      1      1
 reading SST      M:  8 dset:   1 I:     30     39  J:   45   45  K: -999 -999  L:      1      1
list/l=1/y=0  SAMPLEI(sst,{30,40,50})
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:   -999   -999  J:   45   45  K: -999 -999  L:      1      1
 const_v {30,...} M:  2 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 doing sampling tpry on I axis:        1        3 dset:   1
 found   SST      M:  8 dset:   1 I:     30     39  J:   45   45  K: -999 -999  L:      1      1
 reading SST      M: 13 dset:   1 I:     40     40  J:   45   45  K: -999 -999  L:      1      1
 reading SST      M:  9 dset:   1 I:     50     50  J:   45   45  K: -999 -999  L:      1      1
 -DELETE tpry     M:  7 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:      3      3  M: -999 -999  N: -999 -999
 -DELETE EX#1     M:  4 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE tpry     M: 12 dset:   1 I:      1      3  J:   45   45  K: -999 -999  L:      1      1
 -DELETE {30,...} M:  2 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : SAMPLEI(SST,{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (X)
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
            1S    
            45
 1   / 1:  28.15
 2   / 2:  28.56
 3   / 3:  28.83
cancel memory/all
 -DELETE EX#1     M:  4 dset:   1 I:      1      3  J:   45   45  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 -DELETE SST      M:  8 dset:   1 I:     30     39  J:   45   45  K: -999 -999  L:      1      1
 -DELETE SST      M:  9 dset:   1 I:     50     50  J:   45   45  K: -999 -999  L:      1      1
 -DELETE SST      M: 13 dset:   1 I:     40     40  J:   45   45  K: -999 -999  L:      1      1
load/l=1/y=0 sst[I=30:40]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:   -999   -999  J:   45   45  K: -999 -999  L:      1      1
 reading SST      M: 13 dset:   1 I:     30     40  J:   45   45  K: -999 -999  L:      1      1
list/l=1/y=0  SAMPLEI(sst,{30,40,50})
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:   -999   -999  J:   45   45  K: -999 -999  L:      1      1
 const_v {30,...} M:  9 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 doing sampling tpry on I axis:        1        3 dset:   1
 found   SST      M: 13 dset:   1 I:     30     40  J:   45   45  K: -999 -999  L:      1      1
 reading SST      M: 12 dset:   1 I:     50     50  J:   45   45  K: -999 -999  L:      1      1
 -DELETE EX#1     M:  4 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:      3      3  M: -999 -999  N: -999 -999
 -DELETE SST      M:  8 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE tpry     M:  2 dset:   1 I:      1      3  J:   45   45  K: -999 -999  L:      1      1
 -DELETE {30,...} M:  9 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : SAMPLEI(SST,{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (X)
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
            1S    
            45
 1   / 1:  28.15
 2   / 2:  28.56
 3   / 3:  28.83
cancel memory/all
 -DELETE EX#1     M:  8 dset:   1 I:      1      3  J:   45   45  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 -DELETE SST      M: 12 dset:   1 I:     50     50  J:   45   45  K: -999 -999  L:      1      1
 -DELETE SST      M: 13 dset:   1 I:     30     40  J:   45   45  K: -999 -999  L:      1      1
load/l=1/y=0 sst[I=30:41]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:   -999   -999  J:   45   45  K: -999 -999  L:      1      1
 reading SST      M: 13 dset:   1 I:     30     41  J:   45   45  K: -999 -999  L:      1      1
list/l=1/y=0  SAMPLEI(sst,{30,40,50})
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:   -999   -999  J:   45   45  K: -999 -999  L:      1      1
 const_v {30,...} M: 12 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 doing sampling tpry on I axis:        1        3 dset:   1
 found   SST      M: 13 dset:   1 I:     30     41  J:   45   45  K: -999 -999  L:      1      1
 reading SST      M:  4 dset:   1 I:     50     50  J:   45   45  K: -999 -999  L:      1      1
 -DELETE EX#1     M:  9 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:      3      3  M: -999 -999  N: -999 -999
 -DELETE EX#1     M:  8 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE tpry     M:  2 dset:   1 I:      1      3  J:   45   45  K: -999 -999  L:      1      1
 -DELETE {30,...} M: 12 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : SAMPLEI(SST,{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (X)
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
            1S    
            45
 1   / 1:  28.15
 2   / 2:  28.56
 3   / 3:  28.83
set mode/last diagnostic
 
! sampling a user var
let/quiet a = sst + 1
list SAMPLEI(a[l=1:3,y=-2:2],{30,40,50})
             VARIABLE : SAMPLEI(A[L=1:3,Y=-2:2],{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 2 by 3 points (X-LATITUDE-TIME)
               1      2      3    
               1      2      3
 ---- L:1 T:   16-JAN 06:00
 1N   / 46:  29.22  29.20  29.45
 1S   / 45:  29.15  29.56  29.83
 ---- L:2 T:   15-FEB 16:29
 1N   / 46:  29.58  29.59  29.15
 1S   / 45:  29.33  29.71  29.47
 ---- L:3 T:   17-MAR 02:58
 1N   / 46:  30.14  29.92  29.33
 1S   / 45:  29.90  29.82  29.54
let/quiet a = sst[l=1:3,y=-2:2] + 1		! same result, different syntax
list SAMPLEI(a, {30,40,50})
             VARIABLE : SAMPLEI(A, {30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 2 by 3 points (X-LATITUDE-TIME)
               1      2      3    
               1      2      3
 ---- L:1 T:   16-JAN 06:00
 1N   / 46:  29.22  29.20  29.45
 1S   / 45:  29.15  29.56  29.83
 ---- L:2 T:   15-FEB 16:29
 1N   / 46:  29.58  29.59  29.15
 1S   / 45:  29.33  29.71  29.47
 ---- L:3 T:   17-MAR 02:58
 1N   / 46:  30.14  29.92  29.33
 1S   / 45:  29.90  29.82  29.54
 
! combined with a dynamic axis
list SAMPLEI(sst[l=1,y=1s:1n:.5],{30,40,50})
             VARIABLE : SAMPLEI(SST[L=1,Y=1S:1N:.5],{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 5 points (X-LATITUDE)
             TIME     : 16-JAN 06:00
               1      2      3    
               1      2      3
 1N    / 5:  28.22  28.20  28.45
 0.5N  / 4:  28.20  28.29  28.55
 0     / 3:  28.19  28.38  28.64
 0.5S  / 2:  28.17  28.47  28.74
 1S    / 1:  28.15  28.56  28.83
show grid/dyn
Dynamic grids:
    GRID (G###)                          use count:   2
 name       axis              # pts   start                end
 ABSTRACT  X             99999999 r   1                    1.E+08
 (AX###)   LATITUDE             5 r   1S                   1N
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58
cancel memory/all
let/quiet a = sst[l=1,y=1s:1n:.5]
list SAMPLEI(a,{30,40,50})
             VARIABLE : SAMPLEI(A,{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 5 points (X-LATITUDE)
             TIME     : 16-JAN 06:00
               1      2      3    
               1      2      3
 1N    / 5:  28.22  28.20  28.45
 0.5N  / 4:  28.20  28.29  28.55
 0     / 3:  28.19  28.38  28.64
 0.5S  / 2:  28.17  28.47  28.74
 1S    / 1:  28.15  28.56  28.83
show grid/dyn
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 ABSTRACT  X             99999999 r   1                    1.E+08
 (AX###)   LATITUDE             5 r   1S                   1N
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58
 
! sampling a pseudo-variable
list SAMPLEI(X[x=1:12],{3,4,7,15})
             VARIABLE : SAMPLEI(X[X=1:12],{3,4,7,15})
             SUBSET   : 4 points (X)
 1   / 1:  3.000
 2   / 2:  4.000
 3   / 3:  7.000
 4   / 4:   ....
list SAMPLEI(X[x=111:120],{3,4,7})	! indices out of range
             VARIABLE : SAMPLEI(X[X=111:120],{3,4,7})
             SUBSET   : 3 points (X)
 1   / 1:....
 2   / 2:....
 3   / 3:....
list SAMPLEI(X[x=111:120:1],{3,4,7})	! now OK
             VARIABLE : SAMPLEI(X[X=111:120:1],{3,4,7})
             SUBSET   : 3 points (X)
 1   / 1:  113.0
 2   / 2:  114.0
 3   / 3:  117.0
list SAMPLEI(X[x=110:200:10],{3,4,7})
             VARIABLE : SAMPLEI(X[X=110:200:10],{3,4,7})
             SUBSET   : 3 points (X)
 1   / 1:  130.0
 2   / 2:  140.0
 3   / 3:  170.0
cancel memory/all
let/quiet a = X[x=110:200:10]
list SAMPLEI(a,{3,4,7})
             VARIABLE : SAMPLEI(A,{3,4,7})
             SUBSET   : 3 points (X)
 1   / 1:  130.0
 2   / 2:  140.0
 3   / 3:  170.0
 
! sampling a constant !!??!
list SAMPLEI(5,{3,,1})
             VARIABLE : SAMPLEI(5,{3,,1})
             SUBSET   : 3 points (X)
 1   / 1:   ....
 2   / 2:   ....
 3   / 3:  5.000
let/quiet a = 5
list SAMPLEI(a,{3,,1})
             VARIABLE : SAMPLEI(A,{3,,1})
             SUBSET   : 3 points (X)
 1   / 1:   ....
 2   / 2:   ....
 3   / 3:  5.000
 
! sampling a constant list
list SAMPLEI({1,2,3,4,5},{3,,7})
             VARIABLE : SAMPLEI({1,2,3,4,5},{3,,7})
             SUBSET   : 3 points (X)
 1   / 1:  3.000
 2   / 2:   ....
 3   / 3:   ....
 
! over-defined X axis limits
cancel memory/all
list SAMPLEI(sst[l=1,y=0,i=30:50],{30,40,50})
             VARIABLE : SAMPLEI(SST[L=1,Y=0,I=30:50],{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (X)
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
            1S    
            45
 1   / 1:  28.15
 2   / 2:  28.56
 3   / 3:  28.83
cancel memory/all
list SAMPLEI(sst[l=1,y=0,i=35:38],{30,40,50})
             VARIABLE : SAMPLEI(SST[L=1,Y=0,I=35:38],{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (X)
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
           1S  
           45
 1   / 1:....
 2   / 2:....
 3   / 3:....
 
! sampling with disordered and missing values in the index list
list SAMPLEI(sst[l=1,y=-2:2],{30,40,,50})
             VARIABLE : SAMPLEI(SST[L=1,Y=-2:2],{30,40,,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 4 by 2 points (X-LATITUDE)
             TIME     : 16-JAN 06:00
               1      2      3      4    
               1      2      3      4
 1N   / 46:  28.22  28.20   ....  28.45
 1S   / 45:  28.15  28.56   ....  28.83
list SAMPLEI(sst[l=1,y=-2:2],{40,,50,30})
             VARIABLE : SAMPLEI(SST[L=1,Y=-2:2],{40,,50,30})
             FILENAME : coads_climatology.cdf
             SUBSET   : 4 by 2 points (X-LATITUDE)
             TIME     : 16-JAN 06:00
               1      2      3      4    
               1      2      3      4
 1N   / 46:  28.20   ....  28.45  28.22
 1S   / 45:  28.56   ....  28.83  28.15
 
! out of bounds indices
list SAMPLEI(sst[l=1,y=0,i=30:50],{30 ,400,500})
             VARIABLE : SAMPLEI(SST[L=1,Y=0,I=30:50],{30 ,400,500})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (X)
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
            1S    
            45
 1   / 1:  28.15
 2   / 2:   ....
 3   / 3:   ....
list SAMPLEI(sst[l=1,y=0,i=30:50],{-300,400,500})
             VARIABLE : SAMPLEI(SST[L=1,Y=0,I=30:50],{-300,400,500})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (X)
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
           1S  
           45
 1   / 1:....
 2   / 2:....
 3   / 3:....
list SAMPLEI(X[x=110:200:10],{3,40,7})
             VARIABLE : SAMPLEI(X[X=110:200:10],{3,40,7})
             SUBSET   : 3 points (X)
 1   / 1:  130.0
 2   / 2:   ....
 3   / 3:  170.0
 
! sampling along a normal axis
list SAMPLEI(Y[y=110:200:10],{3,4,7})
             VARIABLE : SAMPLEI(Y[Y=110:200:10],{3,4,7})
             SUBSET   : 3 by 10 points (X-Y)
              1   2   3   
               1   2   3
 110   /  1:............
 120   /  2:............
 130   /  3:............
 140   /  4:............
 150   /  5:............
 160   /  6:............
 170   /  7:............
 180   /  8:............
 190   /  9:............
 200   / 10:............
 
! test sampling optimization
cancel memory/all
set mode diagnostic
list SAMPLEI(sst[l=1,y=5N],{31,33,35,37,44,46,48})
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C01,V02 C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C09,V02 C: 10 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          ABSTRACT  COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C01,V02 C:  6 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 const_v {31,...} M: 17 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 doing sampling tpry on I axis:        1        7 dset:   1
 eval    (C09,V02 C: 10 dset:   1 I:     31     35  J: -999 -999  K: -999 -999  L:   -999   -999
 reading SST      M:  2 dset:   1 I:     31     35  J:   48   48  K: -999 -999  L:      1      1
 eval    (C09,V02 C: 10 dset:   1 I:     37     37  J:   48   48  K: -999 -999  L:      1      1
 reading SST      M:  5 dset:   1 I:     37     37  J:   48   48  K: -999 -999  L:      1      1
 eval    (C09,V02 C: 10 dset:   1 I:     44     48  J:   48   48  K: -999 -999  L:      1      1
 reading SST      M:  4 dset:   1 I:     44     48  J:   48   48  K: -999 -999  L:      1      1
 -DELETE SST      M:  7 dset:   1 I:      1      7  J: -999 -999  K: -999 -999  L:      7      7  M: -999 -999  N: -999 -999
 -DELETE SST      M:  8 dset:   1 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE tpry     M: 16 dset:   1 I:      1      7  J:   48   48  K: -999 -999  L:      1      1
 -DELETE {31,...} M: 17 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : SAMPLEI(SST[L=1,Y=5N],{31,33,35,37,44,46,48})
             FILENAME : coads_climatology.cdf
             SUBSET   : 7 points (X)
             LATITUDE : 5N
             TIME     : 16-JAN 06:00
            5N    
            48
 1   / 1:  27.52
 2   / 2:  27.85
 3   / 3:  27.99
 4   / 4:  28.03
 5   / 5:  26.23
 6   / 6:  27.06
 7   / 7:  27.28
 
! test cache hits
list SAMPLEI(sst[l=1,y=5N],{31,33,35,37,44,46,48}) !   <-- CACHE HIT FAILS!!!
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C01,V02 C:  6 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 const_v {31,...} M: 17 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 doing sampling tpry on I axis:        1        7 dset:   1
 found   (C09,V02 M:  1 dset:   1 I:     31     35  J:   48   48  K: -999 -999  L:      1      1
 found   (C09,V02 M: 11 dset:   1 I:     37     37  J:   48   48  K: -999 -999  L:      1      1
 found   (C09,V02 M: 18 dset:   1 I:     44     48  J:   48   48  K: -999 -999  L:      1      1
 -DELETE SST      M:  7 dset:   1 I:      1      7  J: -999 -999  K: -999 -999  L:      7      7  M: -999 -999  N: -999 -999
 -DELETE tpry     M: 16 dset:   1 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE tpry     M: 14 dset:   1 I:      1      7  J:   48   48  K: -999 -999  L:      1      1
 -DELETE {31,...} M: 17 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : SAMPLEI(SST[L=1,Y=5N],{31,33,35,37,44,46,48})
             FILENAME : coads_climatology.cdf
             SUBSET   : 7 points (X)
             LATITUDE : 5N
             TIME     : 16-JAN 06:00
            5N    
            48
 1   / 1:  27.52
 2   / 2:  27.85
 3   / 3:  27.99
 4   / 4:  28.03
 5   / 5:  26.23
 6   / 6:  27.06
 7   / 7:  27.28
set mode/last diagnostic
let a = SAMPLEI(sst[l=1,y=5N],{31,33,35,37,44,46,48})
load a
set mode diagnostic
list a 			!   <-- CACHE HIT FAILS!!!
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    A        C:  6 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C01,V01 C:  8 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 const_v {31,...} M:  1 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
 doing sampling tpry on I axis:        1        7 dset:   1
 found   (C09,V01 M: 11 dset:   1 I:     31     35  J:   48   48  K: -999 -999  L:      1      1
 found   (C09,V01 M: 17 dset:   1 I:     37     37  J:   48   48  K: -999 -999  L:      1      1
 found   (C09,V01 M: 14 dset:   1 I:     44     48  J:   48   48  K: -999 -999  L:      1      1
 -DELETE SST      M:  7 dset:   1 I:      1      7  J: -999 -999  K: -999 -999  L:      7      7  M: -999 -999  N: -999 -999
 -DELETE          M: 18 dset:   1 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE tpry     M:  9 dset:   1 I:      1      7  J:   48   48  K: -999 -999  L:      1      1
 -DELETE {31,...} M:  1 dset:   0 I:      1      7  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : SAMPLEI(SST[L=1,Y=5N],{31,33,35,37,44,46,48})
             FILENAME : coads_climatology.cdf
             SUBSET   : 7 points (X)
             LATITUDE : 5N
             TIME     : 16-JAN 06:00
            5N    
            48
 1   / 1:  27.52
 2   / 2:  27.85
 3   / 3:  27.99
 4   / 4:  28.03
 5   / 5:  26.23
 6   / 6:  27.06
 7   / 7:  27.28
set mode/last diagnostic
 
SHOW MEM/FREE
    SET MEMORY/MAX: 500 Mb   (62.5 megawords)
    Peak demand: 0.3 Kb
    Current cache: 0.4 Kb
    Total table slots: 500
    Free table slots: 490
    Un-cached variables: 0
 
! test SAMPLEJ
let/quiet a = sst + Z[z=0:500:5]
list SAMPLEJ(a[l=1,k=1:2,x=180],30)
             VARIABLE : SAMPLEJ(A[L=1,K=1:2,X=180],30)
             FILENAME : coads_climatology.cdf
             SUBSET   : 2 points (Z)
             LONGITUDE: 179E
             Y        : 1
             TIME     : 16-JAN 06:00
           179E   
            80
 0   / 1:  22.64
 5   / 2:  27.64
list SAMPLEJ(a[l=1,k=1:2,x=180],{30,31,35, 40})
             VARIABLE : SAMPLEJ(A[L=1,K=1:2,X=180],{30,31,35, 40})
             FILENAME : coads_climatology.cdf
             SUBSET   : 4 by 2 points (Y-Z)
             LONGITUDE: 179E
             TIME     : 16-JAN 06:00
             1      2      3      4    
             1      2      3      4
 0   / 1:  22.64  23.53  26.91  29.26
 5   / 2:  27.64  28.53  31.91  34.26
list SAMPLEJ(a[l=1,k=1,x=180],{30,40,50})
             VARIABLE : SAMPLEJ(A[L=1,K=1,X=180],{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (Y)
             LONGITUDE: 179E
             Z        : 0
             TIME     : 16-JAN 06:00
           179E   
            80
 1   / 1:  22.64
 2   / 2:  29.26
 3   / 3:  27.73
list SAMPLEJ(a[l=1,k=1,x=160e:160w:5],{30,40,50})
             VARIABLE : SAMPLEJ(A[L=1,K=1,X=160E:160W:5],{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 9 by 3 points (LONGITUDE-Y)
             Z        : 0
             TIME     : 16-JAN 06:00
           160E   165E   170E   175E    180E  175W   170W   165W   160W   
             1      2      3      4      5      6      7      8      9
 1   / 1:  23.56  22.61  21.94  22.55  22.59  22.44  21.96  22.28  21.66
 2   / 2:  29.35  29.17  29.23  29.44  29.09  29.34  29.13  28.65  28.91
 3   / 3:  27.97  28.06  27.86  27.91  27.43  27.41  27.36  27.40  27.12
list SAMPLEJ(Y[y=110:200:10],{3,4,7})
             VARIABLE : SAMPLEJ(Y[Y=110:200:10],{3,4,7})
             SUBSET   : 3 points (Y)
 1   / 1:  130.0
 2   / 2:  140.0
 3   / 3:  170.0
list SAMPLEJ(YSEQUENCE({1,2,3,4,5}),{5,2,3,,7,2})
             VARIABLE : SAMPLEJ(YSEQUENCE({1,2,3,4,5}),{5,2,3,,7,2})
             SUBSET   : 6 points (Y)
 1   / 1:  5.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:   ....
 5   / 5:   ....
 6   / 6:  2.000
list SAMPLEJ(X[x=110:200:10],{3,4,7})	! normal axis
             VARIABLE : SAMPLEJ(X[X=110:200:10],{3,4,7})
             SUBSET   : 10 by 3 points (X-Y)
           110 120 130 140 150 160 170 180 190 200 
            1   2   3   4   5   6   7   8   9  10
 1   / 1:........................................
 2   / 2:........................................
 3   / 3:........................................
 
! test SAMPLEK
let/quiet a = sst + Z[z=0:500:5]
list SAMPLEK(a[l=1,y=0,x=180],30)
             VARIABLE : SAMPLEK(A[L=1,Y=0,X=180],30)
             FILENAME : coads_climatology.cdf
             LONGITUDE: 179E
             LATITUDE : 1S
             Z        : 1
             TIME     : 16-JAN 06:00
          173.2
list SAMPLEK(a[l=1,y=0,x=180],{30,31,35, 40})
             VARIABLE : SAMPLEK(A[L=1,Y=0,X=180],{30,31,35, 40})
             FILENAME : coads_climatology.cdf
             SUBSET   : 4 points (Z)
             LONGITUDE: 179E
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
           179E   
            80
 1   / 1:  173.2
 2   / 2:  178.2
 3   / 3:  198.2
 4   / 4:  223.2
list SAMPLEK(a[l=1,y=0,x=180],{30,40,50})
             VARIABLE : SAMPLEK(A[L=1,Y=0,X=180],{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (Z)
             LONGITUDE: 179E
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
           179E   
            80
 1   / 1:  173.2
 2   / 2:  223.2
 3   / 3:  273.2
list SAMPLEK(a[l=1,y=0,x=160e:160w:5],{30,40,50})
             VARIABLE : SAMPLEK(A[L=1,Y=0,X=160E:160W:5],{30,40,50})
             FILENAME : coads_climatology.cdf
             SUBSET   : 9 by 3 points (LONGITUDE-Z)
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
           160E   165E   170E   175E    180E  175W   170W   165W   160W   
             1      2      3      4      5      6      7      8      9
 1   / 1:  174.2  174.2  174.0  173.3  173.5  172.8  173.0  172.5  171.9
 2   / 2:  224.2  224.2  224.0  223.3  223.5  222.8  223.0  222.5  221.9
 3   / 3:  274.2  274.2  274.0  273.3  273.5  272.8  273.0  272.5  271.9
list SAMPLEK(Z[z=110:200:10],{3,4,7})
             VARIABLE : SAMPLEK(Z[Z=110:200:10],{3,4,7})
             SUBSET   : 3 points (Z)
 1   / 1:  130.0
 2   / 2:  140.0
 3   / 3:  170.0
list SAMPLEK(ZSEQUENCE({1,2,3,4,5}),{5,2,3,,7,2})
             VARIABLE : SAMPLEK(ZSEQUENCE({1,2,3,4,5}),{5,2,3,,7,2})
             SUBSET   : 6 points (Z)
 1   / 1:  5.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:   ....
 5   / 5:   ....
 6   / 6:  2.000
list SAMPLEK(X[x=110:200:10],{3,4,7})	! normal axis
             VARIABLE : SAMPLEK(X[X=110:200:10],{3,4,7})
             SUBSET   : 10 by 3 points (X-Z)
           110 120 130 140 150 160 170 180 190 200 
            1   2   3   4   5   6   7   8   9  10
 1   / 1:........................................
 2   / 2:........................................
 3   / 3:........................................
 
! test SAMPLEL
let/quiet a = sst + Z[z=0:500:5]
! Note: (V550) In the SAMPLEL examples which follow the L index values
! which exceed L=3 lie outside of the time axis range.  As of V550 this
! triggers a subspan modulo operation (3 months from the full year of 12)
list SAMPLEL(a[y=0,k=1:2,x=180],5)
             VARIABLE : SAMPLEL(A[Y=0,K=1:2,X=180],5)
             FILENAME : coads_climatology.cdf
             SUBSET   : 2 points (Z)
             LONGITUDE: 179E
             LATITUDE : 1S
             T        : 1
           179E   
            80
 0   / 1:  28.20
 5   / 2:  33.20
list SAMPLEL(a[y=0,k=1:2,x=180],{2,3,5, 10})
             VARIABLE : SAMPLEL(A[Y=0,K=1:2,X=180],{2,3,5, 10})
             FILENAME : coads_climatology.cdf
             SUBSET   : 2 by 4 points (Z-T)
             LONGITUDE: 179E
             LATITUDE : 1S
             0      5    
             1      2
 1   / 1:  28.36  33.36
 2   / 2:  28.35  33.35
 3   / 3:  28.20  33.20
 4   / 4:  28.36  33.36
list SAMPLEL(a[y=0,k=1,x=180],{1,5,10})
             VARIABLE : SAMPLEL(A[Y=0,K=1,X=180],{1,5,10})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (T)
             LONGITUDE: 179E
             LATITUDE : 1S
             Z        : 0
           179E   
            80
 1   / 1:  28.20
 2   / 2:  28.20
 3   / 3:  28.36
list SAMPLEL(a[y=0,k=1,x=160e:160w:5],{1,5,10})
             VARIABLE : SAMPLEL(A[Y=0,K=1,X=160E:160W:5],{1,5,10})
             FILENAME : coads_climatology.cdf
             SUBSET   : 9 by 3 points (LONGITUDE-T)
             LATITUDE : 1S
             Z        : 0
           160E   165E   170E   175E    180E  175W   170W   165W   160W   
             1      2      3      4      5      6      7      8      9
 1   / 1:  29.17  29.22  28.96  28.31  28.53  27.80  27.99  27.55  26.93
 2   / 2:  29.17  29.22  28.96  28.31  28.53  27.80  27.99  27.55  26.93
 3   / 3:  29.05  29.19  28.72  29.52  28.33  28.19  27.48  27.47  26.79
list SAMPLEL(T[t=110:200:10],{3,4,7})
             VARIABLE : SAMPLEL(T[T=110:200:10],{3,4,7})
             SUBSET   : 3 points (T)
 1   / 1:  130.0
 2   / 2:  140.0
 3   / 3:  170.0
list SAMPLEL(TSEQUENCE({1,2,3,4,5}),{5,2,3,,7,2})
             VARIABLE : SAMPLEL(TSEQUENCE({1,2,3,4,5}),{5,2,3,,7,2})
             SUBSET   : 6 points (T)
 1   / 1:  5.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:   ....
 5   / 5:   ....
 6   / 6:  2.000
list SAMPLEL(X[x=110:200:10],{3,4,7})	! normal axis
             VARIABLE : SAMPLEL(X[X=110:200:10],{3,4,7})
             SUBSET   : 10 by 3 points (X-T)
           110 120 130 140 150 160 170 180 190 200 
            1   2   3   4   5   6   7   8   9  10
 1   / 1:........................................
 2   / 2:........................................
 3   / 3:........................................
 
*** Running ferret script: bn_strides_revs_perms.jnl
! bn_strides_revs_perms.jnl
! *sh* 6/99
 
! exercise special netCDF performance and robustness enhancements to allow
! reading with strides and permuting and reversing axes
 
! * * * * * PERMUTATIONS * * * * *
! How to evaluate the correct ordering:
! The data in bn_strides.cdf is ordered with the 1's digit
! moving fastert, then the 10's, then 100's, etc.
 
! If (say) /ORDER=ZXY is given we should see the 100's digit
! moving fastest (left to right on each line), the 1's next
! (vertically within each block of output), and the 10's next
! advancing from block to block
 
canc data/all
cancel mode diagnostic
 
! first with an XYZT variable
set region/i=3:6/j=2:4/k=1:2/l=1
use bn_strides
list bigvar
             VARIABLE : VAR
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X-Y-Z)
             T        : 1
             3      4      5      6    
             3      4      5      6
 ---- K:1 Z:   1
 2   / 2:  1123.  1124.  1125.  1126.
 3   / 3:  1133.  1134.  1135.  1136.
 4   / 4:  1143.  1144.  1145.  1146.
 ---- K:2 Z:   2
 2   / 2:  1223.  1224.  1225.  1226.
 3   / 3:  1233.  1234.  1235.  1236.
 4   / 4:  1243.  1244.  1245.  1246.
canc data/all
 
use/order=yx bn_strides
list bigvar
             VARIABLE : VAR
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X-Y-Z)
             T        : 1
             3      4      5      6    
             3      4      5      6
 ---- K:1 Z:   1
 2   / 2:  1132.  1142.  1152.  1162.
 3   / 3:  1133.  1143.  1153.  1163.
 4   / 4:  1134.  1144.  1154.  1164.
 ---- K:2 Z:   2
 2   / 2:  1232.  1242.  1252.  1262.
 3   / 3:  1233.  1243.  1253.  1263.
 4   / 4:  1234.  1244.  1254.  1264.
canc data/all
 
use/order=zyx bn_strides
list bigvar
             VARIABLE : VAR
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X-Y-Z)
             T        : 1
             3      4      5      6    
             3      4      5      6
 ---- K:1 Z:   1
 2   / 2:  1321.  1421.  1521.  1621.
 3   / 3:  1331.  1431.  1531.  1631.
 4   / 4:  1341.  1441.  1541.  1641.
 ---- K:2 Z:   2
 2   / 2:  1322.  1422.  1522.  1622.
 3   / 3:  1332.  1432.  1532.  1632.
 4   / 4:  1342.  1442.  1542.  1642.
canc data/all
 
use/order=zxy bn_strides
list bigvar
             VARIABLE : VAR
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X-Y-Z)
             T        : 1
             3      4      5      6    
             3      4      5      6
 ---- K:1 Z:   1
 2   / 2:  1312.  1412.  1512.  1612.
 3   / 3:  1313.  1413.  1513.  1613.
 4   / 4:  1314.  1414.  1514.  1614.
 ---- K:2 Z:   2
 2   / 2:  1322.  1422.  1522.  1622.
 3   / 3:  1323.  1423.  1523.  1623.
 4   / 4:  1324.  1424.  1524.  1624.
canc data/all
 
! now with an XYT variable
cancel region
set region/i=1:4/j=1:3/l=1:2
use bn_strides
show grid xytvar
    GRID GPC5
 name       axis              # pts   start                end                 subset
 XLON      LONGITUDE           40mr   141E                 180E                full
 YLAT      LATITUDE            30 r   1N                   30N                 full
 normal    Z
 TTIME     TIME                20 r   01-JAN-1995 00:00    20-JAN-1995 00:00   full
list xytvar
             VARIABLE : L*1000 + J*10 + I
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (LONGITUDE-LATITUDE-TIME)
            141E   142E   143E   144E   
              1      2      3      4
 ---- L:1 T:   01-JAN-1995 00:00
 3N   / 3:  1031.  1032.  1033.  1034.
 2N   / 2:  1021.  1022.  1023.  1024.
 1N   / 1:  1011.  1012.  1013.  1014.
 ---- L:2 T:   02-JAN-1995 00:00
 3N   / 3:  2031.  2032.  2033.  2034.
 2N   / 2:  2021.  2022.  2023.  2024.
 1N   / 1:  2011.  2012.  2013.  2014.
canc data/all
 
use/order=yx bn_strides
show grid xytvar
    GRID GPC5
 name       axis              # pts   start                end                 subset
 YLAT      X (degrees_north)   30 r   1                    30                  full
 XLON      Y (degrees_east)    40mr   141                  180                 full
 normal    Z
 TTIME     TIME                20 r   01-JAN-1995 00:00    20-JAN-1995 00:00   full
list xytvar
             VARIABLE : L*1000 + J*10 + I
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X (degrees_north)-Y (degrees_east)-TIME)
               1      2      3      4    
               1      2      3      4
 ---- L:1 T:   01-JAN-1995 00:00
 141   / 1:  1011.  1021.  1031.  1041.
 142   / 2:  1012.  1022.  1032.  1042.
 143   / 3:  1013.  1023.  1033.  1043.
 ---- L:2 T:   02-JAN-1995 00:00
 141   / 1:  2011.  2021.  2031.  2041.
 142   / 2:  2012.  2022.  2032.  2042.
 143   / 3:  2013.  2023.  2033.  2043.
canc data/all
 
use/order=tyx bn_strides
show grid xytvar
    GRID GPC5
 name       axis              # pts   start                end                 subset
 TTIME     X (DAYS)            20 r   34319                34338               full
 YLAT      LATITUDE            30 r   1N                   30N                 full
 normal    Z
 XLON      T (degrees_east)    40mr   141                  180                 full
list xytvar
             VARIABLE : L*1000 + J*10 + I
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X (DAYS)-LATITUDE-T (degrees_east))
            34319  34320  34321  34322  
              1      2      3      4
 ---- L:1 T:   141
 3N   / 3:  1031.  2031.  3031.  4031.
 2N   / 2:  1021.  2021.  3021.  4021.
 1N   / 1:  1011.  2011.  3011.  4011.
 ---- L:2 T:   142
 3N   / 3:  1032.  2032.  3032.  4032.
 2N   / 2:  1022.  2022.  3022.  4022.
 1N   / 1:  1012.  2012.  3012.  4012.
canc data/all
 
use/order=txy bn_strides
show grid xytvar
    GRID GPC5
 name       axis              # pts   start                end                 subset
 TTIME     X (DAYS)            20 r   34319                34338               full
 XLON      Y (degrees_east)    40mr   141                  180                 full
 normal    Z
 YLAT      T (degrees_north)   30 r   1                    30                  full
list xytvar
             VARIABLE : L*1000 + J*10 + I
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X (DAYS)-Y (degrees_east)-T (degrees_north))
             34319  34320  34321  34322  
               1      2      3      4
 ---- L:1 T:   1
 141   / 1:  1011.  2011.  3011.  4011.
 142   / 2:  1012.  2012.  3012.  4012.
 143   / 3:  1013.  2013.  3013.  4013.
 ---- L:2 T:   2
 141   / 1:  1021.  2021.  3021.  4021.
 142   / 2:  1022.  2022.  3022.  4022.
 143   / 3:  1023.  2023.  3023.  4023.
canc data/all
 
! map into Z instead of T
use/order=zxy bn_strides
show grid xytvar
    GRID GPC5
 name       axis              # pts   start                end                 subset
 TTIME     X (DAYS)            20 r   34319                34338               full
 XLON      Y (degrees_east)    40mr   141                  180                 full
 YLAT      Z (degrees_north)   30 r   1                    30                  full
 normal    T
list/k=1:2 xytvar
             VARIABLE : L*1000 + J*10 + I
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X (DAYS)-Y (degrees_east)-Z (degrees_north))
             34319  34320  34321  34322  
               1      2      3      4
 ---- K:1 Z:   1
 141   / 1:  1011.  2011.  3011.  4011.
 142   / 2:  1012.  2012.  3012.  4012.
 143   / 3:  1013.  2013.  3013.  4013.
 ---- K:2 Z:   2
 141   / 1:  1021.  2021.  3021.  4021.
 142   / 2:  1022.  2022.  3022.  4022.
 143   / 3:  1023.  2023.  3023.  4023.
canc data/all
 
! ambiguous mapping
use/order=tx bn_strides
show grid xytvar
    GRID GPC5
 name       axis              # pts   start                end                 subset
 TTIME     X (DAYS)            20 r   34319                34338               full
 XLON      Y (degrees_east)    40mr   141                  180                 full
 normal    Z
 YLAT      T (degrees_north)   30 r   1                    30                  full
list xytvar
             VARIABLE : L*1000 + J*10 + I
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X (DAYS)-Y (degrees_east)-T (degrees_north))
             34319  34320  34321  34322  
               1      2      3      4
 ---- L:1 T:   1
 141   / 1:  1011.  2011.  3011.  4011.
 142   / 2:  1012.  2012.  3012.  4012.
 143   / 3:  1013.  2013.  3013.  4013.
 ---- L:2 T:   2
 141   / 1:  1021.  2021.  3021.  4021.
 142   / 2:  1022.  2022.  3022.  4022.
 143   / 3:  1023.  2023.  3023.  4023.
canc data/all
 
! final "z" goes beyond the 3D -- no effect
use/order=txyz bn_strides
show grid xytvar
    GRID GPC5
 name       axis              # pts   start                end                 subset
 TTIME     X (DAYS)            20 r   34319                34338               full
 XLON      Y (degrees_east)    40mr   141                  180                 full
 normal    Z
 YLAT      T (degrees_north)   30 r   1                    30                  full
show grid var
    GRID GPC1
 name       axis              # pts   start                end                 subset
 TAX1_1    X                    1 r   1                    1                   full
 XAX1_4    Y                    4 r   1                    4                   full
 YAX1_3    Z                    3 r   1                    3                   full
 ZAX1_2    T                    2 r   1                    2                   full
canc data/all
 
! * * * * * STRIDES * * * * *
use bn_strides
set mode diag
cancel memory/all
 
SHOW DATA
     currently SET data sets:
    1> ./data/bn_strides.cdf  (default)
 name     title                             I         J         K         L
 VAR      L*1000 + K*100 + J*10 + I        1:4       1:3       1:2       1:1
 MIDVAR   VAR                              1:9       1:8       1:7       1:6
 BIGVAR   VAR                              1:40      1:30      1:20      1:10
 UNEVENVAR
          L*1000 + K*100 + J[GY=YUNEVEN]*  1:10      1:8       1:6       1:4
 XYTVAR   L*1000 + J*10 + I                1:40      1:30      ...       1:20
 
 
! basic strides
LIST VAR[i=2:4:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 strip regrid on X: VAR --> (G###)           @XACT
 rdstride VAR      C:  7 dset:   1 I:      2      4  J:    1    3  K:    1    2  L:      1      1
 nulrgd  VAR      M:  2 dset:   1 I:      1      2  J:    1    3  K:    1    2  L:      1      1
 -DELETE VAR      M:  1 dset:   1 I:      2      4  J:    1    3  K:    1    2  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
             VARIABLE : L*1000 + K*100 + J*10 + I
                        regrid: 2 delta on X
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             T        : 1
             2      4    
             1      2
 ---- K:1 Z:   1
 1   / 1:  1112.  1114.
 2   / 2:  1122.  1124.
 3   / 3:  1132.  1134.
 ---- K:2 Z:   2
 1   / 1:  1212.  1214.
 2   / 2:  1222.  1224.
 3   / 3:  1232.  1234.
 
! cache hit after changes to COMPLETE_MISSING_LIMS and FLESH_OUT_AXIS
LIST VAR[i=2:4:2]
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 found   VAR      M:  2 dset:   1 I:      1      2  J:    1    3  K:    1    2  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
             VARIABLE : L*1000 + K*100 + J*10 + I
                        regrid: 2 delta on X
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             T        : 1
             2      4    
             1      2
 ---- K:1 Z:   1
 1   / 1:  1112.  1114.
 2   / 2:  1122.  1124.
 3   / 3:  1132.  1134.
 ---- K:2 Z:   2
 1   / 1:  1212.  1214.
 2   / 2:  1222.  1224.
 3   / 3:  1232.  1234.
 
! cache hit through non-file variable
let a = VAR[i=2:4:2]
list a
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 -DELETE VAR      M:  2 dset:   1 I:      1      2  J:    1    3  K:    1    2  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 eval    A        C:  6 dset:   1 I:   -999   -999  J:    1    3  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 strip regrid on X: VAR --> (G###)           @XACT
 rdstride VAR      C:  9 dset:   1 I:      2      4  J:    1    3  K:    1    2  L:      1      1
 nulrgd  VAR      M:  1 dset:   1 I:      1      2  J:    1    3  K:    1    2  L:      1      1
 -DELETE VAR      M:  2 dset:   1 I:      2      4  J:    1    3  K:    1    2  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
             VARIABLE : VAR[I=2:4:2]
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             T        : 1
             2      4    
             1      2
 ---- K:1 Z:   1
 1   / 1:  1112.  1114.
 2   / 2:  1122.  1124.
 3   / 3:  1132.  1134.
 ---- K:2 Z:   2
 1   / 1:  1212.  1214.
 2   / 2:  1222.  1224.
 3   / 3:  1232.  1234.
list a		! from cache ...
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 found   A        M:  2 dset:   1 I:      1      2  J:    1    3  K:    1    2  L:      1      1
             VARIABLE : VAR[I=2:4:2]
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             T        : 1
             2      4    
             1      2
 ---- K:1 Z:   1
 1   / 1:  1112.  1114.
 2   / 2:  1122.  1124.
 3   / 3:  1132.  1134.
 ---- K:2 Z:   2
 1   / 1:  1212.  1214.
 2   / 2:  1222.  1224.
 3   / 3:  1232.  1234.
 
! cache hit from full region cache -- bypass use of strides
cancel memory/all
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 -DELETE A        M:  2 dset:   1 I:      1      2  J:    1    3  K:    1    2  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 -DELETE VAR      M:  1 dset:   1 I:      1      2  J:    1    3  K:    1    2  L:      1      1
load var
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GPC1            XAX1_4    YAX1_3    ZAX1_2    TAX1_1
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 reading VAR      M:  1 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
LIST VAR[i=2:4:2]
 dealloc  dynamic grid GPC1            XAX1_4    YAX1_3    ZAX1_2    TAX1_1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 strip regrid on X: VAR --> (G###)           @XACT
 rdstride VAR      C:  7 dset:   1 I:      2      4  J:    1    3  K:    1    2  L:      1      1
 nulrgd  VAR      M:  3 dset:   1 I:      1      2  J:    1    3  K:    1    2  L:      1      1
 -DELETE VAR      M:  2 dset:   1 I:      2      4  J:    1    3  K:    1    2  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
             VARIABLE : L*1000 + K*100 + J*10 + I
                        regrid: 2 delta on X
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             T        : 1
             2      4    
             1      2
 ---- K:1 Z:   1
 1   / 1:  1112.  1114.
 2   / 2:  1122.  1124.
 3   / 3:  1132.  1134.
 ---- K:2 Z:   2
 1   / 1:  1212.  1214.
 2   / 2:  1222.  1224.
 3   / 3:  1232.  1234.
LIST VAR[i=2:4:2,j=1:3:2]
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 -DELETE VAR      M:  3 dset:   1 I:      1      2  J:    1    3  K:    1    2  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 strip regrid on X: VAR --> (G###)           @XACT
 rdstride VAR      C:  7 dset:   1 I:      2      4  J:    1    3  K:    1    2  L:      1      1
 nulrgd  VAR      M:  2 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE VAR      M:  3 dset:   1 I:      2      4  J:    1    3  K:    1    2  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
             VARIABLE : L*1000 + K*100 + J*10 + I
                        regrid: 2 delta on X, 2 delta on Y
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             2      4    
             1      2
 ---- K:1 Z:   1
 1   / 1:  1112.  1114.
 3   / 2:  1132.  1134.
 ---- K:2 Z:   2
 1   / 1:  1212.  1214.
 3   / 2:  1232.  1234.
CANC MEM/ALL
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 -DELETE VAR      M:  2 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE VAR      M:  1 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 
! modulo requests cannot use strides (as this example shows)
set axis/modulo XAX1_4
LIST VAR[I=1:10:3,j=1,k=1,l=1]    ! 1, 4, 7(3), 10(2)
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 strip regrid on X: VAR --> (G###)           @XACT
 strip moduloing VAR on X axis:        1       10 dset:   1
 reading VAR      M:  1 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 doing moduloing VAR on X axis:        1        4 dset:   1
 regrid  VAR      M:  3 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
             VARIABLE : L*1000 + K*100 + J*10 + I
                        regrid: 3 delta on X
             FILENAME : bn_strides.cdf
             SUBSET   : 4 points (X)
             Y        : 1
             Z        : 1
             T        : 1
              1    
              1
 1    / 1:  1111.
 4    / 2:  1114.
 7    / 3:  1113.
 10   / 4:  1112.
cancel axis/modulo XAX1_4
 -DELETE VAR      M:  1 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 -DELETE VAR      M:  2 dset:   1 I:      1     10  J:    1    1  K:    1    1  L:      1      1
 -DELETE VAR      M:  3 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 
! strides applied to more than one axis need special attention in IS_REGRID
LIST VAR[i=2:4:2,j=1:3:2]
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 strip regrid on X: VAR --> (G###)           @XACT
 rdstride VAR      C:  7 dset:   1 I:      2      4  J:    1    3  K:    1    2  L:      1      1
 nulrgd  VAR      M:  2 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE VAR      M:  3 dset:   1 I:      2      4  J:    1    3  K:    1    2  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
             VARIABLE : L*1000 + K*100 + J*10 + I
                        regrid: 2 delta on X, 2 delta on Y
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             2      4    
             1      2
 ---- K:1 Z:   1
 1   / 1:  1112.  1114.
 3   / 2:  1132.  1134.
 ---- K:2 Z:   2
 1   / 1:  1212.  1214.
 3   / 2:  1232.  1234.
LIST VAR[i=2:6:2,j=1:5:2]
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 -DELETE VAR      M:  2 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 strip regrid on X: VAR --> (G###)           @XACT
 rdstride VAR      C:  7 dset:   1 I:      2      4  J:    1    3  K:    1    2  L:      1      1
 nulrgd  VAR      M:  3 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE VAR      M:  2 dset:   1 I:      2      4  J:    1    3  K:    1    2  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
             VARIABLE : L*1000 + K*100 + J*10 + I
                        regrid: 2 delta on X, 2 delta on Y
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             2      4    
             1      2
 ---- K:1 Z:   1
 1   / 1:  1112.  1114.
 3   / 2:  1132.  1134.
 ---- K:2 Z:   2
 1   / 1:  1212.  1214.
 3   / 2:  1232.  1234.
 
! deliberate error
set mode ignore; LIST/i=2:4:2 VAR; cancel mode ignore
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 -DELETE VAR      M:  3 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GPC1            XAX1_4    YAX1_3    ZAX1_2    TAX1_1
 
! averaging causes bypass of strides
LIST VAR[i=2:4:2@ave]
 dealloc  dynamic grid GPC1            XAX1_4    YAX1_3    ZAX1_2    TAX1_1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 strip regrid on X: VAR --> (G###)           @AVE
 reading VAR      M:  3 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 regrid  VAR      M:  2 dset:   1 I:      1      2  J:    1    3  K:    1    2  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
             VARIABLE : L*1000 + K*100 + J*10 + I
                        regrid: 2 delta on X@AVE
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 3 by 2 points (X-Y-Z)
             T        : 1
             2      4    
             1      2
 ---- K:1 Z:   1
 1   / 1:  1112.  1114.
 2   / 2:  1122.  1124.
 3   / 3:  1132.  1134.
 ---- K:2 Z:   2
 1   / 1:  1212.  1214.
 2   / 2:  1222.  1224.
 3   / 3:  1232.  1234.
 
! test sub-region selection on strides axis
let a = bigvar[i=1:40:5]
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 -DELETE VAR      M:  2 dset:   1 I:      1      2  J:    1    3  K:    1    2  L:      1      1
list/j=1/k=1/l=1 a[i=3:5]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 dealloc  dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 allocate dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 allocate dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 eval    A        C:  7 dset:   1 I:      3      5  J:    1    1  K:    1    1  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 strip regrid on X: BIGVAR --> (G###)           @XACT
 rdstride BIGVAR   C: 10 dset:   1 I:      1     36  J:    1    1  K:    1    1  L:      1      1
 nulrgd  BIGVAR   M:  1 dset:   1 I:      1      8  J:    1    1  K:    1    1  L:      1      1
 -DELETE BIGVAR   M:  2 dset:   1 I:      1     36  J:    1    1  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
             VARIABLE : BIGVAR[I=1:40:5]
             FILENAME : bn_strides.cdf
             SUBSET   : 3 points (X)
             Y        : 1
             Z        : 1
             T        : 1
              1    
              1
 11   / 3:  1121.
 16   / 4:  1126.
 21   / 5:  1131.
 -DELETE A        M:  4 dset:   1 I:      1      1  J:    3    5  K:    1    1  L:      1      1
list/k=1/l=1 a[i=3:5,j=1:8:2]
 dealloc  dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_20   TAX1_10
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_20   TAX1_10
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_20   TAX1_10
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      4  J:    1    3  K:    1    1  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_20   TAX1_10
 strip regrid on Y: A --> (G###)           @XACT
 eval    A        C:  8 dset:   1 I:      3      5  J:    1    7  K:    1    1  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 strip regrid on X: BIGVAR --> (G###)           @XACT
 rdstride BIGVAR   C: 11 dset:   1 I:      1     36  J:    1    7  K:    1    1  L:      1      1
 nulrgd  BIGVAR   M:  5 dset:   1 I:      1      8  J:    1    7  K:    1    1  L:      1      1
 -DELETE BIGVAR   M:  4 dset:   1 I:      1     36  J:    1    7  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 regrid  A        M:  6 dset:   1 I:      3      5  J:    1    4  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_20   TAX1_10
             VARIABLE : BIGVAR[I=1:40:5]
                        regrid: 2 delta on Y
             FILENAME : bn_strides.cdf
             SUBSET   : 3 by 4 points (X-Y)
             Z        : 1
             T        : 1
            11     16     21    
             3      4      5
 1   / 1:  1121.  1126.  1131.
 3   / 2:  1141.  1146.  1151.
 5   / 3:  1161.  1166.  1171.
 7   / 4:  1181.  1186.  1191.
 
! ****** unequally spaced points on parent axis
! reference data
LIST/order=x/j=1/k=1/l=1 UNEVENVAR
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_20   TAX1_10
 -DELETE A        M:  6 dset:   1 I:      3      5  J:    1    4  K:    1    1  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GPC4            XUNEVEN   YUNEVEN   ZAX1_6    TAX1_4
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 reading UNE-NVAR M:  6 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
             VARIABLE : L*1000 + K*100 + J[GY=YUNEVEN]*10 + I[GX=XUNEVEN]
             FILENAME : bn_strides.cdf
             SUBSET   : 4 points (X)
             Y        : 0
             Z        : 1
             T        : 1
           0      0.3    0.48   0.6   
            1      2      3      4
          1111.  1112.  1113.  1114.
cancel mem/all
 dealloc  dynamic grid GPC4            XUNEVEN   YUNEVEN   ZAX1_6    TAX1_4
 -DELETE A        M:  2 dset:   1 I:      1      8  J:    1    1  K:    1    1  L:      1      1
 -DELETE A        M:  4 dset:   1 I:      1      8  J:    1    7  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 -DELETE BIGVAR   M:  1 dset:   1 I:      1      8  J:    1    1  K:    1    1  L:      1      1
 -DELETE BIGVAR   M:  5 dset:   1 I:      1      8  J:    1    7  K:    1    1  L:      1      1
 -DELETE VAR      M:  3 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 -DELETE UNE-NVAR M:  6 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 
! basic strides
LIST/order=x/j=1/k=1/l=1 UNEVENVAR[i=2:4:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 strip regrid on X: UNEVENVAR --> (G###)           @XACT
 rdstride UNE-NVAR C:  8 dset:   1 I:      2      4  J:    1    1  K:    1    1  L:      1      1
 nulrgd  UNE-NVAR M:  3 dset:   1 I:      1      2  J:    1    1  K:    1    1  L:      1      1
 -DELETE UNE-NVAR M:  6 dset:   1 I:      2      4  J:    1    1  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
             VARIABLE : L*1000 + K*100 + J[GY=YUNEVEN]*10 + I[GX=XUNEVEN]
                        regrid: on X
             FILENAME : bn_strides.cdf
             SUBSET   : 2 points (X)
             Y        : 0
             Z        : 1
             T        : 1
           0.3    0.6   
            1      2
          1112.  1114.
 
! cache hit after changes to COMPLETE_MISSING_LIMS and FLESH_OUT_AXIS
LIST/order=x/j=1/k=1/l=1 UNEVENVAR[i=2:4:2]
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 found   UNE-NVAR M:  3 dset:   1 I:      1      2  J:    1    1  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
             VARIABLE : L*1000 + K*100 + J[GY=YUNEVEN]*10 + I[GX=XUNEVEN]
                        regrid: on X
             FILENAME : bn_strides.cdf
             SUBSET   : 2 points (X)
             Y        : 0
             Z        : 1
             T        : 1
           0.3    0.6   
            1      2
          1112.  1114.
 
! cache hit through non-file variable
let a = UNEVENVAR[i=2:4:2]
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 -DELETE UNE-NVAR M:  3 dset:   1 I:      1      2  J:    1    1  K:    1    1  L:      1      1
list/order=x/j=1/k=1/l=1 a
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 eval    A        C:  7 dset:   1 I:   -999   -999  J:    1    1  K:    1    1  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 strip regrid on X: UNEVENVAR --> (G###)           @XACT
 rdstride UNE-NVAR C: 10 dset:   1 I:      2      4  J:    1    1  K:    1    1  L:      1      1
 nulrgd  UNE-NVAR M:  6 dset:   1 I:      1      2  J:    1    1  K:    1    1  L:      1      1
 -DELETE UNE-NVAR M:  3 dset:   1 I:      2      4  J:    1    1  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
             VARIABLE : UNEVENVAR[I=2:4:2]
             FILENAME : bn_strides.cdf
             SUBSET   : 2 points (X)
             Y        : 0
             Z        : 1
             T        : 1
           0.3    0.6   
            1      2
          1112.  1114.
list/order=x/j=1/k=1/l=1 a		! from cache ...
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 found   A        M:  3 dset:   1 I:      1      2  J:    1    1  K:    1    1  L:      1      1
             VARIABLE : UNEVENVAR[I=2:4:2]
             FILENAME : bn_strides.cdf
             SUBSET   : 2 points (X)
             Y        : 0
             Z        : 1
             T        : 1
           0.3    0.6   
            1      2
          1112.  1114.
 
! cache hit from full region cache -- bypass use of strides
cancel memory/all
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 -DELETE A        M:  3 dset:   1 I:      1      2  J:    1    1  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 -DELETE UNE-NVAR M:  6 dset:   1 I:      1      2  J:    1    1  K:    1    1  L:      1      1
load/k=1/l=1 UNEVENVAR
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GPC4            XUNEVEN   YUNEVEN   ZAX1_6    TAX1_4
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      4  J:    1    3  K:    1    1  L:      1      1
 reading UNE-NVAR M:  6 dset:   1 I:      1      4  J:    1    3  K:    1    1  L:      1      1
LIST/j=1/k=1/l=1 UNEVENVAR[i=2:4:2]
 dealloc  dynamic grid GPC4            XUNEVEN   YUNEVEN   ZAX1_6    TAX1_4
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 strip regrid on X: UNEVENVAR --> (G###)           @XACT
 rdstride UNE-NVAR C:  8 dset:   1 I:      2      4  J:    1    1  K:    1    1  L:      1      1
 nulrgd  UNE-NVAR M:  5 dset:   1 I:      1      2  J:    1    1  K:    1    1  L:      1      1
 -DELETE UNE-NVAR M:  3 dset:   1 I:      2      4  J:    1    1  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
             VARIABLE : L*1000 + K*100 + J[GY=YUNEVEN]*10 + I[GX=XUNEVEN]
                        regrid: on X
             FILENAME : bn_strides.cdf
             SUBSET   : 2 points (X)
             Y        : 0
             Z        : 1
             T        : 1
             0     
              1
 0.3  / 1:  1112.
 0.6  / 2:  1114.
LIST/j=1/k=1/l=1 UNEVENVAR[i=2:4:2,j=1:5:2]
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 -DELETE UNE-NVAR M:  5 dset:   1 I:      1      2  J:    1    1  K:    1    1  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_6    TAX1_4
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_6    TAX1_4
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_6    TAX1_4
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_6    TAX1_4
 strip regrid on X: UNEVENVAR --> (G###)           @XACT
 rdstride UNE-NVAR C:  8 dset:   1 I:      2      4  J:    1    5  K:    1    1  L:      1      1
 nulrgd  UNE-NVAR M:  3 dset:   1 I:      1      2  J:    1    3  K:    1    1  L:      1      1
 -DELETE UNE-NVAR M:  5 dset:   1 I:      2      4  J:    1    5  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_6    TAX1_4
 doing limits reconciliation on Y axis: UNEVENVAR
             VARIABLE : L*1000 + K*100 + J[GY=YUNEVEN]*10 + I[GX=XUNEVEN]
                        regrid: on X, on Y
             FILENAME : bn_strides.cdf
             SUBSET   : 2 points (X)
             Y        : 0
             Z        : 1
             T        : 1
             0     
              1
 0.3  / 1:  1112.
 0.6  / 2:  1114.
 -DELETE UNE-NVAR M:  5 dset:   1 I:      1      1  J:    1    2  K:    1    1  L:      1      1
CANC MEM/ALL
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_6    TAX1_4
 -DELETE UNE-NVAR M:  3 dset:   1 I:      1      2  J:    1    3  K:    1    1  L:      1      1
 -DELETE UNE-NVAR M:  6 dset:   1 I:      1      4  J:    1    3  K:    1    1  L:      1      1
 
! modulo requests cannot use strides (as this example shows)
set axis/modulo XUNEVEN
LIST/order=x UNEVENVAR[I=1:30:7,j=1,k=1,l=1]    ! 1, 8, 15(5), 22(2)
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 strip regrid on X: UNEVENVAR --> (G###)           @XACT
 strip moduloing UNEVENVAR on X axis:        1       29 dset:   1
 reading UNE-NVAR M:  6 dset:   1 I:      1     10  J:    1    1  K:    1    1  L:      1      1
 doing moduloing UNEVENVAR on X axis:        1       10 dset:   1
 regrid  UNE-NVAR M:  5 dset:   1 I:      1      5  J:    1    1  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
             VARIABLE : L*1000 + K*100 + J[GY=YUNEVEN]*10 + I[GX=XUNEVEN]
                        regrid: on X
             FILENAME : bn_strides.cdf
             SUBSET   : 5 points (X)
             Y        : 0
             Z        : 1
             T        : 1
           0      0.9    1.87   2.65   3.3   
            1      2      3      4      5
          1111.  1118.  1115.  1112.  1119.
cancel axis/modulo XUNEVEN
 -DELETE UNE-NVAR M:  3 dset:   1 I:      1     29  J:    1    1  K:    1    1  L:      1      1
 -DELETE UNE-NVAR M:  5 dset:   1 I:      1      5  J:    1    1  K:    1    1  L:      1      1
 -DELETE UNE-NVAR M:  6 dset:   1 I:      1     10  J:    1    1  K:    1    1  L:      1      1
 
! strides applied to more than one axis need special attention in IS_REGRID
LIST/k=1/l=1 UNEVENVAR[i=2:4:2,j=1:3:2]
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_6    TAX1_4
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_6    TAX1_4
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_6    TAX1_4
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      4  J:    1    3  K:    1    1  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_6    TAX1_4
 strip regrid on X: UNEVENVAR --> (G###)           @XACT
 rdstride UNE-NVAR C:  8 dset:   1 I:      2      4  J:    1    3  K:    1    1  L:      1      1
 nulrgd  UNE-NVAR M:  5 dset:   1 I:      1      2  J:    1    2  K:    1    1  L:      1      1
 -DELETE UNE-NVAR M:  6 dset:   1 I:      2      4  J:    1    3  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_6    TAX1_4
             VARIABLE : L*1000 + K*100 + J[GY=YUNEVEN]*10 + I[GX=XUNEVEN]
                        regrid: on X, on Y
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 points (X-Y)
             Z        : 1
             T        : 1
             0.3    0.6   
              1      2
 0    / 1:  1112.  1114.
 0.95 / 2:  1132.  1134.
LIST/k=1/l=1 UNEVENVAR[i=2:6:2,j=1:5:2]
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_6    TAX1_4
 -DELETE UNE-NVAR M:  5 dset:   1 I:      1      2  J:    1    2  K:    1    1  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_6    TAX1_4
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_6    TAX1_4
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_6    TAX1_4
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      4  J:    1    3  K:    1    1  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_6    TAX1_4
 strip regrid on X: UNEVENVAR --> (G###)           @XACT
 rdstride UNE-NVAR C:  8 dset:   1 I:      2      6  J:    1    5  K:    1    1  L:      1      1
 nulrgd  UNE-NVAR M:  6 dset:   1 I:      1      3  J:    1    3  K:    1    1  L:      1      1
 -DELETE UNE-NVAR M:  5 dset:   1 I:      2      6  J:    1    5  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_6    TAX1_4
             VARIABLE : L*1000 + K*100 + J[GY=YUNEVEN]*10 + I[GX=XUNEVEN]
                        regrid: on X, on Y
             FILENAME : bn_strides.cdf
             SUBSET   : 3 by 3 points (X-Y)
             Z        : 1
             T        : 1
             0.3    0.6    0.78  
              1      2      3
 0    / 1:  1112.  1114.  1116.
 0.95 / 2:  1132.  1134.  1136.
 1.4  / 3:  1152.  1154.  1156.
 
! averaging causes bypass of strides
LIST/j=1/k=1/l=1/precision=9 UNEVENVAR[i=2:8:2@ave]
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_6    TAX1_4
 -DELETE UNE-NVAR M:  6 dset:   1 I:      1      3  J:    1    3  K:    1    1  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 strip regrid on X: UNEVENVAR --> (G###)           @AVE
 reading UNE-NVAR M:  6 dset:   1 I:      1      9  J:    1    1  K:    1    1  L:      1      1
 regrid  UNE-NVAR M:  5 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
             VARIABLE : L*1000 + K*100 + J[GY=YUNEVEN]*10 + I[GX=XUNEVEN]
                        regrid: on X@AVE
             FILENAME : bn_strides.cdf
             SUBSET   : 4 points (X)
             Y        : 0
             Z        : 1
             T        : 1
                0       
                 1
 0.3  / 1:  1111.60376
 0.6  / 2:  1113.79689
 0.78 / 3:  1115.87072
 0.9  / 4:  1117.90449
LIST/j=1/k=1/l=1/precision=9 UNEVENVAR[i=2:8:2]		! for comparison
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 -DELETE UNE-NVAR M:  5 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 strip regrid on X: UNEVENVAR --> (G###)           @XACT
 rdstride UNE-NVAR C:  8 dset:   1 I:      2      8  J:    1    1  K:    1    1  L:      1      1
 nulrgd  UNE-NVAR M:  3 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 -DELETE UNE-NVAR M:  5 dset:   1 I:      2      8  J:    1    1  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
             VARIABLE : L*1000 + K*100 + J[GY=YUNEVEN]*10 + I[GX=XUNEVEN]
                        regrid: on X
             FILENAME : bn_strides.cdf
             SUBSET   : 4 points (X)
             Y        : 0
             Z        : 1
             T        : 1
                0       
                 1
 0.3  / 1:  1112.00000
 0.6  / 2:  1114.00000
 0.78 / 3:  1116.00000
 0.9  / 4:  1118.00000
 
! test special logic in tm_world_recur for endpoints of strides on irreg axis
LIST/j=1/k=1/l=1/precision=9 UNEVENVAR[i=1:10:2@ave]
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 -DELETE UNE-NVAR M:  3 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 strip regrid on X: UNEVENVAR --> (G###)           @AVE
 reading UNE-NVAR M:  3 dset:   1 I:      1     10  J:    1    1  K:    1    1  L:      1      1
 regrid  UNE-NVAR M:  5 dset:   1 I:      1      5  J:    1    1  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
             VARIABLE : L*1000 + K*100 + J[GY=YUNEVEN]*10 + I[GX=XUNEVEN]
                        regrid: on X@AVE
             FILENAME : bn_strides.cdf
             SUBSET   : 5 points (X)
             Y        : 0
             Z        : 1
             T        : 1
                0       
                 1
 0    / 1:  1111.22629
 0.48 / 2:  1112.70797
 0.7  / 3:  1114.84240
 0.85 / 4:  1116.89020
 0.95 / 5:  1119.13604
 
 
! * * * * * MIXED STRIDES and PERMUTATIONS * * * * *
 
set region/i=3:6/j=2:4/k=1:2/l=1
 
use/order=yx bn_strides
list bigvar[i=3:9:2]
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 -DELETE UNE-NVAR M:  5 dset:   1 I:      1      5  J:    1    1  K:    1    1  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 dealloc  dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 allocate dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 eval    EX#1     C:  4 dset:   1 I:      3      6  J:    2    4  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 strip regrid on X: BIGVAR --> (G###)           @XACT
 rdstride BIGVAR   C:  7 dset:   1 I:      3      9  J:    2    4  K:    1    2  L:      1      1
 nulrgd  BIGVAR   M:  1 dset:   1 I:      1      4  J:    2    4  K:    1    2  L:      1      1
 -DELETE BIGVAR   M:  5 dset:   1 I:      3      9  J:    2    4  K:    1    2  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
             VARIABLE : VAR
                        regrid: 2 delta on X
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X-Y-Z)
             T        : 1
             3      5      7      9    
             1      2      3      4
 ---- K:1 Z:   1
 2   / 2:  1123.  1125.  1127.  1129.
 3   / 3:  1133.  1135.  1137.  1139.
 4   / 4:  1143.  1145.  1147.  1149.
 ---- K:2 Z:   2
 2   / 2:  1223.  1225.  1227.  1229.
 3   / 3:  1233.  1235.  1237.  1239.
 4   / 4:  1243.  1245.  1247.  1249.
list bigvar[j=2:6:2]
 dealloc  dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 -DELETE BIGVAR   M:  1 dset:   1 I:      1      4  J:    2    4  K:    1    2  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XAX1_40   (AX###)   ZAX1_20   TAX1_10
 dealloc  dynamic grid (G###)          XAX1_40   (AX###)   ZAX1_20   TAX1_10
 allocate dynamic grid (G###)          XAX1_40   (AX###)   ZAX1_20   TAX1_10
 eval    EX#1     C:  4 dset:   1 I:      3      6  J:    2    4  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          XAX1_40   (AX###)   ZAX1_20   TAX1_10
 strip regrid on Y: BIGVAR --> (G###)           @XACT
 rdstride BIGVAR   C:  7 dset:   1 I:      3      6  J:    2    6  K:    1    2  L:      1      1
 nulrgd  BIGVAR   M:  5 dset:   1 I:      3      6  J:    1    3  K:    1    2  L:      1      1
 -DELETE BIGVAR   M:  1 dset:   1 I:      3      6  J:    2    6  K:    1    2  L:      1      1
 dealloc  dynamic grid (G###)          XAX1_40   (AX###)   ZAX1_20   TAX1_10
             VARIABLE : VAR
                        regrid: 2 delta on Y
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X-Y-Z)
             T        : 1
             3      4      5      6    
             3      4      5      6
 ---- K:1 Z:   1
 2   / 1:  1123.  1124.  1125.  1126.
 4   / 2:  1143.  1144.  1145.  1146.
 6   / 3:  1163.  1164.  1165.  1166.
 ---- K:2 Z:   2
 2   / 1:  1223.  1224.  1225.  1226.
 4   / 2:  1243.  1244.  1245.  1246.
 6   / 3:  1263.  1264.  1265.  1266.
list bigvar[i=3:9:2, j=2:6:2, k=1:3:2]
 dealloc  dynamic grid (G###)          XAX1_40   (AX###)   ZAX1_20   TAX1_10
 -DELETE BIGVAR   M:  5 dset:   1 I:      3      6  J:    1    3  K:    1    2  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 eval    EX#1     C:  4 dset:   1 I:      3      6  J:    2    4  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 strip regrid on X: BIGVAR --> (G###)           @XACT
 rdstride BIGVAR   C:  7 dset:   1 I:      3      9  J:    2    6  K:    1    3  L:      1      1
 nulrgd  BIGVAR   M:  1 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 -DELETE BIGVAR   M:  5 dset:   1 I:      3      9  J:    2    6  K:    1    3  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
             VARIABLE : VAR
                        regrid: 2 delta on X, 2 delta on Y, 2 delta on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X-Y-Z)
             T        : 1
             3      5      7      9    
             1      2      3      4
 ---- K:1 Z:   1
 2   / 1:  1123.  1125.  1127.  1129.
 4   / 2:  1143.  1145.  1147.  1149.
 6   / 3:  1163.  1165.  1167.  1169.
 ---- K:2 Z:   3
 2   / 1:  1323.  1325.  1327.  1329.
 4   / 2:  1343.  1345.  1347.  1349.
 6   / 3:  1363.  1365.  1367.  1369.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 -DELETE BIGVAR   M:  1 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 canceling dset ./data/bn_strides.cdf
 -DELETE UNE-NVAR M:  3 dset:   1 I:      1     10  J:    1    1  K:    1    1  L:      1      1
 -DELETE UNE-NVAR M:  6 dset:   1 I:      1      9  J:    1    1  K:    1    1  L:      1      1
 
use/order=zyx bn_strides
list bigvar[i=3:9:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YAX1_30   XAX1_40   TAX1_10
 dealloc  dynamic grid (G###)          (AX###)   YAX1_30   XAX1_40   TAX1_10
 allocate dynamic grid (G###)          (AX###)   YAX1_30   XAX1_40   TAX1_10
 eval    EX#1     C:  4 dset:   1 I:      3      6  J:    2    4  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YAX1_30   XAX1_40   TAX1_10
 strip regrid on X: BIGVAR --> (G###)           @XACT
 rdstride BIGVAR   C:  7 dset:   1 I:      3      9  J:    2    4  K:    1    2  L:      1      1
 nulrgd  BIGVAR   M:  3 dset:   1 I:      1      4  J:    2    4  K:    1    2  L:      1      1
 -DELETE BIGVAR   M:  6 dset:   1 I:      3      9  J:    2    4  K:    1    2  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_30   XAX1_40   TAX1_10
             VARIABLE : VAR
                        regrid: 2 delta on X
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X-Y-Z)
             T        : 1
             3      5      7      9    
             1      2      3      4
 ---- K:1 Z:   1
 2   / 2:  1321.  1521.  1721.  1921.
 3   / 3:  1331.  1531.  1731.  1931.
 4   / 4:  1341.  1541.  1741.  1941.
 ---- K:2 Z:   2
 2   / 2:  1322.  1522.  1722.  1922.
 3   / 3:  1332.  1532.  1732.  1932.
 4   / 4:  1342.  1542.  1742.  1942.
list bigvar[j=2:6:2]
 dealloc  dynamic grid (G###)          (AX###)   YAX1_30   XAX1_40   TAX1_10
 -DELETE BIGVAR   M:  3 dset:   1 I:      1      4  J:    2    4  K:    1    2  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          ZAX1_20   (AX###)   XAX1_40   TAX1_10
 dealloc  dynamic grid (G###)          ZAX1_20   (AX###)   XAX1_40   TAX1_10
 allocate dynamic grid (G###)          ZAX1_20   (AX###)   XAX1_40   TAX1_10
 eval    EX#1     C:  4 dset:   1 I:      3      6  J:    2    4  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          ZAX1_20   (AX###)   XAX1_40   TAX1_10
 strip regrid on Y: BIGVAR --> (G###)           @XACT
 rdstride BIGVAR   C:  7 dset:   1 I:      3      6  J:    2    6  K:    1    2  L:      1      1
 nulrgd  BIGVAR   M:  6 dset:   1 I:      3      6  J:    1    3  K:    1    2  L:      1      1
 -DELETE BIGVAR   M:  3 dset:   1 I:      3      6  J:    2    6  K:    1    2  L:      1      1
 dealloc  dynamic grid (G###)          ZAX1_20   (AX###)   XAX1_40   TAX1_10
             VARIABLE : VAR
                        regrid: 2 delta on Y
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X-Y-Z)
             T        : 1
             3      4      5      6    
             3      4      5      6
 ---- K:1 Z:   1
 2   / 1:  1321.  1421.  1521.  1621.
 4   / 2:  1341.  1441.  1541.  1641.
 6   / 3:  1361.  1461.  1561.  1661.
 ---- K:2 Z:   2
 2   / 1:  1322.  1422.  1522.  1622.
 4   / 2:  1342.  1442.  1542.  1642.
 6   / 3:  1362.  1462.  1562.  1662.
list bigvar[i=3:9:2, j=2:6:2, k=1:3:2]
 dealloc  dynamic grid (G###)          ZAX1_20   (AX###)   XAX1_40   TAX1_10
 -DELETE BIGVAR   M:  6 dset:   1 I:      3      6  J:    1    3  K:    1    2  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 eval    EX#1     C:  4 dset:   1 I:      3      6  J:    2    4  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 strip regrid on X: BIGVAR --> (G###)           @XACT
 rdstride BIGVAR   C:  7 dset:   1 I:      3      9  J:    2    6  K:    1    3  L:      1      1
 nulrgd  BIGVAR   M:  3 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 -DELETE BIGVAR   M:  6 dset:   1 I:      3      9  J:    2    6  K:    1    3  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
             VARIABLE : VAR
                        regrid: 2 delta on X, 2 delta on Y, 2 delta on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X-Y-Z)
             T        : 1
             3      5      7      9    
             1      2      3      4
 ---- K:1 Z:   1
 2   / 1:  1321.  1521.  1721.  1921.
 4   / 2:  1341.  1541.  1741.  1941.
 6   / 3:  1361.  1561.  1761.  1961.
 ---- K:2 Z:   3
 2   / 1:  1323.  1523.  1723.  1923.
 4   / 2:  1343.  1543.  1743.  1943.
 6   / 3:  1363.  1563.  1763.  1963.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 -DELETE BIGVAR   M:  3 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 canceling dset ./data/bn_strides.cdf
 
use/order=zxy bn_strides
list bigvar[i=3:9:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   XAX1_40   YAX1_30   TAX1_10
 dealloc  dynamic grid (G###)          (AX###)   XAX1_40   YAX1_30   TAX1_10
 allocate dynamic grid (G###)          (AX###)   XAX1_40   YAX1_30   TAX1_10
 eval    EX#1     C:  4 dset:   1 I:      3      6  J:    2    4  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   XAX1_40   YAX1_30   TAX1_10
 strip regrid on X: BIGVAR --> (G###)           @XACT
 rdstride BIGVAR   C:  7 dset:   1 I:      3      9  J:    2    4  K:    1    2  L:      1      1
 nulrgd  BIGVAR   M:  6 dset:   1 I:      1      4  J:    2    4  K:    1    2  L:      1      1
 -DELETE BIGVAR   M:  3 dset:   1 I:      3      9  J:    2    4  K:    1    2  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   XAX1_40   YAX1_30   TAX1_10
             VARIABLE : VAR
                        regrid: 2 delta on X
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X-Y-Z)
             T        : 1
             3      5      7      9    
             1      2      3      4
 ---- K:1 Z:   1
 2   / 2:  1312.  1512.  1712.  1912.
 3   / 3:  1313.  1513.  1713.  1913.
 4   / 4:  1314.  1514.  1714.  1914.
 ---- K:2 Z:   2
 2   / 2:  1322.  1522.  1722.  1922.
 3   / 3:  1323.  1523.  1723.  1923.
 4   / 4:  1324.  1524.  1724.  1924.
list bigvar[j=2:6:2]
 dealloc  dynamic grid (G###)          (AX###)   XAX1_40   YAX1_30   TAX1_10
 -DELETE BIGVAR   M:  6 dset:   1 I:      1      4  J:    2    4  K:    1    2  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          ZAX1_20   (AX###)   YAX1_30   TAX1_10
 dealloc  dynamic grid (G###)          ZAX1_20   (AX###)   YAX1_30   TAX1_10
 allocate dynamic grid (G###)          ZAX1_20   (AX###)   YAX1_30   TAX1_10
 eval    EX#1     C:  4 dset:   1 I:      3      6  J:    2    4  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          ZAX1_20   (AX###)   YAX1_30   TAX1_10
 strip regrid on Y: BIGVAR --> (G###)           @XACT
 rdstride BIGVAR   C:  7 dset:   1 I:      3      6  J:    2    6  K:    1    2  L:      1      1
 nulrgd  BIGVAR   M:  3 dset:   1 I:      3      6  J:    1    3  K:    1    2  L:      1      1
 -DELETE BIGVAR   M:  6 dset:   1 I:      3      6  J:    2    6  K:    1    2  L:      1      1
 dealloc  dynamic grid (G###)          ZAX1_20   (AX###)   YAX1_30   TAX1_10
             VARIABLE : VAR
                        regrid: 2 delta on Y
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X-Y-Z)
             T        : 1
             3      4      5      6    
             3      4      5      6
 ---- K:1 Z:   1
 2   / 1:  1312.  1412.  1512.  1612.
 4   / 2:  1314.  1414.  1514.  1614.
 6   / 3:  1316.  1416.  1516.  1616.
 ---- K:2 Z:   2
 2   / 1:  1322.  1422.  1522.  1622.
 4   / 2:  1324.  1424.  1524.  1624.
 6   / 3:  1326.  1426.  1526.  1626.
list bigvar[i=3:9:2, j=2:6:2, k=1:3:2]
 dealloc  dynamic grid (G###)          ZAX1_20   (AX###)   YAX1_30   TAX1_10
 -DELETE BIGVAR   M:  3 dset:   1 I:      3      6  J:    1    3  K:    1    2  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 eval    EX#1     C:  4 dset:   1 I:      3      6  J:    2    4  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 strip regrid on X: BIGVAR --> (G###)           @XACT
 rdstride BIGVAR   C:  7 dset:   1 I:      3      9  J:    2    6  K:    1    3  L:      1      1
 nulrgd  BIGVAR   M:  6 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 -DELETE BIGVAR   M:  3 dset:   1 I:      3      9  J:    2    6  K:    1    3  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
             VARIABLE : VAR
                        regrid: 2 delta on X, 2 delta on Y, 2 delta on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X-Y-Z)
             T        : 1
             3      5      7      9    
             1      2      3      4
 ---- K:1 Z:   1
 2   / 1:  1312.  1512.  1712.  1912.
 4   / 2:  1314.  1514.  1714.  1914.
 6   / 3:  1316.  1516.  1716.  1916.
 ---- K:2 Z:   3
 2   / 1:  1332.  1532.  1732.  1932.
 4   / 2:  1334.  1534.  1734.  1934.
 6   / 3:  1336.  1536.  1736.  1936.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 -DELETE BIGVAR   M:  6 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 canceling dset ./data/bn_strides.cdf
 
! now with xytvar
cancel region
set region/i=1:4/j=1:3/l=1:2
use bn_strides
show grid xytvar
 getgrid EX#1     C:  6 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GPC5            XLON      YLAT      NORMAL    TTIME
    GRID GPC5
 name       axis              # pts   start                end                 subset
 XLON      LONGITUDE           40mr   141E                 180E                full
 YLAT      LATITUDE            30 r   1N                   30N                 full
 normal    Z
 TTIME     TIME                20 r   01-JAN-1995 00:00    20-JAN-1995 00:00   full
 dealloc  dynamic grid GPC5            XLON      YLAT      NORMAL    TTIME
list xytvar[i=1:7:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YLAT      NORMAL    TTIME
 dealloc  dynamic grid (G###)          (AX###)   YLAT      NORMAL    TTIME
 allocate dynamic grid (G###)          (AX###)   YLAT      NORMAL    TTIME
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 allocate dynamic grid (G###)          (AX###)   YLAT      NORMAL    TTIME
 strip regrid on X: XYTVAR --> (G###)           @XACT
 rdstride XYTVAR   C:  7 dset:   1 I:      1      7  J:    1    3  K: -999 -999  L:      1      2
 nulrgd  XYTVAR   M:  3 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 -DELETE XYTVAR   M:  6 dset:   1 I:      1      7  J:    1    3  K: -999 -999  L:      1      2
 dealloc  dynamic grid (G###)          (AX###)   YLAT      NORMAL    TTIME
             VARIABLE : L*1000 + J*10 + I
                        regrid: 2 deg on X
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (LONGITUDE-LATITUDE-TIME)
            141E   143E   145E   147E   
              1      2      3      4
 ---- L:1 T:   01-JAN-1995 00:00
 3N   / 3:  1031.  1033.  1035.  1037.
 2N   / 2:  1021.  1023.  1025.  1027.
 1N   / 1:  1011.  1013.  1015.  1017.
 ---- L:2 T:   02-JAN-1995 00:00
 3N   / 3:  2031.  2033.  2035.  2037.
 2N   / 2:  2021.  2023.  2025.  2027.
 1N   / 1:  2011.  2013.  2015.  2017.
list xytvar[j=2:6:2]
 dealloc  dynamic grid (G###)          (AX###)   YLAT      NORMAL    TTIME
 -DELETE XYTVAR   M:  3 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XLON      (AX###)   NORMAL    TTIME
 dealloc  dynamic grid (G###)          XLON      (AX###)   NORMAL    TTIME
 allocate dynamic grid (G###)          XLON      (AX###)   NORMAL    TTIME
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 allocate dynamic grid (G###)          XLON      (AX###)   NORMAL    TTIME
 strip regrid on Y: XYTVAR --> (G###)           @XACT
 rdstride XYTVAR   C:  7 dset:   1 I:      1      4  J:    2    6  K: -999 -999  L:      1      2
 nulrgd  XYTVAR   M:  6 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 -DELETE XYTVAR   M:  3 dset:   1 I:      1      4  J:    2    6  K: -999 -999  L:      1      2
 dealloc  dynamic grid (G###)          XLON      (AX###)   NORMAL    TTIME
             VARIABLE : L*1000 + J*10 + I
                        regrid: 2 deg on Y
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (LONGITUDE-LATITUDE-TIME)
            141E   142E   143E   144E   
              1      2      3      4
 ---- L:1 T:   01-JAN-1995 00:00
 6N   / 3:  1061.  1062.  1063.  1064.
 4N   / 2:  1041.  1042.  1043.  1044.
 2N   / 1:  1021.  1022.  1023.  1024.
 ---- L:2 T:   02-JAN-1995 00:00
 6N   / 3:  2061.  2062.  2063.  2064.
 4N   / 2:  2041.  2042.  2043.  2044.
 2N   / 1:  2021.  2022.  2023.  2024.
list xytvar[i=1:7:2,j=2:6:2,l=3:5:2]
 dealloc  dynamic grid (G###)          XLON      (AX###)   NORMAL    TTIME
 -DELETE XYTVAR   M:  6 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 strip regrid on X: XYTVAR --> (G###)           @XACT
 rdstride XYTVAR   C:  7 dset:   1 I:      1      7  J:    2    6  K: -999 -999  L:      3      5
 nulrgd  XYTVAR   M:  3 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 -DELETE XYTVAR   M:  6 dset:   1 I:      1      7  J:    2    6  K: -999 -999  L:      3      5
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
             VARIABLE : L*1000 + J*10 + I
                        regrid: 2 deg on X, 2 deg on Y, 2 day on T
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (LONGITUDE-LATITUDE-TIME)
            141E   143E   145E   147E   
              1      2      3      4
 ---- L:1 T:   03-JAN-1995 00:00
 6N   / 3:  3061.  3063.  3065.  3067.
 4N   / 2:  3041.  3043.  3045.  3047.
 2N   / 1:  3021.  3023.  3025.  3027.
 ---- L:2 T:   05-JAN-1995 00:00
 6N   / 3:  5061.  5063.  5065.  5067.
 4N   / 2:  5041.  5043.  5045.  5047.
 2N   / 1:  5021.  5023.  5025.  5027.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 -DELETE XYTVAR   M:  3 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 canceling dset ./data/bn_strides.cdf
 
use/order=yx bn_strides
show grid xytvar
 getgrid EX#1     C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GPC5            YLAT      XLON      NORMAL    TTIME
    GRID GPC5
 name       axis              # pts   start                end                 subset
 YLAT      X (degrees_north)   30 r   1                    30                  full
 XLON      Y (degrees_east)    40mr   141                  180                 full
 normal    Z
 TTIME     TIME                20 r   01-JAN-1995 00:00    20-JAN-1995 00:00   full
 dealloc  dynamic grid GPC5            YLAT      XLON      NORMAL    TTIME
list xytvar[i=1:7:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   XLON      NORMAL    TTIME
 dealloc  dynamic grid (G###)          (AX###)   XLON      NORMAL    TTIME
 allocate dynamic grid (G###)          (AX###)   XLON      NORMAL    TTIME
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 allocate dynamic grid (G###)          (AX###)   XLON      NORMAL    TTIME
 strip regrid on X: XYTVAR --> (G###)           @XACT
 rdstride XYTVAR   C:  7 dset:   1 I:      1      7  J:    1    3  K: -999 -999  L:      1      2
 nulrgd  XYTVAR   M:  6 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 -DELETE XYTVAR   M:  3 dset:   1 I:      1      7  J:    1    3  K: -999 -999  L:      1      2
 dealloc  dynamic grid (G###)          (AX###)   XLON      NORMAL    TTIME
             VARIABLE : L*1000 + J*10 + I
                        regrid: 2 deg on X
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X (degrees_north)-Y (degrees_east)-TIME)
               1      3      5      7    
               1      2      3      4
 ---- L:1 T:   01-JAN-1995 00:00
 141   / 1:  1011.  1031.  1051.  1071.
 142   / 2:  1012.  1032.  1052.  1072.
 143   / 3:  1013.  1033.  1053.  1073.
 ---- L:2 T:   02-JAN-1995 00:00
 141   / 1:  2011.  2031.  2051.  2071.
 142   / 2:  2012.  2032.  2052.  2072.
 143   / 3:  2013.  2033.  2053.  2073.
list xytvar[j=2:6:2]
 dealloc  dynamic grid (G###)          (AX###)   XLON      NORMAL    TTIME
 -DELETE XYTVAR   M:  6 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          YLAT      (AX###)   NORMAL    TTIME
 dealloc  dynamic grid (G###)          YLAT      (AX###)   NORMAL    TTIME
 allocate dynamic grid (G###)          YLAT      (AX###)   NORMAL    TTIME
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 allocate dynamic grid (G###)          YLAT      (AX###)   NORMAL    TTIME
 strip regrid on Y: XYTVAR --> (G###)           @XACT
 rdstride XYTVAR   C:  7 dset:   1 I:      1      4  J:    2    6  K: -999 -999  L:      1      2
 nulrgd  XYTVAR   M:  3 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 -DELETE XYTVAR   M:  6 dset:   1 I:      1      4  J:    2    6  K: -999 -999  L:      1      2
 dealloc  dynamic grid (G###)          YLAT      (AX###)   NORMAL    TTIME
             VARIABLE : L*1000 + J*10 + I
                        regrid: 2 deg on Y
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X (degrees_north)-Y (degrees_east)-TIME)
               1      2      3      4    
               1      2      3      4
 ---- L:1 T:   01-JAN-1995 00:00
 142   / 1:  1012.  1022.  1032.  1042.
 144   / 2:  1014.  1024.  1034.  1044.
 146   / 3:  1016.  1026.  1036.  1046.
 ---- L:2 T:   02-JAN-1995 00:00
 142   / 1:  2012.  2022.  2032.  2042.
 144   / 2:  2014.  2024.  2034.  2044.
 146   / 3:  2016.  2026.  2036.  2046.
list xytvar[i=1:7:2,j=2:6:2,l=3:5:2]
 dealloc  dynamic grid (G###)          YLAT      (AX###)   NORMAL    TTIME
 -DELETE XYTVAR   M:  3 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 strip regrid on X: XYTVAR --> (G###)           @XACT
 rdstride XYTVAR   C:  7 dset:   1 I:      1      7  J:    2    6  K: -999 -999  L:      3      5
 nulrgd  XYTVAR   M:  6 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 -DELETE XYTVAR   M:  3 dset:   1 I:      1      7  J:    2    6  K: -999 -999  L:      3      5
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
             VARIABLE : L*1000 + J*10 + I
                        regrid: 2 deg on X, 2 deg on Y, 2 day on T
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X (degrees_north)-Y (degrees_east)-TIME)
               1      3      5      7    
               1      2      3      4
 ---- L:1 T:   03-JAN-1995 00:00
 142   / 1:  3012.  3032.  3052.  3072.
 144   / 2:  3014.  3034.  3054.  3074.
 146   / 3:  3016.  3036.  3056.  3076.
 ---- L:2 T:   05-JAN-1995 00:00
 142   / 1:  5012.  5032.  5052.  5072.
 144   / 2:  5014.  5034.  5054.  5074.
 146   / 3:  5016.  5036.  5056.  5076.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 -DELETE XYTVAR   M:  6 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 canceling dset ./data/bn_strides.cdf
 
use/order=tyx bn_strides
show grid xytvar
 getgrid EX#1     C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GPC5            TTIME     YLAT      NORMAL    XLON
    GRID GPC5
 name       axis              # pts   start                end                 subset
 TTIME     X (DAYS)            20 r   34319                34338               full
 YLAT      LATITUDE            30 r   1N                   30N                 full
 normal    Z
 XLON      T (degrees_east)    40mr   141                  180                 full
 dealloc  dynamic grid GPC5            TTIME     YLAT      NORMAL    XLON
list xytvar[i=1:7:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YLAT      NORMAL    XLON
 dealloc  dynamic grid (G###)          (AX###)   YLAT      NORMAL    XLON
 allocate dynamic grid (G###)          (AX###)   YLAT      NORMAL    XLON
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 allocate dynamic grid (G###)          (AX###)   YLAT      NORMAL    XLON
 strip regrid on X: XYTVAR --> (G###)           @XACT
 rdstride XYTVAR   C:  7 dset:   1 I:      1      7  J:    1    3  K: -999 -999  L:      1      2
 nulrgd  XYTVAR   M:  3 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 -DELETE XYTVAR   M:  6 dset:   1 I:      1      7  J:    1    3  K: -999 -999  L:      1      2
 dealloc  dynamic grid (G###)          (AX###)   YLAT      NORMAL    XLON
             VARIABLE : L*1000 + J*10 + I
                        regrid: 2 day on X
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X (DAYS)-LATITUDE-T (degrees_east))
            34319  34321  34323  34325  
              1      2      3      4
 ---- L:1 T:   141
 3N   / 3:  1031.  3031.  5031.  7031.
 2N   / 2:  1021.  3021.  5021.  7021.
 1N   / 1:  1011.  3011.  5011.  7011.
 ---- L:2 T:   142
 3N   / 3:  1032.  3032.  5032.  7032.
 2N   / 2:  1022.  3022.  5022.  7022.
 1N   / 1:  1012.  3012.  5012.  7012.
list xytvar[j=2:6:2]
 dealloc  dynamic grid (G###)          (AX###)   YLAT      NORMAL    XLON
 -DELETE XYTVAR   M:  3 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          TTIME     (AX###)   NORMAL    XLON
 dealloc  dynamic grid (G###)          TTIME     (AX###)   NORMAL    XLON
 allocate dynamic grid (G###)          TTIME     (AX###)   NORMAL    XLON
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 allocate dynamic grid (G###)          TTIME     (AX###)   NORMAL    XLON
 strip regrid on Y: XYTVAR --> (G###)           @XACT
 rdstride XYTVAR   C:  7 dset:   1 I:      1      4  J:    2    6  K: -999 -999  L:      1      2
 nulrgd  XYTVAR   M:  6 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 -DELETE XYTVAR   M:  3 dset:   1 I:      1      4  J:    2    6  K: -999 -999  L:      1      2
 dealloc  dynamic grid (G###)          TTIME     (AX###)   NORMAL    XLON
             VARIABLE : L*1000 + J*10 + I
                        regrid: 2 deg on Y
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X (DAYS)-LATITUDE-T (degrees_east))
            34319  34320  34321  34322  
              1      2      3      4
 ---- L:1 T:   141
 6N   / 3:  1061.  2061.  3061.  4061.
 4N   / 2:  1041.  2041.  3041.  4041.
 2N   / 1:  1021.  2021.  3021.  4021.
 ---- L:2 T:   142
 6N   / 3:  1062.  2062.  3062.  4062.
 4N   / 2:  1042.  2042.  3042.  4042.
 2N   / 1:  1022.  2022.  3022.  4022.
list xytvar[i=1:7:2,j=2:6:2,l=3:5:2]
 dealloc  dynamic grid (G###)          TTIME     (AX###)   NORMAL    XLON
 -DELETE XYTVAR   M:  6 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 strip regrid on X: XYTVAR --> (G###)           @XACT
 rdstride XYTVAR   C:  7 dset:   1 I:      1      7  J:    2    6  K: -999 -999  L:      3      5
 nulrgd  XYTVAR   M:  3 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 -DELETE XYTVAR   M:  6 dset:   1 I:      1      7  J:    2    6  K: -999 -999  L:      3      5
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
             VARIABLE : L*1000 + J*10 + I
                        regrid: 2 day on X, 2 deg on Y, 2 deg on T
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X (DAYS)-LATITUDE-T (degrees_east))
            34319  34321  34323  34325  
              1      2      3      4
 ---- L:1 T:   143
 6N   / 3:  1063.  3063.  5063.  7063.
 4N   / 2:  1043.  3043.  5043.  7043.
 2N   / 1:  1023.  3023.  5023.  7023.
 ---- L:2 T:   145
 6N   / 3:  1065.  3065.  5065.  7065.
 4N   / 2:  1045.  3045.  5045.  7045.
 2N   / 1:  1025.  3025.  5025.  7025.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 -DELETE XYTVAR   M:  3 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 canceling dset ./data/bn_strides.cdf
 
use/order=txy bn_strides
show grid xytvar
 getgrid EX#1     C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GPC5            TTIME     XLON      NORMAL    YLAT
    GRID GPC5
 name       axis              # pts   start                end                 subset
 TTIME     X (DAYS)            20 r   34319                34338               full
 XLON      Y (degrees_east)    40mr   141                  180                 full
 normal    Z
 YLAT      T (degrees_north)   30 r   1                    30                  full
 dealloc  dynamic grid GPC5            TTIME     XLON      NORMAL    YLAT
list xytvar[i=1:7:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   XLON      NORMAL    YLAT
 dealloc  dynamic grid (G###)          (AX###)   XLON      NORMAL    YLAT
 allocate dynamic grid (G###)          (AX###)   XLON      NORMAL    YLAT
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 allocate dynamic grid (G###)          (AX###)   XLON      NORMAL    YLAT
 strip regrid on X: XYTVAR --> (G###)           @XACT
 rdstride XYTVAR   C:  7 dset:   1 I:      1      7  J:    1    3  K: -999 -999  L:      1      2
 nulrgd  XYTVAR   M:  6 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 -DELETE XYTVAR   M:  3 dset:   1 I:      1      7  J:    1    3  K: -999 -999  L:      1      2
 dealloc  dynamic grid (G###)          (AX###)   XLON      NORMAL    YLAT
             VARIABLE : L*1000 + J*10 + I
                        regrid: 2 day on X
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X (DAYS)-Y (degrees_east)-T (degrees_north))
             34319  34321  34323  34325  
               1      2      3      4
 ---- L:1 T:   1
 141   / 1:  1011.  3011.  5011.  7011.
 142   / 2:  1012.  3012.  5012.  7012.
 143   / 3:  1013.  3013.  5013.  7013.
 ---- L:2 T:   2
 141   / 1:  1021.  3021.  5021.  7021.
 142   / 2:  1022.  3022.  5022.  7022.
 143   / 3:  1023.  3023.  5023.  7023.
list xytvar[j=2:6:2]
 dealloc  dynamic grid (G###)          (AX###)   XLON      NORMAL    YLAT
 -DELETE XYTVAR   M:  6 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          TTIME     (AX###)   NORMAL    YLAT
 dealloc  dynamic grid (G###)          TTIME     (AX###)   NORMAL    YLAT
 allocate dynamic grid (G###)          TTIME     (AX###)   NORMAL    YLAT
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 allocate dynamic grid (G###)          TTIME     (AX###)   NORMAL    YLAT
 strip regrid on Y: XYTVAR --> (G###)           @XACT
 rdstride XYTVAR   C:  7 dset:   1 I:      1      4  J:    2    6  K: -999 -999  L:      1      2
 nulrgd  XYTVAR   M:  3 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 -DELETE XYTVAR   M:  6 dset:   1 I:      1      4  J:    2    6  K: -999 -999  L:      1      2
 dealloc  dynamic grid (G###)          TTIME     (AX###)   NORMAL    YLAT
             VARIABLE : L*1000 + J*10 + I
                        regrid: 2 deg on Y
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X (DAYS)-Y (degrees_east)-T (degrees_north))
             34319  34320  34321  34322  
               1      2      3      4
 ---- L:1 T:   1
 142   / 1:  1012.  2012.  3012.  4012.
 144   / 2:  1014.  2014.  3014.  4014.
 146   / 3:  1016.  2016.  3016.  4016.
 ---- L:2 T:   2
 142   / 1:  1022.  2022.  3022.  4022.
 144   / 2:  1024.  2024.  3024.  4024.
 146   / 3:  1026.  2026.  3026.  4026.
list xytvar[i=1:7:2,j=2:6:2,l=3:5:2]
 dealloc  dynamic grid (G###)          TTIME     (AX###)   NORMAL    YLAT
 -DELETE XYTVAR   M:  3 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 strip regrid on X: XYTVAR --> (G###)           @XACT
 rdstride XYTVAR   C:  7 dset:   1 I:      1      7  J:    2    6  K: -999 -999  L:      3      5
 nulrgd  XYTVAR   M:  6 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 -DELETE XYTVAR   M:  3 dset:   1 I:      1      7  J:    2    6  K: -999 -999  L:      3      5
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
             VARIABLE : L*1000 + J*10 + I
                        regrid: 2 day on X, 2 deg on Y, 2 deg on T
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X (DAYS)-Y (degrees_east)-T (degrees_north))
             34319  34321  34323  34325  
               1      2      3      4
 ---- L:1 T:   3
 142   / 1:  1032.  3032.  5032.  7032.
 144   / 2:  1034.  3034.  5034.  7034.
 146   / 3:  1036.  3036.  5036.  7036.
 ---- L:2 T:   5
 142   / 1:  1052.  3052.  5052.  7052.
 144   / 2:  1054.  3054.  5054.  7054.
 146   / 3:  1056.  3056.  5056.  7056.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 -DELETE XYTVAR   M:  6 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 canceling dset ./data/bn_strides.cdf
 
! map into Z instead of T
use/order=zxy bn_strides
show grid xytvar
 getgrid EX#1     C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GPC5            TTIME     XLON      YLAT      NORMAL
    GRID GPC5
 name       axis              # pts   start                end                 subset
 TTIME     X (DAYS)            20 r   34319                34338               full
 XLON      Y (degrees_east)    40mr   141                  180                 full
 YLAT      Z (degrees_north)   30 r   1                    30                  full
 normal    T
 dealloc  dynamic grid GPC5            TTIME     XLON      YLAT      NORMAL
list/k=1:2 xytvar[i=1:7:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   XLON      YLAT      NORMAL
 dealloc  dynamic grid (G###)          (AX###)   XLON      YLAT      NORMAL
 allocate dynamic grid (G###)          (AX###)   XLON      YLAT      NORMAL
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      2
 allocate dynamic grid (G###)          (AX###)   XLON      YLAT      NORMAL
 strip regrid on X: XYTVAR --> (G###)           @XACT
 rdstride XYTVAR   C:  8 dset:   1 I:      1      7  J:    1    3  K:    1    2  L:   -999   -999
 nulrgd  XYTVAR   M:  3 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:   -999   -999
 -DELETE XYTVAR   M:  6 dset:   1 I:      1      7  J:    1    3  K:    1    2  L:   -999   -999
 dealloc  dynamic grid (G###)          (AX###)   XLON      YLAT      NORMAL
             VARIABLE : L*1000 + J*10 + I
                        regrid: 2 day on X
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X (DAYS)-Y (degrees_east)-Z (degrees_north))
             34319  34321  34323  34325  
               1      2      3      4
 ---- K:1 Z:   1
 141   / 1:  1011.  3011.  5011.  7011.
 142   / 2:  1012.  3012.  5012.  7012.
 143   / 3:  1013.  3013.  5013.  7013.
 ---- K:2 Z:   2
 141   / 1:  1021.  3021.  5021.  7021.
 142   / 2:  1022.  3022.  5022.  7022.
 143   / 3:  1023.  3023.  5023.  7023.
list/k=1:2 xytvar[j=2:6:2]
 dealloc  dynamic grid (G###)          (AX###)   XLON      YLAT      NORMAL
 -DELETE XYTVAR   M:  3 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:   -999   -999
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          TTIME     (AX###)   YLAT      NORMAL
 dealloc  dynamic grid (G###)          TTIME     (AX###)   YLAT      NORMAL
 allocate dynamic grid (G###)          TTIME     (AX###)   YLAT      NORMAL
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      2
 allocate dynamic grid (G###)          TTIME     (AX###)   YLAT      NORMAL
 strip regrid on Y: XYTVAR --> (G###)           @XACT
 rdstride XYTVAR   C:  8 dset:   1 I:      1      4  J:    2    6  K:    1    2  L:   -999   -999
 nulrgd  XYTVAR   M:  6 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:   -999   -999
 -DELETE XYTVAR   M:  3 dset:   1 I:      1      4  J:    2    6  K:    1    2  L:   -999   -999
 dealloc  dynamic grid (G###)          TTIME     (AX###)   YLAT      NORMAL
             VARIABLE : L*1000 + J*10 + I
                        regrid: 2 deg on Y
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X (DAYS)-Y (degrees_east)-Z (degrees_north))
             34319  34320  34321  34322  
               1      2      3      4
 ---- K:1 Z:   1
 142   / 1:  1012.  2012.  3012.  4012.
 144   / 2:  1014.  2014.  3014.  4014.
 146   / 3:  1016.  2016.  3016.  4016.
 ---- K:2 Z:   2
 142   / 1:  1022.  2022.  3022.  4022.
 144   / 2:  1024.  2024.  3024.  4024.
 146   / 3:  1026.  2026.  3026.  4026.
list xytvar[i=1:7:2,j=2:6:2,k=3:5:2]
 dealloc  dynamic grid (G###)          TTIME     (AX###)   YLAT      NORMAL
 -DELETE XYTVAR   M:  6 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:   -999   -999
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   NORMAL
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   NORMAL
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   NORMAL
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   NORMAL
 strip regrid on X: XYTVAR --> (G###)           @XACT
 rdstride XYTVAR   C:  7 dset:   1 I:      1      7  J:    2    6  K:    3    5  L:   -999   -999
 nulrgd  XYTVAR   M:  3 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:   -999   -999
 -DELETE XYTVAR   M:  6 dset:   1 I:      1      7  J:    2    6  K:    3    5  L:   -999   -999
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   NORMAL
             VARIABLE : L*1000 + J*10 + I
                        regrid: 2 day on X, 2 deg on Y, 2 deg on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X (DAYS)-Y (degrees_east)-Z (degrees_north))
             34319  34321  34323  34325  
               1      2      3      4
 ---- K:1 Z:   3
 142   / 1:  1032.  3032.  5032.  7032.
 144   / 2:  1034.  3034.  5034.  7034.
 146   / 3:  1036.  3036.  5036.  7036.
 ---- K:2 Z:   5
 142   / 1:  1052.  3052.  5052.  7052.
 144   / 2:  1054.  3054.  5054.  7054.
 146   / 3:  1056.  3056.  5056.  7056.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   NORMAL
 -DELETE XYTVAR   M:  3 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:   -999   -999
 canceling dset ./data/bn_strides.cdf
 
 
! * * * * * MIXED STRIDES, PERMUTATIONS and REVERSALS * * * * *
! to evaluate the output remember
!  1) the axis lengths on disk are 9,8,7,6 for X,Y,Z,T, respectively
!  2) the negatives apply to the axis in memory (after permutation)
! Thus, with /ORDER=y-x we expect the 2nd disk axis (the 10's place) to
! be reversed and the values 1:5:4 to be replaced by 9-(1:5:4) => 8:4:4
 
! Note that the logic of the /ORDER syntax when BOTH permutations and
! reversals are aplied would be more natural if the reversal were applied
! BEFORE the permutation. This should occur in routine TM_AXIS_ORDER.
! However, the logic changes needed were messay compared to the rare
! usage of complex combinations of reversals and permutations, so it was
! left as-is.
 
cancel region; set region/l=1
 
! reference output
use/order=yx bn_strides
list midvar[i=1:5:4, j=2:5:3, k=3:5:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 strip regrid on X: MIDVAR --> (G###)           @XACT
 rdstride MIDVAR   C:  7 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 nulrgd  MIDVAR   M:  6 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE MIDVAR   M:  3 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
             VARIABLE : VAR
                        regrid: 4 delta on X, 3 delta on Y, 2 delta on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             1      5    
             1      2
 ---- K:1 Z:   3
 2   / 1:  1312.  1352.
 5   / 2:  1315.  1355.
 ---- K:2 Z:   5
 2   / 1:  1512.  1552.
 5   / 2:  1515.  1555.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 -DELETE MIDVAR   M:  6 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 canceling dset ./data/bn_strides.cdf
 
use/order=-yx bn_strides
list midvar[i=1:5:4, j=2:5:3, k=3:5:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 strip regrid on X: MIDVAR --> (G###)           @XACT
 strip reversing MIDVAR on Y axis:        2        5 dset:   1
 rdstride MIDVAR   C:  8 dset:   1 I:      1      5  J:    5    8  K:    3    5  L:      1      1
 doing reversing MIDVAR on Y axis:        2        5 dset:   1
 -DELETE MIDVAR   M:  6 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 nulrgd  MIDVAR   M:  6 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE MIDVAR   M:  3 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
             VARIABLE : VAR
                        regrid: 4 delta on X, 3 delta on Y, 2 delta on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             1      5    
             1      2
 ---- K:1 Z:   3
 2   / 1:  1318.  1358.
 5   / 2:  1315.  1355.
 ---- K:2 Z:   5
 2   / 1:  1518.  1558.
 5   / 2:  1515.  1555.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 -DELETE MIDVAR   M:  6 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 canceling dset ./data/bn_strides.cdf
 
use/order=y-x bn_strides
list midvar[i=1:5:4, j=2:5:3, k=3:5:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 strip regrid on X: MIDVAR --> (G###)           @XACT
 strip reversing MIDVAR on X axis:        1        5 dset:   1
 rdstride MIDVAR   C:  8 dset:   1 I:      4      8  J:    2    5  K:    3    5  L:      1      1
 doing reversing MIDVAR on X axis:        1        5 dset:   1
 -DELETE MIDVAR   M:  6 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 nulrgd  MIDVAR   M:  6 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE MIDVAR   M:  3 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
             VARIABLE : VAR
                        regrid: 4 delta on X, 3 delta on Y, 2 delta on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             1      5    
             1      2
 ---- K:1 Z:   3
 2   / 1:  1382.  1342.
 5   / 2:  1385.  1345.
 ---- K:2 Z:   5
 2   / 1:  1582.  1542.
 5   / 2:  1585.  1545.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 -DELETE MIDVAR   M:  6 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 canceling dset ./data/bn_strides.cdf
 
! reference output
use/order=tyx bn_strides
list midvar[i=1:5:4, j=2:5:3, k=3:5:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 strip regrid on X: MIDVAR --> (G###)           @XACT
 rdstride MIDVAR   C:  7 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 nulrgd  MIDVAR   M:  3 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE MIDVAR   M:  6 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
             VARIABLE : VAR
                        regrid: 4 delta on X, 3 delta on Y, 2 delta on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             1      5    
             1      2
 ---- K:1 Z:   3
 2   / 1:  1123.  5123.
 5   / 2:  1153.  5153.
 ---- K:2 Z:   5
 2   / 1:  1125.  5125.
 5   / 2:  1155.  5155.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 -DELETE MIDVAR   M:  3 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 canceling dset ./data/bn_strides.cdf
 
! note the reversal on axes 1,2 and 3 (X,Y,Z in memory -- NOT T)
use/order=-t-y-x bn_strides
list midvar[i=1:5:4, j=2:5:3, k=3:5:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 strip regrid on X: MIDVAR --> (G###)           @XACT
 strip reversing MIDVAR on X axis:        1        5 dset:   1
 rdstride MIDVAR   C:  8 dset:   1 I:      2      6  J:    4    7  K:    3    5  L:      7      7
 doing reversing MIDVAR on X axis:        1        5 dset:   1
 -DELETE MIDVAR   M:  3 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 nulrgd  MIDVAR   M:  3 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE MIDVAR   M:  6 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
             VARIABLE : VAR
                        regrid: 4 delta on X, 3 delta on Y, 2 delta on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             1      5    
             1      2
 ---- K:1 Z:   3
 2   / 1:  6773.  2773.
 5   / 2:  6743.  2743.
 ---- K:2 Z:   5
 2   / 1:  6775.  2775.
 5   / 2:  6745.  2745.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 -DELETE MIDVAR   M:  3 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 canceling dset ./data/bn_strides.cdf
 
! reference output
use/order=txy bn_strides
list midvar[i=1:5:4, j=2:5:3, k=3:5:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 strip regrid on X: MIDVAR --> (G###)           @XACT
 rdstride MIDVAR   C:  7 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 nulrgd  MIDVAR   M:  6 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE MIDVAR   M:  3 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
             VARIABLE : VAR
                        regrid: 4 delta on X, 3 delta on Y, 2 delta on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             1      5    
             1      2
 ---- K:1 Z:   3
 2   / 1:  1132.  5132.
 5   / 2:  1135.  5135.
 ---- K:2 Z:   5
 2   / 1:  1152.  5152.
 5   / 2:  1155.  5155.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 -DELETE MIDVAR   M:  6 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 canceling dset ./data/bn_strides.cdf
 
use/order=-t-x-y bn_strides
list midvar[i=1:5:4, j=2:5:3, k=3:5:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 strip regrid on X: MIDVAR --> (G###)           @XACT
 strip reversing MIDVAR on Y axis:        2        5 dset:   1
 rdstride MIDVAR   C:  8 dset:   1 I:      2      6  J:    5    8  K:    3    5  L:      7      7
 doing reversing MIDVAR on Y axis:        2        5 dset:   1
 -DELETE MIDVAR   M:  6 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 nulrgd  MIDVAR   M:  6 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE MIDVAR   M:  3 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
             VARIABLE : VAR
                        regrid: 4 delta on X, 3 delta on Y, 2 delta on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             1      5    
             1      2
 ---- K:1 Z:   3
 2   / 1:  6738.  2738.
 5   / 2:  6735.  2735.
 ---- K:2 Z:   5
 2   / 1:  6758.  2758.
 5   / 2:  6755.  2755.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 -DELETE MIDVAR   M:  6 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 canceling dset ./data/bn_strides.cdf
*** Running ferret script: bn_non_COARDS_netCDF.jnl
! bn_non_COARDS_netCDF.jnl
! *sh* 3/99
! *sh* 6/00 -- added true scalar variable, TRUE_SCALAR
 
! test robust treatment of non-standard netCDF files
 
use non_COARDS
 
show data
     currently SET data sets:
    1> ./data/non_COARDS.cdf  (default)
 name     title                             I         J         K         L
 UNORDERED_AXIS
          disordered axis                  1:5       ...       ...       ...
       (invalid coordinate axis)
 GAPPY_AXIS
          gappy axis                       1:5       ...       ...       ...
       (invalid coordinate axis)
 SCALAR_VAR
          a good way to encode model parm  1:1       ...       ...       ...
 TRUE_SCALAR
          with no dims at all              ...       ...       ...       ...
 MASKED_SST
          SST * MP_MASK                    1:180     1:90      ...       1:1
 COADSX   Longitude page positions         1:180     1:90      ...       ...
 COADSY   Latitude page positions          1:180     1:90      ...       ...
 HAS_NO_AXIS
          variable with no axis            1:5       ...       ...       ...
 HAS_UNORDERED_AXIS
          variable with disordered axis    1:5       ...       ...       ...
 HAS_GAPPY_AXIS
          variable with gappy axis         1:5       ...       ...       ...
 HAS_BACKWARDS_AXIS
          variable with backwards axis     1:5       ...       ...       ...
 USES_BIG_IRREG
          variable defined on too-long ir  ...       ...       ...       1:200000
 
show grid/x HAS_NO_AXIS
    GRID GAB7
 name       axis              # pts   start                end                 subset
 NO_AXIS   X                    5 r   1                    5                   full
 normal    Y
 normal    Z
 normal    T
 
       I     X                       XBOX          XBOXLO
       1>  1                         1          0.5
       2>  2                         1          1.5
       3>  3                         1          2.5
       4>  4                         1          3.5
       5>  5                         1          4.5
show grid/x HAS_UNORDERED_AXIS
    GRID GAB1
 name       axis              # pts   start                end                 subset
 UNORDERED_AXIS X               5 r   1                    5                   full
 normal    Y
 normal    Z
 normal    T
 
       I     X                       XBOX          XBOXLO
       1>  1                         1          0.5
       2>  2                         1          1.5
       3>  3                         1          2.5
       4>  4                         1          3.5
       5>  5                         1          4.5
show grid/x HAS_GAPPY_AXIS
    GRID GAB2
 name       axis              # pts   start                end                 subset
 GAPPY_AXIS X                   5 r   1                    5                   full
 normal    Y
 normal    Z
 normal    T
 
       I     X                       XBOX          XBOXLO
       1>  1                         1          0.5
       2>  2                         1          1.5
       3>  3                         1          2.5
       4>  4                         1          3.5
       5>  5                         1          4.5
show grid/x HAS_BACKWARDS_AXIS
    GRID GAB8
 name       axis              # pts   start                end                 subset
 BACKWARDS_AXIS X               5 r   1                    5                   full
 normal    Y
 normal    Z
 normal    T
 
       I     X                       XBOX          XBOXLO
       1>  1                         1          0.5
       2>  2                         1          1.5
       3>  3                         1          2.5
       4>  4                         1          3.5
       5>  5                         1          4.5
show grid/x SCALAR_VAR
    GRID GAB3
 name       axis              # pts   start                end                 subset
 SCALAR    X                    1 r   1                    1                   full
 normal    Y
 normal    Z
 normal    T
 
       I     X                       XBOX          XBOXLO
       1>  1                         1          0.5
 
show grid/i=1:5 USES_BIG_IRREG
    GRID GAB9
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 BIG_IRREG T (hours)       200000 i   1                    2.E+05              full
 
show grid MASKED_SST
    GRID GAB5
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180 r   1E                   180E                full
 COADSY    LATITUDE            90 r   1N                   90N                 full
 normal    Z
 TIME      TIME                 1mr   16-JAN 06:00         16-JAN 06:00        full
show grid COADSX
    GRID GAB6
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180 r   1E                   180E                full
 COADSY    LATITUDE            90 r   1N                   90N                 full
 normal    Z
 normal    T
show grid COADSY
    GRID GAB6
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180 r   1E                   180E                full
 COADSY    LATITUDE            90 r   1N                   90N                 full
 normal    Z
 normal    T
 
show data
     currently SET data sets:
    1> ./data/non_COARDS.cdf  (default)
 name     title                             I         J         K         L
 UNORDERED_AXIS
          disordered axis                  1:5       ...       ...       ...
       (invalid coordinate axis)
 GAPPY_AXIS
          gappy axis                       1:5       ...       ...       ...
       (invalid coordinate axis)
 SCALAR_VAR
          a good way to encode model parm  1:1       ...       ...       ...
 TRUE_SCALAR
          with no dims at all              ...       ...       ...       ...
 MASKED_SST
          SST * MP_MASK                    1:180     1:90      ...       1:1
 COADSX   Longitude page positions         1:180     1:90      ...       ...
 COADSY   Latitude page positions          1:180     1:90      ...       ...
 HAS_NO_AXIS
          variable with no axis            1:5       ...       ...       ...
 HAS_UNORDERED_AXIS
          variable with disordered axis    1:5       ...       ...       ...
 HAS_GAPPY_AXIS
          variable with gappy axis         1:5       ...       ...       ...
 HAS_BACKWARDS_AXIS
          variable with backwards axis     1:5       ...       ...       ...
 USES_BIG_IRREG
          variable defined on too-long ir  ...       ...       ...       1:200000
 
list UNORDERED_AXIS
             VARIABLE : disordered axis
                        invalid coordinate axis
             FILENAME : non_COARDS.cdf
             SUBSET   : 5 points (X)
 1   / 1:  1.000
 2   / 2:  3.000
 3   / 3:  5.000
 4   / 4:  2.000
 5   / 5:  4.000
list GAPPY_AXIS
             VARIABLE : gappy axis
                        invalid coordinate axis
             FILENAME : non_COARDS.cdf
             SUBSET   : 5 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:   ....
 4   / 4:  4.000
 5   / 5:  5.000
list SCALAR_VAR
             VARIABLE : a good way to encode model parms
             FILENAME : non_COARDS.cdf
             X        : 1
          99.00
list TRUE_SCALAR
             VARIABLE : with no dims at all
             FILENAME : non_COARDS.cdf
        ....
list HAS_BACKWARDS_AXIS
             VARIABLE : variable with backwards axis
             FILENAME : non_COARDS.cdf
             SUBSET   : 5 points (X)
 1   / 1:  50.00
 2   / 2:  40.00
 3   / 3:  30.00
 4   / 4:  20.00
 5   / 5:  10.00
 
! With 250000 irregular coordinate storage locations, the variable BIG_IRREG
! is not created; if irreg axis too long for coord storage, a variable
! is generated with its values.
 
! list/i=1:5 BIG_IRREG
*** Running ferret script: bn_cache_hits.jnl
! bn_cache_hits.jnl
 
! 3/99 *sh*
! Test the success of Ferret in recalling past results
 
! 7/01 -- added bn_cache_hits_gcfcn.sub
 
define alias CONFUSE load/i=1:5 i
 
set mode diag
use coads_climatology
set region/l=1
 
GO bn_cache_hits.sub sst
! bn_cache_hits.sub
! *sh* 3/99
! usage:	GO bn_cache_hits.sub variable
 
stat $1
 !-> stat sst
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 reading SST      M:  1 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 
             SEA SURFACE TEMPERATURE
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 16200 (180*90*1*1*1*1)
 # flagged as bad  data: 6694
 Minimum value: -1.8
 Maximum value: 31
 Mean    value: 16.52 (unweighted average)
 Standard deviation: 10.139
CONFUSE
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M:  2 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1
 !-> stat sst
 -DELETE I        M:  2 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 found   SST      M:  1 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 
             SEA SURFACE TEMPERATURE
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 16200 (180*90*1*1*1*1)
 # flagged as bad  data: 6694
 Minimum value: -1.8
 Maximum value: 31
 Mean    value: 16.52 (unweighted average)
 Standard deviation: 10.139
 
define axis/x=130e:80w:1 xtrop
stat $1[gx=xtrop]
 !-> stat sst[gx=xtrop]
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 strip regrid on X: SST --> (G###)           @LIN
 found   SST      M:  1 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 regrid  SST      M:  2 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 
             SEA SURFACE TEMPERATURE
             regrid: 1 deg on X
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 13590 (151*90*1*1*1*1)
 # flagged as bad  data: 4962
 Minimum value: -1.7
 Maximum value: 31
 Mean    value: 17.605 (unweighted average)
 Standard deviation: 9.8848
CONFUSE
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 -DELETE SST      M:  2 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M:  2 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1[gx=xtrop]
 !-> stat sst[gx=xtrop]
 -DELETE I        M:  2 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 strip regrid on X: SST --> (G###)           @LIN
 found   SST      M:  1 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 regrid  SST      M:  2 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 
             SEA SURFACE TEMPERATURE
             regrid: 1 deg on X
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 13590 (151*90*1*1*1*1)
 # flagged as bad  data: 4962
 Minimum value: -1.7
 Maximum value: 31
 Mean    value: 17.605 (unweighted average)
 Standard deviation: 9.8848
 
let $1x = $1[gx=xtrop]
 !-> DEFINE VARIABLE sstx = sst[gx=xtrop]
stat $1x
 !-> stat sstx
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 -DELETE SST      M:  2 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid SSTX     C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 eval    SSTX     C:  6 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 strip regrid on X: SST --> (G###)           @LIN
 found   SST      M:  1 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 regrid  SST      M:  2 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 
             SST[GX=XTROP]
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 13590 (151*90*1*1*1*1)
 # flagged as bad  data: 4962
 Minimum value: -1.7
 Maximum value: 31
 Mean    value: 17.605 (unweighted average)
 Standard deviation: 9.8848
CONFUSE
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M:  4 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1x
 !-> stat sstx
 -DELETE I        M:  4 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 found   SSTX     M:  3 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 
             SST[GX=XTROP]
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 13590 (151*90*1*1*1*1)
 # flagged as bad  data: 4962
 Minimum value: -1.7
 Maximum value: 31
 Mean    value: 17.605 (unweighted average)
 Standard deviation: 9.8848
 
define grid/x=xtrop gx
stat $1[g=gx]
 !-> stat sst[g=gx]
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 found   SST      M:  2 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 
             SEA SURFACE TEMPERATURE
             regrid: 1 deg on X
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 13590 (151*90*1*1*1*1)
 # flagged as bad  data: 4962
 Minimum value: -1.7
 Maximum value: 31
 Mean    value: 17.605 (unweighted average)
 Standard deviation: 9.8848
CONFUSE
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M:  4 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1[g=gx]
 !-> stat sst[g=gx]
 -DELETE I        M:  4 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 found   SST      M:  2 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 
             SEA SURFACE TEMPERATURE
             regrid: 1 deg on X
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 13590 (151*90*1*1*1*1)
 # flagged as bad  data: 4962
 Minimum value: -1.7
 Maximum value: 31
 Mean    value: 17.605 (unweighted average)
 Standard deviation: 9.8848
 
define axis/y=20s:20n:1 ytrop
stat $1[gx=xtrop,gy=ytrop]
 !-> stat sst[gx=xtrop,gy=ytrop]
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XTROP     YTROP     NORMAL    TIME
 dealloc  dynamic grid (G###)          XTROP     YTROP     NORMAL    TIME
 allocate dynamic grid (G###)          XTROP     YTROP     NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          XTROP     YTROP     NORMAL    TIME
 strip regrid on X: SST --> (G###)           @LIN
 found   SST      M:  1 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 regrid XY
 regrid  SST      M:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          XTROP     YTROP     NORMAL    TIME
 
             SEA SURFACE TEMPERATURE
             regrid: 1 deg on X, 1 deg on Y
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 20.5S to 20.5N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 6191 (151*41*1*1*1*1)
 # flagged as bad  data: 151
 Minimum value: 20.428
 Maximum value: 31
 Mean    value: 26.908 (unweighted average)
 Standard deviation: 1.778
CONFUSE
 dealloc  dynamic grid (G###)          XTROP     YTROP     NORMAL    TIME
 -DELETE SST      M:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M:  4 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1[gx=xtrop,gy=ytrop]
 !-> stat sst[gx=xtrop,gy=ytrop]
 -DELETE I        M:  4 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XTROP     YTROP     NORMAL    TIME
 dealloc  dynamic grid (G###)          XTROP     YTROP     NORMAL    TIME
 allocate dynamic grid (G###)          XTROP     YTROP     NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          XTROP     YTROP     NORMAL    TIME
 strip regrid on X: SST --> (G###)           @LIN
 found   SST      M:  1 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 regrid XY
 regrid  SST      M:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          XTROP     YTROP     NORMAL    TIME
 
             SEA SURFACE TEMPERATURE
             regrid: 1 deg on X, 1 deg on Y
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 20.5S to 20.5N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 6191 (151*41*1*1*1*1)
 # flagged as bad  data: 151
 Minimum value: 20.428
 Maximum value: 31
 Mean    value: 26.908 (unweighted average)
 Standard deviation: 1.778
 
define grid/like=$1/x=xtrop/y=ytrop gxyt
 !-> define grid/like=sst/x=xtrop/y=ytrop gxyt
 dealloc  dynamic grid (G###)          XTROP     YTROP     NORMAL    TIME
 -DELETE SST      M:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 getgrid EX#1     C:  6 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
stat $1[g=gxyt]
 !-> stat sst[g=gxyt]
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 strip regrid on X: SST --> GXYT             @LIN
 found   SST      M:  1 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 regrid XY
 regrid  SST      M:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 
             SEA SURFACE TEMPERATURE
             regrid: GXYT
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 20.5S to 20.5N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 6191 (151*41*1*1*1*1)
 # flagged as bad  data: 151
 Minimum value: 20.428
 Maximum value: 31
 Mean    value: 26.908 (unweighted average)
 Standard deviation: 1.778
CONFUSE
 dealloc  dynamic grid GXYT            XTROP     YTROP     NORMAL    TIME
 -DELETE SST      M:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M:  4 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1[g=gxyt]
 !-> stat sst[g=gxyt]
 -DELETE I        M:  4 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 strip regrid on X: SST --> GXYT             @LIN
 found   SST      M:  1 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 regrid XY
 regrid  SST      M:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 
             SEA SURFACE TEMPERATURE
             regrid: GXYT
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 20.5S to 20.5N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 6191 (151*41*1*1*1*1)
 # flagged as bad  data: 151
 Minimum value: 20.428
 Maximum value: 31
 Mean    value: 26.908 (unweighted average)
 Standard deviation: 1.778
 
let $1xyt = $1[g=gxyt]
 !-> DEFINE VARIABLE sstxyt = sst[g=gxyt]
stat $1xyt
 !-> stat sstxyt
 dealloc  dynamic grid GXYT            XTROP     YTROP     NORMAL    TIME
 -DELETE SST      M:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid SSTXYT   C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 eval    SSTXYT   C:  6 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 strip regrid on X: SST --> GXYT             @LIN
 found   SST      M:  1 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 regrid XY
 regrid  SST      M:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 
             SST[G=GXYT]
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 20.5S to 20.5N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 6191 (151*41*1*1*1*1)
 # flagged as bad  data: 151
 Minimum value: 20.428
 Maximum value: 31
 Mean    value: 26.908 (unweighted average)
 Standard deviation: 1.778
CONFUSE
 dealloc  dynamic grid GXYT            XTROP     YTROP     NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M:  6 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1xyt
 !-> stat sstxyt
 -DELETE I        M:  6 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 found   SSTXYT   M:  5 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 
             SST[G=GXYT]
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 20.5S to 20.5N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 6191 (151*41*1*1*1*1)
 # flagged as bad  data: 151
 Minimum value: 20.428
 Maximum value: 31
 Mean    value: 26.908 (unweighted average)
 Standard deviation: 1.778
 
let $1xyt = $1[g=gxyt]
 !-> DEFINE VARIABLE sstxyt = sst[g=gxyt]
 dealloc  dynamic grid GXYT            XTROP     YTROP     NORMAL    TIME
 -DELETE SSTXYT   M:  5 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 dealloc  dynamic grid GXYT            XTROP     YTROP     NORMAL    TIME
 -DELETE SST      M:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 -DELETE SSTX     M:  3 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 -DELETE SST      M:  2 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
stat $1xyt
 !-> stat sstxyt
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid SSTXYT   C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 eval    SSTXYT   C:  6 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 strip regrid on X: SST --> GXYT             @LIN
 found   SST      M:  1 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 regrid XY
 regrid  SST      M:  2 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 
             SST[G=GXYT]
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 20.5S to 20.5N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 6191 (151*41*1*1*1*1)
 # flagged as bad  data: 151
 Minimum value: 20.428
 Maximum value: 31
 Mean    value: 26.908 (unweighted average)
 Standard deviation: 1.778
CONFUSE
 dealloc  dynamic grid GXYT            XTROP     YTROP     NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M:  4 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1xyt
 !-> stat sstxyt
 -DELETE I        M:  4 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 found   SSTXYT   M:  3 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 
             SST[G=GXYT]
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 20.5S to 20.5N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 6191 (151*41*1*1*1*1)
 # flagged as bad  data: 151
 Minimum value: 20.428
 Maximum value: 31
 Mean    value: 26.908 (unweighted average)
 Standard deviation: 1.778
 
stat $1[x=@ave]
 !-> stat sst[x=@ave]
 dealloc  dynamic grid GXYT            XTROP     YTROP     NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 strip --> SST[X=20E:20E(380)@AVE,D=1]
 found   SST      M:  1 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 doing --> SST[X=20E:20E(380)@AVE,D=1]
 final --> SST[X=20E:20E(380)@AVE,D=1]
 
             SEA SURFACE TEMPERATURE
             LONGITUDE: 20E to 20E(380) (averaged)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 90 (1*90*1*1*1*1)
 # flagged as bad  data: 12
 Minimum value: -0.69743
 Maximum value: 27.612
 Mean    value: 14.429 (unweighted average)
 Standard deviation: 10.445
CONFUSE
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M:  5 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1[x=@ave]
 !-> stat sst[x=@ave]
 -DELETE I        M:  5 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 found   SST      M:  4 dset:   1 I:   -999   -999  J:    1   90  K: -999 -999  L:      1      1
 
             SEA SURFACE TEMPERATURE
             LONGITUDE: 20E to 20E(380) (averaged)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 90 (1*90*1*1*1*1)
 # flagged as bad  data: 12
 Minimum value: -0.69743
 Maximum value: 27.612
 Mean    value: 14.429 (unweighted average)
 Standard deviation: 10.445
 
let $1xave = $1[x=@ave]
 !-> DEFINE VARIABLE sstxave = sst[x=@ave]
stat $1xave
 !-> stat sstxave
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid SSTXAVE  C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 eval    SSTXAVE  C:  6 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 found   SST      M:  4 dset:   1 I:   -999   -999  J:    1   90  K: -999 -999  L:      1      1
 
             SST[X=@AVE]
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 90 (1*90*1*1*1*1)
 # flagged as bad  data: 12
 Minimum value: -0.69743
 Maximum value: 27.612
 Mean    value: 14.429 (unweighted average)
 Standard deviation: 10.445
CONFUSE
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M:  6 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1xave
 !-> stat sstxave
 -DELETE I        M:  6 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 found   SSTXAVE  M:  5 dset:   1 I:   -999   -999  J:    1   90  K: -999 -999  L:      1      1
 
             SST[X=@AVE]
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 90 (1*90*1*1*1*1)
 # flagged as bad  data: 12
 Minimum value: -0.69743
 Maximum value: 27.612
 Mean    value: 14.429 (unweighted average)
 Standard deviation: 10.445
 
stat $1[x=@sbx]
 !-> stat sst[x=@sbx]
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 strip --> SST[X=20E:20E(380)@SBX:3,D=1]
 strip moduloing SST on X axis:        0      181 dset:   1
 found   SST      M:  1 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 doing moduloing SST on X axis:        1      180 dset:   1
 doing --> SST[X=20E:20E(380)@SBX:3,D=1]
 
             SEA SURFACE TEMPERATURE
             box smoothed by 3 pts on X
             LONGITUDE: 20E to 20E(380) (box smoothed by 3 pts)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 16200 (180*90*1*1*1*1)
 # flagged as bad  data: 7173
 Minimum value: -1.3854
 Maximum value: 30.382
 Mean    value: 16.633 (unweighted average)
 Standard deviation: 10.112
CONFUSE
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M:  8 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1[x=@sbx]
 !-> stat sst[x=@sbx]
 -DELETE I        M:  8 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 found   SST      M:  7 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 
             SEA SURFACE TEMPERATURE
             box smoothed by 3 pts on X
             LONGITUDE: 20E to 20E(380) (box smoothed by 3 pts)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 16200 (180*90*1*1*1*1)
 # flagged as bad  data: 7173
 Minimum value: -1.3854
 Maximum value: 30.382
 Mean    value: 16.633 (unweighted average)
 Standard deviation: 10.112
 
let $1sbx = $1[x=@sbx]
 !-> DEFINE VARIABLE sstsbx = sst[x=@sbx]
stat $1sbx
 !-> stat sstsbx
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid SSTSBX   C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 eval    SSTSBX   C:  6 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 found   SST      M:  7 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 
             SST[X=@SBX]
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 16200 (180*90*1*1*1*1)
 # flagged as bad  data: 7173
 Minimum value: -1.3854
 Maximum value: 30.382
 Mean    value: 16.633 (unweighted average)
 Standard deviation: 10.112
CONFUSE
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M:  9 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1sbx
 !-> stat sstsbx
 -DELETE I        M:  9 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 found   SSTSBX   M:  8 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 
             SST[X=@SBX]
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 16200 (180*90*1*1*1*1)
 # flagged as bad  data: 7173
 Minimum value: -1.3854
 Maximum value: 30.382
 Mean    value: 16.633 (unweighted average)
 Standard deviation: 10.112
 
 
 
LET sst5 = sst+5
GO bn_cache_hits.sub sst5
! bn_cache_hits.sub
! *sh* 3/99
! usage:	GO bn_cache_hits.sub variable
 
stat $1
 !-> stat sst5
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid SST5     C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 eval    SST5     C:  6 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 found   SST      M:  6 dset:   1 I:      0    181  J:    1   90  K: -999 -999  L:      1      1
 constan cnst     M:  9 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE cnst     M:  9 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 
             SST+5
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 16200 (180*90*1*1*1*1)
 # flagged as bad  data: 6694
 Minimum value: 3.2
 Maximum value: 36
 Mean    value: 21.52 (unweighted average)
 Standard deviation: 10.139
CONFUSE
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M:  9 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1
 !-> stat sst5
 -DELETE I        M:  9 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 found   SST5     M: 10 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 
             SST+5
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 16200 (180*90*1*1*1*1)
 # flagged as bad  data: 6694
 Minimum value: 3.2
 Maximum value: 36
 Mean    value: 21.52 (unweighted average)
 Standard deviation: 10.139
 
define axis/x=130e:80w:1 xtrop
stat $1[gx=xtrop]
 !-> stat sst5[gx=xtrop]
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 strip regrid on X: SST5 --> (G###)           @LIN
 found   SST5     M: 10 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 regrid  SST5     M:  9 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 
             SST+5
             regrid: 1 deg on X
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 13590 (151*90*1*1*1*1)
 # flagged as bad  data: 4962
 Minimum value: 3.3
 Maximum value: 36
 Mean    value: 22.605 (unweighted average)
 Standard deviation: 9.8848
CONFUSE
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 -DELETE SST5     M:  9 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M:  9 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1[gx=xtrop]
 !-> stat sst5[gx=xtrop]
 -DELETE I        M:  9 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 strip regrid on X: SST5 --> (G###)           @LIN
 found   SST5     M: 10 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 regrid  SST5     M:  9 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 
             SST+5
             regrid: 1 deg on X
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 13590 (151*90*1*1*1*1)
 # flagged as bad  data: 4962
 Minimum value: 3.3
 Maximum value: 36
 Mean    value: 22.605 (unweighted average)
 Standard deviation: 9.8848
 
let $1x = $1[gx=xtrop]
 !-> DEFINE VARIABLE sst5x = sst5[gx=xtrop]
stat $1x
 !-> stat sst5x
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 -DELETE SST5     M:  9 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid SST5X    C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 eval    SST5X    C:  6 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 strip regrid on X: SST5 --> (G###)           @LIN
 found   SST5     M: 10 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 regrid  SST5     M:  9 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 
             SST5[GX=XTROP]
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 13590 (151*90*1*1*1*1)
 # flagged as bad  data: 4962
 Minimum value: 3.3
 Maximum value: 36
 Mean    value: 22.605 (unweighted average)
 Standard deviation: 9.8848
CONFUSE
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M: 12 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1x
 !-> stat sst5x
 -DELETE I        M: 12 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 found   SST5X    M: 11 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 
             SST5[GX=XTROP]
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 13590 (151*90*1*1*1*1)
 # flagged as bad  data: 4962
 Minimum value: 3.3
 Maximum value: 36
 Mean    value: 22.605 (unweighted average)
 Standard deviation: 9.8848
 
define grid/x=xtrop gx
stat $1[g=gx]
 !-> stat sst5[g=gx]
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 found   SST5     M:  9 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 
             SST+5
             regrid: 1 deg on X
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 13590 (151*90*1*1*1*1)
 # flagged as bad  data: 4962
 Minimum value: 3.3
 Maximum value: 36
 Mean    value: 22.605 (unweighted average)
 Standard deviation: 9.8848
CONFUSE
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M: 12 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1[g=gx]
 !-> stat sst5[g=gx]
 -DELETE I        M: 12 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 found   SST5     M:  9 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 
             SST+5
             regrid: 1 deg on X
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 13590 (151*90*1*1*1*1)
 # flagged as bad  data: 4962
 Minimum value: 3.3
 Maximum value: 36
 Mean    value: 22.605 (unweighted average)
 Standard deviation: 9.8848
 
define axis/y=20s:20n:1 ytrop
stat $1[gx=xtrop,gy=ytrop]
 !-> stat sst5[gx=xtrop,gy=ytrop]
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 strip regrid on X: SST5 --> GXYT             @LIN
 found   SST5     M: 10 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 regrid XY
 regrid  SST5     M: 12 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 
             SST+5
             regrid: GXYT
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 20.5S to 20.5N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 6191 (151*41*1*1*1*1)
 # flagged as bad  data: 151
 Minimum value: 25.428
 Maximum value: 36
 Mean    value: 31.908 (unweighted average)
 Standard deviation: 1.778
CONFUSE
 dealloc  dynamic grid GXYT            XTROP     YTROP     NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M: 13 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1[gx=xtrop,gy=ytrop]
 !-> stat sst5[gx=xtrop,gy=ytrop]
 -DELETE I        M: 13 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 found   SST5     M: 12 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 
             SST+5
             regrid: GXYT
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 20.5S to 20.5N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 6191 (151*41*1*1*1*1)
 # flagged as bad  data: 151
 Minimum value: 25.428
 Maximum value: 36
 Mean    value: 31.908 (unweighted average)
 Standard deviation: 1.778
 
define grid/like=$1/x=xtrop/y=ytrop gxyt
 !-> define grid/like=sst5/x=xtrop/y=ytrop gxyt
 dealloc  dynamic grid GXYT            XTROP     YTROP     NORMAL    TIME
 getgrid EX#1     C:  6 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
stat $1[g=gxyt]
 !-> stat sst5[g=gxyt]
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 found   SST5     M: 12 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 
             SST+5
             regrid: GXYT
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 20.5S to 20.5N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 6191 (151*41*1*1*1*1)
 # flagged as bad  data: 151
 Minimum value: 25.428
 Maximum value: 36
 Mean    value: 31.908 (unweighted average)
 Standard deviation: 1.778
CONFUSE
 dealloc  dynamic grid GXYT            XTROP     YTROP     NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M: 13 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1[g=gxyt]
 !-> stat sst5[g=gxyt]
 -DELETE I        M: 13 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 found   SST5     M: 12 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 
             SST+5
             regrid: GXYT
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 20.5S to 20.5N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 6191 (151*41*1*1*1*1)
 # flagged as bad  data: 151
 Minimum value: 25.428
 Maximum value: 36
 Mean    value: 31.908 (unweighted average)
 Standard deviation: 1.778
 
let $1xyt = $1[g=gxyt]
 !-> DEFINE VARIABLE sst5xyt = sst5[g=gxyt]
stat $1xyt
 !-> stat sst5xyt
 dealloc  dynamic grid GXYT            XTROP     YTROP     NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid SST5XYT  C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 eval    SST5XYT  C:  6 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 found   SST5     M: 12 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 
             SST5[G=GXYT]
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 20.5S to 20.5N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 6191 (151*41*1*1*1*1)
 # flagged as bad  data: 151
 Minimum value: 25.428
 Maximum value: 36
 Mean    value: 31.908 (unweighted average)
 Standard deviation: 1.778
CONFUSE
 dealloc  dynamic grid GXYT            XTROP     YTROP     NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M: 14 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1xyt
 !-> stat sst5xyt
 -DELETE I        M: 14 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 found   SST5XYT  M: 13 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 
             SST5[G=GXYT]
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 20.5S to 20.5N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 6191 (151*41*1*1*1*1)
 # flagged as bad  data: 151
 Minimum value: 25.428
 Maximum value: 36
 Mean    value: 31.908 (unweighted average)
 Standard deviation: 1.778
 
let $1xyt = $1[g=gxyt]
 !-> DEFINE VARIABLE sst5xyt = sst5[g=gxyt]
 dealloc  dynamic grid GXYT            XTROP     YTROP     NORMAL    TIME
 -DELETE SST5XYT  M: 13 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 dealloc  dynamic grid GXYT            XTROP     YTROP     NORMAL    TIME
 -DELETE SST5X    M: 11 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          XTROP     COADSY    NORMAL    TIME
 -DELETE SST5     M:  9 dset:   1 I:      1    151  J:    1   90  K: -999 -999  L:      1      1
 -DELETE SST5     M: 10 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 -DELETE SST5     M: 12 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 -DELETE SSTSBX   M:  8 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 -DELETE SSTXAVE  M:  5 dset:   1 I:   -999   -999  J:    1   90  K: -999 -999  L:      1      1
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 -DELETE SSTXYT   M:  3 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 dealloc  dynamic grid GXYT            XTROP     YTROP     NORMAL    TIME
stat $1xyt
 !-> stat sst5xyt
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid SST5XYT  C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid SST5     C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 eval    SST5XYT  C:  6 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 strip regrid on X: SST5 --> GXYT             @LIN
 eval    SST5     C:  9 dset:   1 I:     55    131  J:   35   56  K: -999 -999  L:      1      1
 found   SST      M:  6 dset:   1 I:      0    181  J:    1   90  K: -999 -999  L:      1      1
 constan cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 regrid XY
 regrid  SST5     M:  3 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 
             SST5[G=GXYT]
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 20.5S to 20.5N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 6191 (151*41*1*1*1*1)
 # flagged as bad  data: 151
 Minimum value: 25.428
 Maximum value: 36
 Mean    value: 31.908 (unweighted average)
 Standard deviation: 1.778
CONFUSE
 dealloc  dynamic grid GXYT            XTROP     YTROP     NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M: 12 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1xyt
 !-> stat sst5xyt
 -DELETE I        M: 12 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 found   SST5XYT  M:  8 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 
             SST5[G=GXYT]
             LONGITUDE: 129.5E to 79.5W
             LATITUDE: 20.5S to 20.5N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 6191 (151*41*1*1*1*1)
 # flagged as bad  data: 151
 Minimum value: 25.428
 Maximum value: 36
 Mean    value: 31.908 (unweighted average)
 Standard deviation: 1.778
 
stat $1[x=@ave]
 !-> stat sst5[x=@ave]
 dealloc  dynamic grid GXYT            XTROP     YTROP     NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 strip --> SST5[X=20E:20E(380)@AVE,D=1]
 eval    SST5     C:  7 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 found   SST      M:  6 dset:   1 I:      0    181  J:    1   90  K: -999 -999  L:      1      1
 constan cnst     M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE cnst     M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 doing --> SST5[X=20E:20E(380)@AVE,D=1]
 final --> SST5[X=20E:20E(380)@AVE,D=1]
 
             SST+5
             LONGITUDE: 20E to 20E(380) (averaged)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 90 (1*90*1*1*1*1)
 # flagged as bad  data: 12
 Minimum value: 4.3026
 Maximum value: 32.612
 Mean    value: 19.429 (unweighted average)
 Standard deviation: 10.445
CONFUSE
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M:  9 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1[x=@ave]
 !-> stat sst5[x=@ave]
 -DELETE I        M:  9 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 found   SST5     M: 12 dset:   1 I:   -999   -999  J:    1   90  K: -999 -999  L:      1      1
 
             SST+5
             LONGITUDE: 20E to 20E(380) (averaged)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 90 (1*90*1*1*1*1)
 # flagged as bad  data: 12
 Minimum value: 4.3026
 Maximum value: 32.612
 Mean    value: 19.429 (unweighted average)
 Standard deviation: 10.445
 
let $1xave = $1[x=@ave]
 !-> DEFINE VARIABLE sst5xave = sst5[x=@ave]
stat $1xave
 !-> stat sst5xave
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid SST5XAVE C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 eval    SST5XAVE C:  6 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 found   SST5     M: 12 dset:   1 I:   -999   -999  J:    1   90  K: -999 -999  L:      1      1
 
             SST5[X=@AVE]
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 90 (1*90*1*1*1*1)
 # flagged as bad  data: 12
 Minimum value: 4.3026
 Maximum value: 32.612
 Mean    value: 19.429 (unweighted average)
 Standard deviation: 10.445
CONFUSE
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M: 11 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1xave
 !-> stat sst5xave
 -DELETE I        M: 11 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 found   SST5XAVE M:  9 dset:   1 I:   -999   -999  J:    1   90  K: -999 -999  L:      1      1
 
             SST5[X=@AVE]
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 90 (1*90*1*1*1*1)
 # flagged as bad  data: 12
 Minimum value: 4.3026
 Maximum value: 32.612
 Mean    value: 19.429 (unweighted average)
 Standard deviation: 10.445
 
stat $1[x=@sbx]
 !-> stat sst5[x=@sbx]
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 strip --> SST5[X=20E:20E(380)@SBX:3,D=1]
 strip moduloing SST5 on X axis:        0      181 dset:   1
 found   SST5     M: 10 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 doing moduloing SST5 on X axis:        1      180 dset:   1
 doing --> SST5[X=20E:20E(380)@SBX:3,D=1]
 
             SST+5
             box smoothed by 3 pts on X
             LONGITUDE: 20E to 20E(380) (box smoothed by 3 pts)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 16200 (180*90*1*1*1*1)
 # flagged as bad  data: 7173
 Minimum value: 3.6146
 Maximum value: 35.382
 Mean    value: 21.633 (unweighted average)
 Standard deviation: 10.112
CONFUSE
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M: 14 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1[x=@sbx]
 !-> stat sst5[x=@sbx]
 -DELETE I        M: 14 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 found   SST5     M: 13 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 
             SST+5
             box smoothed by 3 pts on X
             LONGITUDE: 20E to 20E(380) (box smoothed by 3 pts)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 16200 (180*90*1*1*1*1)
 # flagged as bad  data: 7173
 Minimum value: 3.6146
 Maximum value: 35.382
 Mean    value: 21.633 (unweighted average)
 Standard deviation: 10.112
 
let $1sbx = $1[x=@sbx]
 !-> DEFINE VARIABLE sst5sbx = sst5[x=@sbx]
stat $1sbx
 !-> stat sst5sbx
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid SST5SBX  C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 eval    SST5SBX  C:  6 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 found   SST5     M: 13 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 
             SST5[X=@SBX]
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 16200 (180*90*1*1*1*1)
 # flagged as bad  data: 7173
 Minimum value: 3.6146
 Maximum value: 35.382
 Mean    value: 21.633 (unweighted average)
 Standard deviation: 10.112
CONFUSE
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      5  J: -999 -999  K: -999 -999  L:      1      1
 pseudo  I        M: 15 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
stat $1sbx
 !-> stat sst5sbx
 -DELETE I        M: 15 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 found   SST5SBX  M: 14 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 
             SST5[X=@SBX]
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 16200 (180*90*1*1*1*1)
 # flagged as bad  data: 7173
 Minimum value: 3.6146
 Maximum value: 35.382
 Mean    value: 21.633 (unweighted average)
 Standard deviation: 10.112
 
 
 
GO bn_cache_hits_gcfcn.sub
! bn_cache_hits_gcfcn.sub
! 7/01 *sh*
 
! test cache hits on grid-changing functions
 
! caching that happens because gcf_impose_axes sets uvlim_hidden
set mode diag
 
let a = i[i=1:10]
say `a,return=isize`     ! no evaluation of a required -- just context
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 dealloc  dynamic grid GXYT            XTROP     YTROP     NORMAL    TIME
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 eval    A        C:  6 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  I        M: 15 dset:   0 I:      1     10  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE I        M: 15 dset:   0 I:      1     10  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE A        M: 16 dset:   0 I:      1     10  J: -999 -999  K: -999 -999  L:   -999   -999
 !-> MESSAGE/CONTINUE 10
10
list/nohead a            ! evaluate it now
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 eval    A        C:  6 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  I        M: 16 dset:   0 I:      1     10  J: -999 -999  K: -999 -999  L:   -999   -999
 1    /  1:   1.00
 2    /  2:   2.00
 3    /  3:   3.00
 4    /  4:   4.00
 5    /  5:   5.00
 6    /  6:   6.00
 7    /  7:   7.00
 8    /  8:   8.00
 9    /  9:   9.00
 10   / 10:  10.00
 
let a = XSEQUENCE(j[j=1:5])
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE A        M: 15 dset:   0 I:      1     10  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE I        M: 16 dset:   0 I:      1     10  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE SST5SBX  M: 14 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 -DELETE SST5XAVE M:  9 dset:   1 I:   -999   -999  J:    1   90  K: -999 -999  L:      1      1
 -DELETE SST5XYT  M:  8 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 -DELETE SST5     M:  3 dset:   1 I:      1    151  J:    1   41  K: -999 -999  L:      1      1
 -DELETE SST5     M:  5 dset:   1 I:     55    131  J:   35   56  K: -999 -999  L:      1      1
 -DELETE SST5     M: 10 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
 -DELETE SST5     M: 11 dset:   1 I:      0    181  J:    1   90  K: -999 -999  L:      1      1
 -DELETE SST5     M: 12 dset:   1 I:   -999   -999  J:    1   90  K: -999 -999  L:      1      1
 -DELETE SST5     M: 13 dset:   1 I:      1    180  J:    1   90  K: -999 -999  L:      1      1
say `a,return=isize`     ! evaluate it now
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C01,V11 C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C11,V11 C: 11 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 (C11,V11 C: 11 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 eval    A        C:  6 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C01,V11 C:  8 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C11,V11 C: 10 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  J        M: 13 dset:   0 I:   -999   -999  J:    1    5  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid YABSTRACT       NORMAL    ABSTRACT  NORMAL    NORMAL
 -DELETE (C11,V11 M: 12 dset:   0 I:   -999   -999  J:    1    5  K: -999 -999  L:   -999   -999
 -DELETE J        M: 13 dset:   0 I:   -999   -999  J:    1    5  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE A        M: 10 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE (C01,V11 M: 11 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 !-> MESSAGE/CONTINUE 5
5
list/nohead a            ! cache hit
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C01,V11 C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C11,V11 C: 11 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 (C11,V11 C: 11 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 eval    A        C:  6 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C01,V11 C:  8 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C11,V11 C: 10 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  J        M: 11 dset:   0 I:   -999   -999  J:    1    5  K: -999 -999  L:   -999   -999
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
 
let a = SAMPLEI(I[i=1:100], {8,5,3})
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE (C11,V11 M: 10 dset:   0 I:   -999   -999  J:    1    5  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid YABSTRACT       NORMAL    ABSTRACT  NORMAL    NORMAL
 -DELETE J        M: 11 dset:   0 I:   -999   -999  J:    1    5  K: -999 -999  L:   -999   -999
 -DELETE (C01,V11 M: 13 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE A        M: 12 dset:   0 I:      1      5  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
say `a,return=isize`     ! evaluate it now
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C01,V11 C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C09,V11 C: 12 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 (C09,V11 C: 12 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 eval    A        C:  6 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C01,V11 C:  8 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 const_v {8,5,3}  M: 12 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 doing sampling tpry on I axis:        1        3 dset:   0
 eval    (C09,V11 C: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  I        M: 10 dset:   0 I:      1    100  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE J        M: 11 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:      3      3  M: -999 -999  N: -999 -999
 -DELETE (C01,V11 M: 13 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE tpry     M:  3 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE {8,5,3}  M: 12 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE (C09,V11 M:  5 dset:   0 I:      1    100  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE I        M: 10 dset:   0 I:      1    100  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE A        M: 12 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE (C01,V11 M: 13 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 !-> MESSAGE/CONTINUE 3
3
list/nohead a            ! cache hit
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C01,V11 C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C09,V11 C: 12 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 (C09,V11 C: 12 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 eval    A        C:  6 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C01,V11 C:  8 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 const_v {8,5,3}  M: 13 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 doing sampling tpry on I axis:        1        3 dset:   0
 eval    (C09,V11 C: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  I        M:  5 dset:   0 I:      1    100  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE I        M: 10 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:      3      3  M: -999 -999  N: -999 -999
 -DELETE A        M: 12 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE tpry     M: 11 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE {8,5,3}  M: 13 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 1   / 1:  8.000
 2   / 2:  5.000
 3   / 3:  3.000
 
spawn rm -f foo.bar*
spawn touch foo.bar1 foo.bar2 foo.bar3
let a = SPAWN("ls foo.bar*")
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE (C09,V11 M:  3 dset:   0 I:      1    100  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE (C01,V11 M: 12 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE A        M: 13 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE I        M:  5 dset:   0 I:      1    100  J: -999 -999  K: -999 -999  L:   -999   -999
say `a,return=isize`     ! evaluate it now
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 eval    A        C:  6 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 string str      M:  5 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE A        M: 12 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE tpry     M: 13 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 !-> MESSAGE/CONTINUE 3
3
list/nohead a            ! cache hit
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 eval    A        C:  6 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 string str      M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 1   / 1:"foo.bar1"
 2   / 2:"foo.bar2"
 3   / 3:"foo.bar3"
 
! RESHAPE, alone, is set to require matched limits in order to make a cache hit
let a = RESHAPE(I[I=1:3]+10*j[j=1:3], I[i=1:9])
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE A        M:  3 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE tpry     M: 12 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
say `a,return=isize`
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C01,V11 C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C31,V11 C: 11 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 (C31,V11 C: 11 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C09,V11 C: 12 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 (C09,V11 C: 12 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          ABSTRACT  ABSTRACT  NORMAL    NORMAL
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 eval    A        C:  6 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C01,V11 C:  8 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C09,V11 C: 10 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  I        M: 12 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 constan cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  J        M: 11 dset:   0 I:   -999   -999  J:    1    3  K: -999 -999  L:   -999   -999
 -DELETE J        M: 11 dset:   0 I:   -999   -999  J:    1    3  K: -999 -999  L:   -999   -999
 -DELETE cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE tpry     M: 10 dset:   0 I:   -999   -999  J:    1    3  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE I        M: 12 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C31,V11 C: 11 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  I        M: 12 dset:   0 I:      1      9  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          ABSTRACT  ABSTRACT  NORMAL    NORMAL
 -DELETE (C09,V11 M:  3 dset:   0 I:      1      3  J:    1    3  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE A        M:  8 dset:   0 I:      1      9  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE (C31,V11 M: 10 dset:   0 I:      1      9  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE (C01,V11 M: 11 dset:   0 I:      1      9  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE I        M: 12 dset:   0 I:      1      9  J: -999 -999  K: -999 -999  L:   -999   -999
 !-> MESSAGE/CONTINUE 9
9
list/nohead a            ! no cache hit
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C01,V11 C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C31,V11 C: 11 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 (C31,V11 C: 11 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid (C09,V11 C: 12 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 pass #2 (C09,V11 C: 12 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          ABSTRACT  ABSTRACT  NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 eval    A        C:  6 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C01,V11 C:  8 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C09,V11 C: 10 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  I        M: 12 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 constan cnst     M: 11 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  J        M: 10 dset:   0 I:   -999   -999  J:    1    3  K: -999 -999  L:   -999   -999
 -DELETE J        M: 10 dset:   0 I:   -999   -999  J:    1    3  K: -999 -999  L:   -999   -999
 -DELETE cnst     M: 11 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE tpry     M:  8 dset:   0 I:   -999   -999  J:    1    3  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE I        M: 12 dset:   0 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    (C31,V11 C: 11 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  I        M: 12 dset:   0 I:      1      9  J: -999 -999  K: -999 -999  L:   -999   -999
 1   / 1:  11.00
 2   / 2:  12.00
 3   / 3:  13.00
 4   / 4:  21.00
 5   / 5:  22.00
 6   / 6:  23.00
 7   / 7:  31.00
 8   / 8:  32.00
 9   / 9:  33.00
 
set mode/last diag
 
! v5.4 *kob* 10/01 - need to add exit/script - new exit command qualifiers
EXIT/SCRIPT
*** Running ferret script: bn_regrid_to_user.jnl
! bn_regrid_to_user
! 8/99 *sh*
! 5/01 *sh* - changes to accomodate truncated levitus_climatology.cdf
!           - additions to test use of expressions in SET/SHOW/DEFINE grid
 
! test various regridding combos that involve user-defined variables
! for the target grids
 
use coads_climatology
use levitus_climatology
 
! define test objects
let a = sst[d=coads_climatology] + 1
let b = sst + 1		! data set unspecified
DEFINE AXIS/Y=20s:20n:.5/units=degrees yax
DEFINE GRID/like=sst[d=coads_climatology]/y=yax gg
 
! reference data
list/x=158e:161e/y=6s:4s temp[d=2,k=1]
             VARIABLE : TEMPERATURE (DEG C)
             FILENAME : levitus_climatology.cdf
             SUBSET   : 3 by 2 points (LONGITUDE-LATITUDE)
             DEPTH (m): 0
             158.5E 159.5E 160.5E 
             139    140    141
 4.5S / 86:  29.51  29.44  29.38
 5.5S / 85:  29.59  29.53  29.46
 
! basic regrid (implicit grid -- sst and temp geometries are mismatched)
list/x=160e/y=5s temp[d=2,k=1,g=a[d=1]]
             VARIABLE : TEMPERATURE (DEG C)
                        regrid: 2 deg on X, 2 deg on Y
             FILENAME : levitus_climatology.cdf
             LONGITUDE: 159E
             LATITUDE : 5S
             DEPTH (m): 0
          29.52
show grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 ZAXLEVITR1_1 DEPTH (m)         1 r-  0                    0                   1 pt
 normal    T
 
! per axis regrid
! 5/01 note: changed from y=0 yo y=5s to accomodate Y-truncated
! levitus_climatology.cdf
list/x=160e/y=5s temp[d=2,k=1,gx=a[d=1],gy=yax]
             VARIABLE : TEMPERATURE (DEG C)
                        regrid: 2 deg on X, 0.5 deg on Y
             FILENAME : levitus_climatology.cdf
             LONGITUDE: 159E
             LATITUDE : 5S
             DEPTH (m): 0
          29.52
list/x=160e/y=5s temp[d=2,k=1,gy=yax,gx=a[d=1]]
             VARIABLE : TEMPERATURE (DEG C)
                        regrid: 2 deg on X, 0.5 deg on Y
             FILENAME : levitus_climatology.cdf
             LONGITUDE: 159E
             LATITUDE : 5S
             DEPTH (m): 0
          29.52
show grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 YAX       LATITUDE            81 r   20S                  20N                 full
 ZAXLEVITR1_1 DEPTH (m)         1 r-  0                    0                   1 pt
 normal    T
 
! combined full grid and per-axis
list/x=160e/y=5s temp[d=2,k=1,g=gg,gx=a[d=1]]
             VARIABLE : TEMPERATURE (DEG C)
                        regrid: 2 deg on X, 0.5 deg on Y
             FILENAME : levitus_climatology.cdf
             LONGITUDE: 159E
             LATITUDE : 5S
             DEPTH (m): 0
          29.52
list/x=160e/y=5s temp[d=2,k=1,gx=a[d=1],g=gg]
             VARIABLE : TEMPERATURE (DEG C)
                        regrid: 2 deg on X, 0.5 deg on Y
             FILENAME : levitus_climatology.cdf
             LONGITUDE: 159E
             LATITUDE : 5S
             DEPTH (m): 0
          29.52
show grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 YAX       LATITUDE            81 r   20S                  20N                 full
 ZAXLEVITR1_1 DEPTH (m)         1 r-  0                    0                   1 pt
 normal    T
 
! pseudo-variable access
list/i=1:4 i[g=a]		! a is previously loaded
             VARIABLE : I
                        axis COADSX
             SUBSET   : 4 points (LONGITUDE)
 21E   / 1:  1.000
 23E   / 2:  2.000
 25E   / 3:  3.000
 27E   / 4:  4.000
let c = a
list/i=1:4 i[g=c]		! c is not previously loaded
             VARIABLE : I
                        axis COADSX
             SUBSET   : 4 points (LONGITUDE)
 21E   / 1:  1.000
 23E   / 2:  2.000
 25E   / 3:  3.000
 27E   / 4:  4.000
let d = c
list/i=1:4 x[gx=d]
             VARIABLE : X
                        axis COADSX
             SUBSET   : 4 points (LONGITUDE)
 21E   / 1:  21.00
 23E   / 2:  23.00
 25E   / 3:  25.00
 27E   / 4:  27.00
 
! DEFINE GRID based on a user-defined variable
let e = d
DEFINE GRID/LIKE=e/x=temp[d=levitus_climatology] gg1
show grid gg1
    GRID GG1
 name       axis              # pts   start                end
 XAXLEVITR1_160 LONGITUDE     160mr   20.5E                179.5E
 COADSY    LATITUDE            90 r   89S                  89N
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58
let f = sst[y=20s:20n:.1,d=coads_climatology]
DEFINE GRID/LIKE=f/x=temp[d=levitus_climatology] gg2
cancel variable f
show grid gg2
    GRID GG2
 name       axis              # pts   start                end
 XAXLEVITR1_160 LONGITUDE     160mr   20.5E                179.5E
 (AX###)   LATITUDE           401 r   20S                  20N
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58
show grid/dynamic
Dynamic grids:
    no implicit grids
Dynamic axes:
    AXIS (AX###)                         use count:   1
 
! demonstrate proper management of dynamic axes
DEFINE GRID/LIKE=gg2 gg3
show grid/dynamic
Dynamic grids:
    no implicit grids
Dynamic axes:
    AXIS (AX###)                         use count:   2
DEFINE GRID/like=temp[d=levitus_climatology] gg2
show grid gg2
    GRID GG2
 name       axis              # pts   start                end
 XAXLEVITR1_160 LONGITUDE     160mr   20.5E                179.5E
 YAXLEVITR1_90 LATITUDE        90 r   89.5S                0.5S
 ZAXLEVITR1_1 DEPTH (m)         1 r-  0                    0
 normal    T
show grid/dynamic
Dynamic grids:
    no implicit grids
Dynamic axes:
    AXIS (AX###)                         use count:   1
 
! SET GRID using a user-defined variable
let g = sst[x=0:30:.1,d=coads_climatology]
set grid g
show grid
 Default grid for DEFINE VARIABLE is (G###)
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 (AX###)   LONGITUDE          301 r   0E                   30E                 full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
 
! The SET GRID (default) definition should be protected -- not altered
load/d=coads_climatology sst[y=-10:10:.1,l=1,x=160e]
show grid
 Default grid for DEFINE VARIABLE is (G###)
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            1 pt
 (AX###)   LATITUDE           201 r   10S                  10N                 201 pts
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        1 pt
show grid/dynamic
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 COADSX    LONGITUDE          180mr   21E                  19E(379)
 (AX###)   LATITUDE           201 r   10S                  10N
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58
 
! deliberate errors
set mode ignore
load/x=160e/y=5s temp[d=2,k=1,g=no_exist]	! non-existent target variable
let v2 = temp[d=2,k=1,gx=a[d=1],gy=yax]
load/x=160e/y=5s v2
cancel variable a
load/x=160e/y=5s v2		! non-existent target grid
set mode/last ignore
 
! 12/99
! bug fix: g=abstract now works
! new multiple axis syntax: GXY=gg
define axis/x=1:6:1 x1
define axis/y=1:4:1 y1
define axis/z=1:3:1 z1
define axis/x=1:6:2 x2
define axis/y=1:4:2 y2
define axis/z=1:3:2 z2
let a1 = x[gx=x1]+y[gy=y1]+z[gz=z1]
let a2 = x[gx=x2]+y[gy=y2]+z[gz=z2]
list a1
             VARIABLE : X[GX=X1]+Y[GY=Y1]+Z[GZ=Z1]
             SUBSET   : 6 by 4 by 3 points (X-Y-Z)
             1      2      3      4      5      6    
             1      2      3      4      5      6
 ---- K:1 Z:   1
 1   / 1:   3.00   4.00   5.00   6.00   7.00   8.00
 2   / 2:   4.00   5.00   6.00   7.00   8.00   9.00
 3   / 3:   5.00   6.00   7.00   8.00   9.00  10.00
 4   / 4:   6.00   7.00   8.00   9.00  10.00  11.00
 ---- K:2 Z:   2
 1   / 1:   4.00   5.00   6.00   7.00   8.00   9.00
 2   / 2:   5.00   6.00   7.00   8.00   9.00  10.00
 3   / 3:   6.00   7.00   8.00   9.00  10.00  11.00
 4   / 4:   7.00   8.00   9.00  10.00  11.00  12.00
 ---- K:3 Z:   3
 1   / 1:   5.00   6.00   7.00   8.00   9.00  10.00
 2   / 2:   6.00   7.00   8.00   9.00  10.00  11.00
 3   / 3:   7.00   8.00   9.00  10.00  11.00  12.00
 4   / 4:   8.00   9.00  10.00  11.00  12.00  13.00
list a1[gx=a2]
             VARIABLE : X[GX=X1]+Y[GY=Y1]+Z[GZ=Z1]
                        regrid: 2 delta on X
             SUBSET   : 4 by 4 by 3 points (X-Y-Z)
             1      3      5      7    
             1      2      3      4
 ---- K:1 Z:   1
 1   / 1:   3.00   5.00   7.00   ....
 2   / 2:   4.00   6.00   8.00   ....
 3   / 3:   5.00   7.00   9.00   ....
 4   / 4:   6.00   8.00  10.00   ....
 ---- K:2 Z:   2
 1   / 1:   4.00   6.00   8.00   ....
 2   / 2:   5.00   7.00   9.00   ....
 3   / 3:   6.00   8.00  10.00   ....
 4   / 4:   7.00   9.00  11.00   ....
 ---- K:3 Z:   3
 1   / 1:   5.00   7.00   9.00   ....
 2   / 2:   6.00   8.00  10.00   ....
 3   / 3:   7.00   9.00  11.00   ....
 4   / 4:   8.00  10.00  12.00   ....
list a1[gxy=a2]
             VARIABLE : X[GX=X1]+Y[GY=Y1]+Z[GZ=Z1]
                        regrid: 2 delta on X, 2 delta on Y
             SUBSET   : 4 by 3 by 3 points (X-Y-Z)
             1      3      5      7    
             1      2      3      4
 ---- K:1 Z:   1
 1   / 1:   3.00   5.00   7.00   ....
 3   / 2:   5.00   7.00   9.00   ....
 5   / 3:   ....   ....   ....   ....
 ---- K:2 Z:   2
 1   / 1:   4.00   6.00   8.00   ....
 3   / 2:   6.00   8.00  10.00   ....
 5   / 3:   ....   ....   ....   ....
 ---- K:3 Z:   3
 1   / 1:   5.00   7.00   9.00   ....
 3   / 2:   7.00   9.00  11.00   ....
 5   / 3:   ....   ....   ....   ....
list a1[gzxy=a2]
             VARIABLE : X[GX=X1]+Y[GY=Y1]+Z[GZ=Z1]
                        regrid: 2 delta on X, 2 delta on Y, 2 delta on Z
             SUBSET   : 4 by 3 by 2 points (X-Y-Z)
             1      3      5      7    
             1      2      3      4
 ---- K:1 Z:   1
 1   / 1:   3.00   5.00   7.00   ....
 3   / 2:   5.00   7.00   9.00   ....
 5   / 3:   ....   ....   ....   ....
 ---- K:2 Z:   3
 1   / 1:   5.00   7.00   9.00   ....
 3   / 2:   7.00   9.00  11.00   ....
 5   / 3:   ....   ....   ....   ....
list a1[gxz=a2]
             VARIABLE : X[GX=X1]+Y[GY=Y1]+Z[GZ=Z1]
                        regrid: 2 delta on X, 2 delta on Z
             SUBSET   : 4 by 4 by 2 points (X-Y-Z)
             1      3      5      7    
             1      2      3      4
 ---- K:1 Z:   1
 1   / 1:   3.00   5.00   7.00   ....
 2   / 2:   4.00   6.00   8.00   ....
 3   / 3:   5.00   7.00   9.00   ....
 4   / 4:   6.00   8.00  10.00   ....
 ---- K:2 Z:   3
 1   / 1:   5.00   7.00   9.00   ....
 2   / 2:   6.00   8.00  10.00   ....
 3   / 3:   7.00   9.00  11.00   ....
 4   / 4:   8.00  10.00  12.00   ....
 
! 6/01
! test use of expressions in dynamic grid commands
SHOW GRID temp[d=2,gx=sst[d=1],y=10s:2s:.2]             ! implicit Y axis
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 (AX###)   LATITUDE            41 r   10S                  2S                  41 pts
 ZAXLEVITR1_1 DEPTH (m)         1 r-  0                    0                   full
 normal    T
SHOW GRID "temp[d=2,gx=sst[d=1],y=10s:2s:.2] + 5"
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 (AX###)   LATITUDE            41 r   10S                  2S                  41 pts
 ZAXLEVITR1_1 DEPTH (m)         1 r-  0                    0                   full
 normal    T
SHOW GRID FFTA(sst[d=1,gx=temp[d=2],y=10s:2s:.2,l=1:5]) ! imposed T axis
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXLEVITR1_160 LONGITUDE     160mr   20.5E                179.5E              full
 (AX###)   LATITUDE            41 r   10S                  2S                  41 pts
 normal    Z
 (AX###)   T (CYC/hour)         2 r   3.4224E-04           6.8448E-04          (axis from grid-changing func)
SHOW GRID SORTI(temp[d=2,gx=sst[d=1],y=10s:2s:.2])      ! abstract X axis
    GRID (G###)
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              (axis from grid-changing func)
 (AX###)   LATITUDE            41 r   10S                  2S                  41 pts
 ZAXLEVITR1_1 DEPTH (m)         1 r-  0                    0                   full
 normal    T
SHOW GRID "temp[d=2,gx=sst[d=1],y=10s:2s:.2] + 5",FFTA(sst[d=1,gx=temp[d=2],y=10s:2s:.2,l=1:5]),SORTI(temp[d=2,gx=sst[d=1],y=10s:2s:.2])
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 (AX###)   LATITUDE            41 r   10S                  2S                  41 pts
 ZAXLEVITR1_1 DEPTH (m)         1 r-  0                    0                   full
 normal    T
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXLEVITR1_160 LONGITUDE     160mr   20.5E                179.5E              full
 (AX###)   LATITUDE            41 r   10S                  2S                  41 pts
 normal    Z
 (AX###)   T (CYC/hour)         2 r   3.4224E-04           6.8448E-04          (axis from grid-changing func)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              (axis from grid-changing func)
 (AX###)   LATITUDE            41 r   10S                  2S                  41 pts
 ZAXLEVITR1_1 DEPTH (m)         1 r-  0                    0                   full
 normal    T
 
load/x=160e/y=5s temp[d=2,gx=sst[d=1],y=10s:2s:.2] + 5
SHOW GRID
 Default grid for DEFINE VARIABLE is (G###)
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 (AX###)   LATITUDE            41 r   10S                  2S                  41 pts
 ZAXLEVITR1_1 DEPTH (m)         1 r-  0                    0                   full
 normal    T
SET GRID  FFTA(sst[d=1,gx=temp[d=2],y=10s:2s:.2,l=1:5]) + 5
SHOW GRID
 Default grid for DEFINE VARIABLE is (G###)
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXLEVITR1_160 LONGITUDE     160mr   20.5E                179.5E              full
 (AX###)   LATITUDE            41 r   10S                  2S                  full
 normal    Z
 (AX###)   T (CYC/hour)         2 r   3.4224E-04           6.8448E-04          full
list/j=1:5 j
             VARIABLE : J
                        axis (AX###)
             SUBSET   : 5 points (LATITUDE)
 9.2S   / 5:  5.000
 9.4S   / 4:  4.000
 9.6S   / 3:  3.000
 9.8S   / 2:  2.000
 10S    / 1:  1.000
DEFINE GRID/LIKE="temp[d=2,gx=sst[d=1],y=10s:2s:.2] + 5" mygrid
SHOW GRID MYGRID
    GRID MYGRID
 name       axis              # pts   start                end
 COADSX    LONGITUDE          180mr   21E                  19E(379)
 (AX###)   LATITUDE            41 r   10S                  2S
 ZAXLEVITR1_1 DEPTH (m)         1 r-  0                    0
 normal    T
SHOW GRID/DYNAMIC
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 XAXLEVITR1_160 LONGITUDE     160mr   20.5E                179.5E
 (AX###)   LATITUDE            41 r   10S                  2S
 normal    Z
 (AX###)   T (CYC/hour)         2 r   3.4224E-04           6.8448E-04
 
*** Running ferret script: bn_calendar.jnl
! bn_calendar.jnl
! Version 5.3
! Add definitions of calendar axes as a NetCDF attribute of the time axis
! DEFINE AXIS/CALENDAR
! regridding between different calendar axes
! write and read NetCDF files with the new attribute.
 
define axis/t="1-jan-1988":"1-jan-1990":1/units=days/calendar=360DAY tdays
define grid/t=tdays tgrid
let my_data = sin(l[g=tgrid])
list my_data[t="27-feb-1988":"1-mar-1988"]
             VARIABLE : SIN(L[G=TGRID])
             SUBSET   : 5 points (TIME)
             CALENDAR : 360DAY
 27-FEB-1988 00 / 57:  0.4362
 28-FEB-1988 00 / 58:  0.9929
 29-FEB-1988 00 / 59:  0.6367
 30-FEB-1988 00 / 60: -0.3048
 01-MAR-1988 00 / 61: -0.9661
 
define axis/t="1-jan-1988":"1-jan-1990":1/units=days/calendar=noleap tdays
define grid/t=tdays tgrid
let my_data = sin(l[g=tgrid])
list my_data[t="27-feb-1988":"1-mar-1988"]
             VARIABLE : SIN(L[G=TGRID])
             SUBSET   : 3 points (TIME)
             CALENDAR : NOLEAP
 27-FEB-1988 00 / 58:  0.9929
 28-FEB-1988 00 / 59:  0.6367
 01-MAR-1988 00 / 60: -0.3048
 
 
 
define axis/t="1-jan-1988":"1-jan-1990":1/units=days/calendar=julian tdays
define grid/t=tdays tgrid
let my_data = sin(l[g=tgrid])
list my_data[t="27-feb-1988":"1-mar-1988"]
             VARIABLE : SIN(L[G=TGRID])
             SUBSET   : 4 points (TIME)
             CALENDAR : JULIAN
 27-FEB-1988 00 / 58:  0.9929
 28-FEB-1988 00 / 59:  0.6367
 29-FEB-1988 00 / 60: -0.3048
 01-MAR-1988 00 / 61: -0.9661
 
define axis/t="1-jan-1988":"1-jan-1990":1/units=days/calendar=gregorian tdays
define grid/t=tdays tgrid
let my_data = sin(l[g=tgrid])
list my_data[t="27-feb-1988":"1-mar-1988"]
             VARIABLE : SIN(L[G=TGRID])
             SUBSET   : 4 points (TIME)
 27-FEB-1988 00 / 58:  0.9929
 28-FEB-1988 00 / 59:  0.6367
 29-FEB-1988 00 / 60: -0.3048
 01-MAR-1988 00 / 61: -0.9661
 
 
 
! Regrid between different calendar axes using @lin(default) @asn and @nrst
use gt4d011
 
set region/x=132w/y=2n/k=1
define axis/t="20-aug-1982":"1-jan-1983":7/units=days/calendar=noleap tweeks
define grid/t=tweeks tgrid
let ndata = temp[gt=tgrid]
list/l=15:18 ndata
             VARIABLE : TEMP[GT=TGRID]
             FILENAME : gt4d011.cdf
             SUBSET   : 4 points (TIME)
             CALENDAR : NOLEAP
             LONGITUDE: 132.5W
             LATITUDE : 1.833N
             DEPTH (m): 5
                       132.5W 
                        98
 26-NOV-1982 00 / 15:  32.90
 03-DEC-1982 00 / 16:  32.92
 10-DEC-1982 00 / 17:  32.96
 17-DEC-1982 00 / 18:  32.97
 
define axis/t="20-aug-1982":"1-jan-1983":7/units=days/calendar=360day tweeks
let ndata = temp[gt=tgrid@asn]
list/l=15:18 ndata
             VARIABLE : TEMP[GT=TGRID@ASN]
             FILENAME : gt4d011.cdf
             SUBSET   : 4 points (TIME)
             CALENDAR : 360DAY
             LONGITUDE: 132.5W
             LATITUDE : 1.833N
             DEPTH (m): 5
                       132.5W 
                        98
 28-NOV-1982 00 / 15:  32.95
 05-DEC-1982 00 / 16:  32.90
 12-DEC-1982 00 / 17:  32.89
 19-DEC-1982 00 / 18:  32.91
 
 
define axis/t="20-aug-1982":"1-jan-1983":7/units=days/calendar=julian tweeks
let ndata = temp[gt=tgrid@nrst]
list/t="25-nov-1982":"18-dec-1982" ndata
             VARIABLE : TEMP[GT=TGRID@NRST]
             FILENAME : gt4d011.cdf
             SUBSET   : 4 points (TIME)
             CALENDAR : JULIAN
             LONGITUDE: 132.5W
             LATITUDE : 1.833N
             DEPTH (m): 5
                       132.5W 
                        98
 26-NOV-1982 00 / 15:  32.91
 03-DEC-1982 00 / 16:  32.93
 10-DEC-1982 00 / 17:  32.97
 17-DEC-1982 00 / 18:  32.97
 
 
 
 
! Regrid to a new calendar, write to NetCDF file and read back in.
can data/all
can region
can var/all
 
use gt4d011
 
set region/k=1
define axis/t="20-aug-1982":"1-jan-1983":7/units=days/calendar=noleap tweeks
define grid/t=tweeks tgrid
let ndata = temp[gt=tgrid]
 
save/clobber/file=calsst.cdf/x=140w:130w/y=2s:2n ndata
 
can data/all
can var/all
can region
 
use calsst
sh data
     currently SET data sets:
    1> ./calsst.cdf  (default)
 name     title                             I         J         K         L
 NDATA    TEMP[GT=TGRID]                   1:10      1:13      1:1       1:21
 
sh grid ndata
    GRID GSH1
 name       axis              # pts   start                end                 subset
 PSXT91_100 LONGITUDE          10mr   139.5W               130.5W              full
 PSYT39_51 LATITUDE            13 i   2.167S               1.833N              full
 PSZT1_1   DEPTH (m)            1 r-  5                    5                   full
 TWEEKS    TIME                21 r   20-AUG-1982 00:00    07-JAN-1983 00:00   full
sh axis tweeks
 name       axis              # pts   start                end
 TWEEKS    TIME                21 r   20-AUG-1982 00:00    07-JAN-1983 00:00
T0 = 15-JAN-1901
CALENDAR = NOLEAP
   Axis span (to cell edges) = 147
 
stat/x=135w/y=0 ndata
 
             TEMP[GT=TGRID]
             LONGITUDE: 135.5W
             LATITUDE: 0.167S
             DEPTH (m): 5
             TIME: 16-AUG-1982 12:00 to 10-JAN-1983 12:00 NOLEAP
             E:  N/A
             F:  N/A
             DATA SET: ./calsst.cdf
 
 Total # of data points: 21 (1*1*1*21*1*1)
 # flagged as bad  data: 0
 Minimum value: 26.228
 Maximum value: 32.608
 Mean    value: 30.454 (unweighted average)
 Standard deviation: 2.4414
 
sp rm -f calsst.cdf
 
 
can data/all
can var/all
can region
 
! regrid between weekly, daily, monthly axes.
use gt4d011
set region/x=132w/y=2n/k=1
 
define axis/t="18-aug-1982":"1-jan-1983":1/units=months/calendar=360day tmonths
define grid/t=tmonths tgrid
let ndata = temp[gt=tgrid@nrst]
list/t="25-sep-1982":"18-dec-1982" ndata
             VARIABLE : TEMP[GT=TGRID@NRST]
             FILENAME : gt4d011.cdf
             SUBSET   : 4 points (TIME)
             CALENDAR : 360DAY
             LONGITUDE: 132.5W
             LATITUDE : 1.833N
             DEPTH (m): 5
                   132.5W 
                    98
 18-SEP-1982 / 2:  27.27
 18-OCT-1982 / 3:  31.32
 18-NOV-1982 / 4:  32.90
 18-DEC-1982 / 5:  32.97
 
 
define axis/t="20-aug-1982":"1-jan-1983":1/units=days/calendar=noleap tdays
define grid/t=tdays tgrid
let ndata = temp[gt=tgrid]
list/t="5-dec-1982":"8-dec-1982" ndata
             VARIABLE : TEMP[GT=TGRID]
             FILENAME : gt4d011.cdf
             SUBSET   : 4 points (TIME)
             CALENDAR : NOLEAP
             LONGITUDE: 132.5W
             LATITUDE : 1.833N
             DEPTH (m): 5
                        132.5W 
                         98
 05-DEC-1982 00 / 108:  32.93
 06-DEC-1982 00 / 109:  32.93
 07-DEC-1982 00 / 110:  32.94
 08-DEC-1982 00 / 111:  32.95
 
 
 
! Regrid to a modulo calendar axis.
 
can data/all
can var/all
can region
 
use coads_climatology
set region/x=180/y=0
 
define axis/t="1-jan-0000":"1-dec-0000":1/units=months/calendar=julian/modulo jmonths
define grid/t=jmonths jgrid
let jsst = sst[gt=jgrid]
let nsst = sst[gt=jgrid@nrst]
 
list/l=1:4 sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 4 points (TIME)
             LONGITUDE: 179E
             LATITUDE : 1S
                   179E   
                    80
 16-JAN      / 1:  28.20
 15-FEB      / 2:  28.36
 17-MAR      / 3:  28.35
 16-AUG      / 4:   ....
list/l=1:4 jsst, nsst
             DATA SET: ./data/coads_climatology.cdf
             TIME: 01-JAN 00:00 to 16-APR 12:45 JULIAN
             LONGITUDE: 179E
             LATITUDE: 1S
 Column  1: JSST is SST[GT=JGRID]
 Column  2: NSST is SST[GT=JGRID@NRST]
                  JSST   NSST
01-JAN      / 1:   ....  28.20
31-JAN      / 2:  28.28  28.20
01-MAR      / 3:  28.36  28.36
01-APR      / 4:   ....  28.35
 
! test negative time step formatting -- added 7/01 *sh*
! this is not specifically a calendar test, but it is a change in V5.3x
define axis/units=days/t/t0=1-jan-1980 tax_neg = {-3,-2,-1}
show axis/l tax_neg
 name       axis              # pts   start                end
 TAX_NEG   TIME                 3 r   29-DEC-1979 00:00    31-DEC-1979 00:00
T0 = 1-JAN-1980
   Axis span (to cell edges) = 3
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  29-DEC-1979 00:00:00      1          28-DEC-1979 12:00:00        -3
       2>  30-DEC-1979 00:00:00      1          29-DEC-1979 12:00:00        -2
       3>  31-DEC-1979 00:00:00      1          30-DEC-1979 12:00:00        -1
 
! also see bn_all_leap.jnl, 6/2004
! Added ALL_LEAP, or 366_DAY calendar (which is in the CF conventions).
*** Running ferret script: bn_dash_dot.jnl
! new PLOT/DASH and PLOT/SYMBOL=DOT  qualifiers
! *acm* 5/01
! *acm* 8/02 Remove calls to SYMBOL=DOT until postscript issues are resolved.
 
plot/dash/i=1:1000 sin(62.8*i)
plot/over/dash=(0.4,0.1,0.4,0.1)/color=red/thick/i=1:1000 sin(62.8*(i+10) )
plot/over/dash=(0.1,0.1,0.04,0.05)/color=blue/thick=1/i=1:1000 sin(62.8*(i+20) )
 
!plot/symbol=dot/i=1:1000 sin(62.8*i)
!plot/symbol=dot/color=red/over/i=1:1000 sin(62.8*(i+20))
 
! test warnings
!plot/symbol=dot/thick/over/i=1:1000 sin(62.8*(i+10) )
!plot/symbol=dot/size=0.5/over/i=1:1000 sin(62.8*(i+10) )
 
! intentional errors
set mode ignore
plot/dash=(1., 2.)/color=red/thick/i=1:1000 sin(62.8*(i+10) )
plot/dash=(-1., 2., 3., 4.)/i=1:1000 sin(62.8*(i+20) )
*** Running ferret script: bn_flowlines.jnl
! bn_flowlines.jnl
! VECTOR/FLOW
! 6/2001
! ACM 4/2005 set mode meta to save one of the plots for the metafile checks.
!            and cancel mode logo, so that .plt files are comparable.
! ACM 4/2006 new qualifier /LENGTH sets the length of the arrow heads
!  2/18 *acm* keep mode logo turned off
 
set window/asp=1/siz=0.5
use gtbc011
set reg/k=1/l=1/y=0:20
vector/aspect u,v
vector/flow/over  u,v
 
! /LEN= for setting size of arrow heads
vector/aspect u,v
vector/flow/over/len=10  u,v
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
set mode meta flowlines.plt
 
can region
vector/i=1:50/j=1:50/length=50/aspect/nolabel sin(i/20)*10+j-20,-1*cos(j/10)*10+i-20
flow/i=1:50/j=1:50/over/color=blue/thick/den=1 sin(i/20)*10+j-20,-1*cos(j/10)*10+i-20
flow/i=1:50/j=1:50/over/color=green/den=4/len=20 sin(i/20)*10+j-20,-1*cos(j/10)*10+i-20
 
can mode meta
! curvilinear flowline plots
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
use coads_climatology
go mp_sinusoidal
set grid sst
 
 
let fsst = missing(sst,5)
let yy =  if abs(y[gt=sst]) le 20 then 10 else  (100-abs(y[gt=sst]+1))/ 10.
 
set reg/l=1
vec/noax/xskip=16/yskip=8/len=15/title="Sinusoidal Projection" fsst*0,fsst*0+yy*mp_mask, x_page,y_page
vec/over/flow/noax/xskip=16/yskip=8/len=5/title="Sinusoidal Projection" fsst*0,fsst*0+yy*mp_mask, x_page,y_page
*** Running ferret script: bn_logaxes.jnl
!  Test the qualifiers /HLOG and /VLOG for setting
!  log axes.  On a depth axis, inverse log plot.
 
! use /VLOG
def axis/z zlog=exp(k[k=1:10])
let fcn = k[gz=zlog]
set view lower
plot/vlog/vlimits=1:100000 fcn
! The same plot, calling axtype using old syntax
set view upper
plot/vlimits=0:5/set fcn
ppl axtype,1,3
ppl plot
 
! use /HLOG, and then /VLOG/HLOG both
def axis/x dlog = exp(-1*(10-i[i=1:10]))
let fcn = (i[gx=dlog])^2
set view upper
plot/vlog fcn
set view lower
plot/vlog/hlog fcn
can view
 
! transpose axes for /HLOG on depth axis
def axis/z/depth dlog=exp(k[k=1:10])
let fcnd = k[gz=dlog]
plot/trans/hlog fcnd
 
! add test for /VLOG on depth axis
! (prev to v6.3+ the right-hand axis had incorrect tic marks)
def axis/z/depth dlog=exp(k[k=1:10])
let fcnd = k[gz=dlog]
plot/vlog fcnd
 
! intentional error
! This wont work - no log of negative values on axis
 
set mode ignore
def axis/x dlog = -1*(10-i[i=1:10])
let fcn = (i[gx=dlog])^2
plot/hlog fcn
*** Running ferret script: bn_internal_external_functions.jnl
! test internal external functions.  These moved from bn_external_functions
!  6/01 because on systems w/out external functions support, the internal
!  functions were not being tested - most notably win32   *kob*
 
!  8/02/01 *acm* add bench_eof; now internally-linked.
! 10/22/01 *acm* add bench_compress_by (compressi_by, compressj_by, ...)
! 06/02 *kob* add bench_internal_string_functions (strlen, strcat, strindex, etc)
! 05/05 *acm* move bench_compress here; internally linked.
! 05/07 *acm* move tax_* functions and fill_xy here; internally linked.
!  3/12 *acm* new script bn_scat2grid tests scat2grid functions in all directions
!  4/12 *kms* new scripts bn_scat2grid_gl, bn_scat2gridlaplace_tarasoff,
!             bn_scat2grid_nobs, bn_scat2grid_t, bn_transpose, bn_unique_str2int
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go bench_fft
! Benchmark Ferret script for FFT.  Uses analytic function of time.
 
! 5/99  ACM
!   FFTA function computes the FFT amplitude spectrum.
!   FFTP function computes the FFT phase
!
!  The script bench_fft_visual.jnl plots the results
 
SET MODE IGNORE_ERRORS
SAY The message *** NOTE: unknown axis units: FREQ  is informational.  fcn still works.
The message *** NOTE: unknown axis units: FREQ  is informational.  fcn still works.
 
! Note, previously the time axis was defined as follows. When the
! function is defined in terms of the time coordinate data, tpts,
! tpts is  single-precision and so its use has precision problems.
! (Saw this when changing to double-precision Ferret)
 
DEFINE AXIS/t=1-Jan-1990:31-Dec-1990:24 dayt
 
 
 
DEFINE AXIS/t=1-Jan-1990:31-Dec-1990:24/t0=1-jan-1980 dayt
 
 
DEFINE GRID/T=dayt  tgrid
SH GRID tgrid
    GRID TGRID
 name       axis              # pts   start                end
 normal    X
 normal    Y
 normal    Z
 DAYT      TIME               365 r   01-JAN-1990 00:00    31-DEC-1990 00:00
SET GRID tgrid
 
LET fcn1 = sin(kt*tpts - phase) /2.
LET fcn2 = cos(pt*tpts)
LET phase = 6.
LET kt = 0.5
LET pt = 0.3
 
!  Use an analytic function.
 
LET sample_function = fcn1 - fcn2
LET tpts = t
LET days_fft = ffta(sample_function[l=1:365])
 
LIST/L=30:35 days_fft
             VARIABLE : FFTA(SAMPLE_FUNCTION[L=1:365])
             SUBSET   : 6 points (T (CYC/HOURS))
 0.00343 / 30:  0.0137
 0.00355 / 31:  0.0212
 0.00366 / 32:  0.0482
 0.00378 / 33:  0.4990
 0.00389 / 34:  0.0524
 0.00401 / 35:  0.0325
LIST/L=50:55 days_fft
             VARIABLE : FFTA(SAMPLE_FUNCTION[L=1:365])
             SUBSET   : 6 points (T (CYC/HOURS))
 0.00572 / 50:  0.0728
 0.00584 / 51:  0.1041
 0.00595 / 52:  0.1854
 0.00607 / 53:  0.8945
 0.00618 / 54:  0.3111
 0.0063  / 55:  0.1317
 
!  Compute the phase spectrum
 
LET days_fftp = fftp(sample_function[l=1:365])
 
LIST/l=1:20 days_fftp
             VARIABLE : FFTP(SAMPLE_FUNCTION[L=1:365])
             SUBSET   : 20 points (T (CYC/HOURS))
 0.00011 /  1: -178.1
 0.00023 /  2: -176.1
 0.00034 /  3: -174.2
 0.00046 /  4: -172.2
 0.00057 /  5: -170.2
 0.00069 /  6: -168.3
 0.0008  /  7: -166.2
 0.00092 /  8: -164.2
 0.00103 /  9: -162.2
 0.00114 / 10: -160.1
 0.00126 / 11: -158.0
 0.00137 / 12: -155.8
 0.00149 / 13: -153.6
 0.0016  / 14: -151.3
 0.00172 / 15: -149.0
 0.00183 / 16: -146.5
 0.00195 / 17: -144.0
 0.00206 / 18: -141.3
 0.00217 / 19: -138.4
 0.00229 / 20: -135.3
 
 
!PAUSE
 
 
USE coads_vwnd.cdf
SET REGION/I=90/J=65
 
SAY This should bail out with error msg about Time axis must be regular
This should bail out with error msg about Time axis must be regular
 
LET vw_fft = ffta(vwnd[l=37:60])
LIST vw_fft
 
DEFINE AXIS/T=16-Jan-1949:16-Dec-1950:730.5@ave montht
DEFINE GRID/T=montht  tgrid
LET vw_tim = vwnd[gt=tgrid]
LET vw_fft = ffta(vw_tim[l=2:23])
 
SAY This one is ok
This one is ok
LIST vw_fft
             VARIABLE : FFTA(VW_TIM[L=2:23])
             FILENAME : coads_vwnd.cdf
             SUBSET   : 11 points (T (CYC/HOURS))
             LONGITUDE: 161W
             LATITUDE : 39N
                 161W   
                  90
 0.000062 /  1:  1.996
 0.000124 /  2:  2.168
 0.000187 /  3:  0.174
 0.000249 /  4:  2.015
 0.000311 /  5:  0.354
 0.000373 /  6:  1.725
 0.000436 /  7:  1.253
 0.000498 /  8:  0.304
 0.00056  /  9:  1.651
 0.000622 / 10:  0.814
 0.000684 / 11:  0.154
 
CANCEL MODE IGNORE_ERRORS
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go bench_gridding
! bench_gridding.jnl
! *acm* 8/99
 
! Call scat2gridlaplace_xy  and scat2gridgauss_xy
! to put scattered data onto a regularly spaced grid.
 
! function definition from objective_analysis_demo.jnl
 
! 2/2005 changed number of arguments to the Gaussing gridding functions
 
 
define axis/x=0:10:0.05 x10
define axis/y=0:10:0.05 y10
define grid/x=x10/y=y10 g10x10
set grid g10x10
 
let WAVE = SIN(KX*XPTS + KY*YPTS - PHASE) / 3
let PHASE = 0
let KAPPA = 0.4
let KX = 0.4
let KY = 0.7
let FCN1 = SIN(R)/(R+1)
let R = ((XPTS-X0)^2+ 5*(YPTS-Y0)^2)^0.5
let X0 = 3
let Y0 = 8
 
LET sample_function = fcn1 + wave
 
let xpts = x; let ypts = y
 
list/x=4:5/y=1 sample_function
             VARIABLE : FCN1 + WAVE
             SUBSET   : 21 points (X)
             Y        : 1
                1      
                 21
 4     /  81:  0.2500
 4.05  /  82:  0.2453
 4.1   /  83:  0.2405
 4.15  /  84:  0.2356
 4.2   /  85:  0.2306
 4.25  /  86:  0.2255
 4.3   /  87:  0.2203
 4.35  /  88:  0.2150
 4.4   /  89:  0.2096
 4.45  /  90:  0.2041
 4.5   /  91:  0.1985
 4.55  /  92:  0.1929
 4.6   /  93:  0.1871
 4.65  /  94:  0.1813
 4.7   /  95:  0.1753
 4.75  /  96:  0.1693
 4.8   /  97:  0.1632
 4.85  /  98:  0.1571
 4.9   /  99:  0.1509
 4.95  / 100:  0.1446
 5     / 101:  0.1382
 
can mem /all
 
let xpts = 10*randu(i); let ypts = 10*randu(i+2)
 
set region/i=1:200
define axis/x=1:10:.5 xax5
define axis/y=1:10:.5 yax5
 
let sgrid = scat2gridlaplace_xy (xpts, ypts, sample_function, x[gx=xax5], y[gy=yax5], 5., 5)
! the following in now needed since the result grid axes are no longer extended
! load sgrid
! otherwise the following would use a 3-element X axis and 1-element Y axis
! list/x=4:5/y=1 sgrid
list /order=yx sgrid
             VARIABLE : SCAT2GRIDLAPLACE_XY (XPTS, YPTS, SAMPLE_FUNCTION, X[GX=XAX5], Y[GY=YAX5], 5., 5)
             SUBSET   : 19 by 19 points (Y-X)
      ... listing every   2th point
                1       2       3       4       5       6       7       8       9      10     
                 1       3       5       7       9      11      13      15      17      19
 1     /  1:  0.3090  0.3620  0.1091 -0.0050 -0.1367 -0.4084 -0.2255  0.1517  0.2250  0.0731
 1.5   /  2:  0.3156  0.3712  0.0938 -0.0374 -0.2018 -0.4524 -0.1500  0.2782  0.3309  0.0699
 2     /  3:  0.3788  0.3156  0.0371 -0.0887 -0.2538 -0.4922 -0.0737  0.3748  0.4510  0.0813
 2.5   /  4:  0.4200  0.2522 -0.0636 -0.1441 -0.2527 -0.4666  0.0194  0.4396  0.4914  0.0893
 3     /  5:  0.4064  0.1984 -0.1400 -0.1971 -0.2790 -0.4255  0.1190  0.4330  0.5453  0.0855
 3.5   /  6:  0.3510  0.1698 -0.2016 -0.2575 -0.2838 -0.3580  0.1859  0.5859  0.5308  0.0588
 4     /  7:  0.2771  0.0967 -0.2465 -0.2890 -0.2590 -0.3293  0.3125  0.6416  0.5187  0.0212
 4.5   /  8:  0.1890  0.0447 -0.3126 -0.3192 -0.2135 -0.2225  0.3021  0.6266  0.4121 -0.0085
 5     /  9:  0.1399 -0.0371 -0.3239 -0.3338 -0.1998 -0.1342  0.2656  0.5778  0.3121 -0.0567
 5.5   / 10:  0.0786 -0.0964 -0.3389 -0.3129 -0.1727 -0.0850  0.2067  0.4824  0.2358 -0.0798
 6     / 11:  0.0074 -0.1353 -0.3777 -0.2741 -0.1217 -0.0193  0.1738  0.3540  0.1488 -0.1226
 6.5   / 12: -0.0711 -0.2091 -0.3704 -0.2493 -0.0410  0.0695  0.1485  0.2368  0.0456 -0.1732
 7     / 13: -0.1375 -0.2543 -0.3786 -0.2281  0.0630  0.1830  0.1355  0.1322 -0.0510 -0.2153
 7.5   / 14: -0.2028 -0.2669 -0.3464 -0.2105  0.1684  0.2796  0.1785  0.0640 -0.1152 -0.2282
 8     / 15: -0.2752 -0.2592 -0.3002 -0.1554  0.2333  0.3520  0.2197  0.0339 -0.1357 -0.2189
 8.5   / 16: -0.3268 -0.2733 -0.2452 -0.1138  0.2649  0.4025  0.2533  0.0294 -0.1385 -0.2005
 9     / 17: -0.3516 -0.2668 -0.1649 -0.0321  0.2764  0.4370  0.2817  0.0364 -0.1342 -0.1911
 9.5   / 18: -0.3642 -0.2402 -0.0934  0.0381  0.2761  0.4426  0.2947  0.0497 -0.1409 -0.2174
 10    / 19: -0.3692 -0.2104 -0.0403  0.1031  0.2803  0.4052  0.2986  0.0668 -0.1386 -0.2526
 
let sgrid = scat2gridlaplace_xy (xpts, ypts, sample_function, x[gx=xax5], y[gy=yax5], 1.,1)
! the following in now needed since the result grid axes are no longer extended
! load sgrid
! otherwise the following would use a 3-element X axis and 1-element Y axis
! list/x=4:5/y=1 sgrid
list /order=yx sgrid
             VARIABLE : SCAT2GRIDLAPLACE_XY (XPTS, YPTS, SAMPLE_FUNCTION, X[GX=XAX5], Y[GY=YAX5], 1.,1)
             SUBSET   : 19 by 19 points (Y-X)
      ... listing every   2th point
                1       2       3       4       5       6       7       8       9      10     
                 1       3       5       7       9      11      13      15      17      19
 1     /  1:  0.2910  0.4242  0.0970  0.0031 -0.1367 -0.4123 -0.2078    ....  0.2411    ....
 1.5   /  2:  0.3149  0.3736  0.1241 -0.0015 -0.2018 -0.4412 -0.1891  0.3310  0.3335  0.0056
 2     /  3:  0.3376  0.3121  0.0461 -0.0118 -0.2672 -0.4864 -0.0737    ....  0.4616    ....
 2.5   /  4:  0.3597  0.2424 -0.0661    .... -0.2439 -0.4573 -0.0311  0.4179  0.4740  0.2009
 3     /  5:    ....  0.1987 -0.1313 -0.2037 -0.2772 -0.3885  0.0658  0.4342  0.5394    ....
 3.5   /  6:  0.3103  0.1700 -0.2163 -0.2494 -0.2825 -0.3365  0.1567  0.5374  0.5054  0.1424
 4     /  7:  0.2748  0.0919 -0.2743 -0.2395 -0.2622 -0.3340  0.3125  0.5804  0.5206  0.0936
 4.5   /  8:  0.1840  0.0417 -0.3050    .... -0.2106 -0.1960  0.3262  0.5764  0.3663  0.0591
 5     /  9:  0.1468 -0.0445 -0.3533 -0.3755 -0.1909 -0.1066  0.2847  0.5219  0.2784 -0.0351
 5.5   / 10:  0.0416 -0.1097 -0.3354 -0.3255    .... -0.0886  0.2220  0.4386  0.2358  0.0412
 6     / 11: -0.0123 -0.1744 -0.3711 -0.2634    ....    ....  0.1726  0.3463  0.2191    ....
 6.5   / 12: -0.0648 -0.1272 -0.3661 -0.2453    ....  0.1044  0.1657  0.2429  0.0951    ....
 7     / 13: -0.1386    .... -0.3798 -0.2300    ....  0.1819  0.1359  0.1643 -0.0260 -0.2047
 7.5   / 14: -0.2039 -0.2891 -0.3460 -0.2099  0.1695  0.2722  0.1846  0.1033 -0.1142    ....
 8     / 15: -0.2859 -0.2587 -0.3005 -0.1705  0.2410  0.3522  0.2294  0.0662 -0.1360    ....
 8.5   / 16: -0.3294 -0.2792 -0.2367 -0.1257  0.2924  0.3890  0.2566    .... -0.1397 -0.1839
 9     / 17: -0.3416 -0.2686 -0.1775 -0.0643  0.2774  0.4317  0.2882  0.0231 -0.1392 -0.1953
 9.5   / 18: -0.3439 -0.2257 -0.0936  0.0132  0.2534  0.4424  0.2947  0.0341 -0.1376 -0.2118
 10    / 19:    .... -0.2042 -0.0215    ....    ....  0.4211  0.2880    .... -0.1447 -0.2037
 
let sgrid = scat2gridgauss_xy (xpts, ypts, sample_function, x[gx=xax5], y[gy=yax5], 0.5, 0.5, 2, 2)
! list/x=4:5/y=1 sgrid
list /order=yx sgrid
             VARIABLE : SCAT2GRIDGAUSS_XY (XPTS, YPTS, SAMPLE_FUNCTION, X[GX=XAX5], Y[GY=YAX5], 0.5, 0.5, 2, 2)
             SUBSET   : 19 by 19 points (Y-X)
      ... listing every   2th point
                1       2       3       4       5       6       7       8       9      10     
                 1       3       5       7       9      11      13      15      17      19
 1     /  1:  0.2749  0.3520  0.1259  0.0005 -0.1307 -0.4094 -0.1965  0.1130  0.2918  0.1284
 1.5   /  2:  0.2992  0.3405  0.1245 -0.0611 -0.2638 -0.4351 -0.1767  0.3484  0.3724  0.1284
 2     /  3:  0.2816  0.3205  0.0263 -0.1104 -0.2957 -0.4349 -0.1907  0.4605  0.4452  0.1919
 2.5   /  4:  0.2905  0.2746 -0.0640 -0.1666 -0.2648 -0.4176 -0.1162  0.5380  0.4422  0.2649
 3     /  5:  0.2915  0.2482 -0.1256 -0.2238 -0.2563 -0.3716  0.2477  0.4975  0.4523  0.2763
 3.5   /  6:  0.2670  0.1771 -0.1706 -0.2310 -0.2748 -0.2812  0.2546  0.5101  0.4228  0.2483
 4     /  7:  0.2254  0.1144 -0.1767 -0.2279 -0.2724 -0.2447  0.2802  0.5449  0.3972  0.2122
 4.5   /  8:  0.1893  0.0812 -0.3329 -0.3434 -0.2308 -0.2443  0.3398  0.5310  0.3351  0.0613
 5     /  9:  0.1270  0.0390 -0.3562 -0.3691 -0.1779 -0.1532  0.2536  0.4990  0.3035  0.0256
 5.5   / 10:  0.0486 -0.1269 -0.3314 -0.2898 -0.1626 -0.0824  0.1922  0.4011  0.3037  0.0556
 6     / 11: -0.0377 -0.1366 -0.3367 -0.2688 -0.1971  0.0163  0.2094  0.2954  0.2639 -0.1357
 6.5   / 12: -0.0649 -0.1349 -0.3594 -0.2202 -0.0116  0.1108  0.1647  0.2593  0.0785 -0.1377
 7     / 13: -0.1040 -0.1406 -0.3630 -0.1669  0.0665  0.1932  0.1495  0.1418 -0.1130 -0.1434
 7.5   / 14: -0.1997 -0.2796 -0.3390 -0.1918  0.1852  0.2622  0.1522  0.0394 -0.1158 -0.1513
 8     / 15: -0.2353 -0.2782 -0.2830 -0.1572  0.2503  0.3331  0.2045  0.0179 -0.1159 -0.1716
 8.5   / 16: -0.3060 -0.2785 -0.2405 -0.1007  0.2517  0.3638  0.2512  0.0804 -0.1305 -0.1878
 9     / 17: -0.3356 -0.2663 -0.2136  0.0135  0.2884  0.4053  0.2726  0.1412 -0.1426 -0.1936
 9.5   / 18: -0.3495 -0.2130 -0.1083  0.0977  0.2055  0.4225  0.2947  0.1163 -0.1434 -0.1956
 10    / 19: -0.3530 -0.1816 -0.0861  0.0788  0.1087  0.4204  0.3216  0.0362 -0.1513 -0.1915
 
let sgrid = scat2gridgauss_xy (xpts, ypts, sample_function, x[gx=xax5], y[gy=yax5], 1., 1., 6, 6)
! list/x=4:5/y=1 sgrid
list /order=yx sgrid
             VARIABLE : SCAT2GRIDGAUSS_XY (XPTS, YPTS, SAMPLE_FUNCTION, X[GX=XAX5], Y[GY=YAX5], 1., 1., 6, 6)
             SUBSET   : 19 by 19 points (Y-X)
      ... listing every   2th point
                1       2       3       4       5       6       7       8       9      10     
                 1       3       5       7       9      11      13      15      17      19
 1     /  1:  0.2816  0.3122  0.1936 -0.0306 -0.2070 -0.3174 -0.2002  0.0358  0.2516  0.2179
 1.5   /  2:  0.2753  0.2962  0.1555 -0.0851 -0.2670 -0.3505 -0.2023  0.1687  0.3415  0.2747
 2     /  3:  0.2672  0.2609  0.0854 -0.1397 -0.2966 -0.3569 -0.1592  0.3022  0.3939  0.3190
 2.5   /  4:  0.2569  0.2037  0.0007 -0.1763 -0.3003 -0.3322 -0.0375  0.3936  0.4164  0.3363
 3     /  5:  0.2423  0.1529 -0.0574 -0.1979 -0.2890 -0.2657  0.1031  0.4302  0.4128  0.3273
 3.5   /  6:  0.2226  0.1218 -0.0907 -0.2163 -0.2714 -0.1845  0.1877  0.4360  0.3916  0.3016
 4     /  7:  0.1994  0.0942 -0.1270 -0.2400 -0.2530 -0.1379  0.2232  0.4316  0.3607  0.2621
 4.5   /  8:  0.1651  0.0529 -0.1834 -0.2671 -0.2320 -0.1172  0.2368  0.4168  0.3254  0.2139
 5     /  9:  0.1032 -0.0135 -0.2340 -0.2830 -0.2080 -0.0934  0.2348  0.3796  0.2999  0.1820
 5.5   / 10:  0.0196 -0.0822 -0.2536 -0.2804 -0.1800 -0.0461  0.2194  0.3280  0.2768  0.1655
 6     / 11: -0.0431 -0.1244 -0.2627 -0.2574 -0.1157  0.0360  0.2005  0.2738  0.2199  0.0887
 6.5   / 12: -0.0802 -0.1596 -0.2824 -0.2163  0.0112  0.1264  0.1816  0.2080  0.1091 -0.0365
 7     / 13: -0.1251 -0.2159 -0.2939 -0.1806  0.0990  0.1915  0.1712  0.1301 -0.0056 -0.1050
 7.5   / 14: -0.1868 -0.2628 -0.2836 -0.1492  0.1507  0.2424  0.1813  0.0735 -0.0662 -0.1291
 8     / 15: -0.2381 -0.2732 -0.2626 -0.1166  0.1919  0.2842  0.2109  0.0592 -0.0902 -0.1440
 8.5   / 16: -0.2747 -0.2696 -0.2391 -0.0872  0.2235  0.3159  0.2427  0.0717 -0.1071 -0.1594
 9     / 17: -0.3000 -0.2595 -0.2118 -0.0599  0.2465  0.3403  0.2670  0.0816 -0.1240 -0.1690
 9.5   / 18: -0.3141 -0.2417 -0.1779 -0.0316  0.2609  0.3583  0.2843  0.0735 -0.1356 -0.1721
 10    / 19: -0.3187 -0.2210 -0.1466 -0.0098  0.2665  0.3698  0.2969  0.0537 -0.1425 -0.1724
 
can mem /all
can var /all
can axis yax5
can axis xax5
set grid abstract
can grid g10x10
can axis y10
can axis x10
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go bn_scat2grid_test
! bn_scat2grid_test.jnl
! From JonCallahan's insitu_gaussian_*.jnl
 
! Description: Test functions for XY XZ XT YZ YT ZT gridding of insitu data
 
set data scat2grid.nc
 
define axis/x=50:70/npoints=20/units=degrees_east x_20
define axis/y=10:20/npoints=20/units=degrees_north y_20
define axis/z=0:100/npoints=20/depth/units=meters z_20
define axis/t=0:8736/unit=hours/t0="01-JAN-1995 00:00:00"/npoints=20 t_20
 
!*********
! SCAT2GRIDGAUSS functions
! XY
 
let xy_gauss_gridded = scat2gridgauss_xy(xax,yax,O2_umol_kg,x[gx=x_20],y[gy=y_20],1.5,1.0,5.0,3.0)
fill/lev=30v xy_gauss_gridded
plot/vs/over/nolab xax,yax
ppl shaset reset
 
! XZ
 
let xz_gauss_gridded = scat2gridgauss_xz(xax,zax,O2_umol_kg,x[gx=x_20],z[gz=z_20],1.5,10,2,20)
fill/lev=30v xz_gauss_gridded
plot/vs/over/nolab xax,zax
ppl shaset reset
 
! XT
 
let xt_gauss_gridded = scat2gridgauss_xt(xax,tax,O2_umol_kg,x[gx=x_20],t[gt=t_20],1.5,720.0,5.0,2160.0)
fill/lev=30v xt_gauss_gridded
plot/vs/over/nolab xax,tax
ppl shaset reset
 
! YZ
 
let yz_gauss_gridded = scat2gridgauss_yz(yax,zax,ysequence(O2_umol_kg),y[gy=y_20],z[gz=z_20],1.0,10,3,50)
fill/lev=30v yz_gauss_gridded
plot/vs/over/nolab yax,zax
ppl shaset reset
 
! YT
 
let yt_gauss_gridded = scat2gridgauss_yt(yax,tax,ysequence(O2_umol_kg),y[gy=y_20],t[gt=t_20],1.0,720,3,2160)
fill/lev=30v yt_gauss_gridded
plot/vs/over/nolab tax,yax
ppl shaset reset
 
! ZT
 
let zt_gauss_gridded = scat2gridgauss_zt(zax,tax,zsequence(O2_umol_kg),z[gz=z_20],t[gt=t_20],10,720,50,2160)
fill/lev=30v zt_gauss_gridded
plot/vs/over/nolab tax, zax
 
can mem/all
 
! SCAT2GRIDLAPLACE functions
 
! XY
 
let xy_laplace_gridded = scat2gridlaplace_xy(xax,yax,O2_umol_kg,x[gx=x_20],y[gy=y_20],2,2)
show grid xy_laplace_gridded
    GRID (G###)
 name       axis              # pts   start                end                 subset
 X_20      LONGITUDE           20mr   50E                  70E                 full
 Y_20      LATITUDE            20 r   10N                  20N                 full
 normal    Z
 normal    T
! when the result grid axes were extended, the axis coordinates in the following were messed up
list xy_laplace_gridded
             VARIABLE : SCAT2GRIDLAPLACE_XY(XAX,YAX,O2_UMOL_KG,X[GX=X_20],Y[GY=Y_20],2,2)
             FILENAME : scat2grid.nc
             SUBSET   : 20 by 20 points (LONGITUDE-LATITUDE)
      ... listing every   2th point
                50E    52.1E  54.2E  56.3E  58.4E  60.5E  62.6E  64.7E  66.8E  68.9E 
                 1      3      5      7      9     11     13     15     17     19
 20N    / 20:   ....   ....   ....   ....  144.0  241.1   ....   ....   ....   ....
 19.47N / 19:   ....   ....   ....   ....  117.8  207.4  172.9   ....   ....   ....
 18.95N / 18:   ....   ....   ....  137.8  107.3   98.0   ....   ....   ....   ....
 18.42N / 17:   ....   ....   ....  161.1  156.1    7.1   16.2   ....   ....   ....
 17.89N / 16:   ....   ....   ....  179.9  189.1   81.7   ....   ....   ....   ....
 17.37N / 15:   ....   ....   ....  165.1  200.7  145.4   ....   ....   ....   ....
 16.84N / 14:   ....   ....   ....  128.3  183.0  168.0  182.6   ....   ....   ....
 16.32N / 13:   ....   ....   76.3   92.4  158.5  190.5  197.4   ....   ....   ....
 15.79N / 12:   ....   ....   ....   80.3   ....  189.8  195.8   ....   ....   ....
 15.26N / 11:   ....   ....   ....   72.2   ....  187.5  191.5   ....   ....   ....
 14.74N / 10:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 14.21N /  9:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 13.68N /  8:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 13.16N /  7:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 12.63N /  6:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 12.11N /  5:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 11.58N /  4:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 11.05N /  3:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 10.53N /  2:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 10N    /  1:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
fill/lev=30v xy_laplace_gridded
plot/vs/over/nolab xax,yax
ppl shaset reset
 
! XZ
 
let xz_laplace_gridded = scat2gridlaplace_xz(xax,zax,O2_umol_kg,x[gx=x_20],z[gz=z_20],2,2)
fill/lev=30v xz_laplace_gridded
plot/vs/over/nolab xax,zax
ppl shaset reset
 
! XT
 
let xt_laplace_gridded = scat2gridlaplace_xt(xax,tax,O2_umol_kg,x[gx=x_20],t[gt=t_20],2,2)
fill/lev=30v xt_laplace_gridded
plot/vs/over/nolab xax,tax
ppl shaset reset
 
! YZ
 
let yz_laplace_gridded = scat2gridlaplace_yz(yax,zax,ysequence(O2_umol_kg),y[gy=y_20],z[gz=z_20],2,2)
fill/lev=30v yz_laplace_gridded
plot/vs/over/nolab yax,zax
ppl shaset reset
 
! YT
 
let yt_laplace_gridded = scat2gridlaplace_yt(yax,tax,ysequence(O2_umol_kg),y[gy=y_20],t[gt=t_20],2,2)
fill/lev=30v yt_laplace_gridded
plot/vs/over/nolab tax,yax
ppl shaset reset
 
! ZT
 
let zt_laplace_gridded = scat2gridlaplace_zt(zax,tax,zsequence(O2_umol_kg),z[gz=z_20],t[gt=t_20],2,2)
fill/lev=30v zt_laplace_gridded
plot/vs/over/nolab tax, zax
 
can mem /all
can var /all
can data /all
can axis t_20
can axis z_20
can axis y_20
can axis x_20
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go bn_scat2grid_gl
! bn_scat2grid_gl.jnl
! test the scat2gridgauss and scat2gridlaplace functions,
! listing the results which can be checked against input
 
define axis/x=173:187/unit=degrees_east/npoints=15 x_15
define axis/y=13:27/unit=degrees_north/npoints=15 y_15
define axis/z=15:85/units=meters/depth/npoints=15 z_15
define axis/t=0:8760/unit=hours/t0="01-JAN-1995 00:00:00"/edges/npoints=16 t_16
 
let sinx = sin(X[gx=x_15] * 3.14159265 / 180.0)
let cosyp70 = cos((Y[gy=y_15] + 70.0) * 3.14159265 / 180.0)
let logzp10 = log(Z[gz=z_15] + 10.0)
let logtp50 = log(T[gt=t_16] + 50.0)
 
let smxy = xsequence(sinx + cosyp70)
let smxy_xs_pos = xsequence(1.0 * X[gx=x_15] + 0.0 * Y[gy=y_15])
let smxy_xs = if ( smxy_xs_pos gt 180 ) then (smxy_xs_pos - 360) else smxy_xs_pos
let smxy_ys = xsequence(0.0 * X[gx=x_15] + 1.0 * Y[gy=y_15])
 
let smxz = xsequence(sinx + logzp10)
let smxz_xs_pos = xsequence(1.0 * X[gx=x_15] + 0.0 * Z[gz=z_15])
let smxz_xs = if ( smxz_xs_pos gt 180 ) then (smxz_xs_pos - 360) else smxz_xs_pos
let smxz_zs = xsequence(0.0 * X[gx=x_15] + 1.0 * Z[gz=z_15])
 
let smxt = xsequence(sinx + logtp50)
let smxt_xs_pos = xsequence(1.0 * X[gx=x_15] + 0.0 * T[gt=t_16])
let smxt_xs = if ( smxt_xs_pos gt 180 ) then (smxt_xs_pos - 360) else smxt_xs_pos
let smxt_ts = xsequence(0.0 * X[gx=x_15] + 1.0 * T[gt=t_16])
 
let smyz = ysequence(cosyp70 + logzp10)
let smyz_ys = ysequence(1.0 * Y[gy=y_15] + 0.0 * Z[gz=z_15])
let smyz_zs = ysequence(0.0 * Y[gy=y_15] + 1.0 * Z[gz=z_15])
 
let smyt = ysequence(cosyp70 + logtp50)
let smyt_ys = ysequence(1.0 * Y[gy=y_15] + 0.0 * T[gt=t_16])
let smyt_ts = ysequence(0.0 * Y[gy=y_15] + 1.0 * T[gt=t_16])
 
let smzt = zsequence(logzp10 + logtp50)
let smzt_zs = zsequence(1.0 * Z[gz=z_15] + 0.0 * T[gt=t_16])
let smzt_ts = zsequence(0.0 * Z[gz=z_15] + 1.0 * T[gt=t_16])
 
define axis/x=170:190/unit=degrees_east/npoints=11 x_11
define axis/y=10:30/units=degrees_north/npoints=11 y_11
define axis/z=0:100/depth/units=meters/npoints=11 z_11
define axis/t=0:8760/unit=hours/t0="01-JAN-1995 00:00:00"/edges/npoints=12 t_12
 
list X[gx=x_11]
             VARIABLE : X
                        axis X_11
             SUBSET   : 11 points (LONGITUDE)
 170E   /  1:  170.0
 172E   /  2:  172.0
 174E   /  3:  174.0
 176E   /  4:  176.0
 178E   /  5:  178.0
 180E   /  6:  180.0
 178W   /  7:  182.0
 176W   /  8:  184.0
 174W   /  9:  186.0
 172W   / 10:  188.0
 170W   / 11:  190.0
 
list /i=1:33 smxy_xs, smxy_ys, smxy
             X: 0.5 to 33.5
 Column  1: SMXY_XS is IF ( SMXY_XS_POS GT 180 ) THEN (SMXY_XS_POS - 360) ELSE SMXY_XS_POS
 Column  2: SMXY_YS is XSEQUENCE(0.0 * X[GX=X_15] + 1.0 * Y[GY=Y_15])
 Column  3: SMXY is XSEQUENCE(SINX + COSYP70)
          SMXY_XS  SMXY_YS   SMXY
1    /  1:   173.0   13.00  0.2437
2    /  2:   174.0   13.00  0.2264
3    /  3:   175.0   13.00  0.2090
4    /  4:   176.0   13.00  0.1916
5    /  5:   177.0   13.00  0.1742
6    /  6:   178.0   13.00  0.1568
7    /  7:   179.0   13.00  0.1393
8    /  8:   180.0   13.00  0.1219
9    /  9:  -179.0   13.00  0.1044
10   / 10:  -178.0   13.00  0.0870
11   / 11:  -177.0   13.00  0.0695
12   / 12:  -176.0   13.00  0.0521
13   / 13:  -175.0   13.00  0.0347
14   / 14:  -174.0   13.00  0.0173
15   / 15:  -173.0   13.00  0.0000
16   / 16:   173.0   14.00  0.2264
17   / 17:   174.0   14.00  0.2091
18   / 18:   175.0   14.00  0.1917
19   / 19:   176.0   14.00  0.1743
20   / 20:   177.0   14.00  0.1569
21   / 21:   178.0   14.00  0.1394
22   / 22:   179.0   14.00  0.1220
23   / 23:   180.0   14.00  0.1045
24   / 24:  -179.0   14.00  0.0871
25   / 25:  -178.0   14.00  0.0696
26   / 26:  -177.0   14.00  0.0522
27   / 27:  -176.0   14.00  0.0348
28   / 28:  -175.0   14.00  0.0174
29   / 29:  -174.0   14.00  0.0000
30   / 30:  -173.0   14.00 -0.0173
31   / 31:   173.0   15.00  0.2090
32   / 32:   174.0   15.00  0.1917
33   / 33:   175.0   15.00  0.1743
let xy_gauss_gridded = scat2gridgauss_xy(smxy_xs,smxy_ys,smxy,X[gx=x_11],Y[gy=y_11],1.0,1.0,1.0,0.0)
list xy_gauss_gridded
             VARIABLE : SCAT2GRIDGAUSS_XY(SMXY_XS,SMXY_YS,SMXY,X[GX=X_11],Y[GY=Y_11],1.0,1.0,1.0,0.0)
             SUBSET   : 11 by 11 points (LONGITUDE-LATITUDE)
               170E    172E    174E    176E    178E    180E    178W    176W    174W    172W    170W   
                 1       2       3       4       5       6       7       8       9      10      11
 30N   / 11:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 28N   / 10:    ....  0.0000 -0.0173 -0.0521 -0.0870 -0.1219 -0.1568 -0.1916 -0.2264 -0.2437    ....
 26N   /  9:    ....  0.0173  0.0000 -0.0348 -0.0696 -0.1045 -0.1394 -0.1743 -0.2090 -0.2264    ....
 24N   /  8:    ....  0.0521  0.0348  0.0000 -0.0349 -0.0698 -0.1046 -0.1395 -0.1743 -0.1916    ....
 22N   /  7:    ....  0.0870  0.0696  0.0349  0.0000 -0.0349 -0.0698 -0.1046 -0.1394 -0.1568    ....
 20N   /  6:    ....  0.1219  0.1045  0.0698  0.0349  0.0000 -0.0349 -0.0698 -0.1045 -0.1219    ....
 18N   /  5:    ....  0.1568  0.1394  0.1046  0.0698  0.0349  0.0000 -0.0349 -0.0696 -0.0870    ....
 16N   /  4:    ....  0.1916  0.1743  0.1395  0.1046  0.0698  0.0349  0.0000 -0.0348 -0.0521    ....
 14N   /  3:    ....  0.2264  0.2090  0.1743  0.1394  0.1045  0.0696  0.0348  0.0000 -0.0173    ....
 12N   /  2:    ....  0.2437  0.2264  0.1916  0.1568  0.1219  0.0870  0.0521  0.0173  0.0000    ....
 10N   /  1:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
let xy_laplace_gridded = scat2gridlaplace_xy(smxy_xs,smxy_ys,smxy,X[gx=x_11],Y[gy=y_11],2.0,1)
list xy_laplace_gridded
             VARIABLE : SCAT2GRIDLAPLACE_XY(SMXY_XS,SMXY_YS,SMXY,X[GX=X_11],Y[GY=Y_11],2.0,1)
             SUBSET   : 11 by 11 points (LONGITUDE-LATITUDE)
               170E    172E    174E    176E    178E    180E    178W    176W    174W    172W    170W   
                 1       2       3       4       5       6       7       8       9      10      11
 30N   / 11:    ....    .... -0.0575 -0.0870 -0.1192 -0.1533 -0.1879 -0.2214 -0.2521 -0.2791    ....
 28N   / 10:    ....  0.0015 -0.0317 -0.0663 -0.1006 -0.1355 -0.1703 -0.2049 -0.2386 -0.2688 -0.2791
 26N   /  9:    ....  0.0301  0.0013 -0.0346 -0.0692 -0.1041 -0.1390 -0.1738 -0.2082 -0.2386 -0.2521
 24N   /  8:    ....  0.0622  0.0363 -0.0003 -0.0348 -0.0697 -0.1046 -0.1394 -0.1738 -0.2049 -0.2214
 22N   /  7:    ....  0.0967  0.0713  0.0344  0.0000 -0.0349 -0.0698 -0.1046 -0.1390 -0.1703 -0.1879
 20N   /  6:    ....  0.1318  0.1062  0.0693  0.0349  0.0000 -0.0349 -0.0697 -0.1041 -0.1355 -0.1533
 18N   /  5:    ....  0.1668  0.1410  0.1042  0.0698  0.0349  0.0000 -0.0348 -0.0692 -0.1006 -0.1192
 16N   /  4:    ....  0.2007  0.1753  0.1384  0.1042  0.0693  0.0344 -0.0003 -0.0346 -0.0663 -0.0870
 14N   /  3:    ....  0.2331  0.2153  0.1753  0.1410  0.1062  0.0713  0.0363  0.0013 -0.0317 -0.0575
 12N   /  2:    ....    ....  0.2331  0.2007  0.1668  0.1318  0.0967  0.0622  0.0301  0.0015    ....
 10N   /  1:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 
list /i=1:33 smxz_xs, smxz_zs, smxz
             X: 0.5 to 33.5
 Column  1: SMXZ_XS is IF ( SMXZ_XS_POS GT 180 ) THEN (SMXZ_XS_POS - 360) ELSE SMXZ_XS_POS
 Column  2: SMXZ_ZS is XSEQUENCE(0.0 * X[GX=X_15] + 1.0 * Z[GZ=Z_15])
 Column  3: SMXZ is XSEQUENCE(SINX + LOGZP10)
          SMXZ_XS  SMXZ_ZS  SMXZ
1    /  1:   173.0   15.00  1.520
2    /  2:   174.0   15.00  1.502
3    /  3:   175.0   15.00  1.485
4    /  4:   176.0   15.00  1.468
5    /  5:   177.0   15.00  1.450
6    /  6:   178.0   15.00  1.433
7    /  7:   179.0   15.00  1.415
8    /  8:   180.0   15.00  1.398
9    /  9:  -179.0   15.00  1.380
10   / 10:  -178.0   15.00  1.363
11   / 11:  -177.0   15.00  1.346
12   / 12:  -176.0   15.00  1.328
13   / 13:  -175.0   15.00  1.311
14   / 14:  -174.0   15.00  1.293
15   / 15:  -173.0   15.00  1.276
16   / 16:   173.0   20.00  1.599
17   / 17:   174.0   20.00  1.582
18   / 18:   175.0   20.00  1.564
19   / 19:   176.0   20.00  1.547
20   / 20:   177.0   20.00  1.529
21   / 21:   178.0   20.00  1.512
22   / 22:   179.0   20.00  1.495
23   / 23:   180.0   20.00  1.477
24   / 24:  -179.0   20.00  1.460
25   / 25:  -178.0   20.00  1.442
26   / 26:  -177.0   20.00  1.425
27   / 27:  -176.0   20.00  1.407
28   / 28:  -175.0   20.00  1.390
29   / 29:  -174.0   20.00  1.373
30   / 30:  -173.0   20.00  1.355
31   / 31:   173.0   25.00  1.666
32   / 32:   174.0   25.00  1.649
33   / 33:   175.0   25.00  1.631
let xz_gauss_gridded = scat2gridgauss_xz(smxz_xs,smxz_zs,smxz,X[gx=x_11],Z[gz=z_11],1.0,5.0,1.0,0.0)
list xz_gauss_gridded
             VARIABLE : SCAT2GRIDGAUSS_XZ(SMXZ_XS,SMXZ_ZS,SMXZ,X[GX=X_11],Z[GZ=Z_11],1.0,5.0,1.0,0.0)
             SUBSET   : 11 by 11 points (LONGITUDE-DEPTH (m))
               170E   172E   174E   176E   178E    180E  178W   176W   174W   172W   170W   
                 1      2      3      4      5      6      7      8      9     10     11
 0      /  1:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 10     /  2:   ....  1.520  1.502  1.468  1.433  1.398  1.363  1.328  1.293  1.276   ....
 20     /  3:   ....  1.596  1.579  1.544  1.509  1.475  1.440  1.405  1.370  1.353   ....
 30     /  4:   ....  1.722  1.705  1.670  1.636  1.601  1.566  1.531  1.496  1.479   ....
 40     /  5:   ....  1.820  1.803  1.768  1.733  1.698  1.663  1.628  1.594  1.576   ....
 50     /  6:   ....  1.899  1.882  1.847  1.812  1.778  1.743  1.708  1.673  1.656   ....
 60     /  7:   ....  1.966  1.949  1.914  1.880  1.845  1.810  1.775  1.740  1.723   ....
 70     /  8:   ....  2.025  2.007  1.972  1.938  1.903  1.868  1.833  1.798  1.781   ....
 80     /  9:   ....  2.076  2.058  2.024  1.989  1.954  1.919  1.884  1.849  1.832   ....
 90     / 10:   ....  2.100  2.082  2.047  2.013  1.978  1.943  1.908  1.873  1.856   ....
 100    / 11:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
let xz_laplace_gridded = scat2gridlaplace_xz(smxz_xs,smxz_zs,smxz,X[gx=x_11],Z[gz=z_11],2.0,1)
list xz_laplace_gridded
             VARIABLE : SCAT2GRIDLAPLACE_XZ(SMXZ_XS,SMXZ_ZS,SMXZ,X[GX=X_11],Z[GZ=Z_11],2.0,1)
             SUBSET   : 11 by 11 points (LONGITUDE-DEPTH (m))
               170E   172E   174E   176E   178E    180E  178W   176W   174W   172W   170W   
                 1      2      3      4      5      6      7      8      9     10     11
 0      /  1:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 10     /  2:   ....   ....  1.460  1.433  1.401  1.367  1.333  1.299  1.269  1.245   ....
 20     /  3:   ....  1.626  1.566  1.536  1.499  1.464  1.429  1.394  1.359  1.334  1.352
 30     /  4:   ....  1.730  1.714  1.675  1.641  1.606  1.571  1.536  1.502  1.469  1.449
 40     /  5:   ....  1.825  1.807  1.768  1.734  1.699  1.664  1.629  1.595  1.562  1.539
 50     /  6:   ....  1.907  1.885  1.847  1.813  1.778  1.743  1.708  1.674  1.642  1.619
 60     /  7:   ....  1.975  1.952  1.914  1.880  1.845  1.810  1.775  1.741  1.709  1.688
 70     /  8:   ....  2.033  2.010  1.972  1.938  1.903  1.868  1.833  1.799  1.767  1.745
 80     /  9:   ....  2.080  2.061  2.023  1.989  1.954  1.919  1.884  1.850  1.817  1.792
 90     / 10:   ....  2.119  2.102  2.065  2.031  1.996  1.961  1.927  1.893  1.861  1.832
 100    / 11:   ....   ....  2.118  2.087  2.054  2.020  1.986  1.953  1.922  1.895   ....
 
list /i=1:33 smxt_xs, smxt_ts, smxt
             X: 0.5 to 33.5
 Column  1: SMXT_XS is IF ( SMXT_XS_POS GT 180 ) THEN (SMXT_XS_POS - 360) ELSE SMXT_XS_POS
 Column  2: SMXT_TS is XSEQUENCE(0.0 * X[GX=X_15] + 1.0 * T[GT=T_16])
 Column  3: SMXT is XSEQUENCE(SINX + LOGTP50)
          SMXT_XS  SMXT_TS  SMXT
1    /  1:   173.0    274.  2.632
2    /  2:   174.0    274.  2.615
3    /  3:   175.0    274.  2.597
4    /  4:   176.0    274.  2.580
5    /  5:   177.0    274.  2.563
6    /  6:   178.0    274.  2.545
7    /  7:   179.0    274.  2.528
8    /  8:   180.0    274.  2.510
9    /  9:  -179.0    274.  2.493
10   / 10:  -178.0    274.  2.475
11   / 11:  -177.0    274.  2.458
12   / 12:  -176.0    274.  2.440
13   / 13:  -175.0    274.  2.423
14   / 14:  -174.0    274.  2.406
15   / 15:  -173.0    274.  2.388
16   / 16:   173.0    821.  3.062
17   / 17:   174.0    821.  3.045
18   / 18:   175.0    821.  3.027
19   / 19:   176.0    821.  3.010
20   / 20:   177.0    821.  2.992
21   / 21:   178.0    821.  2.975
22   / 22:   179.0    821.  2.958
23   / 23:   180.0    821.  2.940
24   / 24:  -179.0    821.  2.923
25   / 25:  -178.0    821.  2.905
26   / 26:  -177.0    821.  2.888
27   / 27:  -176.0    821.  2.870
28   / 28:  -175.0    821.  2.853
29   / 29:  -174.0    821.  2.836
30   / 30:  -173.0    821.  2.818
31   / 31:   173.0   1369.  3.274
32   / 32:   174.0   1369.  3.256
33   / 33:   175.0   1369.  3.239
let xt_gauss_gridded = scat2gridgauss_xt(smxt_xs,smxt_ts,smxt,X[gx=x_11],T[gt=t_12],1.0,436.8,1.0,0.0)
list xt_gauss_gridded
             VARIABLE : SCAT2GRIDGAUSS_XT(SMXT_XS,SMXT_TS,SMXT,X[GX=X_11],T[GT=T_12],1.0,436.8,1.0,0.0)
             SUBSET   : 11 by 12 points (LONGITUDE-TIME)
                    170E   172E   174E   176E   178E    180E  178W   176W   174W   172W   170W   
                      1      2      3      4      5      6      7      8      9     10     11
 16-JAN-1995 /  1:   ....  2.632  2.615  2.580  2.545  2.510  2.475  2.440  2.406  2.388   ....
 15-FEB-1995 /  2:   ....  3.168  3.151  3.116  3.081  3.046  3.011  2.976  2.942  2.924   ....
 18-MAR-1995 /  3:   ....  3.416  3.398  3.363  3.329  3.294  3.259  3.224  3.189  3.172   ....
 17-APR-1995 /  4:   ....  3.522  3.505  3.470  3.435  3.400  3.365  3.331  3.296  3.278   ....
 17-MAY-1995 /  5:   ....  3.643  3.626  3.591  3.557  3.522  3.487  3.452  3.417  3.400   ....
 17-JUN-1995 /  6:   ....  3.741  3.723  3.688  3.654  3.619  3.584  3.549  3.514  3.497   ....
 17-JUL-1995 /  7:   ....  3.794  3.777  3.742  3.707  3.672  3.638  3.603  3.568  3.551   ....
 17-AUG-1995 /  8:   ....  3.864  3.846  3.812  3.777  3.742  3.707  3.672  3.637  3.620   ....
 16-SEP-1995 /  9:   ....  3.924  3.907  3.872  3.837  3.803  3.768  3.733  3.698  3.681   ....
 16-OCT-1995 / 10:   ....  3.960  3.943  3.908  3.873  3.838  3.804  3.769  3.734  3.717   ....
 16-NOV-1995 / 11:   ....  4.009  3.992  3.957  3.922  3.887  3.852  3.817  3.783  3.765   ....
 16-DEC-1995 / 12:   ....  4.053  4.036  4.001  3.966  3.931  3.896  3.862  3.827  3.809   ....
let xt_laplace_gridded = scat2gridlaplace_xt(smxt_xs,smxt_ts,smxt,X[gx=x_11],T[gt=t_12],2.0,1)
list xt_laplace_gridded
             VARIABLE : SCAT2GRIDLAPLACE_XT(SMXT_XS,SMXT_TS,SMXT,X[GX=X_11],T[GT=T_12],2.0,1)
             SUBSET   : 11 by 12 points (LONGITUDE-TIME)
                    170E   172E   174E   176E   178E    180E  178W   176W   174W   172W   170W   
                      1      2      3      4      5      6      7      8      9     10     11
 16-JAN-1995 /  1:   ....  2.800  2.655  2.647  2.612  2.577  2.542  2.507  2.473  2.463  2.525
 15-FEB-1995 /  2:   ....  3.120  3.185  3.136  3.101  3.066  3.031  2.997  2.962  2.925  2.845
 18-MAR-1995 /  3:   ....  3.369  3.391  3.342  3.308  3.273  3.238  3.203  3.169  3.131  3.094
 17-APR-1995 /  4:   ....  3.534  3.522  3.484  3.449  3.414  3.380  3.345  3.310  3.280  3.260
 17-MAY-1995 /  5:   ....  3.654  3.631  3.593  3.558  3.523  3.488  3.454  3.419  3.389  3.379
 17-JUN-1995 /  6:   ....  3.744  3.718  3.679  3.645  3.610  3.575  3.540  3.506  3.475  3.470
 17-JUL-1995 /  7:   ....  3.814  3.786  3.750  3.715  3.680  3.645  3.610  3.576  3.547  3.540
 17-AUG-1995 /  8:   ....  3.876  3.849  3.812  3.777  3.742  3.708  3.673  3.638  3.609  3.602
 16-SEP-1995 /  9:   ....  3.931  3.905  3.866  3.832  3.797  3.762  3.727  3.693  3.662  3.656
 16-OCT-1995 / 10:   ....  3.977  3.950  3.913  3.879  3.844  3.809  3.774  3.740  3.710  3.702
 16-NOV-1995 / 11:   ....  4.019  3.995  3.957  3.922  3.887  3.852  3.818  3.783  3.753  3.744
 16-DEC-1995 / 12:   ....  4.058  4.034  3.996  3.961  3.926  3.891  3.856  3.822  3.791  3.782
 
list /j=1:33 smyz_ys, smyz_zs, smyz
             Y: 0.5 to 33.5
 Column  1: SMYZ_YS is YSEQUENCE(1.0 * Y[GY=Y_15] + 0.0 * Z[GZ=Z_15])
 Column  2: SMYZ_ZS is YSEQUENCE(0.0 * Y[GY=Y_15] + 1.0 * Z[GZ=Z_15])
 Column  3: SMYZ is YSEQUENCE(COSYP70 + LOGZP10)
          SMYZ_YS  SMYZ_ZS  SMYZ
1    /  1:   13.00   15.00  1.520
2    /  2:   14.00   15.00  1.502
3    /  3:   15.00   15.00  1.485
4    /  4:   16.00   15.00  1.468
5    /  5:   17.00   15.00  1.450
6    /  6:   18.00   15.00  1.433
7    /  7:   19.00   15.00  1.415
8    /  8:   20.00   15.00  1.398
9    /  9:   21.00   15.00  1.380
10   / 10:   22.00   15.00  1.363
11   / 11:   23.00   15.00  1.346
12   / 12:   24.00   15.00  1.328
13   / 13:   25.00   15.00  1.311
14   / 14:   26.00   15.00  1.293
15   / 15:   27.00   15.00  1.276
16   / 16:   13.00   20.00  1.599
17   / 17:   14.00   20.00  1.582
18   / 18:   15.00   20.00  1.564
19   / 19:   16.00   20.00  1.547
20   / 20:   17.00   20.00  1.529
21   / 21:   18.00   20.00  1.512
22   / 22:   19.00   20.00  1.495
23   / 23:   20.00   20.00  1.477
24   / 24:   21.00   20.00  1.460
25   / 25:   22.00   20.00  1.442
26   / 26:   23.00   20.00  1.425
27   / 27:   24.00   20.00  1.407
28   / 28:   25.00   20.00  1.390
29   / 29:   26.00   20.00  1.373
30   / 30:   27.00   20.00  1.355
31   / 31:   13.00   25.00  1.666
32   / 32:   14.00   25.00  1.649
33   / 33:   15.00   25.00  1.631
let yz_gauss_gridded = scat2gridgauss_yz(smyz_ys,smyz_zs,smyz,Y[gy=y_11],Z[gz=z_11],1.0,5.0,1.0,0.0)
list yz_gauss_gridded
             VARIABLE : SCAT2GRIDGAUSS_YZ(SMYZ_YS,SMYZ_ZS,SMYZ,Y[GY=Y_11],Z[GZ=Z_11],1.0,5.0,1.0,0.0)
             SUBSET   : 11 by 11 points (LATITUDE-DEPTH (m))
                10N    12N    14N    16N    18N    20N    22N    24N    26N    28N    30N   
                 1      2      3      4      5      6      7      8      9     10     11
 0      /  1:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 10     /  2:   ....  1.520  1.502  1.468  1.433  1.398  1.363  1.328  1.293  1.276   ....
 20     /  3:   ....  1.596  1.579  1.544  1.509  1.475  1.440  1.405  1.370  1.353   ....
 30     /  4:   ....  1.722  1.705  1.670  1.636  1.601  1.566  1.531  1.496  1.479   ....
 40     /  5:   ....  1.820  1.803  1.768  1.733  1.698  1.663  1.628  1.594  1.576   ....
 50     /  6:   ....  1.899  1.882  1.847  1.812  1.778  1.743  1.708  1.673  1.656   ....
 60     /  7:   ....  1.966  1.949  1.914  1.880  1.845  1.810  1.775  1.740  1.723   ....
 70     /  8:   ....  2.025  2.007  1.972  1.938  1.903  1.868  1.833  1.798  1.781   ....
 80     /  9:   ....  2.076  2.058  2.024  1.989  1.954  1.919  1.884  1.849  1.832   ....
 90     / 10:   ....  2.100  2.082  2.047  2.013  1.978  1.943  1.908  1.873  1.856   ....
 100    / 11:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
let yz_laplace_gridded = scat2gridlaplace_yz(smyz_ys,smyz_zs,smyz,Y[gy=y_11],Z[gz=z_11],2.0,1)
list yz_laplace_gridded
             VARIABLE : SCAT2GRIDLAPLACE_YZ(SMYZ_YS,SMYZ_ZS,SMYZ,Y[GY=Y_11],Z[GZ=Z_11],2.0,1)
             SUBSET   : 11 by 11 points (LATITUDE-DEPTH (m))
                10N    12N    14N    16N    18N    20N    22N    24N    26N    28N    30N   
                 1      2      3      4      5      6      7      8      9     10     11
 0      /  1:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 10     /  2:   ....   ....  1.460  1.433  1.401  1.367  1.333  1.299  1.269  1.245   ....
 20     /  3:   ....  1.626  1.566  1.536  1.499  1.464  1.429  1.394  1.359  1.334  1.352
 30     /  4:   ....  1.730  1.714  1.675  1.641  1.606  1.571  1.536  1.502  1.469  1.449
 40     /  5:   ....  1.825  1.807  1.768  1.734  1.699  1.664  1.629  1.595  1.562  1.539
 50     /  6:   ....  1.907  1.885  1.847  1.813  1.778  1.743  1.708  1.674  1.642  1.619
 60     /  7:   ....  1.975  1.952  1.914  1.880  1.845  1.810  1.775  1.741  1.709  1.688
 70     /  8:   ....  2.033  2.010  1.972  1.938  1.903  1.868  1.833  1.799  1.767  1.745
 80     /  9:   ....  2.080  2.061  2.023  1.989  1.954  1.919  1.884  1.850  1.817  1.792
 90     / 10:   ....  2.119  2.102  2.065  2.031  1.996  1.961  1.927  1.893  1.861  1.832
 100    / 11:   ....   ....  2.118  2.087  2.054  2.020  1.986  1.953  1.922  1.895   ....
 
list /j=1:33 smyt_ys, smyt_ts, smyt
             Y: 0.5 to 33.5
 Column  1: SMYT_YS is YSEQUENCE(1.0 * Y[GY=Y_15] + 0.0 * T[GT=T_16])
 Column  2: SMYT_TS is YSEQUENCE(0.0 * Y[GY=Y_15] + 1.0 * T[GT=T_16])
 Column  3: SMYT is YSEQUENCE(COSYP70 + LOGTP50)
          SMYT_YS  SMYT_TS  SMYT
1    /  1:   13.00    274.  2.632
2    /  2:   14.00    274.  2.615
3    /  3:   15.00    274.  2.597
4    /  4:   16.00    274.  2.580
5    /  5:   17.00    274.  2.563
6    /  6:   18.00    274.  2.545
7    /  7:   19.00    274.  2.528
8    /  8:   20.00    274.  2.510
9    /  9:   21.00    274.  2.493
10   / 10:   22.00    274.  2.475
11   / 11:   23.00    274.  2.458
12   / 12:   24.00    274.  2.440
13   / 13:   25.00    274.  2.423
14   / 14:   26.00    274.  2.406
15   / 15:   27.00    274.  2.388
16   / 16:   13.00    821.  3.062
17   / 17:   14.00    821.  3.045
18   / 18:   15.00    821.  3.027
19   / 19:   16.00    821.  3.010
20   / 20:   17.00    821.  2.992
21   / 21:   18.00    821.  2.975
22   / 22:   19.00    821.  2.958
23   / 23:   20.00    821.  2.940
24   / 24:   21.00    821.  2.923
25   / 25:   22.00    821.  2.905
26   / 26:   23.00    821.  2.888
27   / 27:   24.00    821.  2.870
28   / 28:   25.00    821.  2.853
29   / 29:   26.00    821.  2.836
30   / 30:   27.00    821.  2.818
31   / 31:   13.00   1369.  3.274
32   / 32:   14.00   1369.  3.256
33   / 33:   15.00   1369.  3.239
let yt_gauss_gridded = scat2gridgauss_yt(smyt_ys,smyt_ts,smyt,Y[gy=y_11],T[gt=t_12],1.0,436.8,1.0,0.0)
list yt_gauss_gridded
             VARIABLE : SCAT2GRIDGAUSS_YT(SMYT_YS,SMYT_TS,SMYT,Y[GY=Y_11],T[GT=T_12],1.0,436.8,1.0,0.0)
             SUBSET   : 11 by 12 points (LATITUDE-TIME)
                     10N    12N    14N    16N    18N    20N    22N    24N    26N    28N    30N   
                      1      2      3      4      5      6      7      8      9     10     11
 16-JAN-1995 /  1:   ....  2.632  2.615  2.580  2.545  2.510  2.475  2.440  2.406  2.388   ....
 15-FEB-1995 /  2:   ....  3.168  3.151  3.116  3.081  3.046  3.011  2.976  2.942  2.924   ....
 18-MAR-1995 /  3:   ....  3.416  3.398  3.363  3.329  3.294  3.259  3.224  3.189  3.172   ....
 17-APR-1995 /  4:   ....  3.522  3.505  3.470  3.435  3.400  3.365  3.331  3.296  3.278   ....
 17-MAY-1995 /  5:   ....  3.643  3.626  3.591  3.557  3.522  3.487  3.452  3.417  3.400   ....
 17-JUN-1995 /  6:   ....  3.741  3.723  3.688  3.654  3.619  3.584  3.549  3.514  3.497   ....
 17-JUL-1995 /  7:   ....  3.794  3.777  3.742  3.707  3.672  3.638  3.603  3.568  3.551   ....
 17-AUG-1995 /  8:   ....  3.864  3.846  3.812  3.777  3.742  3.707  3.672  3.637  3.620   ....
 16-SEP-1995 /  9:   ....  3.924  3.907  3.872  3.837  3.803  3.768  3.733  3.698  3.681   ....
 16-OCT-1995 / 10:   ....  3.960  3.943  3.908  3.873  3.838  3.804  3.769  3.734  3.717   ....
 16-NOV-1995 / 11:   ....  4.009  3.992  3.957  3.922  3.887  3.852  3.817  3.783  3.765   ....
 16-DEC-1995 / 12:   ....  4.053  4.036  4.001  3.966  3.931  3.896  3.862  3.827  3.809   ....
let yt_laplace_gridded = scat2gridlaplace_yt(smyt_ys,smyt_ts,smyt,Y[gy=y_11],T[gt=t_12],2.0,1)
list yt_laplace_gridded
             VARIABLE : SCAT2GRIDLAPLACE_YT(SMYT_YS,SMYT_TS,SMYT,Y[GY=Y_11],T[GT=T_12],2.0,1)
             SUBSET   : 11 by 12 points (LATITUDE-TIME)
                     10N    12N    14N    16N    18N    20N    22N    24N    26N    28N    30N   
                      1      2      3      4      5      6      7      8      9     10     11
 16-JAN-1995 /  1:   ....  2.800  2.655  2.647  2.612  2.577  2.542  2.507  2.473  2.463  2.525
 15-FEB-1995 /  2:   ....  3.120  3.185  3.136  3.101  3.066  3.031  2.997  2.962  2.925  2.845
 18-MAR-1995 /  3:   ....  3.369  3.391  3.342  3.308  3.273  3.238  3.203  3.169  3.131  3.094
 17-APR-1995 /  4:   ....  3.534  3.522  3.484  3.449  3.414  3.380  3.345  3.310  3.280  3.260
 17-MAY-1995 /  5:   ....  3.654  3.631  3.593  3.558  3.523  3.488  3.454  3.419  3.389  3.379
 17-JUN-1995 /  6:   ....  3.744  3.718  3.679  3.645  3.610  3.575  3.540  3.506  3.475  3.470
 17-JUL-1995 /  7:   ....  3.814  3.786  3.750  3.715  3.680  3.645  3.610  3.576  3.547  3.540
 17-AUG-1995 /  8:   ....  3.876  3.849  3.812  3.777  3.742  3.708  3.673  3.638  3.609  3.602
 16-SEP-1995 /  9:   ....  3.931  3.905  3.866  3.832  3.797  3.762  3.727  3.693  3.662  3.656
 16-OCT-1995 / 10:   ....  3.977  3.950  3.913  3.879  3.844  3.809  3.774  3.740  3.710  3.702
 16-NOV-1995 / 11:   ....  4.019  3.995  3.957  3.922  3.887  3.852  3.818  3.783  3.753  3.744
 16-DEC-1995 / 12:   ....  4.058  4.034  3.996  3.961  3.926  3.891  3.856  3.822  3.791  3.782
 
list /k=1:33 smzt_zs, smzt_ts, smzt
             Z: 0.5 to 33.5
 Column  1: SMZT_ZS is ZSEQUENCE(1.0 * Z[GZ=Z_15] + 0.0 * T[GT=T_16])
 Column  2: SMZT_TS is ZSEQUENCE(0.0 * Z[GZ=Z_15] + 1.0 * T[GT=T_16])
 Column  3: SMZT is ZSEQUENCE(LOGZP10 + LOGTP50)
          SMZT_ZS  SMZT_TS  SMZT
1    /  1:   15.00    274.  3.908
2    /  2:   20.00    274.  3.987
3    /  3:   25.00    274.  4.054
4    /  4:   30.00    274.  4.112
5    /  5:   35.00    274.  4.163
6    /  6:   40.00    274.  4.209
7    /  7:   45.00    274.  4.251
8    /  8:   50.00    274.  4.288
9    /  9:   55.00    274.  4.323
10   / 10:   60.00    274.  4.355
11   / 11:   65.00    274.  4.385
12   / 12:   70.00    274.  4.413
13   / 13:   75.00    274.  4.440
14   / 14:   80.00    274.  4.464
15   / 15:   85.00    274.  4.488
16   / 16:   15.00    821.  4.338
17   / 17:   20.00    821.  4.417
18   / 18:   25.00    821.  4.484
19   / 19:   30.00    821.  4.542
20   / 20:   35.00    821.  4.593
21   / 21:   40.00    821.  4.639
22   / 22:   45.00    821.  4.681
23   / 23:   50.00    821.  4.718
24   / 24:   55.00    821.  4.753
25   / 25:   60.00    821.  4.785
26   / 26:   65.00    821.  4.815
27   / 27:   70.00    821.  4.843
28   / 28:   75.00    821.  4.870
29   / 29:   80.00    821.  4.894
30   / 30:   85.00    821.  4.918
31   / 31:   15.00   1369.  4.550
32   / 32:   20.00   1369.  4.629
33   / 33:   25.00   1369.  4.696
let zt_gauss_gridded = scat2gridgauss_zt(smzt_zs,smzt_ts,smzt,Z[gz=z_11],T[gt=t_12],5.0,436.8,1.0,0.0)
list zt_gauss_gridded
             VARIABLE : SCAT2GRIDGAUSS_ZT(SMZT_ZS,SMZT_TS,SMZT,Z[GZ=Z_11],T[GT=T_12],5.0,436.8,1.0,0.0)
             SUBSET   : 11 by 12 points (DEPTH (m)-TIME)
                     0      10     20     30     40     50     60     70     80     90    100    
                      1      2      3      4      5      6      7      8      9     10     11
 16-JAN-1995 /  1:   ....  3.908  3.985  4.111  4.208  4.288  4.355  4.413  4.464  4.488   ....
 15-FEB-1995 /  2:   ....  4.444  4.521  4.647  4.744  4.824  4.891  4.949  5.000  5.024   ....
 18-MAR-1995 /  3:   ....  4.692  4.768  4.894  4.992  5.071  5.138  5.196  5.248  5.271   ....
 17-APR-1995 /  4:   ....  4.798  4.875  5.001  5.098  5.178  5.245  5.303  5.354  5.378   ....
 17-MAY-1995 /  5:   ....  4.920  4.996  5.122  5.220  5.299  5.366  5.424  5.476  5.499   ....
 17-JUN-1995 /  6:   ....  5.017  5.093  5.219  5.317  5.396  5.463  5.521  5.573  5.596   ....
 17-JUL-1995 /  7:   ....  5.070  5.147  5.273  5.370  5.450  5.517  5.575  5.626  5.650   ....
 17-AUG-1995 /  8:   ....  5.140  5.216  5.342  5.440  5.519  5.586  5.645  5.696  5.720   ....
 16-SEP-1995 /  9:   ....  5.200  5.277  5.403  5.501  5.580  5.647  5.705  5.756  5.780   ....
 16-OCT-1995 / 10:   ....  5.236  5.313  5.439  5.537  5.616  5.683  5.741  5.792  5.816   ....
 16-NOV-1995 / 11:   ....  5.285  5.362  5.488  5.585  5.665  5.732  5.790  5.841  5.865   ....
 16-DEC-1995 / 12:   ....  5.329  5.406  5.532  5.629  5.709  5.776  5.834  5.885  5.909   ....
let zt_laplace_gridded = scat2gridlaplace_zt(smzt_zs,smzt_ts,smzt,Z[gz=z_11],T[gt=t_12],2.0,1)
list zt_laplace_gridded
             VARIABLE : SCAT2GRIDLAPLACE_ZT(SMZT_ZS,SMZT_TS,SMZT,Z[GZ=Z_11],T[GT=T_12],2.0,1)
             SUBSET   : 11 by 12 points (DEPTH (m)-TIME)
                     0      10     20     30     40     50     60     70     80     90    100    
                      1      2      3      4      5      6      7      8      9     10     11
 16-JAN-1995 /  1:   ....  4.013  4.011  4.182  4.278  4.356  4.423  4.481  4.531  4.591  4.665
 15-FEB-1995 /  2:   ....  4.333  4.541  4.671  4.767  4.845  4.912  4.970  5.020  5.053  4.985
 18-MAR-1995 /  3:   ....  4.582  4.746  4.878  4.973  5.052  5.118  5.176  5.227  5.259  5.234
 17-APR-1995 /  4:   ....  4.748  4.877  5.019  5.115  5.194  5.260  5.318  5.368  5.408  5.399
 17-MAY-1995 /  5:   ....  4.868  4.986  5.128  5.224  5.303  5.369  5.427  5.477  5.517  5.519
 17-JUN-1995 /  6:   ....  4.959  5.074  5.215  5.310  5.389  5.455  5.513  5.564  5.602  5.609
 17-JUL-1995 /  7:   ....  5.028  5.141  5.285  5.381  5.459  5.526  5.584  5.634  5.675  5.679
 17-AUG-1995 /  8:   ....  5.090  5.205  5.347  5.443  5.522  5.588  5.646  5.696  5.736  5.742
 16-SEP-1995 /  9:   ....  5.144  5.261  5.402  5.497  5.576  5.643  5.700  5.751  5.790  5.796
 16-OCT-1995 / 10:   ....  5.189  5.306  5.449  5.544  5.623  5.689  5.747  5.798  5.838  5.842
 16-NOV-1995 / 11:   ....  5.230  5.351  5.492  5.588  5.667  5.733  5.791  5.841  5.881  5.885
 16-DEC-1995 / 12:   ....  5.268  5.391  5.531  5.626  5.705  5.772  5.829  5.880  5.919  5.923
 
can mem /all
can var /all
can axis t_12
can axis z_11
can axis y_11
can axis x_11
can axis t_16
can axis z_15
can axis y_15
can axis x_15
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go bn_scat2gridlaplace_tarasoff
! bn_scat2gridlaplace_tarasoff
! check for error reported by Lev Tarasoff 5/10/2006
! trac ticket #1412
! tests modulo of the X axis in the scat2gridlaplace_xy function
 
let xlnb = { -4.06, -5.07, -3.77, -3.02,  0.83,  0.31,  1.02,  0.33, -1.35, -2.54, \
             -3.75, -5.48, -5.25,  2.98,  3.50, 36.15, 29.40, 19.45, 19.00}
let ylt = {  52.47, 51.66, 51.58, 51.35, 51.70, 51.46, 51.07, 50.84, 50.80, 50.62, \
             50.39, 50.13, 56.07, 55.02, 52.50, 69.10, 70.09, 70.15, 69.80}
let wgt = {0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.03,0.02,0.00,1.34,1.17,0.22,0.49}
 
def axis/x=12.5w:119.5e/npoints=133/units=deg/modulo xlonef
def axis/y=47.25N:83.25n/npoints=73/units=deg ylatef
 
let xln = if xlnb lt 0. then xlnb+360. else xlnb
let wgtl = scat2gridlaplace_xy(xln,ylt, wgt, x[gx=xlonef], y[gy=ylatef], 2., 1)
 
show grid wgtl
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XLONEF    LONGITUDE          133mr   12.5W                119.5E(479.5)       full
 YLATEF    LATITUDE            73 r   47.25N               83.25N              full
 normal    Z
 normal    T
load wgtl
! shade wgtl ! Result is shifted in X:
! data shows up at 70e that should be at 35e
 
! the folowing are listed /order=yx so no data will be skipped
 
! the following should show three regions of data
list /order=yx wgtl[X=15E:40E,Y=68N:72N]
             VARIABLE : SCAT2GRIDLAPLACE_XY(XLN,YLT, WGT, X[GX=XLONEF], Y[GY=YLATEF], 2., 1)
             SUBSET   : 8 by 25 points (LATITUDE-LONGITUDE)
                68.25N 68.75N 69.25N 69.75N 70.25N 70.75N 71.25N 71.75N 
                 43     44     45     46     47     48     49     50
 15.5E / -105:   ....   ....   ....   ....   ....   ....   ....   ....
 16.5E / -104:   ....   ....   ....   ....   ....   ....   ....   ....
 17.5E / -103:   ....   ....   ....   ....   ....   ....   ....   ....
 18.5E / -102:   ....   ....   ....  0.451  0.259   ....   ....   ....
 19.5E / -101:   ....   ....  0.670  0.523  0.173  0.040   ....   ....
 20.5E / -100:   ....   ....   ....  0.451  0.259   ....   ....   ....
 21.5E /  -99:   ....   ....   ....   ....   ....   ....   ....   ....
 22.5E /  -98:   ....   ....   ....   ....   ....   ....   ....   ....
 23.5E /  -97:   ....   ....   ....   ....   ....   ....   ....   ....
 24.5E /  -96:   ....   ....   ....   ....   ....   ....   ....   ....
 25.5E /  -95:   ....   ....   ....   ....   ....   ....   ....   ....
 26.5E /  -94:   ....   ....   ....   ....   ....   ....   ....   ....
 27.5E /  -93:   ....   ....   ....   ....   ....   ....   ....   ....
 28.5E /  -92:   ....   ....   ....   ....  1.170   ....   ....   ....
 29.5E /  -91:   ....   ....   ....  1.170  1.170  1.170   ....   ....
 30.5E /  -90:   ....   ....   ....   ....  1.170   ....   ....   ....
 31.5E /  -89:   ....   ....   ....   ....   ....   ....   ....   ....
 32.5E /  -88:   ....   ....   ....   ....   ....   ....   ....   ....
 33.5E /  -87:   ....   ....   ....   ....   ....   ....   ....   ....
 34.5E /  -86:   ....   ....   ....   ....   ....   ....   ....   ....
 35.5E /  -85:   ....   ....  1.340   ....   ....   ....   ....   ....
 36.5E /  -84:   ....  1.340  1.340  1.340   ....   ....   ....   ....
 37.5E /  -83:   ....   ....  1.340   ....   ....   ....   ....   ....
 38.5E /  -82:   ....   ....   ....   ....   ....   ....   ....   ....
 39.5E /  -81:   ....   ....   ....   ....   ....   ....   ....   ....
! the following should completely undefined
list /order=yx wgtl[X=55E:80E,Y=68N:72N]
             VARIABLE : SCAT2GRIDLAPLACE_XY(XLN,YLT, WGT, X[GX=XLONEF], Y[GY=YLATEF], 2., 1)
             SUBSET   : 8 by 25 points (LATITUDE-LONGITUDE)
               68N 69N 69N 70N 70N 71N 71N 72N 
               43  44  45  46  47  48  49  50
 55.5E / -65:................................
 56.5E / -64:................................
 57.5E / -63:................................
 58.5E / -62:................................
 59.5E / -61:................................
 60.5E / -60:................................
 61.5E / -59:................................
 62.5E / -58:................................
 63.5E / -57:................................
 64.5E / -56:................................
 65.5E / -55:................................
 66.5E / -54:................................
 67.5E / -53:................................
 68.5E / -52:................................
 69.5E / -51:................................
 70.5E / -50:................................
 71.5E / -49:................................
 72.5E / -48:................................
 73.5E / -47:................................
 74.5E / -46:................................
 75.5E / -45:................................
 76.5E / -44:................................
 77.5E / -43:................................
 78.5E / -42:................................
 79.5E / -41:................................
 
cancel data /all
cancel var /all
cancel axis xlonef
cancel axis ylatef
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go bn_scat2grid_nobs
! bn_scat2grid_nobs.jnl
! test of scat2grid_nobs functions,
! listing the results which can be checked against input
 
define axis/x=173:187/unit=degrees_east/npoints=15 x_15
define axis/y=13:27/unit=degrees_north/npoints=15 y_15
define axis/t=0:8760/unit=hours/t0="01-JAN-1995 00:00:00"/edges/npoints=16 t_16
 
let sinx = sin(X[gx=x_15] * 3.14159265 / 180.0)
let cosyp70 = cos((Y[gy=y_15] + 70.0) * 3.14159265 / 180.0)
let logtp50 = log(T[gt=t_16] + 50.0)
 
let smxy = xsequence(sinx + cosyp70)
let smxy_xs_pos = xsequence(1.0 * X[gx=x_15] + 0.0 * Y[gy=y_15])
let smxy_xs = if ( smxy_xs_pos gt 180 ) then (smxy_xs_pos - 360) else smxy_xs_pos
let smxy_ys = xsequence(0.0 * X[gx=x_15] + 1.0 * Y[gy=y_15])
 
let smxyt = xsequence(sinx + cosyp70 + logtp50)
let smxyt_xs_pos = xsequence(1.0 * X[gx=x_15] + 0.0 * Y[gy=y_15] + 0.0 * T[gt=t_16])
let smxyt_xs = if ( smxyt_xs_pos gt 180 ) then (smxyt_xs_pos - 360) else smxyt_xs_pos
let smxyt_ys = xsequence(0.0 * X[gx=x_15] + 1.0 * Y[gy=y_15] + 0.0 * T[gt=t_16])
let smxyt_ts = xsequence(0.0 * X[gx=x_15] + 0.0 * Y[gy=y_15] + 1.0 * T[gt=t_16])
 
define axis/x=170:190/unit=degrees_east/npoints=11 x_11
define axis/y=10:30/units=degrees_north/npoints=11 y_11
define axis/t=0:8760/unit=hours/t0="01-JAN-1995 00:00:00"/edges/npoints=12 t_12
 
list X[gx=x_11]
             VARIABLE : X
                        axis X_11
             SUBSET   : 11 points (LONGITUDE)
 170E   /  1:  170.0
 172E   /  2:  172.0
 174E   /  3:  174.0
 176E   /  4:  176.0
 178E   /  5:  178.0
 180E   /  6:  180.0
 178W   /  7:  182.0
 176W   /  8:  184.0
 174W   /  9:  186.0
 172W   / 10:  188.0
 170W   / 11:  190.0
 
list /i=1:33 smxy_xs, smxy_ys, smxy
             X: 0.5 to 33.5
 Column  1: SMXY_XS is IF ( SMXY_XS_POS GT 180 ) THEN (SMXY_XS_POS - 360) ELSE SMXY_XS_POS
 Column  2: SMXY_YS is XSEQUENCE(0.0 * X[GX=X_15] + 1.0 * Y[GY=Y_15])
 Column  3: SMXY is XSEQUENCE(SINX + COSYP70)
          SMXY_XS  SMXY_YS   SMXY
1    /  1:   173.0   13.00  0.2437
2    /  2:   174.0   13.00  0.2264
3    /  3:   175.0   13.00  0.2090
4    /  4:   176.0   13.00  0.1916
5    /  5:   177.0   13.00  0.1742
6    /  6:   178.0   13.00  0.1568
7    /  7:   179.0   13.00  0.1393
8    /  8:   180.0   13.00  0.1219
9    /  9:  -179.0   13.00  0.1044
10   / 10:  -178.0   13.00  0.0870
11   / 11:  -177.0   13.00  0.0695
12   / 12:  -176.0   13.00  0.0521
13   / 13:  -175.0   13.00  0.0347
14   / 14:  -174.0   13.00  0.0173
15   / 15:  -173.0   13.00  0.0000
16   / 16:   173.0   14.00  0.2264
17   / 17:   174.0   14.00  0.2091
18   / 18:   175.0   14.00  0.1917
19   / 19:   176.0   14.00  0.1743
20   / 20:   177.0   14.00  0.1569
21   / 21:   178.0   14.00  0.1394
22   / 22:   179.0   14.00  0.1220
23   / 23:   180.0   14.00  0.1045
24   / 24:  -179.0   14.00  0.0871
25   / 25:  -178.0   14.00  0.0696
26   / 26:  -177.0   14.00  0.0522
27   / 27:  -176.0   14.00  0.0348
28   / 28:  -175.0   14.00  0.0174
29   / 29:  -174.0   14.00  0.0000
30   / 30:  -173.0   14.00 -0.0173
31   / 31:   173.0   15.00  0.2090
32   / 32:   174.0   15.00  0.1917
33   / 33:   175.0   15.00  0.1743
let xy_nobs = scat2grid_nobs_xy(smxy_xs, smxy_ys, X[gx=x_11], Y[gy=y_11])
list xy_nobs
             VARIABLE : SCAT2GRID_NOBS_XY(SMXY_XS, SMXY_YS, X[GX=X_11], Y[GY=Y_11])
             SUBSET   : 11 by 11 points (LONGITUDE-LATITUDE)
              170E   172E   174E   176E   178E    180E  178W   176W   174W   172W   170W   
                1      2      3      4      5      6      7      8      9     10     11
 30N   / 11:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 28N   / 10:  0.000  0.000  2.000  2.000  2.000  2.000  2.000  2.000  2.000  1.000  0.000
 26N   /  9:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 24N   /  8:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 22N   /  7:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 20N   /  6:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 18N   /  5:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 16N   /  4:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 14N   /  3:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 12N   /  2:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 10N   /  1:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 
list /i=1:33 smxyt_xs, smxyt_ys, smxyt_ts, smxyt
             X: 0.5 to 33.5
 Column  1: SMXYT_XS is IF ( SMXYT_XS_POS GT 180 ) THEN (SMXYT_XS_POS - 360) ELSE SMXYT_XS_POS
 Column  2: SMXYT_YS is XSEQUENCE(0.0 * X[GX=X_15] + 1.0 * Y[GY=Y_15] + 0.0 * T[GT=T_16])
 Column  3: SMXYT_TS is XSEQUENCE(0.0 * X[GX=X_15] + 0.0 * Y[GY=Y_15] + 1.0 * T[GT=T_16])
 Column  4: SMXYT is XSEQUENCE(SINX + COSYP70 + LOGTP50)
         SMXYT_XS  SMXYT_Y SMXYT_T  SMXYT
1    /  1:   173.0   13.00   273.8  2.754
2    /  2:   174.0   13.00   273.8  2.737
3    /  3:   175.0   13.00   273.8  2.719
4    /  4:   176.0   13.00   273.8  2.702
5    /  5:   177.0   13.00   273.8  2.684
6    /  6:   178.0   13.00   273.8  2.667
7    /  7:   179.0   13.00   273.8  2.650
8    /  8:   180.0   13.00   273.8  2.632
9    /  9:  -179.0   13.00   273.8  2.615
10   / 10:  -178.0   13.00   273.8  2.597
11   / 11:  -177.0   13.00   273.8  2.580
12   / 12:  -176.0   13.00   273.8  2.562
13   / 13:  -175.0   13.00   273.8  2.545
14   / 14:  -174.0   13.00   273.8  2.528
15   / 15:  -173.0   13.00   273.8  2.510
16   / 16:   173.0   14.00   273.8  2.737
17   / 17:   174.0   14.00   273.8  2.719
18   / 18:   175.0   14.00   273.8  2.702
19   / 19:   176.0   14.00   273.8  2.684
20   / 20:   177.0   14.00   273.8  2.667
21   / 21:   178.0   14.00   273.8  2.650
22   / 22:   179.0   14.00   273.8  2.632
23   / 23:   180.0   14.00   273.8  2.615
24   / 24:  -179.0   14.00   273.8  2.597
25   / 25:  -178.0   14.00   273.8  2.580
26   / 26:  -177.0   14.00   273.8  2.562
27   / 27:  -176.0   14.00   273.8  2.545
28   / 28:  -175.0   14.00   273.8  2.528
29   / 29:  -174.0   14.00   273.8  2.510
30   / 30:  -173.0   14.00   273.8  2.493
31   / 31:   173.0   15.00   273.8  2.719
32   / 32:   174.0   15.00   273.8  2.702
33   / 33:   175.0   15.00   273.8  2.685
let xyt_nobs = scat2grid_nobs_xyt(smxyt_xs, smxyt_ys, smxyt_ts, X[gx=x_11], Y[gy=y_11], T[gt=t_12])
list xyt_nobs
             VARIABLE : SCAT2GRID_NOBS_XYT(SMXYT_XS, SMXYT_YS, SMXYT_TS, X[GX=X_11], Y[GY=Y_11], T[GT=T_12])
             SUBSET   : 11 by 11 by 12 points (LONGITUDE-LATITUDE-TIME)
              170E   172E   174E   176E   178E    180E  178W   176W   174W   172W   170W   
                1      2      3      4      5      6      7      8      9     10     11
 ---- L:1 T:   16-JAN-1995 05:00
 30N   / 11:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 28N   / 10:  0.000  0.000  2.000  2.000  2.000  2.000  2.000  2.000  2.000  1.000  0.000
 26N   /  9:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 24N   /  8:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 22N   /  7:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 20N   /  6:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 18N   /  5:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 16N   /  4:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 14N   /  3:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 12N   /  2:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 10N   /  1:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 ---- L:2 T:   15-FEB-1995 15:00
 30N   / 11:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 28N   / 10:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 26N   /  9:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 24N   /  8:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 22N   /  7:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 20N   /  6:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 18N   /  5:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 16N   /  4:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 14N   /  3:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 12N   /  2:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 10N   /  1:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 ---- L:3 T:   18-MAR-1995 01:00
 30N   / 11:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 28N   / 10:  0.000  0.000  2.000  2.000  2.000  2.000  2.000  2.000  2.000  1.000  0.000
 26N   /  9:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 24N   /  8:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 22N   /  7:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 20N   /  6:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 18N   /  5:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 16N   /  4:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 14N   /  3:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 12N   /  2:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 10N   /  1:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 ---- L:4 T:   17-APR-1995 11:00
 30N   / 11:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 28N   / 10:  0.000  0.000  2.000  2.000  2.000  2.000  2.000  2.000  2.000  1.000  0.000
 26N   /  9:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 24N   /  8:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 22N   /  7:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 20N   /  6:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 18N   /  5:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 16N   /  4:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 14N   /  3:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 12N   /  2:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 10N   /  1:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 ---- L:5 T:   17-MAY-1995 21:00
 30N   / 11:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 28N   / 10:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 26N   /  9:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 24N   /  8:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 22N   /  7:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 20N   /  6:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 18N   /  5:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 16N   /  4:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 14N   /  3:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 12N   /  2:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 10N   /  1:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 ---- L:6 T:   17-JUN-1995 07:00
 30N   / 11:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 28N   / 10:  0.000  0.000  2.000  2.000  2.000  2.000  2.000  2.000  2.000  1.000  0.000
 26N   /  9:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 24N   /  8:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 22N   /  7:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 20N   /  6:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 18N   /  5:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 16N   /  4:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 14N   /  3:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 12N   /  2:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 10N   /  1:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 ---- L:7 T:   17-JUL-1995 17:00
 30N   / 11:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 28N   / 10:  0.000  0.000  2.000  2.000  2.000  2.000  2.000  2.000  2.000  1.000  0.000
 26N   /  9:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 24N   /  8:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 22N   /  7:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 20N   /  6:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 18N   /  5:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 16N   /  4:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 14N   /  3:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 12N   /  2:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 10N   /  1:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 ---- L:8 T:   17-AUG-1995 03:00
 30N   / 11:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 28N   / 10:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 26N   /  9:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 24N   /  8:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 22N   /  7:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 20N   /  6:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 18N   /  5:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 16N   /  4:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 14N   /  3:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 12N   /  2:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 10N   /  1:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 ---- L:9 T:   16-SEP-1995 13:00
 30N   / 11:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 28N   / 10:  0.000  0.000  2.000  2.000  2.000  2.000  2.000  2.000  2.000  1.000  0.000
 26N   /  9:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 24N   /  8:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 22N   /  7:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 20N   /  6:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 18N   /  5:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 16N   /  4:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 14N   /  3:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 12N   /  2:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 10N   /  1:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 ---- L:10 T:   16-OCT-1995 23:00
 30N   / 11:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 28N   / 10:  0.000  0.000  2.000  2.000  2.000  2.000  2.000  2.000  2.000  1.000  0.000
 26N   /  9:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 24N   /  8:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 22N   /  7:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 20N   /  6:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 18N   /  5:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 16N   /  4:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 14N   /  3:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 12N   /  2:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 10N   /  1:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 ---- L:11 T:   16-NOV-1995 09:00
 30N   / 11:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 28N   / 10:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 26N   /  9:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 24N   /  8:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 22N   /  7:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 20N   /  6:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 18N   /  5:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 16N   /  4:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 14N   /  3:  0.000  0.000  8.000  8.000  8.000  8.000  8.000  8.000  8.000  4.000  0.000
 12N   /  2:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 10N   /  1:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 ---- L:12 T:   16-DEC-1995 19:00
 30N   / 11:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 28N   / 10:  0.000  0.000  2.000  2.000  2.000  2.000  2.000  2.000  2.000  1.000  0.000
 26N   /  9:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 24N   /  8:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 22N   /  7:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 20N   /  6:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 18N   /  5:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 16N   /  4:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 14N   /  3:  0.000  0.000  4.000  4.000  4.000  4.000  4.000  4.000  4.000  2.000  0.000
 12N   /  2:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 10N   /  1:  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
 
can var /all
can axis t_12
can axis y_11
can axis x_11
can axis t_16
can axis y_15
can axis x_15
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go bn_scat2grid_t
! bn_scat2grid_t.jnl
! test the ave_scat2grid_t and scat2grid_t functions,
! listing the results which can be checked against input
 
define axis/t=0:8760/unit=hours/t0="01-JAN-1995 00:00:00"/edges/npoints=32 t_32
 
let logtp50 = log(T[gt=t_32] + 50.0)
let ltp50_tax = T[gt=t_32]
list ltp50_tax, logtp50
             TIME: 01-JAN-1995 00:00 to 01-JAN-1996 00:00
 Column  1: LTP50_TAX is T[GT=T_32]
 Column  2: LOGTP50 is LOG(T[GT=T_32] + 50.0)
                  LTP50_TAX  LOGTP50
06-JAN-1995 16 /  1:    137.   2.272
18-JAN-1995 02 /  2:    411.   2.663
29-JAN-1995 12 /  3:    684.   2.866
09-FEB-1995 22 /  4:    958.   3.004
21-FEB-1995 07 /  5:   1232.   3.108
04-MAR-1995 17 /  6:   1506.   3.192
16-MAR-1995 03 /  7:   1779.   3.262
27-MAR-1995 13 /  8:   2053.   3.323
07-APR-1995 22 /  9:   2327.   3.376
19-APR-1995 08 / 10:   2601.   3.423
30-APR-1995 18 / 11:   2874.   3.466
12-MAY-1995 04 / 12:   3148.   3.505
23-MAY-1995 13 / 13:   3422.   3.541
03-JUN-1995 23 / 14:   3696.   3.574
15-JUN-1995 09 / 15:   3969.   3.604
26-JUN-1995 19 / 16:   4243.   3.633
08-JUL-1995 04 / 17:   4517.   3.660
19-JUL-1995 14 / 18:   4791.   3.685
31-JUL-1995 00 / 19:   5064.   3.709
11-AUG-1995 10 / 20:   5338.   3.731
22-AUG-1995 19 / 21:   5612.   3.753
03-SEP-1995 05 / 22:   5886.   3.773
14-SEP-1995 15 / 23:   6159.   3.793
26-SEP-1995 01 / 24:   6433.   3.812
07-OCT-1995 10 / 25:   6707.   3.830
18-OCT-1995 20 / 26:   6981.   3.847
30-OCT-1995 06 / 27:   7254.   3.864
10-NOV-1995 16 / 28:   7528.   3.880
22-NOV-1995 01 / 29:   7802.   3.895
03-DEC-1995 11 / 30:   8076.   3.910
14-DEC-1995 21 / 31:   8349.   3.924
26-DEC-1995 07 / 32:   8623.   3.938
 
define axis/t=0:8760/unit=hours/t0="01-JAN-1995 00:00:00"/edges/npoints=12 t_12
let new_tax = T[gt=t_12]
 
let ave_t = ave_scat2grid_t(ltp50_tax, logtp50, new_tax)
let t_cnt = scat2grid_t(ltp50_tax, new_tax)
list new_tax, ave_t, t_cnt
             TIME: 01-JAN-1995 00:00 to 01-JAN-1996 00:00
 Column  1: NEW_TAX is T[GT=T_12]
 Column  2: AVE_T is AVE_SCAT2GRID_T(LTP50_TAX, LOGTP50, NEW_TAX)
 Column  3: T_CNT is SCAT2GRID_T(LTP50_TAX, NEW_TAX)
                 NEW_TAX   AVE_T  T_CNT
16-JAN-1995 /  1:    365.  2.600  3.000
15-FEB-1995 /  2:   1095.  3.056  2.000
18-MAR-1995 /  3:   1825.  3.259  3.000
17-APR-1995 /  4:   2555.  3.422  3.000
17-MAY-1995 /  5:   3285.  3.523  2.000
17-JUN-1995 /  6:   4015.  3.603  3.000
17-JUL-1995 /  7:   4745.  3.684  3.000
17-AUG-1995 /  8:   5475.  3.742  2.000
16-SEP-1995 /  9:   6205.  3.793  3.000
16-OCT-1995 / 10:   6935.  3.847  3.000
16-NOV-1995 / 11:   7665.  3.887  2.000
16-DEC-1995 / 12:   8395.  3.924  3.000
 
can mem /all
can var /all
can axis t_12
can axis t_32
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go bn_transpose
! bn_tranpose.jnl
! test the transpose functions,
! listing the results which can be checked against input
 
def axis /X=0.0:4.0:1.0 xaxs
def axis /Y=0.0:3.0:1.0 yaxs
def axis /Z=0.0:2.0:1.0 zaxs
def axis /T=0.0:1.0:1.0 taxs
 
def grid /X=xaxs /Y=yaxs /Z=zaxs /T=taxs mygrd
set grid mygrd
 
let myvar = X + 5.0 * (Y + 4.0 * (Z + 3.0 * T))
 
list myvar
             VARIABLE : X + 5.0 * (Y + 4.0 * (Z + 3.0 * T))
             SUBSET   : 5 by 4 by 3 by 2 points (X-Y-Z-T)
             0      1      2      3      4    
             1      2      3      4      5
 ---- L:1 T:   0
 ---- K:1 Z:   0
 0   / 1:    0.0    1.0    2.0    3.0    4.0
 1   / 2:    5.0    6.0    7.0    8.0    9.0
 2   / 3:   10.0   11.0   12.0   13.0   14.0
 3   / 4:   15.0   16.0   17.0   18.0   19.0
 ---- K:2 Z:   1
 0   / 1:   20.0   21.0   22.0   23.0   24.0
 1   / 2:   25.0   26.0   27.0   28.0   29.0
 2   / 3:   30.0   31.0   32.0   33.0   34.0
 3   / 4:   35.0   36.0   37.0   38.0   39.0
 ---- K:3 Z:   2
 0   / 1:   40.0   41.0   42.0   43.0   44.0
 1   / 2:   45.0   46.0   47.0   48.0   49.0
 2   / 3:   50.0   51.0   52.0   53.0   54.0
 3   / 4:   55.0   56.0   57.0   58.0   59.0
 ---- L:2 T:   1
 ---- K:1 Z:   0
 0   / 1:   60.0   61.0   62.0   63.0   64.0
 1   / 2:   65.0   66.0   67.0   68.0   69.0
 2   / 3:   70.0   71.0   72.0   73.0   74.0
 3   / 4:   75.0   76.0   77.0   78.0   79.0
 ---- K:2 Z:   1
 0   / 1:   80.0   81.0   82.0   83.0   84.0
 1   / 2:   85.0   86.0   87.0   88.0   89.0
 2   / 3:   90.0   91.0   92.0   93.0   94.0
 3   / 4:   95.0   96.0   97.0   98.0   99.0
 ---- K:3 Z:   2
 0   / 1:  100.0  101.0  102.0  103.0  104.0
 1   / 2:  105.0  106.0  107.0  108.0  109.0
 2   / 3:  110.0  111.0  112.0  113.0  114.0
 3   / 4:  115.0  116.0  117.0  118.0  119.0
list transpose_xy(myvar)
             VARIABLE : TRANSPOSE_XY(MYVAR)
             SUBSET   : 4 by 5 by 3 by 2 points (X-Y-Z-T)
             1      2      3      4    
             1      2      3      4
 ---- L:1 T:   0
 ---- K:1 Z:   0
 1   / 1:    0.0    5.0   10.0   15.0
 2   / 2:    1.0    6.0   11.0   16.0
 3   / 3:    2.0    7.0   12.0   17.0
 4   / 4:    3.0    8.0   13.0   18.0
 5   / 5:    4.0    9.0   14.0   19.0
 ---- K:2 Z:   1
 1   / 1:   20.0   25.0   30.0   35.0
 2   / 2:   21.0   26.0   31.0   36.0
 3   / 3:   22.0   27.0   32.0   37.0
 4   / 4:   23.0   28.0   33.0   38.0
 5   / 5:   24.0   29.0   34.0   39.0
 ---- K:3 Z:   2
 1   / 1:   40.0   45.0   50.0   55.0
 2   / 2:   41.0   46.0   51.0   56.0
 3   / 3:   42.0   47.0   52.0   57.0
 4   / 4:   43.0   48.0   53.0   58.0
 5   / 5:   44.0   49.0   54.0   59.0
 ---- L:2 T:   1
 ---- K:1 Z:   0
 1   / 1:   60.0   65.0   70.0   75.0
 2   / 2:   61.0   66.0   71.0   76.0
 3   / 3:   62.0   67.0   72.0   77.0
 4   / 4:   63.0   68.0   73.0   78.0
 5   / 5:   64.0   69.0   74.0   79.0
 ---- K:2 Z:   1
 1   / 1:   80.0   85.0   90.0   95.0
 2   / 2:   81.0   86.0   91.0   96.0
 3   / 3:   82.0   87.0   92.0   97.0
 4   / 4:   83.0   88.0   93.0   98.0
 5   / 5:   84.0   89.0   94.0   99.0
 ---- K:3 Z:   2
 1   / 1:  100.0  105.0  110.0  115.0
 2   / 2:  101.0  106.0  111.0  116.0
 3   / 3:  102.0  107.0  112.0  117.0
 4   / 4:  103.0  108.0  113.0  118.0
 5   / 5:  104.0  109.0  114.0  119.0
list transpose_xz(myvar)
             VARIABLE : TRANSPOSE_XZ(MYVAR)
             SUBSET   : 3 by 4 by 5 by 2 points (X-Y-Z-T)
             1      2      3    
             1      2      3
 ---- L:1 T:   0
 ---- K:1 Z:   1
 0   / 1:    0.0   20.0   40.0
 1   / 2:    5.0   25.0   45.0
 2   / 3:   10.0   30.0   50.0
 3   / 4:   15.0   35.0   55.0
 ---- K:2 Z:   2
 0   / 1:    1.0   21.0   41.0
 1   / 2:    6.0   26.0   46.0
 2   / 3:   11.0   31.0   51.0
 3   / 4:   16.0   36.0   56.0
 ---- K:3 Z:   3
 0   / 1:    2.0   22.0   42.0
 1   / 2:    7.0   27.0   47.0
 2   / 3:   12.0   32.0   52.0
 3   / 4:   17.0   37.0   57.0
 ---- K:4 Z:   4
 0   / 1:    3.0   23.0   43.0
 1   / 2:    8.0   28.0   48.0
 2   / 3:   13.0   33.0   53.0
 3   / 4:   18.0   38.0   58.0
 ---- K:5 Z:   5
 0   / 1:    4.0   24.0   44.0
 1   / 2:    9.0   29.0   49.0
 2   / 3:   14.0   34.0   54.0
 3   / 4:   19.0   39.0   59.0
 ---- L:2 T:   1
 ---- K:1 Z:   1
 0   / 1:   60.0   80.0  100.0
 1   / 2:   65.0   85.0  105.0
 2   / 3:   70.0   90.0  110.0
 3   / 4:   75.0   95.0  115.0
 ---- K:2 Z:   2
 0   / 1:   61.0   81.0  101.0
 1   / 2:   66.0   86.0  106.0
 2   / 3:   71.0   91.0  111.0
 3   / 4:   76.0   96.0  116.0
 ---- K:3 Z:   3
 0   / 1:   62.0   82.0  102.0
 1   / 2:   67.0   87.0  107.0
 2   / 3:   72.0   92.0  112.0
 3   / 4:   77.0   97.0  117.0
 ---- K:4 Z:   4
 0   / 1:   63.0   83.0  103.0
 1   / 2:   68.0   88.0  108.0
 2   / 3:   73.0   93.0  113.0
 3   / 4:   78.0   98.0  118.0
 ---- K:5 Z:   5
 0   / 1:   64.0   84.0  104.0
 1   / 2:   69.0   89.0  109.0
 2   / 3:   74.0   94.0  114.0
 3   / 4:   79.0   99.0  119.0
list transpose_xt(myvar)
             VARIABLE : TRANSPOSE_XT(MYVAR)
             SUBSET   : 2 by 4 by 3 by 5 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   0
 0   / 1:    0.0   60.0
 1   / 2:    5.0   65.0
 2   / 3:   10.0   70.0
 3   / 4:   15.0   75.0
 ---- K:2 Z:   1
 0   / 1:   20.0   80.0
 1   / 2:   25.0   85.0
 2   / 3:   30.0   90.0
 3   / 4:   35.0   95.0
 ---- K:3 Z:   2
 0   / 1:   40.0  100.0
 1   / 2:   45.0  105.0
 2   / 3:   50.0  110.0
 3   / 4:   55.0  115.0
 ---- L:2 T:   2
 ---- K:1 Z:   0
 0   / 1:    1.0   61.0
 1   / 2:    6.0   66.0
 2   / 3:   11.0   71.0
 3   / 4:   16.0   76.0
 ---- K:2 Z:   1
 0   / 1:   21.0   81.0
 1   / 2:   26.0   86.0
 2   / 3:   31.0   91.0
 3   / 4:   36.0   96.0
 ---- K:3 Z:   2
 0   / 1:   41.0  101.0
 1   / 2:   46.0  106.0
 2   / 3:   51.0  111.0
 3   / 4:   56.0  116.0
 ---- L:3 T:   3
 ---- K:1 Z:   0
 0   / 1:    2.0   62.0
 1   / 2:    7.0   67.0
 2   / 3:   12.0   72.0
 3   / 4:   17.0   77.0
 ---- K:2 Z:   1
 0   / 1:   22.0   82.0
 1   / 2:   27.0   87.0
 2   / 3:   32.0   92.0
 3   / 4:   37.0   97.0
 ---- K:3 Z:   2
 0   / 1:   42.0  102.0
 1   / 2:   47.0  107.0
 2   / 3:   52.0  112.0
 3   / 4:   57.0  117.0
 ---- L:4 T:   4
 ---- K:1 Z:   0
 0   / 1:    3.0   63.0
 1   / 2:    8.0   68.0
 2   / 3:   13.0   73.0
 3   / 4:   18.0   78.0
 ---- K:2 Z:   1
 0   / 1:   23.0   83.0
 1   / 2:   28.0   88.0
 2   / 3:   33.0   93.0
 3   / 4:   38.0   98.0
 ---- K:3 Z:   2
 0   / 1:   43.0  103.0
 1   / 2:   48.0  108.0
 2   / 3:   53.0  113.0
 3   / 4:   58.0  118.0
 ---- L:5 T:   5
 ---- K:1 Z:   0
 0   / 1:    4.0   64.0
 1   / 2:    9.0   69.0
 2   / 3:   14.0   74.0
 3   / 4:   19.0   79.0
 ---- K:2 Z:   1
 0   / 1:   24.0   84.0
 1   / 2:   29.0   89.0
 2   / 3:   34.0   94.0
 3   / 4:   39.0   99.0
 ---- K:3 Z:   2
 0   / 1:   44.0  104.0
 1   / 2:   49.0  109.0
 2   / 3:   54.0  114.0
 3   / 4:   59.0  119.0
list transpose_yz(myvar)
             VARIABLE : TRANSPOSE_YZ(MYVAR)
             SUBSET   : 5 by 3 by 4 by 2 points (X-Y-Z-T)
             0      1      2      3      4    
             1      2      3      4      5
 ---- L:1 T:   0
 ---- K:1 Z:   1
 1   / 1:    0.0    1.0    2.0    3.0    4.0
 2   / 2:   20.0   21.0   22.0   23.0   24.0
 3   / 3:   40.0   41.0   42.0   43.0   44.0
 ---- K:2 Z:   2
 1   / 1:    5.0    6.0    7.0    8.0    9.0
 2   / 2:   25.0   26.0   27.0   28.0   29.0
 3   / 3:   45.0   46.0   47.0   48.0   49.0
 ---- K:3 Z:   3
 1   / 1:   10.0   11.0   12.0   13.0   14.0
 2   / 2:   30.0   31.0   32.0   33.0   34.0
 3   / 3:   50.0   51.0   52.0   53.0   54.0
 ---- K:4 Z:   4
 1   / 1:   15.0   16.0   17.0   18.0   19.0
 2   / 2:   35.0   36.0   37.0   38.0   39.0
 3   / 3:   55.0   56.0   57.0   58.0   59.0
 ---- L:2 T:   1
 ---- K:1 Z:   1
 1   / 1:   60.0   61.0   62.0   63.0   64.0
 2   / 2:   80.0   81.0   82.0   83.0   84.0
 3   / 3:  100.0  101.0  102.0  103.0  104.0
 ---- K:2 Z:   2
 1   / 1:   65.0   66.0   67.0   68.0   69.0
 2   / 2:   85.0   86.0   87.0   88.0   89.0
 3   / 3:  105.0  106.0  107.0  108.0  109.0
 ---- K:3 Z:   3
 1   / 1:   70.0   71.0   72.0   73.0   74.0
 2   / 2:   90.0   91.0   92.0   93.0   94.0
 3   / 3:  110.0  111.0  112.0  113.0  114.0
 ---- K:4 Z:   4
 1   / 1:   75.0   76.0   77.0   78.0   79.0
 2   / 2:   95.0   96.0   97.0   98.0   99.0
 3   / 3:  115.0  116.0  117.0  118.0  119.0
list transpose_yt(myvar)
             VARIABLE : TRANSPOSE_YT(MYVAR)
             SUBSET   : 5 by 2 by 3 by 4 points (X-Y-Z-T)
             0      1      2      3      4    
             1      2      3      4      5
 ---- L:1 T:   1
 ---- K:1 Z:   0
 1   / 1:    0.0    1.0    2.0    3.0    4.0
 2   / 2:   60.0   61.0   62.0   63.0   64.0
 ---- K:2 Z:   1
 1   / 1:   20.0   21.0   22.0   23.0   24.0
 2   / 2:   80.0   81.0   82.0   83.0   84.0
 ---- K:3 Z:   2
 1   / 1:   40.0   41.0   42.0   43.0   44.0
 2   / 2:  100.0  101.0  102.0  103.0  104.0
 ---- L:2 T:   2
 ---- K:1 Z:   0
 1   / 1:    5.0    6.0    7.0    8.0    9.0
 2   / 2:   65.0   66.0   67.0   68.0   69.0
 ---- K:2 Z:   1
 1   / 1:   25.0   26.0   27.0   28.0   29.0
 2   / 2:   85.0   86.0   87.0   88.0   89.0
 ---- K:3 Z:   2
 1   / 1:   45.0   46.0   47.0   48.0   49.0
 2   / 2:  105.0  106.0  107.0  108.0  109.0
 ---- L:3 T:   3
 ---- K:1 Z:   0
 1   / 1:   10.0   11.0   12.0   13.0   14.0
 2   / 2:   70.0   71.0   72.0   73.0   74.0
 ---- K:2 Z:   1
 1   / 1:   30.0   31.0   32.0   33.0   34.0
 2   / 2:   90.0   91.0   92.0   93.0   94.0
 ---- K:3 Z:   2
 1   / 1:   50.0   51.0   52.0   53.0   54.0
 2   / 2:  110.0  111.0  112.0  113.0  114.0
 ---- L:4 T:   4
 ---- K:1 Z:   0
 1   / 1:   15.0   16.0   17.0   18.0   19.0
 2   / 2:   75.0   76.0   77.0   78.0   79.0
 ---- K:2 Z:   1
 1   / 1:   35.0   36.0   37.0   38.0   39.0
 2   / 2:   95.0   96.0   97.0   98.0   99.0
 ---- K:3 Z:   2
 1   / 1:   55.0   56.0   57.0   58.0   59.0
 2   / 2:  115.0  116.0  117.0  118.0  119.0
list transpose_zt(myvar)
             VARIABLE : TRANSPOSE_ZT(MYVAR)
             SUBSET   : 5 by 4 by 2 by 3 points (X-Y-Z-T)
             0      1      2      3      4    
             1      2      3      4      5
 ---- L:1 T:   1
 ---- K:1 Z:   1
 0   / 1:    0.0    1.0    2.0    3.0    4.0
 1   / 2:    5.0    6.0    7.0    8.0    9.0
 2   / 3:   10.0   11.0   12.0   13.0   14.0
 3   / 4:   15.0   16.0   17.0   18.0   19.0
 ---- K:2 Z:   2
 0   / 1:   60.0   61.0   62.0   63.0   64.0
 1   / 2:   65.0   66.0   67.0   68.0   69.0
 2   / 3:   70.0   71.0   72.0   73.0   74.0
 3   / 4:   75.0   76.0   77.0   78.0   79.0
 ---- L:2 T:   2
 ---- K:1 Z:   1
 0   / 1:   20.0   21.0   22.0   23.0   24.0
 1   / 2:   25.0   26.0   27.0   28.0   29.0
 2   / 3:   30.0   31.0   32.0   33.0   34.0
 3   / 4:   35.0   36.0   37.0   38.0   39.0
 ---- K:2 Z:   2
 0   / 1:   80.0   81.0   82.0   83.0   84.0
 1   / 2:   85.0   86.0   87.0   88.0   89.0
 2   / 3:   90.0   91.0   92.0   93.0   94.0
 3   / 4:   95.0   96.0   97.0   98.0   99.0
 ---- L:3 T:   3
 ---- K:1 Z:   1
 0   / 1:   40.0   41.0   42.0   43.0   44.0
 1   / 2:   45.0   46.0   47.0   48.0   49.0
 2   / 3:   50.0   51.0   52.0   53.0   54.0
 3   / 4:   55.0   56.0   57.0   58.0   59.0
 ---- K:2 Z:   2
 0   / 1:  100.0  101.0  102.0  103.0  104.0
 1   / 2:  105.0  106.0  107.0  108.0  109.0
 2   / 3:  110.0  111.0  112.0  113.0  114.0
 3   / 4:  115.0  116.0  117.0  118.0  119.0
 
def axis /X=0.0:4.0:1.0/units=degrees_east xaxs
def axis /Y=0.0:3.0:1.0/units=degrees_north yaxs
def axis /Z=0.0:1.4:0.2/units=m/depth zaxs
def axis /T=0.0:6.0:1.0/units=days/t0=1-jan-2001 taxs
def axis /E=0.0:10.0:5 eaxs
def axis /F=0.0:100.0:20 faxs
def grid /X=xaxs /Y=yaxs /Z=zaxs /T=taxs /E=eaxs /F=faxs mygrd
 
set grid mygrd
let myvar = X + 5.0 * (Y + 4.0 * (Z + 3.0 * T)) + _E - _F
 
 
! * * * * Simple XYZTEF examples * * *
 
list/x=1/y=1/z=1/t=1 myvar
             VARIABLE : X + 5.0 * (Y + 4.0 * (Z + 3.0 * T)) + _E - _F
             SUBSET   : 3 by 6 points (E-F)
             LONGITUDE: 1E
             LATITUDE : 1N
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
               0      5     10    
               1      2      3
 0     / 1:  86.00  91.00  96.00
 20    / 2:  66.00  71.00  76.00
 40    / 3:  46.00  51.00  56.00
 60    / 4:  26.00  31.00  36.00
 80    / 5:   6.00  11.00  16.00
 100   / 6: -14.00  -9.00  -4.00
list/x=1/y=1/z=1/t=1 transpose_ef(myvar)
             VARIABLE : TRANSPOSE_EF(MYVAR)
             SUBSET   : 6 by 3 points (E-F)
             LONGITUDE: 1E
             LATITUDE : 1N
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
             1      2      3      4      5      6    
             1      2      3      4      5      6
 1   / 1:  86.00  66.00  46.00  26.00   6.00 -14.00
 2   / 2:  91.00  71.00  51.00  31.00  11.00  -9.00
 3   / 3:  96.00  76.00  56.00  36.00  16.00  -4.00
 
list/e=5/y=1/z=1/t=1 myvar
             VARIABLE : X + 5.0 * (Y + 4.0 * (Z + 3.0 * T)) + _E - _F
             SUBSET   : 5 by 6 points (LONGITUDE-F)
             LATITUDE : 1N
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
             E        : 5
              0E     1E     2E     3E     4E    
               1      2      3      4      5
 0     / 1:  90.00  91.00  92.00  93.00  94.00
 20    / 2:  70.00  71.00  72.00  73.00  74.00
 40    / 3:  50.00  51.00  52.00  53.00  54.00
 60    / 4:  30.00  31.00  32.00  33.00  34.00
 80    / 5:  10.00  11.00  12.00  13.00  14.00
 100   / 6: -10.00  -9.00  -8.00  -7.00  -6.00
list/e=5/y=1/z=1/t=1 transpose_xf(myvar)
             VARIABLE : TRANSPOSE_XF(MYVAR)
             SUBSET   : 6 by 5 points (X-F)
             LATITUDE : 1N
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
             E        : 5
             1      2      3      4      5      6    
             1      2      3      4      5      6
 1   / 1:  90.00  70.00  50.00  30.00  10.00 -10.00
 2   / 2:  91.00  71.00  51.00  31.00  11.00  -9.00
 3   / 3:  92.00  72.00  52.00  32.00  12.00  -8.00
 4   / 4:  93.00  73.00  53.00  33.00  13.00  -7.00
 5   / 5:  94.00  74.00  54.00  34.00  14.00  -6.00
list/F=25/y=1/z=1/t=1 myvar
             VARIABLE : X + 5.0 * (Y + 4.0 * (Z + 3.0 * T)) + _E - _F
             SUBSET   : 5 by 3 points (LONGITUDE-E)
             LATITUDE : 1N
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
             F        : 20
             0E     1E     2E     3E     4E    
              1      2      3      4      5
 0    / 1:  65.00  66.00  67.00  68.00  69.00
 5    / 2:  70.00  71.00  72.00  73.00  74.00
 10   / 3:  75.00  76.00  77.00  78.00  79.00
list/F=25/y=1/z=1/t=1 transpose_xe(myvar)
             VARIABLE : TRANSPOSE_XE(MYVAR)
             SUBSET   : 3 by 5 points (X-E)
             LATITUDE : 1N
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
             F        : 20
             1      2      3    
             1      2      3
 1   / 1:  65.00  70.00  75.00
 2   / 2:  66.00  71.00  76.00
 3   / 3:  67.00  72.00  77.00
 4   / 4:  68.00  73.00  78.00
 5   / 5:  69.00  74.00  79.00
 
list/e=5/x=1/z=1/t=1 myvar
             VARIABLE : X + 5.0 * (Y + 4.0 * (Z + 3.0 * T)) + _E - _F
             SUBSET   : 4 by 6 points (LATITUDE-F)
             LONGITUDE: 1E
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
             E        : 5
               0     1N     2N     3N    
               1      2      3      4
 0     / 1:   86.0   91.0   96.0  101.0
 20    / 2:   66.0   71.0   76.0   81.0
 40    / 3:   46.0   51.0   56.0   61.0
 60    / 4:   26.0   31.0   36.0   41.0
 80    / 5:    6.0   11.0   16.0   21.0
 100   / 6:  -14.0   -9.0   -4.0    1.0
list/e=5/x=1/z=1/t=1 transpose_yf(myvar)
             VARIABLE : TRANSPOSE_YF(MYVAR)
             SUBSET   : 6 by 4 points (Y-F)
             LONGITUDE: 1E
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
             E        : 5
             1      2      3      4      5      6    
             1      2      3      4      5      6
 1   / 1:   86.0   66.0   46.0   26.0    6.0  -14.0
 2   / 2:   91.0   71.0   51.0   31.0   11.0   -9.0
 3   / 3:   96.0   76.0   56.0   36.0   16.0   -4.0
 4   / 4:  101.0   81.0   61.0   41.0   21.0    1.0
list/F=25/x=1/z=1/t=1 myvar
             VARIABLE : X + 5.0 * (Y + 4.0 * (Z + 3.0 * T)) + _E - _F
             SUBSET   : 4 by 3 points (LATITUDE-E)
             LONGITUDE: 1E
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
             F        : 20
              0     1N     2N     3N    
              1      2      3      4
 0    / 1:  61.00  66.00  71.00  76.00
 5    / 2:  66.00  71.00  76.00  81.00
 10   / 3:  71.00  76.00  81.00  86.00
list/F=25/x=1/z=1/t=1 transpose_ye(myvar)
             VARIABLE : TRANSPOSE_YE(MYVAR)
             SUBSET   : 3 by 4 points (Y-E)
             LONGITUDE: 1E
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
             F        : 20
             1      2      3    
             1      2      3
 1   / 1:  61.00  66.00  71.00
 2   / 2:  66.00  71.00  76.00
 3   / 3:  71.00  76.00  81.00
 4   / 4:  76.00  81.00  86.00
 
list/e=5/x=1/y=1/t=1 myvar
             VARIABLE : X + 5.0 * (Y + 4.0 * (Z + 3.0 * T)) + _E - _F
             SUBSET   : 8 by 6 points (DEPTH (m)-F)
             LONGITUDE: 1E
             LATITUDE : 1N
             TIME     : 02-JAN-2001 00:00
             E        : 5
              0      0.2    0.4    0.6    0.8    1      1.2    1.4   
               1      2      3      4      5      6      7      8
 0     / 1:  71.00  75.00  79.00  83.00  87.00  91.00  95.00  99.00
 20    / 2:  51.00  55.00  59.00  63.00  67.00  71.00  75.00  79.00
 40    / 3:  31.00  35.00  39.00  43.00  47.00  51.00  55.00  59.00
 60    / 4:  11.00  15.00  19.00  23.00  27.00  31.00  35.00  39.00
 80    / 5:  -9.00  -5.00  -1.00   3.00   7.00  11.00  15.00  19.00
 100   / 6: -29.00 -25.00 -21.00 -17.00 -13.00  -9.00  -5.00  -1.00
list/e=5/x=1/y=1/t=1 transpose_zf(myvar)
             VARIABLE : TRANSPOSE_ZF(MYVAR)
             SUBSET   : 6 by 8 points (Z-F)
             LONGITUDE: 1E
             LATITUDE : 1N
             TIME     : 02-JAN-2001 00:00
             E        : 5
             1      2      3      4      5      6    
             1      2      3      4      5      6
 1   / 1:  71.00  51.00  31.00  11.00  -9.00 -29.00
 2   / 2:  75.00  55.00  35.00  15.00  -5.00 -25.00
 3   / 3:  79.00  59.00  39.00  19.00  -1.00 -21.00
 4   / 4:  83.00  63.00  43.00  23.00   3.00 -17.00
 5   / 5:  87.00  67.00  47.00  27.00   7.00 -13.00
 6   / 6:  91.00  71.00  51.00  31.00  11.00  -9.00
 7   / 7:  95.00  75.00  55.00  35.00  15.00  -5.00
 8   / 8:  99.00  79.00  59.00  39.00  19.00  -1.00
list/F=25/x=1/y=1/t=1 myvar
             VARIABLE : X + 5.0 * (Y + 4.0 * (Z + 3.0 * T)) + _E - _F
             SUBSET   : 8 by 3 points (DEPTH (m)-E)
             LONGITUDE: 1E
             LATITUDE : 1N
             TIME     : 02-JAN-2001 00:00
             F        : 20
             0      0.2    0.4    0.6    0.8    1      1.2    1.4   
              1      2      3      4      5      6      7      8
 0    / 1:  46.00  50.00  54.00  58.00  62.00  66.00  70.00  74.00
 5    / 2:  51.00  55.00  59.00  63.00  67.00  71.00  75.00  79.00
 10   / 3:  56.00  60.00  64.00  68.00  72.00  76.00  80.00  84.00
list/F=25/x=1/y=1/t=1 transpose_ze(myvar)
             VARIABLE : TRANSPOSE_ZE(MYVAR)
             SUBSET   : 3 by 8 points (Z-E)
             LONGITUDE: 1E
             LATITUDE : 1N
             TIME     : 02-JAN-2001 00:00
             F        : 20
             1      2      3    
             1      2      3
 1   / 1:  46.00  51.00  56.00
 2   / 2:  50.00  55.00  60.00
 3   / 3:  54.00  59.00  64.00
 4   / 4:  58.00  63.00  68.00
 5   / 5:  62.00  67.00  72.00
 6   / 6:  66.00  71.00  76.00
 7   / 7:  70.00  75.00  80.00
 8   / 8:  74.00  79.00  84.00
 
list/e=5/x=1/y=1/z=1 myvar
             VARIABLE : X + 5.0 * (Y + 4.0 * (Z + 3.0 * T)) + _E - _F
             SUBSET   : 7 by 6 points (TIME-F)
             LONGITUDE: 1E
             LATITUDE : 1N
             DEPTH (m): 1
             E        : 5
              2001   2001   2001   2001   2001   2001   2001  
               1      2      3      4      5      6      7
 0     / 1:   31.0   91.0  151.0  211.0  271.0  331.0  391.0
 20    / 2:   11.0   71.0  131.0  191.0  251.0  311.0  371.0
 40    / 3:   -9.0   51.0  111.0  171.0  231.0  291.0  351.0
 60    / 4:  -29.0   31.0   91.0  151.0  211.0  271.0  331.0
 80    / 5:  -49.0   11.0   71.0  131.0  191.0  251.0  311.0
 100   / 6:  -69.0   -9.0   51.0  111.0  171.0  231.0  291.0
list/e=5/x=1/y=1/z=1 transpose_tf(myvar)
             VARIABLE : TRANSPOSE_TF(MYVAR)
             SUBSET   : 6 by 7 points (T-F)
             LONGITUDE: 1E
             LATITUDE : 1N
             DEPTH (m): 1
             E        : 5
             1      2      3      4      5      6    
             1      2      3      4      5      6
 1   / 1:   31.0   11.0   -9.0  -29.0  -49.0  -69.0
 2   / 2:   91.0   71.0   51.0   31.0   11.0   -9.0
 3   / 3:  151.0  131.0  111.0   91.0   71.0   51.0
 4   / 4:  211.0  191.0  171.0  151.0  131.0  111.0
 5   / 5:  271.0  251.0  231.0  211.0  191.0  171.0
 6   / 6:  331.0  311.0  291.0  271.0  251.0  231.0
 7   / 7:  391.0  371.0  351.0  331.0  311.0  291.0
list/F=25/x=1/y=1/z=1 myvar
             VARIABLE : X + 5.0 * (Y + 4.0 * (Z + 3.0 * T)) + _E - _F
             SUBSET   : 7 by 3 points (TIME-E)
             LONGITUDE: 1E
             LATITUDE : 1N
             DEPTH (m): 1
             F        : 20
             2001   2001   2001   2001   2001   2001   2001  
              1      2      3      4      5      6      7
 0    / 1:    6.0   66.0  126.0  186.0  246.0  306.0  366.0
 5    / 2:   11.0   71.0  131.0  191.0  251.0  311.0  371.0
 10   / 3:   16.0   76.0  136.0  196.0  256.0  316.0  376.0
list/F=25/x=1/y=1/z=1 transpose_te(myvar)
             VARIABLE : TRANSPOSE_TE(MYVAR)
             SUBSET   : 3 by 7 points (T-E)
             LONGITUDE: 1E
             LATITUDE : 1N
             DEPTH (m): 1
             F        : 20
             1      2      3    
             1      2      3
 1   / 1:    6.0   11.0   16.0
 2   / 2:   66.0   71.0   76.0
 3   / 3:  126.0  131.0  136.0
 4   / 4:  186.0  191.0  196.0
 5   / 5:  246.0  251.0  256.0
 6   / 6:  306.0  311.0  316.0
 7   / 7:  366.0  371.0  376.0
 
 
! * * * *  XYZTEF examples with another dimension * * *
 
list/y=1/z=1/t=1 myvar
             VARIABLE : X + 5.0 * (Y + 4.0 * (Z + 3.0 * T)) + _E - _F
             SUBSET   : 5 by 3 by 6 points (LONGITUDE-E-F)
             LATITUDE : 1N
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
             0E     1E     2E     3E     4E    
              1      2      3      4      5
 ---- N:1 F:   0
 0    / 1:  85.00  86.00  87.00  88.00  89.00
 5    / 2:  90.00  91.00  92.00  93.00  94.00
 10   / 3:  95.00  96.00  97.00  98.00  99.00
 ---- N:2 F:   20
 0    / 1:  65.00  66.00  67.00  68.00  69.00
 5    / 2:  70.00  71.00  72.00  73.00  74.00
 10   / 3:  75.00  76.00  77.00  78.00  79.00
 ---- N:3 F:   40
 0    / 1:  45.00  46.00  47.00  48.00  49.00
 5    / 2:  50.00  51.00  52.00  53.00  54.00
 10   / 3:  55.00  56.00  57.00  58.00  59.00
 ---- N:4 F:   60
 0    / 1:  25.00  26.00  27.00  28.00  29.00
 5    / 2:  30.00  31.00  32.00  33.00  34.00
 10   / 3:  35.00  36.00  37.00  38.00  39.00
 ---- N:5 F:   80
 0    / 1:   5.00   6.00   7.00   8.00   9.00
 5    / 2:  10.00  11.00  12.00  13.00  14.00
 10   / 3:  15.00  16.00  17.00  18.00  19.00
 ---- N:6 F:   100
 0    / 1: -15.00 -14.00 -13.00 -12.00 -11.00
 5    / 2: -10.00  -9.00  -8.00  -7.00  -6.00
 10   / 3:  -5.00  -4.00  -3.00  -2.00  -1.00
list/y=1/z=1/t=1 transpose_ef(myvar)
             VARIABLE : TRANSPOSE_EF(MYVAR)
             SUBSET   : 5 by 6 by 3 points (LONGITUDE-E-F)
             LATITUDE : 1N
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
            0E     1E     2E     3E     4E    
             1      2      3      4      5
 ---- N:1 F:   1
 1   / 1:  85.00  86.00  87.00  88.00  89.00
 2   / 2:  65.00  66.00  67.00  68.00  69.00
 3   / 3:  45.00  46.00  47.00  48.00  49.00
 4   / 4:  25.00  26.00  27.00  28.00  29.00
 5   / 5:   5.00   6.00   7.00   8.00   9.00
 6   / 6: -15.00 -14.00 -13.00 -12.00 -11.00
 ---- N:2 F:   2
 1   / 1:  90.00  91.00  92.00  93.00  94.00
 2   / 2:  70.00  71.00  72.00  73.00  74.00
 3   / 3:  50.00  51.00  52.00  53.00  54.00
 4   / 4:  30.00  31.00  32.00  33.00  34.00
 5   / 5:  10.00  11.00  12.00  13.00  14.00
 6   / 6: -10.00  -9.00  -8.00  -7.00  -6.00
 ---- N:3 F:   3
 1   / 1:  95.00  96.00  97.00  98.00  99.00
 2   / 2:  75.00  76.00  77.00  78.00  79.00
 3   / 3:  55.00  56.00  57.00  58.00  59.00
 4   / 4:  35.00  36.00  37.00  38.00  39.00
 5   / 5:  15.00  16.00  17.00  18.00  19.00
 6   / 6:  -5.00  -4.00  -3.00  -2.00  -1.00
 
list/e=5/z=1/t=1 myvar
             VARIABLE : X + 5.0 * (Y + 4.0 * (Z + 3.0 * T)) + _E - _F
             SUBSET   : 5 by 4 by 6 points (LONGITUDE-LATITUDE-F)
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
             E        : 5
             0E     1E     2E     3E     4E    
              1      2      3      4      5
 ---- N:1 F:   0
 3N   / 4:  100.0  101.0  102.0  103.0  104.0
 2N   / 3:   95.0   96.0   97.0   98.0   99.0
 1N   / 2:   90.0   91.0   92.0   93.0   94.0
 0    / 1:   85.0   86.0   87.0   88.0   89.0
 ---- N:2 F:   20
 3N   / 4:   80.0   81.0   82.0   83.0   84.0
 2N   / 3:   75.0   76.0   77.0   78.0   79.0
 1N   / 2:   70.0   71.0   72.0   73.0   74.0
 0    / 1:   65.0   66.0   67.0   68.0   69.0
 ---- N:3 F:   40
 3N   / 4:   60.0   61.0   62.0   63.0   64.0
 2N   / 3:   55.0   56.0   57.0   58.0   59.0
 1N   / 2:   50.0   51.0   52.0   53.0   54.0
 0    / 1:   45.0   46.0   47.0   48.0   49.0
 ---- N:4 F:   60
 3N   / 4:   40.0   41.0   42.0   43.0   44.0
 2N   / 3:   35.0   36.0   37.0   38.0   39.0
 1N   / 2:   30.0   31.0   32.0   33.0   34.0
 0    / 1:   25.0   26.0   27.0   28.0   29.0
 ---- N:5 F:   80
 3N   / 4:   20.0   21.0   22.0   23.0   24.0
 2N   / 3:   15.0   16.0   17.0   18.0   19.0
 1N   / 2:   10.0   11.0   12.0   13.0   14.0
 0    / 1:    5.0    6.0    7.0    8.0    9.0
 ---- N:6 F:   100
 3N   / 4:    0.0    1.0    2.0    3.0    4.0
 2N   / 3:   -5.0   -4.0   -3.0   -2.0   -1.0
 1N   / 2:  -10.0   -9.0   -8.0   -7.0   -6.0
 0    / 1:  -15.0  -14.0  -13.0  -12.0  -11.0
list/e=5/z=1/t=1 transpose_xf(myvar)
             VARIABLE : TRANSPOSE_XF(MYVAR)
             SUBSET   : 6 by 4 by 5 points (X-LATITUDE-F)
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
             E        : 5
              1      2      3      4      5      6    
              1      2      3      4      5      6
 ---- N:1 F:   1
 3N   / 4:  100.0   80.0   60.0   40.0   20.0    0.0
 2N   / 3:   95.0   75.0   55.0   35.0   15.0   -5.0
 1N   / 2:   90.0   70.0   50.0   30.0   10.0  -10.0
 0    / 1:   85.0   65.0   45.0   25.0    5.0  -15.0
 ---- N:2 F:   2
 3N   / 4:  101.0   81.0   61.0   41.0   21.0    1.0
 2N   / 3:   96.0   76.0   56.0   36.0   16.0   -4.0
 1N   / 2:   91.0   71.0   51.0   31.0   11.0   -9.0
 0    / 1:   86.0   66.0   46.0   26.0    6.0  -14.0
 ---- N:3 F:   3
 3N   / 4:  102.0   82.0   62.0   42.0   22.0    2.0
 2N   / 3:   97.0   77.0   57.0   37.0   17.0   -3.0
 1N   / 2:   92.0   72.0   52.0   32.0   12.0   -8.0
 0    / 1:   87.0   67.0   47.0   27.0    7.0  -13.0
 ---- N:4 F:   4
 3N   / 4:  103.0   83.0   63.0   43.0   23.0    3.0
 2N   / 3:   98.0   78.0   58.0   38.0   18.0   -2.0
 1N   / 2:   93.0   73.0   53.0   33.0   13.0   -7.0
 0    / 1:   88.0   68.0   48.0   28.0    8.0  -12.0
 ---- N:5 F:   5
 3N   / 4:  104.0   84.0   64.0   44.0   24.0    4.0
 2N   / 3:   99.0   79.0   59.0   39.0   19.0   -1.0
 1N   / 2:   94.0   74.0   54.0   34.0   14.0   -6.0
 0    / 1:   89.0   69.0   49.0   29.0    9.0  -11.0
list/F=25/z=1/t=1 myvar
             VARIABLE : X + 5.0 * (Y + 4.0 * (Z + 3.0 * T)) + _E - _F
             SUBSET   : 5 by 4 by 3 points (LONGITUDE-LATITUDE-E)
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
             F        : 20
             0E     1E     2E     3E     4E    
              1      2      3      4      5
 ---- M:1 E:   0
 3N   / 4:  75.00  76.00  77.00  78.00  79.00
 2N   / 3:  70.00  71.00  72.00  73.00  74.00
 1N   / 2:  65.00  66.00  67.00  68.00  69.00
 0    / 1:  60.00  61.00  62.00  63.00  64.00
 ---- M:2 E:   5
 3N   / 4:  80.00  81.00  82.00  83.00  84.00
 2N   / 3:  75.00  76.00  77.00  78.00  79.00
 1N   / 2:  70.00  71.00  72.00  73.00  74.00
 0    / 1:  65.00  66.00  67.00  68.00  69.00
 ---- M:3 E:   10
 3N   / 4:  85.00  86.00  87.00  88.00  89.00
 2N   / 3:  80.00  81.00  82.00  83.00  84.00
 1N   / 2:  75.00  76.00  77.00  78.00  79.00
 0    / 1:  70.00  71.00  72.00  73.00  74.00
list/F=25/z=1/t=1 transpose_xe(myvar)
             VARIABLE : TRANSPOSE_XE(MYVAR)
             SUBSET   : 3 by 4 by 5 points (X-LATITUDE-E)
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
             F        : 20
              1      2      3    
              1      2      3
 ---- M:1 E:   1
 3N   / 4:  75.00  80.00  85.00
 2N   / 3:  70.00  75.00  80.00
 1N   / 2:  65.00  70.00  75.00
 0    / 1:  60.00  65.00  70.00
 ---- M:2 E:   2
 3N   / 4:  76.00  81.00  86.00
 2N   / 3:  71.00  76.00  81.00
 1N   / 2:  66.00  71.00  76.00
 0    / 1:  61.00  66.00  71.00
 ---- M:3 E:   3
 3N   / 4:  77.00  82.00  87.00
 2N   / 3:  72.00  77.00  82.00
 1N   / 2:  67.00  72.00  77.00
 0    / 1:  62.00  67.00  72.00
 ---- M:4 E:   4
 3N   / 4:  78.00  83.00  88.00
 2N   / 3:  73.00  78.00  83.00
 1N   / 2:  68.00  73.00  78.00
 0    / 1:  63.00  68.00  73.00
 ---- M:5 E:   5
 3N   / 4:  79.00  84.00  89.00
 2N   / 3:  74.00  79.00  84.00
 1N   / 2:  69.00  74.00  79.00
 0    / 1:  64.00  69.00  74.00
 
list/e=5/z=1/t=1 myvar
             VARIABLE : X + 5.0 * (Y + 4.0 * (Z + 3.0 * T)) + _E - _F
             SUBSET   : 5 by 4 by 6 points (LONGITUDE-LATITUDE-F)
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
             E        : 5
             0E     1E     2E     3E     4E    
              1      2      3      4      5
 ---- N:1 F:   0
 3N   / 4:  100.0  101.0  102.0  103.0  104.0
 2N   / 3:   95.0   96.0   97.0   98.0   99.0
 1N   / 2:   90.0   91.0   92.0   93.0   94.0
 0    / 1:   85.0   86.0   87.0   88.0   89.0
 ---- N:2 F:   20
 3N   / 4:   80.0   81.0   82.0   83.0   84.0
 2N   / 3:   75.0   76.0   77.0   78.0   79.0
 1N   / 2:   70.0   71.0   72.0   73.0   74.0
 0    / 1:   65.0   66.0   67.0   68.0   69.0
 ---- N:3 F:   40
 3N   / 4:   60.0   61.0   62.0   63.0   64.0
 2N   / 3:   55.0   56.0   57.0   58.0   59.0
 1N   / 2:   50.0   51.0   52.0   53.0   54.0
 0    / 1:   45.0   46.0   47.0   48.0   49.0
 ---- N:4 F:   60
 3N   / 4:   40.0   41.0   42.0   43.0   44.0
 2N   / 3:   35.0   36.0   37.0   38.0   39.0
 1N   / 2:   30.0   31.0   32.0   33.0   34.0
 0    / 1:   25.0   26.0   27.0   28.0   29.0
 ---- N:5 F:   80
 3N   / 4:   20.0   21.0   22.0   23.0   24.0
 2N   / 3:   15.0   16.0   17.0   18.0   19.0
 1N   / 2:   10.0   11.0   12.0   13.0   14.0
 0    / 1:    5.0    6.0    7.0    8.0    9.0
 ---- N:6 F:   100
 3N   / 4:    0.0    1.0    2.0    3.0    4.0
 2N   / 3:   -5.0   -4.0   -3.0   -2.0   -1.0
 1N   / 2:  -10.0   -9.0   -8.0   -7.0   -6.0
 0    / 1:  -15.0  -14.0  -13.0  -12.0  -11.0
list/e=5/z=1/t=1 transpose_yf(myvar)
             VARIABLE : TRANSPOSE_YF(MYVAR)
             SUBSET   : 5 by 6 by 4 points (LONGITUDE-Y-F)
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
             E        : 5
            0E     1E     2E     3E     4E    
             1      2      3      4      5
 ---- N:1 F:   1
 1   / 1:   85.0   86.0   87.0   88.0   89.0
 2   / 2:   65.0   66.0   67.0   68.0   69.0
 3   / 3:   45.0   46.0   47.0   48.0   49.0
 4   / 4:   25.0   26.0   27.0   28.0   29.0
 5   / 5:    5.0    6.0    7.0    8.0    9.0
 6   / 6:  -15.0  -14.0  -13.0  -12.0  -11.0
 ---- N:2 F:   2
 1   / 1:   90.0   91.0   92.0   93.0   94.0
 2   / 2:   70.0   71.0   72.0   73.0   74.0
 3   / 3:   50.0   51.0   52.0   53.0   54.0
 4   / 4:   30.0   31.0   32.0   33.0   34.0
 5   / 5:   10.0   11.0   12.0   13.0   14.0
 6   / 6:  -10.0   -9.0   -8.0   -7.0   -6.0
 ---- N:3 F:   3
 1   / 1:   95.0   96.0   97.0   98.0   99.0
 2   / 2:   75.0   76.0   77.0   78.0   79.0
 3   / 3:   55.0   56.0   57.0   58.0   59.0
 4   / 4:   35.0   36.0   37.0   38.0   39.0
 5   / 5:   15.0   16.0   17.0   18.0   19.0
 6   / 6:   -5.0   -4.0   -3.0   -2.0   -1.0
 ---- N:4 F:   4
 1   / 1:  100.0  101.0  102.0  103.0  104.0
 2   / 2:   80.0   81.0   82.0   83.0   84.0
 3   / 3:   60.0   61.0   62.0   63.0   64.0
 4   / 4:   40.0   41.0   42.0   43.0   44.0
 5   / 5:   20.0   21.0   22.0   23.0   24.0
 6   / 6:    0.0    1.0    2.0    3.0    4.0
list/F=25/z=1/t=1 myvar
             VARIABLE : X + 5.0 * (Y + 4.0 * (Z + 3.0 * T)) + _E - _F
             SUBSET   : 5 by 4 by 3 points (LONGITUDE-LATITUDE-E)
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
             F        : 20
             0E     1E     2E     3E     4E    
              1      2      3      4      5
 ---- M:1 E:   0
 3N   / 4:  75.00  76.00  77.00  78.00  79.00
 2N   / 3:  70.00  71.00  72.00  73.00  74.00
 1N   / 2:  65.00  66.00  67.00  68.00  69.00
 0    / 1:  60.00  61.00  62.00  63.00  64.00
 ---- M:2 E:   5
 3N   / 4:  80.00  81.00  82.00  83.00  84.00
 2N   / 3:  75.00  76.00  77.00  78.00  79.00
 1N   / 2:  70.00  71.00  72.00  73.00  74.00
 0    / 1:  65.00  66.00  67.00  68.00  69.00
 ---- M:3 E:   10
 3N   / 4:  85.00  86.00  87.00  88.00  89.00
 2N   / 3:  80.00  81.00  82.00  83.00  84.00
 1N   / 2:  75.00  76.00  77.00  78.00  79.00
 0    / 1:  70.00  71.00  72.00  73.00  74.00
list/F=25/z=1/t=1 transpose_ye(myvar)
             VARIABLE : TRANSPOSE_YE(MYVAR)
             SUBSET   : 5 by 3 by 4 points (LONGITUDE-Y-E)
             DEPTH (m): 1
             TIME     : 02-JAN-2001 00:00
             F        : 20
            0E     1E     2E     3E     4E    
             1      2      3      4      5
 ---- M:1 E:   1
 1   / 1:  60.00  61.00  62.00  63.00  64.00
 2   / 2:  65.00  66.00  67.00  68.00  69.00
 3   / 3:  70.00  71.00  72.00  73.00  74.00
 ---- M:2 E:   2
 1   / 1:  65.00  66.00  67.00  68.00  69.00
 2   / 2:  70.00  71.00  72.00  73.00  74.00
 3   / 3:  75.00  76.00  77.00  78.00  79.00
 ---- M:3 E:   3
 1   / 1:  70.00  71.00  72.00  73.00  74.00
 2   / 2:  75.00  76.00  77.00  78.00  79.00
 3   / 3:  80.00  81.00  82.00  83.00  84.00
 ---- M:4 E:   4
 1   / 1:  75.00  76.00  77.00  78.00  79.00
 2   / 2:  80.00  81.00  82.00  83.00  84.00
 3   / 3:  85.00  86.00  87.00  88.00  89.00
 
list/e=5/y=1/t=1 myvar
             VARIABLE : X + 5.0 * (Y + 4.0 * (Z + 3.0 * T)) + _E - _F
             SUBSET   : 5 by 8 by 6 points (LONGITUDE-DEPTH (m)-F)
             LATITUDE : 1N
             TIME     : 02-JAN-2001 00:00
             E        : 5
              0E     1E     2E     3E     4E    
               1      2      3      4      5
 ---- N:1 F:   0
 0     / 1:   70.0   71.0   72.0   73.0   74.0
 0.2   / 2:   74.0   75.0   76.0   77.0   78.0
 0.4   / 3:   78.0   79.0   80.0   81.0   82.0
 0.6   / 4:   82.0   83.0   84.0   85.0   86.0
 0.8   / 5:   86.0   87.0   88.0   89.0   90.0
 1     / 6:   90.0   91.0   92.0   93.0   94.0
 1.2   / 7:   94.0   95.0   96.0   97.0   98.0
 1.4   / 8:   98.0   99.0  100.0  101.0  102.0
 ---- N:2 F:   20
 0     / 1:   50.0   51.0   52.0   53.0   54.0
 0.2   / 2:   54.0   55.0   56.0   57.0   58.0
 0.4   / 3:   58.0   59.0   60.0   61.0   62.0
 0.6   / 4:   62.0   63.0   64.0   65.0   66.0
 0.8   / 5:   66.0   67.0   68.0   69.0   70.0
 1     / 6:   70.0   71.0   72.0   73.0   74.0
 1.2   / 7:   74.0   75.0   76.0   77.0   78.0
 1.4   / 8:   78.0   79.0   80.0   81.0   82.0
 ---- N:3 F:   40
 0     / 1:   30.0   31.0   32.0   33.0   34.0
 0.2   / 2:   34.0   35.0   36.0   37.0   38.0
 0.4   / 3:   38.0   39.0   40.0   41.0   42.0
 0.6   / 4:   42.0   43.0   44.0   45.0   46.0
 0.8   / 5:   46.0   47.0   48.0   49.0   50.0
 1     / 6:   50.0   51.0   52.0   53.0   54.0
 1.2   / 7:   54.0   55.0   56.0   57.0   58.0
 1.4   / 8:   58.0   59.0   60.0   61.0   62.0
 ---- N:4 F:   60
 0     / 1:   10.0   11.0   12.0   13.0   14.0
 0.2   / 2:   14.0   15.0   16.0   17.0   18.0
 0.4   / 3:   18.0   19.0   20.0   21.0   22.0
 0.6   / 4:   22.0   23.0   24.0   25.0   26.0
 0.8   / 5:   26.0   27.0   28.0   29.0   30.0
 1     / 6:   30.0   31.0   32.0   33.0   34.0
 1.2   / 7:   34.0   35.0   36.0   37.0   38.0
 1.4   / 8:   38.0   39.0   40.0   41.0   42.0
 ---- N:5 F:   80
 0     / 1:  -10.0   -9.0   -8.0   -7.0   -6.0
 0.2   / 2:   -6.0   -5.0   -4.0   -3.0   -2.0
 0.4   / 3:   -2.0   -1.0    0.0    1.0    2.0
 0.6   / 4:    2.0    3.0    4.0    5.0    6.0
 0.8   / 5:    6.0    7.0    8.0    9.0   10.0
 1     / 6:   10.0   11.0   12.0   13.0   14.0
 1.2   / 7:   14.0   15.0   16.0   17.0   18.0
 1.4   / 8:   18.0   19.0   20.0   21.0   22.0
 ---- N:6 F:   100
 0     / 1:  -30.0  -29.0  -28.0  -27.0  -26.0
 0.2   / 2:  -26.0  -25.0  -24.0  -23.0  -22.0
 0.4   / 3:  -22.0  -21.0  -20.0  -19.0  -18.0
 0.6   / 4:  -18.0  -17.0  -16.0  -15.0  -14.0
 0.8   / 5:  -14.0  -13.0  -12.0  -11.0  -10.0
 1     / 6:  -10.0   -9.0   -8.0   -7.0   -6.0
 1.2   / 7:   -6.0   -5.0   -4.0   -3.0   -2.0
 1.4   / 8:   -2.0   -1.0    0.0    1.0    2.0
list/e=5/y=1/t=1 transpose_zf(myvar)
             VARIABLE : TRANSPOSE_ZF(MYVAR)
             SUBSET   : 5 by 6 by 8 points (LONGITUDE-Z-F)
             LATITUDE : 1N
             TIME     : 02-JAN-2001 00:00
             E        : 5
            0E     1E     2E     3E     4E    
             1      2      3      4      5
 ---- N:1 F:   1
 1   / 1:   70.0   71.0   72.0   73.0   74.0
 2   / 2:   50.0   51.0   52.0   53.0   54.0
 3   / 3:   30.0   31.0   32.0   33.0   34.0
 4   / 4:   10.0   11.0   12.0   13.0   14.0
 5   / 5:  -10.0   -9.0   -8.0   -7.0   -6.0
 6   / 6:  -30.0  -29.0  -28.0  -27.0  -26.0
 ---- N:2 F:   2
 1   / 1:   74.0   75.0   76.0   77.0   78.0
 2   / 2:   54.0   55.0   56.0   57.0   58.0
 3   / 3:   34.0   35.0   36.0   37.0   38.0
 4   / 4:   14.0   15.0   16.0   17.0   18.0
 5   / 5:   -6.0   -5.0   -4.0   -3.0   -2.0
 6   / 6:  -26.0  -25.0  -24.0  -23.0  -22.0
 ---- N:3 F:   3
 1   / 1:   78.0   79.0   80.0   81.0   82.0
 2   / 2:   58.0   59.0   60.0   61.0   62.0
 3   / 3:   38.0   39.0   40.0   41.0   42.0
 4   / 4:   18.0   19.0   20.0   21.0   22.0
 5   / 5:   -2.0   -1.0    0.0    1.0    2.0
 6   / 6:  -22.0  -21.0  -20.0  -19.0  -18.0
 ---- N:4 F:   4
 1   / 1:   82.0   83.0   84.0   85.0   86.0
 2   / 2:   62.0   63.0   64.0   65.0   66.0
 3   / 3:   42.0   43.0   44.0   45.0   46.0
 4   / 4:   22.0   23.0   24.0   25.0   26.0
 5   / 5:    2.0    3.0    4.0    5.0    6.0
 6   / 6:  -18.0  -17.0  -16.0  -15.0  -14.0
 ---- N:5 F:   5
 1   / 1:   86.0   87.0   88.0   89.0   90.0
 2   / 2:   66.0   67.0   68.0   69.0   70.0
 3   / 3:   46.0   47.0   48.0   49.0   50.0
 4   / 4:   26.0   27.0   28.0   29.0   30.0
 5   / 5:    6.0    7.0    8.0    9.0   10.0
 6   / 6:  -14.0  -13.0  -12.0  -11.0  -10.0
 ---- N:6 F:   6
 1   / 1:   90.0   91.0   92.0   93.0   94.0
 2   / 2:   70.0   71.0   72.0   73.0   74.0
 3   / 3:   50.0   51.0   52.0   53.0   54.0
 4   / 4:   30.0   31.0   32.0   33.0   34.0
 5   / 5:   10.0   11.0   12.0   13.0   14.0
 6   / 6:  -10.0   -9.0   -8.0   -7.0   -6.0
 ---- N:7 F:   7
 1   / 1:   94.0   95.0   96.0   97.0   98.0
 2   / 2:   74.0   75.0   76.0   77.0   78.0
 3   / 3:   54.0   55.0   56.0   57.0   58.0
 4   / 4:   34.0   35.0   36.0   37.0   38.0
 5   / 5:   14.0   15.0   16.0   17.0   18.0
 6   / 6:   -6.0   -5.0   -4.0   -3.0   -2.0
 ---- N:8 F:   8
 1   / 1:   98.0   99.0  100.0  101.0  102.0
 2   / 2:   78.0   79.0   80.0   81.0   82.0
 3   / 3:   58.0   59.0   60.0   61.0   62.0
 4   / 4:   38.0   39.0   40.0   41.0   42.0
 5   / 5:   18.0   19.0   20.0   21.0   22.0
 6   / 6:   -2.0   -1.0    0.0    1.0    2.0
list/F=25/y=1/t=1 myvar
             VARIABLE : X + 5.0 * (Y + 4.0 * (Z + 3.0 * T)) + _E - _F
             SUBSET   : 5 by 8 by 3 points (LONGITUDE-DEPTH (m)-E)
             LATITUDE : 1N
             TIME     : 02-JAN-2001 00:00
             F        : 20
              0E     1E     2E     3E     4E    
               1      2      3      4      5
 ---- M:1 E:   0
 0     / 1:  45.00  46.00  47.00  48.00  49.00
 0.2   / 2:  49.00  50.00  51.00  52.00  53.00
 0.4   / 3:  53.00  54.00  55.00  56.00  57.00
 0.6   / 4:  57.00  58.00  59.00  60.00  61.00
 0.8   / 5:  61.00  62.00  63.00  64.00  65.00
 1     / 6:  65.00  66.00  67.00  68.00  69.00
 1.2   / 7:  69.00  70.00  71.00  72.00  73.00
 1.4   / 8:  73.00  74.00  75.00  76.00  77.00
 ---- M:2 E:   5
 0     / 1:  50.00  51.00  52.00  53.00  54.00
 0.2   / 2:  54.00  55.00  56.00  57.00  58.00
 0.4   / 3:  58.00  59.00  60.00  61.00  62.00
 0.6   / 4:  62.00  63.00  64.00  65.00  66.00
 0.8   / 5:  66.00  67.00  68.00  69.00  70.00
 1     / 6:  70.00  71.00  72.00  73.00  74.00
 1.2   / 7:  74.00  75.00  76.00  77.00  78.00
 1.4   / 8:  78.00  79.00  80.00  81.00  82.00
 ---- M:3 E:   10
 0     / 1:  55.00  56.00  57.00  58.00  59.00
 0.2   / 2:  59.00  60.00  61.00  62.00  63.00
 0.4   / 3:  63.00  64.00  65.00  66.00  67.00
 0.6   / 4:  67.00  68.00  69.00  70.00  71.00
 0.8   / 5:  71.00  72.00  73.00  74.00  75.00
 1     / 6:  75.00  76.00  77.00  78.00  79.00
 1.2   / 7:  79.00  80.00  81.00  82.00  83.00
 1.4   / 8:  83.00  84.00  85.00  86.00  87.00
list/F=25/y=1/t=1 transpose_ze(myvar)
             VARIABLE : TRANSPOSE_ZE(MYVAR)
             SUBSET   : 5 by 3 by 8 points (LONGITUDE-Z-E)
             LATITUDE : 1N
             TIME     : 02-JAN-2001 00:00
             F        : 20
            0E     1E     2E     3E     4E    
             1      2      3      4      5
 ---- M:1 E:   1
 1   / 1:  45.00  46.00  47.00  48.00  49.00
 2   / 2:  50.00  51.00  52.00  53.00  54.00
 3   / 3:  55.00  56.00  57.00  58.00  59.00
 ---- M:2 E:   2
 1   / 1:  49.00  50.00  51.00  52.00  53.00
 2   / 2:  54.00  55.00  56.00  57.00  58.00
 3   / 3:  59.00  60.00  61.00  62.00  63.00
 ---- M:3 E:   3
 1   / 1:  53.00  54.00  55.00  56.00  57.00
 2   / 2:  58.00  59.00  60.00  61.00  62.00
 3   / 3:  63.00  64.00  65.00  66.00  67.00
 ---- M:4 E:   4
 1   / 1:  57.00  58.00  59.00  60.00  61.00
 2   / 2:  62.00  63.00  64.00  65.00  66.00
 3   / 3:  67.00  68.00  69.00  70.00  71.00
 ---- M:5 E:   5
 1   / 1:  61.00  62.00  63.00  64.00  65.00
 2   / 2:  66.00  67.00  68.00  69.00  70.00
 3   / 3:  71.00  72.00  73.00  74.00  75.00
 ---- M:6 E:   6
 1   / 1:  65.00  66.00  67.00  68.00  69.00
 2   / 2:  70.00  71.00  72.00  73.00  74.00
 3   / 3:  75.00  76.00  77.00  78.00  79.00
 ---- M:7 E:   7
 1   / 1:  69.00  70.00  71.00  72.00  73.00
 2   / 2:  74.00  75.00  76.00  77.00  78.00
 3   / 3:  79.00  80.00  81.00  82.00  83.00
 ---- M:8 E:   8
 1   / 1:  73.00  74.00  75.00  76.00  77.00
 2   / 2:  78.00  79.00  80.00  81.00  82.00
 3   / 3:  83.00  84.00  85.00  86.00  87.00
 
list/e=5/y=1/z=1 myvar
             VARIABLE : X + 5.0 * (Y + 4.0 * (Z + 3.0 * T)) + _E - _F
             SUBSET   : 5 by 7 by 6 points (LONGITUDE-TIME-F)
             LATITUDE : 1N
             DEPTH (m): 1
             E        : 5
                       0E     1E     2E     3E     4E    
                        1      2      3      4      5
 ---- N:1 F:   0
 01-JAN-2001 00 / 1:   30.0   31.0   32.0   33.0   34.0
 02-JAN-2001 00 / 2:   90.0   91.0   92.0   93.0   94.0
 03-JAN-2001 00 / 3:  150.0  151.0  152.0  153.0  154.0
 04-JAN-2001 00 / 4:  210.0  211.0  212.0  213.0  214.0
 05-JAN-2001 00 / 5:  270.0  271.0  272.0  273.0  274.0
 06-JAN-2001 00 / 6:  330.0  331.0  332.0  333.0  334.0
 07-JAN-2001 00 / 7:  390.0  391.0  392.0  393.0  394.0
 ---- N:2 F:   20
 01-JAN-2001 00 / 1:   10.0   11.0   12.0   13.0   14.0
 02-JAN-2001 00 / 2:   70.0   71.0   72.0   73.0   74.0
 03-JAN-2001 00 / 3:  130.0  131.0  132.0  133.0  134.0
 04-JAN-2001 00 / 4:  190.0  191.0  192.0  193.0  194.0
 05-JAN-2001 00 / 5:  250.0  251.0  252.0  253.0  254.0
 06-JAN-2001 00 / 6:  310.0  311.0  312.0  313.0  314.0
 07-JAN-2001 00 / 7:  370.0  371.0  372.0  373.0  374.0
 ---- N:3 F:   40
 01-JAN-2001 00 / 1:  -10.0   -9.0   -8.0   -7.0   -6.0
 02-JAN-2001 00 / 2:   50.0   51.0   52.0   53.0   54.0
 03-JAN-2001 00 / 3:  110.0  111.0  112.0  113.0  114.0
 04-JAN-2001 00 / 4:  170.0  171.0  172.0  173.0  174.0
 05-JAN-2001 00 / 5:  230.0  231.0  232.0  233.0  234.0
 06-JAN-2001 00 / 6:  290.0  291.0  292.0  293.0  294.0
 07-JAN-2001 00 / 7:  350.0  351.0  352.0  353.0  354.0
 ---- N:4 F:   60
 01-JAN-2001 00 / 1:  -30.0  -29.0  -28.0  -27.0  -26.0
 02-JAN-2001 00 / 2:   30.0   31.0   32.0   33.0   34.0
 03-JAN-2001 00 / 3:   90.0   91.0   92.0   93.0   94.0
 04-JAN-2001 00 / 4:  150.0  151.0  152.0  153.0  154.0
 05-JAN-2001 00 / 5:  210.0  211.0  212.0  213.0  214.0
 06-JAN-2001 00 / 6:  270.0  271.0  272.0  273.0  274.0
 07-JAN-2001 00 / 7:  330.0  331.0  332.0  333.0  334.0
 ---- N:5 F:   80
 01-JAN-2001 00 / 1:  -50.0  -49.0  -48.0  -47.0  -46.0
 02-JAN-2001 00 / 2:   10.0   11.0   12.0   13.0   14.0
 03-JAN-2001 00 / 3:   70.0   71.0   72.0   73.0   74.0
 04-JAN-2001 00 / 4:  130.0  131.0  132.0  133.0  134.0
 05-JAN-2001 00 / 5:  190.0  191.0  192.0  193.0  194.0
 06-JAN-2001 00 / 6:  250.0  251.0  252.0  253.0  254.0
 07-JAN-2001 00 / 7:  310.0  311.0  312.0  313.0  314.0
 ---- N:6 F:   100
 01-JAN-2001 00 / 1:  -70.0  -69.0  -68.0  -67.0  -66.0
 02-JAN-2001 00 / 2:  -10.0   -9.0   -8.0   -7.0   -6.0
 03-JAN-2001 00 / 3:   50.0   51.0   52.0   53.0   54.0
 04-JAN-2001 00 / 4:  110.0  111.0  112.0  113.0  114.0
 05-JAN-2001 00 / 5:  170.0  171.0  172.0  173.0  174.0
 06-JAN-2001 00 / 6:  230.0  231.0  232.0  233.0  234.0
 07-JAN-2001 00 / 7:  290.0  291.0  292.0  293.0  294.0
list/e=5/y=1/z=1 transpose_tf(myvar)
             VARIABLE : TRANSPOSE_TF(MYVAR)
             SUBSET   : 5 by 6 by 7 points (LONGITUDE-T-F)
             LATITUDE : 1N
             DEPTH (m): 1
             E        : 5
            0E     1E     2E     3E     4E    
             1      2      3      4      5
 ---- N:1 F:   1
 1   / 1:   30.0   31.0   32.0   33.0   34.0
 2   / 2:   10.0   11.0   12.0   13.0   14.0
 3   / 3:  -10.0   -9.0   -8.0   -7.0   -6.0
 4   / 4:  -30.0  -29.0  -28.0  -27.0  -26.0
 5   / 5:  -50.0  -49.0  -48.0  -47.0  -46.0
 6   / 6:  -70.0  -69.0  -68.0  -67.0  -66.0
 ---- N:2 F:   2
 1   / 1:   90.0   91.0   92.0   93.0   94.0
 2   / 2:   70.0   71.0   72.0   73.0   74.0
 3   / 3:   50.0   51.0   52.0   53.0   54.0
 4   / 4:   30.0   31.0   32.0   33.0   34.0
 5   / 5:   10.0   11.0   12.0   13.0   14.0
 6   / 6:  -10.0   -9.0   -8.0   -7.0   -6.0
 ---- N:3 F:   3
 1   / 1:  150.0  151.0  152.0  153.0  154.0
 2   / 2:  130.0  131.0  132.0  133.0  134.0
 3   / 3:  110.0  111.0  112.0  113.0  114.0
 4   / 4:   90.0   91.0   92.0   93.0   94.0
 5   / 5:   70.0   71.0   72.0   73.0   74.0
 6   / 6:   50.0   51.0   52.0   53.0   54.0
 ---- N:4 F:   4
 1   / 1:  210.0  211.0  212.0  213.0  214.0
 2   / 2:  190.0  191.0  192.0  193.0  194.0
 3   / 3:  170.0  171.0  172.0  173.0  174.0
 4   / 4:  150.0  151.0  152.0  153.0  154.0
 5   / 5:  130.0  131.0  132.0  133.0  134.0
 6   / 6:  110.0  111.0  112.0  113.0  114.0
 ---- N:5 F:   5
 1   / 1:  270.0  271.0  272.0  273.0  274.0
 2   / 2:  250.0  251.0  252.0  253.0  254.0
 3   / 3:  230.0  231.0  232.0  233.0  234.0
 4   / 4:  210.0  211.0  212.0  213.0  214.0
 5   / 5:  190.0  191.0  192.0  193.0  194.0
 6   / 6:  170.0  171.0  172.0  173.0  174.0
 ---- N:6 F:   6
 1   / 1:  330.0  331.0  332.0  333.0  334.0
 2   / 2:  310.0  311.0  312.0  313.0  314.0
 3   / 3:  290.0  291.0  292.0  293.0  294.0
 4   / 4:  270.0  271.0  272.0  273.0  274.0
 5   / 5:  250.0  251.0  252.0  253.0  254.0
 6   / 6:  230.0  231.0  232.0  233.0  234.0
 ---- N:7 F:   7
 1   / 1:  390.0  391.0  392.0  393.0  394.0
 2   / 2:  370.0  371.0  372.0  373.0  374.0
 3   / 3:  350.0  351.0  352.0  353.0  354.0
 4   / 4:  330.0  331.0  332.0  333.0  334.0
 5   / 5:  310.0  311.0  312.0  313.0  314.0
 6   / 6:  290.0  291.0  292.0  293.0  294.0
list/F=25/y=1/z=1 myvar
             VARIABLE : X + 5.0 * (Y + 4.0 * (Z + 3.0 * T)) + _E - _F
             SUBSET   : 5 by 7 by 3 points (LONGITUDE-TIME-E)
             LATITUDE : 1N
             DEPTH (m): 1
             F        : 20
                       0E     1E     2E     3E     4E    
                        1      2      3      4      5
 ---- M:1 E:   0
 01-JAN-2001 00 / 1:    5.0    6.0    7.0    8.0    9.0
 02-JAN-2001 00 / 2:   65.0   66.0   67.0   68.0   69.0
 03-JAN-2001 00 / 3:  125.0  126.0  127.0  128.0  129.0
 04-JAN-2001 00 / 4:  185.0  186.0  187.0  188.0  189.0
 05-JAN-2001 00 / 5:  245.0  246.0  247.0  248.0  249.0
 06-JAN-2001 00 / 6:  305.0  306.0  307.0  308.0  309.0
 07-JAN-2001 00 / 7:  365.0  366.0  367.0  368.0  369.0
 ---- M:2 E:   5
 01-JAN-2001 00 / 1:   10.0   11.0   12.0   13.0   14.0
 02-JAN-2001 00 / 2:   70.0   71.0   72.0   73.0   74.0
 03-JAN-2001 00 / 3:  130.0  131.0  132.0  133.0  134.0
 04-JAN-2001 00 / 4:  190.0  191.0  192.0  193.0  194.0
 05-JAN-2001 00 / 5:  250.0  251.0  252.0  253.0  254.0
 06-JAN-2001 00 / 6:  310.0  311.0  312.0  313.0  314.0
 07-JAN-2001 00 / 7:  370.0  371.0  372.0  373.0  374.0
 ---- M:3 E:   10
 01-JAN-2001 00 / 1:   15.0   16.0   17.0   18.0   19.0
 02-JAN-2001 00 / 2:   75.0   76.0   77.0   78.0   79.0
 03-JAN-2001 00 / 3:  135.0  136.0  137.0  138.0  139.0
 04-JAN-2001 00 / 4:  195.0  196.0  197.0  198.0  199.0
 05-JAN-2001 00 / 5:  255.0  256.0  257.0  258.0  259.0
 06-JAN-2001 00 / 6:  315.0  316.0  317.0  318.0  319.0
 07-JAN-2001 00 / 7:  375.0  376.0  377.0  378.0  379.0
list/F=25/y=1/z=1 transpose_te(myvar)
             VARIABLE : TRANSPOSE_TE(MYVAR)
             SUBSET   : 5 by 3 by 7 points (LONGITUDE-T-E)
             LATITUDE : 1N
             DEPTH (m): 1
             F        : 20
            0E     1E     2E     3E     4E    
             1      2      3      4      5
 ---- M:1 E:   1
 1   / 1:    5.0    6.0    7.0    8.0    9.0
 2   / 2:   10.0   11.0   12.0   13.0   14.0
 3   / 3:   15.0   16.0   17.0   18.0   19.0
 ---- M:2 E:   2
 1   / 1:   65.0   66.0   67.0   68.0   69.0
 2   / 2:   70.0   71.0   72.0   73.0   74.0
 3   / 3:   75.0   76.0   77.0   78.0   79.0
 ---- M:3 E:   3
 1   / 1:  125.0  126.0  127.0  128.0  129.0
 2   / 2:  130.0  131.0  132.0  133.0  134.0
 3   / 3:  135.0  136.0  137.0  138.0  139.0
 ---- M:4 E:   4
 1   / 1:  185.0  186.0  187.0  188.0  189.0
 2   / 2:  190.0  191.0  192.0  193.0  194.0
 3   / 3:  195.0  196.0  197.0  198.0  199.0
 ---- M:5 E:   5
 1   / 1:  245.0  246.0  247.0  248.0  249.0
 2   / 2:  250.0  251.0  252.0  253.0  254.0
 3   / 3:  255.0  256.0  257.0  258.0  259.0
 ---- M:6 E:   6
 1   / 1:  305.0  306.0  307.0  308.0  309.0
 2   / 2:  310.0  311.0  312.0  313.0  314.0
 3   / 3:  315.0  316.0  317.0  318.0  319.0
 ---- M:7 E:   7
 1   / 1:  365.0  366.0  367.0  368.0  369.0
 2   / 2:  370.0  371.0  372.0  373.0  374.0
 3   / 3:  375.0  376.0  377.0  378.0  379.0
 
can var /all
set grid abstract
can grid mygrd
can axis taxs
can axis zaxs
can axis yaxs
can axis xaxs
can axis eaxs
can axis faxs
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go bn_unique_str2int
! bn_unique_str2int.jnl
 
SHOW FUNC/DETAIL unique_str2int
UNIQUE_STR2INT(A)
    Returns an ID number for each unique string in the input array of strings (case sensitive)
        Axes of result:
          X: inherited from argument(s)
          Y: inherited from argument(s)
          Z: inherited from argument(s)
          T: inherited from argument(s)
          E: inherited from argument(s)
          F: inherited from argument(s)
    A: Array of Strings (STRING)
        Influence on output axes:
          X: passed to result grid
          Y: passed to result grid
          Z: passed to result grid
          T: passed to result grid
          E: passed to result grid
          F: passed to result grid
 
let alist = { \
   "a rat in the house will eat the zucchini", \
   "a rat in the house will eat the ice cream", \
   "ze rats in the house will eat the ice cream",\
   "A rat in the house will eat the ICE CREAM", \
   "", \
   "", \
   "A rat in the house will eat the ICE CREAM", \
   "A rat in the house will eat the ICE CREAM", \
   "ze rats in the house will eat the ice cream",\
   "ze rats in the house will eat the ice cream",\
   "" \
}
 
let blist = { \
   "ze rats in the house will eat the ice cream",\
   "", \
   "Something new has been added", \
   "A rat in the house will eat the ICE CREAM", \
   "A rat in the house will eat the ICE CREAM", \
   "" \
}
 
! check that it works when first called
list unique_str2int(alist), alist
             X: 0.5 to 11.5
 Column  1: EX#1 is UNIQUE_STR2INT(ALIST)
 Column  2: ALIST is {    "a rat in the house will eat the zucchini",    "a rat in the house will eat the ice cream",    "ze rats in the house will eat the ice cream",   "A rat in the house will eat th
            EX#1                      ALIST
1    /  1:  1.000 "a rat in the house will eat the zucchini"   
2    /  2:  2.000 "a rat in the house will eat the ice cream"  
3    /  3:  3.000 "ze rats in the house will eat the ice cream"
4    /  4:  4.000 "A rat in the house will eat the ICE CREAM"  
5    /  5:  5.000 ""                                           
6    /  6:  5.000 ""                                           
7    /  7:  4.000 "A rat in the house will eat the ICE CREAM"  
8    /  8:  4.000 "A rat in the house will eat the ICE CREAM"  
9    /  9:  3.000 "ze rats in the house will eat the ice cream"
10   / 10:  3.000 "ze rats in the house will eat the ice cream"
11   / 11:  5.000 ""                                           
 
! check if the same values are returned for a second call matching strings
list unique_str2int(blist), blist
             X: 0.5 to 6.5
 Column  1: EX#1 is UNIQUE_STR2INT(BLIST)
 Column  2: BLIST is {    "ze rats in the house will eat the ice cream",   "",    "Something new has been added",    "A rat in the house will eat the ICE CREAM",    "A rat in the house will eat the ICE
          EX#1                      BLIST
1   / 1:  3.000 "ze rats in the house will eat the ice cream"
2   / 2:  5.000 ""                                           
3   / 3:  6.000 "Something new has been added"               
4   / 4:  4.000 "A rat in the house will eat the ICE CREAM"  
5   / 5:  4.000 "A rat in the house will eat the ICE CREAM"  
6   / 6:  5.000 ""                                           
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go bench_sort
 
 
! Benchmark for sort and sample external Functions
! ACM 5/99
! ACM 8/99 sorti,sortj,sortl have "visual" versions
 
sh func/ext sort*
SORTI(DAT)
    Returns indices of data, sorted on the I axis in increasing order
    DAT: variable to sort in I
SORTI_STR(STR)
    Returns indices of string data, sorted on the I axis in increasing order, null strings at the end
    STR: String variable to sort in I (STRING)
SORTJ(DAT)
    Returns indices of data, sorted on the J axis in increasing order
    DAT: variable to sort in J
SORTJ_STR(STR)
    Returns indices of string data, sorted on the J axis in increasing order, null strings at the end
    STR: String variable to sort in J (STRING)
SORTK(DAT)
    Returns indices of data, sorted on the K axis in increasing order
    DAT: variable to sort in K
SORTK_STR(STR)
    Returns indices of string data, sorted on the K axis in increasing order, null strings at the end
    STR: String variable to sort in K (STRING)
SORTL(DAT)
    Returns indices of data, sorted on the L axis in increasing order
    DAT: variable to sort in L
SORTL_STR(STR)
    Returns indices of string data, sorted on the L axis in increasing order, null strings at the end
    STR: String variable to sort in L (STRING)
SORTM(DAT)
    Returns indices of data, sorted on the M axis in increasing order
    DAT: variable to sort in M
SORTM_STR(STR)
    Returns indices of string data, sorted on the M axis in increasing order, null strings at the end
    STR: String variable to sort in L (STRING)
SORTN(DAT)
    Returns indices of data, sorted on the N axis in increasing order
    DAT: variable to sort in N
SORTN_STR(STR)
    Returns indices of string data, sorted on the N axis in increasing order, null strings at the end
    STR: String variable to sort in N (STRING)
sh func/ext sample*
SAMPLEI(TO_BE_SAMPLED,X_INDICES)
    sample a field at a list of X indices
    TO_BE_SAMPLED: data to sample at list of X indices supplied
    X_INDICES: list of X indices at which to sample
SAMPLEJ(TO_BE_SAMPLED,Y_INDICES)
    sample a field at a list of Y indices
    TO_BE_SAMPLED: data to sample at list of Y indices supplied
    Y_INDICES: list of Y indices at which to sample
SAMPLEK(TO_BE_SAMPLED,Z_INDICES)
    sample a field at a list of Z indices
    TO_BE_SAMPLED: data to sample at list of Z indices supplied
    Z_INDICES: list of Z indices at which to sample
SAMPLEL(TO_BE_SAMPLED,T_INDICES)
    sample a field at a list of T indices
    TO_BE_SAMPLED: data to sample at list of T indices supplied
    T_INDICES: list of T indices at which to sample
SAMPLEM(TO_BE_SAMPLED,E_INDICES)
    sample a field at a list of E indices
    TO_BE_SAMPLED: data to sample at list of E indices supplied
    E_INDICES: list of E indices at which to sample
SAMPLEN(TO_BE_SAMPLED,F_INDICES)
    sample a field at a list of F indices
    TO_BE_SAMPLED: data to sample at list of F indices supplied
    F_INDICES: list of F indices at which to sample
SAMPLE_FAST_I(V,Indices)
    Fast 1D sample variable using set of indices
    V: 1-D variable in X direction
    Indices: List of indices at which to sample
SAMPLE_FAST_I_STR(S,Indices)
    Fast 1D sample string variable using set of indices
    S: 1-D string variable in X direction (STRING)
    Indices: List of indices at which to sample
SAMPLEF_DATE(DAT_TO_SAMPLE,YR,MO,DAY,HR,MIN,SEC)
    Returns data sampled by interpolating to a set of times in F direction
    DAT_TO_SAMPLE: data to sample at set of times in F
    YR: Year(s) yyyy
    MO: Month(s), integer mm
    DAY: Day(s) of month dd
    HR: Hour(s) hh
    MIN: Minute(s) mm
    SEC: Second(s) ss
SAMPLEIJ(DAT_TO_SAMPLE,XPTS,YPTS)
    Returns data sampled by matching coordinates at a subset of grid points, defined by (XPTS, YPTS)
    DAT_TO_SAMPLE: variable (x,y,z,t,e,f) to sample
    XPTS: X coordinates of grid points
    YPTS: Y coordinates of grid points
SAMPLEI_MULTI(DAT_TO_SAMPLE,I_INDICES)
    Returns data sampled according to I indices which may vary in JKLMN
    DAT_TO_SAMPLE: data to sample using I indices
    I_INDICES: ordered indices
SAMPLEJ_MULTI(DAT_TO_SAMPLE,J_INDICES)
    Returns data sampled according to J indices which may vary in IKLMN
    DAT_TO_SAMPLE: data to sample using J indices
    J_INDICES: ordered indices
SAMPLEK_MULTI(DAT_TO_SAMPLE,K_INDICES)
    Returns data sampled according to K indices which may vary in IJLMN
    DAT_TO_SAMPLE: data to sample using K indices
    K_INDICES: ordered indices
SAMPLEL_MULTI(DAT_TO_SAMPLE,L_INDICES)
    Returns data sampled according to L indices which may vary in IJKMN
    DAT_TO_SAMPLE: data to sample using L indices
    L_INDICES: ordered indices
SAMPLEM_MULTI(DAT_TO_SAMPLE,M_INDICES)
    Returns data sampled according to M indices which may vary in IJKLN
    DAT_TO_SAMPLE: data to sample using M indices
    M_INDICES: ordered indices
SAMPLEN_MULTI(DAT_TO_SAMPLE,N_INDICES)
    Returns data sampled according to N indices which may vary in IJKLM
    DAT_TO_SAMPLE: data to sample using N indices
    N_INDICES: ordered indices
SAMPLET_DATE(DAT_TO_SAMPLE,YR,MO,DAY,HR,MIN,SEC)
    Returns data sampled by interpolating to a set of times in T direction
    DAT_TO_SAMPLE: data to sample at set of times
    YR: Year(s) yyyy
    MO: Month(s), integer mm
    DAY: Day(s) of month dd
    HR: Hour(s) hh
    MIN: Minute(s) mm
    SEC: Second(s) ss
SAMPLEXY(DAT_TO_SAMPLE,XPTS,YPTS)
    Returns data sampled at a set of (X,Y) points, using linear interpolation
    DAT_TO_SAMPLE: variable (x,y,z,t,e,f) to sample
    XPTS: X values of sample points
    YPTS: Y values of sample points
SAMPLEXY_CLOSEST(DAT_TO_SAMPLE,XPTS,YPTS)
    This function is discontinued. It is renamed to SAMPLEXY_NRST
    DAT_TO_SAMPLE: variable (x,y,z,t,e,f) to sample
    XPTS: X values of sample points
    YPTS: Y values of sample points
SAMPLEXY_CURV(DAT_TO_SAMPLE,DAT_LON,DAT_LAT,XPTS,YPTS)
    Returns data sampled at a set of (X,Y) points, using linear interpolation
    DAT_TO_SAMPLE: variable (x,y,z,t,e,f) to sample
    DAT_LON: longitudes of input variable
    DAT_LAT: latitudes of input variable
    XPTS: X values of sample points
    YPTS: Y values of sample points
SAMPLEXY_CURV_AVG(DAT_TO_SAMPLE,DAT_LON,DAT_LAT,XPTS,YPTS)
    Returns data sampled at a set of (X,Y) points, using unweighted averaging
    DAT_TO_SAMPLE: variable (x,y,z,t,e,f) to sample
    DAT_LON: longitudes of input variable
    DAT_LAT: latitudes of input variable
    XPTS: X values of sample points
    YPTS: Y values of sample points
SAMPLEXY_CURV_NRST(DAT_TO_SAMPLE,DAT_LON,DAT_LAT,XPTS,YPTS)
    Returns data at a set of (X,Y) points, from nearest loc on XY curvilinear grid
    DAT_TO_SAMPLE: variable (x,y,z,t,e,f) to sample
    DAT_LON: longitudes of input variable
    DAT_LAT: latitudes of input variable
    XPTS: X values of sample points
    YPTS: Y values of sample points
SAMPLEXY_NRST(DAT_TO_SAMPLE,XPTS,YPTS)
    Returns data sampled at a set of (X,Y) points, using nearest grid intersection
    DAT_TO_SAMPLE: variable (x,y,z,t,e,f) to sample
    XPTS: X values of sample points
    YPTS: Y values of sample points
SAMPLEXYT_NRST(DAT_TO_SAMPLE,XPTS,YPTS,TPTS)
    Returns data sampled at a set of (X,Y,T) points, using nearest grid intersection
    DAT_TO_SAMPLE: variable (x,y,z,t,e,f) to sample
    XPTS: X values of sample points
    YPTS: Y values of sample points
    TPTS: T values of sample points
SAMPLEXYT(DAT_TO_SAMPLE,XPTS,YPTS,TPTS)
    Returns data sampled at a set of (X,Y,T) points, using linear interpolation
    DAT_TO_SAMPLE: variable (x,y,z,t,e,f) to sample
    XPTS: X values of sample points
    YPTS: Y values of sample points
    TPTS: T values of sample points
SAMPLEXYZ(DAT_TO_SAMPLE,XPTS,YPTS,ZPTS)
    Returns data sampled at a set of (X,Y,Z) points, using linear interpolation
    DAT_TO_SAMPLE: variable (x,y,z,t,e,f) to sample
    XPTS: X values of sample points
    YPTS: Y values of sample points
    ZPTS: Z values of sample points
SAMPLEXYZT(DAT_TO_SAMPLE,XPTS,YPTS,ZPTS,TPTS)
    Returns data sampled at a set of points in X,Y,Z,T, using linear interpolation
    DAT_TO_SAMPLE: variable (x,y,z,t,e,f) to sample
    XPTS: X values of sample points
    YPTS: Y values of sample points
    ZPTS: Z values of sample points
    TPTS: T values of sample points
SAMPLEXZ(DAT_TO_SAMPLE,XPTS,ZPTS)
    Returns data sampled at a set of (X,Z) points, using linear interpolation
    DAT_TO_SAMPLE: variable (x,y,z,t,e,f) to sample
    XPTS: X values of sample points
    ZPTS: Z values of sample points
SAMPLEYZ(DAT_TO_SAMPLE,YPTS,ZPTS)
    Returns data sampled at a set of (Y,Z) points, using linear interpolation
    DAT_TO_SAMPLE: variable (x,y,z,t,e,f) to sample
    YPTS: Y values of sample points
    ZPTS: Z values of sample points
SAMPLE_FAST_I(V,Indices)
    Fast 1D sample variable using set of indices
    V: Variable to sample
    Indices: List of indices at which to sample
 
go bench_sorti.jnl
 
 
! Benchmark for sort and sample external Functions
! ACM 5/99
 
! V550 *sh* 11/02 - documentation change only, reflecting subspan modulo
! The use of L=5 on a 3 point time axis triggers a valid subspan modulo calculation
! V581 *ACM 3/05 Changes in specifying context for arg 2 of SAMPLEI
!                see notes in Bugzilla under bug 1187.
 
can region
use coads_climatology
set region/x=141:151/y=39/z=0/l=2
 
list sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 6 points (LONGITUDE)
             LATITUDE : 39N
             TIME     : 15-FEB 16:29
                39N   
                65
 141E   / 61:   8.86
 143E   / 62:   8.52
 145E   / 63:   9.29
 147E   / 64:  10.25
 149E   / 65:  10.98
 151E   / 66:  10.88
 
let tsorted_indices = sorti( sst[i=61:66,y=39,z=0,l=2])
let tsorted_sst = samplei(sst, tsorted_indices)
 
list tsorted_indices, tsorted_sst
             DATA SET: ./data/coads_climatology.cdf
             X: 0.5 to 6.5
             TIME: 15-FEB 16:29
 Column  1: TSORTED_INDICES[Y=39N] is SORTI( SST[I=61:66,Y=39,Z=0,L=2])
 Column  2: TSORTED_SST[Y=39N] is SAMPLEI(SST, TSORTED_INDICES)
       TSORTED_  TSORTED_SST
1   / 1:   62.00    8.52
2   / 2:   61.00    8.86
3   / 3:   63.00    9.29
4   / 4:   64.00   10.25
5   / 5:   66.00   10.88
6   / 6:   65.00   10.98
 
 
! test on 2-d data
 
can region
!set data coads_climatology
set region/l=5
 
let xsorted_indices = sorti(sst)
let xsorted_sst = samplei(sst, xsorted_indices[y=0,l=5])
! shade xsorted_sst
list/y=0/i=1:15 xsorted_sst
             VARIABLE : SAMPLEI(SST, XSORTED_INDICES[Y=0,L=5])
             FILENAME : coads_climatology.cdf
             SUBSET   : 15 points (X)
             LATITUDE : 1S
             TIME     : 15-JAN 11:49
              1S    
              45
 1    /  1:  23.76
 2    /  2:  23.86
 3    /  3:  23.89
 4    /  4:  23.95
 5    /  5:  23.96
 6    /  6:  24.02
 7    /  7:  24.05
 8    /  8:  24.09
 9    /  9:  24.21
 10   / 10:  24.28
 11   / 11:  24.31
 12   / 12:  24.36
 13   / 13:  24.39
 14   / 14:  24.46
 15   / 15:  24.47
 
set region/l=5/y=1
let len = xsorted_sst[i=@ngd]
list len
             VARIABLE : XSORTED_SST[I=@NGD]
             FILENAME : coads_climatology.cdf
             X        : 0.5 to 180.5
             LATITUDE : 1N
             TIME     : 15-JAN 11:49
          147.0
 
go bench_sortj.jnl
 
 
 
! Benchmark for sort and sample external Functions
! ACM 5/99
 
! V550 *sh* 11/02 - documentation change only, reflecting subspan modulo
! The use of L=5 on a 3 point time axis triggers a valid subspan modulo calculation
! V581 *ACM 3/05 Changes in specifying context for arg 2 of SAMPLEJ
!                see notes in Bugzilla under bug 1187.
 
can region
use coads_climatology
set region/x=141/y=39:49/z=0/l=2
 
list sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 6 points (LATITUDE)
             LONGITUDE: 141E
             TIME     : 15-FEB 16:29
              141E   
               61
 49N   / 70:  1.883
 47N   / 69:  2.014
 45N   / 68:  3.445
 43N   / 67:  4.559
 41N   / 66:  6.473
 39N   / 65:  8.857
 
let tsorted_indices = sortj( sst[j=65:70,x=141,z=0,l=2])
let tsorted_sst = samplej(sst, tsorted_indices)
 
list tsorted_indices, tsorted_sst
             DATA SET: ./data/coads_climatology.cdf
             Y: 0.5 to 6.5
             TIME: 15-FEB 16:29
 Column  1: TSORTED_INDICES[X=141E] is SORTJ( SST[J=65:70,X=141,Z=0,L=2])
 Column  2: TSORTED_SST[X=141E] is SAMPLEJ(SST, TSORTED_INDICES)
       TSORTED_  TSORTED_SST
1   / 1:   70.00   1.883
2   / 2:   69.00   2.014
3   / 3:   68.00   3.445
4   / 4:   67.00   4.559
5   / 5:   66.00   6.473
6   / 6:   65.00   8.857
 
! test on 2-D data.
 
can region
!set data coads_climatology
set region/l=5
 
let ysorted_indices = sortj(sst)
let ysorted_sst = samplej(sst, ysorted_indices[i=0,l=5])
!shade ysorted_sst
list/i=0/j=1:15 ysorted_sst
             VARIABLE : SAMPLEJ(SST, YSORTED_INDICES[I=0,L=5])
             FILENAME : coads_climatology.cdf
             SUBSET   : 15 points (Y)
             LONGITUDE: 19E
             TIME     : 15-JAN 11:49
              19E   
               0
 1    /  1: -0.125
 2    /  2:  0.054
 3    /  3:  0.186
 4    /  4:  0.300
 5    /  5:  0.439
 6    /  6:  0.625
 7    /  7:  0.660
 8    /  8:  0.727
 9    /  9:  0.800
 10   / 10:  1.297
 11   / 11:  1.588
 12   / 12:  1.607
 13   / 13:  1.917
 14   / 14:  2.059
 15   / 15:  2.694
 
set region/l=5/x=181
let len = ysorted_sst[j=@ngd]
list len
             VARIABLE : YSORTED_SST[J=@NGD]
             FILENAME : coads_climatology.cdf
             LONGITUDE: 179W
             Y        : 0.5 to 90.5
             TIME     : 15-JAN 11:49
          32.00
 
 
go bench_sortk.jnl
! Benchmark for sort and sample external Functions
! ACM 7/99
! Changes with v5.81 and after, specifying context for arg 2 of SAMPLEK
!   see notes in Bugzilla under bug 1187.
 
! test sortk, samplek
 
can region
use gt4d011
set region/i=99/j=40/l=1
 
let zsorted_indices = sortk(temp)
let zsorted_temp = samplek(temp, zsorted_indices[i=99,j=40,l=1])
list zsorted_temp
             VARIABLE : SAMPLEK(TEMP, ZSORTED_INDICES[I=99,J=40,L=1])
             FILENAME : gt4d011.cdf
             SUBSET   : 10 points (Z)
             LONGITUDE: 131.5W
             LATITUDE : 1.833S
             TIME     : 17-AUG-1982 12:00
             131.5W 
              99
 1    /  1:  24.66
 2    /  2:  25.26
 3    /  3:  25.70
 4    /  4:  26.06
 5    /  5:  26.13
 6    /  6:  26.13
 7    /  7:  26.14
 8    /  8:  26.16
 9    /  9:  26.22
 10   / 10:  26.31
 
 
can region
use ocean_atlas_temp
 
set region/i=70/j=90/l=1
list temp
             VARIABLE : Temperature (Deg C)
             FILENAME : ocean_atlas_temp.cdf
             LONGITUDE: 89.5E
             LATITUDE : 0.5S
             DEPTH (m): 0
             TIME     : 16-JAN 06:00
          28.86
 
let zsorted_indices = sortk(temp)
let zsorted_temp = samplek(temp, zsorted_indices[i=70,j=90,l=1])
list zsorted_temp
             VARIABLE : SAMPLEK(TEMP, ZSORTED_INDICES[I=70,J=90,L=1])
             FILENAME : ocean_atlas_temp.cdf
             LONGITUDE: 89.5E
             LATITUDE : 0.5S
             Z        : 1
             TIME     : 16-JAN 06:00
          28.86
 
! this should bail out with indices out of range:
 
let zsorted_indices = sortk(temp[i=70,j=90,l=1]) - 100
let zsorted_temp = samplek(temp, zsorted_indices)
list zsorted_temp
             VARIABLE : SAMPLEK(TEMP, ZSORTED_INDICES)
             FILENAME : ocean_atlas_temp.cdf
             LONGITUDE: 89.5E
             LATITUDE : 0.5S
             Z        : 1
             TIME     : 16-JAN 06:00
        ....
 
 
go bench_sortl.jnl
 
 
! Benchmark for sort and sample external Functions
! ACM 5/99
! *sh* 3/00 - indicate that test of illegal indices should produce an error
 
! V550 *sh* 11/02 - documentation change only, reflecting subspan modulo
! The use of L=5 on a 3 point time axis triggers a valid subspan modulo calculation
! V581 *ACM 3/05 Changes in specifying context for arg 2 of SAMPLEL
!                see notes in Bugzilla under bug 1187.
 
use coads_climatology
set region/x=141/y=39/z=0/l=1:6
 
list sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 6 points (TIME)
             LONGITUDE: 141E
             LATITUDE : 39N
                   141E   
                    61
 16-JAN      / 1:  11.03
 15-FEB      / 2:   8.86
 17-MAR      / 3:   8.39
 16-AUG      / 4:   ....
 15-JAN      / 5:  11.03
 14-FEB      / 6:   8.86
list samplel(sst, {1,3,5})
             VARIABLE : SAMPLEL(SST, {1,3,5})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (T)
             LONGITUDE: 141E
             LATITUDE : 39N
           141E   
            61
 1   / 1:  11.03
 2   / 2:   8.39
 3   / 3:  11.03
 
let tsorted_indices = sortl(sst)
let tsorted_sst = samplel(sst, tsorted_indices[x=141,y=39,z=0])
 
list tsorted_indices, tsorted_sst
             DATA SET: ./data/coads_climatology.cdf
             T: 0.5 to 3.5
             LONGITUDE: 141E
             LATITUDE: 39N
 Column  1: TSORTED_INDICES is SORTL(SST)
 Column  2: TSORTED_SST is SAMPLEL(SST, TSORTED_INDICES[X=141,Y=39,Z=0])
       TSORTED_  TSORTED_SST
1   / 1:   3.000    8.39
2   / 2:   2.000    8.86
3   / 3:   1.000   11.03
 
! test sortt with data containing bad/missing data.
 
can region
 
use  coads_vwnd.cdf
set region/i=90/j=65
list vwnd
             VARIABLE : MERIDIONAL WIND (M/S)
             FILENAME : coads_vwnd.cdf
             SUBSET   : 60 points (TIME)
             LONGITUDE: 161W
             LATITUDE : 39N
                       161W   
                        90
 16-JAN-1946 12 /  1:   ....
 15-FEB-1946 00 /  2:   ....
 16-MAR-1946 12 /  3:   ....
 16-APR-1946 00 /  4:   ....
 16-MAY-1946 12 /  5:   ....
 16-JUN-1946 00 /  6:   ....
 16-JUL-1946 12 /  7:   ....
 16-AUG-1946 12 /  8:   ....
 16-SEP-1946 00 /  9:   ....
 16-OCT-1946 12 / 10:   ....
 16-NOV-1946 00 / 11:   ....
 16-DEC-1946 12 / 12:  12.35
 16-JAN-1947 12 / 13:   ....
 15-FEB-1947 00 / 14:   ....
 16-MAR-1947 12 / 15:   ....
 16-APR-1947 00 / 16:   0.00
 16-MAY-1947 12 / 17:   ....
 16-JUN-1947 00 / 18:   ....
 16-JUL-1947 12 / 19:   ....
 16-AUG-1947 12 / 20:   ....
 16-SEP-1947 00 / 21:   6.60
 16-OCT-1947 12 / 22:   ....
 16-NOV-1947 00 / 23:   ....
 16-DEC-1947 12 / 24:   ....
 16-JAN-1948 12 / 25:   4.50
 15-FEB-1948 12 / 26:   ....
 16-MAR-1948 12 / 27:   ....
 16-APR-1948 00 / 28:   ....
 16-MAY-1948 12 / 29:   ....
 16-JUN-1948 00 / 30:   4.70
 16-JUL-1948 12 / 31:   ....
 16-AUG-1948 12 / 32:   ....
 16-SEP-1948 00 / 33:  -5.80
 16-OCT-1948 12 / 34:   0.45
 16-NOV-1948 00 / 35:   ....
 16-DEC-1948 12 / 36:   ....
 16-JAN-1949 12 / 37:   4.23
 15-FEB-1949 00 / 38:  -1.08
 16-MAR-1949 12 / 39:   2.07
 16-APR-1949 00 / 40:   0.83
 16-MAY-1949 12 / 41:   0.00
 16-JUN-1949 00 / 42:   5.37
 16-JUL-1949 12 / 43:  -1.30
 16-AUG-1949 12 / 44:   1.38
 16-SEP-1949 00 / 45:   5.92
 16-OCT-1949 12 / 46:   0.71
 16-NOV-1949 00 / 47:  -0.94
 16-DEC-1949 12 / 48:  -0.52
 16-JAN-1950 12 / 49:   1.58
 15-FEB-1950 00 / 50:   4.93
 16-MAR-1950 12 / 51:   3.51
 16-APR-1950 00 / 52:   4.54
 16-MAY-1950 12 / 53:   1.60
 16-JUN-1950 00 / 54:   1.33
 16-JUL-1950 12 / 55:   0.90
 16-AUG-1950 12 / 56:  -0.45
 16-SEP-1950 00 / 57:   3.57
 16-OCT-1950 12 / 58:  -8.75
 16-NOV-1950 00 / 59:  -5.24
 16-DEC-1950 12 / 60:  -6.47
 
let tsorted_indices = sortl(vwnd)
let tsorted_wnd = samplel(vwnd, tsorted_indices[i=90,j=65])
list tsorted_indices, tsorted_wnd
             DATA SET: ./data/coads_vwnd.cdf
             T: 0.5 to 60.5
             LONGITUDE: 161W
             LATITUDE: 39N
 Column  1: TSORTED_INDICES is SORTL(VWND)
 Column  2: TSORTED_WND is SAMPLEL(VWND, TSORTED_INDICES[I=90,J=65])
       TSORTED_IN  TSORTED_WND
1    /  1:   58.00   -8.75
2    /  2:   60.00   -6.47
3    /  3:   33.00   -5.80
4    /  4:   59.00   -5.24
5    /  5:   43.00   -1.30
6    /  6:   38.00   -1.08
7    /  7:   47.00   -0.94
8    /  8:   48.00   -0.52
9    /  9:   56.00   -0.45
10   / 10:   41.00    0.00
11   / 11:   16.00    0.00
12   / 12:   34.00    0.45
13   / 13:   46.00    0.71
14   / 14:   40.00    0.83
15   / 15:   55.00    0.90
16   / 16:   54.00    1.33
17   / 17:   44.00    1.38
18   / 18:   49.00    1.58
19   / 19:   53.00    1.60
20   / 20:   39.00    2.07
21   / 21:   51.00    3.51
22   / 22:   57.00    3.57
23   / 23:   37.00    4.23
24   / 24:   25.00    4.50
25   / 25:   52.00    4.54
26   / 26:   30.00    4.70
27   / 27:   50.00    4.93
28   / 28:   42.00    5.37
29   / 29:   45.00    5.92
30   / 30:   21.00    6.60
31   / 31:   12.00   12.35
32   / 32:    ....    ....
33   / 33:    ....    ....
34   / 34:    ....    ....
35   / 35:    ....    ....
36   / 36:    ....    ....
37   / 37:    ....    ....
38   / 38:    ....    ....
39   / 39:    ....    ....
40   / 40:    ....    ....
41   / 41:    ....    ....
42   / 42:    ....    ....
43   / 43:    ....    ....
44   / 44:    ....    ....
45   / 45:    ....    ....
46   / 46:    ....    ....
47   / 47:    ....    ....
48   / 48:    ....    ....
49   / 49:    ....    ....
50   / 50:    ....    ....
51   / 51:    ....    ....
52   / 52:    ....    ....
53   / 53:    ....    ....
54   / 54:    ....    ....
55   / 55:    ....    ....
56   / 56:    ....    ....
57   / 57:    ....    ....
58   / 58:    ....    ....
59   / 59:    ....    ....
60   / 60:    ....    ....
 
let len = tsorted_wnd[l=@ngd]
list len
             VARIABLE : TSORTED_WND[L=@NGD]
             FILENAME : coads_vwnd.cdf
             LONGITUDE: 161W
             LATITUDE : 39N
             T        : 0.5 to 60.5
          31.00
 
! deliberately sample at invalid points
! Note: in MOST circumstances this would simply result in a result of
! missing values, however, the underlying data set has an "enhanced heading"
! so that these indices appear to be valid
SET MODE ignore_error
let tsorted_indices = sortl(vwnd) + 90
let tsorted_wnd = samplel(vwnd, tsorted_indices[i=90,j=65])
list tsorted_indices, tsorted_wnd
SET MODE/LAST ignore_error
 
! deliberately sample at invalid points that are outside of the axis range
let tsorted_indices = sortl(vwnd) + 999
let tsorted_wnd = samplel(vwnd, tsorted_indices[i=90,j=65])
stat tsorted_wnd
 
             SAMPLEL(VWND, TSORTED_INDICES[I=90,J=65])
             LONGITUDE: 161W
             LATITUDE: 39N
             Z:  N/A
             T: 0.5 to 60.5
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_vwnd.cdf
 
 Total # of data points: 60 (1*1*1*60*1*1)
 # flagged as bad  data: 60
 
 
go bench_samplexy.jnl
 ! NOAA/PMEL TMAP
 ! Program FERRET (debug)
 ! Version 5.00 - 04/12/99
 ! 13-Apr-99 14:36
 
use coads_climatology
 
let asst = samplexy(sst, {171,173,305}, {-1,1,13})
list asst
             VARIABLE : SAMPLEXY(SST, {171,173,305}, {-1,1,13})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 3 points (X-TIME)
                     1      2      3    
                     1      2      3
 16-JAN      / 1:  29.00  27.90  26.71
 15-FEB      / 2:  28.55  28.25  26.37
 17-MAR      / 3:  28.88  28.48  26.32
 
let asst = samplexy(sst, {171,172,305}, {-1,1,13})
list asst
             VARIABLE : SAMPLEXY(SST, {171,172,305}, {-1,1,13})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 3 points (X-TIME)
                     1      2      3    
                     1      2      3
 16-JAN      / 1:  29.00  28.27  26.71
 15-FEB      / 2:  28.55  28.49  26.37
 17-MAR      / 3:  28.88  28.61  26.32
 
go bench_samplet_date.jnl
!
!  Data coads_vwnd in ~kobrien/FERRET/benc
!
use coads_vwnd
set region/x=161w/y=39n
 
let my_vwnd = samplet_date(vwnd,1950,2,0,0,0,0)
list my_vwnd
             VARIABLE : SAMPLET_DATE(VWND,1950,2,0,0,0,0)
             FILENAME : coads_vwnd.cdf
             LONGITUDE: 161W
             LATITUDE : 39N
             T        : 1
          3.227
 
 
let my_vwnd = samplet_date(vwnd,{1950,1950},{5,8},{16,15},{12,12},{0,0},{0,0})
list my_vwnd
             VARIABLE : SAMPLET_DATE(VWND,{1950,1950},{5,8},{16,15},{12,12},{0,0},{0,0})
             FILENAME : coads_vwnd.cdf
             SUBSET   : 2 points (T)
             LONGITUDE: 161W
             LATITUDE : 39N
           161W   
            90
 1   / 1:  1.600
 2   / 2: -0.406
 
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go bench_eof
! Benchmark for EOF functions
! Statically linked as of ferret V5.34
! Ansley Manke  8/2/2001
 
! In version 6.8 (double precision), the old eof functions are not available
! Run the script calling eofsvd functions and exit, leaving old eof function calls.
 
! Test the bail-out from eof_space, eof_stat, eof_tfunc
set mode ignore
 
USE coads_climatology
LET eofxyfcn = eof_space(sst[X=27w:23w,Y=1S:3N], 1.)
list/l=1:2 eofxyfcn
 
LET eofstat = eof_stat(sst[X=27w:23w,Y=1S:3N], 1.)
list/i=1:3/j=1:3 eofstat
 
LET eoftime = eof_tfunc(SST[X=27W:23W,Y=1S:3N], 1.)
list/i=1:2 eoftime
 
set mode/last ignore
 
! Test functions eofsvd*
 
USE coads_climatology
LET eofxyfcn = eofsvd_space(sst[X=27w:23w,Y=1S:3N])
list/l=1:2 eofxyfcn
             VARIABLE : EOFSVD_SPACE(SST[X=27W:23W,Y=1S:3N])
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 3 by 2 points (LONGITUDE-LATITUDE-T)
              27W     25W     23W    
              157     158     159
 ---- L:1 T:   1
 3N   / 47: -0.1753 -0.1784 -0.3092
 1N   / 46: -0.3086 -0.2809 -0.2910
 1S   / 45: -0.2715 -0.4976 -0.5956
 ---- L:2 T:   2
 3N   / 47: -0.0525 -0.0028 -0.1241
 1N   / 46:  0.0646  0.0572 -0.0695
 1S   / 45:  0.1213  0.0397 -0.0342
 
LET eofstat = eofsvd_stat(sst[X=27w:23w,Y=1S:3N])
list/i=1:3/j=1:3 eofstat
             VARIABLE : EOFSVD_STAT(SST[X=27W:23W,Y=1S:3N])
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 3 points (X-Y)
             1      2      3    
             1      2      3
 1   / 1:   9.00   9.00   9.00
 2   / 2:  95.80   4.20   0.00
 3   / 3:   1.09   0.05   0.00
 
LET eoftime = eofsvd_tfunc(SST[X=27W:23W,Y=1S:3N])
list/i=1:2 eoftime
             VARIABLE : EOFSVD_TFUNC(SST[X=27W:23W,Y=1S:3N])
             FILENAME : coads_climatology.cdf
             SUBSET   : 2 by 3 points (X-TIME)
                     1      2    
                     1      2
 16-JAN      / 1:  1.178 -0.782
 15-FEB      / 2:  0.088  1.411
 17-MAR      / 3: -1.266 -0.630
 
! The functions need updating for double precision Ferret
exit/script
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go bench_compress_by
let mask = {1,,1,,1} + 0*L[l=101:102] + 0*K[k=10:11]
list compressi_by({10,20,30,40,50},mask)
             VARIABLE : COMPRESSI_BY({10,20,30,40,50},MASK)
             SUBSET   : 5 by 2 by 2 points (X-Z-T)
               1      2      3      4      5    
               1      2      3      4      5
 ---- L:101 T:   101
 10   / 10:  10.00  30.00  50.00   ....   ....
 11   / 11:  10.00  30.00  50.00   ....   ....
 ---- L:102 T:   102
 10   / 10:  10.00  30.00  50.00   ....   ....
 11   / 11:  10.00  30.00  50.00   ....   ....
let mask2 = IF J[j=201:202] eq 201 then mask else 1/(MISSING(mask,4)-1)
list compressi_by({10,20,30,40,50},mask2)
             VARIABLE : COMPRESSI_BY({10,20,30,40,50},MASK2)
             SUBSET   : 5 by 2 by 2 by 2 points (X-Y-Z-T)
                 1      2      3      4      5    
                 1      2      3      4      5
 ---- L:101 T:   101
 ---- K:10 Z:   10
 201   / 201:  10.00  30.00  50.00   ....   ....
 202   / 202:  20.00  40.00   ....   ....   ....
 ---- K:11 Z:   11
 201   / 201:  10.00  30.00  50.00   ....   ....
 202   / 202:  20.00  40.00   ....   ....   ....
 ---- L:102 T:   102
 ---- K:10 Z:   10
 201   / 201:  10.00  30.00  50.00   ....   ....
 202   / 202:  20.00  40.00   ....   ....   ....
 ---- K:11 Z:   11
 201   / 201:  10.00  30.00  50.00   ....   ....
 202   / 202:  20.00  40.00   ....   ....   ....
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go bench_compress
 ! NOAA/PMEL TMAP
 ! Program FERRET
 ! Version 5.21 - 06/15/00
 ! 10-Jul-00 10:39
 
! V550 *sh* 11/02 - documentation change only reflecting subspan modulo
 
use coads_climatology
! Note that L=5 lies outside the time axis range of 3 points
! As of V550 this triggers a subspan modulo calculation (correctly)
list sst[l=5,j=66,i=125:131]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 7 points (LONGITUDE)
             LATITUDE : 41N
             TIME     : 15-JAN 11:49
               41N 
               66
 91W   / 125:....
 89W   / 126:....
 87W   / 127:....
 85W   / 128:....
 83W   / 129:....
 81W   / 130:....
 79W   / 131:....
list compressi(sst[l=5,j=66,i=125:131])
             VARIABLE : COMPRESSI(SST[L=5,J=66,I=125:131])
             FILENAME : coads_climatology.cdf
             SUBSET   : 7 points (X)
             LATITUDE : 41N
             TIME     : 15-JAN 11:49
           41N 
           66
 1   / 1:....
 2   / 2:....
 3   / 3:....
 4   / 4:....
 5   / 5:....
 6   / 6:....
 7   / 7:....
 
list sst[l=5,j=63:73,i=125]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 11 points (LATITUDE)
             LONGITUDE: 91W
             TIME     : 15-JAN 11:49
               91W   
              125
 55N   / 73:   ....
 53N   / 72:   ....
 51N   / 71:   ....
 49N   / 70:   ....
 47N   / 69:   2.70
 45N   / 68:  13.35
 43N   / 67:   ....
 41N   / 66:   ....
 39N   / 65:   ....
 37N   / 64:   ....
 35N   / 63:   ....
list compressj(sst[l=5,j=63:73,i=125])
             VARIABLE : COMPRESSJ(SST[L=5,J=63:73,I=125])
             FILENAME : coads_climatology.cdf
             SUBSET   : 11 points (Y)
             LONGITUDE: 91W
             TIME     : 15-JAN 11:49
              91W   
             125
 1    /  1:  13.35
 2    /  2:   2.70
 3    /  3:   ....
 4    /  4:   ....
 5    /  5:   ....
 6    /  6:   ....
 7    /  7:   ....
 8    /  8:   ....
 9    /  9:   ....
 10   / 10:   ....
 11   / 11:   ....
 
list sst[j=67,i=125]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (TIME)
             LONGITUDE: 91W
             LATITUDE : 43N
                   91W 
                  125
 16-JAN      / 1:....
 15-FEB      / 2:....
 17-MAR      / 3:....
list compressl(sst[j=67,i=125])
             VARIABLE : COMPRESSL(SST[J=67,I=125])
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (T)
             LONGITUDE: 91W
             LATITUDE : 43N
           91W 
          125
 1   / 1:....
 2   / 2:....
 3   / 3:....
 
 
use gt4d011	! as in bench_sortk
let a = if temp le 27 then temp
list a[i=91,j=35,l=1]
             VARIABLE : IF TEMP LE 27 THEN TEMP
             FILENAME : gt4d011.cdf
             SUBSET   : 10 points (DEPTH (m))
             LONGITUDE: 139.5W
             LATITUDE : 3.5S
             TIME     : 17-AUG-1982 12:00
              139.5W 
               91
 5     /  1:   ....
 15    /  2:   ....
 25    /  3:   ....
 35    /  4:   ....
 45    /  5:   ....
 55    /  6:   ....
 65    /  7:  26.40
 75    /  8:  26.02
 85    /  9:  25.67
 95    / 10:  25.32
list compressk(a[i=91,j=35,l=1])
             VARIABLE : COMPRESSK(A[I=91,J=35,L=1])
             FILENAME : gt4d011.cdf
             SUBSET   : 10 points (Z)
             LONGITUDE: 139.5W
             LATITUDE : 3.5S
             TIME     : 17-AUG-1982 12:00
             139.5W 
              91
 1    /  1:  26.40
 2    /  2:  26.02
 3    /  3:  25.67
 4    /  4:  25.32
 5    /  5:   ....
 6    /  6:   ....
 7    /  7:   ....
 8    /  8:   ....
 9    /  9:   ....
 10   / 10:   ....
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO bench_internal_string_functions
! test internal string functions:
!       strlen
!	upcase
!	dncase
!	strindex
!	strrindex
!	substring
!	strcat
!	float  - return float value from string
!
!	*kob*  6/02   Ferret v5.41
 
 
! STRLEN
! Result should be 35
list strlen("This string should be 35 characters")
             VARIABLE : STRLEN("This string should be 35 characters")
          35.00
! Result should be 0
list strlen("")
             VARIABLE : STRLEN("")
          0.0000
 
 
! UPCASE
! Result should be in all caps
list upcase ("this String sHould be iN aLl Caps")
             VARIABLE : UPCASE ("this String sHould be iN aLl Caps")
        "THIS STRING SHOULD BE IN ALL CAPS"
 
! DNCASE
! Result should be all lower case
list dncase ("this String sHould be iN loWer caSE")
             VARIABLE : DNCASE ("this String sHould be iN loWer caSE")
        "this string should be in lower case"
 
! STRINDEX
! Find first occurence string "fun" in longer string
! Result should be 11
list strindex("Ferret is fun for the whole family - real fun, family fun", "fun");
             VARIABLE : STRINDEX("Ferret is fun for the whole family - real fun, family fun", "fun")
          11.00
 
! STRRINDEX
! Find last occurence string "fun" in longer string
! Result should be 55
list strrindex("Ferret is fun for the whole family - real fun, family fun", "fun");
             VARIABLE : STRRINDEX("Ferret is fun for the whole family - real fun, family fun", "fun")
          55.00
 
! SUBSTRING
! Clip a substring from a string - result should be "ferret"
list substring("Have you fed your ferret today", 19, 6)
             VARIABLE : SUBSTRING("Have you fed your ferret today", 19, 6)
        "ferret"
! Ask for offset greater than string lenght - result should be ""
list substring("Have you fed your ferret today", 50, 6)
             VARIABLE : SUBSTRING("Have you fed your ferret today", 50, 6)
        ""
! Ask for more chars than in string - result should be "ferret today"
list substring("Have you fed your ferret today", 19, 60)
             VARIABLE : SUBSTRING("Have you fed your ferret today", 19, 60)
        "ferret today"
 
 
! STRCAT
! concatenate two strings
list strcat ("All work and no play", " makes Ferret a dull boy")
             VARIABLE : STRCAT ("All work and no play", " makes Ferret a dull boy")
        "All work and no play makes Ferret a dull boy"
 
 
! FLOAT
! return float value - result should be 7.85
! list (strfloat("3.14")*10)/4  ! crashes on linux rh5 gfortran...
list .25*strfloat("3.14")
             VARIABLE : .25*STRFLOAT("3.14")
          0.7850
 
 
! the below are deliberate errors for incorrect argument detection
set mode ignore
list strindex("Ferret is fun for the whole family - real family fun");
list strrindex("Ferret is fun for the whole family - real family fun");
list substring("Have you fed your ferret today", 19)
list substring("Have you fed your ferret today")
list strcat ("All work and no play")
 
set mode/last ignore
 
! 4/2006 these functions now are also internally linked
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO bn_ef_bench_extrema.jnl
! bench_extrema.jnl
!  benchmark tests for findhi and findlo
!  external functions; installed as .so files
!  Ferret version 5.4
 
! ACM 28-Jan-02
 
use coads_climatology
set region/l=1/x=100:360/y=-20:60
 
list/x=1:10 findhi(sst,4,4)
             VARIABLE : FINDHI(SST,4,4)
             FILENAME : coads_climatology.cdf
             SUBSET   : 10 by 3 points (X-Y)
             TIME     : 16-JAN 06:00
             1      2      3      4      5      6      7      8      9     10    
             1      2      3      4      5      6      7      8      9     10
 1   / 1:  335.0  359.0  269.0   57.0  195.0   73.0  101.0  209.0   87.0  167.0
 2   / 2:  -69.0  -63.0  -25.0  -13.0  -13.0  -11.0  -11.0  -11.0   -9.0   -9.0
 3   / 3:    0.3    0.9   23.3   28.4   29.7   28.5   28.3   28.9   28.4   29.8
list/x=1:10 findlo(sst,4,4)
             VARIABLE : FINDLO(SST,4,4)
             FILENAME : coads_climatology.cdf
             SUBSET   : 10 by 3 points (X-Y)
             TIME     : 16-JAN 06:00
             1      2      3      4      5      6      7      8      9     10    
             1      2      3      4      5      6      7      8      9     10
 1   / 1:  331.0  365.0  147.0   79.0  119.0   65.0   83.0  125.0  157.0  237.0
 2   / 2:  -65.0  -61.0  -59.0  -53.0   -9.0   -7.0   -7.0   -7.0   -3.0   -1.0
 3   / 3:   -0.8   -0.1    0.4    1.6   28.3   27.6   27.8   28.4   28.7   23.9
 
let a = findlo(sst,4,4)
list a[i=@ngd]
             VARIABLE : FINDLO(SST,4,4) (# of points)
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (Y)
             X        : 0.5 to 16200.5 (number of valid)
             TIME     : 16-JAN 06:00
 1   / 1:  13.00
 2   / 2:  13.00
 3   / 3:  13.00
 
let a = findlo(sst,2,2)
list a[i=@ngd]
             VARIABLE : FINDLO(SST,2,2) (# of points)
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (Y)
             X        : 0.5 to 16200.5 (number of valid)
             TIME     : 16-JAN 06:00
 1   / 1:  113.0
 2   / 2:  113.0
 3   / 3:  113.0
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO bn_ef_err541_date_delim.jnl
! err541_date_delim.jnl
! Fix errors occurring with delimted reads - four digit years were
!   being accuratly calculated.
!
! *kob* 11/02
 
set data/var="date1"/type="date,date"/form=delim dates_bug.dat
! first date is 12-27-1999 which is unacceptable so should be missing values
list days1900toymdhms(date1)
             VARIABLE : DAYS1900TOYMDHMS(DATE1)
             FILENAME : dates_bug.dat
             SUBSET   : 6 by 6 points (X-Z)
             1      2      3      4      5      6    
             1      2      3      4      5      6
 1   / 1:   ....  1999.  2001.  2001.  2003.   999.
 2   / 2:   ....     7.     7.     7.     7.     8.
 3   / 3:   ....    28.    29.    30.    31.     1.
 4   / 4:   ....     0.     0.     0.     0.     0.
 5   / 5:   ....     0.     0.     0.     0.     0.
 6   / 6:   ....     0.     0.     0.     0.     0.
 
 
! now test accuracy of dates
DEFINE AXIS/T0=1-jan-1900/T=1-jan-1900:1-jan-2005:1/units=days ttt
 
let date_check = date1[i=2] - T[gt=ttt,t="28-jul-1999"]
if `date_check` then say **** DELIMTED READ DATE CHECK FAILED
 !-> if 0 then say **** DELIMTED READ DATE CHECK FAILED
let date_check = date1[i=3] - T[gt=ttt,t="29-jul-2001"]
if `date_check` then say **** DELIMTED READ DATE CHECK FAILED
 !-> if 0 then say **** DELIMTED READ DATE CHECK FAILED
let date_check = date1[i=4] - T[gt=ttt,t="30-jul-2001"]
if `date_check` then say **** DELIMTED READ DATE CHECK FAILED
 !-> if 0 then say **** DELIMTED READ DATE CHECK FAILED
let date_check = date1[i=5] - T[gt=ttt,t="31-jul-2003"]
if `date_check` then say **** DELIMTED READ DATE CHECK FAILED
 !-> if 0 then say **** DELIMTED READ DATE CHECK FAILED
 
 
 
! now test eurodate format
can data/all
set data/var="date1"/type="eurodate,eurodate"/form=delim euro_dates_bug.dat
! first date is 27-07-1999 which is unacceptable so should be missing values
list days1900toymdhms(date1)
             VARIABLE : DAYS1900TOYMDHMS(DATE1)
             FILENAME : euro_dates_bug.dat
             SUBSET   : 5 by 6 points (X-Z)
             1      2      3      4      5    
             1      2      3      4      5
 1   / 1:   ....  2001.  2001.  2003.   999.
 2   / 2:   ....     7.     7.     7.     8.
 3   / 3:   ....    28.    30.    31.     1.
 4   / 4:   ....     0.     0.     0.     0.
 5   / 5:   ....     0.     0.     0.     0.
 6   / 6:   ....     0.     0.     0.     0.
 
!test accuracy of eurodates
let date_check = date1[i=2] - T[gt=ttt,t="28-jul-2001"]
if `date_check` then say **** DELIMTED READ DATE CHECK FAILED
 !-> if 0 then say **** DELIMTED READ DATE CHECK FAILED
let date_check = date1[i=3] - T[gt=ttt,t="30-jul-2001"]
if `date_check` then say **** DELIMTED READ DATE CHECK FAILED
 !-> if 0 then say **** DELIMTED READ DATE CHECK FAILED
let date_check = date1[i=4] - T[gt=ttt,t="31-jul-2003"]
if `date_check` then say **** DELIMTED READ DATE CHECK FAILED
 !-> if 0 then say **** DELIMTED READ DATE CHECK FAILED
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO bn_ef_zaxr_fcns.jnl
! bn_ef_zaxr_functions.jnl
! 04-apr-05 *acm* move to tests of shared-obj efs.
!
! bn_zaxr_functions.jnl
! Compare the various zaxreplace functions
 
 
! Define some original source data:
 
let ddat = zsequence({1126,1136,1146,1156,1166})
let cycle = zsequence({346, 347, 349, 350, 351})
 
! Put that data on the following original source grid:
 
Define axis/z=10:50:10 zaxis_orig
 
let cycle_orig = cycle[gz=zaxis_orig@asn]
let ddat_orig = ddat[gz=zaxis_orig@asn]
 
! Define a destination axis
 
define axis/z=345:353:1 zaxis_des
let dummy = z[GZ=zaxis_des]
 
let ddat_a = zaxreplace(ddat_orig, cycle_orig, dummy)
 
let ddat_b = zaxreplace_avg(ddat_orig, cycle_orig, dummy)
 
let ddat_c = zaxreplace_bin(ddat_orig, cycle_orig, dummy)
 
! Compare result of zaxreplace, zaxreplace_avg, zaxreplace_bin
list ddat_a, ddat_b, ddat_c
             Z: 344.5 to 353.5
 Column  1: DDAT_A is ZAXREPLACE(DDAT_ORIG, CYCLE_ORIG, DUMMY)
 Column  2: DDAT_B is ZAXREPLACE_AVG(DDAT_ORIG, CYCLE_ORIG, DUMMY)
 Column  3: DDAT_C is ZAXREPLACE_BIN(DDAT_ORIG, CYCLE_ORIG, DUMMY)
          DDAT_A  DDAT_B DDAT_C
345   / 1:   ....   ....   ....
346   / 2:   ....  1126.  1126.
347   / 3:  1136.  1136.  1136.
348   / 4:  1141.  1141.   ....
349   / 5:  1146.  1146.  1146.
350   / 6:  1156.  1156.  1156.
351   / 7:  1166.  1166.  1166.
352   / 8:   ....   ....   ....
353   / 9:   ....   ....   ....
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO bn_ef_curv_to_rect.jnl
! bn_ef_curv_to_rect.jnl
! Test of curvilinear to rectilinear regridding
! Uses shared-object external functions
! ACM 5/4/05
 
show func curv*
CURV_RANGE(LONGITUDES,LATITUDES,xrange_lo,xrange_hi,yrange_lo,yrange_hi,modulo flag for X coordinates)
    find i,j bounds for subset of a variable in curvilinear coordinates
    LONGITUDES: 2-D longitudes of curvilinear grid
    LATITUDES: 2-D latitudes of curvilinear grid
    xrange_lo: Minimum of longitude range
    xrange_hi: Maximum of longitude range
    yrange_lo: Minimum of latitude range
    yrange_hi: Maximum of latitude range
    modulo flag for X coordinates: 1= X modulo; 0= X not modulo
CURV_TO_RECT(V,mapping)
    Apply mapping to regrid from curvilinear to rectangular grid
    V: Variable to regrid, on curvilinear grid V(x,y,z,t,e,f)
    mapping: mapping computed by curv_to_rect_MAP
CURV_TO_RECT_FSU(V,mapping)
    Alt func to Apply mapping to regrid from curvilinear to rectangular grid
    V: Variable to regrid, on curvilinear grid V(x,y,z,t)
    mapping: mapping computed by curv_to_rect_MAP
CURV_TO_RECT_MAP(lon_in,lat_in,grid_out,radius)
    Compute mapping for regridding: curvilinear to rectangular grid.
    lon_in: Source grid longitudes (2-D) (degrees)
    lat_in: Source grid latitudes (2-D) (degrees)
    grid_out: Any variable on destination Longitude-Latitude grid, Lon and Lat (degrees)
    radius: Source points falling within radius are included in mapping to destination point (degrees)
 
use tripolar_subset.nc
shade ht, geolon_vert_t, geolat_vert_t
 
! Define output grid
 
def axis/x=-300:100:10 xout
def axis/y=60:90:3 yout
let a = x[gx=xout] + y[gy=yout]
 
! Define mapping
let my_map = curv_to_rect_map (geolon_vert_t, geolat_vert_t, a, 10)
 
! apply mapping
let mapped = curv_to_rect (ht, my_map)
shade mapped
stat mapped
 
             CURV_TO_RECT (HT, MY_MAP)
             X: -305 to 105
             Y: 58.5 to 91.5
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: ./data/tripolar_subset.nc
 
 Total # of data points: 451 (41*11*1*1*1*1)
 # flagged as bad  data: 79
 Minimum value: 0
 Maximum value: 4298.8
 Mean    value: 963.12 (unweighted average)
 Standard deviation: 1380.9
 
 
! tax_ functions
use gt4d011
 
list/L=15:20 tax_datestring(t[gt=temp],temp,"hour")
             VARIABLE : TAX_DATESTRING(T[GT=TEMP],TEMP,"hour")
             FILENAME : gt4d011.cdf
             SUBSET   : 6 points (TIME)
 10-NOV-1982 16 / 15:"10-NOV-1982 16"
 16-NOV-1982 18 / 16:"16-NOV-1982 18"
 22-NOV-1982 20 / 17:"22-NOV-1982 20"
 28-NOV-1982 22 / 18:"28-NOV-1982 22"
 05-DEC-1982 00 / 19:"05-DEC-1982 00"
 11-DEC-1982 02 / 20:"11-DEC-1982 02"
list/L=15:20 tax_datestring(t[gt=temp],temp,"day")
             VARIABLE : TAX_DATESTRING(T[GT=TEMP],TEMP,"day")
             FILENAME : gt4d011.cdf
             SUBSET   : 6 points (TIME)
 10-NOV-1982 16 / 15:"10-NOV-1982"
 16-NOV-1982 18 / 16:"16-NOV-1982"
 22-NOV-1982 20 / 17:"22-NOV-1982"
 28-NOV-1982 22 / 18:"28-NOV-1982"
 05-DEC-1982 00 / 19:"05-DEC-1982"
 11-DEC-1982 02 / 20:"11-DEC-1982"
list/L=15:20 tax_dayfrac(t[gt=temp],temp), tax_dayfrac(t[gt=temp],temp)*24.
             DATA SET: ./data/gt4d011.cdf
             TIME: 07-NOV-1982 15:00 to 14-DEC-1982 03:00
 Column  1: TAX_DAYFRAC(T[GT=TEMP],TEMP)
 Column  2: EX#2 is TAX_DAYFRAC(T[GT=TEMP],TEMP)*24.
                (C001,V001)   EX#2
10-NOV-1982 16 / 15:  0.6667  16.00
16-NOV-1982 18 / 16:  0.7500  18.00
22-NOV-1982 20 / 17:  0.8333  20.00
28-NOV-1982 22 / 18:  0.9167  22.00
05-DEC-1982 00 / 19:  0.0000   0.00
11-DEC-1982 02 / 20:  0.0833   2.00
list/L=15:20 tax_day(t[gt=temp],temp), tax_jday(t[gt=temp],temp)
             DATA SET: ./data/gt4d011.cdf
             TIME: 07-NOV-1982 15:00 to 14-DEC-1982 03:00
 Column  1: TAX_DAY(T[GT=TEMP],TEMP)
 Column  2: TAX_JDAY(T[GT=TEMP],TEMP)
                (C001,V001)  (C001,V009)
10-NOV-1982 16 / 15:   10.00   314.0
16-NOV-1982 18 / 16:   16.00   320.0
22-NOV-1982 20 / 17:   22.00   326.0
28-NOV-1982 22 / 18:   28.00   332.0
05-DEC-1982 00 / 19:    5.00   339.0
11-DEC-1982 02 / 20:   11.00   345.0
list/L=15:20 tax_month(t[gt=temp],temp), tax_yearfrac(t[gt=temp],temp)
             DATA SET: ./data/gt4d011.cdf
             TIME: 07-NOV-1982 15:00 to 14-DEC-1982 03:00
 Column  1: TAX_MONTH(T[GT=TEMP],TEMP)
 Column  2: TAX_YEARFRAC(T[GT=TEMP],TEMP)
                (C001,V001)  (C001,V009)
10-NOV-1982 16 / 15:   11.00  0.8621
16-NOV-1982 18 / 16:   11.00  0.8788
22-NOV-1982 20 / 17:   11.00  0.8954
28-NOV-1982 22 / 18:   11.00  0.9121
05-DEC-1982 00 / 19:   12.00  0.9288
11-DEC-1982 02 / 20:   12.00  0.9454
list/L=15:20 tax_year(t[gt=temp],temp)
             VARIABLE : TAX_YEAR(T[GT=TEMP],TEMP)
             FILENAME : gt4d011.cdf
             SUBSET   : 6 points (TIME)
 10-NOV-1982 16 / 15:  1982.
 16-NOV-1982 18 / 16:  1982.
 22-NOV-1982 20 / 17:  1982.
 28-NOV-1982 22 / 18:  1982.
 05-DEC-1982 00 / 19:  1982.
 11-DEC-1982 02 / 20:  1982.
list tax_units(temp)
             VARIABLE : TAX_UNITS(TEMP)
             FILENAME : gt4d011.cdf
          3600.
 
! fill_xy
can data/all
use coads_climatology
let mask = 0*x[gx=sst] + y[gy=sst]  + 1
shade fill_xy(sst[l=1], mask[l=1], 1)
shade fill_xy(sst[l=1], mask[l=1], 4)
 
! Compare SAMPLEXY and SAMPLEIJ
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO bn_samplexy_sampleij
! bn_samplexy_sampleij
 
! Simple tests of SAMPLEXY and SAMPLEIJ
 
sh func samplexy, sampleij
SAMPLEXY(DAT_TO_SAMPLE,XPTS,YPTS)
    Returns data sampled at a set of (X,Y) points, using linear interpolation
    DAT_TO_SAMPLE: variable (x,y,z,t,e,f) to sample
    XPTS: X values of sample points
    YPTS: Y values of sample points
SAMPLEIJ(DAT_TO_SAMPLE,XPTS,YPTS)
    Returns data sampled by matching coordinates at a subset of grid points, defined by (XPTS, YPTS)
    DAT_TO_SAMPLE: variable (x,y,z,t,e,f) to sample
    XPTS: X coordinates of grid points
    YPTS: Y coordinates of grid points
use coads_climatology
 
! Both functions take world coordinate values
! as arguements for the points at which to sample.
!
! SAMPLEXY will interpolate to geth the result,
! SAMPLEIJ requires an exact match.
list/l=1 samplexy(sst,{321,323.5,325}, {1,1,1}), sampleij(sst,{321,323,324.5}, {1,1,1})
             DATA SET: ./data/coads_climatology.cdf
             X: 0.5 to 3.5
             TIME: 16-JAN 06:00
 Column  1: EX#1 is SAMPLEXY(SST,{321,323.5,325}, {1,1,1})
 Column  2: EX#2 is SAMPLEIJ(SST,{321,323,324.5}, {1,1,1})
          EX#1   EX#2
1   / 1:  27.48  27.48
2   / 2:  27.40  27.47
3   / 3:  27.22   ....
 
 
*** Running ferret script: bn_modulo_strides.jnl
! bn_modulo_strides.jnl
! 6/01 *sh*
! exercise the combination of modulo and netCDF strides IO
 
define axis/modulo/x=1:20:1 x20
LET a = X[gx=x20]
LET str_raw = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t"}
!list b_raw
let str = str_raw[gx=x20@asn]
save/clobber/file=test_modulo.cdf a, str
cancel variable a, str
use test_modulo
 
! verify that both single IO and double IO cases are doing rdstride
cancel memory/all
set mode diag
let b =  a[i=18:23:2]
list/nohead b            ! using rdstride
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid B        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    B        C:  6 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 strip regrid on X: A --> (G###)           @XACT
 strip moduloing A on X axis:       18       22 dset:   1
 rdstride A        C: 11 dset:   1 I:     18     20  J: -999 -999  K: -999 -999  L:   -999   -999
 doing moduloing A on X axis:       18       20 dset:   1
 -DELETE A        M:  1 dset:   1 I:     18     20  J: -999 -999  K: -999 -999  L:   -999   -999
 rdstride A        C: 11 dset:   1 I:      2      2  J: -999 -999  K: -999 -999  L:   -999   -999
 doing moduloing A on X axis:        2        2 dset:   1
 -DELETE A        M:  1 dset:   1 I:      2      2  J: -999 -999  K: -999 -999  L:   -999   -999
 nulrgd  A        M:  1 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE A        M:  2 dset:   1 I:     18     22  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 18   / 1:  18.00
 20   / 2:  20.00
 22   / 3:   2.00
list/nohead a[i=1:25:3]  ! no strides --> reads full region without strides
 dealloc  dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 strip regrid on X: A --> (G###)           @XACT
 strip moduloing A on X axis:        1       25 dset:   1
 reading A        M:  3 dset:   1 I:      1     20  J: -999 -999  K: -999 -999  L:   -999   -999
 doing moduloing A on X axis:        1       20 dset:   1
 regrid  A        M:  4 dset:   1 I:      1      9  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 1    / 1:   1.00
 4    / 2:   4.00
 7    / 3:   7.00
 10   / 4:  10.00
 13   / 5:  13.00
 16   / 6:  16.00
 19   / 7:  19.00
 22   / 8:   2.00
 25   / 9:   5.00
list/nohead b            ! reuse of cached result
 dealloc  dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 -DELETE A        M:  4 dset:   1 I:      1      9  J: -999 -999  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 found   B        M:  2 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 18   / 1:  18.00
 20   / 2:  20.00
 22   / 3:   2.00
set mode/last diag
 
! less than one modulo cycle -- grab in 2 pieces
! ... delta(2) a factor of npts(20)
list/nohead a[i=18:23:2]
 18   / 1:  18.00
 20   / 2:  20.00
 22   / 3:   2.00
list/nohead a[i=19:23:2]
 19   / 1:  19.00
 21   / 2:   1.00
 23   / 3:   3.00
list/nohead a[i=20:23:2]
 20   / 1:  20.00
 22   / 2:   2.00
list/nohead a[i=18:24:2]
 18   / 1:  18.00
 20   / 2:  20.00
 22   / 3:   2.00
 24   / 4:   4.00
list/nohead a[i=19:24:2]
 19   / 1:  19.00
 21   / 2:   1.00
 23   / 3:   3.00
list/nohead a[i=20:24:2]
 20   / 1:  20.00
 22   / 2:   2.00
 24   / 3:   4.00
 
! ... delta(3) not a factor of npts(20)
list/nohead a[i=17:23:3]
 17   / 1:  17.00
 20   / 2:  20.00
 23   / 3:   3.00
list/nohead a[i=18:23:3]
 18   / 1:  18.00
 21   / 2:   1.00
list/nohead a[i=19:23:3]
 19   / 1:  19.00
 22   / 2:   2.00
list/nohead a[i=20:23:3]
 20   / 1:  20.00
 23   / 2:   3.00
list/nohead a[i=17:24:3]
 17   / 1:  17.00
 20   / 2:  20.00
 23   / 3:   3.00
list/nohead a[i=18:24:3]
 18   / 1:  18.00
 21   / 2:   1.00
 24   / 3:   4.00
list/nohead a[i=19:24:3]
 19   / 1:  19.00
 22   / 2:   2.00
list/nohead a[i=20:24:3]
 20   / 1:  20.00
 23   / 2:   3.00
list/nohead a[i=17:25:3]
 17   / 1:  17.00
 20   / 2:  20.00
 23   / 3:   3.00
list/nohead a[i=18:25:3]
 18   / 1:  18.00
 21   / 2:   1.00
 24   / 3:   4.00
list/nohead a[i=19:25:3]
 19   / 1:  19.00
 22   / 2:   2.00
 25   / 3:   5.00
list/nohead a[i=20:25:3]
 20   / 1:  20.00
 23   / 2:   3.00
 
! more than one modulo cycle -- grab in one piece
list/nohead a[i=1:45:5]
 1    / 1:   1.00
 6    / 2:   6.00
 11   / 3:  11.00
 16   / 4:  16.00
 21   / 5:   1.00
 26   / 6:   6.00
 31   / 7:  11.00
 36   / 8:  16.00
 41   / 9:   1.00
list/nohead a[i=2:45:5]
 2    / 1:   2.00
 7    / 2:   7.00
 12   / 3:  12.00
 17   / 4:  17.00
 22   / 5:   2.00
 27   / 6:   7.00
 32   / 7:  12.00
 37   / 8:  17.00
 42   / 9:   2.00
list/nohead a[i=3:45:5]
 3    / 1:   3.00
 8    / 2:   8.00
 13   / 3:  13.00
 18   / 4:  18.00
 23   / 5:   3.00
 28   / 6:   8.00
 33   / 7:  13.00
 38   / 8:  18.00
 43   / 9:   3.00
list/nohead a[i=4:45:5]
 4    / 1:   4.00
 9    / 2:   9.00
 14   / 3:  14.00
 19   / 4:  19.00
 24   / 5:   4.00
 29   / 6:   9.00
 34   / 7:  14.00
 39   / 8:  19.00
 44   / 9:   4.00
list/nohead a[i=5:45:5]
 5    / 1:   5.00
 10   / 2:  10.00
 15   / 3:  15.00
 20   / 4:  20.00
 25   / 5:   5.00
 30   / 6:  10.00
 35   / 7:  15.00
 40   / 8:  20.00
 45   / 9:   5.00
list/nohead a[i=6:45:5]
 6    / 1:   6.00
 11   / 2:  11.00
 16   / 3:  16.00
 21   / 4:   1.00
 26   / 5:   6.00
 31   / 6:  11.00
 36   / 7:  16.00
 41   / 8:   1.00
list/nohead a[i=101:145:5]
 101   / 1:   1.00
 106   / 2:   6.00
 111   / 3:  11.00
 116   / 4:  16.00
 121   / 5:   1.00
 126   / 6:   6.00
 131   / 7:  11.00
 136   / 8:  16.00
 141   / 9:   1.00
list/nohead a[i=102:145:5]
 102   / 1:   2.00
 107   / 2:   7.00
 112   / 3:  12.00
 117   / 4:  17.00
 122   / 5:   2.00
 127   / 6:   7.00
 132   / 7:  12.00
 137   / 8:  17.00
 142   / 9:   2.00
list/nohead a[i=103:145:5]
 103   / 1:   3.00
 108   / 2:   8.00
 113   / 3:  13.00
 118   / 4:  18.00
 123   / 5:   3.00
 128   / 6:   8.00
 133   / 7:  13.00
 138   / 8:  18.00
 143   / 9:   3.00
list/nohead a[i=104:145:5]
 104   / 1:   4.00
 109   / 2:   9.00
 114   / 3:  14.00
 119   / 4:  19.00
 124   / 5:   4.00
 129   / 6:   9.00
 134   / 7:  14.00
 139   / 8:  19.00
 144   / 9:   4.00
list/nohead a[i=105:145:5]
 105   / 1:   5.00
 110   / 2:  10.00
 115   / 3:  15.00
 120   / 4:  20.00
 125   / 5:   5.00
 130   / 6:  10.00
 135   / 7:  15.00
 140   / 8:  20.00
 145   / 9:   5.00
list/nohead a[i=106:145:5]
 106   / 1:   6.00
 111   / 2:  11.00
 116   / 3:  16.00
 121   / 4:   1.00
 126   / 5:   6.00
 131   / 6:  11.00
 136   / 7:  16.00
 141   / 8:   1.00
 
 
!  ***** STRING TESTS *****
set mode diag
list/nohead str[i=18:23:2] ! using rdstride
 dealloc  dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 -DELETE A        M:  4 dset:   1 I:      1      8  J: -999 -999  K: -999 -999  L:   -999   -999
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 strip regrid on X: STR --> (G###)           @XACT
 strip moduloing STR on X axis:       18       22 dset:   1
 rdstride STR      C:  9 dset:   1 I:     18     20  J: -999 -999  K: -999 -999  L:   -999   -999
 doing moduloing STR on X axis:       18       20 dset:   1
 -DELETE STR      M:  4 dset:   1 I:     18     20  J: -999 -999  K: -999 -999  L:   -999   -999
 rdstride STR      C:  9 dset:   1 I:      2      2  J: -999 -999  K: -999 -999  L:   -999   -999
 doing moduloing STR on X axis:        2        2 dset:   1
 -DELETE STR      M:  4 dset:   1 I:      2      2  J: -999 -999  K: -999 -999  L:   -999   -999
 nulrgd  STR      M:  4 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE STR      M:  6 dset:   1 I:     18     22  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 18   / 1:"r"
 20   / 2:"t"
 22   / 3:"b"
list/nohead str[i=1:25:3]  ! no strides --> reads full region without strides
 dealloc  dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 strip regrid on X: STR --> (G###)           @XACT
 strip moduloing STR on X axis:        1       25 dset:   1
 reading STR      M:  6 dset:   1 I:      1     20  J: -999 -999  K: -999 -999  L:   -999   -999
 doing moduloing STR on X axis:        1       20 dset:   1
 regrid  STR      M:  8 dset:   1 I:      1      9  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          (AX###)   NORMAL    NORMAL    NORMAL
 1    / 1:"a"
 4    / 2:"d"
 7    / 3:"g"
 10   / 4:"j"
 13   / 5:"m"
 16   / 6:"p"
 19   / 7:"s"
 22   / 8:"b"
 25   / 9:"e"
set mode/last diag
 
! less than one modulo cycle -- grab in 2 pieces
! ... delta(2) a factor of npts(20)
list/nohead str[i=18:23:2]
 18   / 1:"r"
 20   / 2:"t"
 22   / 3:"b"
list/nohead str[i=20:23:2]
 20   / 1:"t"
 22   / 2:"b"
 
! ... delta(3) not a factor of npts(20)
list/nohead str[i=17:23:3]
 17   / 1:"q"
 20   / 2:"t"
 23   / 3:"c"
list/nohead str[i=18:23:3]
 18   / 1:"r"
 21   / 2:"a"
 
! more than one modulo cycle -- grab in one piece
list/nohead str[i=1:45:5]
 1    / 1:"a"
 6    / 2:"f"
 11   / 3:"k"
 16   / 4:"p"
 21   / 5:"a"
 26   / 6:"f"
 31   / 7:"k"
 36   / 8:"p"
 41   / 9:"a"
list/nohead str[i=5:45:5]
 5    / 1:"e"
 10   / 2:"j"
 15   / 3:"o"
 20   / 4:"t"
 25   / 5:"e"
 30   / 6:"j"
 35   / 7:"o"
 40   / 8:"t"
 45   / 9:"e"
list/nohead str[i=101:145:5]
 101   / 1:"a"
 106   / 2:"f"
 111   / 3:"k"
 116   / 4:"p"
 121   / 5:"a"
 126   / 6:"f"
 131   / 7:"k"
 136   / 8:"p"
 141   / 9:"a"
list/nohead str[i=105:145:5]
 105   / 1:"e"
 110   / 2:"j"
 115   / 3:"o"
 120   / 4:"t"
 125   / 5:"e"
 130   / 6:"j"
 135   / 7:"o"
 140   / 8:"t"
 145   / 9:"e"
*** Running ferret script: bn_axis_viewports.jnl
! bn_axis_viewports
! *sh* 9/01
 
! demonstrate vieport layout using the /AXES qualifier
set wind/clear/aspect=1
def view/axes allax
 
! make guide lines
show view allax   ! text = 1
 
 name             text    xlimits     ylimits    mode
 
 ALLAX            1.00   0.00,1.00   0.00,1.00   axes
   current viewport is NONE
set view allax
plot/vs/line/hlim=0:1/vlim=0:1/nolab {0.5,0.5,,0,1},{0,1,,0.5,0.5}
plot/vs/line/over/nolab {0.25,0.25,,0,1},{0,1,,0.25,0.25}
plot/vs/line/over/nolab {0.75,0.75,,0,1},{0,1,,0.75,0.75}
label 0.26,0.95,-1,0,.2 @P2@AC<-At 0.25
label 0.76,0.95,-1,0,.2 @P3@AC<-At 0.75
 
! a plot from 0.25 to 0.75
def view /xlim=0.25:0.75/ylim=0.25:0.75/axes mid
set view mid
plot/vs/hlim=-1:1/vlim=-1:1/line/i=1:200 cos(i/15),sin(i/15)
show view mid
 
 name             text    xlimits     ylimits    mode
 
 MID              0.72   0.25,0.75   0.25,0.75   axes
   current viewport is MID
ppl list xaxis


         XAXIS QUALITIES
         LO=-1.00E+00 HI= 1.00E+00 TIC= 2.00E-01 LEN= 5.57E+00 CSIZE= 1.00E-01
          TOP AXIS= ON  BOTTOM AXIS= ON 
         MANUAL  NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         XORG= 1.20E+00  AUTO LABELLING
ppl list yaxis


         YAXIS QUALITIES
         LO=-1.00E+00 HI= 1.00E+00 TIC= 2.00E-01 LEN= 5.57E+00 CSIZE= 1.00E-01
          LEFT AXIS= ON  RIGHT AXIS= ON 
         MANUAL  NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         YORG= 1.40E+00  AUTO LABELLING
 
! guidelines showing origin, axlen, white space
def view /xlim=0.25:0.75/ylim=0.25:0.75/axes mid2
set view mid2
ppl origin 0,0
define symbol xaxl `($PPL$WIDTH)/2`
 !-> define symbol xaxl 4.737
define symbol yaxl `($PPL$HEIGHT)/2`
 !-> define symbol yaxl 4.737
ppl axlen `1.2 + ($xaxl) + 1.0`,`1.4 + ($yaxl) + 1.4`
 !-> ppl axlen 6.937,7.537000000000001
plot/vs/hlim=-1.2:`($xaxl)+1.0`:0.2/vlim=-1.4:`($yaxl)+1.4`:0.2/nolab/nolab {0,($xaxl)}, {0,($yaxl)}
 !-> plot/vs/hlim=-1.2:5.737:0.2/vlim=-1.4:6.137:0.2/nolab/nolab {0,4.737}, {0,4.737}
 
! again with scale determined automatically
! make guide lines
set window/clear
set view allax
plot/vs/line/hlim=0:1/vlim=0:1/nolab {0.5,0.5,,0,1},{0,1,,0.5,0.5}
plot/vs/line/over/nolab {0.25,0.25,,0,1},{0,1,,0.25,0.25}
plot/vs/line/over/nolab {0.75,0.75,,0,1},{0,1,,0.75,0.75}
label 0.26,0.95,-1,0,.2 @P2@AC<-At 0.25
label 0.76,0.95,-1,0,.2 @P3@AC<-At 0.75
 
! a plot from 0.25 to 0.75
def view /xlim=0.25:0.75/ylim=0.25:0.75/axes mid
set view mid
plot/vs/hlim=-1:1/vlim=-1:1/line/i=1:200/noyadj cos(i/15),sin(i/15)
show view mid
 
 name             text    xlimits     ylimits    mode
 
 MID              0.72   0.25,0.75   0.25,0.75   axes
   current viewport is MID
ppl list xaxis


         XAXIS QUALITIES
         LO=-1.00E+00 HI= 1.00E+00 TIC= 2.00E-01 LEN= 5.57E+00 CSIZE= 1.00E-01
          TOP AXIS= ON  BOTTOM AXIS= ON 
         MANUAL  NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         XORG= 1.20E+00  AUTO LABELLING
ppl list yaxis


         YAXIS QUALITIES
         LO=-1.00E+00 HI= 1.00E+00 TIC= 2.00E-01 LEN= 5.57E+00 CSIZE= 1.00E-01
          LEFT AXIS= ON  RIGHT AXIS= ON 
         MANUAL  NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         YORG= 1.40E+00  AUTO LABELLING
 
! guidelines showing origin, axlen, white space
def view /xlim=0.25:0.75/ylim=0.25:0.75/axes mid2
set view mid2
ppl origin 0,0
define symbol xaxl `($PPL$WIDTH)/2`
 !-> define symbol xaxl 4.737
define symbol yaxl `($PPL$HEIGHT)/2`
 !-> define symbol yaxl 4.737
ppl axlen `1.2 + ($xaxl) + 1.0`,`1.4 + ($yaxl) + 1.4`
 !-> ppl axlen 6.937,7.537000000000001
plot/vs/hlim=-1.2:`($xaxl)+1.0`:0.2/vlim=-1.4:`($yaxl)+1.4`:0.2/nolab/line {0,($xaxl)}, {0,($yaxl)}
 !-> plot/vs/hlim=-1.2:5.737:0.2/vlim=-1.4:6.137:0.2/nolab/line {0,4.737}, {0,4.737}
 
set wind/clear
 
! a full window plot
set view allax
plot/vs/hlim=-1:1/vlim=-1:1/line/i=1:200/noyadj cos(i/15),sin(i/15)
show view mid
 
 name             text    xlimits     ylimits    mode
 
 MID              0.72   0.25,0.75   0.25,0.75   axes
   current viewport is ALLAX
 
set wind/clear
 
def view/axes/xlim=0:0.5/ylim=0:0.5 llax
set view llax
PLOT/VS/LINE/I=1:314/noyadj i*cos(i/20),i*sin(i/20)
ppl list xaxis


         XAXIS QUALITIES
         LO=-3.14E+02 HI= 2.52E+02 TIC= 5.00E+01 LEN= 6.13E+00 CSIZE= 1.00E-01
          TOP AXIS= ON  BOTTOM AXIS= ON 
         MANUAL  NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         XORG= 0.00E+00  AUTO LABELLING
ppl list yaxis


         YAXIS QUALITIES
         LO=-2.50E+02 HI= 3.00E+02 TIC= 5.00E+01 LEN= 6.13E+00 CSIZE= 1.00E-01
          LEFT AXIS= ON  RIGHT AXIS= ON 
         AUTO    NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         YORG= 0.00E+00  AUTO LABELLING
 
def view/axes/xlim=0:0.5/ylim=0.5:1 lrax
set view lrax
PLOT/VS/LINE/I=1:314/noyadj i*cos(i/20),i*sin(i/20)
ppl list xaxis


         XAXIS QUALITIES
         LO=-3.14E+02 HI= 2.52E+02 TIC= 5.00E+01 LEN= 6.13E+00 CSIZE= 1.00E-01
          TOP AXIS= ON  BOTTOM AXIS= ON 
         MANUAL  NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         XORG= 0.00E+00  AUTO LABELLING
ppl list yaxis


         YAXIS QUALITIES
         LO=-2.50E+02 HI= 3.00E+02 TIC= 5.00E+01 LEN= 6.13E+00 CSIZE= 1.00E-01
          LEFT AXIS= ON  RIGHT AXIS= ON 
         AUTO    NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         YORG= 1.40E+00  AUTO LABELLING
 
def view/axes/xlim=0.5:1/ylim=0:0.5 ulax
set view ulax
PLOT/VS/LINE/I=1:314/noyadj i*cos(i/20),i*sin(i/20)
ppl list xaxis


         XAXIS QUALITIES
         LO=-3.14E+02 HI= 2.52E+02 TIC= 5.00E+01 LEN= 6.08E+00 CSIZE= 1.00E-01
          TOP AXIS= ON  BOTTOM AXIS= ON 
         MANUAL  NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         XORG= 1.20E+00  AUTO LABELLING
ppl list yaxis


         YAXIS QUALITIES
         LO=-2.50E+02 HI= 3.00E+02 TIC= 5.00E+01 LEN= 6.08E+00 CSIZE= 1.00E-01
          LEFT AXIS= ON  RIGHT AXIS= ON 
         AUTO    NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         YORG= 0.00E+00  AUTO LABELLING
 
def view/axes/xlim=0.5:1/ylim=0.5:1 urax
set view urax
PLOT/VS/LINE/I=1:314/noyadj i*cos(i/20),i*sin(i/20)
ppl list xaxis


         XAXIS QUALITIES
         LO=-3.14E+02 HI= 2.52E+02 TIC= 5.00E+01 LEN= 6.08E+00 CSIZE= 1.00E-01
          TOP AXIS= ON  BOTTOM AXIS= ON 
         MANUAL  NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         XORG= 1.20E+00  AUTO LABELLING
ppl list yaxis


         YAXIS QUALITIES
         LO=-2.50E+02 HI= 3.00E+02 TIC= 5.00E+01 LEN= 6.08E+00 CSIZE= 1.00E-01
          LEFT AXIS= ON  RIGHT AXIS= ON 
         AUTO    NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         YORG= 1.40E+00  AUTO LABELLING
 
! again with viewport scaling determined automatically
set wind/clear
 
def view/axes/xlim=0:0.5/ylim=0:0.5 llax
show view llax
 
 name             text    xlimits     ylimits    mode
 
 LLAX             0.60   0.00,0.50   0.00,0.50   axes
   current viewport is URAX
set view llax
PLOT/VS/LINE/I=1:314/nolab i*cos(i/20),i*sin(i/20)
ppl list xaxis


         XAXIS QUALITIES
         LO=-3.14E+02 HI= 2.52E+02 TIC= 5.00E+01 LEN= 6.13E+00 CSIZE= 1.00E-01
          TOP AXIS= ON  BOTTOM AXIS= ON 
         MANUAL  NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         XORG= 0.00E+00  AUTO LABELLING
ppl list yaxis


         YAXIS QUALITIES
         LO=-2.50E+02 HI= 3.00E+02 TIC= 5.00E+01 LEN= 6.13E+00 CSIZE= 1.00E-01
          LEFT AXIS= ON  RIGHT AXIS= ON 
         AUTO    NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         YORG= 0.00E+00  AUTO LABELLING
 
def view/axes/xlim=0:0.5/ylim=0.5:1 lrax
show view lrax
 
 name             text    xlimits     ylimits    mode
 
 LRAX             0.60   0.00,0.50   0.50,1.00   axes
   current viewport is LLAX
set view lrax
PLOT/VS/LINE/I=1:314/nolab i*cos(i/20),i*sin(i/20)
ppl list xaxis


         XAXIS QUALITIES
         LO=-3.14E+02 HI= 2.52E+02 TIC= 5.00E+01 LEN= 6.13E+00 CSIZE= 1.00E-01
          TOP AXIS= ON  BOTTOM AXIS= ON 
         MANUAL  NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         XORG= 0.00E+00  AUTO LABELLING
ppl list yaxis


         YAXIS QUALITIES
         LO=-2.50E+02 HI= 3.00E+02 TIC= 5.00E+01 LEN= 6.13E+00 CSIZE= 1.00E-01
          LEFT AXIS= ON  RIGHT AXIS= ON 
         AUTO    NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         YORG= 1.40E+00  AUTO LABELLING
 
def view/axes/xlim=0.5:1/ylim=0:0.5 ulax
show view ulax
 
 name             text    xlimits     ylimits    mode
 
 ULAX             0.61   0.50,1.00   0.00,0.50   axes
   current viewport is LRAX
set view ulax
PLOT/VS/LINE/I=1:314/nolab i*cos(i/20),i*sin(i/20)
ppl list xaxis


         XAXIS QUALITIES
         LO=-3.14E+02 HI= 2.52E+02 TIC= 5.00E+01 LEN= 6.08E+00 CSIZE= 1.00E-01
          TOP AXIS= ON  BOTTOM AXIS= ON 
         MANUAL  NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         XORG= 1.20E+00  AUTO LABELLING
ppl list yaxis


         YAXIS QUALITIES
         LO=-2.50E+02 HI= 3.00E+02 TIC= 5.00E+01 LEN= 6.08E+00 CSIZE= 1.00E-01
          LEFT AXIS= ON  RIGHT AXIS= ON 
         AUTO    NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         YORG= 0.00E+00  AUTO LABELLING
 
def view/axes/xlim=0.5:1/ylim=0.5:1 urax
show view urax
 
 name             text    xlimits     ylimits    mode
 
 URAX             0.61   0.50,1.00   0.50,1.00   axes
   current viewport is ULAX
set view urax
PLOT/VS/LINE/I=1:314/nolab i*cos(i/20),i*sin(i/20)
ppl list xaxis


         XAXIS QUALITIES
         LO=-3.14E+02 HI= 2.52E+02 TIC= 5.00E+01 LEN= 6.08E+00 CSIZE= 1.00E-01
          TOP AXIS= ON  BOTTOM AXIS= ON 
         MANUAL  NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         XORG= 1.20E+00  AUTO LABELLING
ppl list yaxis


         YAXIS QUALITIES
         LO=-2.50E+02 HI= 3.00E+02 TIC= 5.00E+01 LEN= 6.08E+00 CSIZE= 1.00E-01
          LEFT AXIS= ON  RIGHT AXIS= ON 
         AUTO    NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         YORG= 1.40E+00  AUTO LABELLING
 
cancel view
go ptest
! Description: create a simple test line plot
 
! spirograph picture ...
PLOT/VS/LINE/I=1:314 i*cos(i/20),i*sin(i/20)
 
ppl list xaxis


         XAXIS QUALITIES
         LO=-3.14E+02 HI= 2.52E+02 TIC= 5.00E+01 LEN= 7.27E+00 CSIZE= 1.00E-01
          TOP AXIS= ON  BOTTOM AXIS= ON 
         MANUAL  NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         XORG= 1.20E+00  AUTO LABELLING
ppl list yaxis


         YAXIS QUALITIES
         LO=-2.50E+02 HI= 3.00E+02 TIC= 5.00E+01 LEN= 6.67E+00 CSIZE= 1.00E-01
          LEFT AXIS= ON  RIGHT AXIS= ON 
         AUTO    NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         YORG= 1.40E+00  AUTO LABELLING
*** Running ferret script: bn_strings.jnl
! bn_strings.jnl
 
! 7/01 - test string syntax and behaviors
 
! 5/4/05 acm remove calls to writev5d, shared obj external function
!            (put in separate file bn_ef_v5d_strings)
 
sh mode stupid
      MODE            STATE        ARGUMENT
      STUPID        CANCELED
cancel mode stupid  ! for testing in double precision
 
 
! some test files
sp rm -f *.str_test *.string_tst
sp touch dummy1.str_test dummy2.str_test dummy3.str_test dummy4.str_test dummy5.str_test dummy6.str_test dummy7.str_test dummy8.str_test dummy9.str_test
sp touch dummy1.string_tst dummy2.string_tst dummy3.string_tst dummy4.string_tst dummy5.string_tst dummy6.string_tst dummy7.string_tst dummy8.string_tst
 
cancel data/all
 
let a = "testa.v5d"
list a
             VARIABLE : "testa.v5d"
        "testa.v5d"
 
let b = "goodbye"
list a,b
 Column  1: A is "testa.v5d"
 Column  2: B is "goodbye"
                   A      B
I / *:    "testa.v5d" "goodbye"
 
let a = {"hello","goodbye", "wave to me"}
list a
             VARIABLE : {"hello","goodbye", "wave to me"}
             SUBSET   : 3 points (X)
 1   / 1:"hello"     
 2   / 2:"goodbye"   
 3   / 3:"wave to me"
list a[i=2:3]
             VARIABLE : {"hello","goodbye", "wave to me"}
             SUBSET   : 2 points (X)
 2   / 2:"goodbye"   
 3   / 3:"wave to me"
list/order=x a[i=2:3]
             VARIABLE : {"hello","goodbye", "wave to me"}
             SUBSET   : 2 points (X)
              2           3       
               2           3
        "goodbye"   "wave to me"
 
let e = {,"string1",, "string2"}
list e
             VARIABLE : {,"string1",, "string2"}
             SUBSET   : 4 points (X)
 1   / 1:""       
 2   / 2:"string1"
 3   / 3:""       
 4   / 4:"string2"
 
list {"string","s2","very long string"},5
             X: 0.5 to 3.5
 Column  1: {"string","s2","very long string"}
 Column  2: cnst is constant
                  {"string   cnst
1   / 1: "string"            5.000
2   / 2: "s2"                5.000
3   / 3: "very long string"  5.000
 
set mode ignore
  let e = {"string1" "string2"}
  list e
  let e = {,"string1",5, "string2"}
  list e
set mode/last ignore
 
* mixed single and double quotes
list/nohead {",a",',b'}
 1   / 1:",a"
 2   / 2:",b"
list/nohead {'"'}, {"'"}
I / *:    """ "'"
 
let d = {"INITIALIZE", spawn:"ls *.str_test", "INSERT", spawn:"ls *.string_tst"}
list d
             VARIABLE : {"INITIALIZE", SPAWN:"ls *.str_test", "INSERT", SPAWN:"ls *.string_tst"}
             SUBSET   : 19 points (X)
 1    /  1:"INITIALIZE"       
 2    /  2:"dummy1.str_test"  
 3    /  3:"dummy2.str_test"  
 4    /  4:"dummy3.str_test"  
 5    /  5:"dummy4.str_test"  
 6    /  6:"dummy5.str_test"  
 7    /  7:"dummy6.str_test"  
 8    /  8:"dummy7.str_test"  
 9    /  9:"dummy8.str_test"  
 10   / 10:"dummy9.str_test"  
 11   / 11:"INSERT"           
 12   / 12:"dummy1.string_tst"
 13   / 13:"dummy2.string_tst"
 14   / 14:"dummy3.string_tst"
 15   / 15:"dummy4.string_tst"
 16   / 16:"dummy5.string_tst"
 17   / 17:"dummy6.string_tst"
 18   / 18:"dummy7.string_tst"
 19   / 19:"dummy8.string_tst"
stat d
 
             {"INITIALIZE", SPAWN:"ls *.str_test", "INSERT", SPAWN:"ls *.string_tst"}
             X: 0.5 to 19.5
             Y:  N/A
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: N/A
 Total # of strings: 19 (19*1*1*1*1*1)
 Maximum string length: 17
load d
 
set mode ignore
  plot d
  define axis/x xax = d
set mode/last ignore
 
! netCDF file IO
let a = {"hello"}            ! note - a is an array of length 1
save/clobber/file=test_string.cdf a
canc var a
use test_string
sh dat test_string
     currently SET data sets:
    1> ./test_string.cdf  (default)
 name     title                             I         J         K         L
 A        {"hello"}                        1:1       ...       ...       ...
 
list a
             VARIABLE : {"hello"}
             FILENAME : test_string.cdf
             X        : 1
        "hello"
canc data test_string
 
let b = "one line of text"   !  note - b is scalar
save/clobber/file=test_string.cdf b
canc var b
use test_string
sh dat test_string
     currently SET data sets:
    1> ./test_string.cdf  (default)
 name     title                             I         J         K         L
 B        "one line of text"               ...       ...       ...       ...
 
list b
             VARIABLE : "one line of text"
             FILENAME : test_string.cdf
        "one line of text"
canc data test_string
 
let a = {"hello","goodbye", "wave to me"}
let b = "one line of text"
save/clobber/file=test_string.cdf a,b
sp echo "bn_strings.jnl --- 1 original file" >> all_ncdump.out
sp ncdump test_string.cdf >> all_ncdump.out
save/append/file=test_string.cdf d
let b2 = "two line of text"   ! the same string length as b
sp echo "bn_strings.jnl --- 2 append to file" >> all_ncdump.out
save/append/file=test_string.cdf b2
canc var/all
use test_string.cdf
show data test_string
     currently SET data sets:
    1> ./test_string.cdf  (default)
 name     title                             I         J         K         L
 A        {"hello","goodbye", "wave to me  1:3       ...       ...       ...
 B        "one line of text"               ...       ...       ...       ...
 D        {"INITIALIZE", SPAWN:"ls *.str_  1:19      ...       ...       ...
 B2       "two line of text"               ...       ...       ...       ...
 
list/nohead a
 1   / 1:"hello"     
 2   / 2:"goodbye"   
 3   / 3:"wave to me"
list/nohead b
        "one line of text"
 
set var/title="partial filename list" d
save/clobber/file=test_string2.cdf/heading=enhanced d[i=2:5]
sp mv test_string2.cdf test_string.cdf
sp echo "bn_strings.jnl --- 3 enhanced heading" >> all_ncdump.out
sp ncdump test_string.cdf >> all_ncdump.out
canc data/all
use test_string
show data test_string
     currently SET data sets:
    1> ./test_string.cdf  (default)
 name     title                             I         J         K         L
 D        partial filename list            2:5       ...       ...       ...
 
list d
             VARIABLE : partial filename list
             FILENAME : test_string.cdf
             SUBSET   : 4 points (X)
 2   / 2:"dummy1.str_test"
 3   / 3:"dummy2.str_test"
 4   / 4:"dummy3.str_test"
 5   / 5:"dummy4.str_test"
 
! regridding tests
let a = {spawn:"ls *.str_test"}
list a
             VARIABLE : {SPAWN:"ls *.str_test"}
             SUBSET   : 9 points (X)
 1   / 1:"dummy1.str_test"
 2   / 2:"dummy2.str_test"
 3   / 3:"dummy3.str_test"
 4   / 4:"dummy4.str_test"
 5   / 5:"dummy5.str_test"
 6   / 6:"dummy6.str_test"
 7   / 7:"dummy7.str_test"
 8   / 8:"dummy8.str_test"
 9   / 9:"dummy9.str_test"
define axis/x=0.1:0.7:.1 xasn
list a[gx=xasn@asn]
             VARIABLE : {SPAWN:"ls *.str_test"}
                        regrid: 0.1 delta on X@ASN
             SUBSET   : 7 points (X)
 0.1  / 1:"dummy1.str_test"
 0.2  / 2:"dummy2.str_test"
 0.3  / 3:"dummy3.str_test"
 0.4  / 4:"dummy4.str_test"
 0.5  / 5:"dummy5.str_test"
 0.6  / 6:"dummy6.str_test"
 0.7  / 7:"dummy7.str_test"
define axis/x=1:6:.5 xxact
list a[gx=xxact@xact]
             VARIABLE : {SPAWN:"ls *.str_test"}
                        regrid: 0.5 delta on X@XACT
             SUBSET   : 11 points (X)
 1    /  1:"dummy1.str_test"
 1.5  /  2:""               
 2    /  3:"dummy2.str_test"
 2.5  /  4:""               
 3    /  5:"dummy3.str_test"
 3.5  /  6:""               
 4    /  7:"dummy4.str_test"
 4.5  /  8:""               
 5    /  9:"dummy5.str_test"
 5.5  / 10:""               
 6    / 11:"dummy6.str_test"
define axis/x=1:6:.4 xnrst
list a[gx=xnrst@nrst]
             VARIABLE : {SPAWN:"ls *.str_test"}
                        regrid: 0.4 delta on X@NRST
             SUBSET   : 14 points (X)
 1    /  1:"dummy1.str_test"
 1.4  /  2:"dummy1.str_test"
 1.8  /  3:"dummy2.str_test"
 2.2  /  4:"dummy2.str_test"
 2.6  /  5:"dummy3.str_test"
 3    /  6:"dummy3.str_test"
 3.4  /  7:"dummy3.str_test"
 3.8  /  8:"dummy4.str_test"
 4.2  /  9:"dummy4.str_test"
 4.6  / 10:"dummy5.str_test"
 5    / 11:"dummy5.str_test"
 5.4  / 12:"dummy5.str_test"
 5.8  / 13:"dummy6.str_test"
 6.2  / 14:"dummy6.str_test"
set mode ignore
  list a[gx=xnrst]
  list a[gx=xnrst@ave]
  list a[gx=xnrst@var]
  list a[gx=xnrst@ngd]
  list a[gx=xnrst@max]
  list a[gx=xnrst@sum]
  set axis/modulo xnrst
  list a[gx=xnrst@mod]
set mode/last ignore
 
! functions returning strings
list/nohead xsequence({"a","b","c","d","e"})
 1   / 1:"a"
 2   / 2:"b"
 3   / 3:"c"
 4   / 4:"d"
 5   / 5:"e"
sh grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid XABSTRACT
    GRID XABSTRACT
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              full
 normal    Y
 normal    Z
 normal    T
list/nohead  ysequence({"a","b","c","d","e"})
 1   / 1:"a"
 2   / 2:"b"
 3   / 3:"c"
 4   / 4:"d"
 5   / 5:"e"
sh grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid YABSTRACT
    GRID YABSTRACT
 name       axis              # pts   start                end                 subset
 normal    X
 ABSTRACT  Y             99999999 r   1                    1.E+08              full
 normal    Z
 normal    T
list/nohead  zsequence({"a","b","c","d","e"})
 1   / 1:"a"
 2   / 2:"b"
 3   / 3:"c"
 4   / 4:"d"
 5   / 5:"e"
sh grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid ZABSTRACT
    GRID ZABSTRACT
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 ABSTRACT  Z             99999999 r   1                    1.E+08              full
 normal    T
list/nohead  tsequence({"a","b","c","d","e"})
 1   / 1:"a"
 2   / 2:"b"
 3   / 3:"c"
 4   / 4:"d"
 5   / 5:"e"
sh grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid TABSTRACT
    GRID TABSTRACT
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 ABSTRACT  T             99999999 r   1                    1.E+08              full
let a = TSEQUENCE({"a","b","c","d","e"})
list/l=2:3 a
             VARIABLE : TSEQUENCE({"a","b","c","d","e"})
             SUBSET   : 2 points (T)
 2   / 2:"b"
 3   / 3:"c"
 
list/nohead  {"a",,"b"}
 1   / 1:"a"
 2   / 2:"" 
 3   / 3:"b"
list/nohead  samplei({"a","b",,"d","e","f"},{3,2,,1})
 1   / 1:"" 
 2   / 2:"b"
 3   / 3:"" 
 4   / 4:"a"
list/nohead  samplej(YSEQUENCE({"a","b",,"d","e","f"}),{3,2,,1})
 1   / 1:"" 
 2   / 2:"b"
 3   / 3:"" 
 4   / 4:"a"
list/nohead  samplek(ZSEQUENCE({"a","b",,"d","e","f"}),{3,2,,1})
 1   / 1:"" 
 2   / 2:"b"
 3   / 3:"" 
 4   / 4:"a"
list/nohead  samplel(TSEQUENCE({"a","b",,"d","e","f"}),{3,2,,1})
 1   / 1:"" 
 2   / 2:"b"
 3   / 3:"" 
 4   / 4:"a"
 
let a = {"a",," ",""}
let b = samplej(YSEQUENCE({"a","b",,"d","e","f"}),{2,,1})
save/clobber/file=foo.cdf a,b
sp echo "bn_strings.jnl --- 4 sample and ysequence functions on string var" >> all_ncdump.out
sp ncdump foo.cdf >> all_ncdump.out
 
let a =  RESHAPE({"a","b",,"d","e","f"},I[i=1:3]+j[j=1:2])
list  a
             VARIABLE : RESHAPE({"a","b",,"d","e","f"},I[I=1:3]+J[J=1:2])
             SUBSET   : 3 by 2 points (X-Y)
           1  2  3  
           1  2  3
 1   / 1:"a""b""" 
 2   / 2:"d""e""f"
list/i=2:3 a
             VARIABLE : RESHAPE({"a","b",,"d","e","f"},I[I=1:3]+J[J=1:2])
             SUBSET   : 2 by 2 points (X-Y)
           2  3  
           2  3
 1   / 1:"b""" 
 2   / 2:"e""f"
list  reshape(a,I[I=1:2]+J[J=1:3])
             VARIABLE : RESHAPE(A,I[I=1:2]+J[J=1:3])
             SUBSET   : 2 by 3 points (X-Y)
           1  2  
           1  2
 1   / 1:"a""b"
 2   / 2:"" "d"
 3   / 3:"e""f"
list  reshape(a,I[I=1:3]+J[J=1:3])
             VARIABLE : RESHAPE(A,I[I=1:3]+J[J=1:3])
             SUBSET   : 3 by 2 points (X-Y)
           1  2  3  
           1  2  3
 1   / 1:"a""b""" 
 2   / 2:"d""e""f"
list reshape(a,I[I=1:1]+J[J=1:3])
             VARIABLE : RESHAPE(A,I[I=1:1]+J[J=1:3])
             SUBSET   : 3 points (Y)
             X        : 1
           1  
           1
 1   / 1:"a"
 2   / 2:"b"
 3   / 3:"" 
 
! logical operators applied to strings
list {"a","b","c"} EQ YSEQUENCE({"A","B","C"})  ! case insensitive
             VARIABLE : {"a","b","c"} EQ YSEQUENCE({"A","B","C"})
             SUBSET   : 3 by 3 points (X-Y)
             1      2      3    
             1      2      3
 1   / 1:  1.000  0.000  0.000
 2   / 2:  0.000  1.000  0.000
 3   / 3:  0.000  0.000  1.000
list {"a","b","c"} NE YSEQUENCE({"a","B","c"})
             VARIABLE : {"a","b","c"} NE YSEQUENCE({"a","B","c"})
             SUBSET   : 3 by 3 points (X-Y)
             1      2      3    
             1      2      3
 1   / 1:  0.000  1.000  1.000
 2   / 2:  1.000  0.000  1.000
 3   / 3:  1.000  1.000  0.000
list/nohead "b" LT {"a","b","c"}
 1   / 1:  0.000
 2   / 2:  0.000
 3   / 3:  1.000
list/nohead "b" LE {"a","b","c"}
 1   / 1:  0.000
 2   / 2:  1.000
 3   / 3:  1.000
list/nohead "b" EQ {"a","b","c"}
 1   / 1:  0.000
 2   / 2:  1.000
 3   / 3:  0.000
list/nohead "b" GE {"a","b","c"}
 1   / 1:  1.000
 2   / 2:  1.000
 3   / 3:  0.000
list/nohead "b" GT {"a","b","c"}
 1   / 1:  1.000
 2   / 2:  0.000
 3   / 3:  0.000
 
! special hacks allow "+" to be a concatenation operator
list/nohead "hello" + ", friend"
        "hello, friend"
list/nohead {"hello","goodbye"}+", "+YSEQUENCE({"old","new"})+" "+"friend"
 1   / 1:"hello, old friend"  "goodbye, old friend"
 2   / 2:"hello, new friend"  "goodbye, new friend"
list/nohead SAMPLEI(XSEQUENCE({"hello","goodbye"}+", "+YSEQUENCE({"old","new"})+" "+"friend"), {2,3})
 1   / 1:"goodbye, old friend"
 2   / 2:"hello, new friend"  
 
! special hacks allow IF-THEN-ELSE to apply to strings
list/nohead if {0,1} THEN "hello"
 1   / 1:""     
 2   / 2:"hello"
list/nohead if {0,1} THEN "hello" ELSE "goodbye"
 1   / 1:"goodbye"
 2   / 2:"hello"  
list/nohead ysequence({"now","then"})+", " + (if {0,1} THEN "hello"+", ") + "friend"
 1   / 1:"now, friend"        "now, hello, friend" 
 2   / 2:"then, friend"       "then, hello, friend"
list/nohead ysequence({"now","then"})+", " + (if {0,1} THEN "hello"+", " ELSE "goodbye"+", my ") + "friend"
 1   / 1:"now, goodbye, my friend" "now, hello, friend"      
 2   / 2:"then, goodbye, my friend""then, hello, friend"     
 
SET MODE IGNORE
! list/nohead ysequence({98, 99})+", " + (if {0,1} THEN "hello"+", " ELSE "goodbye"+", my ") + "friend"
list/nohead ysequence({"now","then"})+", " + (if {0,1} THEN "hello"+99 ELSE "goodbye"+", my ") + "friend"
 1   / 1:........
 2   / 2:........
list/nohead ysequence({"now","then"})+", " + (if {0,1} THEN "hello"+", " ELSE "goodbye"+99) + "friend"
 1   / 1:........
 2   / 2:........
list/nohead ysequence({"now","then"})+", " + (if {0,1} THEN "hello"+", " ELSE "goodbye"+", my ") + 99
 1   / 1:........
 2   / 2:........
 
! numerical operators applied to strings
 
list/nohead "b" - {"a","b"}
list/nohead "b" * {"a","b"}
list/nohead "b" / {"a","b"}
list/nohead "b" ^ {"a","b"}
list/nohead {"a","b"} + 1
 1   / 1:....
 2   / 2:....
list/nohead 1 + {"a","b"}
 1   / 1:....
 2   / 2:....
list/nohead 1 - {"a","b"}
 1   / 1:....
 2   / 2:....
list/nohead SIN({"a","b","c"})
list/nohead MAX("a",{"a","b","c"})
list/nohead MAX(1,{"a","b","c"})
 1   / 1:....
 2   / 2:....
 3   / 3:....
 
CANCEL MODE IGNORE
 
! transformations applied to strings
let a = {"a","b","c","d"}
list a[i=@shf]
             VARIABLE : {"a","b","c","d"}
                        shifted by 1 pts on X
             SUBSET   : 4 points (X)
 1   / 1:"b"
 2   / 2:"c"
 3   / 3:"d"
 4   / 4:"" 
list a[i=@shf:-1]
             VARIABLE : {"a","b","c","d"}
                        shifted by -1 pts on X
             SUBSET   : 4 points (X)
 1   / 1:"" 
 2   / 2:"a"
 3   / 3:"b"
 4   / 4:"c"
list a[i=@ave]
             VARIABLE : {"a","b","c","d"}
             X        : 0.5 to 4.5 (averaged)
        ""
list a[i=@sbx]
             VARIABLE : {"a","b","c","d"}
                        box smoothed by 3 pts on X
             SUBSET   : 4 points (X)
 1   / 1:""
 2   / 2:""
 3   / 3:""
 4   / 4:""
list a[i=@rsum]
             VARIABLE : {"a","b","c","d"}
                        running sum on X
             SUBSET   : 4 points (X)
 1   / 1:""
 2   / 2:""
 3   / 3:""
 4   / 4:""
 
set mode/last stupid
*** Running ferret script: bn_axcontrol.jnl
 ! NOAA/PMEL TMAP
 ! Program FERRET (alpha)
 ! Version 5.33 - 07/12/01
 ! 12-Jul-01 14:47
 
define axis/t=1-jan-0001:20-jan-0001:1 begtime
let tpts = t[gt=begtime]
set view ul
plot/axes=1,0,0,1 sin(tpts/15)
 
set view ur
plot/axes=1,0,0,1/trans sin(tpts/15)
 
set view ll
plot/axes/trans  sin(tpts/15)
 
set view lr
plot/noaxes  sin(tpts/15)
 
! contour shade and fill, with /TRANS
 
use coads_climatology
set view ul
contour/l=1/axes=0,1,1,0 sst
 
set view ur
shade/l=1/axes=1,0,1,0/trans sst
 
set view ll
contour/l=1/axes=0,0,0,0/trans sst
 
set view lr
fill/l=1/axes sst
 
! polygon
 
can view
polygon/thick/color=red/palette=blue/axes=1,0,1,0 {1,2,1}, {2,1,0.5}
*** Running ferret script: bn_vec_curv.jnl
! bn_vec_curv.jnl
!
! vector plots with curvilinear coordinates
!
! ACM  10/23/01
!       9/12/02  vary the lengths of the vectors in 1st two plots.
! ACM 4/2005 set mode meta to save one of the plots for the metafile checks.
!            and cancel mode logo, so that .plt files are comparable.
!  2/18 *acm* keep mode logo turned off
 
set mode meta vec_curv.plt
use coads_climatology
set reg/l=1
go mp_orthographic 230 60
set grid sst
go mp_aspect
 
let yy =  if abs(y[gt=sst]) le 20 then 10 else  (100-abs(y[gt=sst]+1))/ 10.
 
vec/noax/xskip=6/yskip=6/len=20/title="View From Space"  sst*0,(sst*0+yy)*mp_mask, x_page,y_page
vec/over/xskip=6/yskip=6/len=20 (sst*0+yy)*mp_mask,sst*0, x_page,y_page
vec/over/xskip=6/yskip=6/color=blue/len=20  (sst*0+yy)*mp_mask,(sst*0+yy)*mp_mask, x_page,y_page
 
can mode meta
 
! Sinusoidal projection; put data at the poles
 
use coads_climatology
go mp_sinusoidal
set grid sst
go mp_aspect
 
let fsst = missing(sst,5)
let yy =  if abs(y[gt=sst]) le 20 then 10 else  (100-abs(y[gt=sst]+1))/ 10.
 
set reg/l=1
vec/noax/xskip=16/yskip=8/len=15/title="Sinusoidal Projection" fsst*0,fsst*0+yy*mp_mask, x_page,y_page
vec/over/xskip=16/yskip=8/len=15 fsst*0+yy*mp_mask,fsst*0, x_page,y_page
 
! Irregular axes, and manual axis scaling
set win/asp=1
set mode meta vec_curv2.plt
 
def axis/from_data/x/name=xirr {0,1,2,4,6,7,8,10,14,16,20,23,24}
def axis/from_data/y/name=yirr {0,2,4,5,6,7,8,9,12,13,14,15,18}
let a = 0.1*x[gx=xirr] + 4*y[gy=yirr]
let b = 3*x[gx=xirr] + y[gy=yirr]
set view ul
vec a,b
 
! project it to a regular grid
let mx = i[i=1:13]
let my = j[j=1:13]
let mxpage = mx + 0*my
let mypage = my+0*mx
set view ll
vec/title="Regular grid" a,b,mxpage,mypage
 
! Now stretch the grid
 
set view lr
let mx = exp(x[x=2:4.4:0.2])
let my = exp(y[y=1:3.4:0.2])
 
let mxpage = mx + 0*my
let mypage = my + 0*mx
vec/title="Stretched grid" a,b,mxpage,mypage
 
can mode meta
*** Running ferret script: bn_delimited_read.jnl
! bn_delimited_read.jnl
! 10/01 *sh*
 
! test delimiited (spreadsheet) reads in Ferret
 
! look at the file
spawn cat data/bn_delimited_read_1.dat
col1,col2,col3,col4,col5
one,,1.1,24S,130E,,1e1,"word 1"
    two,,2.2,24N,130W,2S,,"word 2"
three,,3.3,24,130,3N,3e-2," wd 3 "

five,,4.4,-24,-130,91, -4e2  ,  "word 4"  ,  aa  , 77
extra line
 
! try the file as-is:  record 1 contains 5 column headings (text)
! so V1 through V5 analyze to be text
file/format=delim bn_delimited_read_1.dat
show data/var
     currently SET data sets:
    1> ./data/bn_delimited_read_1.dat  (default)
 
 name     title                             I         J         K         L
 V1       V1                               1:7       ...       ...       ...
            Data type = TEXT
            Conversion /TYPE=TEXT
               on grid (G###) with -1.E+34 for missing data
             X=0.5:7.5  
 V2       V2                               1:7       ...       ...       ...
            Data type = TEXT
            Conversion /TYPE=TEXT
               on grid (G###) with -1.E+34 for missing data
             X=0.5:7.5  
 V3       V3                               1:7       ...       ...       ...
            Data type = TEXT
            Conversion /TYPE=TEXT
               on grid (G###) with -1.E+34 for missing data
             X=0.5:7.5  
 V4       V4                               1:7       ...       ...       ...
            Data type = TEXT
            Conversion /TYPE=TEXT
               on grid (G###) with -1.E+34 for missing data
             X=0.5:7.5  
 V5       V5                               1:7       ...       ...       ...
            Data type = TEXT
            Conversion /TYPE=TEXT
               on grid (G###) with -1.E+34 for missing data
             X=0.5:7.5  
 V6       V6                               1:7       ...       ...       ...
            Data type = TEXT
            Conversion /TYPE=TEXT
               on grid (G###) with -1.E+34 for missing data
             X=0.5:7.5  
 V7       V7                               1:7       ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:7.5  
 V8       V8                               1:7       ...       ...       ...
            Data type = TEXT
            Conversion /TYPE=TEXT
               on grid (G###) with -1.E+34 for missing data
             X=0.5:7.5  
 V9       V9                               1:7       ...       ...       ...
            Data type = TEXT
            Conversion /TYPE=TEXT
               on grid (G###) with -1.E+34 for missing data
             X=0.5:7.5  
 V10      V10                              1:7       ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:7.5  
 
 /DELIMITERS="\t,\,"
list v1,v2,v3,v4,v5,v6,v7,v8,v9,v10
             DATA SET: ./data/bn_delimited_read_1.dat
             X: 0.5 to 7.5
 Column  1: V1
 Column  2: V2
 Column  3: V3
 Column  4: V4
 Column  5: V5
 Column  6: V6
 Column  7: V7
 Column  8: V8
 Column  9: V9
 Column 10: V10
                  V1    V2     V3     V4     V5    V6    V7      V8     V9    V10
1   / 1: "col1"       "col2" "col3" "col4" "col5" " "    .... " "      " "    ....
2   / 2: "one"        " "    "1.1"  "24S"  "130E" " "    10.0 "word 1" " "    ....
3   / 3: "two"        " "    "2.2"  "24N"  "130W" "2S"   .... "word 2" " "    ....
4   / 4: "three"      " "    "3.3"  "24"   "130"  "3N"    0.0 " wd 3 " " "    ....
5   / 5: " "          " "    " "    " "    " "    " "    .... " "      " "    ....
6   / 6: "five"       " "    "4.4"  "-24"  "-130" "91" -400.0 "word 4" "aa"  77.00
7   / 7: "extra line" " "    " "    " "    " "    " "    .... " "      " "    ....
 
! manually name the variables while still automatically analyzing data types
file/format=delim/var=a1,a2,a3,a4,a5,a6,a7 bn_delimited_read_1.dat
list a1,a2,a3,a4,a5,a6,a7
             DATA SET: ./data/bn_delimited_read_1.dat
             X: 0.5 to 7.5
 Column  1: A1 is a1
 Column  2: A2 is a2
 Column  3: A3 is a3
 Column  4: A4 is a4
 Column  5: A5 is a5
 Column  6: A6 is a6
 Column  7: A7 is a7
                  A1    A2     A3     A4     A5    A6    A7
1   / 1: "col1"       "col2" "col3" "col4" "col5" " "    ....
2   / 2: "one"        " "    "1.1"  "24S"  "130E" " "    10.0
3   / 3: "two"        " "    "2.2"  "24N"  "130W" "2S"   ....
4   / 4: "three"      " "    "3.3"  "24"   "130"  "3N"    0.0
5   / 5: " "          " "    " "    " "    " "    " "    ....
6   / 6: "five"       " "    "4.4"  "-24"  "-130" "91" -400.0
7   / 7: "extra line" " "    " "    " "    " "    " "    ....
 
! skip the first record to do a better "analysis" of the file fields
! note that v3 is correctly analyzed as numeric
file/format=delim/skip=1 bn_delimited_read_1.dat
list v1,v2,v3,v4,v5,v6,v7,v8,v9,v10
             DATA SET: ./data/bn_delimited_read_1.dat
             X: 0.5 to 6.5
 Column  1: V1
 Column  2: V2 is V2 (all values missing)
 Column  3: V3
 Column  4: V4 is V4 (degrees_north)(Latitude)
 Column  5: V5 is V5 (degrees_east)(Longitude)
 Column  6: V6
 Column  7: V7
 Column  8: V8
 Column  9: V9
 Column 10: V10
                  V1   V2    V3     V4     V5    V6    V7      V8     V9    V10
1   / 1: "one"        ....  1.100 -24.00  130.0 " "    10.0 "word 1" " "    ....
2   / 2: "two"        ....  2.200  24.00 -130.0 "2S"   .... "word 2" " "    ....
3   / 3: "three"      ....  3.300  24.00  130.0 "3N"    0.0 " wd 3 " " "    ....
4   / 4: " "          ....   ....   ....   .... " "    .... " "      " "    ....
5   / 5: "five"       ....  4.400 -24.00 -130.0 "91" -400.0 "word 4" "aa"  77.00
6   / 6: "extra line" ....   ....   ....   .... " "    .... " "      " "    ....
 
! insist that all columns be treated as string
file/format=delim/skip=1/type=text bn_delimited_read_1.dat
list v1,v2,v3,v4,v5,v6,v7,v8,v9,v10
             DATA SET: ./data/bn_delimited_read_1.dat
             X: 0.5 to 6.5
 Column  1: V1
 Column  2: V2
 Column  3: V3
 Column  4: V4
 Column  5: V5
 Column  6: V6
 Column  7: V7
 Column  8: V8
 Column  9: V9
 Column 10: V10
                  V1   V2   V3    V4    V5    V6    V7      V8     V9   V10
1   / 1: "one"        " " "1.1" "24S" "130E" " "  "1e1"  "word 1" " "  " " 
2   / 2: "two"        " " "2.2" "24N" "130W" "2S" " "    "word 2" " "  " " 
3   / 3: "three"      " " "3.3" "24"  "130"  "3N" "3e-2" " wd 3 " " "  " " 
4   / 4: " "          " " " "   " "   " "    " "  " "    " "      " "  " " 
5   / 5: "five"       " " "4.4" "-24" "-130" "91" "-4e2" "word 4" "aa" "77"
6   / 6: "extra line" " " " "   " "   " "    " "  " "    " "      " "  " " 
 
! insist that all columns be treated as string and name the columns
file/format=delim/skip=1/type=text/var=a1,a2,a3,a4,a5 bn_delimited_read_1.dat
show data
     currently SET data sets:
    1> ./data/bn_delimited_read_1.dat  (default)
 name     title                             I         J         K         L
 A1       a1                               1:6       ...       ...       ...
 A2       a2                               1:6       ...       ...       ...
 A3       a3                               1:6       ...       ...       ...
 A4       a4                               1:6       ...       ...       ...
 A5       a5                               1:6       ...       ...       ...
 
list a1,a2,a3,a4,a5
             DATA SET: ./data/bn_delimited_read_1.dat
             X: 0.5 to 6.5
 Column  1: A1 is a1
 Column  2: A2 is a2
 Column  3: A3 is a3
 Column  4: A4 is a4
 Column  5: A5 is a5
                  A1   A2   A3    A4    A5
1   / 1: "one"        " " "1.1" "24S" "130E"
2   / 2: "two"        " " "2.2" "24N" "130W"
3   / 3: "three"      " " "3.3" "24"  "130" 
4   / 4: " "          " " " "   " "   " "   
5   / 5: "five"       " " "4.4" "-24" "-130"
6   / 6: "extra line" " " " "   " "   " "   
 
! insist that all columns be treated as numeric
file/format=delim/skip=1/type=numeric bn_delimited_read_1.dat
list v1,v2,v3,v4,v5,v6,v7,v8,v9,v10
             DATA SET: ./data/bn_delimited_read_1.dat
             X: 0.5 to 6.5
 Column  1: V1
 Column  2: V2
 Column  3: V3
 Column  4: V4
 Column  5: V5
 Column  6: V6
 Column  7: V7
 Column  8: V8
 Column  9: V9
 Column 10: V10
          V1   V2    V3     V4     V5     V6     V7    V8   V9    V10
1   / 1: .... ....  1.100   ....   ....   ....   10.0 .... ....   ....
2   / 2: .... ....  2.200   ....   ....   ....   .... .... ....   ....
3   / 3: .... ....  3.300  24.00  130.0   ....    0.0 .... ....   ....
4   / 4: .... ....   ....   ....   ....   ....   .... .... ....   ....
5   / 5: .... ....  4.400 -24.00 -130.0  91.00 -400.0 .... ....  77.00
6   / 6: .... ....   ....   ....   ....   ....   .... .... ....   ....
 
! insist that all columns be treated as latitude
file/format=delim/skip=1/type=latitude bn_delimited_read_1.dat
list v1,v2,v3,v4,v5,v6,v7,v8,v9,v10
             DATA SET: ./data/bn_delimited_read_1.dat
             X: 0.5 to 6.5
 Column  1: V1 is V1 (degrees_north)(Latitude)
 Column  2: V2 is V2 (degrees_north)(Latitude)
 Column  3: V3 is V3 (degrees_north)(Latitude)
 Column  4: V4 is V4 (degrees_north)(Latitude)
 Column  5: V5 is V5 (degrees_north)(Latitude)
 Column  6: V6 is V6 (degrees_north)(Latitude)
 Column  7: V7 is V7 (degrees_north)(Latitude)
 Column  8: V8 is V8 (degrees_north)(Latitude)
 Column  9: V9 is V9 (degrees_north)(Latitude)
 Column 10: V10 is V10 (degrees_north)(Latitude)
          V1   V2    V3     V4     V5     V6     V7    V8   V9    V10
1   / 1: .... ....  1.100 -24.00   ....   ....   10.0 .... ....   ....
2   / 2: .... ....  2.200  24.00   ....  -2.00   .... .... ....   ....
3   / 3: .... ....  3.300  24.00  130.0   3.00    0.0 .... ....   ....
4   / 4: .... ....   ....   ....   ....   ....   .... .... ....   ....
5   / 5: .... ....  4.400 -24.00 -130.0  91.00 -400.0 .... ....  77.00
6   / 6: .... ....   ....   ....   ....   ....   .... .... ....   ....
 
! read only the first line of the file
spawn head -1 data/bn_delimited_read_1.dat
col1,col2,col3,col4,col5
define axis/x=1:1:1 x1
define grid/x=x1 g1
columns/grid=g1 bn_delimited_read_1.dat
 ! note 10 columns because auto-analysis of file doesnt stop at 1st record
list v1,v2,v3,v4,v5,v6,v7,v8,v9,v10
             DATA SET: ./data/bn_delimited_read_1.dat
             X: 1
 Column  1: V1
 Column  2: V2
 Column  3: V3
 Column  4: V4
 Column  5: V5
 Column  6: V6
 Column  7: V7
 Column  8: V8
 Column  9: V9
 Column 10: V10
             V1    V2     V3     V4     V5    V6  V7   V8  V9  V10
I / *:    "col1" "col2" "col3" "col4" "col5" " " .... " " " " ....
columns/grid=g1/var=c1,c2,c3,c4,c5 bn_delimited_read_1.dat
list c1,c2,c3,c4,c5
             DATA SET: ./data/bn_delimited_read_1.dat
             X: 1
 Column  1: C1 is c1
 Column  2: C2 is c2
 Column  3: C3 is c3
 Column  4: C4 is c4
 Column  5: C5 is c5
             C1    C2     C3     C4     C5
I / *:    "col1" "col2" "col3" "col4" "col5"
 
! ==========
cancel data/all
! file using blank as a delimiter
! Note record 1 has blanks at end of record
! Note record of many blanks sandwiched in as record 2
! (note prev. to 7/13/2016 the file had incorrect date formats with the year first.
!  File replaced so it can be read after the fix for ticket 2449.)
file/form=delimited bn_delimited_read_2.dat
show data
     currently SET data sets:
    1> ./data/bn_delimited_read_2.dat  (default)
 name     title                             I         J         K         L
 V1       V1                               1:3       ...       ...       ...
 
file/form=delimited/delimiter=" " bn_delimited_read_2.dat
show data
     currently SET data sets:
    1> ./data/bn_delimited_read_2.dat  (default)
 name     title                             I         J         K         L
 V1       V1                               1:3       ...       ...       ...
       (Julian days since 1-Jan-1900)
 V2       V2                               1:3       ...       ...       ...
       (Time of day)
 V3       V3                               1:3       ...       ...       ...
       (all values missing)
 
list v1,v2
             DATA SET: ./data/bn_delimited_read_2.dat
             X: 0.5 to 3.5
 Column  1: V1 is V1 (days)(Julian days since 1-Jan-1900)
 Column  2: V2 is V2 (hours)(Time of day)
             V1    V2
1   / 1:  29921.  12.58
2   / 2:    ....   ....
3   / 3:  -1790.  13.75
 
! ==========
! look at the date/time file
spawn cat data/bn_delimited_read_date_time.dat
12/1/99,1999-03-01,12:00, 13:45:36.5,12/1/99,1999-03-01,12:00, 13:45:36.5
12/2/99,1999-03-02,01:00:13.5, 14:45:36.5,12/2/99,1999-03-02,01:00:13.5, 14:45:36.5
12/3/99x,1999-03-03x,2:00x, 15:45x,12/3/99,1999-03-03,2:00, 15:45
12/4/99,1999-03-04,03:00, 16:45:36.5, 12/4/99,1999-03-04,03:00, 16:45:36.5
 
! try the file as-is
! Note that record 3 has syntax errors in the first 4 fields
columns bn_delimited_read_date_time.dat
list v1,v2,v3,v4,v5,v6,v7,v8
             DATA SET: ./data/bn_delimited_read_date_time.dat
             X: 0.5 to 4.5
 Column  1: V1
 Column  2: V2
 Column  3: V3
 Column  4: V4
 Column  5: V5 is V5 (days)(Julian days since 1-Jan-1900)
 Column  6: V6 is V6 (days)(Julian days since 1-Jan-1900)
 Column  7: V7 is V7 (hours)(Time of day)
 Column  8: V8 is V8 (hours)(Time of day)
                V1        V2           V3           V4         V5      V6     V7     V8
1   / 1: "12/1/99"  "1999-03-01"  "12:00"      "13:45:36.5"  36493.  36218.  12.00  13.76
2   / 2: "12/2/99"  "1999-03-02"  "01:00:13.5" "14:45:36.5"  36494.  36219.   1.00  14.76
3   / 3: "12/3/99x" "1999-03-03x" "2:00x"      "15:45x"      36495.  36220.   2.00  15.75
4   / 4: "12/4/99"  "1999-03-04"  "03:00"      "16:45:36.5"  36496.  36221.   3.00  16.76
show data 2
     currently SET data sets:
    2> ./data/bn_delimited_read_date_time.dat  (default)
 name     title                             I         J         K         L
 V1       V1                               1:4       ...       ...       ...
 V2       V2                               1:4       ...       ...       ...
 V3       V3                               1:4       ...       ...       ...
 V4       V4                               1:4       ...       ...       ...
 V5       V5                               1:4       ...       ...       ...
       (Julian days since 1-Jan-1900)
 V6       V6                               1:4       ...       ...       ...
       (Julian days since 1-Jan-1900)
 V7       V7                               1:4       ...       ...       ...
       (Time of day)
 V8       V8                               1:4       ...       ...       ...
       (Time of day)
 
 
! sanity check date encodings
define axis/t/units=days/T0=1-jan-1900  tax = v5
show axis tax
 name       axis              # pts   start                end
 TAX       TIME                 4 r   01-DEC-1999 00:00    04-DEC-1999 00:00
T0 = 1-JAN-1900
   Axis span (to cell edges) = 4
define axis/t/units=days/T0=1-jan-1900  tax = v6
show axis tax
 name       axis              # pts   start                end
 TAX       TIME                 4 r   01-MAR-1999 00:00    04-MAR-1999 00:00
T0 = 1-JAN-1900
   Axis span (to cell edges) = 4
 
columns/type=date bn_delimited_read_date_time.dat
list v1,v2,v3,v4,v5,v6,v7,v8
             DATA SET: ./data/bn_delimited_read_date_time.dat
             X: 0.5 to 4.5
 Column  1: V1 is V1 (days)(Julian days since 1-Jan-1900)
 Column  2: V2 is V2 (days)(Julian days since 1-Jan-1900)
 Column  3: V3 is V3 (days)(Julian days since 1-Jan-1900)
 Column  4: V4 is V4 (days)(Julian days since 1-Jan-1900)
 Column  5: V5 is V5 (days)(Julian days since 1-Jan-1900)
 Column  6: V6 is V6 (days)(Julian days since 1-Jan-1900)
 Column  7: V7 is V7 (days)(Julian days since 1-Jan-1900)
 Column  8: V8 is V8 (days)(Julian days since 1-Jan-1900)
             V1     V2    V3   V4     V5      V6    V7   V8
1   / 1:  36493.  36218. .... ....  36493.  36218. .... ....
2   / 2:  36494.  36219. .... ....  36494.  36219. .... ....
3   / 3:    ....    .... .... ....  36495.  36220. .... ....
4   / 4:  36496.  36221. .... ....  36496.  36221. .... ....
show data 2
     currently SET data sets:
    2> ./data/bn_delimited_read_date_time.dat  (default)
 name     title                             I         J         K         L
 V1       V1                               1:4       ...       ...       ...
       (Julian days since 1-Jan-1900)
 V2       V2                               1:4       ...       ...       ...
       (Julian days since 1-Jan-1900)
 V3       V3                               1:4       ...       ...       ...
       (Julian days since 1-Jan-1900)
 V4       V4                               1:4       ...       ...       ...
       (Julian days since 1-Jan-1900)
 V5       V5                               1:4       ...       ...       ...
       (Julian days since 1-Jan-1900)
 V6       V6                               1:4       ...       ...       ...
       (Julian days since 1-Jan-1900)
 V7       V7                               1:4       ...       ...       ...
       (Julian days since 1-Jan-1900)
 V8       V8                               1:4       ...       ...       ...
       (Julian days since 1-Jan-1900)
 
 
columns/type=time bn_delimited_read_date_time.dat
list v1,v2,v3,v4,v5,v6,v7,v8
             DATA SET: ./data/bn_delimited_read_date_time.dat
             X: 0.5 to 4.5
 Column  1: V1 is V1 (hours)(Time of day)
 Column  2: V2 is V2 (hours)(Time of day)
 Column  3: V3 is V3 (hours)(Time of day)
 Column  4: V4 is V4 (hours)(Time of day)
 Column  5: V5 is V5 (hours)(Time of day)
 Column  6: V6 is V6 (hours)(Time of day)
 Column  7: V7 is V7 (hours)(Time of day)
 Column  8: V8 is V8 (hours)(Time of day)
          V1   V2    V3     V4    V5   V6    V7     V8
1   / 1: .... ....  12.00  13.76 .... ....  12.00  13.76
2   / 2: .... ....   1.00  14.76 .... ....   1.00  14.76
3   / 3: .... ....   ....   .... .... ....   2.00  15.75
4   / 4: .... ....   3.00  16.76 .... ....   3.00  16.76
show data 2
     currently SET data sets:
    2> ./data/bn_delimited_read_date_time.dat  (default)
 name     title                             I         J         K         L
 V1       V1                               1:4       ...       ...       ...
       (Time of day)
 V2       V2                               1:4       ...       ...       ...
       (Time of day)
 V3       V3                               1:4       ...       ...       ...
       (Time of day)
 V4       V4                               1:4       ...       ...       ...
       (Time of day)
 V5       V5                               1:4       ...       ...       ...
       (Time of day)
 V6       V6                               1:4       ...       ...       ...
       (Time of day)
 V7       V7                               1:4       ...       ...       ...
       (Time of day)
 V8       V8                               1:4       ...       ...       ...
       (Time of day)
 
 
columns/type="da,dat,ti,tim,date, date, time, time"  bn_delimited_read_date_time.dat
list v1,v2,v3,v4,v5,v6,v7,v8
             DATA SET: ./data/bn_delimited_read_date_time.dat
             X: 0.5 to 4.5
 Column  1: V1 is V1 (days)(Julian days since 1-Jan-1900)
 Column  2: V2 is V2 (days)(Julian days since 1-Jan-1900)
 Column  3: V3 is V3 (hours)(Time of day)
 Column  4: V4 is V4 (hours)(Time of day)
 Column  5: V5 is V5 (days)(Julian days since 1-Jan-1900)
 Column  6: V6 is V6 (days)(Julian days since 1-Jan-1900)
 Column  7: V7 is V7 (hours)(Time of day)
 Column  8: V8 is V8 (hours)(Time of day)
             V1     V2     V3     V4      V5      V6     V7     V8
1   / 1:  36493.  36218.  12.00  13.76  36493.  36218.  12.00  13.76
2   / 2:  36494.  36219.   1.00  14.76  36494.  36219.   1.00  14.76
3   / 3:    ....    ....   ....   ....  36495.  36220.   2.00  15.75
4   / 4:  36496.  36221.   3.00  16.76  36496.  36221.   3.00  16.76
show data 2
     currently SET data sets:
    2> ./data/bn_delimited_read_date_time.dat  (default)
 name     title                             I         J         K         L
 V1       V1                               1:4       ...       ...       ...
       (Julian days since 1-Jan-1900)
 V2       V2                               1:4       ...       ...       ...
       (Julian days since 1-Jan-1900)
 V3       V3                               1:4       ...       ...       ...
       (Time of day)
 V4       V4                               1:4       ...       ...       ...
       (Time of day)
 V5       V5                               1:4       ...       ...       ...
       (Julian days since 1-Jan-1900)
 V6       V6                               1:4       ...       ...       ...
       (Julian days since 1-Jan-1900)
 V7       V7                               1:4       ...       ...       ...
       (Time of day)
 V8       V8                               1:4       ...       ...       ...
       (Time of day)
 
 
columns/type="da,-,ti,-,date,-,time,-"  bn_delimited_read_date_time.dat
list v1,v3,v5,v7
             DATA SET: ./data/bn_delimited_read_date_time.dat
             X: 0.5 to 4.5
 Column  1: V1 is V1 (days)(Julian days since 1-Jan-1900)
 Column  2: V3 is V3 (hours)(Time of day)
 Column  3: V5 is V5 (days)(Julian days since 1-Jan-1900)
 Column  4: V7 is V7 (hours)(Time of day)
             V1    V3      V5     V7
1   / 1:  36493.  12.00  36493.  12.00
2   / 2:  36494.   1.00  36494.   1.00
3   / 3:    ....   ....  36495.   2.00
4   / 4:  36496.   3.00  36496.   3.00
show data 2
     currently SET data sets:
    2> ./data/bn_delimited_read_date_time.dat  (default)
 name     title                             I         J         K         L
 V1       V1                               1:4       ...       ...       ...
       (Julian days since 1-Jan-1900)
 V3       V3                               1:4       ...       ...       ...
       (Time of day)
 V5       V5                               1:4       ...       ...       ...
       (Julian days since 1-Jan-1900)
 V7       V7                               1:4       ...       ...       ...
       (Time of day)
 
 
! delimiters can be used to break up individual fields
file/form=delim/delim="/" bn_delimited_read_date_time.dat
list V1,V2,V3,V4
             DATA SET: ./data/bn_delimited_read_date_time.dat
             X: 0.5 to 4.5
 Column  1: V1
 Column  2: V2
 Column  3: V3
 Column  4: V4
            V1    V2                       V3                      V4
1   / 1:  12.00  1.000 "99,1999-03-01,12:00, 13:45:36.5,12"       1.000
2   / 2:  12.00  2.000 "99,1999-03-02,01:00:13.5, 14:45:36.5,12"  2.000
3   / 3:  12.00  3.000 "99x,1999-03-03x,2:00x, 15:45x,12"         3.000
4   / 4:  12.00  4.000 "99,1999-03-04,03:00, 16:45:36.5, 12"      4.000
! ---
sp cat data/bn_delimited_read_date_time.dat
12/1/99,1999-03-01,12:00, 13:45:36.5,12/1/99,1999-03-01,12:00, 13:45:36.5
12/2/99,1999-03-02,01:00:13.5, 14:45:36.5,12/2/99,1999-03-02,01:00:13.5, 14:45:36.5
12/3/99x,1999-03-03x,2:00x, 15:45x,12/3/99,1999-03-03,2:00, 15:45
12/4/99,1999-03-04,03:00, 16:45:36.5, 12/4/99,1999-03-04,03:00, 16:45:36.5
! ---
file/form=delim/delim="/,\," bn_delimited_read_date_time.dat
list V1,V2,V3,V4,v5,v6,v7,v8
             DATA SET: ./data/bn_delimited_read_date_time.dat
             X: 0.5 to 4.5
 Column  1: V1
 Column  2: V2
 Column  3: V3
 Column  4: V4
 Column  5: V5
 Column  6: V6
 Column  7: V7
 Column  8: V8
            V1    V2     V3        V4           V5           V6        V7     V8
1   / 1:  12.00  1.000 "99"  "1999-03-01"  "12:00"      "13:45:36.5"  12.00  1.000
2   / 2:  12.00  2.000 "99"  "1999-03-02"  "01:00:13.5" "14:45:36.5"  12.00  2.000
3   / 3:  12.00  3.000 "99x" "1999-03-03x" "2:00x"      "15:45x"      12.00  3.000
4   / 4:  12.00  4.000 "99"  "1999-03-04"  "03:00"      "16:45:36.5"  12.00  4.000
 file/form=delim/delim="/,\,,-" bn_delimited_read_date_time.dat
list V1,V2,V3,V4,v5,v6,v7,v8,v9,v10
             DATA SET: ./data/bn_delimited_read_date_time.dat
             X: 0.5 to 4.5
 Column  1: V1
 Column  2: V2
 Column  3: V3
 Column  4: V4
 Column  5: V5
 Column  6: V6
 Column  7: V7
 Column  8: V8
 Column  9: V9
 Column 10: V10
            V1    V2     V3    V4     V5     V6       V7           V8        V9     V10
1   / 1:  12.00  1.000 "99"   1999.  3.000 "01"  "12:00"      "13:45:36.5"  12.00  1.000
2   / 2:  12.00  2.000 "99"   1999.  3.000 "02"  "01:00:13.5" "14:45:36.5"  12.00  2.000
3   / 3:  12.00  3.000 "99x"  1999.  3.000 "03x" "2:00x"      "15:45x"      12.00  3.000
4   / 4:  12.00  4.000 "99"   1999.  3.000 "04"  "03:00"      "16:45:36.5"  12.00  4.000
 file/form=delim/delim="/,\,,-,:" bn_delimited_read_date_time.dat
list V1,V2,V3,V4,v5,v6,v7,v8,v9,v10
             DATA SET: ./data/bn_delimited_read_date_time.dat
             X: 0.5 to 4.5
 Column  1: V1
 Column  2: V2
 Column  3: V3
 Column  4: V4
 Column  5: V5
 Column  6: V6
 Column  7: V7
 Column  8: V8
 Column  9: V9
 Column 10: V10
            V1    V2     V3    V4     V5     V6    V7     V8    V9    V10
1   / 1:  12.00  1.000 "99"   1999.  3.000 "01"   12.00 "00"   13.00 "45" 
2   / 2:  12.00  2.000 "99"   1999.  3.000 "02"    1.00 "00"   13.50 "14" 
3   / 3:  12.00  3.000 "99x"  1999.  3.000 "03x"   2.00 "00x"  15.00 "45x"
4   / 4:  12.00  4.000 "99"   1999.  3.000 "04"    3.00 "00"   16.00 "45" 
 
! read (beginning of) CO2 data file provided by Chris Sabine (like ODV files)
cancel data/all
columns/skip=1 bn_delimited_read_CO2.dat
show data/full
     currently SET data sets:
    1> ./data/bn_delimited_read_CO2.dat  (default)
 
 name     title                             I         J         K         L
 V1       V1                               1:19      ...       ...       ...
            Data type = TEXT
            Conversion /TYPE=TEXT
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V2       V2                               1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V3       V3                               1:19      ...       ...       ...
            Data type = TEXT
            Conversion /TYPE=TEXT
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V4       V4                               1:19      ...       ...       ...
       (Julian days since 1-Jan-1900)
            Data type = NUMERIC
            Conversion /TYPE=DATE
             days on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V5       V5                               1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V6       V6                               1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V7       V7                               1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V8       V8                               1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V9       V9                               1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V10      V10                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V11      V11                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V12      V12                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V13      V13                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V14      V14                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V15      V15                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V16      V16                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V17      V17                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V18      V18                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V19      V19                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V20      V20                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V21      V21                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V22      V22                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V23      V23                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V24      V24                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V25      V25                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V26      V26                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V27      V27                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V28      V28                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V29      V29                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V30      V30                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V31      V31                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V32      V32                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V33      V33                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V34      V34                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V35      V35                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V36      V36                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V37      V37                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V38      V38                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V39      V39                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V40      V40                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V41      V41                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V42      V42                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V43      V43                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V44      V44                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V45      V45                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V46      V46                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V47      V47                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V48      V48                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V49      V49                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V50      V50                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V51      V51                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V52      V52                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V53      V53                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V54      V54                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V55      V55                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V56      V56                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V57      V57                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V58      V58                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V59      V59                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V60      V60                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V61      V61                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V62      V62                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V63      V63                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V64      V64                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V65      V65                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V66      V66                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V67      V67                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V68      V68                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V69      V69                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V70      V70                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V71      V71                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 V72      V72                              1:19      ...       ...       ...
            Data type = NUMERIC
            Conversion /TYPE=NUMERIC
               on grid (G###) with -1.E+34 for missing data
             X=0.5:19.5  
 
 /DELIMITERS="\t,\,"
 /FORMAT = DELIMITED
 /SKIP = 1
 /COLUMNS = 72
list v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26
             DATA SET: ./data/bn_delimited_read_CO2.dat
             X: 0.5 to 19.5
 Column  1: V1
 Column  2: V2
 Column  3: V3
 Column  4: V4 is V4 (days)(Julian days since 1-Jan-1900)
 Column  5: V5
 Column  6: V6
 Column  7: V7
 Column  8: V8
 Column  9: V9
 Column 10: V10
 Column 11: V11
 Column 12: V12
 Column 13: V13
 Column 14: V14
 Column 15: V15
 Column 16: V16
 Column 17: V17
 Column 18: V18
 Column 19: V19
 Column 20: V20
 Column 21: V21
 Column 22: V22
 Column 23: V23
 Column 24: V24
 Column 25: V25
 Column 26: V26
                V1    V2    V3    V4     V5     V6     V7     V8     V9     V10    V11    V12    V13     V14    V15    V16    V17     V18    V19    V20     V21    V22    V23    V24    V25    V26
1    /  1: "I8SI9S"  4.000 "B"  34671.  94.99 -30.30  1945.    10.  21.10  35.94  0.000  36.00  0.0000  1.000    10.  224.6  0.0000   0.12  0.000  0.0000  0.000   1.02  0.000  0.116  0.000  2.229
2    /  2: "I8SI9S"  4.000 "B"  34671.  94.99 -30.30  1945.    54.  19.89  35.94  0.000  35.00  0.0000  1.000    55.  233.2  0.0000   0.15  0.000  0.0000  0.000   1.04  0.000  0.138  0.000  2.431
3    /  3: "I8SI9S"  4.000 "B"  34671.  94.99 -30.30  1945.    79.  19.01  35.92  0.000  34.00  0.0000  1.000    80.  237.0  0.0000   0.17  0.000  0.0000  0.000   1.04  0.000  0.131  0.000  2.516
4    /  4: "I8SI9S"  4.000 "B"  34671.  94.99 -30.30  1945.   104.  18.00  35.86  0.000  33.00  0.0000  1.000   105.  233.8  0.0000   0.19  0.000  0.0000  0.000   1.06  0.000  0.166  0.000  2.650
5    /  5: "I8SI9S"  4.000 "B"  34671.  94.99 -30.30  1945.   154.  16.36  35.71  0.000  32.00  0.0000  1.000   155.  230.2  0.0000   0.91  0.000  0.1465  0.000   0.90  0.000  0.266  0.000  2.846
6    /  6: "I8SI9S"  4.000 "B"  34671.  94.99 -30.30  1945.   204.  14.85  35.55  0.000  31.00  0.0000  1.000   206.  222.3  0.0000   3.79  0.000  0.0098  0.000   1.44  0.000  0.445  0.000  2.954
7    /  7: "I8SI9S"  4.000 "B"  34671.  94.99 -30.30  1945.   253.  13.72  35.38  0.000  29.00  0.0000  1.000   255.  227.6  0.0000   5.53  0.000  0.0098  0.000   1.63  0.000  0.559  0.000  3.006
8    /  8: "I8SI9S"  4.000 "B"  34671.  94.99 -30.30  1945.   254.  13.71  35.38  0.000  30.00  0.0000  1.000   256.  227.3  0.0000   5.51  0.000  0.0098  0.000   1.79  0.000  0.555  0.000  2.996
9    /  9: "I8SI9S"  4.000 "B"  34671.  94.99 -30.30  1945.   305.  12.62  35.21  0.000  28.00  0.0000  1.000   307.  230.9  0.0000   7.65  0.000  0.0098  0.000   2.16  0.000  0.686  0.000  3.134
10   / 10: "I8SI9S"  4.000 "B"  34671.  94.99 -30.30  1945.   353.  12.01  35.12  0.000  27.00  0.0000  1.000   356.  235.4  0.0000   8.72  0.000  0.0098  0.000   2.52  0.000  0.753  0.000  3.190
11   / 11: "I8SI9S"  4.000 "B"  34671.  94.99 -30.30  1945.   404.  11.46   ....  9.000  26.00  0.0000  1.000   407.   ....  0.0000   ....  9.000    ....  9.000   ....  9.000   ....  9.000  3.255
12   / 12: "I8SI9S"  4.000 "B"  34671.  94.99 -30.30  1945.   452.  11.04  34.96  0.000  25.00  0.0000  1.000   456.  239.9  0.0000  10.95  0.000  0.0000  0.000   3.05  0.000  0.884  0.000  3.245
13   / 13: "I8SI9S"  4.000 "B"  34671.  94.99 -30.30  1945.   502.  10.58  34.88  0.000  24.00  0.0000  1.000   506.  241.1  0.0000  12.14  0.000  0.0000  0.000   3.40  0.000  0.959  0.000  3.195
14   / 14: "I8SI9S"  4.000 "B"  34671.  94.99 -30.30  1945.   601.   9.80  34.76  0.000  23.00  0.0000  1.000   606.  238.5  0.0000  14.44  0.000  0.0000  0.000   4.27  0.000  1.114  0.000   ....
15   / 15: "I8SI9S"  4.000 "B"  34671.  94.99 -30.30  1945.   701.   9.02  34.65  0.000  22.00  0.0000  1.000   707.  229.2  0.0000  17.54  0.000  0.0000  0.000   6.18  0.000  1.312  0.000  2.454
16   / 16: "I8SI9S"  4.000 "B"  34671.  94.99 -30.30  1945.   800.   7.69  34.53  0.000  21.00  0.0000  1.000   807.  206.7  0.0000  22.74  0.000  0.0000  0.000  13.22  0.000  1.633  0.000  1.320
17   / 17: "I8SI9S"  4.000 "B"  34671.  94.99 -30.30  1945.   899.   6.21  34.44  0.000  20.00  0.0000  1.000   907.  194.6  0.0000  27.29  0.000  0.0000  0.000  23.86  0.000  1.927  0.000  0.732
18   / 18: "I8SI9S"  4.000 "B"  34671.  94.99 -30.30  1945.   999.   4.96  34.41  0.000  19.00  0.0000  1.000  1008.  186.9  0.0000  30.28  0.000  0.0000  0.000  36.39  0.000  2.153  0.000  0.429
19   / 19: "I8SI9S"  4.000 "B"  34671.  94.99 -30.30  1945.  1098.   4.31  34.44  0.000  18.00  0.0000  1.000  1109.  171.8  0.0000  32.20  0.000  0.0000  0.000  50.45  0.000  2.297  0.000  0.198
list/i=8:14 v11,v19,v21,v23,v25
             DATA SET: ./data/bn_delimited_read_CO2.dat
             X: 7.5 to 14.5
 Column  1: V11
 Column  2: V19
 Column  3: V21
 Column  4: V23
 Column  5: V25
             V11    V19    V21    V23    V25
8    /  8:  0.000  0.000  0.000  0.000  0.000
9    /  9:  0.000  0.000  0.000  0.000  0.000
10   / 10:  0.000  0.000  0.000  0.000  0.000
11   / 11:  9.000  9.000  9.000  9.000  9.000
12   / 12:  0.000  0.000  0.000  0.000  0.000
13   / 13:  0.000  0.000  0.000  0.000  0.000
14   / 14:  0.000  0.000  0.000  0.000  0.000
(set variable/bad=9 v11; set variable/bad=9 v19;set variable/bad=9 v21;set variable/bad=9 v23;set variable/bad=9 v25)
list/i=8:14 v11,v19,v21,v23,v25
             DATA SET: ./data/bn_delimited_read_CO2.dat
             X: 7.5 to 14.5
 Column  1: V11
 Column  2: V19
 Column  3: V21
 Column  4: V23
 Column  5: V25
              V11    V19     V21     V23     V25
8    /  8:  0.0000  0.0000  0.0000  0.0000  0.0000
9    /  9:  0.0000  0.0000  0.0000  0.0000  0.0000
10   / 10:  0.0000  0.0000  0.0000  0.0000  0.0000
11   / 11:    ....    ....    ....    ....    ....
12   / 12:  0.0000  0.0000  0.0000  0.0000  0.0000
13   / 13:  0.0000  0.0000  0.0000  0.0000  0.0000
14   / 14:  0.0000  0.0000  0.0000  0.0000  0.0000
! ... read column headings, only -- 1 record
define axis/z=1:1:1 z1
define grid/z=z1 g1
columns/grid=g1 bn_delimited_read_CO2.dat
list/nohead v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26
I / *:    "Cruise" "Station" "Type" "mm/dd/yy" "Lon[E]" "Lat[N]" "BotDep[m]" "Depth[m]" "Temperature[C]" "Salinity" "QF" "Bottle" "QF" "Cast" "Pressure[dbar]" "Oxygen[umol/kg]" "QF" "Nitrate[umol/kg]" "QF" "Nitrite[umol/kg]" "QF" "Silicate[umol/kg]" "QF" "Phosphate[umol/kg]" "QF" "CFC-11[pmol/kg]"
 
! deliberate syntax errors
set mode ignore
columns/type="d, da2,date2"  bn_delimited_read_date_time.dat
columns/type="da,da2,date2"  bn_delimited_read_date_time.dat
columns/type="da,da, date2"  bn_delimited_read_date_time.dat
columns/var="aa.b"  bn_delimited_read_date_time.dat
file/form=delim/delim="/,,,:" bn_delimited_read_date_time.dat
cancel mode ignore
 
*** Running ferret script: bn541_bug_fixes.jnl
! bn541_bug_fixes.jnl
! test various fixes that went into version 5.41
! 3/02 *acm*
!
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
! tics on horiz log axes were wrong; (plot only)
! GO bn_reset
! tested in bn_logaxes (the plots will be different in 5.40 and 5.41)
 
 
!missing vertices in polygon call
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err540_polymissing
! err540_polymissing.jnl
! 3/02 *acm*
! A previous fix to polygon cut off loading of poly's if a vertex was
! missing.  restore old behavior.  (polygon_set_up.F)
 
 
use coads_climatology
let xpts0=x[g=sst,x=110:150,y=20:40,l=1]*y[g=sst,x=110:150,y=20:40,l=1]*0+x[g=sst,x=110:150,y=20:40,l=1]
let ypts0=x[g=sst,x=110:150,y=20:40,l=1]*y[g=sst,x=110:150,y=20:40,l=1]*0+y[g=sst,x=110:150,y=20:40,l=1]
let values0=sst[x=110:150,y=20:40,l=1]
LET xpts=ysequence(xpts0)
LET ypts=ysequence(ypts0)
LET values=ysequence(values0)
 
LET xtriangle = {0,1,2}
LET ytriangle = {0,2,0}
LET xvertex = xpts+xtriangle
LET yvertex = ypts+ytriangle
polygon xvertex,yvertex,values
 
let xvertex1= IF values NE -1E+34 THEN xvertex
polygon  xvertex1,yvertex,values
 
! dynamic memory setup for POLYGON
! GO bn_reset
! see ~ansley/ans_ferret/users/brockmann/err540/err540_polygon2.jnl
 
! formatting axis label numbers
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err540_ill_format.jnl
! err540_ill_format.jnl
! 3/02 *acm*
 
!  formatting of small-magnitude negative numbers on axes is wrong
!  e.g. -0.002 becomes ******
!  fix in frmt.F
 
plot/i=1:100  0.001 - 0.002/ i
 
plot/trans/i=1:100  0.001 - 0.002/ i
 
 
 
 
! variable permutation in netCDF writes
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err540_write_order
! err540_write_order.jnl
! *sh* 3/02
 
! the permutation of gridsvariables during writing is inferred *incorrectly*
! from the context of the first variable only in xeq_list.F
 
! I think (??) that we need to replace this
!   * ... if no axis order was specified determine the permutation
!           IF (.NOT.permute) CALL GET_CX_DIMS(cx,ndim, perm )
!           DO 200 ilist = 1, num_uvars_in_cmnd
!              CALL CREATE_PERMUTATION(  memory,
 
! with this
!   * ... if no axis order was specified determine the permutation
!           DO 200 ilist = 1, num_uvars_in_cmnd
!              IF (.NOT.permute) CALL GET_CX_DIMS(is_cx(ilist),ndim, perm )
!              CALL CREATE_PERMUTATION(  memory,
 
 
define axis/x=1:2:1 x12
define axis/y=3:4:1 y34
define axis/z=5:6:1 z56
 
let yz =              10*y[gy=y34] + 100*z[gz=z56]
let xyz = x[gx=x12] + 10*y[gy=y34] + 100*z[gz=z56]
 
! before
list xyz
             VARIABLE : X[GX=X12] + 10*Y[GY=Y34] + 100*Z[GZ=Z56]
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             1      2    
             1      2
 ---- K:1 Z:   5
 3   / 1:  531.0  532.0
 4   / 2:  541.0  542.0
 ---- K:2 Z:   6
 3   / 1:  631.0  632.0
 4   / 2:  641.0  642.0
 
save/clobber/file=test_good_order.cdf xyz, yz
save/clobber/file=test_bad_order.cdf yz, xyz
cancel var/all
 
! after
use test_good_order
list xyz
             VARIABLE : X[GX=X12] + 10*Y[GY=Y34] + 100*Z[GZ=Z56]
             FILENAME : test_good_order.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             1      2    
             1      2
 ---- K:1 Z:   5
 3   / 1:  531.0  532.0
 4   / 2:  541.0  542.0
 ---- K:2 Z:   6
 3   / 1:  631.0  632.0
 4   / 2:  641.0  642.0
use test_bad_order
list xyz
             VARIABLE : X[GX=X12] + 10*Y[GY=Y34] + 100*Z[GZ=Z56]
             FILENAME : test_bad_order.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             1      2    
             1      2
 ---- K:1 Z:   5
 3   / 1:  531.0  532.0
 4   / 2:  541.0  542.0
 ---- K:2 Z:   6
 3   / 1:  631.0  632.0
 4   / 2:  641.0  642.0
 
sp rm -f test_good_order.cdf
sp rm -f test_bad_order.cdf
 
!@AVE error when plotting unlike grids together
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err540_ax_ave
!err540_ax_ave.jnl
! 3/02 *acm
! @AVE getting wrong set of indices for forming the average, having
! loaded range of indices on the first plot.  ave_regrid_1_axis.F
 
use coads_climatology
def axis/edges/t=1:7306:1461/t0="01-jan-0000"/unit=hour t2
plot/x=140w/y=0/sym/line sst,sst[gt=t2@ave]
 
def axis/edges/t=1:1600:731/t0="01-jan-0000"/unit=hour t2
plot/x=140w/y=0/sym/line sst,sst[gt=t2@ave]
 
!Make PPL AXSET settings persist, but not settings made w/ qualifiers /AXES= or /NOAXES
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err540_axset
!err540_axset.jnl
! 3/02 *acm
! backwards compatibility: PPL AXSET settings persist, and
! PLOT/AXES  or PLOT/NOAXES override these, but only for one plot.
 
! define a 6 viewport window
def view/xlim=   0,.333/ylim=0,.5 ll6
def view/xlim=   0,.333/ylim=.5,1 ul6
def view/xlim=.333,.666/ylim=0,.5 lm6
def view/xlim=.333,.666/ylim=.5,1 um6
def view/xlim=.666,   1/ylim=0,.5 lr6
def view/xlim=.666,   1/ylim=.5,1 ur6
 
SET VIEW ul6;PLOT/NOAXES/I=1:10/TITLE="PLOT/NOAXES" 1./I
SET VIEW um6;SHADE/I=1:10/J=1:7/TITLE="No qualifiers" I+J
 
PPL AXSET 0,1,1,0
SET VIEW ur6;FILL/I=1:10/J=1:7/TITLE="with PPL AXSET 0,1,1,0" I+J
 
SET VIEW ll6;CONTOUR/AXES=1,0,0,1/I=1:10/J=1:7/TITLE="CONTOUR/AXES=" I+J
 
SET VIEW lm6;VECTOR/I=1:10/J=1:7/TITLE="Prev. PPL AXSET setting" I+J, I-0.5*J
 
SET VIEW lr6;PLOT/i=1:10/SET/TITLE="plot/SET, new setting" 1./I
PPL AXSET 0,1,0,0
PPL PLOT
 
PPL axset 1,1,1,1
 
 
!Previously couldn't do PLOT/VS/DASH, but no reason not to allow it.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err540_vs_dash
! PLOT/VS/DASH  previously was not allowed.
 
define axis/x=20e:10w:10/unit=degree xax
define axis/y=60s:60n/unit=degree/npoints=41 yax
define axis/z=0:1000:40/unit=meter/depth zax
define axis/t=1-jan-1960:15-dec-1999:5/unit=days tax
define grid/x=xax/y=yax/z=zax/t=tax gformat
 
*  XZ shade with VS/DASH/OVER
set grid gformat
shade/y=-60:60/z=0:1000 sin(y/3)*ABS(z)^1.5
 
let ypts = {-60,-50,-40,-30,-20,-10,  0,  8, 15, 30, 35, 40, 60}
let zpts = {700,667,669,801,732,755,765,789,808,788,822,699,700}
 
plot/vs/over/thick/line/dash ypts,zpts
plot/vs/over/thick=3/line/dash=0.05,0.05,0.15,0.15 ypts,zpts+100
 
*  XY shade with VS/DASH/OVER
set grid abstract
shade/pal=grayscale/x=1:100/y=101:200 sin(x/6)*cos(y/9)
 
let xpts = {  0,  8, 12, 15, 23, 28, 30, 35, 40, 44, 54, 60, 75}
let ypts = {142,147,149,141,142,155,145,149,148,148,152,146,143}
 
plot/vs/over/thick/color=red/dash xpts,ypts
plot/vs/over/thick=3/color=red/dash=0.05,0.05,0.15,0.15 xpts+10,ypts+30
 
!  Here, test that settings made with PPL LINE command persist,
! whereas PLOT/DASH settings do not.
 
let ypts=y[gy=1:80:1]
ppl line, 2, 0, 4, 0, 0, 0.04, 0.04, 0.15,0.15
ppl line, 3, 0, 4, 0, 0, 0.2, 0.2, 0.2,0.2
plot/thick/dash/vlimits=0:1000 50*sin(ypts/3)+100, 30*cos(ypts/3)+200
plot/over/color=red/thick/dash=0.04,0.04,0.04,0.04 50*sin(ypts/3)+400, 30*cos(ypts/3)+500
plot/over/thick/dash/color=blue 50*sin(ypts/3)+700, 30*cos(ypts/3)+800, 20*cos(ypts/5)+900, 20*sin(ypts)+950
 
 
!overlay on polygon plots
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err540_poly_overlay
!overlay on polygon plots
 
polygon/thick/color=red/palette=blue/axes=1,0,1,0 {1,2,1}, {2,1,0.5}
shade/over/i=1:2/j=0:2/patt i+j
 
!polytube failed on plot/over; go polytube, because YAXIS_MIN, _MAX not defined.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err540_axis_symbols
! err540_axis_symbols.jnl
! 3/02 *acm*
! Define YAXIS_MIN and YAXIS_MAX after PPLUS auto-scaling is done.
! e.g. polytube failed overlaying on PLOT/VS plots, because symbols
! YAXIS_MIN and YAXIS_MAX or the XAXIS symbols aren't set.
! Note: when running in the benchmark suite, the go polytube command
!       causes the job to hang.
 
can var/all
 
let xpts = i[i=1:100]
set view left
plot/line/vs xpts, sin(xpts/10)
sh sym YAXIS_MAX
YAXIS_MAX = "1.000000"
!go polytube polygon/over  xpts, sin(xpts/10), sin(xpts/10)
 
set view right
 
let xpts = {3,5,6,7,8,9,10,13,15,16,17,18,19,21,22}
let ypts = {1,2,3,4,5,6, 7, 8, 9, 4, 5, 6, 7, 8, 9}
let zpts = {1,2,3,4,5,1, 2, 3, 4, 5, 1, 2, 3, 4, 5}
 
plot/vs/trans/line xpts,ypts
sh sym XAXIS_MAX
XAXIS_MAX = "10.00000"
!go polytube polygon/trans/over xpts,ypts,zpts
 
!nested repeat loops and parsing parentheses
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err540_parse_repeat
! err540_parse_repeat.jnl
! 3/03 *acm
 
!yes? rep/k=1:2 (rep/j=1:1 (say hello))
!-> REPEAT: K=1
!-> REPEAT: J=1              <-----------lots of these
!-> REPEAT: J=1
!...
! **ERROR: stack overflow
!rep/j=1:1 (rep/j=1:1 (say hello))
!Command file, command group, or REPEAT execution aborted
 
 
!Cause is parsing parentheses in REPEAT section of parse_command.F
 
rep/k=1:2 (rep/j=1:1 (say hello))
!-> REPEAT: K=1
!-> REPEAT: J=1
hello
!-> REPEAT: K=2
!-> REPEAT: J=1
hello
rep/k=1:2 (rep/j=1:1 say hello; say why not)
!-> REPEAT: K=1
!-> REPEAT: J=1
hello
why not
!-> REPEAT: K=2
!-> REPEAT: J=1
hello
why not
rep/k=1:2 (rep/j=1:1 (say hello; (say why not)))
!-> REPEAT: K=1
!-> REPEAT: J=1
hello
why not
!-> REPEAT: K=2
!-> REPEAT: J=1
hello
why not
 
! appending a scalar to NetCDF file
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err540_cd_use_recdim
! err540_cd_use_recdim
! 3/02 *sh*
 
! crash appending scalar variable into file
 
define axis/x=1:50:1 xprofile
define axis/y=0:360/npoints=10/edges ylon
define axis/z=-90:90/npoints=10/edges zlat
define axis/t=1-jan-1900:31-dec-1995/T0=1-jan-1900/npoints=10/edges tdate
 
let maxprof = 5
let temp = X[gx=xprofile] + Y[gy=ylon] + Z[gz=zlat] + T[gt=tdate]
 
save/clobber/file=profiles.nc  temp   ! 4D variable
save/append/file=profiles.nc maxprof  ! append a scalar variable
 
use profiles.nc
sh data
     currently SET data sets:
    1> ./profiles.nc  (default)
 name     title                             I         J         K         L
 TEMP     X[GX=XPROFILE] + Y[GY=YLON] + Z  1:50      1:10      1:10      1:10
 MAXPROF  5                                ...       ...       ...       ...
 
sp rm -f profiles.nc
 
! ================================= quit
!save/append/file=profiles.nc maxprof
!
! LISTing to file profiles.nc
!Subscript out of range on file cd_use_recdim.F, line 97,
!procedure cd_use_recdim.
!Subscript number 1 has value 0 in array vdims.
!Abort
 
 
 
 
!missing data in xpts,ypts sample points wasnt checked
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err540_samplexy_missing
! err540_samplexy_missing.jnl
! 3/03 *acm
 
! previously missing data in the sample points caused Ferret to hang
 
use coads_climatology
let asst = samplexy(sst, {171,173,-1.e34}, {-1,1,13})
list asst
             VARIABLE : SAMPLEXY(SST, {171,173,-1.E34}, {-1,1,13})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 3 points (X-TIME)
                     1      2      3    
                     1      2      3
 16-JAN      / 1:  29.00  27.90   ....
 15-FEB      / 2:  28.55  28.25   ....
 17-MAR      / 3:  28.88  28.48   ....
 
let asst = samplexy(sst, {171,173,169}, {-1,,13})
list asst
             VARIABLE : SAMPLEXY(SST, {171,173,169}, {-1,,13})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 3 points (X-TIME)
                     1      2      3    
                     1      2      3
 16-JAN      / 1:  29.00   ....  26.96
 15-FEB      / 2:  28.55   ....  26.79
 17-MAR      / 3:  28.88   ....  27.11
 
! test the fixed delta stride bug
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err540_strides_rev.jnl
! err540_strides_rev.jnl
! V702: *sh* 2/2017 - modified this bench script
! V751:*acm* 6/2019 - memory is restored to the default in bn_reset
 
! reported Feb '02
! fixed April 17, '02
 
! Symptom: plots appear to be "tiled" -- repreating content
 
! file test_100x100 has a diagonal line of 1s in a field of 0s
sp rm -f test_100x100.nc
set region/i=1:100/j=1:100
let a0 = 0
let a = if i eq j then 1 else a0
!shade a
save/file=test_100x100.nc a
cancel data/all
cancel var/all
 
! works fine in V5.33
! try these lines for reference
!    yes? use test_100x100.nc
!    yes? shade a
!    yes? shade a[i=1:100:10]
 
! explanation of bug:
! Following the implicit regrid in IS_REGRID the resultant cx did not
! have the delta value(s) removed, so the mr thinks
! that it is 1:10:10 instead of simply 1:10
 
! this causes an inadequate amount of memory to be allocated and
! subsequent variables try to occupy the same memory already in use
! COPY_GRID is where the tiling effect happens, though it is not the
! cause of the problem
 
set mode stupid
set mode diag
! *sh* 2/17 - such a small memory size makes it impossible to succeed
! with the command under the new dynamic memory management
!set mem/size=0.05
set mem/size=1   ! use this larger size, instead
show mem/free
    SET MEMORY/MAX: 8 Mb   (1000000 words)
    Peak demand: 0 Kb
    Current cache: 0 Kb
    Total table slots: 500
    Free table slots: 500
    Un-cached variables: 0
 
use/ord=x-y test_100x100.nc
list/prec=1 a[i=1:100:10] !  this looks just right!!
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YAX1_100  NORMAL    NORMAL
 dealloc  dynamic grid (G###)          (AX###)   YAX1_100  NORMAL    NORMAL
 allocate dynamic grid (G###)          (AX###)   YAX1_100  NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   1 I:      1    100  J:    1  100  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          (AX###)   YAX1_100  NORMAL    NORMAL
 strip regrid on X: A --> (G###)           @XACT
 strip reversing A on Y axis:        1      100 dset:   1
 rdstride A        C:  8 dset:   1 I:      1     91  J:    1  100  K: -999 -999  L:   -999   -999
 doing reversing A on Y axis:        1      100 dset:   1
 -DELETE A        M: 15 dset:   1 I:      1     91  J:    1  100  K: -999 -999  L:   -999   -999
 nulrgd  A        M: 15 dset:   1 I:      1     10  J:    1  100  K: -999 -999  L:   -999   -999
 -DELETE A        M:  1 dset:   1 I:      1     91  J:    1  100  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          (AX###)   YAX1_100  NORMAL    NORMAL
             VARIABLE : IF I EQ J THEN 1 ELSE A0
                        regrid: 10 delta on X
             FILENAME : test_100x100.nc
             SUBSET   : 10 by 100 points (X-Y)
               1   11  21  31  41  51  61  71  81  91  
                1   2   3   4   5   6   7   8   9  10
 1     /   1:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 2     /   2:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 3     /   3:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 4     /   4:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 5     /   5:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 6     /   6:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 7     /   7:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 8     /   8:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 9     /   9:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 10    /  10:  0.  0.  0.  0.  0.  0.  0.  0.  0.  1.
 11    /  11:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 12    /  12:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 13    /  13:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 14    /  14:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 15    /  15:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 16    /  16:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 17    /  17:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 18    /  18:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 19    /  19:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 20    /  20:  0.  0.  0.  0.  0.  0.  0.  0.  1.  0.
 21    /  21:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 22    /  22:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 23    /  23:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 24    /  24:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 25    /  25:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 26    /  26:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 27    /  27:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 28    /  28:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 29    /  29:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 30    /  30:  0.  0.  0.  0.  0.  0.  0.  1.  0.  0.
 31    /  31:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 32    /  32:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 33    /  33:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 34    /  34:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 35    /  35:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 36    /  36:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 37    /  37:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 38    /  38:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 39    /  39:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 40    /  40:  0.  0.  0.  0.  0.  0.  1.  0.  0.  0.
 41    /  41:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 42    /  42:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 43    /  43:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 44    /  44:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 45    /  45:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 46    /  46:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 47    /  47:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 48    /  48:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 49    /  49:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 50    /  50:  0.  0.  0.  0.  0.  1.  0.  0.  0.  0.
 51    /  51:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 52    /  52:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 53    /  53:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 54    /  54:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 55    /  55:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 56    /  56:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 57    /  57:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 58    /  58:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 59    /  59:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 60    /  60:  0.  0.  0.  0.  1.  0.  0.  0.  0.  0.
 61    /  61:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 62    /  62:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 63    /  63:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 64    /  64:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 65    /  65:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 66    /  66:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 67    /  67:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 68    /  68:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 69    /  69:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 70    /  70:  0.  0.  0.  1.  0.  0.  0.  0.  0.  0.
 71    /  71:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 72    /  72:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 73    /  73:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 74    /  74:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 75    /  75:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 76    /  76:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 77    /  77:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 78    /  78:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 79    /  79:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 80    /  80:  0.  0.  1.  0.  0.  0.  0.  0.  0.  0.
 81    /  81:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 82    /  82:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 83    /  83:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 84    /  84:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 85    /  85:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 86    /  86:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 87    /  87:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 88    /  88:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 89    /  89:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 90    /  90:  0.  1.  0.  0.  0.  0.  0.  0.  0.  0.
 91    /  91:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 92    /  92:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 93    /  93:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 94    /  94:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 95    /  95:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 96    /  96:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 97    /  97:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 98    /  98:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 99    /  99:  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.
 100   / 100:  1.  0.  0.  0.  0.  0.  0.  0.  0.  0.
show grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 (AX###)   X                   10 r   1                    91                  10 pts
 YAX1_100  Y                  100 r   1                    100                 full
 normal    Z
 normal    T
 
! should be a diagonal path of steps all the way across the plot
shade a[i=1:100:10]
 eval    EX#1     C:  4 dset:   1 I:      1    100  J:    1  100  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          (AX###)   YAX1_100  NORMAL    NORMAL
 strip regrid on X: A --> (G###)           @XACT
 strip reversing A on Y axis:        1      100 dset:   1
 rdstride A        C:  8 dset:   1 I:      1     91  J:    1  100  K: -999 -999  L:   -999   -999
 doing reversing A on Y axis:        1      100 dset:   1
 -DELETE A        M:  1 dset:   1 I:      1     91  J:    1  100  K: -999 -999  L:   -999   -999
 nulrgd  A        M:  1 dset:   1 I:      1     10  J:    1  100  K: -999 -999  L:   -999   -999
 -DELETE A        M: 21 dset:   1 I:      1     91  J:    1  100  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          (AX###)   YAX1_100  NORMAL    NORMAL
setting up 2D plot
 -DELETE A        M: 21 dset:   1 I:      1     10  J:    1  100  K: -999 -999  L:   -999   -999
PPL plot 26   complete
ppl list stats


         DATA OF TYPE CONTOUR                       
                   MIN            MAX
         X     1.0000E+00     9.1000E+01
         Y     1.0000E+00     1.0000E+02
         Z     0.0000E+00     1.0000E+00
         NX=  10 NY= 100
ppl list data  ! make screen wide -- shows the 1's matching the plot


         DATA OF TYPE CONTOUR                       
                   MIN            MAX
         X     1.0000E+00     9.1000E+01
         Y     1.0000E+00     1.0000E+02
         Z     0.0000E+00     1.0000E+00
         NX=  10 NY= 100
                  1         2         3         4         5         6         7
           1  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
           2  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
           3  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
           4  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
           5  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
           6  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
           7  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
           8  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
           9  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          10  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          11  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          12  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          13  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          14  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          15  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          16  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          17  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          18  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          19  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          20  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          21  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          22  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          23  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          24  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          25  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          26  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          27  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          28  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          29  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          30  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          31  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          32  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          33  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          34  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          35  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          36  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          37  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          38  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          39  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          40  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  1.00E+00
          41  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          42  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          43  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          44  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          45  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          46  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          47  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          48  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          49  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          50  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  1.00E+00  0.00E+00
          51  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          52  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          53  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          54  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          55  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          56  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          57  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          58  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          59  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          60  0.00E+00  0.00E+00  0.00E+00  0.00E+00  1.00E+00  0.00E+00  0.00E+00
          61  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          62  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          63  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          64  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          65  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          66  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          67  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          68  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          69  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          70  0.00E+00  0.00E+00  0.00E+00  1.00E+00  0.00E+00  0.00E+00  0.00E+00
          71  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          72  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          73  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          74  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          75  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          76  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          77  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          78  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          79  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          80  0.00E+00  0.00E+00  1.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          81  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          82  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          83  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          84  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          85  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          86  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          87  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          88  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          89  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          90  0.00E+00  1.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          91  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          92  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          93  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          94  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          95  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          96  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          97  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          98  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
          99  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00
         100  1.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00  0.00E+00


                  8         9        10
           1  0.00E+00  0.00E+00  0.00E+00
           2  0.00E+00  0.00E+00  0.00E+00
           3  0.00E+00  0.00E+00  0.00E+00
           4  0.00E+00  0.00E+00  0.00E+00
           5  0.00E+00  0.00E+00  0.00E+00
           6  0.00E+00  0.00E+00  0.00E+00
           7  0.00E+00  0.00E+00  0.00E+00
           8  0.00E+00  0.00E+00  0.00E+00
           9  0.00E+00  0.00E+00  0.00E+00
          10  0.00E+00  0.00E+00  1.00E+00
          11  0.00E+00  0.00E+00  0.00E+00
          12  0.00E+00  0.00E+00  0.00E+00
          13  0.00E+00  0.00E+00  0.00E+00
          14  0.00E+00  0.00E+00  0.00E+00
          15  0.00E+00  0.00E+00  0.00E+00
          16  0.00E+00  0.00E+00  0.00E+00
          17  0.00E+00  0.00E+00  0.00E+00
          18  0.00E+00  0.00E+00  0.00E+00
          19  0.00E+00  0.00E+00  0.00E+00
          20  0.00E+00  1.00E+00  0.00E+00
          21  0.00E+00  0.00E+00  0.00E+00
          22  0.00E+00  0.00E+00  0.00E+00
          23  0.00E+00  0.00E+00  0.00E+00
          24  0.00E+00  0.00E+00  0.00E+00
          25  0.00E+00  0.00E+00  0.00E+00
          26  0.00E+00  0.00E+00  0.00E+00
          27  0.00E+00  0.00E+00  0.00E+00
          28  0.00E+00  0.00E+00  0.00E+00
          29  0.00E+00  0.00E+00  0.00E+00
          30  1.00E+00  0.00E+00  0.00E+00
          31  0.00E+00  0.00E+00  0.00E+00
          32  0.00E+00  0.00E+00  0.00E+00
          33  0.00E+00  0.00E+00  0.00E+00
          34  0.00E+00  0.00E+00  0.00E+00
          35  0.00E+00  0.00E+00  0.00E+00
          36  0.00E+00  0.00E+00  0.00E+00
          37  0.00E+00  0.00E+00  0.00E+00
          38  0.00E+00  0.00E+00  0.00E+00
          39  0.00E+00  0.00E+00  0.00E+00
          40  0.00E+00  0.00E+00  0.00E+00
          41  0.00E+00  0.00E+00  0.00E+00
          42  0.00E+00  0.00E+00  0.00E+00
          43  0.00E+00  0.00E+00  0.00E+00
          44  0.00E+00  0.00E+00  0.00E+00
          45  0.00E+00  0.00E+00  0.00E+00
          46  0.00E+00  0.00E+00  0.00E+00
          47  0.00E+00  0.00E+00  0.00E+00
          48  0.00E+00  0.00E+00  0.00E+00
          49  0.00E+00  0.00E+00  0.00E+00
          50  0.00E+00  0.00E+00  0.00E+00
          51  0.00E+00  0.00E+00  0.00E+00
          52  0.00E+00  0.00E+00  0.00E+00
          53  0.00E+00  0.00E+00  0.00E+00
          54  0.00E+00  0.00E+00  0.00E+00
          55  0.00E+00  0.00E+00  0.00E+00
          56  0.00E+00  0.00E+00  0.00E+00
          57  0.00E+00  0.00E+00  0.00E+00
          58  0.00E+00  0.00E+00  0.00E+00
          59  0.00E+00  0.00E+00  0.00E+00
          60  0.00E+00  0.00E+00  0.00E+00
          61  0.00E+00  0.00E+00  0.00E+00
          62  0.00E+00  0.00E+00  0.00E+00
          63  0.00E+00  0.00E+00  0.00E+00
          64  0.00E+00  0.00E+00  0.00E+00
          65  0.00E+00  0.00E+00  0.00E+00
          66  0.00E+00  0.00E+00  0.00E+00
          67  0.00E+00  0.00E+00  0.00E+00
          68  0.00E+00  0.00E+00  0.00E+00
          69  0.00E+00  0.00E+00  0.00E+00
          70  0.00E+00  0.00E+00  0.00E+00
          71  0.00E+00  0.00E+00  0.00E+00
          72  0.00E+00  0.00E+00  0.00E+00
          73  0.00E+00  0.00E+00  0.00E+00
          74  0.00E+00  0.00E+00  0.00E+00
          75  0.00E+00  0.00E+00  0.00E+00
          76  0.00E+00  0.00E+00  0.00E+00
          77  0.00E+00  0.00E+00  0.00E+00
          78  0.00E+00  0.00E+00  0.00E+00
          79  0.00E+00  0.00E+00  0.00E+00
          80  0.00E+00  0.00E+00  0.00E+00
          81  0.00E+00  0.00E+00  0.00E+00
          82  0.00E+00  0.00E+00  0.00E+00
          83  0.00E+00  0.00E+00  0.00E+00
          84  0.00E+00  0.00E+00  0.00E+00
          85  0.00E+00  0.00E+00  0.00E+00
          86  0.00E+00  0.00E+00  0.00E+00
          87  0.00E+00  0.00E+00  0.00E+00
          88  0.00E+00  0.00E+00  0.00E+00
          89  0.00E+00  0.00E+00  0.00E+00
          90  0.00E+00  0.00E+00  0.00E+00
          91  0.00E+00  0.00E+00  0.00E+00
          92  0.00E+00  0.00E+00  0.00E+00
          93  0.00E+00  0.00E+00  0.00E+00
          94  0.00E+00  0.00E+00  0.00E+00
          95  0.00E+00  0.00E+00  0.00E+00
          96  0.00E+00  0.00E+00  0.00E+00
          97  0.00E+00  0.00E+00  0.00E+00
          98  0.00E+00  0.00E+00  0.00E+00
          99  0.00E+00  0.00E+00  0.00E+00
         100  0.00E+00  0.00E+00  0.00E+00


 
can mode stupid
can mode diag
 
 
! unknown data type for clauses with constants only
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err540_data_type.jnl
! err540_data_type
! 2/19/02 *sh*
 
! Ferret fails to identifies the data type and gets
! "**ERROR: illegal data type (float,string,...) for operation: A"
 
! in disp_data_set_up XEQ_PLOT is insisting on ptype_float.
! The type that is coming back from "a" is "0" (ptype_unknown)
 
! The problem is that uvar_data_type(uvar=1="A", dset=0) is ptype_unknown=0
! this is happening because its correct value is lost in IS_UVAR_GRID
 
! solved 4/02:
! The constant ("1") was being ignored -- needed to get its data type
! change to IS_UVAR_GRID.F
 
! Note - initial soln lead to further problems to resolve for
!        IF cond THEN pseudo + const
 
!set mode diag
 
! bad
plot IF {1,3,5} GE 3 THEN 1  ! data type unknown
 
! ok  -- no error if constant is buried within a user variable
!let V = 1
!plot IF {1,3,5} GE 3 THEN v
 
 
! gridding scattered points to modulo axis had bug
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err540_modscat.jnl
! test gridding scattered points to modulo axis.
! Show Southern hemisphere.
 
use coads_climatology
 
let xpts = 360*randu(i+10)-180; let ypts = 80*randu(i) -80
let sstpts = samplexy(sst[l=1], xpts[i=1:1000], ypts[i=1:1000])
 
def axis/x=180w:180e:1/modulo xax
def axis/y=-89:0:1 yax
def grid/x=xax/y=yax mygrid
 
let a  = scat2gridgauss_xy (xpts[i=1:1000], ypts[i=1:1000], sstpts, x[gx=mygrid], y[gy=mygrid], 6, 1, 6, 6)
 
let b = if sst[l=1,gx=mygrid,gy=mygrid] then a
 
shade b
plot/vs/over xpts[i=1:1000]+360, ypts[i=1:1000]
 
! make sure the USE bug reported 5/01 by A Wittenberg is fixed
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err540_use.jnl
! err540_use.jnl
!
! very subtle bug fix in the "USE" command.  What would happen is if dataset A and
! dataset B were "used", then dset A was cancelled, if the next dataset (dataset C)
! "used" had a similarly named variable as dataset B, then Ferret would mistakingly
! set the similarly named variable in dataset C to lower case, making it inaccessible.
! This was because the logic in cd_scan_vars.F didn't take into account that variables from
! different datasets may be overlapped in the ds_var_code array.
 
! Create three simple files containing variables with lowercase names.
let a = 1
let b = 2
save/q/clob/file=f.nc a
save/q/clob/file=f2.nc a,b
save/q/clob/file=g.nc b
can var a b
 
sp ncrename -h -v A,a f.nc
sp ncrename -h -v A,a -v B,b f2.nc
sp ncrename -h -v B,b g.nc
use f.nc
use f2.nc
use g.nc
sh data
     currently SET data sets:
    1> ./f.nc
 name     title                             I         J         K         L
 A        1                                ...       ...       ...       ...
 
    2> ./f2.nc
 name     title                             I         J         K         L
 A        1                                ...       ...       ...       ...
 B        2                                ...       ...       ...       ...
 
    3> ./g.nc  (default)
 name     title                             I         J         K         L
 B        2                                ...       ...       ...       ...
 
can data/all
 
! Use two of the files and cancel the first one.
use f.nc
sh data
     currently SET data sets:
    1> ./f.nc  (default)
 name     title                             I         J         K         L
 A        1                                ...       ...       ...       ...
 
use g.nc
sh data
     currently SET data sets:
    1> ./f.nc
 name     title                             I         J         K         L
 A        1                                ...       ...       ...       ...
 
    2> ./g.nc  (default)
 name     title                             I         J         K         L
 B        2                                ...       ...       ...       ...
 
can dat 1
 
! Now open the f2 file which as both a and b variables
use f2.nc
 
! All variables from BOTH datasets should be capitals.
show dat
     currently SET data sets:
    1> ./f2.nc  (default)
 name     title                             I         J         K         L
 A        1                                ...       ...       ...       ...
 B        2                                ...       ...       ...       ...
 
    2> ./g.nc
 name     title                             I         J         K         L
 B        2                                ...       ...       ...       ...
 
 
! This should work
list b[d=1]
             VARIABLE : 2
             FILENAME : f2.nc
          2.000
 
 
*** Running ferret script: bn_cancel_axes.jnl
! bn_cancel_axes.jnl
 
let ind1 = 1*i
let tim1 = 20500*randu(ind1[i=1:20500])
let ind2 = sorti(tim1)
let tim2 = samplei(tim1, ind2)
list/format=comma/file=longax.dat/clobber tim2
set data/skip=4/ez/col=2/var="cnt,tim" longax.dat
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
! longax cancel axis axname
repeat/k=1:10 go bn_cancel_axes_1.sub
!-> REPEAT: K=1
! cancel axis axname
! Defining lots of irregular axes, used up coordinate storage.
! Now coordinage storage is recovered; also have the option to cancel axis/all
 
set data/skip=4/ez/col=2/var="cnt,tim" longax.dat
def axis/from_data/t/units=days tim_ax=tim
def grid/t=tim_ax tim_grd
can grid tim_grd
can axis tim_ax
can data longax.dat
 
!-> REPEAT: K=2
! cancel axis axname
! Defining lots of irregular axes, used up coordinate storage.
! Now coordinage storage is recovered; also have the option to cancel axis/all
 
set data/skip=4/ez/col=2/var="cnt,tim" longax.dat
def axis/from_data/t/units=days tim_ax=tim
def grid/t=tim_ax tim_grd
can grid tim_grd
can axis tim_ax
can data longax.dat
 
!-> REPEAT: K=3
! cancel axis axname
! Defining lots of irregular axes, used up coordinate storage.
! Now coordinage storage is recovered; also have the option to cancel axis/all
 
set data/skip=4/ez/col=2/var="cnt,tim" longax.dat
def axis/from_data/t/units=days tim_ax=tim
def grid/t=tim_ax tim_grd
can grid tim_grd
can axis tim_ax
can data longax.dat
 
!-> REPEAT: K=4
! cancel axis axname
! Defining lots of irregular axes, used up coordinate storage.
! Now coordinage storage is recovered; also have the option to cancel axis/all
 
set data/skip=4/ez/col=2/var="cnt,tim" longax.dat
def axis/from_data/t/units=days tim_ax=tim
def grid/t=tim_ax tim_grd
can grid tim_grd
can axis tim_ax
can data longax.dat
 
!-> REPEAT: K=5
! cancel axis axname
! Defining lots of irregular axes, used up coordinate storage.
! Now coordinage storage is recovered; also have the option to cancel axis/all
 
set data/skip=4/ez/col=2/var="cnt,tim" longax.dat
def axis/from_data/t/units=days tim_ax=tim
def grid/t=tim_ax tim_grd
can grid tim_grd
can axis tim_ax
can data longax.dat
 
!-> REPEAT: K=6
! cancel axis axname
! Defining lots of irregular axes, used up coordinate storage.
! Now coordinage storage is recovered; also have the option to cancel axis/all
 
set data/skip=4/ez/col=2/var="cnt,tim" longax.dat
def axis/from_data/t/units=days tim_ax=tim
def grid/t=tim_ax tim_grd
can grid tim_grd
can axis tim_ax
can data longax.dat
 
!-> REPEAT: K=7
! cancel axis axname
! Defining lots of irregular axes, used up coordinate storage.
! Now coordinage storage is recovered; also have the option to cancel axis/all
 
set data/skip=4/ez/col=2/var="cnt,tim" longax.dat
def axis/from_data/t/units=days tim_ax=tim
def grid/t=tim_ax tim_grd
can grid tim_grd
can axis tim_ax
can data longax.dat
 
!-> REPEAT: K=8
! cancel axis axname
! Defining lots of irregular axes, used up coordinate storage.
! Now coordinage storage is recovered; also have the option to cancel axis/all
 
set data/skip=4/ez/col=2/var="cnt,tim" longax.dat
def axis/from_data/t/units=days tim_ax=tim
def grid/t=tim_ax tim_grd
can grid tim_grd
can axis tim_ax
can data longax.dat
 
!-> REPEAT: K=9
! cancel axis axname
! Defining lots of irregular axes, used up coordinate storage.
! Now coordinage storage is recovered; also have the option to cancel axis/all
 
set data/skip=4/ez/col=2/var="cnt,tim" longax.dat
def axis/from_data/t/units=days tim_ax=tim
def grid/t=tim_ax tim_grd
can grid tim_grd
can axis tim_ax
can data longax.dat
 
!-> REPEAT: K=10
! cancel axis axname
! Defining lots of irregular axes, used up coordinate storage.
! Now coordinage storage is recovered; also have the option to cancel axis/all
 
set data/skip=4/ez/col=2/var="cnt,tim" longax.dat
def axis/from_data/t/units=days tim_ax=tim
def grid/t=tim_ax tim_grd
can grid tim_grd
can axis tim_ax
can data longax.dat
 
 
 go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
! longax cancel axis/all
 
! Note: cancel axes/all tested in err541_cancel_axes.jnl
!     Here, it causes huge output because previous benchmarks
!     leave lots of grids defined.
! repeat/k=1:10 (go bn_cancel_axes_2.sub; cancel grid tim_grd; cancel axis/all)
 
! test remaining axes are intact when we cancel one.
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
define axis/x ax1={2,4,5,6,9}
define axis/x ax2={30,60,90,100}
sh axis/x ax2
 name       axis              # pts   start                end
 AX2       X                    4 i   30                   100
   Axis span (to cell edges) = 90
 
       I     X                       XBOX          XBOXLO
       1>  30                        30         15
       2>  60                        30         45
       3>  90                        20         75
       4>  100                       10         95
can axis ax1
sh axis/x ax2
 name       axis              # pts   start                end
 AX2       X                    4 i   30                   100
   Axis span (to cell edges) = 90
 
       I     X                       XBOX          XBOXLO
       1>  30                        30         15
       2>  60                        30         45
       3>  90                        20         75
       4>  100                       10         95
 
! Test interaction with irreg axes from datasets
 
use test_axes
cancel data test_axes
sh axis/t test_irreg
 name       axis              # pts   start                end
 TEST_IRREG TIME               12mi   16-JAN 12:00         15-DEC 17:49
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  16-JAN 12:00:00           31         01-JAN 00:00:00             15.5
       2>  15-FEB 02:54:36           28.2425    01-FEB 00:00:00             45.12125
       3>  15-MAR 17:49:12           31         29-FEB 05:49:12             74.7425
       4>  15-APR 05:49:12           30         31-MAR 05:49:12             105.2425
       5>  15-MAY 17:49:12           31         30-APR 05:49:12             135.7425
       6>  15-JUN 05:49:12           30         31-MAY 05:49:12             166.2425
       7>  15-JUL 17:49:12           31         30-JUN 05:49:12             196.7425
       8>  15-AUG 17:49:12           31         31-JUL 05:49:12             227.7425
       9>  15-SEP 05:49:12           30         31-AUG 05:49:12             258.2425
      10>  15-OCT 17:49:12           31         30-SEP 05:49:12             288.7425
      11>  15-NOV 05:49:12           30         31-OCT 05:49:12             319.2425
      12>  15-DEC 17:49:12           31         30-NOV 05:49:12             349.7425
 
def axis/x ax1 = {1, 3, 4, 5, 9}
can axis ax1
sh axis/t test_irreg
 name       axis              # pts   start                end
 TEST_IRREG TIME               12mi   16-JAN 12:00         15-DEC 17:49
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  16-JAN 12:00:00           31         01-JAN 00:00:00             15.5
       2>  15-FEB 02:54:36           28.2425    01-FEB 00:00:00             45.12125
       3>  15-MAR 17:49:12           31         29-FEB 05:49:12             74.7425
       4>  15-APR 05:49:12           30         31-MAR 05:49:12             105.2425
       5>  15-MAY 17:49:12           31         30-APR 05:49:12             135.7425
       6>  15-JUN 05:49:12           30         31-MAY 05:49:12             166.2425
       7>  15-JUL 17:49:12           31         30-JUN 05:49:12             196.7425
       8>  15-AUG 17:49:12           31         31-JUL 05:49:12             227.7425
       9>  15-SEP 05:49:12           30         31-AUG 05:49:12             258.2425
      10>  15-OCT 17:49:12           31         30-SEP 05:49:12             288.7425
      11>  15-NOV 05:49:12           30         31-OCT 05:49:12             319.2425
      12>  15-DEC 17:49:12           31         30-NOV 05:49:12             349.7425
 
cancel axis test_irreg
 
def axis/x ax1 = {1, 3, 4, 5, 9}
sh axis/x ax1
 name       axis              # pts   start                end
 AX1       X                    5 i   1                    9
   Axis span (to cell edges) = 11
 
       I     X                       XBOX          XBOXLO
       1>  1                         2          0
       2>  3                         1.5        2
       3>  4                         1          3.5
       4>  5                         2.5        4.5
       5>  9                         4          7
can axis ax1
 
sh axis/t test_irreg
 name       axis              # pts   start                end
sh axis/t test_seas
 name       axis              # pts   start                end
 TEST_SEAS TIME                 4mr   15-FEB 15:43         15-NOV 14:05
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 8765.82 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (HOURS)
       1>  15-FEB 15:43:39           2191.455   01-JAN 00:00:00            1095.727
       2>  16-MAY 23:10:57           2191.455   01-APR 07:27:18            3287.182
       3>  16-AUG 06:38:15           2191.455   01-JUL 14:54:36            5478.637
       4>  15-NOV 14:05:33           2191.455   30-SEP 22:21:54            7670.092
 
! test reading space delimited values - trac #2549
columns/skip=3/var="v1,v2"/typ="num,num" longax.dat
list/clobber/file=longaxspace.dat/norow/nohead v1, v2
let nrecs = `v1,return=isize`
 !-> DEFINE VARIABLE nrecs = 20500
can data/all
define axis/x=1:`nrecs`:1 xax
 !-> define axis/x=1:20500:1 xax
define grid/x=xax xgrid
columns/grid=xgrid/delim="\b"/var="v1,v2"/typ="num,num" longaxspace.dat
! this used to cause a crash (due to improper memory advancing to skip spaces)
load v1
 
*** Running ferret script: bn542_bug_fixes.jnl
! bn542_bug_fixes.jnl
! test various fixes that went into version 5.42
! 10/02 *acm*
!
 
! Interior tics disappear on FILL plots
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err541_fill_tics
! pplus tics bug - pre 5.42, fill plots overlaid interior tics.
 
use coads_climatology
ppl tics 0.,.35,0.,.35,0,0
 
set view upper
shade/l=1/x=150e:110w/y=40s:40n sst
 
set view lower
fill/l=1/x=150e:110w/y=40s:40n sst
 
ppl tics,,.25,,.25,-1,-1
 
! non-Gregorian axes not properly defined when time steps
! are used rather than date specifications
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err541_non_gregorian
!From Andrew Wittenberg, non-Gregorian time axis bug 01 Oct 2002
! pre-542, second axis has just one point.
 
def ax/cal=Gregorian/t=.5:11.5:1/unit=month/t0=1-jan-1980 tax1
show ax tax2
 name       axis              # pts   start                end
 
def ax/cal=Julian/t=.5:11.5:1/unit=month/t0=1-jan-1980 tax2
show ax tax2
 name       axis              # pts   start                end
 TAX2      TIME                12 r   16-JAN-1980 05:15    16-DEC-1980 00:45
T0 = 1-JAN-1980
CALENDAR = JULIAN
   Axis span (to cell edges) = 12
 
! For comparison, use the dates that start and end tax2
def ax/cal=Julian/t="16-jan-1980:05:15":"16-dec-1980:00:45":1/unit=month/t0=1-jan-1980 tax3
show ax tax3
 name       axis              # pts   start                end
 TAX3      TIME                12 r   16-JAN-1980 05:15    16-DEC-1980 00:45
T0 = 1-JAN-1980
CALENDAR = JULIAN
   Axis span (to cell edges) = 12
 
 
! Could not write or read a NetCDF file with a 4-D string variable.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err541_string4d
 ! Write a 4-D NetCDF file with a string variable.
 
sp rm -f string4d.nc
 
def axis/x=1:2:1 x2ax
def axis/y=1:3:1 y3ax
def axis/z=1:4:1 z4ax
def axis/t=1:2:1 t2ax
 
let a = {"alpha","a2","a3","a4","a5","a6","a7","a8","a9","a10",\
"bravo","b2","b3","b4","b5","b6","b7","b8","b9","b10",\
"c1","c2","c3","c4","c5","c6","c7","c8","c9","c10",\
"d1","d2","d3","d4","d5","d6","d7","d8","d9","d10",\
"echo","e2","e3","e4","e5","e6","e7","e8"}
 
let rvar = x[gx=x2ax] + y[gy=y3ax] + z[gz=z4ax] + t[gt=t2ax]
stat rvar
 
             X[GX=X2AX] + Y[GY=Y3AX] + Z[GZ=Z4AX] + T[GT=T2AX]
             X: 0.5 to 2.5
             Y: 0.5 to 3.5
             Z: 0.5 to 4.5
             T: 0.5 to 2.5
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 48 (2*3*4*2*1*1)
 # flagged as bad  data: 0
 Minimum value: 4
 Maximum value: 11
 Mean    value: 7.5 (unweighted average)
 Standard deviation: 1.571
 
let axy = reshape (a,rvar)
!list axy
stat axy
 
             RESHAPE (A,RVAR)
             X: 0.5 to 2.5
             Y: 0.5 to 3.5
             Z: 0.5 to 4.5
             T: 0.5 to 2.5
             E:  N/A
             F:  N/A
             DATA SET: N/A
 Total # of strings: 48 (2*3*4*2*1*1)
 Maximum string length: 5
save/clobber/file=string4d.nc axy
 
can var/all
can data/all
use string4d.nc
sh data
     currently SET data sets:
    1> ./string4d.nc  (default)
 name     title                             I         J         K         L
 AXY      RESHAPE (A,RVAR)                 1:2       1:3       1:4       1:2
 
list axy
             VARIABLE : RESHAPE (A,RVAR)
             FILENAME : string4d.nc
             SUBSET   : 2 by 3 by 4 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:"alpha""a2"   
 2   / 2:"a3"   "a4"   
 3   / 3:"a5"   "a6"   
 ---- K:2 Z:   2
 1   / 1:"a7"   "a8"   
 2   / 2:"a9"   "a10"  
 3   / 3:"bravo""b2"   
 ---- K:3 Z:   3
 1   / 1:"b3"   "b4"   
 2   / 2:"b5"   "b6"   
 3   / 3:"b7"   "b8"   
 ---- K:4 Z:   4
 1   / 1:"b9"   "b10"  
 2   / 2:"c1"   "c2"   
 3   / 3:"c3"   "c4"   
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:"c5"   "c6"   
 2   / 2:"c7"   "c8"   
 3   / 3:"c9"   "c10"  
 ---- K:2 Z:   2
 1   / 1:"d1"   "d2"   
 2   / 2:"d3"   "d4"   
 3   / 3:"d5"   "d6"   
 ---- K:3 Z:   3
 1   / 1:"d7"   "d8"   
 2   / 2:"d9"   "d10"  
 3   / 3:"echo" "e2"   
 ---- K:4 Z:   4
 1   / 1:"e3"   "e4"   
 2   / 2:"e5"   "e6"   
 3   / 3:"e7"   "e8"   
 
 
! Cancel axis/all did not check whether axes were in use
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err541_cancel_axes
! Check that an axis in use cannot be cancelled.
! 4/2013 changes for Ferret with climatological axes
!        defined internally. Use a different datset for this test
 
use test_axes
cancel data test_axes
 
let tt = t[gt=test_irreg] + 50*x[i=1:10]
load tt
 
show axis test_i*
 name       axis              # pts   start                end
 TEST_IRREG TIME               12mi   16-JAN 12:00         15-DEC 17:49
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
cancel axis test_irreg
 
show axis test_i*
 name       axis              # pts   start                end
 TEST_IRREG TIME               12mi   16-JAN 12:00         15-DEC 17:49
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 
! Pre V5.42, this causes a crash: axes were cancelled, but not fully.
cancel axis/all
show axis test_i*
 name       axis              # pts   start                end
 TEST_IRREG TIME               12mi   16-JAN 12:00         15-DEC 17:49
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 
cancel var tt
cancel axis/all
 
show axis test_i*
 name       axis              # pts   start                end
 
 
 
! Make sure delimited reads are processing dates correctly
! *kob*
! 5/4/05 *acm* Move to bn_ef_err541_date_delim; pulling all jnls that call shared-obj efs out
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
! GO err541_date_delim
 
*** Running ferret script: bn_subspan_modulo.jnl
! bn_subspan_modulo.jnl
! *sh* 11/02
 
! a subspan modulo axis is one which is modulo, but the wrapping length
! exceeds the span of the axis.  Ferret generates a phantom "void point"
! in order to bring the axis length equal to the modulo length.  The void
! point is automatically filled with a missing value (psuedo-vars excluded)
 
! test defining of subspan modulo axes
! any longitude axis less than 360 degrees
define axis/x=130e:80w:10 xsub ! yes
GO bn_subspan_modulo.sub1 X
Axis as created:
 name       axis              # pts   start                end
 XSUB      LONGITUDE           16mr   130E                 80W
   Axis span (to cell edges) = 160 (modulo length = 360)
Axis as inferred from netCDF file:
 name       axis              # pts   start                end
 XSUB      LONGITUDE           16mr   130E                 80W
   Axis span (to cell edges) = 160 (modulo length = 360)
define axis/x=-180:179:1/units=longitude/edges xsub ! yes
GO bn_subspan_modulo.sub1 X
Axis as created:
 name       axis              # pts   start                end
 XSUB      LONGITUDE          359mr   179.5W(-179.5)       178.5E
   Axis span (to cell edges) = 359 (modulo length = 360)
Axis as inferred from netCDF file:
 name       axis              # pts   start                end
 XSUB      LONGITUDE          359mr   179.5W(-179.5)       178.5E
   Axis span (to cell edges) = 359 (modulo length = 360)
define axis/x=-180:181:1/units=longitude/edges xsub ! no
GO bn_subspan_modulo.sub1 X
Axis as created:
 name       axis              # pts   start                end
 XSUB      LONGITUDE          361 r   179.5W(-179.5)       179.5W
   Axis span (to cell edges) = 361
Axis as inferred from netCDF file:
 name       axis              # pts   start                end
 XSUB      LONGITUDE          361 r   179.5W(-179.5)       179.5W
   Axis span (to cell edges) = 361
 
! not allowed for axis length to exceed modulo length
set mode ignore
  define axis/x=130e:500:10/modulo=360 xsub
canc mode ignore
 
! automatic detection of climatologies
def ax/t=1-jan-0000:1-apr-0000/np=3 tsub ! yes
GO bn_subspan_modulo.sub1 T
Axis as created:
 name       axis              # pts   start                end
 TSUB      TIME                 3mr   01-JAN 00:00         01-APR 00:00
T0 = 01-JAN-0000
   Axis span (to cell edges) = 3276 (modulo length = 8765.82)
Axis as inferred from netCDF file:
 name       axis              # pts   start                end
 TSUB      TIME                 3mr   01-JAN 00:00         01-APR 00:00
T0 = 01-JAN-0000
   Axis span (to cell edges) = 3276 (modulo length = 8765.82)
def ax/t=1-jan-0000:1-apr-0000/np=3/edge/units=days tsub ! yes
GO bn_subspan_modulo.sub1 T
Axis as created:
 name       axis              # pts   start                end
 TSUB      TIME                 3mr   16-JAN 04:00         16-MAR 20:00
T0 = 01-JAN-0000
   Axis span (to cell edges) = 91 (modulo length = 365.2425)
Axis as inferred from netCDF file:
 name       axis              # pts   start                end
 TSUB      TIME                 3mr   16-JAN 04:00         16-MAR 19:59
T0 = 01-JAN-0000
   Axis span (to cell edges) = 91 (modulo length = 365.2425)
def ax/t=1-aug-0000:1-aug-0001/np=3/edge/units=days tsub ! yes
GO bn_subspan_modulo.sub1 T
Axis as created:
 name       axis              # pts   start                end
 TSUB      TIME                 3mr   30-SEP 20:00         01-JUN 04:00
T0 = 01-JAN-0000
   Axis span (to cell edges) = 365 (modulo length = 365.2425)
Axis as inferred from netCDF file:
 name       axis              # pts   start                end
 TSUB      TIME                 3mr   30-SEP 19:59         01-JUN 04:00
T0 = 01-JAN-0000
   Axis span (to cell edges) = 365 (modulo length = 365.2425)
def ax/t=31-dec-0000:1-may-0001/np=3/units=days tsub ! yes
GO bn_subspan_modulo.sub1 T
Axis as created:
 name       axis              # pts   start                end
 TSUB      TIME                 3mr   31-DEC 00:00         01-MAY 00:00
T0 = 01-JAN-0000
   Axis span (to cell edges) = 181.5 (modulo length = 365.2425)
Axis as inferred from netCDF file:
 name       axis              # pts   start                end
 TSUB      TIME                 3mr   31-DEC 00:00         01-MAY 00:00
T0 = 01-JAN-0000
   Axis span (to cell edges) = 181.5 (modulo length = 365.2425)
! the following start in year 0001
def ax/t=31-dec-0000:1-may-0001/np=3/edges/units=days tsub ! no
GO bn_subspan_modulo.sub1 T
Axis as created:
 name       axis              # pts   start                end
 TSUB      TIME                 3 r   20-JAN-0001 04:00    10-APR-0001 20:00
T0 = 01-JAN-0000
   Axis span (to cell edges) = 121
Axis as inferred from netCDF file:
 name       axis              # pts   start                end
 TSUB      TIME                 3mr   20-JAN 04:00         10-APR 19:59
T0 = 01-JAN-0000
   Axis span (to cell edges) = 121 (modulo length = 365.2425)
def ax/t=1-jan-0001:1-sep-0001/np=3/units=days tsub ! no
GO bn_subspan_modulo.sub1 T
Axis as created:
 name       axis              # pts   start                end
 TSUB      TIME                 3 r   01-JAN-0001 00:00    01-SEP-0001 00:00
T0 = 01-JAN-0000
   Axis span (to cell edges) = 364.5
Axis as inferred from netCDF file:
 name       axis              # pts   start                end
 TSUB      TIME                 3mr   01-JAN 00:00         01-SEP 00:00
T0 = 01-JAN-0000
   Axis span (to cell edges) = 364.5 (modulo length = 365.2425)
! the following is too long to be a climatological axis
def ax/t=29-dec-0000:31-dec-0001/np=3/units=days tsub ! no
GO bn_subspan_modulo.sub1 T
Axis as created:
 name       axis              # pts   start                end
 TSUB      TIME                 3 r   29-DEC-0000 00:00    31-DEC-0001 00:00
T0 = 01-JAN-0000
   Axis span (to cell edges) = 550.5
Axis as inferred from netCDF file:
 name       axis              # pts   start                end
 TSUB      TIME                 3 r   29-DEC-0000 00:00    31-DEC-0001 00:00
T0 = 01-JAN-0000
   Axis span (to cell edges) = 550.5
 
 
! now test Ferret handling of the axes
! make a test file with a subspan modulo variable
! (need to postpone setting /modulo=100 cuz pseudo-vars have value on void pt)
sp rm -f test_subspan_modulo.nc
define axis/x=41:46:1/modulo=100 xax_subspan
 
! almost identical irregular axis
define axis/x/modulo=100 Xirreg_subspan = {41,42,42.1,44,45,46}
set axis/modulo=100 Xirreg_subspan
 
let vreg = X[gx=xax_subspan] -40 + 10
let virr = X[gx=Xirreg_subspan] -40 + 10
save/file=test_subspan_modulo.nc vreg, virr
 
! noisy field to test smoothing
let noise = 0.2 * RANDN(0*vreg+1)
let vreg_ragged = vreg + noise
let virr_ragged = virr + noise[g=virr@asn]
save/file=test_subspan_modulo.nc/append vreg_ragged, virr_ragged
 
! gappy field to test hole-filling
let vreg_void = if x[g=vreg] LT 43 OR x[g=vreg] GT 45 THEN vreg
let virr_void = if x[g=virr] LT 43 OR x[g=virr] GT 45 THEN virr
save/file=test_subspan_modulo.nc/append vreg_void, virr_void
save/file=test_subspan_modulo.nc/append vreg_void, virr_void
 
! now define two-dimensional variables -- modulo in time as well
define axis/t=0:150:30/edges/units=days/modulo=365.2485/t0=1-jan-0000 tax_subspan
define axis/T0=1-jan-0000/units=days/modulo=365.2485/edges Tirreg_subspan = {0,31,59.2485,90.2485,120.2485,150.2485}
let treg = TBOXLO[gt=tax_subspan]
let tirr = TBOXLO[gt=tirreg_subspan]
let v2d_reg = vreg + treg
let v2d_irr = virr + tirr
save/file=test_subspan_modulo.nc/append v2d_reg, v2d_irr
 
! 2d with voids
let treg_void =  if L[g=v2d_reg] NE 3 THEN treg
let tirr_void =  if L[g=v2d_irr] NE 3 THEN tirr
let v2d_reg_void = vreg_void + treg_void
let v2d_irr_void = virr_void + tirr_void
save/file=test_subspan_modulo.nc/append v2d_reg_void, v2d_irr_void
 
! string variable on subspan modulo axis
let my_strings = {"a1","a2","a3","a4","a5","a6"}
let vreg_strings = my_strings[gx=xax_subspan@asn]
let virr_strings = my_strings[gx=Xirreg_subspan@asn]
save/file=test_subspan_modulo.nc/append vreg_strings, virr_strings
 
canc var/all
use test_subspan_modulo.nc
 
go bn_subspan_modulo.sub2 vreg v2d_reg
! bn_subspan_modulo.sub
! *sh* 11/02
 
! subroutine for benchmark test bn_subspan_modulo.jnl
! call with
!	yes? GO bn_subspan_modulo.sub vreg   ! test regular axis
!	yes? GO bn_subspan_modulo.sub virr   ! test irregular axis
 
define alias lsx list/order=x
define alias lsxn list/order=x/nohead
 
! check the modulo behavior of the X and T axes
define symbox xaxname `$1,return=xaxis`
 !-> define symbox xaxname XAX_SUBSPAN
show axis/x=-60:141 ($XAXNAME)
 !-> show axis/x=-60:141 XAX_SUBSPAN
 name       axis              # pts   start                end
 XAX_SUBSPAN X                  6mr   41                   46
   Axis span (to cell edges) = 6 (modulo length = 100)
 
       I     X                       XBOX          XBOXLO
      -7>  -106.5                    94         -153.5
      -6>  -59                       1          -59.5
      -5>  -58                       1          -58.5
      -4>  -57                       1          -57.5
      -3>  -56                       1          -56.5
      -2>  -55                       1          -55.5
      -1>  -54                       1          -54.5
       0>  -6.5                      94         -53.5
       1>  41                        1          40.5
       2>  42                        1          41.5
       3>  43                        1          42.5
       4>  44                        1          43.5
       5>  45                        1          44.5
       6>  46                        1          45.5
       7>  93.5                      94         46.5
       8>  141                       1          140.5
show axis/x=-60:141:2 ($XAXNAME)
 !-> show axis/x=-60:141:2 XAX_SUBSPAN
 name       axis              # pts   start                end
 XAX_SUBSPAN X                  6mr   41                   46
   Axis span (to cell edges) = 6 (modulo length = 100)
 
       I     X                       XBOX          XBOXLO
      -7>  -106.5                    94         -153.5
      -5>  -58                       1          -58.5
      -3>  -56                       1          -56.5
      -1>  -54                       1          -54.5
       1>  41                        1          40.5
       3>  43                        1          42.5
       5>  45                        1          44.5
       7>  93.5                      94         46.5
show axis/x=-60:141:7 ($XAXNAME)
 !-> show axis/x=-60:141:7 XAX_SUBSPAN
 name       axis              # pts   start                end
 XAX_SUBSPAN X                  6mr   41                   46
   Axis span (to cell edges) = 6 (modulo length = 100)
 
       I     X                       XBOX          XBOXLO
      -7>  -106.5                    94         -153.5
       0>  -6.5                      94         -53.5
       7>  93.5                      94         46.5
 
define symbox taxname `$2,return=taxis`
 !-> define symbox taxname TAX_SUBSPAN1
show axis/l=3:10 ($TAXNAME)
 !-> show axis/l=3:10 TAX_SUBSPAN1
 name       axis              # pts   start                end
 TAX_SUBSPAN1 TIME              5mr   16-JAN 00:00         15-MAY 00:00
T0 = 01-JAN-0000
   Axis span (to cell edges) = 150 (modulo length = 365.2485)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       3>  16-MAR 00:00:00           30         01-MAR 00:00:00             75
       4>  15-APR 00:00:00           30         31-MAR 00:00:00             105
       5>  15-MAY 00:00:00           30         30-APR 00:00:00             135
       6>  14-SEP 14:58:55           215.2485   30-MAY 00:00:00             257.6242
       7>  15-JAN 05:57:50           30         31-DEC 05:57:50             380.2485
       8>  14-FEB 05:57:50           30         30-JAN 05:57:50             410.2485
       9>  16-MAR 05:57:50           30         01-MAR 05:57:50             440.2485
      10>  15-APR 05:57:50           30         31-MAR 05:57:50             470.2485
show axis/l=3:10:3 ($TAXNAME)
 !-> show axis/l=3:10:3 TAX_SUBSPAN1
 name       axis              # pts   start                end
 TAX_SUBSPAN1 TIME              5mr   16-JAN 00:00         15-MAY 00:00
T0 = 01-JAN-0000
   Axis span (to cell edges) = 150 (modulo length = 365.2485)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       3>  16-MAR 00:00:00           30         01-MAR 00:00:00             75
       6>  14-SEP 14:58:55           215.2485   30-MAY 00:00:00             257.6242
       9>  16-MAR 05:57:50           30         01-MAR 05:57:50             440.2485
show axis/l=3:10:6 ($TAXNAME)
 !-> show axis/l=3:10:6 TAX_SUBSPAN1
 name       axis              # pts   start                end
 TAX_SUBSPAN1 TIME              5mr   16-JAN 00:00         15-MAY 00:00
T0 = 01-JAN-0000
   Axis span (to cell edges) = 150 (modulo length = 365.2485)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       3>  16-MAR 00:00:00           30         01-MAR 00:00:00             75
       9>  16-MAR 05:57:50           30         01-MAR 05:57:50             440.2485
 
set mode diag
set mode stupid  ! always re-read and recompute
lsx $1  ! default avoids void points
 !-> list/order=x vreg
 dealloc  dynamic grid GFJ3            XAX_SUBSPANORMAL    NORMAL    TAX_SUBSPA
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GFJ1            XAX_SUBSPANORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   1 I:      1      6  J: -999 -999  K: -999 -999  L:   -999   -999
 reading VREG     M:  2 dset:   1 I:      1      6  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : X[GX=XAX_SUBSPAN] -40 + 10
             FILENAME : test_subspan_modulo.nc
             SUBSET   : 6 points (X)
           41     42     43     44     45     46    
            1      2      3      4      5      6
          11.00  12.00  13.00  14.00  15.00  16.00
lsxn/x=100 $1  ! void point above, alone (via "modulo-void-filling")
 !-> list/order=x/nohead/x=100 vreg
 strip limits reconciliation : EX#1
 strip modulo-void-filling EX#1 on X axis:        7        7 dset:   1
 eval    EX#1     C:  6 dset:   1 I:      6      6  J: -999 -999  K: -999 -999  L:   -999   -999
 reading VREG     M:  1 dset:   1 I:      6      6  J: -999 -999  K: -999 -999  L:   -999   -999
 doing modulo-void-filling VREG on X axis:        6        6 dset:   1
        ....
lsxn/x=0 $1 ! void point below, alone (via modulo)
 !-> list/order=x/nohead/x=0 vreg
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      0      0  J: -999 -999  K: -999 -999  L:   -999   -999
 strip moduloing VREG on X axis:        0        0 dset:   1
 reading VREG     M:  5 dset:   1 I:      6      6  J: -999 -999  K: -999 -999  L:   -999   -999
 doing moduloing VREG on X axis:        6        6 dset:   1
        ....
lsxn/x=45:100 $1  ! void above (via subspan-fill)
 !-> list/order=x/nohead/x=45:100 vreg
 strip limits reconciliation : EX#1
 strip modulo-void-filling EX#1 on X axis:        5        7 dset:   1
 eval    EX#1     C:  6 dset:   1 I:      5      6  J: -999 -999  K: -999 -999  L:   -999   -999
 reading VREG     M:  3 dset:   1 I:      5      6  J: -999 -999  K: -999 -999  L:   -999   -999
 doing modulo-void-filling VREG on X axis:        5        6 dset:   1
          15.00  16.00   ....
lsxn/x=0:100 $1  ! voids above & below (via modulo)
 !-> list/order=x/nohead/x=0:100 vreg
 strip limits reconciliation : EX#1
 strip modulo-void-filling EX#1 on X axis:        0        7 dset:   1
 eval    EX#1     C:  6 dset:   1 I:      0      6  J: -999 -999  K: -999 -999  L:   -999   -999
 strip moduloing VREG on X axis:        0        6 dset:   1
 reading VREG     M:  8 dset:   1 I:      1      6  J: -999 -999  K: -999 -999  L:   -999   -999
 doing moduloing VREG on X axis:        1        6 dset:   1
 doing modulo-void-filling VREG on X axis:        0        6 dset:   1
           ....  11.00  12.00  13.00  14.00  15.00  16.00   ....
set mode/last diag
lsxn/x=50:160 $1  ! modulo above
 !-> list/order=x/nohead/x=50:160 vreg
           ....  11.00  12.00  13.00  14.00  15.00  16.00   ....
lsxn/x=-100:40 $1 ! modulo below
 !-> list/order=x/nohead/x=-100:40 vreg
           ....  11.00  12.00  13.00  14.00  15.00  16.00   ....
lsxn/x=-100:160 $1  ! modulo above & below
 !-> list/order=x/nohead/x=-100:160 vreg
      ... listing every   2th point
       .   ....  12.00  14.00  16.00  11.00  13.00  15.00   ....  12.00  14.00  16.00
 
! end point testing
lsxn/i=-8:-2 $1
 !-> list/order=x/nohead/i=-8:-2 vreg
          16.00   ....  11.00  12.00  13.00  14.00  15.00
lsxn/i=-7:-2 $1
 !-> list/order=x/nohead/i=-7:-2 vreg
           ....  11.00  12.00  13.00  14.00  15.00
lsxn/i=-6:-2 $1
 !-> list/order=x/nohead/i=-6:-2 vreg
          11.00  12.00  13.00  14.00  15.00
lsxn/i=17:20 $1
 !-> list/order=x/nohead/i=17:20 vreg
          13.00  14.00  15.00  16.00
lsxn/i=17:21 $1
 !-> list/order=x/nohead/i=17:21 vreg
          13.00  14.00  15.00  16.00   ....
lsxn/i=17:22 $1
 !-> list/order=x/nohead/i=17:22 vreg
          13.00  14.00  15.00  16.00   ....  11.00
set mode/last stupid
 
! test smoothers - pos and neg modulo and combined mod and context edges
lsx/x=500:600 $1_ragged
 !-> list/order=x/x=500:600 vreg_ragged
             VARIABLE : VREG + NOISE
             FILENAME : test_subspan_modulo.nc
             SUBSET   : 8 points (X)
           493.5  541    542    543    544    545    546    593.5 
           35     36     37     38     39     40     41     42
           ....  10.95  12.06  12.94  14.24  14.94  15.99   ....
lsxn/x=500:600 $1_ragged[x=@sbx]
 !-> list/order=x/nohead/x=500:600 vreg_ragged[x=@sbx]
           ....   ....  11.98  13.08  14.04  15.06   ....   ....
lsxn/x=500:545 $1_ragged[x=@sbx]
 !-> list/order=x/nohead/x=500:545 vreg_ragged[x=@sbx]
           ....   ....  11.98  13.08  14.04  15.06
lsxn/x=545:600 $1_ragged[x=@sbx]
 !-> list/order=x/nohead/x=545:600 vreg_ragged[x=@sbx]
          15.06   ....   ....
 
lsxn/x=-100:0 $1_ragged
 !-> list/order=x/nohead/x=-100:0 vreg_ragged
           ....  10.95  12.06  12.94  14.24  14.94  15.99   ....
lsxn/x=-100:0    $1_ragged[x=@sbx]
 !-> list/order=x/nohead/x=-100:0    vreg_ragged[x=@sbx]
           ....   ....  11.98  13.08  14.04  15.06   ....   ....
lsxn/x=-100:-55  $1_ragged[x=@sbx]
 !-> list/order=x/nohead/x=-100:-55  vreg_ragged[x=@sbx]
           ....   ....  11.98  13.08  14.04  15.06
lsxn/x=-56:0     $1_ragged[x=@sbx]
 !-> list/order=x/nohead/x=-56:0     vreg_ragged[x=@sbx]
          14.04  15.06   ....   ....
 
lsxn/x=-100:142/wid=200 $1_ragged
 !-> list/order=x/nohead/x=-100:142/wid=200 vreg_ragged
           ....  10.95  12.06  12.94  14.24  14.94  15.99   ....  10.95  12.06  12.94  14.24  14.94  15.99   ....  10.95  12.06
lsxn/x=-100:142/wid=200 $1_ragged[x=@sbx:3]
 !-> list/order=x/nohead/x=-100:142/wid=200 vreg_ragged[x=@sbx:3]
           ....   ....  11.98  13.08  14.04  15.06   ....   ....   ....  11.98  13.08  14.04  15.06   ....   ....   ....  11.98
lsxn/x=-100:142/wid=200 $1_ragged[x=@swl:5]
 !-> list/order=x/nohead/x=-100:142/wid=200 vreg_ragged[x=@swl:5]
           ....   ....   ....  13.04  14.04   ....   ....   ....   ....   ....  13.04  14.04   ....   ....   ....   ....   ....
lsxn/x=-100:142/wid=200 $1_ragged[x=@swl:35]
 !-> list/order=x/nohead/x=-100:142/wid=200 vreg_ragged[x=@swl:35]
        ....................................................................
 
! test fillers - pos and neg modulo and combined mod and context edges
! @FAV
lsx/x=500:600 $1_void
 !-> list/order=x/x=500:600 vreg_void
             VARIABLE : IF X[G=VREG] LT 43 OR X[G=VREG] GT 45 THEN VREG
             FILENAME : test_subspan_modulo.nc
             SUBSET   : 8 points (X)
           493.5  541    542    543    544    545    546    593.5 
           35     36     37     38     39     40     41     42
           ....  11.00  12.00   ....   ....   ....  16.00   ....
lsxn/x=500:600 $1_void[x=@fav]
 !-> list/order=x/nohead/x=500:600 vreg_void[x=@fav]
           ....  11.00  12.00  12.00   ....  16.00  16.00   ....
 
lsxn/x=-100:0    $1_void
 !-> list/order=x/nohead/x=-100:0    vreg_void
           ....  11.00  12.00   ....   ....   ....  16.00   ....
lsxn/x=-100:0    $1_void[x=@fav]
 !-> list/order=x/nohead/x=-100:0    vreg_void[x=@fav]
           ....  11.00  12.00  12.00   ....  16.00  16.00   ....
 
lsxn/x=-100:142/wid=200 $1_void
 !-> list/order=x/nohead/x=-100:142/wid=200 vreg_void
           ....  11.00  12.00   ....   ....   ....  16.00   ....  11.00  12.00   ....   ....   ....  16.00   ....  11.00  12.00
lsxn/x=-100:142/wid=200 $1_void[x=@fav:3]
 !-> list/order=x/nohead/x=-100:142/wid=200 vreg_void[x=@fav:3]
           ....  11.00  12.00  12.00   ....  16.00  16.00   ....  11.00  12.00  12.00   ....  16.00  16.00   ....  11.00  12.00
lsxn/x=-100:142/wid=200 $1_void[x=@fav:5]
 !-> list/order=x/nohead/x=-100:142/wid=200 vreg_void[x=@fav:5]
           ....  11.00  12.00  11.50  14.00  16.00  16.00   ....  11.00  12.00  11.50  14.00  16.00  16.00   ....  11.00  12.00
lsxn/x=-100:142/wid=200 $1_void[x=@fav:35]
 !-> list/order=x/nohead/x=-100:142/wid=200 vreg_void[x=@fav:35]
           ....  11.00  12.00  13.00  13.00  13.00  16.00   ....  11.00  12.00  13.00  13.00  13.00  16.00   ....  11.00  12.00
 
! @FLN
lsxn/x=500:600 $1_void
 !-> list/order=x/nohead/x=500:600 vreg_void
           ....  11.00  12.00   ....   ....   ....  16.00   ....
lsxn/x=500:600 $1_void[x=@fln]
 !-> list/order=x/nohead/x=500:600 vreg_void[x=@fln]
           ....  11.00  12.00  13.00  14.00  15.00  16.00   ....
 
lsxn/x=-100:0    $1_void
 !-> list/order=x/nohead/x=-100:0    vreg_void
           ....  11.00  12.00   ....   ....   ....  16.00   ....
lsxn/x=-100:0    $1_void[x=@fln]
 !-> list/order=x/nohead/x=-100:0    vreg_void[x=@fln]
           ....  11.00  12.00  13.00  14.00  15.00  16.00   ....
 
lsxn/x=-100:142/wid=200 $1_void
 !-> list/order=x/nohead/x=-100:142/wid=200 vreg_void
           ....  11.00  12.00   ....   ....   ....  16.00   ....  11.00  12.00   ....   ....   ....  16.00   ....  11.00  12.00
lsxn/x=-100:142/wid=200 $1_void[x=@fln:35]
 !-> list/order=x/nohead/x=-100:142/wid=200 vreg_void[x=@fln:35]
           ....  11.00  12.00  13.00  14.00  15.00  16.00   ....  11.00  12.00  13.00  14.00  15.00  16.00   ....  11.00  12.00
 
! @FNR
lsxn/x=500:600 $1_void
 !-> list/order=x/nohead/x=500:600 vreg_void
           ....  11.00  12.00   ....   ....   ....  16.00   ....
lsxn/x=500:600 $1_void[x=@fnr]
 !-> list/order=x/nohead/x=500:600 vreg_void[x=@fnr]
           ....  11.00  12.00  12.00  14.00  16.00  16.00   ....
 
lsxn/x=-100:0    $1_void
 !-> list/order=x/nohead/x=-100:0    vreg_void
           ....  11.00  12.00   ....   ....   ....  16.00   ....
lsxn/x=-100:0    $1_void[x=@fnr]
 !-> list/order=x/nohead/x=-100:0    vreg_void[x=@fnr]
           ....  11.00  12.00  12.00  14.00  16.00  16.00   ....
 
lsxn/x=-100:142/wid=200 $1_void
 !-> list/order=x/nohead/x=-100:142/wid=200 vreg_void
           ....  11.00  12.00   ....   ....   ....  16.00   ....  11.00  12.00   ....   ....   ....  16.00   ....  11.00  12.00
lsxn/x=-100:142/wid=200 $1_void[x=@fnr:35]
 !-> list/order=x/nohead/x=-100:142/wid=200 vreg_void[x=@fnr:35]
           ....  11.00  12.00  12.00  14.00  16.00  16.00   ....  11.00  12.00  12.00  14.00  16.00  16.00   ....  11.00  12.00
 
! Test 2-axis modulo (longitude and time)
define alias l200 list/width=200
define alias l200n list/width=200/nohead
l200/i=1:13 $2
 !-> list/width=200/nohead/i=1:13 v2d_reg
 16-JAN      / 1:   11.0   12.0   13.0   14.0   15.0   16.0   ....   11.0   12.0   13.0   14.0   15.0   16.0
 15-FEB      / 2:   41.0   42.0   43.0   44.0   45.0   46.0   ....   41.0   42.0   43.0   44.0   45.0   46.0
 16-MAR      / 3:   71.0   72.0   73.0   74.0   75.0   76.0   ....   71.0   72.0   73.0   74.0   75.0   76.0
 15-APR      / 4:  101.0  102.0  103.0  104.0  105.0  106.0   ....  101.0  102.0  103.0  104.0  105.0  106.0
 15-MAY      / 5:  131.0  132.0  133.0  134.0  135.0  136.0   ....  131.0  132.0  133.0  134.0  135.0  136.0
l200n/l=1:12 $2
 !-> list/width=200/nohead/l=1:12 v2d_reg
 16-JAN      /  1:   11.0   12.0   13.0   14.0   15.0   16.0
 15-FEB      /  2:   41.0   42.0   43.0   44.0   45.0   46.0
 16-MAR      /  3:   71.0   72.0   73.0   74.0   75.0   76.0
 15-APR      /  4:  101.0  102.0  103.0  104.0  105.0  106.0
 15-MAY      /  5:  131.0  132.0  133.0  134.0  135.0  136.0
 14-SEP      /  6:   ....   ....   ....   ....   ....   ....
 15-JAN      /  7:   11.0   12.0   13.0   14.0   15.0   16.0
 14-FEB      /  8:   41.0   42.0   43.0   44.0   45.0   46.0
 16-MAR      /  9:   71.0   72.0   73.0   74.0   75.0   76.0
 15-APR      / 10:  101.0  102.0  103.0  104.0  105.0  106.0
 15-MAY      / 11:  131.0  132.0  133.0  134.0  135.0  136.0
 14-SEP      / 12:   ....   ....   ....   ....   ....   ....
l200n/l=1:12/i=1:11 $2
 !-> list/width=200/nohead/l=1:12/i=1:11 v2d_reg
 16-JAN      /  1:   11.0   12.0   13.0   14.0   15.0   16.0   ....   11.0   12.0   13.0   14.0
 15-FEB      /  2:   41.0   42.0   43.0   44.0   45.0   46.0   ....   41.0   42.0   43.0   44.0
 16-MAR      /  3:   71.0   72.0   73.0   74.0   75.0   76.0   ....   71.0   72.0   73.0   74.0
 15-APR      /  4:  101.0  102.0  103.0  104.0  105.0  106.0   ....  101.0  102.0  103.0  104.0
 15-MAY      /  5:  131.0  132.0  133.0  134.0  135.0  136.0   ....  131.0  132.0  133.0  134.0
 14-SEP      /  6:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 15-JAN      /  7:   11.0   12.0   13.0   14.0   15.0   16.0   ....   11.0   12.0   13.0   14.0
 14-FEB      /  8:   41.0   42.0   43.0   44.0   45.0   46.0   ....   41.0   42.0   43.0   44.0
 16-MAR      /  9:   71.0   72.0   73.0   74.0   75.0   76.0   ....   71.0   72.0   73.0   74.0
 15-APR      / 10:  101.0  102.0  103.0  104.0  105.0  106.0   ....  101.0  102.0  103.0  104.0
 15-MAY      / 11:  131.0  132.0  133.0  134.0  135.0  136.0   ....  131.0  132.0  133.0  134.0
 14-SEP      / 12:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
! list outside the native range with /L=1:21. Date listings show years beyond 0002
l200n/l=12:21/i=-19:-9 $2
 !-> list/width=200/nohead/l=12:21/i=-19:-9 v2d_reg
 14-SEP      / 12:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 15-JAN      / 13:   12.0   13.0   14.0   15.0   16.0   ....   11.0   12.0   13.0   14.0   15.0
 14-FEB      / 14:   42.0   43.0   44.0   45.0   46.0   ....   41.0   42.0   43.0   44.0   45.0
 16-MAR      / 15:   72.0   73.0   74.0   75.0   76.0   ....   71.0   72.0   73.0   74.0   75.0
 15-APR      / 16:  102.0  103.0  104.0  105.0  106.0   ....  101.0  102.0  103.0  104.0  105.0
 15-MAY      / 17:  132.0  133.0  134.0  135.0  136.0   ....  131.0  132.0  133.0  134.0  135.0
 15-SEP      / 18:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 15-JAN-0003 / 19:   12.0   13.0   14.0   15.0   16.0   ....   11.0   12.0   13.0   14.0   15.0
 14-FEB-0003 / 20:   42.0   43.0   44.0   45.0   46.0   ....   41.0   42.0   43.0   44.0   45.0
 16-MAR-0003 / 21:   72.0   73.0   74.0   75.0   76.0   ....   71.0   72.0   73.0   74.0   75.0
l200n/l=12:21/i=-19:-9 $2_void
 !-> list/width=200/nohead/l=12:21/i=-19:-9 v2d_reg_void
 14-SEP      / 12:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 15-JAN      / 13:   12.0   ....   ....   ....   16.0   ....   11.0   12.0   ....   ....   ....
 14-FEB      / 14:   42.0   ....   ....   ....   46.0   ....   41.0   42.0   ....   ....   ....
 16-MAR      / 15:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 15-APR      / 16:  102.0   ....   ....   ....  106.0   ....  101.0  102.0   ....   ....   ....
 15-MAY      / 17:  132.0   ....   ....   ....  136.0   ....  131.0  132.0   ....   ....   ....
 15-SEP      / 18:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 15-JAN-0003 / 19:   12.0   ....   ....   ....   16.0   ....   11.0   12.0   ....   ....   ....
 14-FEB-0003 / 20:   42.0   ....   ....   ....   46.0   ....   41.0   42.0   ....   ....   ....
 16-MAR-0003 / 21:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
l200n/l=12:21/i=-19:-9 $2_void[x=@fnr,t=@fnr]
 !-> list/width=200/nohead/l=12:21/i=-19:-9 v2d_reg_void[x=@fnr,t=@fnr]
 14-SEP      / 12:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 15-JAN      / 13:   12.0   12.0   14.0   16.0   16.0   ....   11.0   12.0   12.0   14.0   16.0
 14-FEB      / 14:   42.0   42.0   44.0   46.0   46.0   ....   41.0   42.0   42.0   44.0   46.0
 16-MAR      / 15:   72.0   72.0   74.0   76.0   76.0   ....   71.0   72.0   72.0   74.0   76.0
 15-APR      / 16:  102.0  102.0  104.0  106.0  106.0   ....  101.0  102.0  102.0  104.0  106.0
 15-MAY      / 17:  132.0  132.0  134.0  136.0  136.0   ....  131.0  132.0  132.0  134.0  136.0
 15-SEP      / 18:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 15-JAN-0003 / 19:   12.0   12.0   14.0   16.0   16.0   ....   11.0   12.0   12.0   14.0   16.0
 14-FEB-0003 / 20:   42.0   42.0   44.0   46.0   46.0   ....   41.0   42.0   42.0   44.0   46.0
 16-MAR-0003 / 21:   72.0   72.0   74.0   76.0   76.0   ....   71.0   72.0   72.0   74.0   76.0
 
! test shift
l200n/l=12:21/i=-19:-9 $2[x=@shf:2,t=@shf:-2]
 !-> list/width=200/nohead/l=12:21/i=-19:-9 v2d_reg[x=@shf:2,t=@shf:-2]
 14-SEP      / 12:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 15-JAN      / 13:  134.0  135.0  136.0   ....  131.0   ....  133.0  134.0  135.0  136.0   ....
 14-FEB      / 14:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 16-MAR      / 15:   14.0   15.0   16.0   ....   11.0   ....   13.0   14.0   15.0   16.0   ....
 15-APR      / 16:   44.0   45.0   46.0   ....   41.0   ....   43.0   44.0   45.0   46.0   ....
 15-MAY      / 17:   74.0   75.0   76.0   ....   71.0   ....   73.0   74.0   75.0   76.0   ....
 15-SEP      / 18:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 15-JAN-0003 / 19:  134.0  135.0  136.0   ....  131.0   ....  133.0  134.0  135.0  136.0   ....
 14-FEB-0003 / 20:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 16-MAR-0003 / 21:   14.0   15.0   16.0   ....   11.0   ....   13.0   14.0   15.0   16.0   ....
 
! test strides
l200n/order=x $2[l=1,i=0:14]
 !-> list/width=200/nohead/order=x v2d_reg[l=1,i=0:14]
           ....  11.00  12.00  13.00  14.00  15.00  16.00   ....  11.00  12.00  13.00  14.00  15.00  16.00   ....
set mode diag; l200n/order=x $2[l=1,i=0:14:2]; set mode/last diag
 !-> list/width=200/nohead/order=x v2d_reg[l=1,i=0:14:2]
 dealloc  dynamic grid GFJ3            XAX_SUBSPANORMAL    NORMAL    TAX_SUBSPA
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    TAX_SUBSPA
 dealloc  dynamic grid (G###)          (AX###)   NORMAL    NORMAL    TAX_SUBSPA
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    TAX_SUBSPA
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    TAX_SUBSPA
 strip regrid on X: V2D_REG --> (G###)           @XACT
 found   V2D_REG  M: 71 dset:   1 I:      0     14  J: -999 -999  K: -999 -999  L:      1      1
 regrid  V2D_REG  M: 72 dset:   1 I:      1      8  J: -999 -999  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   NORMAL    NORMAL    TAX_SUBSPA
           ....  12.00  14.00  16.00  11.00  13.00  15.00   ....
l200n/order=x $2[l=1,i=0:14:7]
 !-> list/width=200/nohead/order=x v2d_reg[l=1,i=0:14:7]
        ............
set mode diag; l200n $2[i=1,l=1:15:2]; set mode/last diag
 !-> list/width=200/nohead v2d_reg[i=1,l=1:15:2]
 dealloc  dynamic grid (G###)          (AX###)   NORMAL    NORMAL    TAX_SUBSPA
 -DELETE V2D_REG  M: 73 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XAX_SUBSPANORMAL    NORMAL    (AX###)
 dealloc  dynamic grid (G###)          XAX_SUBSPANORMAL    NORMAL    (AX###)
 allocate dynamic grid (G###)          XAX_SUBSPANORMAL    NORMAL    (AX###)
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          XAX_SUBSPANORMAL    NORMAL    (AX###)
 strip regrid on T: V2D_REG --> (G###)           @XACT
 strip moduloing V2D_REG on T axis:        1       15 dset:   1
 rdstride V2D_REG  C:  9 dset:   1 I:      1      1  J: -999 -999  K: -999 -999  L:      1      5
 doing moduloing V2D_REG on T axis:        1        5 dset:   1
 -DELETE V2D_REG  M: 73 dset:   1 I:      1      1  J: -999 -999  K: -999 -999  L:      1      5
 nulrgd  V2D_REG  M: 73 dset:   1 I:      1      1  J: -999 -999  K: -999 -999  L:      1      8
 -DELETE V2D_REG  M: 74 dset:   1 I:      1      1  J: -999 -999  K: -999 -999  L:      1     15
 dealloc  dynamic grid (G###)          XAX_SUBSPANORMAL    NORMAL    (AX###)
 16-JAN-0000 / 1:   11.0
 16-MAR-0000 / 2:   71.0
 15-MAY-0000 / 3:  131.0
 15-JAN-0001 / 4:   11.0
 16-MAR-0001 / 5:   71.0
 15-MAY-0001 / 6:  131.0
 15-JAN-0002 / 7:   11.0
 16-MAR-0002 / 8:   71.0
l200n $2[i=1,l=1:15:3]
 !-> list/width=200/nohead v2d_reg[i=1,l=1:15:3]
 16-JAN-0000 / 1:   11.0
 15-APR-0000 / 2:  101.0
 15-JAN-0001 / 3:   11.0
 15-APR-0001 / 4:  101.0
 15-JAN-0002 / 5:   11.0
l200n $2[i=1,l=1:15:4]
 !-> list/width=200/nohead v2d_reg[i=1,l=1:15:4]
 16-JAN-0000 / 1:   11.0
 15-MAY-0000 / 2:  131.0
 16-MAR-0001 / 3:   71.0
 15-JAN-0002 / 4:   11.0
l200n $2[i=0:14:2,l=1:15:3]
 !-> list/width=200/nohead v2d_reg[i=0:14:2,l=1:15:3]
 16-JAN-0000 / 1:   ....   12.0   14.0   16.0   11.0   13.0   15.0   ....
 15-APR-0000 / 2:   ....  102.0  104.0  106.0  101.0  103.0  105.0   ....
 15-JAN-0001 / 3:   ....   12.0   14.0   16.0   11.0   13.0   15.0   ....
 15-APR-0001 / 4:   ....  102.0  104.0  106.0  101.0  103.0  105.0   ....
 15-JAN-0002 / 5:   ....   12.0   14.0   16.0   11.0   13.0   15.0   ....
 
! test modulo regridding
define axis/t=15-jan-1981:15-dec-1990/npoints=120 t1980s
LET/quiet time_series = MOD(L[gt=t1980s]-1,12)+1
list time_series[gt=($TAXNAME)@mod]
 !-> list time_series[gt=TAX_SUBSPAN1@mod]
             VARIABLE : MOD(L[GT=T1980S]-1,12)+1
                        regrid: 30 day on T@MOD
             SUBSET   : 5 points (TIME)
 16-JAN      / 1:  1.000
 15-FEB      / 2:  2.000
 16-MAR      / 3:  3.000
 15-APR      / 4:  4.000
 15-MAY      / 5:  5.000
list time_series[gt=($TAXNAME)@modngd]
 !-> list time_series[gt=TAX_SUBSPAN1@modngd]
             VARIABLE : MOD(L[GT=T1980S]-1,12)+1 (# of points)
                        regrid: 30 day on T@MODNGD
             SUBSET   : 5 points (TIME)
 16-JAN      / 1:  10.00
 15-FEB      / 2:  10.00
 16-MAR      / 3:  10.00
 15-APR      / 4:  10.00
 15-MAY      / 5:  10.00
list/nohead/l=1001:1009 time_series[gt=($TAXNAME)@mod]
 !-> list/nohead/l=1001:1009 time_series[gt=TAX_SUBSPAN1@mod]
 16-MAY-0166 / 1001:  5.000
 15-SEP-0166 / 1002:   ....
 16-JAN-0167 / 1003:  1.000
 15-FEB-0167 / 1004:  2.000
 17-MAR-0167 / 1005:  3.000
 16-APR-0167 / 1006:  4.000
 16-MAY-0167 / 1007:  5.000
 16-SEP-0167 / 1008:   ....
 16-JAN-0168 / 1009:  1.000
 
! test modulo string arrays
list $1_strings[i=5:7]  	! via IS_SUBSPAN_FILL
 !-> list vreg_strings[i=5:7]
             VARIABLE : MY_STRINGS[GX=XAX_SUBSPAN@ASN]
             FILENAME : test_subspan_modulo.nc
             SUBSET   : 3 points (X)
 45   / 5:"a5"
 46   / 6:"a6"
 93.5 / 7:""  
list $1_strings[i=1013:1024] 	! via IS_MODULO
 !-> list vreg_strings[i=1013:1024]
             VARIABLE : MY_STRINGS[GX=XAX_SUBSPAN@ASN]
             FILENAME : test_subspan_modulo.nc
             SUBSET   : 12 points (X)
 14445   / 1013:"a5"
 14446   / 1014:"a6"
 14493.5 / 1015:""  
 14541   / 1016:"a1"
 14542   / 1017:"a2"
 14543   / 1018:"a3"
 14544   / 1019:"a4"
 14545   / 1020:"a5"
 14546   / 1021:"a6"
 14593.5 / 1022:""  
 14641   / 1023:"a1"
 14642   / 1024:"a2"
SAY **********   END OF REGULAR   AXIS TEST **************
**********   END OF REGULAR   AXIS TEST **************
SAY ********** START OF IRREGULAR AXIS TEST **************
********** START OF IRREGULAR AXIS TEST **************
go bn_subspan_modulo.sub2 virr v2d_irr
! bn_subspan_modulo.sub
! *sh* 11/02
 
! subroutine for benchmark test bn_subspan_modulo.jnl
! call with
!	yes? GO bn_subspan_modulo.sub vreg   ! test regular axis
!	yes? GO bn_subspan_modulo.sub virr   ! test irregular axis
 
define alias lsx list/order=x
define alias lsxn list/order=x/nohead
 
! check the modulo behavior of the X and T axes
define symbox xaxname `$1,return=xaxis`
 !-> define symbox xaxname XIRREG_SUBSPAN
show axis/x=-60:141 ($XAXNAME)
 !-> show axis/x=-60:141 XIRREG_SUBSPAN
 name       axis              # pts   start                end
 XIRREG_SUBSPAN X               6mi   41                   46
   Axis span (to cell edges) = 6 (modulo length = 100)
 
       I     X                       XBOX          XBOXLO
      -7>  -106.5                    94         -153.5
      -6>  -59                       1          -59.5
      -5>  -58                       0.55       -58.5
      -4>  -57.9                     1          -57.95
      -3>  -56                       1.45       -56.95
      -2>  -55                       1          -55.5
      -1>  -54                       1          -54.5
       0>  -6.5                      94         -53.5
       1>  41                        1          40.5
       2>  42                        0.55       41.5
       3>  42.1                      1          42.05
       4>  44                        1.45       43.05
       5>  45                        1          44.5
       6>  46                        1          45.5
       7>  93.5                      94         46.5
       8>  141                       1          140.5
show axis/x=-60:141:2 ($XAXNAME)
 !-> show axis/x=-60:141:2 XIRREG_SUBSPAN
 name       axis              # pts   start                end
 XIRREG_SUBSPAN X               6mi   41                   46
   Axis span (to cell edges) = 6 (modulo length = 100)
 
       I     X                       XBOX          XBOXLO
      -7>  -106.5                    94         -153.5
      -5>  -58                       0.55       -58.5
      -3>  -56                       1.45       -56.95
      -1>  -54                       1          -54.5
       1>  41                        1          40.5
       3>  42.1                      1          42.05
       5>  45                        1          44.5
       7>  93.5                      94         46.5
show axis/x=-60:141:7 ($XAXNAME)
 !-> show axis/x=-60:141:7 XIRREG_SUBSPAN
 name       axis              # pts   start                end
 XIRREG_SUBSPAN X               6mi   41                   46
   Axis span (to cell edges) = 6 (modulo length = 100)
 
       I     X                       XBOX          XBOXLO
      -7>  -106.5                    94         -153.5
       0>  -6.5                      94         -53.5
       7>  93.5                      94         46.5
 
define symbox taxname `$2,return=taxis`
 !-> define symbox taxname TIRREG_SUBSPAN1
show axis/l=3:10 ($TAXNAME)
 !-> show axis/l=3:10 TIRREG_SUBSPAN1
 name       axis              # pts   start                end
 TIRREG_SUBSPAN1 TIME           5mi   16-JAN 12:00         15-MAY 05:57
T0 = 01-JAN-0000
   Axis span (to cell edges) = 150.2485 (modulo length = 365.2485)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       3>  15-MAR 17:57:50           31         29-FEB 05:57:50             74.7485
       4>  15-APR 05:57:50           30         31-MAR 05:57:50             105.2485
       5>  15-MAY 05:57:50           30         30-APR 05:57:50             135.2485
       6>  14-SEP 17:57:50           215        30-MAY 05:57:50             257.7485
       7>  15-JAN 17:57:50           31         31-DEC 05:57:50             380.7485
       8>  14-FEB 08:56:45           28.2485    31-JAN 05:57:50             410.3727
       9>  15-MAR 23:55:40           31         28-FEB 11:55:40             439.997
      10>  15-APR 11:55:40           30         31-MAR 11:55:40             470.497
show axis/l=3:10:3 ($TAXNAME)
 !-> show axis/l=3:10:3 TIRREG_SUBSPAN1
 name       axis              # pts   start                end
 TIRREG_SUBSPAN1 TIME           5mi   16-JAN 12:00         15-MAY 05:57
T0 = 01-JAN-0000
   Axis span (to cell edges) = 150.2485 (modulo length = 365.2485)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       3>  15-MAR 17:57:50           31         29-FEB 05:57:50             74.7485
       6>  14-SEP 17:57:50           215        30-MAY 05:57:50             257.7485
       9>  15-MAR 23:55:40           31         28-FEB 11:55:40             439.997
show axis/l=3:10:6 ($TAXNAME)
 !-> show axis/l=3:10:6 TIRREG_SUBSPAN1
 name       axis              # pts   start                end
 TIRREG_SUBSPAN1 TIME           5mi   16-JAN 12:00         15-MAY 05:57
T0 = 01-JAN-0000
   Axis span (to cell edges) = 150.2485 (modulo length = 365.2485)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       3>  15-MAR 17:57:50           31         29-FEB 05:57:50             74.7485
       9>  15-MAR 23:55:40           31         28-FEB 11:55:40             439.997
 
set mode diag
set mode stupid  ! always re-read and recompute
lsx $1  ! default avoids void points
 !-> list/order=x virr
 dealloc  dynamic grid GFJ4            XIRREG_SUBNORMAL    NORMAL    TIRREG_SUB
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GFJ2            XIRREG_SUBNORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   1 I:      1      6  J: -999 -999  K: -999 -999  L:   -999   -999
 reading VIRR     M: 80 dset:   1 I:      1      6  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : X[GX=XIRREG_SUBSPAN] -40 + 10
             FILENAME : test_subspan_modulo.nc
             SUBSET   : 6 points (X)
           41     42     42.1   44     45     46    
            1      2      3      4      5      6
          11.00  12.00  12.10  14.00  15.00  16.00
lsxn/x=100 $1  ! void point above, alone (via "modulo-void-filling")
 !-> list/order=x/nohead/x=100 virr
 strip limits reconciliation : EX#1
 strip modulo-void-filling EX#1 on X axis:        7        7 dset:   1
 eval    EX#1     C:  6 dset:   1 I:      6      6  J: -999 -999  K: -999 -999  L:   -999   -999
 reading VIRR     M: 81 dset:   1 I:      6      6  J: -999 -999  K: -999 -999  L:   -999   -999
 doing modulo-void-filling VIRR on X axis:        6        6 dset:   1
        ....
lsxn/x=0 $1 ! void point below, alone (via modulo)
 !-> list/order=x/nohead/x=0 virr
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      0      0  J: -999 -999  K: -999 -999  L:   -999   -999
 strip moduloing VIRR on X axis:        0        0 dset:   1
 reading VIRR     M: 83 dset:   1 I:      6      6  J: -999 -999  K: -999 -999  L:   -999   -999
 doing moduloing VIRR on X axis:        6        6 dset:   1
        ....
lsxn/x=45:100 $1  ! void above (via subspan-fill)
 !-> list/order=x/nohead/x=45:100 virr
 strip limits reconciliation : EX#1
 strip modulo-void-filling EX#1 on X axis:        5        7 dset:   1
 eval    EX#1     C:  6 dset:   1 I:      5      6  J: -999 -999  K: -999 -999  L:   -999   -999
 reading VIRR     M: 85 dset:   1 I:      5      6  J: -999 -999  K: -999 -999  L:   -999   -999
 doing modulo-void-filling VIRR on X axis:        5        6 dset:   1
          15.00  16.00   ....
lsxn/x=0:100 $1  ! voids above & below (via modulo)
 !-> list/order=x/nohead/x=0:100 virr
 strip limits reconciliation : EX#1
 strip modulo-void-filling EX#1 on X axis:        0        7 dset:   1
 eval    EX#1     C:  6 dset:   1 I:      0      6  J: -999 -999  K: -999 -999  L:   -999   -999
 strip moduloing VIRR on X axis:        0        6 dset:   1
 reading VIRR     M: 87 dset:   1 I:      1      6  J: -999 -999  K: -999 -999  L:   -999   -999
 doing moduloing VIRR on X axis:        1        6 dset:   1
 doing modulo-void-filling VIRR on X axis:        0        6 dset:   1
           ....  11.00  12.00  12.10  14.00  15.00  16.00   ....
set mode/last diag
lsxn/x=50:160 $1  ! modulo above
 !-> list/order=x/nohead/x=50:160 virr
           ....  11.00  12.00  12.10  14.00  15.00  16.00   ....
lsxn/x=-100:40 $1 ! modulo below
 !-> list/order=x/nohead/x=-100:40 virr
           ....  11.00  12.00  12.10  14.00  15.00  16.00   ....
lsxn/x=-100:160 $1  ! modulo above & below
 !-> list/order=x/nohead/x=-100:160 virr
      ... listing every   2th point
       .   ....  12.00  14.00  16.00  11.00  12.10  15.00   ....  12.00  14.00  16.00
 
! end point testing
lsxn/i=-8:-2 $1
 !-> list/order=x/nohead/i=-8:-2 virr
          16.00   ....  11.00  12.00  12.10  14.00  15.00
lsxn/i=-7:-2 $1
 !-> list/order=x/nohead/i=-7:-2 virr
           ....  11.00  12.00  12.10  14.00  15.00
lsxn/i=-6:-2 $1
 !-> list/order=x/nohead/i=-6:-2 virr
          11.00  12.00  12.10  14.00  15.00
lsxn/i=17:20 $1
 !-> list/order=x/nohead/i=17:20 virr
          12.10  14.00  15.00  16.00
lsxn/i=17:21 $1
 !-> list/order=x/nohead/i=17:21 virr
          12.10  14.00  15.00  16.00   ....
lsxn/i=17:22 $1
 !-> list/order=x/nohead/i=17:22 virr
          12.10  14.00  15.00  16.00   ....  11.00
set mode/last stupid
 
! test smoothers - pos and neg modulo and combined mod and context edges
lsx/x=500:600 $1_ragged
 !-> list/order=x/x=500:600 virr_ragged
             VARIABLE : VIRR + NOISE[G=VIRR@ASN]
             FILENAME : test_subspan_modulo.nc
             SUBSET   : 8 points (X)
          493.5  541    542    542.1  544    545    546    593.5  
           35     36     37     38     39     40     41     42
           ....  10.95  12.06  12.04  14.24  14.94  15.99   ....
lsxn/x=500:600 $1_ragged[x=@sbx]
 !-> list/order=x/nohead/x=500:600 virr_ragged[x=@sbx]
           ....   ....  11.68  12.78  13.74  15.06   ....   ....
lsxn/x=500:545 $1_ragged[x=@sbx]
 !-> list/order=x/nohead/x=500:545 virr_ragged[x=@sbx]
           ....   ....  11.68  12.78  13.74  15.06
lsxn/x=545:600 $1_ragged[x=@sbx]
 !-> list/order=x/nohead/x=545:600 virr_ragged[x=@sbx]
          15.06   ....   ....
 
lsxn/x=-100:0 $1_ragged
 !-> list/order=x/nohead/x=-100:0 virr_ragged
           ....  10.95  12.06  12.04  14.24  14.94  15.99   ....
lsxn/x=-100:0    $1_ragged[x=@sbx]
 !-> list/order=x/nohead/x=-100:0    virr_ragged[x=@sbx]
           ....   ....  11.68  12.78  13.74  15.06   ....   ....
lsxn/x=-100:-55  $1_ragged[x=@sbx]
 !-> list/order=x/nohead/x=-100:-55  virr_ragged[x=@sbx]
           ....   ....  11.68  12.78  13.74  15.06
lsxn/x=-56:0     $1_ragged[x=@sbx]
 !-> list/order=x/nohead/x=-56:0     virr_ragged[x=@sbx]
          13.74  15.06   ....   ....
 
lsxn/x=-100:142/wid=200 $1_ragged
 !-> list/order=x/nohead/x=-100:142/wid=200 virr_ragged
           ....  10.95  12.06  12.04  14.24  14.94  15.99   ....  10.95  12.06  12.04  14.24  14.94  15.99   ....  10.95  12.06
lsxn/x=-100:142/wid=200 $1_ragged[x=@sbx:3]
 !-> list/order=x/nohead/x=-100:142/wid=200 virr_ragged[x=@sbx:3]
           ....   ....  11.68  12.78  13.74  15.06   ....   ....   ....  11.68  12.78  13.74  15.06   ....   ....   ....  11.68
lsxn/x=-100:142/wid=200 $1_ragged[x=@swl:5]
 !-> list/order=x/nohead/x=-100:142/wid=200 virr_ragged[x=@swl:5]
           ....   ....   ....  12.80  13.84   ....   ....   ....   ....   ....  12.80  13.84   ....   ....   ....   ....   ....
lsxn/x=-100:142/wid=200 $1_ragged[x=@swl:35]
 !-> list/order=x/nohead/x=-100:142/wid=200 virr_ragged[x=@swl:35]
        ....................................................................
 
! test fillers - pos and neg modulo and combined mod and context edges
! @FAV
lsx/x=500:600 $1_void
 !-> list/order=x/x=500:600 virr_void
             VARIABLE : IF X[G=VIRR] LT 43 OR X[G=VIRR] GT 45 THEN VIRR
             FILENAME : test_subspan_modulo.nc
             SUBSET   : 8 points (X)
          493.5  541    542    542.1  544    545    546    593.5  
           35     36     37     38     39     40     41     42
           ....  11.00  12.00  12.10   ....   ....  16.00   ....
lsxn/x=500:600 $1_void[x=@fav]
 !-> list/order=x/nohead/x=500:600 virr_void[x=@fav]
           ....  11.00  12.00  12.10  12.10  16.00  16.00   ....
 
lsxn/x=-100:0    $1_void
 !-> list/order=x/nohead/x=-100:0    virr_void
           ....  11.00  12.00  12.10   ....   ....  16.00   ....
lsxn/x=-100:0    $1_void[x=@fav]
 !-> list/order=x/nohead/x=-100:0    virr_void[x=@fav]
           ....  11.00  12.00  12.10  12.10  16.00  16.00   ....
 
lsxn/x=-100:142/wid=200 $1_void
 !-> list/order=x/nohead/x=-100:142/wid=200 virr_void
           ....  11.00  12.00  12.10   ....   ....  16.00   ....  11.00  12.00  12.10   ....   ....  16.00   ....  11.00  12.00
lsxn/x=-100:142/wid=200 $1_void[x=@fav:3]
 !-> list/order=x/nohead/x=-100:142/wid=200 virr_void[x=@fav:3]
           ....  11.00  12.00  12.10  12.10  16.00  16.00   ....  11.00  12.00  12.10  12.10  16.00  16.00   ....  11.00  12.00
lsxn/x=-100:142/wid=200 $1_void[x=@fav:5]
 !-> list/order=x/nohead/x=-100:142/wid=200 virr_void[x=@fav:5]
           ....  11.00  12.00  12.10  13.37  14.05  16.00   ....  11.00  12.00  12.10  13.37  14.05  16.00   ....  11.00  12.00
lsxn/x=-100:142/wid=200 $1_void[x=@fav:35]
 !-> list/order=x/nohead/x=-100:142/wid=200 virr_void[x=@fav:35]
           ....  11.00  12.00  12.10  12.78  12.78  16.00   ....  11.00  12.00  12.10  12.78  12.78  16.00   ....  11.00  12.00
 
! @FLN
lsxn/x=500:600 $1_void
 !-> list/order=x/nohead/x=500:600 virr_void
           ....  11.00  12.00  12.10   ....   ....  16.00   ....
lsxn/x=500:600 $1_void[x=@fln]
 !-> list/order=x/nohead/x=500:600 virr_void[x=@fln]
           ....  11.00  12.00  12.10  14.00  15.00  16.00   ....
 
lsxn/x=-100:0    $1_void
 !-> list/order=x/nohead/x=-100:0    virr_void
           ....  11.00  12.00  12.10   ....   ....  16.00   ....
lsxn/x=-100:0    $1_void[x=@fln]
 !-> list/order=x/nohead/x=-100:0    virr_void[x=@fln]
           ....  11.00  12.00  12.10  14.00  15.00  16.00   ....
 
lsxn/x=-100:142/wid=200 $1_void
 !-> list/order=x/nohead/x=-100:142/wid=200 virr_void
           ....  11.00  12.00  12.10   ....   ....  16.00   ....  11.00  12.00  12.10   ....   ....  16.00   ....  11.00  12.00
lsxn/x=-100:142/wid=200 $1_void[x=@fln:35]
 !-> list/order=x/nohead/x=-100:142/wid=200 virr_void[x=@fln:35]
           ....  11.00  12.00  12.10  14.00  15.00  16.00   ....  11.00  12.00  12.10  14.00  15.00  16.00   ....  11.00  12.00
 
! @FNR
lsxn/x=500:600 $1_void
 !-> list/order=x/nohead/x=500:600 virr_void
           ....  11.00  12.00  12.10   ....   ....  16.00   ....
lsxn/x=500:600 $1_void[x=@fnr]
 !-> list/order=x/nohead/x=500:600 virr_void[x=@fnr]
           ....  11.00  12.00  12.10  12.10  16.00  16.00   ....
 
lsxn/x=-100:0    $1_void
 !-> list/order=x/nohead/x=-100:0    virr_void
           ....  11.00  12.00  12.10   ....   ....  16.00   ....
lsxn/x=-100:0    $1_void[x=@fnr]
 !-> list/order=x/nohead/x=-100:0    virr_void[x=@fnr]
           ....  11.00  12.00  12.10  12.10  16.00  16.00   ....
 
lsxn/x=-100:142/wid=200 $1_void
 !-> list/order=x/nohead/x=-100:142/wid=200 virr_void
           ....  11.00  12.00  12.10   ....   ....  16.00   ....  11.00  12.00  12.10   ....   ....  16.00   ....  11.00  12.00
lsxn/x=-100:142/wid=200 $1_void[x=@fnr:35]
 !-> list/order=x/nohead/x=-100:142/wid=200 virr_void[x=@fnr:35]
           ....  11.00  12.00  12.10  12.10  16.00  16.00   ....  11.00  12.00  12.10  12.10  16.00  16.00   ....  11.00  12.00
 
! Test 2-axis modulo (longitude and time)
define alias l200 list/width=200
define alias l200n list/width=200/nohead
l200/i=1:13 $2
 !-> list/width=200/nohead/i=1:13 v2d_irr
 16-JAN 12      / 1:   11.0   12.0   12.1   14.0   15.0   16.0   ....   11.0   12.0   12.1   14.0   15.0   16.0
 15-FEB 02      / 2:   42.0   43.0   43.1   45.0   46.0   47.0   ....   42.0   43.0   43.1   45.0   46.0   47.0
 15-MAR 17      / 3:   70.2   71.2   71.3   73.2   74.2   75.2   ....   70.2   71.2   71.3   73.2   74.2   75.2
 15-APR 05      / 4:  101.2  102.2  102.3  104.2  105.2  106.2   ....  101.2  102.2  102.3  104.2  105.2  106.2
 15-MAY 05      / 5:  131.2  132.2  132.3  134.2  135.2  136.2   ....  131.2  132.2  132.3  134.2  135.2  136.2
l200n/l=1:12 $2
 !-> list/width=200/nohead/l=1:12 v2d_irr
 16-JAN 12      /  1:   11.0   12.0   12.1   14.0   15.0   16.0
 15-FEB 02      /  2:   42.0   43.0   43.1   45.0   46.0   47.0
 15-MAR 17      /  3:   70.2   71.2   71.3   73.2   74.2   75.2
 15-APR 05      /  4:  101.2  102.2  102.3  104.2  105.2  106.2
 15-MAY 05      /  5:  131.2  132.2  132.3  134.2  135.2  136.2
 14-SEP 17      /  6:   ....   ....   ....   ....   ....   ....
 15-JAN 17      /  7:   11.0   12.0   12.1   14.0   15.0   16.0
 14-FEB 08      /  8:   42.0   43.0   43.1   45.0   46.0   47.0
 15-MAR 23      /  9:   70.2   71.2   71.3   73.2   74.2   75.2
 15-APR 11      / 10:  101.2  102.2  102.3  104.2  105.2  106.2
 15-MAY 11      / 11:  131.2  132.2  132.3  134.2  135.2  136.2
 14-SEP 23      / 12:   ....   ....   ....   ....   ....   ....
l200n/l=1:12/i=1:11 $2
 !-> list/width=200/nohead/l=1:12/i=1:11 v2d_irr
 16-JAN 12      /  1:   11.0   12.0   12.1   14.0   15.0   16.0   ....   11.0   12.0   12.1   14.0
 15-FEB 02      /  2:   42.0   43.0   43.1   45.0   46.0   47.0   ....   42.0   43.0   43.1   45.0
 15-MAR 17      /  3:   70.2   71.2   71.3   73.2   74.2   75.2   ....   70.2   71.2   71.3   73.2
 15-APR 05      /  4:  101.2  102.2  102.3  104.2  105.2  106.2   ....  101.2  102.2  102.3  104.2
 15-MAY 05      /  5:  131.2  132.2  132.3  134.2  135.2  136.2   ....  131.2  132.2  132.3  134.2
 14-SEP 17      /  6:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 15-JAN 17      /  7:   11.0   12.0   12.1   14.0   15.0   16.0   ....   11.0   12.0   12.1   14.0
 14-FEB 08      /  8:   42.0   43.0   43.1   45.0   46.0   47.0   ....   42.0   43.0   43.1   45.0
 15-MAR 23      /  9:   70.2   71.2   71.3   73.2   74.2   75.2   ....   70.2   71.2   71.3   73.2
 15-APR 11      / 10:  101.2  102.2  102.3  104.2  105.2  106.2   ....  101.2  102.2  102.3  104.2
 15-MAY 11      / 11:  131.2  132.2  132.3  134.2  135.2  136.2   ....  131.2  132.2  132.3  134.2
 14-SEP 23      / 12:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
! list outside the native range with /L=1:21. Date listings show years beyond 0002
l200n/l=12:21/i=-19:-9 $2
 !-> list/width=200/nohead/l=12:21/i=-19:-9 v2d_irr
 14-SEP 23      / 12:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 15-JAN 23      / 13:   12.0   12.1   14.0   15.0   16.0   ....   11.0   12.0   12.1   14.0   15.0
 14-FEB 14      / 14:   43.0   43.1   45.0   46.0   47.0   ....   42.0   43.0   43.1   45.0   46.0
 16-MAR 05      / 15:   71.2   71.3   73.2   74.2   75.2   ....   70.2   71.2   71.3   73.2   74.2
 15-APR 17      / 16:  102.2  102.3  104.2  105.2  106.2   ....  101.2  102.2  102.3  104.2  105.2
 15-MAY 17      / 17:  132.2  132.3  134.2  135.2  136.2   ....  131.2  132.2  132.3  134.2  135.2
 15-SEP 05      / 18:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 16-JAN-0003 05 / 19:   12.0   12.1   14.0   15.0   16.0   ....   11.0   12.0   12.1   14.0   15.0
 14-FEB-0003 20 / 20:   43.0   43.1   45.0   46.0   47.0   ....   42.0   43.0   43.1   45.0   46.0
 16-MAR-0003 11 / 21:   71.2   71.3   73.2   74.2   75.2   ....   70.2   71.2   71.3   73.2   74.2
l200n/l=12:21/i=-19:-9 $2_void
 !-> list/width=200/nohead/l=12:21/i=-19:-9 v2d_irr_void
 14-SEP 23      / 12:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 15-JAN 23      / 13:   12.0   12.1   ....   ....   16.0   ....   11.0   12.0   12.1   ....   ....
 14-FEB 14      / 14:   43.0   43.1   ....   ....   47.0   ....   42.0   43.0   43.1   ....   ....
 16-MAR 05      / 15:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 15-APR 17      / 16:  102.2  102.3   ....   ....  106.2   ....  101.2  102.2  102.3   ....   ....
 15-MAY 17      / 17:  132.2  132.3   ....   ....  136.2   ....  131.2  132.2  132.3   ....   ....
 15-SEP 05      / 18:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 16-JAN-0003 05 / 19:   12.0   12.1   ....   ....   16.0   ....   11.0   12.0   12.1   ....   ....
 14-FEB-0003 20 / 20:   43.0   43.1   ....   ....   47.0   ....   42.0   43.0   43.1   ....   ....
 16-MAR-0003 11 / 21:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
l200n/l=12:21/i=-19:-9 $2_void[x=@fnr,t=@fnr]
 !-> list/width=200/nohead/l=12:21/i=-19:-9 v2d_irr_void[x=@fnr,t=@fnr]
 14-SEP 23      / 12:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 15-JAN 23      / 13:   12.0   12.1   12.1   16.0   16.0   ....   11.0   12.0   12.1   12.1   16.0
 14-FEB 14      / 14:   43.0   43.1   43.1   47.0   47.0   ....   42.0   43.0   43.1   43.1   47.0
 16-MAR 05      / 15:   72.6   72.7   72.7   76.6   76.6   ....   71.6   72.6   72.7   72.7   76.6
 15-APR 17      / 16:  102.2  102.3  102.3  106.2  106.2   ....  101.2  102.2  102.3  102.3  106.2
 15-MAY 17      / 17:  132.2  132.3  132.3  136.2  136.2   ....  131.2  132.2  132.3  132.3  136.2
 15-SEP 05      / 18:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 16-JAN-0003 05 / 19:   12.0   12.1   12.1   16.0   16.0   ....   11.0   12.0   12.1   12.1   16.0
 14-FEB-0003 20 / 20:   43.0   43.1   43.1   47.0   47.0   ....   42.0   43.0   43.1   43.1   47.0
 16-MAR-0003 11 / 21:   72.6   72.7   72.7   76.6   76.6   ....   71.6   72.6   72.7   72.7   76.6
 
! test shift
l200n/l=12:21/i=-19:-9 $2[x=@shf:2,t=@shf:-2]
 !-> list/width=200/nohead/l=12:21/i=-19:-9 v2d_irr[x=@shf:2,t=@shf:-2]
 14-SEP 23      / 12:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 15-JAN 23      / 13:  134.2  135.2  136.2   ....  131.2   ....  132.3  134.2  135.2  136.2   ....
 14-FEB 14      / 14:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 16-MAR 05      / 15:   14.0   15.0   16.0   ....   11.0   ....   12.1   14.0   15.0   16.0   ....
 15-APR 17      / 16:   45.0   46.0   47.0   ....   42.0   ....   43.1   45.0   46.0   47.0   ....
 15-MAY 17      / 17:   73.2   74.2   75.2   ....   70.2   ....   71.3   73.2   74.2   75.2   ....
 15-SEP 05      / 18:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 16-JAN-0003 05 / 19:  134.2  135.2  136.2   ....  131.2   ....  132.3  134.2  135.2  136.2   ....
 14-FEB-0003 20 / 20:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 16-MAR-0003 11 / 21:   14.0   15.0   16.0   ....   11.0   ....   12.1   14.0   15.0   16.0   ....
 
! test strides
l200n/order=x $2[l=1,i=0:14]
 !-> list/width=200/nohead/order=x v2d_irr[l=1,i=0:14]
           ....  11.00  12.00  12.10  14.00  15.00  16.00   ....  11.00  12.00  12.10  14.00  15.00  16.00   ....
set mode diag; l200n/order=x $2[l=1,i=0:14:2]; set mode/last diag
 !-> list/width=200/nohead/order=x v2d_irr[l=1,i=0:14:2]
 dealloc  dynamic grid GFJ4            XIRREG_SUBNORMAL    NORMAL    TIRREG_SUB
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    TIRREG_SUB
 dealloc  dynamic grid (G###)          (AX###)   NORMAL    NORMAL    TIRREG_SUB
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    TIRREG_SUB
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          (AX###)   NORMAL    NORMAL    TIRREG_SUB
 strip regrid on X: V2D_IRR --> (G###)           @XACT
 found   V2D_IRR  M:150 dset:   1 I:      0     14  J: -999 -999  K: -999 -999  L:      1      1
 regrid  V2D_IRR  M:151 dset:   1 I:      1      8  J: -999 -999  K: -999 -999  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   NORMAL    NORMAL    TIRREG_SUB
           ....  12.00  14.00  16.00  11.00  12.10  15.00   ....
l200n/order=x $2[l=1,i=0:14:7]
 !-> list/width=200/nohead/order=x v2d_irr[l=1,i=0:14:7]
        ............
set mode diag; l200n $2[i=1,l=1:15:2]; set mode/last diag
 !-> list/width=200/nohead v2d_irr[i=1,l=1:15:2]
 dealloc  dynamic grid (G###)          (AX###)   NORMAL    NORMAL    TIRREG_SUB
 -DELETE V2D_IRR  M:152 dset:   1 I:      1      3  J: -999 -999  K: -999 -999  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          XIRREG_SUBNORMAL    NORMAL    (AX###)
 dealloc  dynamic grid (G###)          XIRREG_SUBNORMAL    NORMAL    (AX###)
 allocate dynamic grid (G###)          XIRREG_SUBNORMAL    NORMAL    (AX###)
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          XIRREG_SUBNORMAL    NORMAL    (AX###)
 strip regrid on T: V2D_IRR --> (G###)           @XACT
 strip moduloing V2D_IRR on T axis:        1       15 dset:   1
 rdstride V2D_IRR  C:  9 dset:   1 I:      1      1  J: -999 -999  K: -999 -999  L:      1      5
 doing moduloing V2D_IRR on T axis:        1        5 dset:   1
 -DELETE V2D_IRR  M:152 dset:   1 I:      1      1  J: -999 -999  K: -999 -999  L:      1      5
 nulrgd  V2D_IRR  M:152 dset:   1 I:      1      1  J: -999 -999  K: -999 -999  L:      1      8
 -DELETE V2D_IRR  M:153 dset:   1 I:      1      1  J: -999 -999  K: -999 -999  L:      1     15
 dealloc  dynamic grid (G###)          XIRREG_SUBNORMAL    NORMAL    (AX###)
 16-JAN-0000 / 1:   11.0
 15-MAR-0000 / 2:   70.2
 15-MAY-0000 / 3:  131.2
 15-JAN-0001 / 4:   11.0
 15-MAR-0001 / 5:   70.2
 15-MAY-0001 / 6:  131.2
 15-JAN-0002 / 7:   11.0
 16-MAR-0002 / 8:   70.2
l200n $2[i=1,l=1:15:3]
 !-> list/width=200/nohead v2d_irr[i=1,l=1:15:3]
 16-JAN-0000 / 1:   11.0
 15-APR-0000 / 2:  101.2
 15-JAN-0001 / 3:   11.0
 15-APR-0001 / 4:  101.2
 15-JAN-0002 / 5:   11.0
l200n $2[i=1,l=1:15:4]
 !-> list/width=200/nohead v2d_irr[i=1,l=1:15:4]
 16-JAN-0000 / 1:   11.0
 15-MAY-0000 / 2:  131.2
 15-MAR-0001 / 3:   70.2
 15-JAN-0002 / 4:   11.0
l200n $2[i=0:14:2,l=1:15:3]
 !-> list/width=200/nohead v2d_irr[i=0:14:2,l=1:15:3]
 16-JAN-0000 / 1:   ....   12.0   14.0   16.0   11.0   12.1   15.0   ....
 15-APR-0000 / 2:   ....  102.2  104.2  106.2  101.2  102.3  105.2   ....
 15-JAN-0001 / 3:   ....   12.0   14.0   16.0   11.0   12.1   15.0   ....
 15-APR-0001 / 4:   ....  102.2  104.2  106.2  101.2  102.3  105.2   ....
 15-JAN-0002 / 5:   ....   12.0   14.0   16.0   11.0   12.1   15.0   ....
 
! test modulo regridding
define axis/t=15-jan-1981:15-dec-1990/npoints=120 t1980s
LET/quiet time_series = MOD(L[gt=t1980s]-1,12)+1
list time_series[gt=($TAXNAME)@mod]
 !-> list time_series[gt=TIRREG_SUBSPAN1@mod]
             VARIABLE : MOD(L[GT=T1980S]-1,12)+1
                        regrid: on T@MOD
             SUBSET   : 5 points (TIME)
 16-JAN 12      / 1:  1.000
 15-FEB 02      / 2:  2.000
 15-MAR 17      / 3:  3.000
 15-APR 05      / 4:  4.000
 15-MAY 05      / 5:  5.000
list time_series[gt=($TAXNAME)@modngd]
 !-> list time_series[gt=TIRREG_SUBSPAN1@modngd]
             VARIABLE : MOD(L[GT=T1980S]-1,12)+1 (# of points)
                        regrid: on T@MODNGD
             SUBSET   : 5 points (TIME)
 16-JAN 12      / 1:  10.00
 15-FEB 02      / 2:  10.00
 15-MAR 17      / 3:  10.00
 15-APR 05      / 4:  10.00
 15-MAY 05      / 5:  10.00
list/nohead/l=1001:1009 time_series[gt=($TAXNAME)@mod]
 !-> list/nohead/l=1001:1009 time_series[gt=TIRREG_SUBSPAN1@mod]
 16-MAY-0166 11 / 1001:  5.000
 15-SEP-0166 23 / 1002:   ....
 16-JAN-0167 23 / 1003:  1.000
 15-FEB-0167 14 / 1004:  2.000
 17-MAR-0167 05 / 1005:  3.000
 16-APR-0167 17 / 1006:  4.000
 16-MAY-0167 17 / 1007:  5.000
 16-SEP-0167 05 / 1008:   ....
 17-JAN-0168 05 / 1009:  1.000
 
! test modulo string arrays
list $1_strings[i=5:7]  	! via IS_SUBSPAN_FILL
 !-> list virr_strings[i=5:7]
             VARIABLE : MY_STRINGS[GX=XIRREG_SUBSPAN@ASN]
             FILENAME : test_subspan_modulo.nc
             SUBSET   : 3 points (X)
 45   / 5:"a5"
 46   / 6:"a6"
 93.5 / 7:""  
list $1_strings[i=1013:1024] 	! via IS_MODULO
 !-> list virr_strings[i=1013:1024]
             VARIABLE : MY_STRINGS[GX=XIRREG_SUBSPAN@ASN]
             FILENAME : test_subspan_modulo.nc
             SUBSET   : 12 points (X)
 14445    / 1013:"a5"
 14446    / 1014:"a6"
 14493.5  / 1015:""  
 14541    / 1016:"a1"
 14542    / 1017:"a2"
 14542.1  / 1018:"a3"
 14544    / 1019:"a4"
 14545    / 1020:"a5"
 14546    / 1021:"a6"
 14593.5  / 1022:""  
 14641    / 1023:"a1"
 14642    / 1024:"a2"
 
 
*** Running ferret script: bn_dots.jnl
! PLOT/SYMBOL=DOT  qualifiers
! *acm* 12/02
! ACM 4/2005 set mode meta to save this plot for the metafile checks.
!            and cancel mode logo, so that .plt files are comparable.
!  2/18 *acm* keep mode logo turned off
 
set mode meta dots.plt
plot/symbol=dot/i=1:1000 sin(62.8*i)
plot/symbol=dot/color=red/over/i=1:1000 sin(62.8*(i+20))
can mode meta
 
! test warnings
plot/symbol=dot/thick/i=1:1000 sin(62.8*(i+10) )
plot/symbol=dot/size=0.5/over/i=1:1000 -0.5*sin(62.8*(i+10) )
 
! Vector plots with null-size vectors
 
vector/i=1:5/j=1:5 0.*(i+j),0*(i+j)
*** Running ferret script: bn_lev_symbols.jnl
! Test symbols which capture the latest LEVELS settings
! LEV_TEXT  The argument, if any, to the LEV qualifier
! LEV_MIN  Minimum level
! LEV_MAX  Maximum level
! LEV_NUM  Number of levels
! LEV_DEL  Delta level (irregular)
 
can sym lev*
define symbol lev_text = ""
 
shade/i=1:15/j=1:5 i*j
sho sym lev*
LEV_TEXT = """"
LEV_MIN = "0"
LEV_MAX = "76"
LEV_NUM = "38"
LEV_DEL = "2"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76"
 
contour/over/i=1:15/j=1:5 i*j
sho sym lev*
LEV_TEXT = """"
LEV_MIN = "0"
LEV_MAX = "80"
LEV_NUM = "8"
LEV_DEL = "10"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "0,10,20,30,40,50,60,70,80"
 
contour/over/i=1:15/j=1:5/lev=(0,50,3) i*j
sho sym lev*
LEV_TEXT = "(0,50,3)"
LEV_MIN = "0"
LEV_MAX = "51"
LEV_NUM = "17"
LEV_DEL = "3"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51"
 
fill/i=1:15/j=1:5/lev=(0,50,5) i*j
sho sym lev*
LEV_TEXT = "(0,50,5)"
LEV_MIN = "0"
LEV_MAX = "50"
LEV_NUM = "10"
LEV_DEL = "5"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "0,5,10,15,20,25,30,35,40,45,50"
 
contour/over/i=1:15/j=1:5/lev=(0,80,3),(56),DARK(56) i*j
sho sym lev*
LEV_TEXT = "(0,80,3),(56),DARK(56)"
LEV_MIN = "0"
LEV_MAX = "81"
LEV_NUM = "28"
LEV_DEL = "irregular"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,56,57,60,63,66,69,72,75,78,81"
 
contour/over/i=1:15/j=1:5/lev=50 i*j
sho sym lev*
LEV_TEXT = "50"
LEV_MIN = "0"
LEV_MAX = "76"
LEV_NUM = "38"
LEV_DEL = "2"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76"
 
 
shade/i=1:15/j=1:5/lev=(0,80,1) i*j
sho sym lev*
LEV_ALL = "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80"
LEV_TEXT = "(0,80,1)"
LEV_MIN = "0"
LEV_MAX = "80"
LEV_NUM = "80"
LEV_DEL = "1"
LEV_CENTERED_LABELS = "off"
 
contour/over/i=1:15/j=1:5/lev=(33) i*j
sh sym lev*
LEV_TEXT = "(33)"
LEV_MIN = "33"
LEV_MAX = "33"
LEV_NUM = "1"
LEV_DEL = "none"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "33"
*** Running ferret script: bn_mode_logo_lab.jnl
 
! bn_mode_logo_lab.jnl
! cancel both logo and labels
! NOTE this script redefined the pre-defined viewports ul, ur, ll, lr...
 
 
def view /xlim=0.:0.33/ylim=0.5:1 ul3
def view /xlim=0.33:0.66/ylim=0.5:1 um3
def view /xlim=0.66:1./ylim=0.5:1 ur3
 
def view /xlim=0.:0.33/ylim=0.:0.5 ll3
def view /xlim=0.33:0.66/ylim=0.:0.5 lm3
def view /xlim=0.66:1./ylim=0.:0.5 lr3
 
 
! can mode labels would not plot the logo anyway
set view ul3
can mode labels
can mode logo
show modes
      MODE            STATE        ARGUMENT
      DIAGNOSTIC    CANCELED            99
      VERIFY           SET         DEFAULT
      INTERPOLATE   CANCELED
      IGNORE_ERROR  CANCELED
      STUPID        CANCELED
      JOURNAL          SET         ferret.jnl
      LONG_LABEL       SET               4
      LATIT_LABEL      SET               3
      DEPTH_LABEL      SET               4
      CALENDAR         SET         minutes
      E_LABEL          SET               4
      F_LABEL          SET         minutes
      ASCII_FONT       SET
      SEGMENT          SET
      WAIT          CANCELED
      DESPERATE     CANCELED             0
      GKS              SET
      REFRESH          SET
      METAFILE      CANCELED       .gif
      PPLLIST       CANCELED       ppllist.out
      GUI           CANCELED
      LOGO          CANCELED
      LABELS        CANCELED
      GRATICULE     CANCELED
      LINECOLORS       SET               6
      UPCASE_OUTPU     SET
      NLEVELS          SET              30
      NODATA_LAB       SET
      SHRINK_YLAB   CANCELED
      CURVILINEAR   CANCELED
      LAYERZ        CANCELED
      6D_LAB           SET
      FRUGAL           SET              30
      DATE_FORMAT      SET         DEFAULT
      DSG              SET
contour/i=1:10/j=1:10 i/j
 
! restore the labels, logo still gone
set view um3
set mode labels
wire/view=0,0,2/i=1:20/j=1:20/title="My Egg Carton"/nolabel sin(i/3)*cos(j/4)
 
 
! put only labels, not logo
set view ur3
set mode labels
can mode logo
go ptest
! Description: create a simple test line plot
 
! spirograph picture ...
PLOT/VS/LINE/I=1:314 i*cos(i/20),i*sin(i/20)
 
 
! Labels restored, not logo.
! logo is not restored on an /overlay plot
set view ll3
set mode labels
shade/i=1:10/j=1:10 i*j
set mode logo
! KMS - white changed to green for PyFerret - white causing problems
plot/vs/over/line/color=green {1,4}, {1,9}
 
! but the logo is restored on the next plot command.
set view lm3
fill/i=1:10/j=1:10 i/j
 
! Verify for polygon command too
set view lr3
can mode logo
can mode labels
polygon/axes=1,0,1,0 {1,2,1}, {2,1,0.5}
 
! restore state of modes
cancel view
set mode labels
*** Running ferret script: bn_modulo_attribute.jnl
! Ferret V5.50 m
 
! Modulo attribute can take numerical values to indicate
! the modulo length of axis (subspan modulo changes)
! This script tests various string values of the attribute
! *acm* list the axis names, otherwise get random TIME* axes defined right now
use modulo_lon_time
 
sh ax lon_true, lon_moderr, lon_false, lon_mod_nounits, lon_usual
 name       axis              # pts   start                end
 LON_TRUE  LONGITUDE            5mr   1.875W(-1.875)       13.125E
   Axis span (to cell edges) = 18.75 (modulo length = 360)
 LON_MODERR X (meters)          5 r   0                    15
   Axis span (to cell edges) = 18.75
 LON_FALSE LONGITUDE            5 r   1.875W(-1.875)       13.125E
   Axis span (to cell edges) = 18.75
 LON_MOD_NOUNITS X              5mr   0                    15
   Axis span (to cell edges) = 18.75 (modulo length = axis span)
 LON_USUAL LONGITUDE            5mr   0E                   15E
   Axis span (to cell edges) = 18.75 (modulo length = 360)
sh ax time_true, time_moderr, time_false, time_mod_nounits, time_usual
 name       axis              # pts   start                end
 TIME_TRUE T (days)             4mi   30                   150
T0 = %%
   Axis span (to cell edges) = 165 (modulo length = axis span)
 TIME_MODERR T (meters)         4 i   30                   150
T0 = %%
   Axis span (to cell edges) = 165
 TIME_FALSE T (days)            4 r   120                  150
T0 = %%
   Axis span (to cell edges) = 40
 TIME_MOD_NOUNITS T             4mr   120                  150
T0 = %%
   Axis span (to cell edges) = 40 (modulo length = axis span)
 TIME_USUAL T (days)            4mr   120                  150
T0 = %%
   Axis span (to cell edges) = 40 (modulo length = axis span)
*** Running ferret script: bn550_bug_fixes.jnl
! bn550_bug_fixes.jnl
! test various fixes that went into version 5.5
! 10/02 *acm*
!
 
! Polygon/overlay calendar axis bug
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err542_poly_over_calendar
! POLY/OVER when data has a non-standard calendar caused
! calendar mismatch error, even on a plot with no time axis.
 
use err542_poly_over_calendar.nc
shade pc
poly/over/color=red/line=2/title="polygon" {220,240,280,250},{-20,70,40,-30}
 
*** Running ferret script: bn551_bug_fixes.jnl
! bn551_bug_fixes.jnl
! test various fixes that went into version 5.51
! 2/03 *acm*
!
 
! FILL plots in viewports defined with /AXES, fix clipping bug,
! and allow color keys to plot beyond viewport limits.
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err550_view_axes_fill.jnl
! err550_view_axes_fill.jnl
! acm 2/5/03
! Test FILL plots in viewports defined with /AXES;
! also let the color keys be plotted in these viewports, unless
! removed with /nokey
 
can mode logo
set win/asp=.5/siz=0.5
 
define axis/x=-10:10:1 xtest
define axis/y=-10:10:1 ytest
 
let test=x[gx=xtest]^2+y[gy=ytest]^2
 
def vi/x=.1:.9/y=.1:.3/axes bot
def vi/x=.1:.9/y=.4:.6/axes mid
def vi/x=.1:.9/y=.6:1 top
def vi/x=0:.1/y=.1:.3/axes bot1
def vi/x=0:.1/y=.4:.6/axes mid1
def vi/x=0:.1/y=.6:1 top1
 
set vi bot1
fill/nokey test
contour/over test
 
set vi bot
fill test
contour/over test
 
set vi mid1
shade/nokey test
contour/over test
 
set vi mid
shade test
contour/over test
 
set vi top1
fill/nokey test
contour/over test
 
set vi top
fill test

 PPL warning: You're attempting to use more colors than are available.
             Using PPL SHASET RESET to re-use protected colors may help.

contour/over test
 
 
can view
set win/asp=2/siz=0.3
set vi bot1
fill/nokey test
contour/over test
 
set vi bot
fill test
contour/over test
 
set vi mid1
shade/nokey test
contour/over test
 
set vi mid
shade test
contour/over test
 
set vi top1
fill/nokey test
contour/over test
 
set vi top
fill test

 PPL warning: You're attempting to use more colors than are available.
             Using PPL SHASET RESET to re-use protected colors may help.

contour/over test
 
set win/clear
set win/aspect=0.75
 
 
! position on page was incorrect, of first viewport plotted when
! defined as a VIEW/AXES viewport.
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err550_view_axes_position.jnl
! err550_view_axes_position.jnl
! acm 2/5/03
 
! position on page was incorrect, of first viewport plotted when defined
! as a VIEW/AXES viewport.
 
def view/x=.1:.5/y=.4:.6/axes mid1
def view/x=.5:.9/y=.4:.6/axes mid2
 
set view mid1
shade/x=1:10/y=1:10 x+y
set view mid2
shade/x=1:10/y=1:10 x-y
 
! SHADE bug: hlimits, vlimits without effect
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err550_shade_limits.jnl
! err550_shade_limits.jnl
! acm 2/5/03
 
! SHADE bug: hlimits, vlimits without effect
 
use coads_climatology
set view upper; shade sst[l=1]
 
set view lower; shade/hlimits=212:324/vlimits=-34:23 sst[l=1]
 
! Redefining an axis with a new calendar definition
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err550_redefine_calendar_axis.jnl
! err550_redefine_calendar_axis.jnl
! different calendar axis not recognized as a different specifier,
! requiring the axis to be redefined.
 
def axis/cal=gregorian/t=1-jan-2000:1-jan-2001:1/unit=days tax
sh axis tax
 name       axis              # pts   start                end
 TAX       TIME               367 r   01-JAN-2000 00:00    01-JAN-2001 00:00
T0 = 15-JAN-1901
   Axis span (to cell edges) = 367
def axis/cal=julian/t=1-jan-2000:1-jan-2001:1/unit=days tax
sh axis tax
 name       axis              # pts   start                end
 TAX       TIME               367 r   01-JAN-2000 00:00    01-JAN-2001 00:00
T0 = 15-JAN-1901
CALENDAR = JULIAN
   Axis span (to cell edges) = 367
 
 
! Bug in defining axis from an expression.
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err550_define_axis_expression.jnl
! err550_define_axis_expression.jnl
! reported by A. Wittenberg.
!  Axes defined from an expression only took the first part of the
!  expression The first two axis defines get it wrong (fix in xeq_define.F)
 
let a = {1,2,3}
let b = {2,3,4}
 
def ax/x xax = a/2 + b/2
list x[gx=xax]
             VARIABLE : X
                        axis XAX
             SUBSET   : 3 points (X)
 1.5 / 1:  1.500
 2.5 / 2:  2.500
 3.5 / 3:  3.500
 
def ax/x xax = (a/2) + (b/2)
list x[gx=xax]
             VARIABLE : X
                        axis XAX
             SUBSET   : 3 points (X)
 1.5 / 1:  1.500
 2.5 / 2:  2.500
 3.5 / 3:  3.500
 
def ax/x xax = (a/2 + b/2)
list x[gx=xax]
             VARIABLE : X
                        axis XAX
             SUBSET   : 3 points (X)
 1.5 / 1:  1.500
 2.5 / 2:  2.500
 3.5 / 3:  3.500
 
 
!  Note (acm)  The older syntax defines the axis correctly
 
def axis/from_data/x/name=xax a/2 + b/2
list x[gx=xax]
             VARIABLE : X
                        axis XAX
             SUBSET   : 3 points (X)
 1.5 / 1:  1.500
 2.5 / 2:  2.500
 3.5 / 3:  3.500
 
! Bug in reading seconds from time origin in nc file.
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err550_nc_seconds.jnl
! err550_nc_seconds.jnl
! 2/12/03 ACM
 
! When the time origin is specified in a NetCDF file as
! "10-JUN-1996 04:03:36", the seconds are read incorrectly.
! If it's written as "1996-06-10 04:03:36" it is read OK
 
use time_axis_seconds.nc
 
sp echo "err550_nc_seconds.jnl --- seconds of time axis" >> all_ncdump.out
sp ncdump data/time_axis_seconds.nc | grep origin >> all_ncdump.out
list t[gt=height]    ! Seconds should be 36, 37, 38...
             VARIABLE : T
                        axis TIME
             FILENAME : time_axis_seconds.nc
             SUBSET   : 5 points (TIME)
 10-JUN-1996 04:03:36 / 1:  0.000
 10-JUN-1996 04:03:37 / 2:  1.000
 10-JUN-1996 04:03:38 / 3:  2.000
 10-JUN-1996 04:03:39 / 4:  3.000
 10-JUN-1996 04:03:40 / 5:  4.000
 
! Bug in plotting polymarker dots with pen numbers gt 6
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err550_dots_thickpens.jnl
! err550_dots_thickpens.jnl
! For pen code higher than 6, get *  rather than dot.
! also for vector plots having short vectors that are plotted with dots.
 
plot/sym=dot/color=8/i=1:10 i
*** Running ferret script: bn_multi_line_labels.jnl
     ! bn_multi_line_labels.jnl
! March 31, 2003
!
! ACM 4/2005 ! set mode meta to save this plot for the metafile checks.
!            and ! cancel mode logo, so that .plt files are comparable.
! ACM 1/2007 Change from a bunch of plot items in a viewport, to separate
!            plots; for better checking of batch mode
!  2/18 *acm* keep mode logo turned off
! 11/19 *acm* Save plots as gifs to make comparisons with all these examples
 
plot/i=1:100/title="multi line title<nl>with the second line pretty long: \
so Ferret will resize the entire title. Titles are sized according to the\
<nl>longest line <nl>and centered individually" i*cos(i/8)
ppl plot
plot/over/i=1:100 i*sin(i/8)
 
plot/i=1:100/title="@p2two-line<NL>RED title"/set i*cos(i/8)
ppl ylab "A four-line y label.<nl>second line<nl>third line<NL>fourth line"
ppl xlab "a two-line X label. <nl>Not good together with a multi-line title"
ppl plot
 
plot/over/i=1:100/title="short two-line<nl>title for the overlay line" i*sin(i/8)
plot/over/i=1:100/title="here is the key for the<nl>second overlay line" i*sin(i/4)
 
label 10,80,-1,-20,0.2,"@CSfonts and @p2colors<nl>a@p1nd at an angle<NL>\
no@p3w green and @CRCR font<NL>back@CS to script"
 
label 30,-70,-1,40,0.2,"first line, then blank<NL> <NL>third line, all rotated"
 
label/nouser 6.5,6,1,90,0.2,"@p2Another @CImoveable label<nl>Set to @CRCR and @p4P4\
<NL>at 90 degrees"
frame/file=multi_line_labels1.gif
 
 
define axis/t=15-jun-2010:30-aug-2010:1/t0=1-jun-2010/units=days taxis
let var = t[gt=taxis]
 
plot/title=" " var*sin(var/12)
annotate/norm/x=0.5/y=1.1/halign=0/siz=0.14 "multi-line key labels"
plot/over/title="Three-lines<nl>second line<nl>overlay 1" var*sin(var/6)
plot/over/title="Two-lines<nl>overlay 2" var*cos(var/6)
plot/over/title="Three-lines<nl>second line<nl>overlay 3" -1*cos(var/10)
plot/over/title="One-line" var*cos(var/8)
plot/over/title="Three-line<nl>second<nl>overlay5" var*cos(var/14)
plot/over/title="Two-line<nl>overlay6" var*cos(var/20)
plot/over/title="Three-line<nl>second<nl>overlay7" var*sin(var/12)
frame/file=multi_line_labels2.gif
 
plot/i=1:100 i*cos(i/8)
 
 
! label 30,95,0,0,0.1,\
! label 70,95,1,0,0.1,\
label 3,95,-1,0,0.12,\
"@CRHere is a long label, made with the LABEL command:<NL>\
 <NL> Ferret is an interactive computer visualization and analysis<NL>\
environment designed to meet the needs of oceanographers and<NL>\
meteorologists analyzing large and complex gridded data sets. It<NL>\
runs on most Unix systems, and on Windows NT/9x using X<NL>\
windows for display. It can be installed to run from a Web<NL>\
browser (WebFerret) for use while away from your desk or<NL>\
from a system lacking X windows software. It can transparently<NL>\
access extensive remote Internet data bases using OPeNDAP,<NL>\
formerly known as DODS. See the dods webpage\
<NL> <NL>\
Ferret was developed by the Thermal Modeling and Analysis<NL>\
Project (TMAP) at PMEL in Seattle to analyze the outputs of its<NL>\
numerical ocean models and compare them with gridded,<NL>\
observational data. The model data sets are generally multi-<NL>\
gigabyte in size with mixed 3 and 4-dimensional variables defined<NL>\
on staggered grids. Ferret offers a Mathematica-like approach to<NL>\
analysis, new variables may be defined interactively as<NL>\
mathematical expressions involving data set variables.<NL>\
Calculations may be applied over arbitrarily shaped regions. Fully<NL>\
documented graphics are produced with a single command.\
<NL> <NL>\
Many excellent software packages have been developed recently<NL>\
for @p2scientific visualization@p1. The features that make Ferret distinctive<NL>\
among these packages are Mathematica-like flexibility,<NL>\
geophysical formatting, intelligent connection to its data base,<NL>\
memory management for very large calculations, and symmetrical<NL>\
processing in 4 dimensions."
frame/file=multi_line_labels3.gif
 
 
plot/sym/i=1:5/nolab/noaxes i
ppl ylab "@CRlong y label<NL>@p2line 2 in red, longer than the other lines."
ppl xlab "@p4Tests using the %xaxis and %yaxis commands<NL>@p5@CItwo lines<NL>center a@P1 long third line too"
ppl %yaxis/nouser,0,50,4,1, , , ,-1
ppl %xaxis/nouser,0,50,4,1, , , ,-1
 
ppl %yaxis/nouser,0,50,4,2, , , ,0
ppl %xaxis/nouser,0,50,4,2.5, , , ,0
 
ppl %yaxis/nouser,0,50,4,6, , , ,1
ppl %xaxis/nouser,0,50,4,4, , , ,1
frame/file=multi_line_labels4.gif
 
 
can view; set view upper
plot/i=1:100/axes=1,0,0,1/set/title="labels on top and right<nl>space for two lines on the y axis at the right" i*cos(i/8)
ppl xlab "a multi line x label<NL>here is line 2<NL>here is line three<NL>here is line four"
ppl labset, , , 0.08
ppl ylab "a multi line y label<NL>here is line two<NL>here is line three<NL>"
ppl plot
 
set view lower
ppl axlen `($ppl$xlen)-1`
 !-> ppl axlen 7
 
plot/i=1:100/axes=1,0,0,1/set/title="shortened the x axis to make space" i*cos(i/8)
ppl xlab "a multi line x label<NL>here is line two<NL>here is line three<NL>here is line four"
ppl ylab "a multi line y label<NL>here is line two<NL>here is line three<NL>here is line four"
ppl plot
 
frame/file=multi_line_labels5.gif
! reset
can view
ppl axlen,8
 
! size and rotate moveable labels.
 
plot/i=1:100/set i*cos(i/8)
ppl labs,4,20,-60,-1,"A @CIppl labs@SR label,<NL>change size and <NL>rotation"
ppl rlabs,4,45
ppl hlabs,4,.4
ppl title "@P2@ACRED title in AC font<NL>put P2 first then AC otherwise \
the at sign in front of P2 not recognized"
ppl plot
 
frame/file=multi_line_labels6.gif
ppl rlabs,4,0
*** Running ferret script: bn552_bug_fixes.jnl
! bn552_bug_fixes.jnl
! test various fixes that went into version 5.52
! 3/03 *acm*
!
! 4/03 *kob*  Add fixes for string bugs
 
! Default behavior (all axes on) was not reset after a plot/set/AXES=
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err551_axes_set.jnl
! Default behavior (all axes on) was not reset after a PLOT/SET/AXES=
 
!   Choose just some axes to plot with /AXES qualifier
SET VIEW upper
PLOT/SET/AXES=0,1,1,0/i=1:12 1./i
PPL TITLE "PLOT/SET/AXES  only two axes"
PPL PLOT
 
! This plot should have the default behavior; all axes plotted.
! But, pre-v552, keeps settings from previous PLOT/SET/AXES=
 
SET VIEW lower
plot/i=1:100/title="PLOT (no quals); all axes plotted" i*cos(i/12)
 
! Test whether too many levels specified. Previous to v552, no
! test on SHADE and POLYGON plots, and these crashed Ferret.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err551_num_levels.jnl
! Test whether too many levels specified. Previous to v552, no
! test was made on SHADE and POLYGON plots, and these crashed Ferret.
! The results should all be error messages: too many levels.
 
SET MODE IGNORE_ERROR
USE coads_climatology
CONTOUR/L=1/LEV=0.01d sst
FILL/L=1/LEV=0.01d sst
 
SHADE/L=1/LEV=0.01d sst
can data/all
 
LET xpts = 180 + 50*COS(2*3.14*I[I=1:50]/60)
LET ypts = 15  + 20*SIN(2*3.14*I[I=1:50]/60)
LET sst = 25 - ypts + RANDN(ypts)
plot/vs xpts,ypts
GO polymark POLYGON/KEY/LEV=0.01d xpts,ypts,sst,star
 
 
SET MODE/LAST IGNORE_ERROR
SET WIN/CLEAR
 
! Check for invalid value of calendar attribute on reading NetCDF files.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err551_invalid_calendar.jnl
! check on input for invalid calendar name
! If file gives calendar attribute with unrecognized name,
! give an error message and use an abstract axis.
 
set data err_calendar.nc
sh data
     currently SET data sets:
    1> ./data/err_calendar.nc  (default)
 name     title                             I         J         K         L
 TIME     observation time                 ...       ...       ...       1:12
       (invalid coordinate axis)
 
 
! String bug fixes *kob*
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err551_strings.jnl
 
 
! first make sure file is non-existent
sp rm input.txt
 
! first bug - first list always worked fine, and second list would crash.
!	      fix turned out to be that you still had to (m)alloc space even
!             for a null pointer in get_sys_cmnd.c
!
! define string variable
let a = {"first", spawn:"ls input.txt", "last"}
list a
             VARIABLE : {"first", SPAWN:"ls input.txt", "last"}
             SUBSET   : 3 points (X)
 1   / 1:"first"
 2   / 2:""     
 3   / 3:"last" 
list a
             VARIABLE : {"first", SPAWN:"ls input.txt", "last"}
             SUBSET   : 3 points (X)
 1   / 1:"first"
 2   / 2:""     
 3   / 3:"last" 
 
 
! second bug fix - this used to crash during the list command.
!		   fix turned out to be that needed make sure to (m)alloc enough
! 		   space for string plus "\n" character - in get_sys_cmnd.c
 
sp echo "GANGES_BRAHMAPUTRA" > input.txt
sp echo "X=86e:93e/Y=20n:25n  " >> input.txt
sp echo "X=118e:123e/Y=29n:34n  " >> input.txt
sp echo "X=65w:57w/Y=7n:12n  " >> input.txt
let a = {spawn:"cat input.txt"}
load a
list a
             VARIABLE : {SPAWN:"cat input.txt"}
             SUBSET   : 4 points (X)
 1   / 1:"GANGES_BRAHMAPUTRA"     
 2   / 2:"X=86e:93e/Y=20n:25n  "  
 3   / 3:"X=118e:123e/Y=29n:34n  "
 4   / 4:"X=65w:57w/Y=7n:12n  "   
 
! last one - make sure bug gabe found is fixed as well
!            used to have incorrect results on second list command
!   	     fix turned out to be that strcmp function was declared "float"
!            when it should have been void.
 
let mystring = {"a","b","a","c"}
list strcmp("b", mystring)
             VARIABLE : STRCMP("b", MYSTRING)
             SUBSET   : 4 points (X)
 1   / 1:  1.000
 2   / 2:  0.000
 3   / 3:  1.000
 4   / 4: -1.000
list strcmp("b", mystring)
             VARIABLE : STRCMP("b", MYSTRING)
             SUBSET   : 4 points (X)
 1   / 1:  1.000
 2   / 2:  0.000
 3   / 3:  1.000
 4   / 4: -1.000
 
 
! 2-D @AVE bug fix
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err551_2dave.jnl
! Bug in 2-D averaging, if source data thats loaded has a
! larger range than the dest data, code didnt check whether
! source grid cells actually overlapped destination cells
 
use coads_climatology
load/l=1 sst
 
def axis/x=110w:90w:5 xax
def axis/y=10n:20n:2 yax
 
list/l=1/y=20 sst[gx=xax@ave,gy=yax@ave]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
                        regrid: 5 deg on X@AAV, 2 deg on Y@AAV
             FILENAME : coads_climatology.cdf
             SUBSET   : 5 points (LONGITUDE)
             LATITUDE : 20N
             TIME     : 16-JAN 06:00
               20N   
                6
 110W   / 1:  24.04
 105W   / 2:  25.46
 100W   / 3:  24.57
 95W    / 4:  23.82
 90W    / 5:  25.00
 
! RETURN error message, and new var,RETURN=dsettitle  argument
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err551_return_message.jnl
 ! err551_return_message.jnl
 ! 4/15/03 ACM
 
SET MODE IGNORE_ERROR
 
use dstitle
 
! This is not a valid argument for RETURN.  The error message
! has been improved to include all valid arguments.
 
say `axy, return=xx`
 
! This is a new argument: title from the global attributes secion.
say `axy,return=dsettitle`
 !-> MESSAGE/CONTINUE dataset title for 4D string data
dataset title for 4D string data
 
SET MODE/LAST IGNORE_ERROR
 
!  file/form=stream didnt see file in another directory
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err551_streamread_directory.jnl
! Bug: file/form=stream doesnt see file in another directory
 
sp rm -f subdir/a.dat
 
def ax/x=1:1/np=1 xax
def grid/x=xax g
list/clobber/form=stream/file="a.dat" 1
file/form=stream/grid=g/var=a "a.dat"
list a
             VARIABLE : a
             FILENAME : a.dat
             X        : 1
          1.000
 
can dat/all
sp mkdir -p subdir
sp mv a.dat subdir
file/form=stream/grid=g/var=a "subdir/a.dat"
list a
             VARIABLE : a
             FILENAME : a.dat
             FILEPATH : subdir/
             X        : 1
          1.000
 
! GXY=var  regridding syntax, when the variable hasnt been loaded
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err551_regrid_undef_grid.jnl
! err551_regrid_undef_grid.jnl
! 5/03 *acm* based on bn_regrid_to_user; more testing of multi-axis GXY=var
!            syntax, when the destination grid is not yet defined
 
! test various regridding combos that involve user-defined variables
! for the target grids
 
 
set mode ignore_errors
 
use coads_climatology
use levitus_climatology
 
! define test objects
let a = sst[d=coads_climatology] + 1
let b = sst + 1		! data set unspecified
DEFINE AXIS/Y=20s:20n:.5/units=degrees yax
DEFINE GRID/like=sst[d=coads_climatology]/y=yax gg
 
! reference data
list/x=158e:161e/y=6s:4s temp[d=2,k=1]
             VARIABLE : TEMPERATURE (DEG C)
             FILENAME : levitus_climatology.cdf
             SUBSET   : 3 by 2 points (LONGITUDE-LATITUDE)
             DEPTH (m): 0
             158.5E 159.5E 160.5E 
             139    140    141
 4.5S / 86:  29.51  29.44  29.38
 5.5S / 85:  29.59  29.53  29.46
 
! basic regrid (implicit grid -- sst and temp geometries are mismatched)
list/x=160e/y=5s temp[d=2,k=1,gxy=a[d=1]]
             VARIABLE : TEMPERATURE (DEG C)
                        regrid: 2 deg on X, 2 deg on Y
             FILENAME : levitus_climatology.cdf
             LONGITUDE: 159E
             LATITUDE : 5S
             DEPTH (m): 0
          29.52
show grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 ZAXLEVITR1_1 DEPTH (m)         1 r-  0                    0                   1 pt
 normal    T
 
can data/all
can var/all
can grid
 
! multiple axis syntax: GXY=gg
define axis/x=1:6:1 x1
define axis/y=1:4:1 y1
define axis/z=1:3:1 z1
define axis/x=1:6:2 x2
define axis/y=1:4:2 y2
define axis/z=1:3:2 z2
let a1 = x[gx=x1]+y[gy=y1]+z[gz=z1]
let a2 = x[gx=x2]+y[gy=y2]+z[gz=z2]
list a1
             VARIABLE : X[GX=X1]+Y[GY=Y1]+Z[GZ=Z1]
             SUBSET   : 6 by 4 by 3 points (X-Y-Z)
             1      2      3      4      5      6    
             1      2      3      4      5      6
 ---- K:1 Z:   1
 1   / 1:   3.00   4.00   5.00   6.00   7.00   8.00
 2   / 2:   4.00   5.00   6.00   7.00   8.00   9.00
 3   / 3:   5.00   6.00   7.00   8.00   9.00  10.00
 4   / 4:   6.00   7.00   8.00   9.00  10.00  11.00
 ---- K:2 Z:   2
 1   / 1:   4.00   5.00   6.00   7.00   8.00   9.00
 2   / 2:   5.00   6.00   7.00   8.00   9.00  10.00
 3   / 3:   6.00   7.00   8.00   9.00  10.00  11.00
 4   / 4:   7.00   8.00   9.00  10.00  11.00  12.00
 ---- K:3 Z:   3
 1   / 1:   5.00   6.00   7.00   8.00   9.00  10.00
 2   / 2:   6.00   7.00   8.00   9.00  10.00  11.00
 3   / 3:   7.00   8.00   9.00  10.00  11.00  12.00
 4   / 4:   8.00   9.00  10.00  11.00  12.00  13.00
list a1[gzxy=a2]
             VARIABLE : X[GX=X1]+Y[GY=Y1]+Z[GZ=Z1]
                        regrid: 2 delta on X, 2 delta on Y, 2 delta on Z
             SUBSET   : 4 by 3 by 2 points (X-Y-Z)
             1      3      5      7    
             1      2      3      4
 ---- K:1 Z:   1
 1   / 1:   3.00   5.00   7.00   ....
 3   / 2:   5.00   7.00   9.00   ....
 5   / 3:   ....   ....   ....   ....
 ---- K:2 Z:   3
 1   / 1:   5.00   7.00   9.00   ....
 3   / 2:   7.00   9.00  11.00   ....
 5   / 3:   ....   ....   ....   ....
 
can data/all
can var/all
 
! Convoluted definitions, LIST needs data on a grid not yet loaded.
use clim_airt_lev.cdf
def axis/t=16-JUL-1966:16-MAY-1967:1/unit=month hope_month
! use climatological_axes
! can dat climatological_axes
 
let dzdt_month = airt[gt=hope_month]
let dzdt_clim = airt[gt=month_reg@mod]
let dzdt_anom = dzdt_month - dzdt_clim[gt=dzdt_month@asn]
set region/x=100w/y=0
list dzdt_anom
             VARIABLE : DZDT_MONTH - DZDT_CLIM[GT=DZDT_MONTH@ASN]
             FILENAME : clim_airt_lev.cdf
             SUBSET   : 11 points (TIME)
             LONGITUDE: 100.5W
             LATITUDE : 0.167S
                    100.5W 
                    130
 16-JUL-1966 /  1: -1.422
 15-AUG-1966 /  2: -2.972
 14-SEP-1966 /  3: -4.503
 15-OCT-1966 /  4: -3.882
 14-NOV-1966 /  5: -2.580
 15-DEC-1966 /  6: -1.080
 14-JAN-1967 /  7:  1.424
 14-FEB-1967 /  8:  2.962
 16-MAR-1967 /  9:  4.503
 15-APR-1967 / 10:  3.838
 16-MAY-1967 / 11:  2.609
 
 
! Symbol substituted on each repetition of REPEAT
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err551_repeat_sym.jnl
 
! This had worked, but stopped working in v541
! symbol substituted on each repetition of REPEAT
 
! (The cause was the fix intended to repair what it
!  tested in err540_parse_repeat.jnl )
 
def sym a 0; rep/i=1:3:1 (def sym a `i`; say ($a))
 !-> rep/i=1:3:1 (def sym a `i`; say ($a))
!-> REPEAT: I=1
 !-> def sym a 1
 !-> MESSAGE/CONTINUE 1
1
!-> REPEAT: I=2
 !-> def sym a 2
 !-> MESSAGE/CONTINUE 2
2
!-> REPEAT: I=3
 !-> def sym a 3
 !-> MESSAGE/CONTINUE 3
3
 
! data from nc file with time axis modulo=value, when regridded to
! another time axis, some times have missing data
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err551_modulo_nc_regrid.jnl
! data from nc file with time axis having modulo=value, when regridded
! to another time axis, some times have missing data
 
! First write a file with a monthly climatology:
 
use coads_vwnd
set region/x=161w/y=39n
!use climatological_axes
!can data climatological_axes
 
let vwnd_clim = vwnd[gt=month_reg@mod]
 
save/clobber/file=clim.nc vwnd_clim
 
! File clim.nc is a climatology with the attribute
!		MONTH_REG:modulo = 8765.82 ;
 
! The data is ok if we now regrid to the monthly_navy_winds time axis
list/l=23:27 vwnd_clim[gt=vwnd[d=1]]
             VARIABLE : VWND[GT=MONTH_REG@MOD]
                        regrid: VWND
             FILENAME : coads_vwnd.cdf
             SUBSET   : 5 points (TIME)
             LONGITUDE: 161W
             LATITUDE : 39N
                       161W   
                        90
 16-NOV-1947 00 / 23: -3.076
 16-DEC-1947 12 / 24:  1.674
 16-JAN-1948 12 / 25:  3.429
 15-FEB-1948 12 / 26:  1.954
 16-MAR-1948 12 / 27:  2.761
 
! now use the climatology data file; note that when regridded to the
! time axis of vwnd, some times have missing data
 
can data/all
can var/all
 
use coads_vwnd
use clim
list/l=23:27 vwnd_clim[gt=vwnd[d=1]]
             VARIABLE : VWND[GT=MONTH_REG@MOD]
                        regrid: on T
             FILENAME : clim.nc
             SUBSET   : 5 points (TIME)
             LONGITUDE: 161W
             LATITUDE : 39N
                       161W   
                         1
 16-NOV-1947 00 / 23: -3.076
 16-DEC-1947 12 / 24:  1.674
 16-JAN-1948 12 / 25:  3.429
 15-FEB-1948 12 / 26:  1.954
 16-MAR-1948 12 / 27:  2.761
 
 
! FFT frequency axis not computed accurately enough.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err551_fft_freqaxis.jnl
 
DEFINE AXIS/t=1:4998:1 dayt
let tpts = t[gt=dayt]
 
LET sample_function = sin(0.5*tpts - 6.)/2. - cos(0.3*tpts)
 
LET days_fft = ffta(sample_function)
LOAD days_fft
LET FFT_nf = `days_fft,return=lend`
 !-> DEFINE VARIABLE FFT_nf = 2499
 
list FFT_nf
             VARIABLE : 2499
          2499.
list 2*FFT_nf
             VARIABLE : 2*FFT_NF
          4998.
list `tpts,return=lend`
 !-> list 4998
             VARIABLE : constant
          4998.
 
 
! No error message on request for time on bad time axis
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err551_no_taxis_errmsg.jnl
! The time axis is bad, having repeated values, so an abstract axis is
! used by Ferret and the list/t=time should result in an error.
 
SET MODE IGNORE_ERROR
 
use bad_taxis.nc
list/t=1-jan-1990 dummy
 
SET MODE/LAST IGNORE_ERROR
*** Running ferret script: bn_set_var_scale_off.jnl
! Qualifiers /SCALEFACTOR=  and /OFFSET  for SET VARIABLE.
! Only for NetCDF datasets
! Applied after NetCDF Scale_factor and add_offset attributes
! New RETURN= arguments NC_SCALE, NC_OFF for values of NetCDF attributes
!             and USER_SCALE, USER_OFF for those set with SET VAR
 
! This dataset has scale_factor and add_offset attributes.
 
USE err491_attval
LIST/NOHEAD/PREC=6 elev[x=@ave,y=@ave]
          2.97979
SET VAR/OFFSET=1 elev
LIST/NOHEAD/PREC=6 elev[x=@ave,y=@ave]
          3.97979
SET VAR/SCALE=10 elev
LIST/NOHEAD/PREC=6 elev[x=@ave,y=@ave]
          30.7979
 
! Output the values of the scales and offsets
 
SAY `elev,RETURN=nc_scale`
 !-> MESSAGE/CONTINUE 2.746749679545871E-04
2.746749679545871E-04
SAY `elev,RETURN=nc_off`
 !-> MESSAGE/CONTINUE 0
0
SAY `elev,RETURN=user_scale`
 !-> MESSAGE/CONTINUE 10
10
SAY `elev,RETURN=user_off`
 !-> MESSAGE/CONTINUE 1
1
 
! These SET VAR will produce error msgs: qualifiers are set up only for
! variables in NetCDF files
 
SET MODE IGNORE_ERROR
 
FILE/VAR=x1,x2 EZ.DAT
 
SET VAR/OFFSET=1 x1
SET VAR/SCALE=10 x2
 
SET MODE/LAST IGNORE_ERROR
*** Running ferret script: bn_longvarnames.jnl
! variable names up to 128 characters long
! 3/2006 make them 127 to be able to add the null terminator for C strings
!        else not used correctly in linked-list attribute structure.
 
LET a234567890b234567890c234567890d234567890e234567890f234567890g234567890h234567890i234567890d234567890j234567890k234567890L234567 = {12,14,20,28,22,10}
LIST a234567890b234567890c234567890d234567890e234567890f234567890g234567890h234567890i234567890d234567890j234567890k234567890L234567
             VARIABLE : {12,14,20,28,22,10}
             SUBSET   : 6 points (X)
 1   / 1:  12.00
 2   / 2:  14.00
 3   / 3:  20.00
 4   / 4:  28.00
 5   / 5:  22.00
 6   / 6:  10.00
 
! With a transformation, which makes the whole specification longer
 
list a234567890b234567890c234567890d234567890e234567890f234567890g234567890h234567890i234567890d234567890j234567890k234567890L234567,\
  A234567890B234567890C234567890D234567890E234567890F234567890G234567890H234567890I234567890D234567890J234567890K234567890L234567[i=@SHF:1]
             X: 0.5 to 6.5
 Column  1: A234567890B234567890C234567890D234567890E234567890F234567890G234567890H234567890I234567890D234567890J234567890K234567890L234567 is {12,14,20,28,22,10}
 Column  2: A234567890B234567890C234567890D234567890E234567890F234567890G234567890H234567890I234567890D234567890J234567890K234567890L234567* is {12,14,20,28,22,10} (shifted by 1 pts on X)
       A2345678  A234567890B234567890C234567890D234567890E234567890F234567890G234567890H234567890I234567890D234567890J234567890K234567890L234567
1   / 1:   12.00   14.00
2   / 2:   14.00   20.00
3   / 3:   20.00   28.00
4   / 4:   28.00   22.00
5   / 5:   22.00   10.00
6   / 6:   10.00    ....
 
! SET GRID using long variable name
SET GRID a234567890b234567890c234567890d234567890e234567890f234567890g234567890h234567890i234567890d234567890j234567890k234567890L234567
SHOW GRID
 Default grid for DEFINE VARIABLE is XABSTRACT
 Last successful data access was on grid XABSTRACT
    GRID XABSTRACT
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              full
 normal    Y
 normal    Z
 normal    T
 
 
 
! save to a file a variable that is 128 long
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
LET a234567890b234567890c234567890d234567890e234567890f234567890g234567890h234567890i234567890d234567890j234567890k234567890L234567 = {12,14,20,28,22,10}
SAVE/CLOBBER/FILE=longvname.nc a234567890b234567890c234567890d234567890e234567890f234567890g234567890h234567890i234567890d234567890j234567890k234567890L234567
 
! read from the file
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
USE longvname
LIST a234567890b234567890c234567890d234567890e234567890f234567890g234567890h234567890i234567890d234567890j234567890k234567890L234567
             VARIABLE : {12,14,20,28,22,10}
             FILENAME : longvname.nc
             SUBSET   : 6 points (X)
 1   / 1:  12.00
 2   / 2:  14.00
 3   / 3:  20.00
 4   / 4:  28.00
 5   / 5:  22.00
 6   / 6:  10.00
 
! save a 4-D variable
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
LET a234567890b234567890c234567890d234567890e234567890f234567890g234567890h234567890i234567890d234567890j234567890k234567890L234567 = I[I=1:5] * J[J=1:4] * K[K=1:3] + L[L=1:3]
SAVE/CLOBBER/FILE=longvname.nc a234567890b234567890c234567890d234567890e234567890f234567890g234567890h234567890i234567890d234567890j234567890k234567890L234567
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
USE longvname.nc
lIST/I=1/J=2 a234567890b234567890c234567890d234567890e234567890f234567890g234567890h234567890i234567890d234567890j234567890k234567890L234567
             VARIABLE : I[I=1:5] * J[J=1:4] * K[K=1:3] + L[L=1:3]
             FILENAME : longvname.nc
             SUBSET   : 3 by 3 points (Z-T)
             X        : 1
             Y        : 2
             1      2      3    
             1      2      3
 1   / 1:  3.000  5.000  7.000
 2   / 2:  4.000  6.000  8.000
 3   / 3:  5.000  7.000  9.000
LIST/K=2/L=3 a234567890b234567890c234567890d234567890e234567890f234567890g234567890h234567890i234567890d234567890j234567890k234567890L234567
             VARIABLE : I[I=1:5] * J[J=1:4] * K[K=1:3] + L[L=1:3]
             FILENAME : longvname.nc
             SUBSET   : 5 by 4 points (X-Y)
             Z        : 2
             T        : 3
             1      2      3      4      5    
             1      2      3      4      5
 1   / 1:   5.00   7.00   9.00  11.00  13.00
 2   / 2:   7.00  11.00  15.00  19.00  23.00
 3   / 3:   9.00  15.00  21.00  27.00  33.00
 4   / 4:  11.00  19.00  27.00  35.00  43.00
*** Running ferret script: bn_shakey.jnl
! Changes to shade key:
! - Default size is a little bigger
! - To put key labels on the left or bottom of the key, multiply the size by -1
! - Previously ALL OF kx_lo, kx_hi,ky_lo, ky_hi had to be set, or none of them
!   were applied. With changes as of 3/3/03 can set any of these independently.
!   If, say only x1 and y1 are set, the other corners are set, keeping the default
!   width and/or height.
 
use ocean_atlas_temp
set region/x=130:290/y=-45:45
 
shade/title="shift shakey left and up"/set temp[l=1]
 
let x1 = `($ppl$xorg)+($ppl$xlen)`
 !-> DEFINE VARIABLE x1 = 9.2
let y1 = `($ppl$yorg)+.4`
 !-> DEFINE VARIABLE y1 = 1.8
 
ppl shakey ,,.12,,,,`x1`,,`y1`
 !-> ppl shakey ,,.12,,,,9.2,,1.8
ppl shade
ppl list shakey

         DO KEY  ORIENT  LAB SIZE  LAB INC  LAB DIG  LAB LEN
              1       1      0.12        0        5        9


         X LO     X HI     Y LO     Y HI
         9.20     9.49     1.80     7.80
 
shade/title="set only x2,y2"/set temp[l=1]
 
let x2 = `($ppl$xorg)+($ppl$xlen)`
 !-> DEFINE VARIABLE x2 = 9.2
let y2 = `($ppl$yorg)+($ppl$ylen) - .4`
 !-> DEFINE VARIABLE y2 = 7
 
ppl shakey ,,.12,,,,,`x2`,,`y2`
 !-> ppl shakey ,,.12,,,,,9.2,,7
ppl shade
ppl list shakey

         DO KEY  ORIENT  LAB SIZE  LAB INC  LAB DIG  LAB LEN
              1       1      0.12        0        5        9


         X LO     X HI     Y LO     Y HI
         8.91     9.20     1.00     7.00
 
 
! resetting location of horizontal shade keys
 
shade/title="shakey labels above it"/set temp[l=1]
 
let x1 = `($ppl$xorg)+0.1`
 !-> DEFINE VARIABLE x1 = 1.3
let y1 = `($ppl$yorg)+($ppl$ylen)+0.1`
 !-> DEFINE VARIABLE y1 = 7.5
let y2 = `($ppl$yorg)+($ppl$ylen)+0.5`
 !-> DEFINE VARIABLE y2 = 7.9
 
ppl shakey ,0,-.12,2,,,`x1`,,`y1`,`y2`
 !-> ppl shakey ,0,-.12,2,,,1.3,,7.5,7.9
go unlabel 4
go unlabel 5
ppl shade
ppl list shakey

         DO KEY  ORIENT  LAB SIZE  LAB INC  LAB DIG  LAB LEN
              1       0     -0.12        2        5        9


         X LO     X HI     Y LO     Y HI
         1.30     9.30     7.50     7.90
 
 
let x1 = `($ppl$xorg)+1`
 !-> DEFINE VARIABLE x1 = 2.2
let x2 = `($ppl$xorg)+($ppl$xlen)-1`
 !-> DEFINE VARIABLE x2 = 8.199999999999999
let y1 = `($ppl$yorg)`
 !-> DEFINE VARIABLE y1 = 1.4
shade/title="shorter, at bottom"/set temp[l=1]
ppl shakey ,0,-.12,3,,,`x1`,`x2`,`y1`
 !-> ppl shakey ,0,-.12,3,,,2.2,8.199999999999999,1.4
ppl shade
ppl list shakey

         DO KEY  ORIENT  LAB SIZE  LAB INC  LAB DIG  LAB LEN
              1       0     -0.12        3        5        9


         X LO     X HI     Y LO     Y HI
         2.20     8.20     1.40     1.49
 
shade/title="on left, labelled on left"/set temp[l=1]
ppl axlabp, 1,1
 
let x1 = `($ppl$xorg)`  - .5
 !-> DEFINE VARIABLE x1 = 1.2  - .5
let x2 = `($ppl$xorg)`  - 0.1
 !-> DEFINE VARIABLE x2 = 1.2  - 0.1
ppl shakey ,1,-.1,2,,,`x1`,`x2`
 !-> ppl shakey ,1,-.1,2,,,0.7,1.1
ppl shade
 
ppl axlabp, -1, -1
 
set view upper
ppl window off
let y1 = -1* `($ppl$yorg)`
 !-> DEFINE VARIABLE y1 = -1* 1.4
shade/title="In viewport, shakey located anywhere on page"/set temp[l=1]
ppl shakey ,0,-.1,2,,,,,`y1`
 !-> ppl shakey ,0,-.1,2,,,,,-1.4
ppl shade
ppl list shakey

         DO KEY  ORIENT  LAB SIZE  LAB INC  LAB DIG  LAB LEN
              1       0     -0.10        2        5        9


         X LO     X HI     Y LO     Y HI
         1.20     9.20    -1.40    -1.31
*** Running ferret script: bn_eof_4d.jnl
! bn_eof_4d.jnl
! test EOFs on XYZT grids
 
! In version 6.8 (double precision), the old eof functions are not available
! Run the script calling eofsvd functions and exit, leaving old eof function calls.
 
! dataset with 4 dimensions; compute EOF at each vertical level.
 
use gt4d011.cdf
 
let eofsp = eofsvd_space (temp[i=91:95,j=36:40,k=1:4])
save/file=eofsp.cdf/clobber eofsp
 
can data/all
can var/all
use eofsp
 
set view ul
shade eofsp[k=1,l=1]
list eofsp[k=1,l=1]
             VARIABLE : EOFSVD_SPACE (TEMP[I=91:95,J=36:40,K=1:4])
             FILENAME : eofsp.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             T        : 1
             139.5W 138.5W 137.5W 136.5W 135.5W 
               1      2      3      4      5
 1.83S / 5:  2.254  2.347  2.424  2.475  2.501
 2.17S / 4:  2.270  2.361  2.431  2.477  2.503
 2.5S  / 3:  2.266  2.351  2.413  2.455  2.481
 2.83S / 2:  2.234  2.307  2.359  2.396  2.424
 3.17S / 1:  2.168  2.227  2.269  2.300  2.330
set view ur
shade eofsp[k=2,l=1]
list eofsp[k=2,l=1]
             VARIABLE : EOFSVD_SPACE (TEMP[I=91:95,J=36:40,K=1:4])
             FILENAME : eofsp.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 15
             T        : 1
             139.5W 138.5W 137.5W 136.5W 135.5W 
               1      2      3      4      5
 1.83S / 5:  2.282  2.377  2.454  2.507  2.535
 2.17S / 4:  2.296  2.390  2.461  2.509  2.536
 2.5S  / 3:  2.291  2.377  2.441  2.485  2.512
 2.83S / 2:  2.257  2.333  2.386  2.424  2.452
 3.17S / 1:  2.191  2.251  2.294  2.325  2.356
 
set view ll
shade eofsp[k=3,l=1]
list eofsp[k=3,l=1]
             VARIABLE : EOFSVD_SPACE (TEMP[I=91:95,J=36:40,K=1:4])
             FILENAME : eofsp.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 25
             T        : 1
             139.5W 138.5W 137.5W 136.5W 135.5W 
               1      2      3      4      5
 1.83S / 5:  1.723  1.840  1.941  2.005  2.047
 2.17S / 4:  1.639  1.744  1.831  1.882  1.920
 2.5S  / 3:  1.515  1.605  1.676  1.714  1.746
 2.83S / 2:  1.358  1.428  1.481  1.503  1.528
 3.17S / 1:  1.175  1.222  1.256  1.263  1.282
set view lr
shade eofsp[k=4,l=1]
list eofsp[k=4,l=1]
             VARIABLE : EOFSVD_SPACE (TEMP[I=91:95,J=36:40,K=1:4])
             FILENAME : eofsp.cdf
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             DEPTH (m): 35
             T        : 1
             139.5W 138.5W 137.5W 136.5W 135.5W 
               1      2      3      4      5
 1.83S / 5:  1.216  1.301  1.374  1.422  1.452
 2.17S / 4:  1.086  1.164  1.229  1.270  1.298
 2.5S  / 3:  0.937  1.006  1.059  1.091  1.116
 2.83S / 2:  0.772  0.830  0.869  0.891  0.911
 3.17S / 1:  0.599  0.641  0.666  0.681  0.700
 
can data/all
 
 
use gt4d011.cdf
 
let eofti = eofsvd_tfunc (temp[i=91:95,j=36:40,k=1:10])
save/file=eofti.cdf/clobber eofti
 
can data/all
can var/all
can view
use eofti
 
set view ul
plot eofti[i=1,k=1], eofti[i=2,k=1], eofti[i=3,k=1]
list eofti[l=1:5,i=1,k=1]
             VARIABLE : EOFSVD_TFUNC (TEMP[I=91:95,J=36:40,K=1:10])
             FILENAME : eofti.cdf
             SUBSET   : 5 points (TIME)
             X        : 1
             DEPTH (m): 5
                        1    
                        1
 17-AUG-1982 12 / 1: -1.812
 23-AUG-1982 14 / 2: -1.758
 29-AUG-1982 16 / 3: -1.678
 04-SEP-1982 18 / 4: -1.571
 10-SEP-1982 20 / 5: -1.427
set view ur
plot eofti[i=1,k=5], eofti[i=2,k=5], eofti[i=3,k=5]
list eofti[l=1:5,i=1,k=5]
             VARIABLE : EOFSVD_TFUNC (TEMP[I=91:95,J=36:40,K=1:10])
             FILENAME : eofti.cdf
             SUBSET   : 5 points (TIME)
             X        : 1
             DEPTH (m): 45
                        1    
                        1
 17-AUG-1982 12 / 1: -2.218
 23-AUG-1982 14 / 2: -2.049
 29-AUG-1982 16 / 3: -1.774
 04-SEP-1982 18 / 4: -1.412
 10-SEP-1982 20 / 5: -1.053
 
set view ll
plot eofti[i=1,k=8], eofti[i=2,k=8], eofti[i=3,k=8]
list eofti[l=1:5,i=1,k=8]
             VARIABLE : EOFSVD_TFUNC (TEMP[I=91:95,J=36:40,K=1:10])
             FILENAME : eofti.cdf
             SUBSET   : 5 points (TIME)
             X        : 1
             DEPTH (m): 75
                        1    
                        1
 17-AUG-1982 12 / 1: -1.776
 23-AUG-1982 14 / 2: -1.455
 29-AUG-1982 16 / 3: -1.242
 04-SEP-1982 18 / 4: -1.051
 10-SEP-1982 20 / 5: -0.847
set view lr
plot eofti[i=1,k=4], eofti[i=2,k=10], eofti[i=3,k=10]
list eofti[l=1:5,i=1,k=10]
             VARIABLE : EOFSVD_TFUNC (TEMP[I=91:95,J=36:40,K=1:10])
             FILENAME : eofti.cdf
             SUBSET   : 5 points (TIME)
             X        : 1
             DEPTH (m): 95
                        1     
                         1
 17-AUG-1982 12 / 1:  0.0037
 23-AUG-1982 14 / 2: -0.1892
 29-AUG-1982 16 / 3: -0.2982
 04-SEP-1982 18 / 4: -0.4057
 10-SEP-1982 20 / 5: -0.5178
 
can data/all
 
 
 
use gt4d011.cdf
 
let eofst = eofsvd_stat (temp[i=91:95,j=36:40,k=1:10])
save/file=eofst.cdf/clobber eofst
 
can data/all
can var/all
use eofst
 
list/nohead/i=1/j=1/k=1:10 eofst   ! # eigenfcns, same at all depths
 5     /  1:  25.00
 15    /  2:  25.00
 25    /  3:  25.00
 35    /  4:  25.00
 45    /  5:  25.00
 55    /  6:  25.00
 65    /  7:  25.00
 75    /  8:  25.00
 85    /  9:  25.00
 95    / 10:  25.00
 
list/nohead/i=1:5/j=2 eofst[k=1:10:4]  ! pct variance explained
 5     / 1:  99.27   0.68   0.03   0.02   0.00
 45    / 2:  98.65   1.15   0.15   0.03   0.02
 85    / 3:  95.12   4.57   0.22   0.07   0.01
 
list/nohead/i=1:5/j=3/k=1 eofst  ! eigenvalues
 1   / 1:  139.6
 2   / 2:    1.0
 3   / 3:    0.0
 4   / 4:    0.0
 5   / 5:    0.0
list/nohead/i=1:5/j=3/k=5 eofst
 1   / 1:  10.86
 2   / 2:   0.13
 3   / 3:   0.02
 4   / 4:   0.00
 5   / 5:   0.00
list/nohead/i=1:5/j=3/k=9 eofst
 1   / 1:  2.236
 2   / 2:  0.107
 3   / 3:  0.005
 4   / 4:  0.002
 5   / 5:  0.000
 
! The functions need updating for double precision Ferret
exit/script
*** Running ferret script: bn_abstract_axis_names.jnl
! bn_abstract_axis_names.jnl
! acm 6/12/03
!
! Write and read datafiles with no clues about axis orientation from
! the units or axis name.  Getting the axis direction depends on the AXIS
! attribute in .nc files, and on use of the new line_direction(iaxis) = 'XX'
! or 'YY' in cd_get_1_axis, xeq_define, tm_axis_direction, show_line.F
 
! Define axes with confusing axis names (z in an X axis, X in a Z axis, etc)
 
def axis/x=1:10:1 horiz
def axis/y=10:80:10 the
def axis/z=-4:1:1 xxx
def axis/t=1:13:2 long
 
show axis horiz
 name       axis              # pts   start                end
 HORIZ     X                   10 r   1                    10
   Axis span (to cell edges) = 10
show axis the
 name       axis              # pts   start                end
 THE       Y                    8 r   10                   80
   Axis span (to cell edges) = 80
show axis xxx
 name       axis              # pts   start                end
 XXX       Z                    6 r   -4                   1
   Axis span (to cell edges) = 6
show axis long
 name       axis              # pts   start                end
 LONG      T                    7 r   1                    13
   Axis span (to cell edges) = 14
 
! Write files with different combinations of axes.
 
let r =  x[gx=horiz]  + z[gz=xxx]
save/clobber/file=confuse_xz.nc r
 
let s =  y[gy=the] + z[gz=xxx]
save/clobber/file=confuse_yz.nc s
 
let u =  y[gy=the] + t[gt=long]
save/clobber/file=confuse_yt.nc u
 
let v =  z[gz=xxx] + t[gt=long]+ y[gy=the]
save/clobber/file=confuse_yzt.nc v
 
 
! Now read the files and see that the vars have the right shape
cancel data/all
cancel var/all
cancel axis horiz
cancel axis the
cancel axis xxx
cancel axis long
 
use confuse_xz.nc
sh grid r
    GRID GAP1
 name       axis              # pts   start                end                 subset
 HORIZ     X                   10 r   1                    10                  full
 normal    Y
 XXX       Z                    6 r   -4                   1                   full
 normal    T
can data 1
 
use confuse_yz.nc
sh grid s
    GRID GBA1
 name       axis              # pts   start                end                 subset
 normal    X
 THE       Y                    8 r   10                   80                  full
 XXX       Z                    6 r   -4                   1                   full
 normal    T
can data 1
 
use confuse_yt.nc
sh grid u
    GRID GGY1
 name       axis              # pts   start                end                 subset
 normal    X
 THE       Y                    8 r   10                   80                  full
 normal    Z
 LONG      T                    7 r   1                    13                  full
can data 1
 
use confuse_yzt.nc
sh grid v
    GRID GFA1
 name       axis              # pts   start                end                 subset
 normal    X
 THE       Y                    8 r   10                   80                  full
 XXX       Z                    6 r   -4                   1                   full
 LONG      T                    7 r   1                    13                  full
can data 1
 
 
! Define axes with meaningless axis names.
 
def axis/x=1:10:1 aaa
def axis/y=10:80:10 bbb
def axis/z=-4:1:1 ccc
def axis/t=1:13:2 ddd
 
show axis aaa
 name       axis              # pts   start                end
 AAA       X                   10 r   1                    10
   Axis span (to cell edges) = 10
show axis bbb
 name       axis              # pts   start                end
 BBB       Y                    8 r   10                   80
   Axis span (to cell edges) = 80
show axis ccc
 name       axis              # pts   start                end
 CCC       Z                    6 r   -4                   1
   Axis span (to cell edges) = 6
show axis ddd
 name       axis              # pts   start                end
 DDD       T                    7 r   1                    13
   Axis span (to cell edges) = 14
 
! Write files with different combinations of axes.
 
let r =  x[gx=aaa]  + z[gz=ccc]
save/clobber/file=confuse_xz.nc r
 
let s =  y[gy=bbb] + z[gz=ccc]
save/clobber/file=confuse_yz.nc s
 
let u =  y[gy=bbb] + t[gt=ddd]
save/clobber/file=confuse_yt.nc u
 
let v =  z[gz=ccc] + t[gt=ddd]+ y[gy=bbb]
save/clobber/file=confuse_yzt.nc v
 
 
! Now read the files and see that the vars have the right shape
cancel data/all
cancel var/all
cancel axis aaa
cancel axis bbb
cancel axis ccc
cancel axis ddd
 
use confuse_xz.nc
sh grid r
    GRID GAP1
 name       axis              # pts   start                end                 subset
 AAA       X                   10 r   1                    10                  full
 normal    Y
 CCC       Z                    6 r   -4                   1                   full
 normal    T
can data 1
 
use confuse_yz.nc
sh grid s
    GRID GBA1
 name       axis              # pts   start                end                 subset
 normal    X
 BBB       Y                    8 r   10                   80                  full
 CCC       Z                    6 r   -4                   1                   full
 normal    T
can data 1
 
use confuse_yt.nc
sh grid u
    GRID GGY1
 name       axis              # pts   start                end                 subset
 normal    X
 BBB       Y                    8 r   10                   80                  full
 normal    Z
 DDD       T                    7 r   1                    13                  full
can data 1
 
use confuse_yzt.nc
sh grid v
    GRID GFA1
 name       axis              # pts   start                end                 subset
 normal    X
 BBB       Y                    8 r   10                   80                  full
 CCC       Z                    6 r   -4                   1                   full
 DDD       T                    7 r   1                    13                  full
can data 1
*** Running ferret script: bn_many_polygons.jnl
! testing large number of polygons in a plot.  Map plot has
! 130501 polygons; previously we had an upper limit of 100K polygons
 
use coads_climatology
def axis/x=0:360:0.5 xq
def axis/y=-90:90:0.5 yq
def axis/y=-90:90:1 yq
let fsst =  sst[l=1,gx=xq,gy=yq]
shade/title="loading polygon at each grid point" sst[l=1]   ! Set up plot params for polymark.jnl
 
let lon = xsequence(x[gx=xq] + 0*y[gy=yq])
let lat = xsequence(0*x[gx=xq] + y[gy=yq])
go polymark poly/key/pal=dark_land_sea/title="130501 polygons", lon, lat, xsequence(fsst), square, 0.3
 
 
! Test that everythings properly reset afterwards.
! single polygon.
 
polygon/thick/color=red/palette=blue/axes=1,0,1,0 {1,2,1}, {2,1,0.5}
 
! Now test that is still also works with the 2-D mode of polygons.
 
let xtriangle = ysequence({-1,0,1})
let ytriangle = ysequence({-1,1,-1})
let xpts = 180 + 30*randu(i[i=1:10])
let ypts = 30*randu(1+i[i=1:10])
polygon xtriangle+xpts, ytriangle+ypts, i[i=1:10]
*** Running ferret script: bn_fill_irregular.jnl
! FILL on vars with irregular axes
 
use gtbc011
fill/i=70/l=1 temp
can data/all
 
def ax/t tax = {1,5,6,7}
let v = t[gt=tax]+z[gz=1:3:1]
fill v
 
def ax/x xax = {1,5,6,7}
let v = x[gx=xax]-z[gz=1:3:1]
fill v
 
use test_subspan_modulo.nc
fill v2d_irr[x=-100:100]
fill v2d_irr[t=1-jan-1990:1-jan-1995]
 
use coads_clim_irreg.des
fill/x=180 sst
*** Running ferret script: bn_xml_output.jnl
!bn_xml_output.jnl
! new-V553 output in XML-style format
! Illustrate the SHOW commands with /XML xml-style output
! V5.80 11/04 new tests for SHOW VAR/XML; global variables.
!
! 22-Feb-2005 USE SHO AXIS/XML `temp,return=taxis` instead
! of naming the axes; other axes of the same name (e.g. TIME)
! may have been defined in other benchmark scrips.
!
! 24-Oct-2016 Changes in Ferret, handling of grid and datatype
! info. Order of listing in xml output, ferret_data_type is listed
* for all variables
 
USE levitus_climatology.cdf
 
SHO DATA/XML
<datasets>
<dataset name="./data/levitus_climatology.cdf" default="true">
<title> </title>
<var name="TEMP" />
</dataset>
</datasets>
 
SHO GRID/XML `temp,return=grid`
 !-> SHO GRID/XML GMS1
<grid name="GMS1">
<axes>
<xaxis>XAXLEVITR1_160</xaxis>
<yaxis>YAXLEVITR1_90</yaxis>
<zaxis>ZAXLEVITR1_1</zaxis>
</axes>
</grid>
 
SHO AXIS/XML `temp,return=zaxis`
 !-> SHO AXIS/XML ZAXLEVITR1_1
<axes>
<axis name="ZAXLEVITR1_1">
<attribute name="direction" type="char">
   <value><![CDATA[K]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[METERS]]></value>
</attribute>
<attribute name="length" type="short">
   <value>1</value>
</attribute>
<attribute name="start" type="double">
   <value>0</value>
</attribute>
<attribute name="end" type="double">
   <value>0</value>
</attribute>
<attribute name="positive" type="char">
   <value><![CDATA[down]]></value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[ZAXLEVITR1_1]]></value>
</attribute>
</axis>
</axes>
SHO AXIS/XML `temp,return=taxis`
 !-> SHO AXIS/XML NORMAL
 
can dat/all
 
! make some short files
let/units="meters" myvar = 7
save/clobber/file=a.nc myvar
 
LET ddat = ZSEQUENCE({1126,1136,1146,1156,1166})
save/clobber/file=b.nc ddat
can var/all
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
USE a.nc
USE b.nc
 
! Define a dataset variable
! SHOW/XML commands list it w/ its dataset (even if dataset is not default)
LET/D=a temp_av = ddat[d=2,X=@AVE]
 
SHOW DATA/XML
<datasets>
<dataset name="./a.nc" default="false">
<title> </title>
<var name="MYVAR" />
<var name="temp_av" />
</dataset>
<dataset name="./b.nc" default="true">
<title> </title>
<var name="DDAT" />
</dataset>
</datasets>
SHO DATA/VAR/XML 1
<datasets>
<dataset name="./a.nc" default="false">
<title> </title>
<var name="MYVAR">
<attribute name="units" type="char">
   <value><![CDATA[meters]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[7]]></value>
</attribute>
<attribute name="_FillValue" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<grid name="GSI1">
<axes>
</axes>
</grid>
</var>
<var name="temp_av">
<attribute name="definition" type="char">
   <value><![CDATA[DDAT[D=2,X=@AVE]]]></value>
</attribute>
<attribute name="_FillValue" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[DDAT[D=2,X=@AVE]]]></value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="GRR1">
<axes>
<zaxis>ZAX1_5</zaxis>
</axes>
</grid>
</var>
</dataset>
</datasets>
<axes>
<axis name="ZAX1_5">
<attribute name="direction" type="char">
   <value><![CDATA[K]]></value>
</attribute>
<attribute name="length" type="short">
   <value>5</value>
</attribute>
<attribute name="start" type="double">
   <value>1</value>
</attribute>
<attribute name="end" type="double">
   <value>5</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="axis" type="char">
   <value><![CDATA[Z]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[ZAX1_5]]></value>
</attribute>
</axis>
</axes>
 
CAN DAT/ALL
 
! tests of SHOW VAR/XML for global variables.
CAN DATA/ALL
CAN VAR/ALL
 
USE a
USE b
 
! Define a dataset variable
LET/D=b temp_20 ddat[x=1:2@SUM]
 
! Define a global variable
LET t30 = ddat[x=1:3@SUM]
 
! Another variable, setting title, units, bad flag.
LET/UNITS="Deg C"/BAD=100/TITLE="Indefinite integral" salty = temp[x=@iin]
 
! Define a constant
LET pi = 3.14
 
! Another variable, irrelevant in the current context
LET my_a = a*12
 
! This lists all the variables except my_a
 
SHO VAR/XML
<global>
<var name="TEMP_20[D=./b.nc]">
<attribute name="definition" type="char">
   <value><![CDATA[DDAT[X=1:2@SUM]]]></value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="GRR1">
<axes>
<zaxis>ZAX1_5</zaxis>
</axes>
</grid>
</var>
<var name="PI">
<attribute name="definition" type="char">
   <value><![CDATA[3.14]]></value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="GSI1">
<axes>
</axes>
</grid>
</var>
<var name="T30">
<attribute name="definition" type="char">
   <value><![CDATA[DDAT[X=1:3@SUM]]]></value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="GRR1">
<axes>
<zaxis>ZAX1_5</zaxis>
</axes>
</grid>
</var>
</global>
 
! Now change datasets, so my_a has a context, but t30
! does not. temp_20 is listed becaUSE it is defined on a dataset
 
SET DATA a
SHO VAR/XML
<global>
<var name="TEMP_20[D=./b.nc]">
<attribute name="definition" type="char">
   <value><![CDATA[DDAT[X=1:2@SUM]]]></value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="GRR1">
<axes>
<zaxis>ZAX1_5</zaxis>
</axes>
</grid>
</var>
<var name="PI">
<attribute name="definition" type="char">
   <value><![CDATA[3.14]]></value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="GSI1">
<axes>
</axes>
</grid>
</var>
</global>
 
! Change default dataset. Now we should just see pi and my_a
 
CAN DATA b
SHOW VAR/XML
<global>
<var name="PI">
<attribute name="definition" type="char">
   <value><![CDATA[3.14]]></value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="GSI1">
<axes>
</axes>
</grid>
</var>
</global>
 
! 8/7/2007
! new form for output of a var whose definition contains quotes
CANCEL DATA/ALL
CANCEL VAR/ALL
 
let tvar = t[gt=month_reg]
save/clobber/file=a.nc tvar
 
USE a
LET t3 = tvar[t="15-jan-0000:00:00":"15-feb-0000:00:00"@AVE]
SHOW VAR/XML
<global>
<var name="T3">
<attribute name="definition" type="char">
   <value><![CDATA[TVAR[T="15-jan-0000:00:00":"15-feb-0000:00:00"@AVE]]]></value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="GSI1">
<axes>
</axes>
</grid>
</var>
<var name="TVAR">
<attribute name="definition" type="char">
   <value><![CDATA[T[GT=MONTH_REG]]]></value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="GSI1">
<axes>
<taxis>MONTH_REG</taxis>
</axes>
</grid>
</var>
</global>
 
! Test getting the data type of a user-defined variable
 
let/d=a dates = tax_datestring(t[gt=tvar], tvar, "days")
SHOW VAR/XML dates
<global>
<var name="DATES[D=./a.nc]">
<attribute name="definition" type="char">
   <value><![CDATA[TAX_DATESTRING(T[GT=TVAR], TVAR, "days")]]></value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[STRING]]></value>
</attribute>
<grid name="GSI1">
<axes>
<taxis>MONTH_REG</taxis>
</axes>
</grid>
</var>
</global>
SHO DATA/VAR/XML 1
<datasets>
<dataset name="./a.nc" default="true">
<title> </title>
<var name="TVAR">
<attribute name="long_name" type="char">
   <value><![CDATA[T[GT=MONTH_REG]]]></value>
</attribute>
<attribute name="_FillValue" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<grid name="GSI1">
<axes>
<taxis>MONTH_REG</taxis>
</axes>
</grid>
</var>
<var name="dates">
<attribute name="definition" type="char">
   <value><![CDATA[TAX_DATESTRING(T[GT=TVAR], TVAR, "days")]]></value>
</attribute>
<attribute name="_FillValue" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[TAX_DATESTRING(T[GT=TVAR], TVAR, "days")]]></value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[STRING]]></value>
</attribute>
<grid name="GSI1">
<axes>
<taxis>MONTH_REG</taxis>
</axes>
</grid>
</var>
</dataset>
</datasets>
<axes>
<axis name="MONTH_REG">
<attribute name="direction" type="char">
   <value><![CDATA[L]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[hour since 0000-01-01 00:00:00]]></value>
</attribute>
<attribute name="length" type="short">
   <value>12</value>
</attribute>
<attribute name="start" type="double">
   <value>0000-01-16 06:00:00</value>
</attribute>
<attribute name="end" type="double">
   <value>0000-12-16 01:20:05</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value><![CDATA[yes]]></value>
</attribute>
<attribute name="time_origin" type="char">
   <value><![CDATA[0000-01-01 00:00:00]]></value>
</attribute>
<attribute name="calendar" type="char">
   <value><![CDATA[GREGORIAN]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="axis" type="char">
   <value><![CDATA[T]]></value>
</attribute>
<attribute name="standard_name" type="char">
   <value><![CDATA[time]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[MONTH_REG]]></value>
</attribute>
</axis>
</axes>
*** Running ferret script: bn_test_nan.jnl
!bn_test_nan.jnl
! test to make sure that NaN is able to be set by user
!  as bad value.  If this fails, Ferret will crash
!  Test on a file which is nothing but NaN's, and use
!  various spellings of NaN
!
! 9/03 *kob*
!
 
 
 
! test "nan"
use test_nan.nc
set var/bad=nan p1
list p1
             VARIABLE : Pressure (dbar)
             FILENAME : test_nan.nc
             SUBSET   : 10 points (TIME)
 13-OCT-2001 07:21:50 /  1:....
 13-OCT-2001 07:21:51 /  2:....
 13-OCT-2001 07:21:52 /  3:....
 13-OCT-2001 07:21:53 /  4:....
 13-OCT-2001 07:21:54 /  5:....
 13-OCT-2001 07:21:55 /  6:....
 13-OCT-2001 07:21:56 /  7:....
 13-OCT-2001 07:21:57 /  8:....
 13-OCT-2001 07:21:58 /  9:....
 13-OCT-2001 07:21:59 / 10:....
can data/all
can var/all
 
! test "NaN"
use test_nan.nc
set var/bad=NaN p1
list p1
             VARIABLE : Pressure (dbar)
             FILENAME : test_nan.nc
             SUBSET   : 10 points (TIME)
 13-OCT-2001 07:21:50 /  1:....
 13-OCT-2001 07:21:51 /  2:....
 13-OCT-2001 07:21:52 /  3:....
 13-OCT-2001 07:21:53 /  4:....
 13-OCT-2001 07:21:54 /  5:....
 13-OCT-2001 07:21:55 /  6:....
 13-OCT-2001 07:21:56 /  7:....
 13-OCT-2001 07:21:57 /  8:....
 13-OCT-2001 07:21:58 /  9:....
 13-OCT-2001 07:21:59 / 10:....
can data/all
can var/all
 
! test "NAN"
use test_nan.nc
set var/bad=NAN p1
list p1
             VARIABLE : Pressure (dbar)
             FILENAME : test_nan.nc
             SUBSET   : 10 points (TIME)
 13-OCT-2001 07:21:50 /  1:....
 13-OCT-2001 07:21:51 /  2:....
 13-OCT-2001 07:21:52 /  3:....
 13-OCT-2001 07:21:53 /  4:....
 13-OCT-2001 07:21:54 /  5:....
 13-OCT-2001 07:21:55 /  6:....
 13-OCT-2001 07:21:56 /  7:....
 13-OCT-2001 07:21:57 /  8:....
 13-OCT-2001 07:21:58 /  9:....
 13-OCT-2001 07:21:59 / 10:....
can data/all
can var/all
 
 
 
 
 
*** Running ferret script: bn553_bug_fixes.jnl
! bn553_bug_fixes.jnl
! test various fixes that went into version 5.52
! 9/03 *kob*
!
 
! Make sure numeric filenames works
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err553_numeric_filename.jnl
! err553_numeric_filename.jnl
! 9/03 kob
 
 
! Use of a filename begining w/ a numberic was a problem
! w/ g77 - just make sure it works where
use 123456789000101_100101_test_numeric.nc
 
list vwnd_clim
             VARIABLE : VWND[GT=MONTH_REG@MOD]
             FILENAME : 123456789000101_100101_test_numeric.nc
             SUBSET   : 12 points (TIME)
             LONGITUDE: 161W
             LATITUDE : 39N
                    161W   
                      1
 16-JAN      /  1:  3.437
 15-FEB      /  2:  1.925
 17-MAR      /  3:  2.790
 16-APR      /  4:  1.790
 16-MAY      /  5:  0.800
 16-JUN      /  6:  3.800
 16-JUL      /  7: -0.200
 16-AUG      /  8:  0.465
 15-SEP      /  9:  2.572
 16-OCT      / 10: -2.530
 15-NOV      / 11: -3.090
 16-DEC      / 12:  1.787
 
 
 
! Make sure long string variables work
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err553_long_string_var_name.jnl
! err553_long_string_var_name.jnl
! 9/03 kob
 
 
 
! test long string variables - the were being truncated
! at 100 characters
 
 
let a = "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
 
list a
             VARIABLE : "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
        "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
 
 
 
 
 
! Fixes for colorbar key labelling
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err551_colorkey.jnl
 
! colorkey label bugs
 
 
let zero = 0*x[i=1:10]+0*y[j=1:10]
set view ul; shade zero            !This one is labeled correctly.
set view ur; shade 1+zero          !So is this.
set view ll; shade/lev=c zero      !But here colorkey is 1:1 instead of 0:0.
 
! Here the zero level is labelled as -.3e-08 rather than 0. (linux)
can view
use coads_climatology
shade/l=1/lev=30/set (sst-10)/10
ppl axlen 6
ppl shakey 1,1,.12
ppl shade
 
*** Running ferret script: bn_graticules.jnl
! /GRAT, /HGRAT and /VGRAT to set graticule lines
! ACM March 12, 2004
! ACM 4/2005 set mode meta to save one of the plots for the metafile checks.
!            and cancel mode logo, so that .plt files are comparable.
!  2/18 *acm* keep mode logo turned off
 
ppl axnmtc,2,2
 
 ! GRAT on plot commands
PLOT/grat/i=1:100 sin(i/5)
let a = sin(i/5) * cos(j/8)
CONTOUR/color=ligh/grat=(color=red)/i=1:100/j=1:80 a
use coads_climatology
SHADE/grat=(color=white) sst[L=1]
FILL/grat=dash sst[l=1]
VECTOR/color=red/grat=(blue,dash) sst[l=1], sst[l=2]
let b = {1,2,1}
let c = {2,1,0.5}
POLYGON/thick/color=red/pal=blue/grat b,c
 
! More complex GRAT arguments
plot/grat="large(dash),small(dash,color=blue)"/i=1:100 sin(i/5)
contour/color=ligh/grat="large(color=purple,thick=3,line),small(dash,color=blue)"/i=1:100/j=1:80 a
shade/grat="small(color=lightblue),large(thick,color=lightblue)" sst[l=1]
fill/i=1:50/j=1:30/grat="large(line),small(dash,color=lightblue)" i+j
poly/thi/col=red/pal=blue/grat="lar(col=pur,thi=3,lin),sma(dash,col=whi)" b,c
vector/i=1:50/j=1:30/grat="small(color=black),large(thick,color=blue)"  sst[l=1], sst[l=2]
 
! /HGRAT and /VGRAT
plot/vg=large(line,color=red),small(dash,color=blue)/i=1:100 sin(i/5)
plot/hg=small(color=red,dash),large(color=blue,line,thick)/i=1:100 sin(i/5)
plot/hg=small(color=red,dash,thick=1),large(color=blue,line,thick=3)/vg=large(line,color=red),small(dash,color=blue)/i=1:100 sin(i/5)
 
! Log axes: VLOG and HLOG with large and small tics
 
set mode meta graticules.plt
 
set view left
def axis/z zlog=exp(k[k=1:10])
let fcn = k[gz=zlog]
plot/vlog/vlimits=1:100000/grat="large(color=black),small(color=lightblue)" fcn
 
set view right
def axis/z/depth dlog=exp(k[k=1:20])
let fcn = k[gz=dlog]
plot/vlog/vlimits=1:100000/hg="large(color=red),small(color=lightblue)" fcn
 
can mode meta
 
can view
 
! HLOG and VLOG
 
def axis/x ddlog = exp(-1*(10-i[i=1:10]))
let fcn = (i[gx=ddlog])^2
plot/thick/hlog/vlog/grat="large(color=red),small=(color=lightblue)" fcn
 
! Time axes
let a = sin(t[gt=tax]/5)
let b = sin(t[gt=tax]/100)
 
def axis/t=1-jan-1990:1-jan-1998:1/units=months tax
 
plot/t=1-jan-1990:31-dec-1992/trans/hg="large(dash,color=blue),small(line,color=lightblue)"/vg="(line,color=blue)" a
 
def axis/t=1-jan-1990:1-mar-1990:1/units=days tax
plot/hg="(line,color=blue)"/vg="large(line,color=blue),small(line,color=lightblue)" a
plot/trans/vg="(line,color=blue)"/hg="large(line,color=blue),small(line,color=lightblue)" a
 
def axis/t=1-jan-1950:1-jan-1990:1/units=years tax
plot/hg="(line,color=blue)"/vg="large(line,color=blue),small(line,color=lightblue)" a
plot/trans/vg="(line,color=blue)"/hg="large(line,color=blue),small(line,color=lightblue)" a
 
def axis/t=1-jan-1800:1-jan-1990:1/units=years tax
plot/thick/trans/grat="(line,color=blue)" a
 
def axis/t="1-jan-1990:01":"2-jan-1990:12:00":1/units=minutes tax
plot/thick/grat="large(line,color=blue),small(line,color=lightblue)" b
plot/trans/thick/vg="(line,color=blue)"/hg="large(line,color=blue),small(line,color=lightblue)" b
 
! Tests for MODE GRATICULE  added in Ferret v5.7
show mode graticule
      MODE            STATE        ARGUMENT
      GRATICULE     CANCELED
set mode graticule
show mode graticule
      MODE            STATE        ARGUMENT
      GRATICULE        SET
 
PLOT/i=1:100 sin(i/5)
can mode graticule
 
PLOT/i=1:100 cos(i/5)
 
set mode graticule:color=red
PLOT/i=1:100 cos(i/5)
set mode graticule:(thick,color=red)
PLOT/i=1:100 cos(i/5)
 
set mode graticule:(dash,color=blue)
PLOT/i=1:100 cos(i/5)
can mode graticule
 
pplus/reset   ! restore tics etc
 
*** Running ferret script: bn_repeat_range.jnl
! REPEAT/RANGE=[/NAME=]  for looping without depending
! on the grid\
! ACM March 12, 2004
 
! simplest syntax
 
repeat/range=5:1:-1 say what
!-> REPEAT: REPCOUNT:5
what
!-> REPEAT: REPCOUNT:4
what
!-> REPEAT: REPCOUNT:3
what
!-> REPEAT: REPCOUNT:2
what
!-> REPEAT: REPCOUNT:1
what
repeat/range=1:5:3/name=s (list/nohead s)
!-> REPEAT: S:1
          1.000
!-> REPEAT: S:4
          4.000
sh var s  ! counter variable goes away after a repeat
 
! Nested loops, and calling a function
repeat/range=1:5:3/name=s (repeat/range=1:3/name=tt list sin(tt))
!-> REPEAT: S:1
!-> REPEAT: TT:1
             VARIABLE : SIN(TT)
          0.8415
!-> REPEAT: TT:2
             VARIABLE : SIN(TT)
          0.9093
!-> REPEAT: TT:3
             VARIABLE : SIN(TT)
          0.1411
!-> REPEAT: S:4
!-> REPEAT: TT:1
             VARIABLE : SIN(TT)
          0.8415
!-> REPEAT: TT:2
             VARIABLE : SIN(TT)
          0.9093
!-> REPEAT: TT:3
             VARIABLE : SIN(TT)
          0.1411
 
! Nested, use counter variables in computation
can mode ver
I / *:     80.00  6.000  480.0
I / *:     80.00  8.000  640.0
I / *:     80.00  10.00  800.0
I / *:     60.00  6.000  360.0
I / *:     60.00  8.000  480.0
I / *:     60.00  10.00  600.0
I / *:     40.00  6.000  240.0
I / *:     40.00  8.000  320.0
I / *:     40.00  10.00  400.0
I / *:     20.00  6.000  120.0
I / *:     20.00  8.000  160.0
I / *:     20.00  10.00  200.0
 
! Nested with a standard repeat loop over Z
repeat/range=100:200:50/name=m (repeat/z=8:10 list m*z)
!-> REPEAT: M:100
!-> REPEAT: Z=8
             VARIABLE : M*Z
             Z        : 8
          800.0
!-> REPEAT: Z=9
             VARIABLE : M*Z
             Z        : 9
          900.0
!-> REPEAT: Z=10
             VARIABLE : M*Z
             Z        : 10
          1000.
!-> REPEAT: M:150
!-> REPEAT: Z=8
             VARIABLE : M*Z
             Z        : 8
          1200.
!-> REPEAT: Z=9
             VARIABLE : M*Z
             Z        : 9
          1350.
!-> REPEAT: Z=10
             VARIABLE : M*Z
             Z        : 10
          1500.
!-> REPEAT: M:200
!-> REPEAT: Z=8
             VARIABLE : M*Z
             Z        : 8
          1600.
!-> REPEAT: Z=9
             VARIABLE : M*Z
             Z        : 9
          1800.
!-> REPEAT: Z=10
             VARIABLE : M*Z
             Z        : 10
          2000.
repeat/z=1:3 (repeat/range=1000:2000:1000/name=m list m*z)
!-> REPEAT: Z=1
!-> REPEAT: M:1000
             VARIABLE : M*Z
             Z        : 1
          1000.
!-> REPEAT: M:2000
             VARIABLE : M*Z
             Z        : 1
          2000.
!-> REPEAT: Z=2
!-> REPEAT: M:1000
             VARIABLE : M*Z
             Z        : 2
          2000.
!-> REPEAT: M:2000
             VARIABLE : M*Z
             Z        : 2
          4000.
!-> REPEAT: Z=3
!-> REPEAT: M:1000
             VARIABLE : M*Z
             Z        : 3
          3000.
!-> REPEAT: M:2000
             VARIABLE : M*Z
             Z        : 3
          6000.
 
! With regions defined
set reg/x=-9:9
repeat/range=1:4/name=m (repeat/range=44:45/name=p list p)
!-> REPEAT: M:1
!-> REPEAT: P:44
             VARIABLE : constant
          44.00
!-> REPEAT: P:45
             VARIABLE : constant
          45.00
!-> REPEAT: M:2
!-> REPEAT: P:44
             VARIABLE : constant
          44.00
!-> REPEAT: P:45
             VARIABLE : constant
          45.00
!-> REPEAT: M:3
!-> REPEAT: P:44
             VARIABLE : constant
          44.00
!-> REPEAT: P:45
             VARIABLE : constant
          45.00
!-> REPEAT: M:4
!-> REPEAT: P:44
             VARIABLE : constant
          44.00
!-> REPEAT: P:45
             VARIABLE : constant
          45.00
 
set reg/x=-180:-160/y=1:15/z=-10000:-1000/t="1-jan-1990"
repeat/range=1:5 (let a = 6; list a)
!-> REPEAT: REPCOUNT:1
             VARIABLE : 6
          6.000
!-> REPEAT: REPCOUNT:2
             VARIABLE : 6
          6.000
!-> REPEAT: REPCOUNT:3
             VARIABLE : 6
          6.000
!-> REPEAT: REPCOUNT:4
             VARIABLE : 6
          6.000
!-> REPEAT: REPCOUNT:5
             VARIABLE : 6
          6.000
repeat/range=1:5/name=p (let a = 6; list p)
!-> REPEAT: P:1
             VARIABLE : constant
          1.000
!-> REPEAT: P:2
             VARIABLE : constant
          2.000
!-> REPEAT: P:3
             VARIABLE : constant
          3.000
!-> REPEAT: P:4
             VARIABLE : constant
          4.000
!-> REPEAT: P:5
             VARIABLE : constant
          5.000
 
! Region applies to data, not to loop index.
use coads_climatology
let xx = x[gx=sst]
set reg/x=-180:-160/y=1:15/z=-10000:-1000/t="1-jan-1990"
repeat/range=1:5/name=p (list p*xx)
!-> REPEAT: P:1
             VARIABLE : P*XX
             FILENAME : coads_climatology.cdf
             SUBSET   : 10 points (LONGITUDE)
 179W    / -99: -179.0
 177W    / -98: -177.0
 175W    / -97: -175.0
 173W    / -96: -173.0
 171W    / -95: -171.0
 169W    / -94: -169.0
 167W    / -93: -167.0
 165W    / -92: -165.0
 163W    / -91: -163.0
 161W    / -90: -161.0
!-> REPEAT: P:2
             VARIABLE : P*XX
             FILENAME : coads_climatology.cdf
             SUBSET   : 10 points (LONGITUDE)
 179W    / -99: -358.0
 177W    / -98: -354.0
 175W    / -97: -350.0
 173W    / -96: -346.0
 171W    / -95: -342.0
 169W    / -94: -338.0
 167W    / -93: -334.0
 165W    / -92: -330.0
 163W    / -91: -326.0
 161W    / -90: -322.0
!-> REPEAT: P:3
             VARIABLE : P*XX
             FILENAME : coads_climatology.cdf
             SUBSET   : 10 points (LONGITUDE)
 179W    / -99: -537.0
 177W    / -98: -531.0
 175W    / -97: -525.0
 173W    / -96: -519.0
 171W    / -95: -513.0
 169W    / -94: -507.0
 167W    / -93: -501.0
 165W    / -92: -495.0
 163W    / -91: -489.0
 161W    / -90: -483.0
!-> REPEAT: P:4
             VARIABLE : P*XX
             FILENAME : coads_climatology.cdf
             SUBSET   : 10 points (LONGITUDE)
 179W    / -99: -716.0
 177W    / -98: -708.0
 175W    / -97: -700.0
 173W    / -96: -692.0
 171W    / -95: -684.0
 169W    / -94: -676.0
 167W    / -93: -668.0
 165W    / -92: -660.0
 163W    / -91: -652.0
 161W    / -90: -644.0
!-> REPEAT: P:5
             VARIABLE : P*XX
             FILENAME : coads_climatology.cdf
             SUBSET   : 10 points (LONGITUDE)
 179W    / -99: -895.0
 177W    / -98: -885.0
 175W    / -97: -875.0
 173W    / -96: -865.0
 171W    / -95: -855.0
 169W    / -94: -845.0
 167W    / -93: -835.0
 165W    / -92: -825.0
 163W    / -91: -815.0
 161W    / -90: -805.0
 
can region
 
! factorial
can mode ver
I / *:     1.000 "factorial"  1.000
I / *:     2.000 "factorial"  2.000
I / *:     3.000 "factorial"  6.000
I / *:     4.000 "factorial"  24.00
I / *:     5.000 "factorial"  120.0
I / *:     6.000 "factorial"  720.0
 
! with some data
use coads_climatology
repeat/range=80:120:40/name=p (list/L=1/y=1 sst[x=1:360:`p`])
!-> REPEAT: P:80
 !-> list/L=1/y=1 sst[x=1:360:80]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
                        regrid: 80 deg on X
             FILENAME : coads_climatology.cdf
             SUBSET   : 5 points (LONGITUDE)
             LATITUDE : 1N
             TIME     : 16-JAN 06:00
               1N    
               46
 1E     / 1:  27.83
 81E    / 2:  28.11
 161E   / 3:  28.79
 119W   / 4:  24.54
 39W    / 5:  27.48
!-> REPEAT: P:120
 !-> list/L=1/y=1 sst[x=1:360:120]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
                        regrid: 120 deg on X
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (LONGITUDE)
             LATITUDE : 1N
             TIME     : 16-JAN 06:00
               1N    
               46
 1E     / 1:  27.83
 121E   / 2:  28.59
 119W   / 3:  24.54
 
set reg/x=300:360/y=0:50
repeat/range=1:12:4/name=m (list sst[l=`m`,x=@ave,y=@ave])
!-> REPEAT: M:1
 !-> list sst[l=1,x=@ave,y=@ave]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             LONGITUDE: 60W to 0E(360) (XY ave)
             LATITUDE : 0 to 50N (XY ave)
             TIME     : 16-JAN 06:00
          20.98
!-> REPEAT: M:5
 !-> list sst[l=5,x=@ave,y=@ave]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             LONGITUDE: 60W to 0E(360) (XY ave)
             LATITUDE : 0 to 50N (XY ave)
             TIME     : 15-JAN 11:49
          20.98
!-> REPEAT: M:9
 !-> list sst[l=9,x=@ave,y=@ave]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             LONGITUDE: 60W to 0E(360) (XY ave)
             LATITUDE : 0 to 50N (XY ave)
             TIME     : 15-JAN 17:38
          20.98
 
! Look for "reading SST" lines; each has a different X range
can data/all
can mem
can region
use coads_climatology
 
set mode diag
set reg/y=0:50/L=1
repeat/range=300:360:30/name=m (list sst[x=280:`m`@ave,y=@ave])
!-> REPEAT: M:300
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1  M: -999 -999  N: -999 -999
 constan cnst     M: 11 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE cnst     M: 10 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 !-> list sst[x=280:300@ave,y=@ave]
 -DELETE cnst     M: 11 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J:   46   70  K: -999 -999  L:      1      1
 strip --> SST[Y=0:50N@AV4,D=1]
 reading SST      M: 11 dset:   1 I:    131    140  J:   46   70  K: -999 -999  L:      1      1
 doing --> SST[Y=0:50N@AV4,D=1]
 final --> SST[Y=0:50N@AV4,D=1]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             LONGITUDE: 80W to 60W (XY ave)
             LATITUDE : 0 to 50N (XY ave)
             TIME     : 16-JAN 06:00
          20.79
!-> REPEAT: M:330
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1  M: -999 -999  N: -999 -999
 constan cnst     M:  9 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE cnst     M:  8 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 !-> list sst[x=280:330@ave,y=@ave]
 -DELETE cnst     M:  9 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J:   46   70  K: -999 -999  L:      1      1
 strip --> SST[Y=0:50N@AV4,D=1]
 reading SST      M:  9 dset:   1 I:    131    155  J:   46   70  K: -999 -999  L:      1      1
 doing --> SST[Y=0:50N@AV4,D=1]
 final --> SST[Y=0:50N@AV4,D=1]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             LONGITUDE: 80W to 30W (XY ave)
             LATITUDE : 0 to 50N (XY ave)
             TIME     : 16-JAN 06:00
          21.25
!-> REPEAT: M:360
 dealloc  dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1  M: -999 -999  N: -999 -999
 constan cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE cnst     M:  2 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 !-> list sst[x=280:360@ave,y=@ave]
 -DELETE cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 dealloc  dynamic grid ABSTRACT        ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT  ABSTRACT
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSQ1            COADSX    COADSY    NORMAL    TIME
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J:   46   70  K: -999 -999  L:      1      1
 strip --> SST[Y=0:50N@AV4,D=1]
 reading SST      M:  3 dset:   1 I:    131    170  J:   46   70  K: -999 -999  L:      1      1
 doing --> SST[Y=0:50N@AV4,D=1]
 final --> SST[Y=0:50N@AV4,D=1]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             LONGITUDE: 80W to 0E(360) (XY ave)
             LATITUDE : 0 to 50N (XY ave)
             TIME     : 16-JAN 06:00
          20.94
cancel mode diag
 
! order of qualifiers doesnt matter
repeat/name=a/range=1:3 say `a`
!-> REPEAT: A:1
 !-> MESSAGE/CONTINUE 1
1
!-> REPEAT: A:2
 !-> MESSAGE/CONTINUE 2
2
!-> REPEAT: A:3
 !-> MESSAGE/CONTINUE 3
3
 
! Test using a file variable name
use coads_climatology
repeat/name=sst/range=1:5 (list sst)
!-> REPEAT: SST:1
             VARIABLE : constant
          1.000
!-> REPEAT: SST:2
             VARIABLE : constant
          2.000
!-> REPEAT: SST:3
             VARIABLE : constant
          3.000
!-> REPEAT: SST:4
             VARIABLE : constant
          4.000
!-> REPEAT: SST:5
             VARIABLE : constant
          5.000
list/l=1/x=181/y=1 sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             LONGITUDE: 179W
             LATITUDE : 1N
             TIME     : 16-JAN 06:00
          28.28
can data/all
 
! Intentional errors
set mode ignore
 
! /NAME without /RANGE
rep/name=a say `a`
 
! Cannot use pseudo-variables.
 
set mode ignore
rep/range=1:3/name=L (use coads_climatology; list/nohead [sst=I=1,j=1])
 
! Check that the state is reset after error
rep/range=1:3/name=a say `a`
!-> REPEAT: A:1
 !-> MESSAGE/CONTINUE 1
1
!-> REPEAT: A:2
 !-> MESSAGE/CONTINUE 2
2
!-> REPEAT: A:3
 !-> MESSAGE/CONTINUE 3
3
 
rep/range=1:3/name=I (use coads_climatology; list/nohead [sst])
rep/range=1:3/name=j (use coads_climatology; list/nohead [sst])
rep/range=1:3/name=k (use coads_climatology; list/nohead [sst])
rep/range=1:3/name=X (use coads_climatology; list/nohead [sst])
rep/range=1:3/name=y (use coads_climatology; list/nohead [sst])
rep/range=1:3/name=z (use coads_climatology; list/nohead [sst])
rep/range=1:3/name=tbox (use coads_climatology; list/nohead[sst,x=181,y=0,t=`tbox`])
rep/range=1:3/name=xboxlo (list/nohead xboxlo)
 
 
! Nested REPEAT with the same counter variable name
repeat/range=1:4/name=a (repeat/range=3:1:-1/name=a list a)
!-> REPEAT: A:1
!-> REPEAT: A:2
!-> REPEAT: A:3
!-> REPEAT: A:4
cancel mode ignore
*** Running ferret script: bn554_bug_fixes.jnl
! bn554_bug_fixes.jnl
! test various fixes that went into version 5.54
! 11/03 *acm*
!
 
! Test use of longer strings in region names
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err553_regionname_lengths.jnl
! In v5.50, we upped the region name storage to
! allow 24-characters.  Wasnt fully implemented.
! acm 11/03
 
SET MODE IGNORE_ERRORS
 
def region/x=100e:150e/y=0:40 southeast_asia
show region southeast_asia
region southeast_asia
        X=100:150
        Y=0:40
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
set region southeast_asia
show region
default region:
        X=100:150
        Y=0:40
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
 
def region/x=150:210/y=-60:0 southwest_pacific
show region/all
default region:
        X=100:150
        Y=0:40
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
region southeast_asia
        X=100:150
        Y=0:40
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
region southwest_pacific
        X=150:210
        Y=-60:0
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
 
SET MODE/LAST IGNORE_ERRORS
 
 
! Reqests for data at times outside range of data
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err553_timeregion.jnl
! try to apply a region whose limits are both below,
! or both above, the data bounds. In v5.53 the error
! handling for this got broken for time axes (an error
! in the fix for err551_no_taxis_errmsg)
! acm 11/03
 
SET MODE IGNORE_ERRORS
 
	use gt4d011.cdf
list/t=1-aug-1980:1-jan-1982/i=92/j=35 temp
 
 
SET MODE/LAST IGNORE_ERRORS
 
! Contour plot on fine grid has precision problems
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err553_contour_fine_grid.jnl
! err553_contour_find_grid.jnl
! 11/21/03 ACM
 
! For fine grids, precision isnt sufficient to
! compute the values to map coordinates to the
! page.  The bug occurs with smith_sandwell_topo
! and has to do with large index values in the
! calculations. This small set ss_small.nc is saved
! from smith_sandwell_topo.  Then we need to put it on
! a large grid to see the error.  The first contour
! command either shows nothing, or a set of contours
! that are shifted relative to the (correct) second
! contour plot.
 
! The fix is to increase precision for some of the
! calculations in plotz.F, pltit.F and setax.F
 
use ss_small.nc
def axis/x=0.16e:0.67w/npoints=10800 xax
def axis/y=72s:72n/npoints=6336 yax
def grid/x=xax/y=yax fullgrid
let rrose = rose[g=fullgrid]
set grid fullgrid
set reg/x=137.25w:135.75w/y=58.2n:59.15n
go mp_mercator
go mp_aspect
contour rrose,x_page, y_page
contour/over/color=red rrose, x_page, y_page
 
PPLUS/RESET   ! reset aspect ratio
 
! PLOT/SYM/SIZE= did not change the size
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err553_symsize.jnl
! PLOT/SYM/SIZE= does not change the size from the default.
! acm 11/03
!
plot/i=1:10/sym=20/siz=.4 i
plot/over/i=1:10/sym=20/siz=0.2 i
 
! test labels on shade keys; consistent number of digits set by 5th shakey arg
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err553_shakey_labels.jnl
! The 5th argument to shakey is supposed to define
! number of digits in the label.
! acm 12/03
 
shade/set/i=1:10/j=1:10 (i+j)/10
ppl shakey 1, , , , -2
ppl shade
shade/set/i=1:10/j=1:10 (i+j)/10
ppl shakey 1, , , , -1
ppl shade
 
 
! couldnt set the number of small tics with arg to %xaxis, %yaxis commands
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err553_xaxis_nsmtc.jnl
! Bug: 5th argument failed to set the number of small
! tics for the axis.
 
! ACM 12/12/03
 
ppl %xaxis/nouser 1,100,10,1,4
ppl %xaxis/nouser 1,100,10,2,6
ppl %yaxis/nouser 1,100,10,1,4
ppl %yaxis/nouser 1,100,10,2,6
 
 
! The defined year length was different if we used DEFINE AXIS/UNIT=year
! vs DEFINE AXIS/UNIT=yr
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err553_year_yr.jnl
! err553_year_yr.jnl
! 2/2004 ACM
! DEFINE AXIS/UNITS=year and UNITS=yr should be the same;
! and year length should match the length of a year in
! the specified calendar
 
def ax/t=1-jan-0001:1-jan-0100:`1/12,p=9`/edge/cal=noleap/unit=year tax1
 !-> def ax/t=1-jan-0001:1-jan-0100:0.0833333333/edge/cal=noleap/unit=year tax1
def ax/t=1-jan-0001:1-jan-0100:`1/12,p=9`/edge/cal=noleap/unit=yr tax2
 !-> def ax/t=1-jan-0001:1-jan-0100:0.0833333333/edge/cal=noleap/unit=yr tax2
show axis tax1
 name       axis              # pts   start                end
 TAX1      TIME              1188 r   16-JAN-0001 04:59    16-DEC-0099 18:59
T0 = 01-JAN-0000
CALENDAR = NOLEAP
   Axis span (to cell edges) = 99
show axis tax2
 name       axis              # pts   start                end
 TAX2      TIME              1188 r   16-JAN-0001 04:59    16-DEC-0099 18:59
T0 = 01-JAN-0000
CALENDAR = NOLEAP
   Axis span (to cell edges) = 99
list/l=1186:1189 t[gt=tax1]
             VARIABLE : T
                        axis TAX1
             SUBSET   : 3 points (TIME)
             CALENDAR : NOLEAP
 16-OCT-0099 / 1186:  99.79
 16-NOV-0099 / 1187:  99.87
 16-DEC-0099 / 1188:  99.96
list/l=1186:1189 t[gt=tax2]
             VARIABLE : T
                        axis TAX2
             SUBSET   : 3 points (TIME)
             CALENDAR : NOLEAP
 16-OCT-0099 / 1186:  99.79
 16-NOV-0099 / 1187:  99.87
 16-DEC-0099 / 1188:  99.96
 
def ax/t=1-jan-0001:1-jan-0100:`1/12,p=9`/edge/cal=julian/unit=year tax1
 !-> def ax/t=1-jan-0001:1-jan-0100:0.0833333333/edge/cal=julian/unit=year tax1
def ax/t=1-jan-0001:1-jan-0100:`1/12,p=9`/edge/cal=julian/unit=yr tax2
 !-> def ax/t=1-jan-0001:1-jan-0100:0.0833333333/edge/cal=julian/unit=yr tax2
show axis tax1
 name       axis              # pts   start                end
 TAX1      TIME              1188 r   16-JAN-0001 05:14    17-DEC-0099 12:44
T0 = 01-JAN-0000
CALENDAR = JULIAN
   Axis span (to cell edges) = 99
show axis tax2
 name       axis              # pts   start                end
 TAX2      TIME              1188 r   16-JAN-0001 05:14    17-DEC-0099 12:44
T0 = 01-JAN-0000
CALENDAR = JULIAN
   Axis span (to cell edges) = 99
list/l=1186:1189 t[gt=tax1]
             VARIABLE : T
                        axis TAX1
             SUBSET   : 3 points (TIME)
             CALENDAR : JULIAN
 17-OCT-0099 / 1186:  99.79
 17-NOV-0099 / 1187:  99.88
 17-DEC-0099 / 1188:  99.96
list/l=1186:1189 t[gt=tax2]
             VARIABLE : T
                        axis TAX2
             SUBSET   : 3 points (TIME)
             CALENDAR : JULIAN
 17-OCT-0099 / 1186:  99.79
 17-NOV-0099 / 1187:  99.88
 17-DEC-0099 / 1188:  99.96
 
def ax/t=1-jan-0001:1-jan-0100:`1/12,p=9`/edge/cal=standard/unit=year tax1
 !-> def ax/t=1-jan-0001:1-jan-0100:0.0833333333/edge/cal=standard/unit=year tax1
def ax/t=1-jan-0001:1-jan-0100:`1/12,p=9`/edge/cal=standard/unit=yr tax2
 !-> def ax/t=1-jan-0001:1-jan-0100:0.0833333333/edge/cal=standard/unit=yr tax2
show axis tax1
 name       axis              # pts   start                end
 TAX1      TIME              1188 r   16-JAN-0001 05:14    16-DEC-0099 18:56
T0 = 01-JAN-0000
   Axis span (to cell edges) = 99
show axis tax2
 name       axis              # pts   start                end
 TAX2      TIME              1188 r   16-JAN-0001 05:14    16-DEC-0099 18:56
T0 = 01-JAN-0000
   Axis span (to cell edges) = 99
list/l=1186:1189 t[gt=tax1]
             VARIABLE : T
                        axis TAX1
             SUBSET   : 3 points (TIME)
 16-OCT-0099 / 1186:  99.79
 16-NOV-0099 / 1187:  99.88
 16-DEC-0099 / 1188:  99.96
list/l=1186:1189 t[gt=tax2]
             VARIABLE : T
                        axis TAX2
             SUBSET   : 3 points (TIME)
 16-OCT-0099 / 1186:  99.79
 16-NOV-0099 / 1187:  99.88
 16-DEC-0099 / 1188:  99.96
 
def ax/t=1-jan-0001:1-jan-0100:`1/12,p=9`/edge/unit=year tax1
 !-> def ax/t=1-jan-0001:1-jan-0100:0.0833333333/edge/unit=year tax1
def ax/t=1-jan-0001:1-jan-0100:`1/12,p=9`/edge/unit=yr tax2
 !-> def ax/t=1-jan-0001:1-jan-0100:0.0833333333/edge/unit=yr tax2
show axis tax1
 name       axis              # pts   start                end
 TAX1      TIME              1188 r   16-JAN-0001 05:14    16-DEC-0099 18:56
T0 = 01-JAN-0000
   Axis span (to cell edges) = 99
show axis tax2
 name       axis              # pts   start                end
 TAX2      TIME              1188 r   16-JAN-0001 05:14    16-DEC-0099 18:56
T0 = 01-JAN-0000
   Axis span (to cell edges) = 99
list/l=1186:1189 t[gt=tax1]
             VARIABLE : T
                        axis TAX1
             SUBSET   : 3 points (TIME)
 16-OCT-0099 / 1186:  99.79
 16-NOV-0099 / 1187:  99.88
 16-DEC-0099 / 1188:  99.96
list/l=1186:1189 t[gt=tax2]
             VARIABLE : T
                        axis TAX2
             SUBSET   : 3 points (TIME)
 16-OCT-0099 / 1186:  99.79
 16-NOV-0099 / 1187:  99.88
 16-DEC-0099 / 1188:  99.96
 
! v553 and before also had a bug in where D360 not properly defined in
! calendar_blkdat.F so length of year not correct.
 
def ax/t=1-jan-0001:1-jan-0100:`1/12,p=9`/edge/cal=d360/unit=year tax1
 !-> def ax/t=1-jan-0001:1-jan-0100:0.0833333333/edge/cal=d360/unit=year tax1
def ax/t=1-jan-0001:1-jan-0100:`1/12,p=9`/edge/cal=d360/unit=yr tax2
 !-> def ax/t=1-jan-0001:1-jan-0100:0.0833333333/edge/cal=d360/unit=yr tax2
show axis tax1
 name       axis              # pts   start                end
 TAX1      TIME              1188 r   15-JAN-0001 23:59    15-DEC-0099 23:59
T0 = 01-JAN-0000
CALENDAR = 360_DAY
   Axis span (to cell edges) = 99
show axis tax2
 name       axis              # pts   start                end
 TAX2      TIME              1188 r   15-JAN-0001 23:59    15-DEC-0099 23:59
T0 = 01-JAN-0000
CALENDAR = 360_DAY
   Axis span (to cell edges) = 99
set mode ignore
list/l=1186:1189 t[gt=tax1]
             VARIABLE : T
                        axis TAX1
             SUBSET   : 3 points (TIME)
             CALENDAR : 360_DAY
 15-OCT-0099 23 / 1186:  99.79
 15-NOV-0099 23 / 1187:  99.87
 15-DEC-0099 23 / 1188:  99.96
list/l=1186:1189 t[gt=tax2]
             VARIABLE : T
                        axis TAX2
             SUBSET   : 3 points (TIME)
             CALENDAR : 360_DAY
 15-OCT-0099 23 / 1186:  99.79
 15-NOV-0099 23 / 1187:  99.87
 15-DEC-0099 23 / 1188:  99.96
list/l=1168:1171 t[gt=tax1]
             VARIABLE : T
                        axis TAX1
             SUBSET   : 4 points (TIME)
             CALENDAR : 360_DAY
 15-APR-0098 23 / 1168:  98.29
 15-MAY-0098 23 / 1169:  98.37
 15-JUN-0098 23 / 1170:  98.46
 15-JUL-0098 23 / 1171:  98.54
list/l=1168:1171 t[gt=tax2]
             VARIABLE : T
                        axis TAX2
             SUBSET   : 4 points (TIME)
             CALENDAR : 360_DAY
 15-APR-0098 23 / 1168:  98.29
 15-MAY-0098 23 / 1169:  98.37
 15-JUN-0098 23 / 1170:  98.46
 15-JUL-0098 23 / 1171:  98.54
can mode ignore
 
! When we do a DEFINE GRID/LIKE=var and then try to read the var with
! strides, Ferret did a regridding instead.  Test the fix for this
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err553_stride_def_grid.jnl
 
use gtsa056_2.cdf
set mode diag
let a = taux[i=50:55:2,j=44:50:3,l=1:168:8]
load a
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    A        C:  6 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 strip regrid on X: TAUX --> (G###)           @XACT
 rdstride TAUX     C:  9 dset:   1 I:     50     54  J:   44   50  K: -999 -999  L:      1    161
 nulrgd  TAUX     M: 28 dset:   1 I:      1      3  J:    1    3  K: -999 -999  L:      1     21
 -DELETE TAUX     M: 29 dset:   1 I:     50     54  J:   44   50  K: -999 -999  L:      1    161
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
can mem/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 -DELETE A        M: 29 dset:   1 I:      1      3  J:    1    3  K: -999 -999  L:      1     21
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 -DELETE TAUX     M: 28 dset:   1 I:      1      3  J:    1    3  K: -999 -999  L:      1     21
 
def grid/like=taux agrid
 getgrid EX#1     C:  6 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS2DU1          PSXU      PSYU      NORMAL    TIME
set mode diag
let a = taux[i=50:55:2,j=44:50:3,l=1:168:8]
 dealloc  dynamic grid PS2DU1          PSXU      PSYU      NORMAL    TIME
load a
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    A        C:  6 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 strip regrid on X: TAUX --> (G###)           @XACT
 rdstride TAUX     C:  9 dset:   1 I:     50     54  J:   44   50  K: -999 -999  L:      1    161
 nulrgd  TAUX     M: 29 dset:   1 I:      1      3  J:    1    3  K: -999 -999  L:      1     21
 -DELETE TAUX     M: 28 dset:   1 I:     50     54  J:   44   50  K: -999 -999  L:      1    161
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 
can mem/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 -DELETE A        M: 28 dset:   1 I:      1      3  J:    1    3  K: -999 -999  L:      1     21
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 -DELETE TAUX     M: 29 dset:   1 I:      1      3  J:    1    3  K: -999 -999  L:      1     21
can data/all
 canceling dset ./data/gtsa056_2.cdf
 
! Some tests taken from  bn_strides_revs_perms.jnl but with
! DEFINE GRID/LIKE= testing permuting and reversing axes
 
! first with an XYZT variable
set region/i=3:6/j=2:4/k=1:2/l=1
use bn_strides
define grid/like=var agrid
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GPC1            XAX1_4    YAX1_3    ZAX1_2    TAX1_1
 dealloc  dynamic grid GPC1            XAX1_4    YAX1_3    ZAX1_2    TAX1_1
define grid/like=midvar bgrid
 getgrid EX#1     C:  6 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GPC2            XAX1_9    YAX1_8    ZAX1_7    TAX1_6
define grid/like=bigvar cgrid
 dealloc  dynamic grid GPC2            XAX1_9    YAX1_8    ZAX1_7    TAX1_6
 getgrid EX#1     C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GPC3            XAX1_40   YAX1_30   ZAX1_20   TAX1_10
define grid/like=unevenvar dgrid
 dealloc  dynamic grid GPC3            XAX1_40   YAX1_30   ZAX1_20   TAX1_10
 getgrid EX#1     C:  8 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GPC4            XUNEVEN   YUNEVEN   ZAX1_6    TAX1_4
define grid/like=xytvar egrid
 dealloc  dynamic grid GPC4            XUNEVEN   YUNEVEN   ZAX1_6    TAX1_4
 getgrid EX#1     C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GPC5            XLON      YLAT      NORMAL    TTIME
canc data/all
 dealloc  dynamic grid GPC5            XLON      YLAT      NORMAL    TTIME
 canceling dset ./data/bn_strides.cdf
 
 
! cache hit from full region cache -- bypass use of strides
cancel memory/all
use bn_strides
load var
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:      3      4  J:    2    3  K:    1    2  L:      1      1
 reading VAR      M: 29 dset:   1 I:      3      4  J:    2    3  K:    1    2  L:      1      1
LIST VAR[i=2:4:2]
 dealloc  dynamic grid AGRID           XAX1_4    YAX1_3    ZAX1_2    TAX1_1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 eval    EX#1     C:  4 dset:   1 I:      3      6  J:    2    3  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 strip regrid on X: VAR --> (G###)           @XACT
 rdstride VAR      C:  7 dset:   1 I:      2      4  J:    2    3  K:    1    2  L:      1      1
 nulrgd  VAR      M: 27 dset:   1 I:      1      2  J:    2    3  K:    1    2  L:      1      1
 -DELETE VAR      M: 28 dset:   1 I:      2      4  J:    2    3  K:    1    2  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
             VARIABLE : L*1000 + K*100 + J*10 + I
                        regrid: 2 delta on X
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             2      4    
             1      2
 ---- K:1 Z:   1
 2   / 2:  1122.  1124.
 3   / 3:  1132.  1134.
 ---- K:2 Z:   2
 2   / 2:  1222.  1224.
 3   / 3:  1232.  1234.
LIST VAR[i=2:4:2,j=1:3:2]
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 -DELETE VAR      M: 27 dset:   1 I:      1      2  J:    2    3  K:    1    2  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 eval    EX#1     C:  4 dset:   1 I:      3      6  J:    2    4  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 strip regrid on X: VAR --> (G###)           @XACT
 rdstride VAR      C:  7 dset:   1 I:      2      4  J:    1    3  K:    1    2  L:      1      1
 nulrgd  VAR      M: 28 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE VAR      M: 27 dset:   1 I:      2      4  J:    1    3  K:    1    2  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
             VARIABLE : L*1000 + K*100 + J*10 + I
                        regrid: 2 delta on X, 2 delta on Y
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             2      4    
             1      2
 ---- K:1 Z:   1
 1   / 1:  1112.  1114.
 3   / 2:  1132.  1134.
 ---- K:2 Z:   2
 1   / 1:  1212.  1214.
 3   / 2:  1232.  1234.
CANC MEM/ALL
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 -DELETE VAR      M: 28 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE VAR      M: 29 dset:   1 I:      3      4  J:    2    3  K:    1    2  L:      1      1
 
! modulo requests cannot use strides (as this example shows)
set axis/modulo XAX1_4
LIST VAR[I=1:10:3,j=1,k=1,l=1]    ! 1, 4, 7(3), 10(2)
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 eval    EX#1     C:  4 dset:   1 I:      3      6  J:    2    4  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 strip regrid on X: VAR --> (G###)           @XACT
 strip moduloing VAR on X axis:        1       10 dset:   1
 reading VAR      M: 29 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 doing moduloing VAR on X axis:        1        4 dset:   1
 regrid  VAR      M: 27 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
             VARIABLE : L*1000 + K*100 + J*10 + I
                        regrid: 3 delta on X
             FILENAME : bn_strides.cdf
             SUBSET   : 4 points (X)
             Y        : 1
             Z        : 1
             T        : 1
              1    
              1
 1    / 1:  1111.
 4    / 2:  1114.
 7    / 3:  1113.
 10   / 4:  1112.
cancel axis/modulo XAX1_4
 -DELETE VAR      M: 27 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 -DELETE VAR      M: 28 dset:   1 I:      1     10  J:    1    1  K:    1    1  L:      1      1
 -DELETE VAR      M: 29 dset:   1 I:      1      4  J:    1    1  K:    1    1  L:      1      1
 
! strides applied to more than one axis need special attention in IS_REGRID
LIST VAR[i=2:4:2,j=1:3:2]
 dealloc  dynamic grid (G###)          (AX###)   YAX1_3    ZAX1_2    TAX1_1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 eval    EX#1     C:  4 dset:   1 I:      3      6  J:    2    4  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 strip regrid on X: VAR --> (G###)           @XACT
 rdstride VAR      C:  7 dset:   1 I:      2      4  J:    1    3  K:    1    2  L:      1      1
 nulrgd  VAR      M: 28 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE VAR      M: 29 dset:   1 I:      2      4  J:    1    3  K:    1    2  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
             VARIABLE : L*1000 + K*100 + J*10 + I
                        regrid: 2 delta on X, 2 delta on Y
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             2      4    
             1      2
 ---- K:1 Z:   1
 1   / 1:  1112.  1114.
 3   / 2:  1132.  1134.
 ---- K:2 Z:   2
 1   / 1:  1212.  1214.
 3   / 2:  1232.  1234.
LIST VAR[i=2:6:2,j=1:5:2]
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 -DELETE VAR      M: 28 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 eval    EX#1     C:  4 dset:   1 I:      3      6  J:    2    4  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 strip regrid on X: VAR --> (G###)           @XACT
 rdstride VAR      C:  7 dset:   1 I:      2      4  J:    1    3  K:    1    2  L:      1      1
 nulrgd  VAR      M: 29 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE VAR      M: 28 dset:   1 I:      2      4  J:    1    3  K:    1    2  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
             VARIABLE : L*1000 + K*100 + J*10 + I
                        regrid: 2 delta on X, 2 delta on Y
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             2      4    
             1      2
 ---- K:1 Z:   1
 1   / 1:  1112.  1114.
 3   / 2:  1132.  1134.
 ---- K:2 Z:   2
 1   / 1:  1212.  1214.
 3   / 2:  1232.  1234.
 
! test sub-region selection on strides axis
let a = bigvar[i=1:40:5]
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_2    TAX1_1
 -DELETE VAR      M: 29 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
list/j=1/k=1/l=1 a[i=3:5]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 dealloc  dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 allocate dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 allocate dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      3      6  J:    1    1  K:    1    1  L:      1      1
 eval    A        C:  7 dset:   1 I:      3      5  J:    1    1  K:    1    1  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 strip regrid on X: BIGVAR --> (G###)           @XACT
 rdstride BIGVAR   C: 10 dset:   1 I:      1     36  J:    1    1  K:    1    1  L:      1      1
 nulrgd  BIGVAR   M: 28 dset:   1 I:      1      8  J:    1    1  K:    1    1  L:      1      1
 -DELETE BIGVAR   M: 29 dset:   1 I:      1     36  J:    1    1  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
             VARIABLE : BIGVAR[I=1:40:5]
             FILENAME : bn_strides.cdf
             SUBSET   : 3 points (X)
             Y        : 1
             Z        : 1
             T        : 1
              1    
              1
 11   / 3:  1121.
 16   / 4:  1126.
 21   / 5:  1131.
 -DELETE A        M: 27 dset:   1 I:      1      1  J:    3    5  K:    1    1  L:      1      1
list/k=1/l=1 a[i=3:5,j=1:8:2]
 dealloc  dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_20   TAX1_10
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_20   TAX1_10
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_20   TAX1_10
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      3      6  J:    2    4  K:    1    1  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   ZAX1_20   TAX1_10
 strip regrid on Y: A --> (G###)           @XACT
 eval    A        C:  8 dset:   1 I:      3      5  J:    1    7  K:    1    1  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 strip regrid on X: BIGVAR --> (G###)           @XACT
 rdstride BIGVAR   C: 11 dset:   1 I:      1     36  J:    1    7  K:    1    1  L:      1      1
 nulrgd  BIGVAR   M: 25 dset:   1 I:      1      8  J:    1    7  K:    1    1  L:      1      1
 -DELETE BIGVAR   M: 27 dset:   1 I:      1     36  J:    1    7  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 regrid  A        M:  8 dset:   1 I:      3      5  J:    1    4  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_20   TAX1_10
             VARIABLE : BIGVAR[I=1:40:5]
                        regrid: 2 delta on Y
             FILENAME : bn_strides.cdf
             SUBSET   : 3 by 4 points (X-Y)
             Z        : 1
             T        : 1
            11     16     21    
             3      4      5
 1   / 1:  1121.  1126.  1131.
 3   / 2:  1141.  1146.  1151.
 5   / 3:  1161.  1166.  1171.
 7   / 4:  1181.  1186.  1191.
 
! ****** unequally spaced points on parent axis
 
cancel mem/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   ZAX1_20   TAX1_10
 -DELETE A        M:  8 dset:   1 I:      3      5  J:    1    4  K:    1    1  L:      1      1
 -DELETE A        M: 27 dset:   1 I:      1      8  J:    1    7  K:    1    1  L:      1      1
 -DELETE A        M: 29 dset:   1 I:      1      8  J:    1    1  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YAX1_30   ZAX1_20   TAX1_10
 -DELETE BIGVAR   M: 25 dset:   1 I:      1      8  J:    1    7  K:    1    1  L:      1      1
 -DELETE BIGVAR   M: 28 dset:   1 I:      1      8  J:    1    1  K:    1    1  L:      1      1
 
! basic strides
LIST/order=x/j=1/k=1/l=1 UNEVENVAR[i=2:4:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      3      6  J:    1    1  K:    1    1  L:      1      1
 allocate dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 strip regrid on X: UNEVENVAR --> (G###)           @XACT
 rdstride UNE-NVAR C:  8 dset:   1 I:      2      4  J:    1    1  K:    1    1  L:      1      1
 nulrgd  UNE-NVAR M: 25 dset:   1 I:      1      2  J:    1    1  K:    1    1  L:      1      1
 -DELETE UNE-NVAR M: 28 dset:   1 I:      2      4  J:    1    1  K:    1    1  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
             VARIABLE : L*1000 + K*100 + J[GY=YUNEVEN]*10 + I[GX=XUNEVEN]
                        regrid: on X
             FILENAME : bn_strides.cdf
             SUBSET   : 2 points (X)
             Y        : 0
             Z        : 1
             T        : 1
           0.3    0.6   
            1      2
          1112.  1114.
 
! * * * * * MIXED STRIDES and PERMUTATIONS * * * * *
 
set region/i=3:6/j=2:4/k=1:2/l=1
 
use/order=yx bn_strides
list bigvar[i=3:9:2, j=2:6:2, k=1:3:2]
 dealloc  dynamic grid (G###)          (AX###)   YUNEVEN   ZAX1_6    TAX1_4
 -DELETE UNE-NVAR M: 25 dset:   1 I:      1      2  J:    1    1  K:    1    1  L:      1      1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 eval    EX#1     C:  4 dset:   1 I:      3      6  J:    2    4  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 strip regrid on X: BIGVAR --> (G###)           @XACT
 rdstride BIGVAR   C:  7 dset:   1 I:      3      9  J:    2    6  K:    1    3  L:      1      1
 nulrgd  BIGVAR   M: 28 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 -DELETE BIGVAR   M: 25 dset:   1 I:      3      9  J:    2    6  K:    1    3  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
             VARIABLE : VAR
                        regrid: 2 delta on X, 2 delta on Y, 2 delta on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X-Y-Z)
             T        : 1
             3      5      7      9    
             1      2      3      4
 ---- K:1 Z:   1
 2   / 1:  1123.  1125.  1127.  1129.
 4   / 2:  1143.  1145.  1147.  1149.
 6   / 3:  1163.  1165.  1167.  1169.
 ---- K:2 Z:   3
 2   / 1:  1323.  1325.  1327.  1329.
 4   / 2:  1343.  1345.  1347.  1349.
 6   / 3:  1363.  1365.  1367.  1369.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 -DELETE BIGVAR   M: 28 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 canceling dset ./data/bn_strides.cdf
 
use/order=zyx bn_strides
list bigvar[i=3:9:2, j=2:6:2, k=1:3:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 eval    EX#1     C:  4 dset:   1 I:      3      6  J:    2    4  K:    1    2  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 strip regrid on X: BIGVAR --> (G###)           @XACT
 rdstride BIGVAR   C:  7 dset:   1 I:      3      9  J:    2    6  K:    1    3  L:      1      1
 nulrgd  BIGVAR   M: 25 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 -DELETE BIGVAR   M: 28 dset:   1 I:      3      9  J:    2    6  K:    1    3  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
             VARIABLE : VAR
                        regrid: 2 delta on X, 2 delta on Y, 2 delta on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X-Y-Z)
             T        : 1
             3      5      7      9    
             1      2      3      4
 ---- K:1 Z:   1
 2   / 1:  1321.  1521.  1721.  1921.
 4   / 2:  1341.  1541.  1741.  1941.
 6   / 3:  1361.  1561.  1761.  1961.
 ---- K:2 Z:   3
 2   / 1:  1323.  1523.  1723.  1923.
 4   / 2:  1343.  1543.  1743.  1943.
 6   / 3:  1363.  1563.  1763.  1963.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_10
 -DELETE BIGVAR   M: 25 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:      1      1
 canceling dset ./data/bn_strides.cdf
 
! now with xytvar
cancel region
set region/i=1:4/j=1:3/l=1:2
use bn_strides
 
list xytvar[i=1:7:2,j=2:6:2,l=3:5:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 strip regrid on X: XYTVAR --> (G###)           @XACT
 rdstride XYTVAR   C:  7 dset:   1 I:      1      7  J:    2    6  K: -999 -999  L:      3      5
 nulrgd  XYTVAR   M: 28 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 -DELETE XYTVAR   M: 25 dset:   1 I:      1      7  J:    2    6  K: -999 -999  L:      3      5
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
             VARIABLE : L*1000 + J*10 + I
                        regrid: 2 deg on X, 2 deg on Y, 2 day on T
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (LONGITUDE-LATITUDE-TIME)
            141E   143E   145E   147E   
              1      2      3      4
 ---- L:1 T:   03-JAN-1995 00:00
 6N   / 3:  3061.  3063.  3065.  3067.
 4N   / 2:  3041.  3043.  3045.  3047.
 2N   / 1:  3021.  3023.  3025.  3027.
 ---- L:2 T:   05-JAN-1995 00:00
 6N   / 3:  5061.  5063.  5065.  5067.
 4N   / 2:  5041.  5043.  5045.  5047.
 2N   / 1:  5021.  5023.  5025.  5027.
 
use/order=tyx bn_strides
show grid xytvar
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 -DELETE XYTVAR   M: 28 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 getgrid EX#1     C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
    GRID EGRID
 name       axis              # pts   start                end                 subset
 XLON      LONGITUDE           40mr   141E                 180E                full
 YLAT      LATITUDE            30 r   1N                   30N                 full
 normal    Z
 TTIME     TIME                20 r   01-JAN-1995 00:00    20-JAN-1995 00:00   full
 dealloc  dynamic grid EGRID           XLON      YLAT      NORMAL    TTIME
 
list xytvar[i=1:7:2,j=2:6:2,l=3:5:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 allocate dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 strip regrid on X: XYTVAR --> (G###)           @XACT
 rdstride XYTVAR   C:  7 dset:   1 I:      1      7  J:    2    6  K: -999 -999  L:      3      5
 nulrgd  XYTVAR   M: 25 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 -DELETE XYTVAR   M: 28 dset:   1 I:      1      7  J:    2    6  K: -999 -999  L:      3      5
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
             VARIABLE : L*1000 + J*10 + I
                        regrid: 2 deg on X, 2 deg on Y, 2 day on T
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (LONGITUDE-LATITUDE-TIME)
            141E   143E   145E   147E   
              1      2      3      4
 ---- L:1 T:   03-JAN-1995 00:00
 6N   / 3:  3061.  3063.  3065.  3067.
 4N   / 2:  3041.  3043.  3045.  3047.
 2N   / 1:  3021.  3023.  3025.  3027.
 ---- L:2 T:   05-JAN-1995 00:00
 6N   / 3:  5061.  5063.  5065.  5067.
 4N   / 2:  5041.  5043.  5045.  5047.
 2N   / 1:  5021.  5023.  5025.  5027.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   NORMAL    (AX###)
 -DELETE XYTVAR   M: 25 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 canceling dset ./data/bn_strides.cdf
 
! map into Z instead of T
use/order=zxy bn_strides
show grid xytvar
 getgrid EX#1     C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GPC5            TTIME     XLON      YLAT      NORMAL
    GRID GPC5
 name       axis              # pts   start                end                 subset
 TTIME     X (DAYS)            20 r   34319                34338               full
 XLON      Y (degrees_east)    40mr   141                  180                 full
 YLAT      Z (degrees_north)   30 r   1                    30                  full
 normal    T
 dealloc  dynamic grid GPC5            TTIME     XLON      YLAT      NORMAL
 
list xytvar[i=1:7:2,j=2:6:2,k=3:5:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   NORMAL
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   NORMAL
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   NORMAL
 eval    EX#1     C:  4 dset:   1 I:      1      4  J:    1    3  K: -999 -999  L:      1      2
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   NORMAL
 strip regrid on X: XYTVAR --> (G###)           @XACT
 rdstride XYTVAR   C:  7 dset:   1 I:      1      7  J:    2    6  K:    3    5  L:   -999   -999
 nulrgd  XYTVAR   M: 28 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:   -999   -999
 -DELETE XYTVAR   M: 25 dset:   1 I:      1      7  J:    2    6  K:    3    5  L:   -999   -999
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   NORMAL
             VARIABLE : L*1000 + J*10 + I
                        regrid: 2 day on X, 2 deg on Y, 2 deg on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 4 by 3 by 2 points (X (DAYS)-Y (degrees_east)-Z (degrees_north))
             34319  34321  34323  34325  
               1      2      3      4
 ---- K:1 Z:   3
 142   / 1:  1032.  3032.  5032.  7032.
 144   / 2:  1034.  3034.  5034.  7034.
 146   / 3:  1036.  3036.  5036.  7036.
 ---- K:2 Z:   5
 142   / 1:  1052.  3052.  5052.  7052.
 144   / 2:  1054.  3054.  5054.  7054.
 146   / 3:  1056.  3056.  5056.  7056.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   NORMAL
 -DELETE XYTVAR   M: 28 dset:   1 I:      1      4  J:    1    3  K:    1    2  L:   -999   -999
 canceling dset ./data/bn_strides.cdf
 
 
cancel region; set region/l=1
 
! reference output
use/order=yx bn_strides
list midvar[i=1:5:4, j=2:5:3, k=3:5:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 strip regrid on X: MIDVAR --> (G###)           @XACT
 rdstride MIDVAR   C:  7 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 nulrgd  MIDVAR   M: 25 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE MIDVAR   M: 28 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
             VARIABLE : VAR
                        regrid: 4 delta on X, 3 delta on Y, 2 delta on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             1      5    
             1      2
 ---- K:1 Z:   3
 2   / 1:  1312.  1352.
 5   / 2:  1315.  1355.
 ---- K:2 Z:   5
 2   / 1:  1512.  1552.
 5   / 2:  1515.  1555.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 -DELETE MIDVAR   M: 25 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 canceling dset ./data/bn_strides.cdf
 
use/order=-yx bn_strides
list midvar[i=1:5:4, j=2:5:3, k=3:5:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 strip regrid on X: MIDVAR --> (G###)           @XACT
 strip reversing MIDVAR on Y axis:        2        5 dset:   1
 rdstride MIDVAR   C:  8 dset:   1 I:      1      5  J:    5    8  K:    3    5  L:      1      1
 doing reversing MIDVAR on Y axis:        2        5 dset:   1
 -DELETE MIDVAR   M: 25 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 nulrgd  MIDVAR   M: 25 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE MIDVAR   M: 28 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
             VARIABLE : VAR
                        regrid: 4 delta on X, 3 delta on Y, 2 delta on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             1      5    
             1      2
 ---- K:1 Z:   3
 2   / 1:  1318.  1358.
 5   / 2:  1315.  1355.
 ---- K:2 Z:   5
 2   / 1:  1518.  1558.
 5   / 2:  1515.  1555.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   TAX1_6
 -DELETE MIDVAR   M: 25 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 canceling dset ./data/bn_strides.cdf
 
! reference output
use/order=tyx bn_strides
list midvar[i=1:5:4, j=2:5:3, k=3:5:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 strip regrid on X: MIDVAR --> (G###)           @XACT
 rdstride MIDVAR   C:  7 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 nulrgd  MIDVAR   M: 28 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE MIDVAR   M: 25 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
             VARIABLE : VAR
                        regrid: 4 delta on X, 3 delta on Y, 2 delta on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             1      5    
             1      2
 ---- K:1 Z:   3
 2   / 1:  1123.  5123.
 5   / 2:  1153.  5153.
 ---- K:2 Z:   5
 2   / 1:  1125.  5125.
 5   / 2:  1155.  5155.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 -DELETE MIDVAR   M: 28 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 canceling dset ./data/bn_strides.cdf
 
! note the reversal on axes 1,2 and 3 (X,Y,Z in memory -- NOT T)
use/order=-t-y-x bn_strides
list midvar[i=1:5:4, j=2:5:3, k=3:5:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 strip regrid on X: MIDVAR --> (G###)           @XACT
 strip reversing MIDVAR on X axis:        1        5 dset:   1
 rdstride MIDVAR   C:  8 dset:   1 I:      2      6  J:    4    7  K:    3    5  L:      7      7
 doing reversing MIDVAR on X axis:        1        5 dset:   1
 -DELETE MIDVAR   M: 28 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 nulrgd  MIDVAR   M: 28 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE MIDVAR   M: 25 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
             VARIABLE : VAR
                        regrid: 4 delta on X, 3 delta on Y, 2 delta on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             1      5    
             1      2
 ---- K:1 Z:   3
 2   / 1:  6773.  2773.
 5   / 2:  6743.  2743.
 ---- K:2 Z:   5
 2   / 1:  6775.  2775.
 5   / 2:  6745.  2745.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 -DELETE MIDVAR   M: 28 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 canceling dset ./data/bn_strides.cdf
 
! reference output
use/order=txy bn_strides
list midvar[i=1:5:4, j=2:5:3, k=3:5:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 strip regrid on X: MIDVAR --> (G###)           @XACT
 rdstride MIDVAR   C:  7 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 nulrgd  MIDVAR   M: 25 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE MIDVAR   M: 28 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
             VARIABLE : VAR
                        regrid: 4 delta on X, 3 delta on Y, 2 delta on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             1      5    
             1      2
 ---- K:1 Z:   3
 2   / 1:  1132.  5132.
 5   / 2:  1135.  5135.
 ---- K:2 Z:   5
 2   / 1:  1152.  5152.
 5   / 2:  1155.  5155.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 -DELETE MIDVAR   M: 25 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 canceling dset ./data/bn_strides.cdf
 
use/order=-t-x-y bn_strides
list midvar[i=1:5:4, j=2:5:3, k=3:5:2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1      1
 allocate dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 strip regrid on X: MIDVAR --> (G###)           @XACT
 strip reversing MIDVAR on Y axis:        2        5 dset:   1
 rdstride MIDVAR   C:  8 dset:   1 I:      2      6  J:    5    8  K:    3    5  L:      7      7
 doing reversing MIDVAR on Y axis:        2        5 dset:   1
 -DELETE MIDVAR   M: 25 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 nulrgd  MIDVAR   M: 25 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 -DELETE MIDVAR   M: 28 dset:   1 I:      1      5  J:    2    5  K:    3    5  L:      1      1
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
             VARIABLE : VAR
                        regrid: 4 delta on X, 3 delta on Y, 2 delta on Z
             FILENAME : bn_strides.cdf
             SUBSET   : 2 by 2 by 2 points (X-Y-Z)
             T        : 1
             1      5    
             1      2
 ---- K:1 Z:   3
 2   / 1:  6738.  2738.
 5   / 2:  6735.  2735.
 ---- K:2 Z:   5
 2   / 1:  6758.  2758.
 5   / 2:  6755.  2755.
canc data/all
 dealloc  dynamic grid (G###)          (AX###)   (AX###)   (AX###)   ZAX1_7
 -DELETE MIDVAR   M: 25 dset:   1 I:      1      2  J:    1    2  K:    1    2  L:      1      1
 canceling dset ./data/bn_strides.cdf
 
! DEFINE AXIS can get the axis too long (bug 673)
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err553_axis_too_long.jnl
! From Ned Cokelet
! First definition of axis had last grid cell completely
! beyond requested end.
 
DEF AXIS/X=211:215:3 x_ax
LIST X[GX=x_ax], XBOXLO[GX=x_ax], XBOXHI[GX=x_ax]
             X: 209.5 to 215.5
 Column  1: X is X (axis X_AX)
 Column  2: XBOXLO is XBOXLO (axis X_AX)
 Column  3: XBOXHI is XBOXHI (axis X_AX)
               X  XBOXLO XBOXHI
211   / 1:  211.0  209.5  212.5
214   / 2:  214.0  212.5  215.5
 
DEF AXIS/X=211:215:2.6 x_ax
LIST X[GX=x_ax], XBOXLO[GX=x_ax], XBOXHI[GX=x_ax]
             X: 209.7 to 217.5
 Column  1: X is X (axis X_AX)
 Column  2: XBOXLO is XBOXLO (axis X_AX)
 Column  3: XBOXHI is XBOXHI (axis X_AX)
               X  XBOXLO XBOXHI
211   / 1:  211.0  209.7  212.3
213.6 / 2:  213.6  212.3  214.9
216.2 / 3:  216.2  214.9  217.5
 
! Under linux, some shade and fill plots with /LEVELS=c had a
! non-centered shade key
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err553_lev_c.jnl
 ! under linux only, this has a non-centered shade key
 
shade/lev=c {-1.1,1.1}*ysequence({1,1})
ppl list shakey

         DO KEY  ORIENT  LAB SIZE  LAB INC  LAB DIG  LAB LEN
              1       1      0.00        0        5        9


         DEFAULT KEY POSITIONING
         X LO     X HI     Y LO     Y HI
         9.40     9.69     1.40     7.40
 
fill/lev=c {-1.1,1.1}*ysequence({1,1})
ppl list shakey

         DO KEY  ORIENT  LAB SIZE  LAB INC  LAB DIG  LAB LEN
              1       1      0.00        0        5        9


         DEFAULT KEY POSITIONING
         X LO     X HI     Y LO     Y HI
         9.40     9.69     1.40     7.40
 
 
! At lon = 0, we used to have an E; remove this.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err553_lon_ax_0_label.jnl
! Label longitude axes with the degree sign only
! at x=0 (previously had an E).
 
! ACM 1/6/04
 
use coads_climatology
shade/x=-20:20/y=-40:40/L=1 sst
 
 
! Errors listing string and numeric data together
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err553_list_string_numeric.jnl
! err553_list_string_numeric.jnl
! 2/2004 ACM
! LISTing string and numeric variables together.
 
def axis/t=1:3:1 tax
let a = reshape ({1,2,3}, t[gt=tax])
let b = reshape ({"a", "b", "c"}, t[gt=tax])
list a, b
             T: 0.5 to 3.5
 Column  1: A is RESHAPE ({1,2,3}, T[GT=TAX])
 Column  2: B is RESHAPE ({"a", "b", "c"}, T[GT=TAX])
             A   B
1   / 1:  1.000 "a"
2   / 2:  2.000 "b"
3   / 3:  3.000 "c"
 
! Now in 2D
let c = {"cat", "rat", "spat", "that", "pat"}
list/i=2:4/l=1:3 b, c
             T: 0.5 to 3.5
             X: 1.5 to 4.5
 Column  1: B is RESHAPE ({"a", "b", "c"}, T[GT=TAX])
 Column  2: C is {"cat", "rat", "spat", "that", "pat"}
          B     C
 ---- I:2 X:   2
1   / 1: "a" "rat" 
2   / 2: "b" "rat" 
3   / 3: "c" "rat" 
 ---- I:3 X:   3
1   / 1: "a" "spat"
2   / 2: "b" "spat"
3   / 3: "c" "spat"
 ---- I:4 X:   4
1   / 1: "a" "that"
2   / 2: "b" "that"
3   / 3: "c" "that"
 
let v = y[y=1:5]
list v
             VARIABLE : Y[Y=1:5]
             SUBSET   : 5 points (Y)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
list/i=3:4/l=1:2 b, c, v
             T: 0.5 to 2.5
             X: 2.5 to 4.5
             Y: 0.5 to 5.5
 Column  1: B is RESHAPE ({"a", "b", "c"}, T[GT=TAX])
 Column  2: C is {"cat", "rat", "spat", "that", "pat"}
 Column  3: V is Y[Y=1:5]
          B     C      V
 ---- J:1 Y:   1
 ---- I:3 X:   3
1   / 1: "a" "spat"  1.000
2   / 2: "b" "spat"  1.000
 ---- I:4 X:   4
1   / 1: "a" "that"  1.000
2   / 2: "b" "that"  1.000
 ---- J:2 Y:   2
 ---- I:3 X:   3
1   / 1: "a" "spat"  2.000
2   / 2: "b" "spat"  2.000
 ---- I:4 X:   4
1   / 1: "a" "that"  2.000
2   / 2: "b" "that"  2.000
 ---- J:3 Y:   3
 ---- I:3 X:   3
1   / 1: "a" "spat"  3.000
2   / 2: "b" "spat"  3.000
 ---- I:4 X:   4
1   / 1: "a" "that"  3.000
2   / 2: "b" "that"  3.000
 ---- J:4 Y:   4
 ---- I:3 X:   3
1   / 1: "a" "spat"  4.000
2   / 2: "b" "spat"  4.000
 ---- I:4 X:   4
1   / 1: "a" "that"  4.000
2   / 2: "b" "that"  4.000
 ---- J:5 Y:   5
 ---- I:3 X:   3
1   / 1: "a" "spat"  5.000
2   / 2: "b" "spat"  5.000
 ---- I:4 X:   4
1   / 1: "a" "that"  5.000
2   / 2: "b" "that"  5.000
 
 
! Bug in setting axis to depth when reading from nc file
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err553_set_axis_depth.jnl
 ! NOAA/PMEL TMAP
 ! FERRET v5.53
 ! Solaris 5.6 - 12/16/03
 ! 16-Dec-03 10:58
 
use xz_nozattrib.nc
set axis/depth zax
say "axis should be reversed"
axis should be reversed
show axis zax
 name       axis              # pts   start                end
 ZAX       Z                    5 r-  1                    5
   Axis span (to cell edges) = 5
q
 
! Set symbols showing levels settings when poly command is called
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err553_symbol_lev.jnl
! err553_symbol_lev.jnl
! 2/2004 ACM
! In 5.51 and in 5.53 version, symbols LEV* are not created
! for polygon plots
 
LET XTRIANGLE = YSEQUENCE({-1,0,1})
LET YTRIANGLE = YSEQUENCE({-1,1,-1})
LET XPTS = 180+30*RANDU(I[i=1:10])
LET YPTS = 30*RANDU(1+I[i=1:10])
POLYGON XTRIANGLE+XPTS, YTRIANGLE+YPTS, I[I=1:10]
 
!*************************************
! List symbols LEV_MIN, LEV_MAX, LEV_DEL
 
show symb lev*
LEV_ALL = "1,1.2,1.4,1.6,1.8,2,2.2,2.4,2.6,2.8,3,3.2,3.4,3.6,3.8,4,4.2,4.4,4.6,4.8,5,5.2,5.4,5.6,5.8,6,6.2,6.4,6.6,6.8,7,7.2,7.4,7.6,7.8,8,8.2,8.4,8.6,8.8,9,9.2,9.4,9.6,9.8,10,10.2"
LEV_TEXT = "C"
LEV_MIN = "1"
LEV_MAX = "10.2"
LEV_NUM = "46"
LEV_DEL = "0.2"
LEV_CENTERED_LABELS = "off"
 
can sym lev*
! Now with /LEV=(min,max,del)
 
let xsqr = YSEQUENCE({0,.1,.1,0})
let ysqr = YSEQUENCE({0,0,.1,.1})
let ypts = x/10
let xpts = cos(x/10)
polygon/trans/i=1:100/nolable/lev=(0,1100,40) xpts+xsqr, ypts+ysqr, x*x/10
sh sym lev*
LEV_TEXT = "(0,1100,40)"
LEV_MIN = "0"
LEV_MAX = "1120"
LEV_NUM = "28"
LEV_DEL = "40"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "0,40,80,120,160,200,240,280,320,360,400,440,480,520,560,600,640,680,720,760,800,840,880,920,960,1000,1040,1080,1120"
 
can sym lev*
! Now with /LEV=nl
 
LET xpts = 180 + 50*COS(2*3.14*I[I=1:50]/60)
LET ypts = 15  + 20*SIN(2*3.14*I[I=1:50]/60)
LET sst = 25 - ypts + RANDN(ypts)
plot/vs xpts,ypts
GO polymark POLYGON/KEY/lev=20 xpts,ypts,sst,star
 
sh sym lev*
LEV_TEXT = "20"
LEV_MIN = "-12"
LEV_MAX = "32"
LEV_NUM = "22"
LEV_DEL = "2"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "-12,-10,-8,-6,-4,-2,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32"
can sym lev*
 
! Fixes for modulo striding bugs
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err553_stride_modulo.jnl
! err553_stride_modulo_neg.jnl
! *acm* 3/31/2004
!  Modulo axis with strides that have negative indices
! did not work prior to v5.6 of Ferret.
 
! mylon.nc created as follows:
! use etopo20
! let var = sin(x[gx=var])
! save/file=mylon.nc var
 
use mylon
list var[i=-400:-40:20]
             VARIABLE : SIN(X[GX=ROSE])
                        regrid: 6.667 deg on X
             FILENAME : mylon.nc
             SUBSET   : 19 points (LONGITUDE)
 113.5W  /  1:  0.9763
 106.8W  /  2:  0.8243
 100.2W  /  3:  0.5526
 93.5W   /  4:  0.2007
 86.8W   /  5: -0.1804
 80.2W   /  6: -0.5353
 73.5W   /  7: -0.8125
 66.8W   /  8: -0.9716
 60.2W   /  9: -0.9896
 53.5W   / 10: -0.8638
 46.8W   / 11: -0.6126
 40.2W   / 12: -0.2723
 33.5W   / 13:  0.1075
 26.8W   / 14:  0.4716
 20.2W   / 15:  0.7673
 13.5W   / 16:  0.9515
 6.8W    / 17:  0.9975
 0.2W    / 18:  0.8986
 6.5E    / 19:  0.6691
list var[i=-400:-40:50]
             VARIABLE : SIN(X[GX=ROSE])
                        regrid: 16.67 deg on X
             FILENAME : mylon.nc
             SUBSET   : 8 points (LONGITUDE)
 113.5W  / 1:  0.9763
 96.8W   / 2: -0.3837
 80.2W   / 3: -0.5353
 63.5W   / 4:  0.9989
 46.8W   / 5: -0.6126
 30.2W   / 6: -0.2949
 13.5W   / 7:  0.9515
 3.2E    / 8: -0.7985
 
! This list, using modulo-ing to go out to a second replication
! of the data, would have worked under previous versions but
! with the last point missing, bug 841
 
list var[i=`2*1081-400`:`2*1082-40`:50]
 !-> list var[i=1762:2124:50]
             VARIABLE : SIN(X[GX=ROSE])
                        regrid: 16.67 deg on X
             FILENAME : mylon.nc
             SUBSET   : 8 points (LONGITUDE)
 112.8W  / 1:  0.9763
 96.2W   / 2: -0.3837
 79.5W   / 3: -0.5353
 62.8W   / 4:  0.9989
 46.2W   / 5: -0.6126
 29.5W   / 6: -0.2949
 12.8W   / 7:  0.9515
 3.8E    / 8: -0.7985
 
! Previously also, the moduloing could return results
! that are one index off, also bug 841
 
list/nohead/y=0/prec=6 var[i=1100:1400:50]
 26.5E   / 1:  0.859313
 43.2E   / 2: -0.912341
 59.8E   / 3:  0.189118
 76.5E   / 4:  0.695015
 93.2E   / 5: -0.987803
 109.8E  / 6:  0.440136
 126.5E  / 7:  0.482013
can mem; list/nohead/y=0/prec=6 var[i=19:319:50,y=0]
 26.2E  / 1:  0.859313
 42.8E  / 2: -0.912341
 59.5E  / 3:  0.189118
 76.2E  / 4:  0.695015
 92.8E  / 5: -0.987803
 109.5E / 6:  0.440136
 126.2E / 7:  0.482013
can mem; list/y=0 var[i=69]
             VARIABLE : SIN(X[GX=ROSE])
             FILENAME : mylon.nc
             LONGITUDE: 42.8333E
         -0.9123
can mem; list/y=0 var[i=68]
             VARIABLE : SIN(X[GX=ROSE])
             FILENAME : mylon.nc
             LONGITUDE: 42.5E
         -0.9961
 
! Fixes bug creating format for listing a very long line
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err553_list_width.jnl
! err553_list_width.jnl
! *acm* 4/1/2004
! Fix for bug 837; creating a format for very wide ascii listing
! (this caused an outright crash)
 
! Note had /wid=9999, but this crashes Ferret under irix,
! listing to std output and also to an ascii file.
! Fortran limit for sequential files?  1024 works, 2047 did not.
! The bug, seen under solaris and linux for pre-v5.6, appears
! with /WIDTH=9999 but not with /WIDTH=1024.
 
set mode ignore
def axis/x=1:5000:1 xax
def axis/y=1:2:1 yax
list/wid=1024/y=1:2 sin(x[gx=xax]) + y[gy=yax]
             VARIABLE : SIN(X[GX=XAX]) + Y[GY=YAX]
             SUBSET   : 5000 by 2 points (X-Y)
      ... listing every  35th point
             1     36     71     106    141    176    211    246    281    316    351    386    421    456    491    526    561    596    631    666    701    736    771    806    841    876    911    946    981   1016   1051   1086   1121   1156   1191   1226   1261   1296   1331   1366   1401   1436   1471   1506   1541   1576   1611   1646   1681   1716   1751   1786   1821   1856   1891   1926   1961   1996   2031   2066   2101   2136   2171   2206   2241   2276   2311   2346   2381   2416   2451   2486   2521   2556   2591   2626   2661   2696   2731   2766   2801   2836   2871   2906   2941   2976   3011   3046   3081   3116   3151   3186   3221   3256   3291   3326   3361   3396   3431   3466   3501   3536   3571   3606   3641   3676   3711   3746   3781   3816   3851   3886   3921   3956   3991   4026   4061   4096   4131   4166   4201   4236   4271   4306   4341   4376   4411   4446   4481   4516   4551   4586   4621   4656   4691   4726   4761   4796   4831   4866   4901   4936   4971   
             1     36     71    106    141    176    211    246    281    316    351    386    421    456    491    526    561    596    631    666    701    736    771    806    841    876    911    946    981   1016   1051   1086   1121   1156   1191   1226   1261   1296   1331   1366   1401   1436   1471   1506   1541   1576   1611   1646   1681   1716   1751   1786   1821   1856   1891   1926   1961   1996   2031   2066   2101   2136   2171   2206   2241   2276   2311   2346   2381   2416   2451   2486   2521   2556   2591   2626   2661   2696   2731   2766   2801   2836   2871   2906   2941   2976   3011   3046   3081   3116   3151   3186   3221   3256   3291   3326   3361   3396   3431   3466   3501   3536   3571   3606   3641   3676   3711   3746   3781   3816   3851   3886   3921   3956   3991   4026   4061   4096   4131   4166   4201   4236   4271   4306   4341   4376   4411   4446   4481   4516   4551   4586   4621   4656   4691   4726   4761   4796   4831   4866   4901   4936   4971
 1   / 1:  1.841  0.008  1.951  0.273  1.363  1.071  0.509  1.817  0.015  1.964  0.243  1.404  1.027  0.548  1.790  0.023  1.975  0.215  1.444  0.982  0.588  1.763  0.034  1.984  0.188  1.483  0.938  0.629  1.733  0.046  1.991  0.163  1.521  0.894  0.670  1.702  0.060  1.996  0.140  1.559  0.850  0.712  1.670  0.076  1.999  0.118  1.595  0.807  0.755  1.637  0.094  2.000  0.098  1.630  0.763  0.798  1.602  0.114  1.999  0.080  1.663  0.721  0.841  1.566  0.135  1.996  0.064  1.696  0.679  0.885  1.529  0.158  1.992  0.049  1.727  0.637  0.929  1.491  0.183  1.985  0.036  1.757  0.596  0.973  1.452  0.209  1.977  0.025  1.785  0.556  1.017  1.412  0.237  1.966  0.016  1.811  0.517  1.062  1.372  0.267  1.954  0.009  1.836  0.479  1.106  1.330  0.297  1.940  0.004  1.860  0.441  1.150  1.288  0.330  1.924  0.001  1.882  0.405  1.193  1.246  0.363  1.906  0.000  1.902  0.370  1.236  1.203  0.398  1.886  0.001  1.920  0.337  1.279  1.159  0.434  1.865  0.003  1.936  0.304  1.321  1.115  0.471  1.842
 2   / 2:  2.841  1.008  2.951  1.273  2.363  2.071  1.509  2.817  1.015  2.964  1.243  2.404  2.027  1.548  2.790  1.023  2.975  1.215  2.444  1.982  1.588  2.763  1.034  2.984  1.188  2.483  1.938  1.629  2.733  1.046  2.991  1.163  2.521  1.894  1.670  2.702  1.060  2.996  1.140  2.559  1.850  1.712  2.670  1.076  2.999  1.118  2.595  1.807  1.755  2.637  1.094  3.000  1.098  2.630  1.763  1.798  2.602  1.114  2.999  1.080  2.663  1.721  1.841  2.566  1.135  2.996  1.064  2.696  1.679  1.885  2.529  1.158  2.992  1.049  2.727  1.637  1.929  2.491  1.183  2.985  1.036  2.757  1.596  1.973  2.452  1.209  2.977  1.025  2.785  1.556  2.017  2.412  1.237  2.966  1.016  2.811  1.517  2.062  2.372  1.267  2.954  1.009  2.836  1.479  2.106  2.330  1.297  2.940  1.004  2.860  1.441  2.150  2.288  1.330  2.924  1.001  2.882  1.405  2.193  2.246  1.363  2.906  1.000  2.902  1.370  2.236  2.203  1.398  2.886  1.001  2.920  1.337  2.279  2.159  1.434  2.865  1.003  2.936  1.304  2.321  2.115  1.471  2.842
 
can mode ignore
*** Running ferret script: bn_bounds.jnl
 
! bn_bounds.jnl
! testing CDF read and write of file with irregular axes and bounds
! and DEFINE AXIS/BOUNDS
! 5/2005 made changes so the bounds coordinates {1,2} are written to the
!        file. If axis is Z, write attribute potitive="up". (bug 1196)
! 2/10   new examples of bounds which overlap each other.
! 4/13   with climatological axes defined internally the LIST outputs
!        differ by a digit. This is just roundoff in the listing, the
!        number 730.485 shown as 730.48 vs 730.49. Just increase precision
!        for those list commands.
 
 
! Output data on irregular record axis. No need for:
! save/clobber/RIGID/HEADING=ENHANCED/LLIMITS=1:3/file=a.nc v
 
!use climatological_axes
let v = t[gt=month_irreg]
save/clobber/file=a.nc v
 
sp echo "bn_bounds.jnl --- 1 output of bounds on irreg axes." >> all_ncdump.out
sp ncdump a.nc >> all_ncdump.out
can data/all
can var v
 
! Now use coads with long irregular time axis.
 
can data/all
use coads_vwnd
let v = missing(vwnd,28.5)
save/clobber/file=a.nc/x=199/y=41/l=40:44 v
sp echo "bn_bounds.jnl --- 2 long irreg axes." >> all_ncdump.out
sp ncdump a.nc >> all_ncdump.out
 
! Append later time steps: we add a void point between non-contiguous bounds
 
save/append/file=a.nc/x=199/y=41/l=50:53 v
sp echo "bn_bounds.jnl --- 3 Append later time steps, adding a void point" >> all_ncdump.out
sp ncdump a.nc >> all_ncdump.out
can data/all
can var/all
 
! Depth axis; bounds {1,2} positive up
 
define axis/z/depth/units=meters zirr = {0,10,40,70}
let t2 = z[gz=zirr]
save/clobber/file=a.nc t2
sp echo "bn_bounds.jnl --- 4 depth axis, bounds positive up" >> all_ncdump.out
sp ncdump a.nc >> all_ncdump.out
can data/all
can var/all
 
! SAVE on irregular time axis, multi-dimensional save.
! Void point is one time, all X and Y
 
!use climatological_axes
use coads_climatology
let v = missing(sst[gt=month_irreg], 28)
save/clobber/x=181:185/y=1:7/L=1:5/file=a.nc v
save/append/x=181:185/y=1:7/L=8:9/file=a.nc v
sp echo "bn_bounds.jnl --- 5 SAVE on irregular time axis, multi-dimensional save." >> all_ncdump.out
sp ncdump a.nc >> all_ncdump.out
can var v
 
use a.nc
list/y=3 v
             VARIABLE : MISSING(SST[GT=MONTH_IRREG], 28)
             FILENAME : a.nc
             SUBSET   : 3 by 8 points (LONGITUDE-TIME)
             LATITUDE : 3N
                      179W   177W   175W   
                        1      2      3
 16-JAN 12      / 1:  27.98  28.25  28.28
 15-FEB 02      / 2:  28.36  28.41  28.00
 15-MAR 17      / 3:  27.94  28.00  27.72
 15-APR 05      / 4:  28.00  28.00  28.00
 15-MAY 17      / 5:  28.00  28.00  28.00
 30-JUN 17      / 6:   ....   ....   ....
 15-AUG 17      / 7:  28.00  28.00  28.00
 15-SEP 05      / 8:  28.00  28.00  28.00
list/x=177w v
             VARIABLE : MISSING(SST[GT=MONTH_IRREG], 28)
             FILENAME : a.nc
             SUBSET   : 4 by 8 points (LATITUDE-TIME)
             LONGITUDE: 177W
                       1N     3N     5N     7N    
                        1      2      3      4
 16-JAN 12      / 1:  28.41  28.25  28.06  28.10
 15-FEB 02      / 2:  28.40  28.41  28.16  27.75
 15-MAR 17      / 3:  27.59  28.00  27.87  27.82
 15-APR 05      / 4:  28.00  28.00  28.00  28.00
 15-MAY 17      / 5:  28.00  28.00  28.00  28.00
 30-JUN 17      / 6:   ....   ....   ....   ....
 15-AUG 17      / 7:  28.00  28.00  28.00  28.00
 15-SEP 05      / 8:  28.00  28.00  28.00  28.00
can data/all
can var/all
 
! Define an axis using edges
def axis/t/edges tax={0.5,1.5,2.5,3.5,6.5,7.5,8.5,9.5}
list t[gt=tax], tboxlo[gt=tax], tboxhi[gt=tax], tbox[gt=tax]
             T: 0.5 to 9.5
 Column  1: T is T (axis TAX)
 Column  2: TBOXLO is TBOXLO (axis TAX)
 Column  3: TBOXHI is TBOXHI (axis TAX)
 Column  4: TBOX is TBOX (axis TAX)
             T  TBOXLO TBOXHI  TBOX
1   / 1:  1.000  0.500  1.500  1.000
2   / 2:  2.000  1.500  2.500  1.000
3   / 3:  3.000  2.500  3.500  1.000
5   / 4:  5.000  3.500  6.500  3.000
7   / 5:  7.000  6.500  7.500  1.000
8   / 6:  8.000  7.500  8.500  1.000
9   / 7:  9.000  8.500  9.500  1.000
 
! Define an axis using bounds.  Note the coordinates need not be
! centered in the axis cells.
def axis/t/bounds tax={1.2, 2, 3.2, 5, 7, 8.4, 9}, {0.5,1.5, 1.5,2.5, 2.5,3.5, 3.5,6.5, 6.5,7.5, 7.5,8.5, 8.5,9.5}
list t[gt=tax], tboxlo[gt=tax], tboxhi[gt=tax], tbox[gt=tax]
             T: 0.5 to 9.5
 Column  1: T is T (axis TAX)
 Column  2: TBOXLO is TBOXLO (axis TAX)
 Column  3: TBOXHI is TBOXHI (axis TAX)
 Column  4: TBOX is TBOX (axis TAX)
             T  TBOXLO TBOXHI  TBOX
1.2 / 1:  1.200  0.500  1.500  1.000
2   / 2:  2.000  1.500  2.500  1.000
3.2 / 3:  3.200  2.500  3.500  1.000
5   / 4:  5.000  3.500  6.500  3.000
7   / 5:  7.000  6.500  7.500  1.000
8.4 / 6:  8.400  7.500  8.500  1.000
9   / 7:  9.000  8.500  9.500  1.000
 
! Define an axis using bounds, with discontinuity between bounds,
! detected and changed to contiguous bounds, using lower bound for all cells.
def axis/t/bounds tax={1,2,3,5,7,8,9}, {0.5,1.5,1.5,2.5,2.5,3.5,4.5,6.5,6.5,7.5,7.5,8.5,8.5,9.5}
list t[gt=tax], tboxlo[gt=tax], tboxhi[gt=tax], tbox[gt=tax]
             T: 0.5 to 9.5
 Column  1: T is T (axis TAX)
 Column  2: TBOXLO is TBOXLO (axis TAX)
 Column  3: TBOXHI is TBOXHI (axis TAX)
 Column  4: TBOX is TBOX (axis TAX)
             T  TBOXLO TBOXHI  TBOX
1   / 1:  1.000  0.500  1.500  1.000
2   / 2:  2.000  1.500  2.500  1.000
3   / 3:  3.000  2.500  3.500  1.000
5   / 4:  5.000  3.500  6.500  3.000
7   / 5:  7.000  6.500  7.500  1.000
8   / 6:  8.000  7.500  8.500  1.000
9   / 7:  9.000  8.500  9.500  1.000
 
! intentional errors
! coordinate point not inside bounds
set mode ignore
def axis/t/bounds tax={1.2,2,3.2,5,7,8.8,9}, {0.5,1.5,1.5,2.5,2.5,3.5,3.5,6.5,6.5,7.5,7.5,8.5,8.5,9.5}
 
! First coordinate lower than first lower bound
def axis/t/bounds tax={0.1,2,3.2,5,7,8,9}, {0.5,1.5,1.5,2.5,2.5,3.5,3.5,6.5,6.5,7.5,7.5,8.5,8.5,9.5}
 
! Last coordinate higher than last upper bound
def axis/t/bounds tax={0,2,3.2,5,7,8,9.9}, {0.5,1.5,1.5,2.5,2.5,3.5,3.5,6.5,6.5,7.5,7.5,8.5,8.5,9.5}
 
! Too few or too many bounds values
def axis/t/bounds tax={0,2,3.2,5,7,8,9.9}, {0.5,1.5,2.5,3.5,6.5,7.5,8.5,9.5}
def axis/t/bounds tax={1.2,2,3.2,5,7,8.4,9}, {0.5,1.5,1.5,2.5,2.5,3.5,3.5,6.5,6.5,7.5,7.5,8.5,8.5,9.5,10.5}
 
 
! This set of bounds has overlapping bounds. Use midpoints instead.
def axis/t/bounds tax=\
 {12, 12.2, 36, 36.2, 60, 60.2, 84, 84.2, 108} ,\
 {0,24, 0,24, 24,48, 24,48, 48,72, 48,72, 72,96, 72,96, 96,120}
 
cancel axis tax
can mode ignore
 
! SAVE on regular time axis with bounds and edges attributes
 
use coads_climatology
list/x=181/y=1/form=(f6.2, 3f10.4) sst, t[gt=sst], tboxlo[gt=sst], tboxhi[gt=sst]
             DATA SET: ./data/coads_climatology.cdf
             TIME: 01-JAN 00:45 to 01-APR 08:12
             LONGITUDE: 179W
             LATITUDE: 1N
 Column  1: SST is SEA SURFACE TEMPERATURE (Deg C)
 Column  2: T is T (axis TIME)
 Column  3: TBOXLO is TBOXLO (axis TIME)
 Column  4: TBOXHI is TBOXHI (axis TIME)
 28.28  366.0000    0.7575  731.2425
 28.42 1096.4850  731.2425 1461.7275
 28.05 1826.9700 1461.7275 2192.2125
 
save/clobber/bounds/file=a.nc/x=181/y=1 sst
sp echo "bn_bounds.jnl --- 6 SAVE on regular time axis with bounds attribute" >> all_ncdump.out
sp ncdump a.nc >> all_ncdump.out
 
save/clobber/edges/file=a.nc/x=181/y=1 sst
sp echo "bn_bounds.jnl --- 7 SAVE on regular time axis with edges attributes" >> all_ncdump.out
sp ncdump a.nc >> all_ncdump.out
 
! Intentional errors; combinations of qualifiers on SAVE
set mode ignore
 
use coads_climatology
save/clobber/rigid/heading=enhanced/llimits=1:3/bounds/file=a.nc/x=181/y=1 sst
save/clobber/edges/bounds/file=a.nc/x=181/y=1 sst
can mode ignore
 
can data/all
 
! outputting bounds on all irregular axes
! test of DEPTH axis
 
def axis/x xax = {1,2,5,6,7,8}
def axis/z/depth/bounds zax = {0,20,50,75,120}, {0, 10, 10, 30, 30, 60, 60, 90, 90, 150}
def axis/t tax = {1,2,9,10,11}
let v = x[gx=xax] +z[gz=zax] + t[gt=tax]
save/clobber/file=irrxzt.nc v
sp echo "bn_bounds.jnl --- 8 outputting bounds on all irregular axes, depth axis" >> all_ncdump.out
sp ncdump irrxzt.nc >> all_ncdump.out
 
can data/all
can var/all
use irrxzt
list/x=5/t=5 v, z[gz=v] , zboxlo[gz=v], zboxhi[gz=v]
             DATA SET: ./irrxzt.nc
             Z: 0 to 150
             X: 5
             T: 2
 Column  1: V is X[GX=XAX] +Z[GZ=ZAX] + T[GT=TAX]
 Column  2: Z is Z (axis ZAX)
 Column  3: ZBOXLO is ZBOXLO (axis ZAX)
 Column  4: ZBOXHI is ZBOXHI (axis ZAX)
               V     Z   ZBOXLO ZBOXHI
0     / 1:    7.0    0.0   0.00   10.0
20    / 2:   27.0   20.0  10.00   30.0
50    / 3:   57.0   50.0  30.00   60.0
75    / 4:   82.0   75.0  60.00   90.0
120   / 5:  127.0  120.0  90.00  150.0
can data/all
 
! RIGID/HEAD=ENHANCED works the same; issues a note
 
!use climatological_axes
use coads_climatology
let v = sst[gt=month_irreg]
save/clobber/rigid/head=enh/llimits=1:3/x=181:191/y=1:7/l=1:3/file=a.nc v
 
! Saving data with regular axes
! First save without the bounds attribute, result is a file with
! irregular time axis, possibly unintended large boxes.
 
! 4/13 Increase precision for those list commands, see comment above
 
!use climatological_axes
use coads_climatology
let v = missing(sst[gt=month_reg], 28)
 
save/clobber/file=a.nc/x=181/y=1/L=1:4 v
save/append/file=a.nc/x=181/y=1/L=8:10 v
can data/all
can var v
use a.nc
list/prec=7 v, t[gt=v], tbox[gt=v]
             DATA SET: ./a.nc
             TIME: 01-JAN 00:45 to 31-OCT 09:36
             LONGITUDE: 179W
             LATITUDE: 1N
 Column  1: V is MISSING(SST[GT=MONTH_REG], 28)
 Column  2: T is T (axis MONTH_REG1)
 Column  3: TBOX is TBOX (axis MONTH_REG1)
                        V      T        TBOX
16-JAN      / 1:  28.28389   366.000   730.485
15-FEB      / 2:  28.41851  1096.485   730.485
17-MAR      / 3:  28.04680  1826.970   730.485
16-APR      / 4:  28.00000  2557.455  1826.213
16-AUG      / 5:  28.00000  5479.395  1826.213
15-SEP      / 6:  28.00000  6209.880   730.485
16-OCT      / 7:  28.00000  6940.365   730.485
can data a
 
! Now save with /bounds
 
!use climatological_axes
use coads_climatology
let v = missing(sst[gt=month_reg], 28)
save/clobber/BOUNDS/file=a.nc/x=181/y=1/L=1:4 v
save/append/file=a.nc/x=181/y=1/L=8:10 v
can data/all
can var v
use a.nc
 
list/prec=7 v, t[gt=v], tbox[gt=v]
             DATA SET: ./a.nc
             TIME: 01-JAN 00:45 to 31-OCT 09:36
             LONGITUDE: 179W
             LATITUDE: 1N
 Column  1: V is MISSING(SST[GT=MONTH_REG], 28)
 Column  2: T is T (axis MONTH_REG1)
 Column  3: TBOX is TBOX (axis MONTH_REG1)
                        V      T        TBOX
16-JAN      / 1:  28.28389   366.000   730.485
15-FEB      / 2:  28.41851  1096.485   730.485
17-MAR      / 3:  28.04680  1826.970   730.485
16-APR      / 4:  28.00000  2557.455   730.485
16-JUN      / 5:      ....  4018.425  2191.455
16-AUG      / 6:  28.00000  5479.395   730.485
15-SEP      / 7:  28.00000  6209.880   730.485
16-OCT      / 8:  28.00000  6940.365   730.485
can data/all
 
! gappy_bounds.nc has discontiguous bounds
! We use the LOWER bound of all axis cells.
 
use gappy_bounds.nc
list/prec=7 a, t[gt=a], tboxlo[gt=a], tboxhi[gt=a]
             DATA SET: ./data/gappy_bounds.nc
             TIME: 01-JAN-1990 12:00 to 10-JAN-1990 12:00
 Column  1: A is SST[X=150:180@AVE,Y=-10:0@AVE]
 Column  2: T is T (axis TGAP)
 Column  3: TBOXLO is TBOXLO (axis TGAP)
 Column  4: TBOXHI is TBOXHI (axis TGAP)
                           A      T       TBOXLO    TBOXHI
02-JAN-1990 00 / 1:  29.69704  1.000000  0.500000  1.500000
03-JAN-1990 00 / 2:  29.37104  2.000000  1.500000  2.500000
04-JAN-1990 00 / 3:  29.11568  3.000000  2.500000  3.500000
08-JAN-1990 00 / 4:  29.29205  7.000000  3.500000  7.500000
09-JAN-1990 00 / 5:  28.89826  8.000000  7.500000  8.500000
10-JAN-1990 00 / 6:  28.93826  9.000000  8.500000  9.500000
 
cancel dat/all
 
! bounds_noenclose has bounds that dont enclose the axis coordinate
! points.  Use axis midpoints instead.
 
use bounds_noenclose
sh axis/t tax
 name       axis              # pts   start                end
 TAX       T                    5 i   1                    11
   Axis span (to cell edges) = 11
 
       L     T                       TBOX          TBOXLO
       1>  1                         1          0.5
       2>  2                         4          1.5
       3>  9                         4          5.5
       4>  10                        1          9.5
       5>  11                        1          10.5
 
! bounds_overlapping has bounds overlap.  Use axis midpoints instead.
 
use bounds_overlapping
sh axis/t tax
 name       axis              # pts   start                end
 TAX       T                    5 i   1                    11
   Axis span (to cell edges) = 11
 
       L     T                       TBOX          TBOXLO
       1>  1                         1          0.5
       2>  2                         4          1.5
       3>  9                         4          5.5
       4>  10                        1          9.5
       5>  11                        1          10.5
*** Running ferret script: bn_all_leap.jnl
! bn_all_leap.jnl
! ACM 6/2004
! Added ALL_LEAP, or 366_DAY calendar (which is in the CF conventions).
! leap year every year
 
define axis/t="1-jan-1988":"1-jan-1990":1/units=days/calendar=366_DAY tdays
define grid/t=tdays tgrid
let my_data = sin(l[g=tgrid])
list my_data[t="27-feb-1988":"1-mar-1988"]
             VARIABLE : SIN(L[G=TGRID])
             SUBSET   : 4 points (TIME)
             CALENDAR : ALL_LEAP
 27-FEB-1988 00 / 58:  0.9929
 28-FEB-1988 00 / 59:  0.6367
 29-FEB-1988 00 / 60: -0.3048
 01-MAR-1988 00 / 61: -0.9661
list my_data[t="27-feb-1989":"1-mar-1989"]
             VARIABLE : SIN(L[G=TGRID])
             SUBSET   : 4 points (TIME)
             CALENDAR : ALL_LEAP
 27-FEB-1989 00 / 424:  0.1148
 28-FEB-1989 00 / 425: -0.7739
 29-FEB-1989 00 / 426: -0.9510
 01-MAR-1989 00 / 427: -0.2538
 
define axis/t="1-jan-1988":"1-jan-1990":1/units=days/calendar=all_leap tdays
 
list my_data[t="27-feb-1988":"1-mar-1988"]
             VARIABLE : SIN(L[G=TGRID])
             SUBSET   : 4 points (TIME)
             CALENDAR : ALL_LEAP
 27-FEB-1988 00 / 58:  0.9929
 28-FEB-1988 00 / 59:  0.6367
 29-FEB-1988 00 / 60: -0.3048
 01-MAR-1988 00 / 61: -0.9661
list my_data[t="27-feb-1989":"1-mar-1989"]
             VARIABLE : SIN(L[G=TGRID])
             SUBSET   : 4 points (TIME)
             CALENDAR : ALL_LEAP
 27-FEB-1989 00 / 424:  0.1148
 28-FEB-1989 00 / 425: -0.7739
 29-FEB-1989 00 / 426: -0.9510
 01-MAR-1989 00 / 427: -0.2538
 
! Check the error message
set mode ignore_error
def axis/t/cal=nogood/t=1-jan-2000:1-jan-2010:1/units=months tax
 
can mode ignore
*** Running ferret script: bn570_bug_fixes.jnl
! bn554_bug_fixes.jnl
! test various fixes that went into version 5.70
! 11/03 *acm*
!
 
! Test use of automatic levels in SHADE
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err560_shade_levels.jnl
! err560_shade_levels.jnl  *acm* 4/28/04
! Missing levels on SHADE auto-level
 
! Fix for bug 801 went too far: shade levels need adjusting
! (and were wrong always for negative levels)
 
! Here is a simpler example (acm)
set view upper; shade/i=1:10/j=1:10 i*j*0.0034   !levels only go up to 0.003
set view lower; shade/i=1:10/j=1:10 -1*i*j*0.0034
 
! Test use of reading irregular-time mc datasets
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err560_mc_irreg_t.jnl
! err560_mc_irreg_t.jnl
! 4/2004  ACM
 
! Under Solaris, crashes Ferret;
! Under linux get a NC error.
! Its  a precision bug in mc_read.F, determining what
! stepfile to read from, when the point requested is
! just at or between the range of the stepfiles.
 
set data coads_clim_irreg.des
list/x=180/y=0/t=1-apr-1900 sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             DATA SET : COAD
             FILENAME : coads_clim_irreg.des
             LONGITUDE: 179E
             LATITUDE : 1S
             TIME     : 15-FEB-1900 16:29
          28.36
 
can mem/all
can data/all
set data coads_clim_irreg.des
list/x=180/y=0/t=2000 sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             DATA SET : COAD
             FILENAME : coads_clim_irreg.des
             LONGITUDE: 179E
             LATITUDE : 1S
             TIME     : 15-FEB-1900 16:29
          28.36
 
 
! Crashed on SHADE of variable with NOLEAP axis, and subregion.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err560_shade_noleap.jnl
! err560_shade_noleap.jnl
! 4/30/04 ACM
 
! Crashes on SHADE of variable with NOLEAP axis, and subregion.
 
def axis/t/t0=1-jan-2000/units=months/calendar=noleap tax = {1,3,4,5,6,8,9,12}
def axis/depth/z=0:1000:15 zax
let a = z[gz=zax] + t[gt=tax]
 
shade/t=4-jan-2000:10-nov-2000 a
 
! err560_regriding_gaps.jnl
! If the index has a negative range including the value
! -111, was treated as missing rather than a valid index.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err560_regridding_gaps.jnl
! err560_regrid
!
! If the index has a negative range including the value
! -111, was treated as missing rather than a valid index.
 
def axis/modulo/x=1:360:1/units=lon xax
def axis/modulo/x=-180:179:1/units=lon xaxshift
 
let a = x[gx=xax]
let b = x[gx=xaxshift]
save/clobber/file=xlong.nc a
save/clobber/file=xlongshift.nc b
 
can data/all
can var/all
use xlongshift
use xlong
 
list/x=115w:108w a[gx=b[d=1]]
             VARIABLE : X[GX=XAX]
                        regrid: B[D=xlongshift]
             FILENAME : xlong.nc
             SUBSET   : 8 points (LONGITUDE)
 115W   / 426:  245.0
 114W   / 427:  246.0
 113W   / 428:  247.0
 112W   / 429:  248.0
 111W   / 430:  249.0
 110W   / 431:  250.0
 109W   / 432:  251.0
 108W   / 433:  252.0
 
list/x=115w:108w a[gx=b[d=1]@ave]
             VARIABLE : X[GX=XAX]
                        regrid: B[D=xlongshift] on X@AVE
             FILENAME : xlong.nc
             SUBSET   : 8 points (LONGITUDE)
 115W   / 426:  245.0
 114W   / 427:  246.0
 113W   / 428:  247.0
 112W   / 429:  248.0
 111W   / 430:  249.0
 110W   / 431:  250.0
 109W   / 432:  251.0
 108W   / 433:  252.0
 
list/x=115w:108w a[gx=b[d=1]@ave]
             VARIABLE : X[GX=XAX]
                        regrid: B[D=xlongshift] on X@AVE
             FILENAME : xlong.nc
             SUBSET   : 8 points (LONGITUDE)
 115W   / 426:  245.0
 114W   / 427:  246.0
 113W   / 428:  247.0
 112W   / 429:  248.0
 111W   / 430:  249.0
 110W   / 431:  250.0
 109W   / 432:  251.0
 108W   / 433:  252.0
 
list/x=115w:108w a[gx=b[d=1]@sum]
             VARIABLE : X[GX=XAX]
                        regrid: B[D=xlongshift] on X@SUM
             FILENAME : xlong.nc
             SUBSET   : 8 points (LONGITUDE)
 115W   / 426:  245.0
 114W   / 427:  246.0
 113W   / 428:  247.0
 112W   / 429:  248.0
 111W   / 430:  249.0
 110W   / 431:  250.0
 109W   / 432:  251.0
 108W   / 433:  252.0
 
list/x=115w:108w a[gx=b[d=1]@ngd]
             VARIABLE : X[GX=XAX] (# of points)
                        regrid: B[D=xlongshift] on X@NGD
             FILENAME : xlong.nc
             SUBSET   : 8 points (LONGITUDE)
 115W   / 426:  1.000
 114W   / 427:  1.000
 113W   / 428:  1.000
 112W   / 429:  1.000
 111W   / 430:  1.000
 110W   / 431:  1.000
 109W   / 432:  1.000
 108W   / 433:  1.000
 
list/x=115w:108w a[gx=b[d=1]@nrst]
             VARIABLE : X[GX=XAX]
                        regrid: B[D=xlongshift] on X@NRST
             FILENAME : xlong.nc
             SUBSET   : 8 points (LONGITUDE)
 115W   / 426:  245.0
 114W   / 427:  246.0
 113W   / 428:  247.0
 112W   / 429:  248.0
 111W   / 430:  249.0
 110W   / 431:  250.0
 109W   / 432:  251.0
 108W   / 433:  252.0
 
list/x=115w:108w a[gx=b[d=1]@xact]
             VARIABLE : X[GX=XAX]
                        regrid: B[D=xlongshift] on X@XACT
             FILENAME : xlong.nc
             SUBSET   : 8 points (LONGITUDE)
 115W   / 426:  245.0
 114W   / 427:  246.0
 113W   / 428:  247.0
 112W   / 429:  248.0
 111W   / 430:  249.0
 110W   / 431:  250.0
 109W   / 432:  251.0
 108W   / 433:  252.0
 
sp rm xlong.nc
sp rm xlongshift.nc
 
! err560_leap_years.jnl
! inconsistency in computing whether year is a leap year;
! bug in drawing the time axis.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err560_leap_years.jnl
! err560_leap_years.jnl
! Fixes for bug 882, inconsistency in computing whether
! year is a leap year.
 
def axis/t="07-FEB-1899:12:00":"07-FEB-1900:12:00":365.2425/units=days/t0="1-jan-1800" tax
let v = tsequence({55,65})
plot v[gt=tax@asn]
 
! err560_dyn_grids.jnl
!  plot missing in upper plot; error counting dynamic grids
! GO bn_reset
! GO err560_dyn_grids.jnl
 
! err560_century.jnl
! Century portion of years were not properly tested in numdm1.F
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err560_century
! err560_century.jnl.jnl  *acm* 4/28/04
! Century portion of years were not properly tested in numdm1.F
 
! Crashes Ferret with STOP: ,2
 
def axis/t="07-FEB-1899:12:00":"07-FEB-1900:12:00":365.2425/units=days/t0="1-jan-1800" tax
let v = tsequence({55,65})
plot/step=connected  v[gt=tax@asn]
plot/over v[gt=tax@asn]
 
plot v[gt=tax@asn]
 
 
! Also need to test this, years 599 - 600
 
def axis/t=07-feb-0599:07-feb-0600:1/units=years tt
plot t[gt=tt]
*** Running ferret script: bn_modstats.jnl
! bn_modstats.jnl
! acm 8/25/04
! There was never a benchmark test of modulo statistics.
! (and a bug had crept into @MODVAR when there was missing data)
 
use  gtsa056_2.cdf
set region/x=140/y=1/k=1
let var = if temp gt 29.5 then temp
 
!use climatological_axes
!can data climatological_axes
 
list var[gt=month_reg@mod]
             VARIABLE : IF TEMP GT 29.5 THEN TEMP
                        regrid: 730.5 hour on T@MOD
             FILENAME : gtsa056_2.cdf
             SUBSET   : 12 points (TIME)
             LONGITUDE: 139.5E
             LATITUDE : 0.833N
             DEPTH (m): 5
                    139.5E 
                     10
 16-JAN      /  1:  29.56
 15-FEB      /  2:  29.53
 17-MAR      /  3:  29.66
 16-APR      /  4:  29.88
 16-MAY      /  5:  29.89
 16-JUN      /  6:  29.96
 16-JUL      /  7:  29.69
 16-AUG      /  8:   ....
 15-SEP      /  9:  29.67
 16-OCT      / 10:  29.75
 15-NOV      / 11:  29.91
 16-DEC      / 12:  29.77
 
! bug had values of Inf surrounding missing data
list var[gt=month_reg@modvar]
             VARIABLE : Variance of IF TEMP GT 29.5 THEN TEMP
                        regrid: 730.5 hour on T@MODVAR
             FILENAME : gtsa056_2.cdf
             SUBSET   : 12 points (TIME)
             LONGITUDE: 139.5E
             LATITUDE : 0.833N
             DEPTH (m): 5
                     139.5E  
                      10
 16-JAN      /  1:  0.00207
 15-FEB      /  2:  0.00050
 17-MAR      /  3:  0.00795
 16-APR      /  4:  0.00150
 16-MAY      /  5:  0.00351
 16-JUN      /  6:  0.00970
 16-JUL      /  7:  0.01888
 16-AUG      /  8:     ....
 15-SEP      /  9:  0.00558
 16-OCT      / 10:  0.00681
 15-NOV      / 11:  0.00191
 16-DEC      / 12:  0.00483
list var[gt=month_reg@modmin]
             VARIABLE : IF TEMP GT 29.5 THEN TEMP
                        regrid: 730.5 hour on T@MODMIN
             FILENAME : gtsa056_2.cdf
             SUBSET   : 12 points (TIME)
             LONGITUDE: 139.5E
             LATITUDE : 0.833N
             DEPTH (m): 5
                    139.5E 
                     10
 16-JAN      /  1:  29.50
 15-FEB      /  2:  29.52
 17-MAR      /  3:  29.52
 16-APR      /  4:  29.78
 16-MAY      /  5:  29.79
 16-JUN      /  6:  29.80
 16-JUL      /  7:  29.50
 16-AUG      /  8:   ....
 15-SEP      /  9:  29.53
 16-OCT      / 10:  29.64
 15-NOV      / 11:  29.86
 16-DEC      / 12:  29.66
list var[gt=month_reg@modmax]
             VARIABLE : IF TEMP GT 29.5 THEN TEMP
                        regrid: 730.5 hour on T@MODMAX
             FILENAME : gtsa056_2.cdf
             SUBSET   : 12 points (TIME)
             LONGITUDE: 139.5E
             LATITUDE : 0.833N
             DEPTH (m): 5
                    139.5E 
                     10
 16-JAN      /  1:  29.64
 15-FEB      /  2:  29.55
 17-MAR      /  3:  29.82
 16-APR      /  4:  29.93
 16-MAY      /  5:  29.96
 16-JUN      /  6:  30.08
 16-JUL      /  7:  29.82
 16-AUG      /  8:   ....
 15-SEP      /  9:  29.75
 16-OCT      / 10:  29.90
 15-NOV      / 11:  29.97
 16-DEC      / 12:  29.86
list var[gt=month_reg@modsum]
             VARIABLE : IF TEMP GT 29.5 THEN TEMP
                        regrid: 730.5 hour on T@MODSUM
             FILENAME : gtsa056_2.cdf
             SUBSET   : 12 points (TIME)
             LONGITUDE: 139.5E
             LATITUDE : 0.833N
             DEPTH (m): 5
                    139.5E 
                     10
 16-JAN      /  1:  295.6
 15-FEB      /  2:   59.1
 17-MAR      /  3:  533.9
 16-APR      /  4:  597.7
 16-MAY      /  5:  597.8
 16-JUN      /  6:  359.6
 16-JUL      /  7:  207.8
 16-AUG      /  8:   ....
 15-SEP      /  9:  237.3
 16-OCT      / 10:  297.5
 15-NOV      / 11:  299.1
 16-DEC      / 12:  297.7
list var[gt=month_reg@modngd]
             VARIABLE : IF TEMP GT 29.5 THEN TEMP (# of points)
                        regrid: 730.5 hour on T@MODNGD
             FILENAME : gtsa056_2.cdf
             SUBSET   : 12 points (TIME)
             LONGITUDE: 139.5E
             LATITUDE : 0.833N
             DEPTH (m): 5
                    139.5E 
                     10
 16-JAN      /  1:  10.00
 15-FEB      /  2:   2.00
 17-MAR      /  3:  18.00
 16-APR      /  4:  20.00
 16-MAY      /  5:  20.00
 16-JUN      /  6:  12.00
 16-JUL      /  7:   7.00
 16-AUG      /  8:   0.00
 15-SEP      /  9:   8.00
 16-OCT      / 10:  10.00
 15-NOV      / 11:  10.00
 16-DEC      / 12:  10.00
*** Running ferret script: bn_mc_vary_scale.jnl
! bn_mc_vary_scale.jnl
!   Allow stepfiles to have different internal scale and offset.
!   read and apply when opening each stepfile. Previously, the
!   scale and offset from the first stepfile were applied.
!   `var,return=nc_offset` and `var,return=nc_scale1` contain the
!   latest scaling applied
 
 
set data vary_scale.des
! With two different scalings applied for the two stepfiles, there
! is a change in slope and offset in the middle of this data
 
list tt
             VARIABLE : 1 + 0*T[GT=DAYT]
             DATA SET : Model Output, Daily Averages
             FILENAME : vary_scale.des
             SUBSET   : 20 points (TIME)
 01-JAN-1990 00 /  1:  -0.50
 02-JAN-1990 00 /  2:  -1.50
 03-JAN-1990 00 /  3:  -2.50
 04-JAN-1990 00 /  4:  -3.50
 05-JAN-1990 00 /  5:  -4.50
 06-JAN-1990 00 /  6:  -5.50
 07-JAN-1990 00 /  7:  -6.50
 08-JAN-1990 00 /  8:  -7.50
 09-JAN-1990 00 /  9:  -8.50
 10-JAN-1990 00 / 10:  -9.50
 11-JAN-1990 00 / 11:   1.98
 12-JAN-1990 00 / 12:   3.98
 13-JAN-1990 00 / 13:   5.98
 14-JAN-1990 00 / 14:   7.98
 15-JAN-1990 00 / 15:   9.98
 16-JAN-1990 00 / 16:  11.98
 17-JAN-1990 00 / 17:  13.98
 18-JAN-1990 00 / 18:  15.98
 19-JAN-1990 00 / 19:  17.98
 20-JAN-1990 00 / 20:  19.98
list/quiet/nohead `tt,return=nc_scale`, `tt,return=nc_offset`
 !-> list/quiet/nohead 2, -0.02
I / *:     2.000 -0.02000
 
 
can data/all
can mem
set data vary_scale.des
 
! The scale and offset from the first stepfile
list/L=2:4 tt
             VARIABLE : 1 + 0*T[GT=DAYT]
             DATA SET : Model Output, Daily Averages
             FILENAME : vary_scale.des
             SUBSET   : 3 points (TIME)
 02-JAN-1990 00 / 2: -1.500
 03-JAN-1990 00 / 3: -2.500
 04-JAN-1990 00 / 4: -3.500
list/quiet/nohead `tt,return=nc_scale`, `tt,return=nc_offset`
 !-> list/quiet/nohead -1, 0.5
I / *:    -1.000  0.5000
 
 
can data/all
can mem
set data vary_scale.des
 
! The scale and offset from the second stepfile
list/L=12:14 tt
             VARIABLE : 1 + 0*T[GT=DAYT]
             DATA SET : Model Output, Daily Averages
             FILENAME : vary_scale.des
             SUBSET   : 3 points (TIME)
 12-JAN-1990 00 / 12:  3.980
 13-JAN-1990 00 / 13:  5.980
 14-JAN-1990 00 / 14:  7.980
list/quiet/nohead `tt,return=nc_scale`, `tt,return=nc_offset`
 !-> list/quiet/nohead 2, -0.02
I / *:     2.000 -0.02000
 
*** Running ferret script: bn_plot_nokey.jnl
! bn_plot_nokey.jnl (bug 1089)
! 22-nov-2004
 
! Test new PLOT/NOKEY qualifier
! Plot several lines together, then plot/over
 
PLOT/NOKEY/I=1:100 cos(i/20), sin(i/30), cos(i/30)*sin(i/20)
PLOT/OVER/NOKEY/I=1:100 cos(i/10), sin(i/50), cos(i/40)*sin(i/10)
 
! plot/vs
PLOT/VS/LINE/NOKEY/I=1:314 i*cos(i/20), i*sin(i/20)
PLOT/OVER/VS/LINE/NOKEY/I=1:314 i*cos(i/30), i*sin(i/30)
 
! time series
USE gtsa056_2
PLOT/X=180/Y=0/K=1 temp
PLOT/OVER/NOKEY/X=180/Y=-1/K=1 temp
PLOT/OVER/NOKEY/X=180/Y=1/K=1 temp
*** Running ferret script: bn580_bug_fixes_noremote.jnl
! bn580_bug_fixes_noremote.jnl
! test various fixes that went into version 5.80
! 7/04 *acm*
!
 
! POLYGON (or SHADE) plots with a single level had no fill color
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_singlecolor.jnl
! err570_singlecolor.jnl
! 7/6/2004
 
! See bug 901. When a single fill color is sent to
! the POLYGON, SHADE, or FILL, the code sends the command
! PPL LEV (val).  But, the value was formatted so that the
! value got rounded off, so the precise value wasnt specified
! and the graphics call then didn't find the value.
 
! This polygon was filled
let a = 111
poly/fill/line {0,1,2},{1,2,1},a
 
! This polygon was not filled
let a = 111.55
poly/fill/over/line {0,1,2},{2,1,2},a
 
! This shade plot did not fill in.
define axis/x=1:10:1 xax
define axis/y=1:12:1 yax
let b = x[gx=xax] + y[gy=yax]
shade/y=0:90 a + 0*b
 
! FILL doesnt make the graphics call to do the fil plot
! when there is just one level ...
 
! ... and this is bug 957; similar symptoms but a different
! cause. SHADE and POLY need level defined when there is just
! one level.
 
let v = 15
shade/lev=1/x=1:10/y=1:10 v + 0*x + 0*y
 
 
def axis/x=1:1:1 xaxj
def grid/x=xaxj gaxj
let a = 111241*x[gx=gaxj@asn]
poly/lev=2 {0,1,2},{1,2,1},a ! OR lev=1
 
! colorbar labels too close to the bar, when user sets bar location
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_shakeylab.jnl
 
! err570_shakeylab.jnl
! 7/6/2004
! Update 6/19: draw a subset of the globe for speed.
! Let label size be set automatically for most plots. Save the plots.
 
!  When user defines the location of the color key, the key
!  labels are too close to the edge of the key.
 
! Test with both SHADE and FILL, as some of the scaling is
! different internally.
 
 
use coads_climatology
ppl dfltfnt cr
 
set view ul
go margins 1 1 1.2 2
fill/set/L=2/x=170:180 sst
ppl shakey 1, 1, , 0, -2, 8,  `($ppl$xorg)+($ppl$xlen)+0.3`,  `($ppl$xorg)+($ppl$xlen)+0.6`, `($ppl$yorg)`, `($ppl$yorg)+($ppl$ylen)`
 !-> ppl shakey 1, 1, , 0, -2, 8,  5.512,  5.811999999999999, 1, 5.223
ppl fill
 
 
set view ur
go margins 1 1 1.2 2
fill/set/L=2/x=170:180 sst* 10000
ppl shakey 1, 1, , 0, -2, 8,  `($ppl$xorg)+($ppl$xlen)+0.3`,  `($ppl$xorg)+($ppl$xlen)+0.6`, `($ppl$yorg)`, `($ppl$yorg)+($ppl$ylen)`
 !-> ppl shakey 1, 1, , 0, -2, 8,  5.512,  5.811999999999999, 1, 5.223
ppl fill
 
 
set view ll
go margins 1 1 1.2 2
fill/set/L=2/x=170:180 sst/ 10000
ppl shakey 1, 1, .1, 0, -2, 8,  `($ppl$xorg)+($ppl$xlen)+0.3`,  `($ppl$xorg)+($ppl$xlen)+0.6`, `($ppl$yorg)`, `($ppl$yorg)+($ppl$ylen)`
 !-> ppl shakey 1, 1, .1, 0, -2, 8,  5.512,  5.811999999999999, 1, 5.223
ppl fill
 
frame/file=shakeylab_fill.gif
cancel view
 
set view ul
go margins 1 1 1.2 2
shade/set/L=2/x=170:180 sst
ppl shakey 1, 1, , 0, -2, 8,  `($ppl$xorg)+($ppl$xlen)+0.3`,  `($ppl$xorg)+($ppl$xlen)+0.6`, `($ppl$yorg)`, `($ppl$yorg)+($ppl$ylen)`
 !-> ppl shakey 1, 1, , 0, -2, 8,  5.512,  5.811999999999999, 1, 5.223
ppl shade
 
set view ur
go margins 1 1 1.2 2
shade/set/L=2/x=170:180 sst* 10000
ppl shakey 1, 1, , 0, -2, 8,  `($ppl$xorg)+($ppl$xlen)+0.3`,  `($ppl$xorg)+($ppl$xlen)+0.6`, `($ppl$yorg)`, `($ppl$yorg)+($ppl$ylen)`
 !-> ppl shakey 1, 1, , 0, -2, 8,  5.512,  5.811999999999999, 1, 5.223
ppl shade
 
set view ll
go margins 1 1 1.2 2
shade/set/L=2/x=170:180 sst/ 10000
ppl shakey 1, 1, .1, 0, -2, 8,  `($ppl$xorg)+($ppl$xlen)+0.3`,  `($ppl$xorg)+($ppl$xlen)+0.6`, `($ppl$yorg)`, `($ppl$yorg)+($ppl$ylen)`
 !-> ppl shakey 1, 1, .1, 0, -2, 8,  5.512,  5.811999999999999, 1, 5.223
ppl shade
 
 
frame/file=shakeylab_shade.gif
cancel view
ppl dfltfnt sr
 
! Null input gives wierd error message
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_null_symbol.jnl
! err570_null_symbol.jnl
! null input -- > wierd error message see bug 919
!
!    **ERROR: invalid command: DEFINE what name?
!    DEFINE VARIABLE
 
set mode ignore
 
def sym a " "
($a)
 
can mode ignore
 
! Replace text expression with its value: string variable was too short
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_parse_labelcommand.jnl
! err570_parse_labelcommand.jnl
! fix for bug 956.
!
! When a command is issued with an argument being a variable containing
! a long string, the string is cut off when the command is parsed to
! substitude the value of the variable.
! (bug fix is lengthening the length of variable repl in repl_exprns.F)
 
can view
pplus/reset
PLOT/i=1:10  1/i
 
let line1 = "1234567891123456789212345678931234567894123456789512345678961234567897123456789812345678991234567890"
let line2 = "<nl>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
let tsulab = strcat(line1, line2)
list tsulab
             VARIABLE : STRCAT(LINE1, LINE2)
        "1234567891123456789212345678931234567894123456789512345678961234567897123456789812345678991234567890<nl>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
 
! Previously when the value of tsulab is replaced in the command and
! echoed back to the terminal, the string was truncated, with bad appended
! to the end of the shortened second line.
 
label/nouser 3.6,`($ppl$ylen)+0.2`,0,0,0.08, `tsulab`
 !-> PPL %LABEL/nouser 3.6,6.2,0,0,0.08, 1234567891123456789212345678931234567894123456789512345678961234567897123456789812345678991234567890<nl>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
 
! result of COMPRESSK_BY function does not vary in X
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_compressk_by.jnl
! err570_compress_by.jnl
! fix for bug 925
 
!--------------------------------------------------------------
! create a file with 3-d data and 2-d array of sampling levels
! define xy and xyz grids
 
def axis/x=1:5:1 xax ; def axis/y=1:4:1 yax ; def axis/z=1:3:1 zax
def grid/x=xax/y=yax gxy ; def grid/x=xax/y=yax/z=zax gxyz
 
let/title="Sampling Levels" ind=int(3*randu(x[g=gxy]+y[g=gxy])+1)
let/title="3-D Data" temp=x[g=gxyz]+10*(y[g=gxyz]+10*z[g=gxyz])
 
list ind
             VARIABLE : Sampling Levels
             SUBSET   : 5 by 4 points (X-Y)
             1      2      3      4      5    
             1      2      3      4      5
 1   / 1:  3.000  2.000  1.000  1.000  3.000
 2   / 2:  1.000  3.000  2.000  2.000  3.000
 3   / 3:  2.000  3.000  3.000  2.000  3.000
 4   / 4:  3.000  2.000  1.000  1.000  2.000
!             1      2      3      4      5
! 1   / 1:  3.000  2.000  1.000  1.000  3.000
! 2   / 2:  1.000  3.000  2.000  2.000  3.000
! 3   / 3:  2.000  3.000  3.000  2.000  3.000
! 4   / 4:  3.000  2.000  1.000  1.000  2.000
 
list temp
             VARIABLE : 3-D Data
             SUBSET   : 5 by 4 by 3 points (X-Y-Z)
             1      2      3      4      5    
             1      2      3      4      5
 ---- K:1 Z:   1
 1   / 1:  111.0  112.0  113.0  114.0  115.0
 2   / 2:  121.0  122.0  123.0  124.0  125.0
 3   / 3:  131.0  132.0  133.0  134.0  135.0
 4   / 4:  141.0  142.0  143.0  144.0  145.0
 ---- K:2 Z:   2
 1   / 1:  211.0  212.0  213.0  214.0  215.0
 2   / 2:  221.0  222.0  223.0  224.0  225.0
 3   / 3:  231.0  232.0  233.0  234.0  235.0
 4   / 4:  241.0  242.0  243.0  244.0  245.0
 ---- K:3 Z:   3
 1   / 1:  311.0  312.0  313.0  314.0  315.0
 2   / 2:  321.0  322.0  323.0  324.0  325.0
 3   / 3:  331.0  332.0  333.0  334.0  335.0
 4   / 4:  341.0  342.0  343.0  344.0  345.0
!             1      2      3      4      5
! ---- K:1 Z:   1
! 1   / 1:  111.0  112.0  113.0  114.0  115.0
! 2   / 2:  121.0  122.0  123.0  124.0  125.0
! 3   / 3:  131.0  132.0  133.0  134.0  135.0
! 4   / 4:  141.0  142.0  143.0  144.0  145.0
! ---- K:2 Z:   2
! 1   / 1:  211.0  212.0  213.0  214.0  215.0
! 2   / 2:  221.0  222.0  223.0  224.0  225.0
! 3   / 3:  231.0  232.0  233.0  234.0  235.0
! 4   / 4:  241.0  242.0  243.0  244.0  245.0
! ---- K:3 Z:   3
! 1   / 1:  311.0  312.0  313.0  314.0  315.0
! 2   / 2:  321.0  322.0  323.0  324.0  325.0
! 3   / 3:  331.0  332.0  333.0  334.0  335.0
! 4   / 4:  341.0  342.0  343.0  344.0  345.0
 
let mask=if(ind+0*z[g=gxyz] eq k[g=gxyz])then 1
let tlev=compressk_by(temp,mask)
 
!**** here is the bug behavior ... column 1 is as expected but not the others
! list tlev[k=1]
!             1      2      3      4      5
! 1   / 1:  311.0  311.0  311.0  311.0  311.0
! 2   / 2:  121.0  121.0  121.0  121.0  121.0
! 3   / 3:  231.0  231.0  231.0  231.0  231.0
! 4   / 4:  341.0  341.0  341.0  341.0  341.0
 
list tlev[k=1]
             VARIABLE : COMPRESSK_BY(TEMP,MASK)
             SUBSET   : 5 by 4 points (X-Y)
             Z        : 1
             1      2      3      4      5    
             1      2      3      4      5
 1   / 1:  311.0  212.0  113.0  114.0  315.0
 2   / 2:  121.0  322.0  223.0  224.0  325.0
 3   / 3:  231.0  332.0  333.0  234.0  335.0
 4   / 4:  341.0  242.0  143.0  144.0  245.0
 
 
 
! Command parsing on PPL side had string lengths too short
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_long_label.jnl
! err570_long_label.jnl
! Fix for bug 956
 
! Very long multi-line label truncated on %LABEL command
! (string lengths hardwired to 255 deep in PPLUS command parsing)
 
PLOT/i=1:10  1/i
 
set mod verify
! from Jean Newman's facts_ttl_src_lst.jnl
 
define symbol clrmod = 2
let source_list = "Mw 9.2, 14.76*a12+14.76*b12+14.76*a13+14.76*b13+14.76*a14+14.76*b14+14.76*a15+14.76*b15+14.76*a16+14.76*b16+14.76*a17+14.76*b17+14.76*a18+14.76*b18+14.76*a19+14.76*b19+14.76*a20+14.76*b20+14.76*a21+14.76*b21+14.76*a22+14.76*b22+14.76*a23+14.76*b23+14.76*a24+14.76*b24"
let tit_x = 3.6035
let sl_y = 6.5
 
  define symbol lenline = `strlen(source_list)+8`
 !-> define symbol lenline = 275
      let tsuchr = 0.09
      let ntsulns = if `($VP_WIDTH)/((($lenline)/2.)*.9) lt 0.09` then 3 else 2
 !-> DEFINE VARIABLE ntsulns = if 1 then 3 else 2
      let nctsulns = `int(($lenline)/ntsulns)`
 !-> DEFINE VARIABLE nctsulns = 91
      let lstr1 = `strrindex(substring(source_list,0,nctsulns),"+")`
 !-> DEFINE VARIABLE lstr1 = 88
        let lstr2 = `strrindex(substring(source_list,lstr1+1,nctsulns),"+")`
 !-> DEFINE VARIABLE lstr2 = 90
        let str3a = substring(source_list,0,lstr1)
        let str3 = strcat(str3a,"<nl>")
        let str4a = substring(source_list,lstr1+1,lstr2)
        let str4 = strcat(str4a,"<nl>")
        let str1 = strcat(str3,str4)
        let lstr3 = `lstr1+lstr2`
 !-> DEFINE VARIABLE lstr3 = 178
        let str2 = substring(source_list,lstr3+1,($lenline)-lstr3)
 !-> DEFINE VARIABLE str2 = substring(source_list,lstr3+1,275-lstr3)
        let tsustr = strcat(str1,str2)
      let tsulab = strcat("@P($clrmod)Source: ",tsustr)
 !-> DEFINE VARIABLE tsulab = strcat("@P2Source: ",tsustr)
      list/noheader tsulab
        "@P2Source: Mw 9.2, 14.76*a12+14.76*b12+14.76*a13+14.76*b13+14.76*a14+14.76*b14+14.76*a15+14.76*b15+<nl>14.76*a16+14.76*b16+14.76*a17+14.76*b17+14.76*a18+14.76*b18+14.76*a19+14.76*b19+14.76*a20+<nl>14.76*b20+14.76*a21+14.76*b21+14.76*a22+14.76*b22+14.76*a23+14.76*b23+14.76*a24+14.76*b24"
    label/nouser `tit_x`,`sl_y`,0,0,`tsuchr` `tsulab`
 !-> PPL %LABEL/nouser 3.6035,6.5,0,0,0.09 @P2Source: Mw 9.2, 14.76*a12+14.76*b12+14.76*a13+14.76*b13+14.76*a14+14.76*b14+14.76*a15+14.76*b15+<nl>14.76*a16+14.76*b16+14.76*a17+14.76*b17+14.76*a18+14.76*b18+14.76*a19+14.76*b19+14.76*a20+<nl>14.76*b20+14.76*a21+14.76*b21+14.76*a22+14.76*b22+14.76*a23+14.76*b23+14.76*a24+14.76*b24
 
set mode/last verify
 
! Allow PPL POLYGON after a POLY/SET (previously was PPL FILLPOL)
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_ppl_poly.jnl
! err570_ppl_poly.jnl
 
! bug 959
! When we use polygon/set; ppl shakey; ppl polygon
! to control the vector key, the numerical labels on
! the key disappear.  (allow PPL POLYGON as well as
! PPL FILLPOL after a POLY/SET)
 
let xsqr = YSEQUENCE({0,.1,.1,0})
let ysqr = YSEQUENCE({0,0,.1,.1})
 
let ypts = x/10
let xpts = cos(x/10)
 
polygon/trans/i=1:100/nolable/set xpts+xsqr, ypts+ysqr, x*x/10
ppl shakey 1, 1, .1
ppl polygon
 
! Fix formatting of coordinates on LIST/FORMAT=tab or /FORMAT=comma
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_list_tab_coords.jnl
! err570_list_tab_coords.jnl
! acm 9/7/04
! LIST/FORMAT=tab or /FORMAT=comma listed
! coordinates in a fixed format not sufficient
! to distinguish finely spaced coordinates
 
def axis/x=100:100.25:0.05/units=deg xax
def axis/y=0.11:0.25:0.018/units=deg yax
let aa = (x[gx=xax] + y[gy=yax])/100
list/form=tab aa
             VARIABLE : (X[GX=XAX] + Y[GY=YAX])/100
             BAD FLAG : -1.E+34       
             SUBSET   : 6 by 9 points (LONGITUDE-LATITUDE)
  	100E     	100.05E  	100.1E   	100.15E  	100.2E   	100.25E  
0.11N	1.001	1.002	1.002	1.003	1.003	1.004
0.128N	1.001	1.002	1.002	1.003	1.003	1.004
0.146N	1.001	1.002	1.002	1.003	1.003	1.004
0.164N	1.002	1.002	1.003	1.003	1.004	1.004
0.182N	1.002	1.002	1.003	1.003	1.004	1.004
0.2N	1.002	1.002	1.003	1.004	1.004	1.004
0.218N	1.002	1.003	1.003	1.004	1.004	1.005
0.236N	1.002	1.003	1.003	1.004	1.004	1.005
0.254N	1.003	1.003	1.004	1.004	1.005	1.005
def axis/x=100:100.11:0.033/units=deg xax
list/form=comma aa
             VARIABLE : (X[GX=XAX] + Y[GY=YAX])/100
             BAD FLAG : -1.E+34       
             SUBSET   : 4 by 9 points (LONGITUDE-LATITUDE)
   100E     ,100.033E ,100.066E ,100.099E 
0.11N,1.001,1.001,1.002,1.002
0.128N,1.001,1.002,1.002,1.002
0.146N,1.001,1.002,1.002,1.002
0.164N,1.002,1.002,1.002,1.003
0.182N,1.002,1.002,1.002,1.003
0.2N,1.002,1.002,1.003,1.003
0.218N,1.002,1.003,1.003,1.003
0.236N,1.002,1.003,1.003,1.003
0.254N,1.003,1.003,1.003,1.004
 
! Fix bug in HASH_CX for large numbers of varibles
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_many_variables.jnl
! err570_many_variables.jnl
! 27-sep-2004  ACM
! See bug 993
 
! Script derived from Jean Newman script where she
! opens up many files and defines a bunch of variables.
 
! Jean Newman's script opens 25 data files, defines over 200 variables, and uses
! very long strings.  It uses string functions to break up a long string
! describing the data into reasonable length lines for labels, inserting <NL>
! linebreak character.  Crashes with seg fault or with messages like this:
!
! yes? load str4a
! Subscript out of range on file re_assign_variable.F, line 78, procedure
! re_assign_variable.
! Subscript number 1 has value -111 in array mv_flink.
!
!  (different errors if we define a slightly different number of variables or list
! some of them, causing them to be evaluated in a different order.)  Generally
! crashes on execution of a string function.
!
! See ~ansley/ans_ferret/users/jnewman/facts/x_r.jnl
!     ~ansley/ans_ferret/users/jnewman/facts/example_crash.jnl
!
!set mode diag
 
DEFINE SYMBOL SOURCE_LIST = Mw 9.2, 14.76*a12+14.76*b12+14.76*a13+14.76*b13+14.76*a14+14.76*b14+14.76*a15+14.76*b15+14.76*a16+14.76*b16+14.76*a17+14.76*b17+14.76*a18+14.76*b18+14.76*a19+14.76*b19+14.76*a20+14.76*b20+14.76*a21+14.76*b21+14.76*a22+14.76*b22+14.76*a23+14.76*b23
 
 
! set data "facts/s_1936_533.nc"
LET TOTAL_TIMESTEPS = 420
LET HA12 = 14.76 * HA[D=s_1936_533.nc]
LET AA12 = SLAT[D=s_1936_533.nc]
LET OA12 = SLON[D=s_1936_533.nc]
LET SA12 = 245
LET DA12 = 15
LET HB12 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_1939_529.NC]
LET AB12 = SLAT[D=s_1936_533.nc]   !! [D=S_1939_529.NC]
LET OB12 = SLON[D=s_1936_533.nc]   !! [D=S_1939_529.NC]
LET SB12 = 245
LET DB12 = 15
LET HA13 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_1950_537.NC]
LET AA13 = SLAT[D=s_1936_533.nc]   !! [D=S_1950_537.NC]
LET OA13 = SLON[D=s_1936_533.nc]   !! [D=S_1950_537.NC]
LET SA13 = 245
LET DA13 = 15
LET HB13 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_1953_533.NC]
LET AB13 = SLAT[D=s_1936_533.nc]   !! [D=S_1953_533.NC]
LET OB13 = SLON[D=s_1936_533.nc]   !! [D=S_1953_533.NC]
LET SB13 = 245
LET DB13 = 15
LET HA14 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_1964_541.NC]
LET AA14 = SLAT[D=s_1936_533.nc]   !! [D=S_1964_541.NC]
LET OA14 = SLON[D=s_1936_533.nc]   !! [D=S_1964_541.NC]
LET SA14 = 250
LET DA14 = 15
LET HB14 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_1967_537.NC]
LET AB14 = SLAT[D=s_1936_533.nc]   !! [D=S_1967_537.NC]
LET OB14 = SLON[D=s_1936_533.nc]   !! [D=S_1967_537.NC]
LET SB14 = 250
LET DB14 = 15
LET HA15 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_1979_544.NC]
LET AA15 = SLAT[D=s_1936_533.nc]   !! [D=S_1979_544.NC]
LET OA15 = SLON[D=s_1936_533.nc]   !! [D=S_1979_544.NC]
LET SA15 = 253
LET DA15 = 15
LET HB15 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_1981_539.NC]
LET AB15 = SLAT[D=s_1936_533.nc]   !! [D=S_1981_539.NC]
LET OB15 = SLON[D=s_1936_533.nc]   !! [D=S_1981_539.NC]
LET SB15 = 253
LET DB15 = 15
LET HA16 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_1994_546.NC]
LET AA16 = SLAT[D=s_1936_533.nc]   !! [D=S_1994_546.NC]
LET OA16 = SLON[D=s_1936_533.nc]   !! [D=S_1994_546.NC]
LET SA16 = 256
LET DA16 = 15
LET HB16 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_1996_542.NC]
LET AB16 = SLAT[D=s_1936_533.nc]   !! [D=S_1996_542.NC]
LET OB16 = SLON[D=s_1936_533.nc]   !! [D=S_1996_542.NC]
LET SB16 = 256
LET DB16 = 15
LET HA17 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_2009_548.NC]
LET AA17 = SLAT[D=s_1936_533.nc]   !! [D=S_2009_548.NC]
LET OA17 = SLON[D=s_1936_533.nc]   !! [D=S_2009_548.NC]
LET SA17 = 253
LET DA17 = 15
LET HB17 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_2011_544.NC]
LET AB17 = SLAT[D=s_1936_533.nc]   !! [D=S_2011_544.NC]
LET OB17 = SLON[D=s_1936_533.nc]   !! [D=S_2011_544.NC]
LET SB17 = 253
LET DB17 = 15
LET HA18 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_2023_551.NC]
LET AA18 = SLAT[D=s_1936_533.nc]   !! [D=S_2023_551.NC]
LET OA18 = SLON[D=s_1936_533.nc]   !! [D=S_2023_551.NC]
LET SA18 = 247
LET DA18 = 15
LET HB18 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_2026_547.NC]
LET AB18 = SLAT[D=s_1936_533.nc]   !! [D=S_2026_547.NC]
LET OB18 = SLON[D=s_1936_533.nc]   !! [D=S_2026_547.NC]
LET SB18 = 247
LET DB18 = 15
LET HA19 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_2036_555.NC]
LET AA19 = SLAT[D=s_1936_533.nc]   !! [D=S_2036_555.NC]
LET OA19 = SLON[D=s_1936_533.nc]   !! [D=S_2036_555.NC]
LET SA19 = 240
LET DA19 = 15
LET HB19 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_2040_551.NC]
LET AB19 = SLAT[D=s_1936_533.nc]   !! [D=S_2040_551.NC]
LET OB19 = SLON[D=s_1936_533.nc]   !! [D=S_2040_551.NC]
LET SB19 = 240
LET DB19 = 15
LET HA20 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_2049_560.NC]
LET AA20 = SLAT[D=s_1936_533.nc]   !! [D=S_2049_560.NC]
LET OA20 = SLON[D=s_1936_533.nc]   !! [D=S_2049_560.NC]
LET SA20 = 236
LET DA20 = 15
LET HB20 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_2053_556.NC]
LET AB20 = SLAT[D=s_1936_533.nc]   !! [D=S_2053_556.NC]
LET OB20 = SLON[D=s_1936_533.nc]   !! [D=S_2053_556.NC]
LET SB20 = 236
LET DB20 = 15
LET HA21 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_2062_565.NC]
LET AA21 = SLAT[D=s_1936_533.nc]   !! [D=S_2062_565.NC]
LET OA21 = SLON[D=s_1936_533.nc]   !! [D=S_2062_565.NC]
LET SA21 = 236
LET DA21 = 15
LET HB21 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_2067_561.NC]
LET AB21 = SLAT[D=s_1936_533.nc]   !! [D=S_2067_561.NC]
LET OB21 = SLON[D=s_1936_533.nc]   !! [D=S_2067_561.NC]
LET SB21 = 236
LET DB21 = 15
LET HA22 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_2075_570.NC]
LET AA22 = SLAT[D=s_1936_533.nc]   !! [D=S_2075_570.NC]
LET OA22 = SLON[D=s_1936_533.nc]   !! [D=S_2075_570.NC]
LET SA22 = 236
LET DA22 = 15
LET HB22 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_2080_566.NC]
LET AB22 = SLAT[D=s_1936_533.nc]   !! [D=S_2080_566.NC]
LET OB22 = SLON[D=s_1936_533.nc]   !! [D=S_2080_566.NC]
LET SB22 = 236
LET DB22 = 15
LET HA23 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_2089_575.NC]
LET AA23 = SLAT[D=s_1936_533.nc]   !! [D=S_2089_575.NC]
LET OA23 = SLON[D=s_1936_533.nc]   !! [D=S_2089_575.NC]
LET SA23 = 236
LET DA23 = 15
LET HB23 = 14.76 * HA[D=s_1936_533.nc]   !! [D=S_2094_571.NC]
LET AB23 = SLAT[D=s_1936_533.nc]   !! [D=S_2094_571.NC]
LET OB23 = SLON[D=s_1936_533.nc]   !! [D=S_2094_571.NC]
LET SB23 = 236
LET DB23 = 15
LET HA_LC = HA12+HB12+HA13+HB13+HA14+HB14+HA15+HB15+HA16+HB16+HA17+HB17+HA18+HB18+HA19+HB19+HA20+HB20+HA21+HB21+HA22+HB22+HA23+HB23
LET HA_LC_TPLV = 64
LET HA_LC_T1DLV = 16
LET HA_LC_BTLV = -64
LET HA_LC_B1DLV = -16
LET HA_LC_SCL = 10
LET UA_LC = UA12+UB12+UA13+UB13+UA14+UB14+UA15+UB15+UA16+UB16+UA17+UB17+UA18+UB18+UA19+UB19+UA20+UB20+UA21+UB21+UA22+UB22+UA23+UB23
LET UA_LC_TPLV = 8
LET UA_LC_T1DLV = 0.64
LET UA_LC_BTLV = -8
LET UA_LC_B1DLV = -0.64
LET UA_LC_SCL = 1000
LET VA_LC = VA12+VB12+VA13+VB13+VA14+VB14+VA15+VB15+VA16+VB16+VA17+VB17+VA18+VB18+VA19+VB19+VA20+VB20+VA21+VB21+VA22+VB22+VA23+VB23
LET VA_LC_TPLV = 8
LET VA_LC_T1DLV = 0.64
LET VA_LC_BTLV = -8
LET VA_LC_B1DLV = -0.64
LET VA_LC_SCL = 1000
LET SPEED = (UA_LC^2 + VA_LC^2) ^ 0.5
LET SPEED_TPLV = 40
LET SPEED_1DLV = 16
LET SPEED_SCL = 100
LET MAX_SPEED = SPEED[L=1:420@MAX]
LET MAX_SPEED_TPLV = 40
LET MAX_SPEED_1DLV = 16
LET MAX_SPEED_SCL = 10
LET MAX_ALL = HA_LC[L=1:420@MAX]
LET MIN_MASK = IF MAX_ALL GT .001 THEN 1
LET MAX_WAVE = MAX_ALL*MIN_MASK
LET MAX_WAVE_TPLV = 500
LET MAX_WAVE_1DLV = 400
LET MAX_WAVE_SCL = 10
LET SIG_WAVE = HA_LC[L=1:420] - MAX_WAVE
LET MAX_TTIME = SIG_WAVE[L=1:420@LOC:0]
LET THRESHOLD_PRCNT = .30
LET NOISE_MASK = IF HA_LC[L=1:420] LE MAX_ALL*THRESHOLD_PRCNT THEN 0 ELSE 1
LET ON_MASK = IF NOISE_MASK[L=1:420@RSUM] GE 1 THEN 0.5
LET OFF_EVENTS = IF NOISE_MASK - NOISE_MASK[L=1:420@SHF:-1] LT 0 THEN 1 ELSE 0
LET OFF_MASK = IF OFF_EVENTS[L=1:420@RSUM] LT 1 THEN 0.5
LET WAVE1 = (ON_MASK+OFF_MASK)*HA_LC[L=1:420]
LET FIRST_WAVE = WAVE1[L=1:420@MAX]*MIN_MASK
LET FIRST_WAVE_TPLV = 500
LET FIRST_WAVE_1DLV = 400
LET FIRST_WAVE_SCL = 10
LET SIG_WAVE1 = WAVE1[L=1:420] - FIRST_WAVE
LET FIRST_TTIME = SIG_WAVE1[L=1:420@LOC:0]
LET DTOR = 0.017453
LET FAULT_LENGTH = 50
LET FAULT_WIDTH = 50
LET BO1 = SRCO-FAULT_LENGTH*COS((270-STRK)*DTOR)/111.32/COS(SRCA*DTOR)
LET BA1 = SRCA-FAULT_LENGTH*SIN((270-STRK)*DTOR)/111.32
LET BO4 = SRCO+FAULT_LENGTH*COS((270-STRK)*DTOR)/111.32/COS(SRCA*DTOR)
LET BA4 = SRCA+FAULT_LENGTH*SIN((270-STRK)*DTOR)/111.32
LET BO2 = BO1+FAULT_WIDTH*COS(DIP*DTOR)*SIN((270-STRK)*DTOR)/111.32/COS(SRCA*DTOR)
LET BA2 = BA1-FAULT_WIDTH*COS(DIP*DTOR)*COS((270-STRK)*DTOR)/111.32
LET BO3 = BO4+FAULT_WIDTH*COS(DIP*DTOR)*SIN((270-STRK)*DTOR)/111.32/COS(SRCA*DTOR)
LET BA3 = BA4-FAULT_WIDTH*COS(DIP*DTOR)*COS((270-STRK)*DTOR)/111.32
LET SRC_LAT = {53.307,52.9,53.687,53.28,54.076,53.654,54.36,53.93,54.596,54.16,54.83,54.4,55.133,54.72,55.509,55.12,55.97,55.598,56.473,56.1,56.975,56.603,57.512,57.14}
LET SRC_LON = {193.63,193.94,194.97,195.29,196.43,196.69,197.9,198.12,199.43,199.62,200.88,201.11,202.26,202.57,203.6,204,204.9,205.34,206.21,206.66,207.54,207.99,208.94,209.4}
LET NSRCS = 24
LET MX_MX = 474.27
LET MXTOP = IF MX_MX GT HA_LC_T1DLV THEN MX_MX ELSE HA_LC_TPLV
LET MN_MN = -284.33
LET MXBOT = IF MN_MN LT HA_LC_B1DLV THEN MN_MN ELSE HA_LC_BTLV
LET SL_X = 0.
LET SL_X2 = 7.207
LET SL_Y = 5.518+.26
LET TIT_X = 7.207/2
LET TIT_Y = 5.518+.85
LET TSUCHR = 0.09
LET NTSULNS = IF 1 THEN 3 ELSE 2
LET NCTSULNS = 85
 
let str1a = STRLEN("($source_list)")
 !-> DEFINE VARIABLE str1a = STRLEN("Mw 9.2, 14.76*a12+14.76*b12+14.76*a13+14.76*b13+14.76*a14+14.76*b14+14.76*a15+14.76*b15+14.76*a16+14.76*b16+14.76*a17+14.76*b17+14.76*a18+14.76*b18+14.76*a19+14.76*b19+14.76*a20+14.76*b20+14.76*a21+14.76*b21+14.76*a22+14.76*b22+14.76*a23+14.76*b23")
let lstr1 = STRLEN("+")
 
let str2a = STRLEN("{193.63,193.94,194.97,195.29,196.43,196.69,197.9,198.12,199.43,199.62,200.88,201.11,202.26,202.57,203.6,204,204.9,205.34,206.21,206.66,207.54,207.99,208.94,209.4}")
list str2a
             VARIABLE : STRLEN("{193.63,193.94,194.97,195.29,196.43,196.69,197.9,198.12,199.43,199.62,200.88,201.11,202.26,202.57,203.6,204,204.9,205.34,206.21,206.66,207.54,207.99,208.94,209.4}")
          162.0
 
def sym aLIST = Mw 9.2, 14.76*a12+14.76*b12+14.76*a13+14.7
 
let lstr2 = STRLEN("($alist)")
 !-> DEFINE VARIABLE lstr2 = STRLEN("Mw 9.2, 14.76*a12+14.76*b12+14.76*a13+14.7")
 
let str3a = STRLEN("($source_list)")
 !-> DEFINE VARIABLE str3a = STRLEN("Mw 9.2, 14.76*a12+14.76*b12+14.76*a13+14.76*b13+14.76*a14+14.76*b14+14.76*a15+14.76*b15+14.76*a16+14.76*b16+14.76*a17+14.76*b17+14.76*a18+14.76*b18+14.76*a19+14.76*b19+14.76*a20+14.76*b20+14.76*a21+14.76*b21+14.76*a22+14.76*b22+14.76*a23+14.76*b23")
list str3a
             VARIABLE : STRLEN("Mw 9.2, 14.76*a12+14.76*b12+14.76*a13+14.76*b13+14.76*a14+14.76*b14+14.76*a15+14.76*b15+14.76*a16+14.76*b16+14.76*a17+14.76*b17+14.76*a18+14.76*b18+14.76*a19+14.76*b19+14.7
          247.0
 
!let a = 12; list a
 
LET STR3 = STRLEN("abcd")
list str3
             VARIABLE : STRLEN("abcd")
          4.000
 
let str4a = STRLEN("($source_list)")
 !-> DEFINE VARIABLE str4a = STRLEN("Mw 9.2, 14.76*a12+14.76*b12+14.76*a13+14.76*b13+14.76*a14+14.76*b14+14.76*a15+14.76*b15+14.76*a16+14.76*b16+14.76*a17+14.76*b17+14.76*a18+14.76*b18+14.76*a19+14.76*b19+14.76*a20+14.76*b20+14.76*a21+14.76*b21+14.76*a22+14.76*b22+14.76*a23+14.76*b23")
 
list str4a
             VARIABLE : STRLEN("Mw 9.2, 14.76*a12+14.76*b12+14.76*a13+14.76*b13+14.76*a14+14.76*b14+14.76*a15+14.76*b15+14.76*a16+14.76*b16+14.76*a17+14.76*b17+14.76*a18+14.76*b18+14.76*a19+14.76*b19+14.7
          247.0
 
 
! Fix bug in @CNNN within multi-line labels
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_cnnn_multiline.jnl
! Changing pen with @Cnnn did not work in
! multi-line labels
 
plot/hl=0:1/vl=0:1/vs 0,0
label 0.2, 0.7, 0, 0, 0.2, "@p2This<NL>@P3works<NL>@p4fine."
label 0.5, 0.7, 0, 0, 0.2, "@C002this<NL>@c003does<NL>@C004not."
label 0.8, 0.7, 0, 0, 0.2, "@C002this<NL>does<NL>not @C004either."
 
label 0.1, 0.3, 0, 0, 0.2, "greek<NL>@SGt@SR_y<NL>works"
 
! For a very fine grid, coordinates not listed with enough precision.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_fine_grid_list.jnl
! err570_fine_grid_list.jnl
! ACM 10/2004
! ACM  6/2007 CANCEL LIST/PREC at the end to restore the default state.
 
! For a very fine grid in longitude and latitude, the coordinates
! are not listed with enough precision to resolve them.
 
 
let hlon= {204.89923, 204.89975, 204.90025, 204.90076, 204.90126}
let hlat = { 19.70020, 19.70071, 19.70122, 19.70173, 19.70223, 19.70274}
 
def axis/x/units=lon xfine = hlon
def axis/y/units=lat yfine = hlat
 
let myvar = x[gx=xfine] + y[gy=yfine]
 
set list/prec=8
list/form=tab myvar
             VARIABLE : X[GX=XFINE] + Y[GY=YFINE]
             BAD FLAG : -1.E+34       
             SUBSET   : 5 by 6 points (LONGITUDE-LATITUDE)
  	155.1008W	155.1002W	155.0998W	155.0992W	155.0987W
19.7002N	224.59943	224.59995	224.60045	224.60096	224.60146
19.7007N	224.59994	224.60046	224.60096	224.60147	224.60197
19.7012N	224.60045	224.60097	224.60147	224.60198	224.60248
19.7017N	224.60096	224.60148	224.60198	224.60249	224.60299
19.7022N	224.60146	224.60198	224.60248	224.60299	224.60349
19.7027N	224.60197	224.60249	224.60299	224.6035	224.604
 
set list/prec=8
list/form=comma myvar
             VARIABLE : X[GX=XFINE] + Y[GY=YFINE]
             BAD FLAG : -1.E+34       
             SUBSET   : 5 by 6 points (LONGITUDE-LATITUDE)
   155.1008W,155.1002W,155.0998W,155.0992W,155.0987W
19.7002N,224.59943,224.59995,224.60045,224.60096,224.60146
19.7007N,224.59994,224.60046,224.60096,224.60147,224.60197
19.7012N,224.60045,224.60097,224.60147,224.60198,224.60248
19.7017N,224.60096,224.60148,224.60198,224.60249,224.60299
19.7022N,224.60146,224.60198,224.60248,224.60299,224.60349
19.7027N,224.60197,224.60249,224.60299,224.6035,224.604
 
list/clobber/head=enh/form=(f9.5)/file=fine.dat myvar
sp cat fine.dat
             VARIABLE : X[GX=XFINE] + Y[GY=YFINE]
             LONGITUDE: 155.101W to 155.0985W
             LATITUDE : 19.7N to 19.703N
             GEOMETRY: XY 
             SIZE:  5  6  
             FORTRAN FORMAT: (f9.5)
             MISSING VALUES FLAG: -1.0000000E+34
X COORDINATES: degrees_east
204.89923
204.89975
204.90025
204.90076
204.90126
Y COORDINATES: degrees_north
 19.70020
 19.70071
 19.70122
 19.70173
 19.70223
 19.70274
DATA:
224.59943
224.59995
224.60045
224.60096
224.60146
224.59994
224.60046
224.60096
224.60147
224.60197
224.60045
224.60097
224.60147
224.60198
224.60248
224.60096
224.60148
224.60198
224.60249
224.60299
224.60146
224.60198
224.60248
224.60299
224.60349
224.60197
224.60249
224.60299
224.60350
224.60400
sp rm -f fine.dat
 
cancel list/precision
 
! Range includes just one coordinate point on the axis
! Plot using /HLIM
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_hlimit_onepoint
!err570_hlimit_onepoint.jnl
! 15-Oct-2004  ACM
 
! range includes just one coordinate point on the axis
! Fix so we can plot this with /HLIMIT (previously gave
! misleading error)
! If no /HLIMIT, should issue an error
 
set mode ignore_error
 
use coads_vwnd
set reg/x=180:200/y=35:45/t=1-jan-1985:1-feb-1985
plot/sym/siz=0.3/hlim="1-jan-1985 18": "1-feb-1985 20" 0*t[gt=vwnd]
 
plot/sym/siz=0.3 0*t[gt=vwnd]
set mode/last ignore_error
 
! Regridding between Gregorian and Julian time axes with @NRST
! caused a segfault.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_index111.jnl
! err570_index111.jnl
! 3-nov-04 ACM
! Fixes for bug 1049.
!
! See ~ansley/ans_ferret/users/wittenberg/bug1049.jnl
! This was due to a bug in the fix for bug 562. In
! that fix we allowed subscripts of -111 when there
! was a range of subscripts including that value.
! The fix didnt correctly distinguish between that
! case and -111 used as the missing-integer flag.
 
 
DEF AXIS/T/UNITs=days/T0="01-JAN-1979 00:00:00"/CAL=gregorian \
  tgreg = {6590.5,6620.0,6649.5,6680.0,6710.5,6741.0,6771.5,\
  6802.5,6833.0,6863.5,6894.0,6924.5,6955.5,6985.0,7014.5,\
  7045.0,7075.5,7106.00}
DEF AXIS/T/UNITS=hours/t0="01-JAN-1900 00:00:00"/CAL=julian \
  tjul = { 850692,851400,852108,852840,853572,854304,855036,\
  855780,856512,857244,857976,858708}
 
LET s1 = T[GT=tgreg]
LET s2 = T[GT=tjul]
 
LIST/T=1-jan-1997:1-jan-1998 s2[GT=s1@NRST]
             VARIABLE : T[GT=TJUL]
                        regrid: on T@NRST
             SUBSET   : 12 points (TIME)
 16-JAN-1997 12 /  1:  850692.
 15-FEB-1997 00 /  2:  851400.
 16-MAR-1997 12 /  3:  852108.
 16-APR-1997 00 /  4:  852840.
 16-MAY-1997 12 /  5:  853572.
 16-JUN-1997 00 /  6:  854304.
 16-JUL-1997 12 /  7:  855036.
 16-AUG-1997 12 /  8:  855780.
 16-SEP-1997 00 /  9:  856512.
 16-OCT-1997 12 / 10:  857244.
 16-NOV-1997 00 / 11:  857976.
 16-DEC-1997 12 / 12:  858708.
 
 
! Data has missing value flag of NaN. Under linux, SHOW DATA/FULL
! crashed on trying to format value for the output buffer.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_sh_dat_nan.jnl
! err570_sh_dat_nan.jnl
! 4-Nov-2004 acm
 
! See bug 1070.
! Data has missing value flag of NaN. Under linux, SHOW DATA/FULL
! crashed on trying to format value for the output buffer.
 
use nan_missing.nc
show data/full
     currently SET data sets:
    1> ./data/nan_missing.nc  (default)
     NCEP Ocean Analysis
 name     title                             I         J         K         L
 TEMP     temperature                      1:1       1:1       1:19      1:1
             degree_Celsius on grid GGH1 with -1.E+34 & NaN for missing data
             X=139.75E:140.75E  Y=0.5S:0.5N  Z=0:375  
 
  time range: 15-FEB-1980 12:00
 
 
 
! Time reqest out of range on NOLEAP axes.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_time_range.jnl
! err570_time_range.jnl  bug1080
! time request out of range with calendar axis and RETURN=
 
def axis/t="16-Jan-1861 12:00:00":"16-mar-1881 12:00:00":1/units=months/calendar=noleap tax
let a = t[gt=tax]
save/clob/file=aa.nc a
save/clob/file=cc.nc a
use aa
use cc
 
define grid/like=a[d=1] var1_grid_
let var1_ = a[d=1,t="16-Jan-1861 12:00:00"]
let var2_ = a[gx=var1_grid_,gy=var1_grid_,d=2,t="16-Jan-1861 12:00:00"]
set var/units="`a[d=1,t="16-Jan-1861 12:00:00"],return=units`" var1_
 !-> set var/units=" " var1_
set var/units="`a[gx=var1_grid_,gy=var1_grid_,d=2,t="16-Jan-1861 12:00:00"],return=units`" var2_
 !-> set var/units=" " var2_
!  error message on this last command; noleap calendar not treated correctly.
 
! Fix for bug 1066; error doing 2-D polygon overlaying
! a non-standard calendar axis
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_poly_over_julian.jnl
! err570_poly_over_julian.jnl
! ACM 11/12/04
 
! Bug 1066
! Overlaying data on a Julian time axis got an error:
!          Differing calendar axes:
!          first variable is on JULIAN axis
!          overlaid variable is on GREGORIAN axis
 
use coads_climatology
set axis/CAL=JULIAN time
plot/x=140w/y=0 sst
plot/ov/vs/line=3 {400,900,900,400}, {25.5,25.5,26.5,25.5}
poly/ov/pal=green {400,900,900,400}, {25.5,25.5,26.5,25.5}
 
 
! Fix for bug 1077; return ERROR rather than NOTE when
! exiting from a script where query/ignore or other coached
! string substitution returns the user-given error message
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_coaching hello
! err570_coaching.jnl
! ACM 11/12/04  Bug 1077
 
! test this with GO err570_coaching hello
 
! We are changing NOTE to ERROR in coached_str_sub
! when the script gives the user-defined error text.
! We still may have an ERROR and then NOTE to explain
! the list of valid arguments.
 
set mode ignore_errors
 
! incorrect argument with query/ignore
query/ignore $1%q|a|b|c|d|<First argument is a letter of the alphabet%
query/ignore $2%|a|b|c|d|%
 
! These example message commands taken from bn_dollar
 
! doesn't match on "hello"; the first line below now
! uses ERROR instead of NOTE when writing my error message
 
message/cont $1"|xxxxx|goodbye<my error message"
message/cont $1"greetings|xxxxx|goodbye"
 
! no argument supplied;  the first line below now
! uses ERROR instead of NOTE when writing my error message
 
message/cont $3"|hello|goodbye<my error message"
message/cont $3">greetings|hello|goodbye"
 
! Here are some lines from bn_symbols; the first and third now use ERROR instead of NOTE
 
message/continue ($test2"<my error message")
message/continue ($test2"|hello|bye|")
message/continue ($test2"|hello|bye|<my error message")    ! silent error
message/continue ($t2"|solong>really hello|bye|")
 
set mode/last ignore_errors
 
! Fix for bug 485: say ($0) in a script should return the
! name of the script
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_dollar_zero.jnl
! err570_dollar_zero.jnl
! (bug 485) Got a command syntax error;
! $0 in script should return the script name
 
SET MODE ignore_error
SAY ($0)
 !-> MESSAGE/CONTINUE err570_dollar_zero.jnl
err570_dollar_zero.jnl
 
SET MODE/LAST ignore_error
 
! Fix for bug 596; list/i=0:300:0 var crashed Ferret
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_illegal_stride.jnl
! err570_illegal_stride.jnl
! (bug 596) list/i=0:300:0 var crashed Ferret
 
SET MODE ignore_error
use coads_climatology
list/l=1/j=40/i=0:300:0 sst
 
SET MODE/LAST ignore_error
 
! Fix for bug 1085; /THICK without color specifier caused all lines to revert to black
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_thick_colors.jnl
! err570_thick_colors.jnl  bug1085
! /THICK without color specifier causes all lines to revert to black
 
PLOT/THICK/I=1:100 cos(i/20), sin(i/30)
PLOT/OVER/THICK=3/I=1:100 cos(i/30)*sin(i/20)
PLOT/OVER/THICK=1/I=1:100 cos(i/10), sin(i/50), cos(i/40)*sin(i/10)
 
! time series
USE gtsa056_2
PLOT/THICK/X=180/Y=0/K=1 temp
PLOT/OVER/THICK/X=180/Y=-1/K=1 temp
PLOT/OVER/THICK/X=180/Y=1/K=1 temp
 
! plot/vs
PLOT/VS/LINE/THICK/I=1:314 i*cos(i/20), i*sin(i/20)
PLOT/OVER/VS/LINE/THICK/I=1:314 i*cos(i/18), i*sin(i/18)
PLOT/OVER/VS/LINE/THICK=3/I=1:314 i*cos(i/16), i*sin(i/16)
PLOT/OVER/VS/LINE/THICK=1/I=1:314 i*cos(i/14), i*sin(i/14)
 
 
! Fix for bug 1102: under linux, var[d=filename] fails if filename
! starts with a digit.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_digit_filename.jnl
! err570_digit_filename.jnl
! Bug 1102: under linux, var[d=filename] fails if filename
! starts with a digit.
 
let a = x[i=1:10]
save/clobber/file=10a.nc a
can var/all
use 10a
list a[x=1:4,d=10a]
             VARIABLE : X[I=1:10]
             FILENAME : 10a.nc
             SUBSET   : 4 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
list a[x=1:4,d=1]
             VARIABLE : X[I=1:10]
             FILENAME : 10a.nc
             SUBSET   : 4 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 
 
use coads_climatology
list a[x=1:4,d=1]
             VARIABLE : X[I=1:10]
             FILENAME : 10a.nc
             SUBSET   : 4 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
list a[i=1:4,d=1]
             VARIABLE : X[I=1:10]
             FILENAME : 10a.nc
             SUBSET   : 4 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 
list a[i=1:4,d=10a]
             VARIABLE : X[I=1:10]
             FILENAME : 10a.nc
             SUBSET   : 4 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
list a[i=1:4,d=10a.nc]
             VARIABLE : X[I=1:10]
             FILENAME : 10a.nc
             SUBSET   : 4 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 
! Fix for bug 1098: DODS URL label was cut off
! GO bn_reset
! GO err570_dods_url_label.jnl
 
 
! Fix for bug 906: auto-formatting of labels on color keys loses precision
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_keylabels.jnl
! err570_keylabels.jnl
! 11/2004
 
! (bug 906)
! auto-formatting of labels on color keys loses precision
! key labels are 370, 371, 371, 372, 372, ...
 
let a = 370 + x[x=1:10:1] + 0.2*y[y=1:10:1]
shade/lev=(370,382,0.5) a
 
! Fix for bug 1130: error and crash on some systems polygon command
! where polygon arguments have latitude or longitude units
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err570_poly_lonlat_axis.jnl
! err570_poly_lonlat_axis.jnl
! 12/14/04
!
! The polygon command gave error messages and under version 5.7
!    Symbol not found
!    XFOR (I7,'LONE')
! and similarly for the y axis.
!
! RedHat 7 binary, under Debian 3.0 Linux the poly command crashes Ferret.
 
LET XTRIANGLE = YSEQUENCE({-1,0,1})
LET YTRIANGLE = YSEQUENCE({-1,1,-1})
LET XPTS = 120+30*RANDU(I[i=1:10])
LET YPTS = 30*RANDU(1+I[i=1:10])
LET/title="longitude"/units="degrees_east" XT = XTRIANGLE+XPTS
LET/title="latitude"/units="degrees_north" YT = YTRIANGLE+YPTS
POLYGON XT, YT, I[I=1:10]
 
! Add the same fix to plot_set_up.F for PLOT/VS commands
 
PLOT/VS XT, YT
*** Running ferret script: bn_inf_levels.jnl
! Run FERRET/fer/ferretdods_gui
! test open upper and lower levels (-INF) (INF)
 
can mode logo
set win/siz=0.4
 
use coads_climatology
 
shade/set/lev=(-inf),(4,28,2)(inf) sst[l=1]
ppl shakey,1,0,-0.1,,,,,,`($ppl$ylen)+($ppl$yorg)+0.1`
 !-> ppl shakey,1,0,-0.1,,,,,,7.5
ppl shade
 
can view
 
! many levels: triangles forced to be 5% of total key length
! (add SHOW SYM LEV* to catch behavior of bug 1519 which
!  did not plot color in the entire area for FILL plots.)
 
set view left
fill/x=20e:150e/lev=(-inf),(4,28,0.5)(inf) sst[l=1]
sh sym lev*
LEV_ALL = "-2.8,4,4.5,5,5.5,6,6.5,7,7.5,8,8.5,9,9.5,10,10.5,11,11.5,12,12.5,13,13.5,14,14.5,15,15.5,16,16.5,17,17.5,18,18.5,19,19.5,20,20.5,21,21.5,22,22.5,23,23.5,24,24.5,25,25.5,26,26.5,27,27.5,28,32"
LEV_TEXT = "(-INF),(4,28,0.5)(INF)"
LEV_MIN = "open-ended"
LEV_MAX = "open-ended"
LEV_NUM = "50"
LEV_DEL = "irregular"
LEV_CENTERED_LABELS = "off"
 
set view right
shade/lev=(-inf),(4,28,0.5)(inf)/key=cont sst[l=1]
sh sym lev*
LEV_ALL = "-2.8,4,4.5,5,5.5,6,6.5,7,7.5,8,8.5,9,9.5,10,10.5,11,11.5,12,12.5,13,13.5,14,14.5,15,15.5,16,16.5,17,17.5,18,18.5,19,19.5,20,20.5,21,21.5,22,22.5,23,23.5,24,24.5,25,25.5,26,26.5,27,27.5,28,32"
LEV_TEXT = "(-INF),(4,28,0.5)(INF)"
LEV_MIN = "open-ended"
LEV_MAX = "open-ended"
LEV_NUM = "50"
LEV_DEL = "irregular"
LEV_CENTERED_LABELS = "off"
 
 
can view
 
! horizontal.
 
set view upper
fill/x=20e:150e/set/lev=(-inf),(4,28,0.5)(inf)/y=0:90 sst[l=1]
ppl shakey,1,0,-0.1,10,,,,,`($ppl$ylen)+($ppl$yorg)+0.1`
 !-> ppl shakey,1,0,-0.1,10,,,,,3.1
ppl fill
 
set view lower
shade/set/lev=(-inf),(4,28,0.5)(inf)/y=0:90/key=cont sst[l=1]
ppl shakey,1,0,-0.1,10,,,,,`($ppl$ylen)+($ppl$yorg)+0.1`
 !-> ppl shakey,1,0,-0.1,10,,,,,3.1
ppl shade
 
! Some one-sided examples
can view
 
fill/lev=(-2,28,1)(inf) sst[l=1]
 
shade/set/lev=(-inf),(4,30,0.5)/key=cont/pal=rainbow sst[l=1]
ppl shakey,1,0,-0.1,10,,,,,`($ppl$ylen)+($ppl$yorg)+0.1`
 !-> ppl shakey,1,0,-0.1,10,,,,,7.5
ppl shade
 
! Restore the default palette (bug in SHADE/SET/PAL= ?)
palette default
 
let filler = missing(sst[l=1],-999)
shade/over/pal=black/nolab/lev=(-999,-999,-999) filler
 
can view
 
! polygon command
 
let xsqr = YSEQUENCE({0,.1,.1,0})
let ysqr = YSEQUENCE({0,0,.1,.1})
let ypts = x/10
let xpts = cos(x/10)
 
polygon/trans/i=1:100/nolable/lev=(-inf)(200,900,50)(inf) xpts+xsqr, ypts+ysqr, x*x/10
 
 
use coads_climatology
def axis/x=0:360:5 xq
def axis/y=-90:90:4 yq
let fsst =  sst[l=1,gx=xq,gy=yq]
 
let lon = xsequence(x[gx=xq] + 0*y[gy=yq])
let lat = xsequence(0*x[gx=xq] + y[gy=yq])
shade/nokey/pal=white/nolab/axes=0,0,0,0 fsst  ! set up
go polymark poly/key/title="polygons"/lev=(-inf)(4,26,1)(inf), lon, lat, xsequence(fsst), square, 0.4
 
 
*** Running ferret script: bn_regulart.jnl
! bn_regulart.jnl
! 5/12/2005 ACM
 
! Test of the USE/REGULART qualifier
! The axis is irregular in the first instance, and regular in the second
 
use coads_vwnd
show axis tcoads
 name       axis              # pts   start                end
 TCOADS    TIME               648 i   16-JAN-1946 12:00    16-DEC-1999 12:00
T0 = 01-JAN-1700 00:00:00
   Axis span (to cell edges) = 19723
list/l=1:6 t[gt=tcoads], tbox[gt=tcoads]
             TIME: 01-JAN-1946 00:00 to 01-JUL-1946 00:00
 Column  1: T is T (axis TCOADS)
 Column  2: TBOX is TBOX (axis TCOADS)
                         T   TBOX
16-JAN-1946 12 / 1:  89864.  31.00
15-FEB-1946 00 / 2:  89894.  28.00
16-MAR-1946 12 / 3:  89924.  31.00
16-APR-1946 00 / 4:  89954.  30.00
16-MAY-1946 12 / 5:  89984.  31.00
16-JUN-1946 00 / 6:  90015.  30.00
can data/all
 
use/regulart coads_vwnd
show axis tcoads
 name       axis              # pts   start                end
 TCOADS    TIME               648 r   16-JAN-1946 12:00    16-DEC-1999 12:00
T0 = 01-JAN-1700 00:00:00
   Axis span (to cell edges) = 19722.44
list/l=1:6 t[gt=tcoads], tbox[gt=tcoads]
             TIME: 01-JAN-1946 06:46 to 02-JUL-1946 21:31
 Column  1: T is T (axis TCOADS)
 Column  2: TBOX is TBOX (axis TCOADS)
                      T   TBOX
16-JAN-1946 / 1:  89864.  30.44
15-FEB-1946 / 2:  89895.  30.44
18-MAR-1946 / 3:  89925.  30.44
17-APR-1946 / 4:  89956.  30.44
18-MAY-1946 / 5:  89986.  30.44
17-JUN-1946 / 6:  90017.  30.44
 
*** Running ferret script: bn_labwid.jnl
! LABWID returns the length in Denbo inches of the
! string.  For multi-line strings, returns length of
! the longest line.
 
LIST LABWID("aaaaabbbbb", .15)
             VARIABLE : LABWID("aaaaabbbbb", .15)
             X        : 1
          1.357
LIST LABWID("aaaaabbbbb", .10)
             VARIABLE : LABWID("aaaaabbbbb", .10)
             X        : 1
          0.9048
LIST LABWID("aaaaabbbbb<NL>ee", .15)
             VARIABLE : LABWID("aaaaabbbbb<NL>ee", .15)
             X        : 1
          1.357
LIST LABWID("ee<NL>aaaaabbbbb", .15)
             VARIABLE : LABWID("ee<NL>aaaaabbbbb", .15)
             X        : 1
          1.357
 
 
LIST LABWID("@IISTRING", .15)
             VARIABLE : LABWID("@IISTRING", .15)
             X        : 1
          0.9808
LIST LABWID("@SSSTRING", .15)
             VARIABLE : LABWID("@SSSTRING", .15)
             X        : 1
          0.9143
LIST LABWID("@SSSTRING<NL>@IISTRING", .15)
             VARIABLE : LABWID("@SSSTRING<NL>@IISTRING", .15)
             X        : 1
          0.9808
LIST LABWID("@IISTRING<NL>@SSSTRING", .15)
             VARIABLE : LABWID("@IISTRING<NL>@SSSTRING", .15)
             X        : 1
          0.9808
 
 
go ptest
! Description: create a simple test line plot
 
! spirograph picture ...
PLOT/VS/LINE/I=1:314 i*cos(i/20),i*sin(i/20)
 
 
label/nouser 0,3,-1,0,.15,"@P2@IILine1<NL>@IIA LONGER LINE"
let wid = labwid("@P2@IILine1<NL>@IIA LONGER LINE",.15)
label/nouser `wid`, 3, -1, 0, .15,  "@P4@IIMulti-line<NL>Length is longest of ALL lines<NL>Line three"
 !-> PPL %LABEL/nouser 2.019230842590332, 3, -1, 0, .15,  "@P4@IIMulti-line<NL>Length is longest of ALL lines<NL>Line three"
*** Running ferret script: bn_redefine_taxis_mc.jnl
! bn_redefine_taxis_mc.jnl
! ACM 15-Apr-2005
 
! Redefine the time axis of a multi-file data set.
! Lets us fix a time axis, which may in fact be irregular, but
! the multi-file reading always makes into a regularly-spaced axis.
 
set data coads_clim.des
list/x=180/y=0 sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             DATA SET : COAD
             FILENAME : coads_clim.des
             SUBSET   : 6 points (TIME)
             LONGITUDE: 179E
             LATITUDE : 1S
                   179E   
                    80
 16-JAN-1900 / 1:  28.20
 15-FEB-1900 / 2:  28.36
 18-MAR-1900 / 3:  28.35
 17-APR-1900 / 4:  28.22
 17-MAY-1900 / 5:  28.49
 17-JUN-1900 / 6:  28.32
 
def sym taxisname  `sst,return=taxis`
 !-> def sym taxisname  TIME1
 
def axis/t=1-mar-1990:6-mar-1990:1/units=days ($taxisname)
 !-> def axis/t=1-mar-1990:6-mar-1990:1/units=days TIME1
list/x=180/y=0 sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             DATA SET : COAD
             FILENAME : coads_clim.des
             SUBSET   : 6 points (TIME)
             LONGITUDE: 179E
             LATITUDE : 1S
                      179E   
                       80
 01-MAR-1990 00 / 1:  28.20
 02-MAR-1990 00 / 2:  28.36
 03-MAR-1990 00 / 3:  28.35
 04-MAR-1990 00 / 4:  28.22
 05-MAR-1990 00 / 5:  28.49
 06-MAR-1990 00 / 6:  28.32
 
def axis/t=1:6:1 ($taxisname)
 !-> def axis/t=1:6:1 TIME1
list/x=180/y=0 sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             DATA SET : COAD
             FILENAME : coads_clim.des
             SUBSET   : 6 points (T)
             LONGITUDE: 179E
             LATITUDE : 1S
           179E   
            80
 1   / 1:  28.20
 2   / 2:  28.36
 3   / 3:  28.35
 4   / 4:  28.22
 5   / 5:  28.49
 6   / 6:  28.32
*** Running ferret script: bn_illegal_axisname.jnl
! Some OPenDAP HDF files have illegal axis names, e.g. with a dot in the name.
! This is a test of using such names, in a redefinition of the axes of the data.
! The file has a variable with axis names COADSX.ILLEGAL, COADSY.ILLEGAL. The axes contain
! just indices.  The file also has variables NEW.LONGITUDES and NEW.LATITUDES which contain
! geographic coordinates that we want to substitute for the axes.
 
use illeg_axname.nc
sh data
     currently SET data sets:
    1> ./data/illeg_axname.nc  (default)
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:21      1:16      ...       ...
 NEW.LONGITUDES
          X[GX=SST]                        1:21      ...       ...       ...
 NEW.LATITUDES
          Y[GY=SST]                        ...       1:16      ...       ...
 
list/i=1:5 x[gx=sst]
             VARIABLE : X
                        axis COADSX.ILLEGAL
             FILENAME : illeg_axname.nc
             SUBSET   : 5 points (X)
 60   / 1:  60.00
 61   / 2:  61.00
 62   / 3:  62.00
 63   / 4:  63.00
 64   / 5:  64.00
set view upper; shade sst
 
define axis/x/modulo/units=degrees_east 'coadsx.illegal' = XSEQUENCE('NEW.LONGITUDES')
define axis/y/units=degrees_north 'coadsy.illegal' = XSEQUENCE('NEW.LATITUDES')
 
list/i=1:5 x[gx=sst]
             VARIABLE : X
                        axis 'COADSX.ILLEGAL'
             FILENAME : illeg_axname.nc
             SUBSET   : 5 points (LONGITUDE)
 21E   / 1:  21.00
 23E   / 2:  23.00
 25E   / 3:  25.00
 27E   / 4:  27.00
 29E   / 5:  29.00
set view lower; shade sst
sh grid sst
    GRID GEX1
 name       axis              # pts   start                end                 subset
 'COADSX.ILLEGAL' LONGITUDE    21mr   21E                  61E                 full
 'COADSY.ILLEGAL' LATITUDE     16 r   35N                  65N                 full
 normal    Z
 normal    T
*** Running ferret script: bn_exit_script.jnl
! bn_exit_script.jnl
! 5/2005 ACM
! tests of EXIT/SCRIPT command, in combination with IF and REPEAT
! 3/2007 add a check for exit/script within a loop (fixes for bug 1304)
 
! Simple EXIT/SCRIPT command in a script
go exit_script_1
! test exit/script
 
exit/script
 
! EXIT/SCRIPT from an IF clause
go exit_script_if
! test exit/script from an IF clause
 
let a = 1
if `a lt 10` then exit/script
 !-> if 1 then exit/script
 
! EXIT/SCRIPT inside REPEAT loop
go exit_script_loop
! test exit/script inside REPEAT loop
 
repeat/i=3:5 (list/nohead i; exit/script)
!-> REPEAT: I=3
          3.000
 
! EXIT/SCRIPT with IF clause and REPEAT loop
go exit_script_if_loop
! test exit/script with IF clause and REPEAT loop
 
repeat/i=3:10:2 (list/nohead i; if `i ge 6` then exit/script)
!-> REPEAT: I=3
          3.000
 !-> if 0 then exit/script
!-> REPEAT: I=5
          5.000
 !-> if 0 then exit/script
!-> REPEAT: I=7
          7.000
 !-> if 1 then exit/script
 
! EXIT/SCRIPT two levels down
go exit_script_twolev
! test exit/script called another level down
 
go exit_script_if
! test exit/script from an IF clause
 
let a = 1
if `a lt 10` then exit/script
 !-> if 1 then exit/script
 
say "returned from exit_script_if"
returned from exit_script_if
say "here is the next line"
here is the next line
 
! EXIT/SCRIPT two levels down
go exit_script_twolev
! test exit/script called another level down
 
go exit_script_if
! test exit/script from an IF clause
 
let a = 1
if `a lt 10` then exit/script
 !-> if 1 then exit/script
 
say "returned from exit_script_if"
returned from exit_script_if
say "here is the next line"
here is the next line
 
! EXIT/SCRIPT from a script within a loop.
! Should see output from 3 repeats of the loop but not
! the SAY SCRIPT at each iteration of the repeat loop
 
cancel mode verify
1
loop
2
loop
3
loop
*** Running ferret script: bn_exit_cycle.jnl
! bn_exit_cycle.jnl
! 5/2005 ACM
! EXIT/CYCLE skips remaining commands in this repetition of a loop
 
can mode ver
32
64
128
256
512
1024
 
 test exit/loop combined with exit/cycle
32
64
128
256
say 512 if bigger than 500
512
say 1024 if bigger than 500
1024
say 2048 if bigger than 500
say 4096 if bigger than 500
say 8192 if bigger than 500
say 16384 if bigger than 500
 
loop finished 16384 gt 10000
*** Running ferret script: bn_curv_mod.jnl
! bn_curv_mod
! Test of fill/mod and contour/mod
! 5/24/2005 Ferret v5.81
 
! The dataset is a portion of example tripolar grid.
 
! use "/home/ja3/hankin/user/gfdl/tri_polar/mom4_grid_example.nc"
! save/clobber/file=tripolar_subset.nc geolon_vert_t[j=150:174], geolat_vert_t[j=150:174], ht[j=150:173]
 
! Note that this coord data is actually cell edges and so
! isnt really what one would use for FILL and CONTOUR commands --
 
use tripolar_subset.nc     ! Longitude range is -280 to 80
 
fill/mod/hlim=-180:180 ht, geolon_vert_t[i=1:180,j=1:24], geolat_vert_t[i=1:180,j=1:24]
contour/over/mod/hlim=-180:180 ht, geolon_vert_t[i=1:180,j=1:24], geolat_vert_t[i=1:180,j=1:24]
 
*** Running ferret script: bn_shade_keycont.jnl
! Continuous shade key
! test setting it and whether default is restored on next command.
! also whether behavior consistent when we call shakey
 
use ocean_atlas_temp
set region/x=130:290/y=-45:45
 
set view ul
shade/title="default shade key" temp[l=1]
 
set view ur
shade/key=cont/title="shade/key=cont" temp[l=1]
 
set view ll
shade/key=cont/title="cont key with shakey call"/set temp[l=1]
 
let/quiet x1 = `($ppl$xorg)+0.1`
 !-> DEFINE VARIABLE/quiet x1 = 1.3
let/quiet y1 = `($ppl$yorg)+($ppl$ylen)+0.1`
 !-> DEFINE VARIABLE/quiet y1 = 4.923
let/quiet y2 = `($ppl$yorg)+($ppl$ylen)+0.5`
 !-> DEFINE VARIABLE/quiet y2 = 5.323
 
ppl shakey ,0,-.12,2,,,`x1`,,`y1`,`y2`
 !-> ppl shakey ,0,-.12,2,,,1.3,,4.923,5.323
go unlabel 4
go unlabel 5
ppl shade
ppl list shakey

         DO KEY  ORIENT  LAB SIZE  LAB INC  LAB DIG  LAB LEN
              1       0     -0.12        2        5        9


         X LO     X HI     Y LO     Y HI
         1.30     6.31     4.92     5.32
 
set view lr
let/quiet x1 = `($ppl$xorg)+1`
 !-> DEFINE VARIABLE/quiet x1 = 2.2
let/quiet x2 = `($ppl$xorg)+($ppl$xlen)-1`
 !-> DEFINE VARIABLE/quiet x2 = 5.212
let/quiet y1 = `($ppl$yorg)`
 !-> DEFINE VARIABLE/quiet y1 = 1.4
shade/title="with shakey, restore default key style"/set temp[l=1]
ppl shakey ,0,-.12,3,,,`x1`,`x2`,`y1`
 !-> ppl shakey ,0,-.12,3,,,2.2,5.212,1.4
ppl shade
 
can view
 
set view ul
fill/title="default fill key" temp[l=1]
 
set view ur
fill/key=cont/title="fill/key=cont" temp[l=1]
 
set view ll
fill/key=cont/title="cont key with shakey call"/set temp[l=1]
 
let/quiet x1 = `($ppl$xorg)+0.1`
 !-> DEFINE VARIABLE/quiet x1 = 1.3
let/quiet y1 = `($ppl$yorg)+($ppl$ylen)+0.1`
 !-> DEFINE VARIABLE/quiet y1 = 4.923
let/quiet y2 = `($ppl$yorg)+($ppl$ylen)+0.5`
 !-> DEFINE VARIABLE/quiet y2 = 5.323
 
ppl shakey ,0,-.12,2,,,`x1`,,`y1`,`y2`
 !-> ppl shakey ,0,-.12,2,,,1.3,,4.923,5.323
go unlabel 4
go unlabel 5
ppl fill
ppl list shakey

         DO KEY  ORIENT  LAB SIZE  LAB INC  LAB DIG  LAB LEN
              1       0     -0.12        2        5        9


         X LO     X HI     Y LO     Y HI
         1.30     6.31     4.92     5.32
 
set view lr
let/quiet x1 = `($ppl$xorg)+1`
 !-> DEFINE VARIABLE/quiet x1 = 2.2
let/quiet x2 = `($ppl$xorg)+($ppl$xlen)-1`
 !-> DEFINE VARIABLE/quiet x2 = 5.212
let/quiet y1 = `($ppl$yorg)`
 !-> DEFINE VARIABLE/quiet y1 = 1.4
fill/title="with shakey, restore default key style"/set temp[l=1]
ppl shakey ,0,-.12,3,,,`x1`,`x2`,`y1`
 !-> ppl shakey ,0,-.12,3,,,2.2,5.212,1.4
ppl fill
*** Running ferret script: bn581_bug_fixes.jnl
! bn581_bug_fixes.jnl
! test various fixes that went into version 5.81
! 2/05 *acm*
!
 
! Bug 1160 short axis with irreg bounds seen as regular.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err580_irreg_bounds.jnl
! err580_irreg_bounds.jnl
! Define a short irregular time axis with some time_bounds,
! and then read it into Ferret.  When the file is read in,
! the bounds seem to be ignored; axis is seen as regular.
! Bug 1160 reported by Andrew.
 
def ax/t/edge time = {0,1,3}
let a = t[gt=time]
show grid/t a
    GRID (G###)
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TIME      T                    2 i   0.5                  2                   full
 
       L     T                       TBOX          TBOXLO
       1>  0.5                       1          0
       2>  2                         2          1
 
save/clob/file=a.nc a
sp echo "err580_irreg_bounds.jnl --- " >> all_ncdump.out
sp ncdump a.nc >> all_ncdump.out
 
can data/all
can var/all
can mem
 
!  T axis was marked as regular
use a.nc
show grid/t a
    GRID GSI1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TIME1     T                    2 i   0.5                  2                   full
 
       L     T                       TBOX          TBOXLO
       1>  0.5                       1          0
       2>  2                         2          1
 
! Bug 1179 Cartesian_axis and positive="down" resulted in depth axis not being recognized
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err580_cartesian_depth.jnl
 ! err580_cartesian_depth.jnl
! cartesian_axis attribute
! combined with positive="down"
! caused the axis not to be recognized as a depth axis
! should be i- on the axis ZT
 
use a_cartesian_bug1179.nc
sh grid temp
    GRID GHU1
 name       axis              # pts   start                end                 subset
 GRID_X_T  LONGITUDE            1 r   79E                  79E                 full
 GRID_Y_T  LATITUDE             1 r   0.25S                0.25S               full
 ZT        DEPTH (m)           10 i-  22.5                 158                 full
 TIME1     TIME                 1mr   15-FEB-1900 03:00    15-FEB-1900 03:00   full
 
! Bug 1181 Titles were truncated at 80 characters
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err580_long_title.jnl
 
 ! err580_long_title.jnl
 ! Titles were truncated at 80 characters
 
save/clobber/title="a long title longer than 80 characters a123456789b123456789c123456789d123456789e123456789f123456789g123456789h123456789"/file=longtitle.nc x[x=1:10]
 
sp echo "err580_long_title.jnl --- " >> all_ncdump.out
sp ncdump longtitle.nc >> all_ncdump.out
 
! Bug 1180 Allow "use filename.des"
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err580_use_des.jnl
! err580_use_des.jnl
! Allow "use filename.des"   (previously gave an "is this a CDF file?" error)
 
use vary_scale.des
sh data
     currently SET data sets:
    1> ./data/vary_scale.des  (default)
 name     title                             I         J         K         L
 TT       1 + 0*T[GT=DAYT]                 ...       ...       ...       1:20
 
 
 
! Bug 1180 Allow "use filename.des"
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err580_use_des.jnl
! err580_use_des.jnl
! Allow "use filename.des"   (previously gave an "is this a CDF file?" error)
 
use vary_scale.des
sh data
     currently SET data sets:
    1> ./data/vary_scale.des  (default)
 name     title                             I         J         K         L
 TT       1 + 0*T[GT=DAYT]                 ...       ...       ...       1:20
 
 
! fix for bug 1181: dataset title was limited to 80 characters.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err580_long_dsettitle.jnl
! err580_long_dsettitle
! fix for bug 1181
! previously dataset title was limited to 80 characters.
 
! File has a dataset title 1000 characters long.
use longtitle1000.nc
say `a,return=dsettitle`
 !-> MESSAGE/CONTINUE 
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
 
! Set a dataset title over 80 characters.
save/title="a long title, longer than the previous limit of 80 characters.  Previously various buffers were set to 80, and storage in ds_title was also too short.  "/clobber/file=longtitle.nc a
 
sp echo "err580_long_dsettitle.jnl --- " >> all_ncdump.out
sp ncdump longtitle.nc >> all_ncdump.out
 
! fix for bug 1200:crash due to the long veckey format spec.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err580_long_veckey.jnl
! err580_long_veckey.jnl
! Bug 1200 The following caused a crash due to the long veckey format spec.
 
vector/i=1:50/j=1:50/set  j-20+(i-i),i-20+(j-j)
 
ppl veckey,1,-3,,"(f4.0," x10^-^2 N m^-^2")"
ppl vector
 
! restore the default setting
ppl veckey,0,0,,"(1PG10.3)"
 
! fix for bug 1201: mistranslation of time region.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err580_cal360_region.jnl
! err580_cal360_region.jnl
! Wrong output region: the set region mistakenly tranlated
 
def axis/t=15-apr-1990:15-apr-2000:15/units=days/t0=15-apr-1990/calendar=d360 tax
let a = t[gt=tax]
load a
set reg/t=15-apr-1990:15-apr-1991
sho reg
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        T=15-APR-1990 00:00:00:15-APR-1991 00:00:0
        E/M is unspecified
        F/N is unspecified
 
 
! fix for bug 1203: crash if time range left off.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err580_def_tax_norange.jnl
! err580_def_t_norange.jnl
! bug 1203. without the T range, these statements cause a STOP.
 
SET MODE ignore
DEFINE AXIS/T0="1-JAN-1861"/UNITS=months/t myt
 
DEFINE AXIS/T0="1-JAN-1861"/UNITS=months/T/CALENDAR=noleap myt
 
! fix for bug 1207: closest distance and closest index transformations.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err580_cdb.jnl
! err580_cdb.jnl
! bug 1207
 
! Bug in closest distance and closest index transformations
! Code needs range below for CDB, CIB and above for CDA, CIA.
! Instead it asked for a range above AND below the specified index.
! So result is missing when it should not be.
 
def axis/x=1:20:1 aax
let var = if mod(i,5) eq 1 then x[gx=aax]
 
list var[i=15@cdb:5]
             VARIABLE : IF MOD(I,5) EQ 1 THEN X[GX=AAX]
             X        : 15 (closest dist below by 5 pts)
          4.000
list var[i=14@cdb:5]
             VARIABLE : IF MOD(I,5) EQ 1 THEN X[GX=AAX]
             X        : 14 (closest dist below by 5 pts)
          3.000
 
! These returned MISSING data with the bug, should not be missing.
 
list var[i=15@cdb:10]
             VARIABLE : IF MOD(I,5) EQ 1 THEN X[GX=AAX]
             X        : 15 (closest dist below by 10 pts)
          4.000
list var[i=15@cib:10]
             VARIABLE : IF MOD(I,5) EQ 1 THEN X[GX=AAX]
             X        : 15 (closest index below by 10 pts)
          4.000
list var[i=5@cda:10]
             VARIABLE : IF MOD(I,5) EQ 1 THEN X[GX=AAX]
             X        : 5 (closest dist above by 10 pts)
          1.000
list var[i=5@cia:10]
             VARIABLE : IF MOD(I,5) EQ 1 THEN X[GX=AAX]
             X        : 5 (closest index above by 10 pts)
          1.000
 
! fix for bug 1214: crash on repeating a SET VIEW when viewport defined with /AXES
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err580_def_view_axes.jnl
! err580_def_view_axes.jnl
! BUG 1214
! crashed with seg fault on the second SET VIEW v1
 
! Does not crash if we define viewports without the /AXES
! Does not crash if we CAN MODE META and SET MODE META
! between the two SET VIEW v1
! Does not crash if we skip the SET WINDOW/CLEAR
 
! Does not crash with Ferret v5.50
 
define view/x=0.2:0.4/y=.2:.4/axes v1
 
set window/clear
set mode metafile viewaxes.plt
 
set view v1
go ptest
! Description: create a simple test line plot
 
! spirograph picture ...
PLOT/VS/LINE/I=1:314 i*cos(i/20),i*sin(i/20)
 
 
set window/clear
 
! can mode meta
set mode meta
 
set view v1
shade/i=1:12/j=1:12 i+j
 
can mode metafile
sp rm -f viewaxes.plt*
 
 
! fix for bug 1205: symbol LEV_DEL wrong when single level specified
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err580_lev_del.jnl
! err580_lev_del.jnl
! demonstrates bug 1205; precision of LEV_DEL when single level specified.
 
shade/lev=.4d/x=1:10/y=1:10 cos(i/10)*9*sin(j/5)
sh sym lev_del
LEV_DEL = "0.4"
show sym lev*
LEV_TEXT = ".4D"
LEV_MIN = "0.8"
LEV_MAX = "9.2"
LEV_NUM = "21"
LEV_DEL = "0.4"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "0.8,1.2,1.6,2,2.4,2.8,3.2,3.6,4,4.4,4.8,5.2,5.6,6,6.4,6.8,7.2,7.6,8,8.4,8.8,9.2"
 
use coads_climatology
shade/l=1/lev=1.2d sst; sho sym lev_del
LEV_DEL = "1.2"
 
show sym lev*
LEV_TEXT = "1.2D"
LEV_MIN = "-2.4"
LEV_MAX = "31.2"
LEV_NUM = "28"
LEV_DEL = "1.2"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "-2.4,-1.2,0,1.2,2.4,3.6,4.8,6,7.2,8.4,9.6,10.8,12,13.2,14.4,15.6,16.8,18,19.2,20.4,21.6,22.8,24,25.2,26.4,27.6,28.8,30,31.2"
 
! Fix for bug 1174: strfloat_c("nonsense") gave result of 0 rather than missing.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err580_strfloat_errors.jnl
! err580_strfloat_errors.jnl
! Previously a nonsense input gave a result of 0.
! See bug 1174.
 
let b = {"3.34", "0", "nonsense", "0.0", "153q51", "9..32", "7.e03", "3.2e-2"}
list/prec=6 strfloat(b)
             VARIABLE : STRFLOAT(B)
             SUBSET   : 8 points (X)
 1   / 1:     3.34
 2   / 2:     0.00
 3   / 3:     ....
 4   / 4:     0.00
 5   / 5:   153.00
 6   / 6:     9.00
 7   / 7:  7000.00
 8   / 8:     0.03
 
! Fixes for bugs 1249, 1250: uppercase not recognized for qualifier argument
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err580_arg_case.jnl
! err580_arg_case.jnl
! 5/2005
! bugs 1249, 1250
!
! key=CONTINUOUS and step=CONNECTED
! were not recognized if the value was in uppercase
 
shade/key=cont/i=1:10/j=1:4 i-j
shade/key=CONT/i=1:10/j=1:4 i-j
 
plot/step=conn/i=1:10 sin(i)
plot/step=CONN/i=1:10 sin(i)
 
 
 
! Fixes for bugs 1019: kludge for CDC time axes made time origin incorrect on outputs
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err580_cdc_timeaxis.jnl
! err580_cdc_timeaxis.jnl
! 6/3/05
! See comments under bug 1019.
!
! CDC time axes have the convention that if the start date is 1-jan-0001:00:00 then
! a shift of 2 days is made in year 1590.  Ferret corrects for this by resetting the
! time origin back by 2 days.  This is ok for internal time coordinate computations,
! but the time origin written to the user and in cdf files is incorrect: 30-dec-0000
!
! fix this in the RETURN=t0, SHOW AXIS, SHOW/XML AXIS and SAVE commands
!
! CDC file, save a  portion of it.  Check that time origin is 0001-01-01 00:00:00
! (it will not be unless the bug-fix version of Ferret writes the file.)
 
 
! set data "http://www.cdc.noaa.gov/cgi-bin/nph-nc/Datasets/ncep.pac.ocean/taux.mnmean.nc"
! save/clobber/file=cdc_timeaxis.nc/i=15/j=45 taux
! can data/all
 
 
def axis/t=1-jan-1990:1-feb-1990:1/units=days/t0="01-JAN-0001 00:00:00" tcdc
let a = sin(t[gt=tcdc]/10000)
 
save/clobber/file=t0_cdc.nc a
can var/all
can axis tcdc
use t0_cdc
 
sh axis tcdc
 name       axis              # pts   start                end
 TCDC      TIME                32 r   30-DEC-1989 00:00    30-JAN-1990 00:00
T0 = 01-JAN-0001 00:00:00
   Axis span (to cell edges) = 32
save/clobber/file=my_cdc_timeaxis.nc/L=1:15 a
sp echo "err580_cdc_timeaxis.jnl --- " >> all_ncdump.out
sp ncdump -h my_cdc_timeaxis.nc >> all_ncdump.out
say `a,return=t0`
 !-> MESSAGE/CONTINUE 01-JAN-0001 00:00:00
01-JAN-0001 00:00:00
 
sp rm -f t0_cdc.nc
sp rm -f my_cdc_timeaxis.nc
 
 
 
! Fix for bug 1272: show axis/t= with NOLEAP calendar
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err580_show_axis_t.jnl
! err580_show_axis_t
! bug 1272: wrong range shown when nonstd calendar
! 5/22/06 acm
 
 ! SHOW AXIS/T= gives wrong date when calendar not gregorian
 
def axis/t=1-jan-2000:1-jan-2005:1/units=days/caleandar=noleap tnoleap
sh axis/t=25-jan-2001:1-feb-2001 tnoleap
 name       axis              # pts   start                end
 TNOLEAP   TIME              1826 r   01-JAN-2000 00:00    01-JAN-2005 00:00
T0 = 15-JAN-1901
CALENDAR = NOLEAP
   Axis span (to cell edges) = 1826
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
     390>  25-JAN-2001 00:00:00      1          24-JAN-2001 12:00:00        36510
     391>  26-JAN-2001 00:00:00      1          25-JAN-2001 12:00:00        36511
     392>  27-JAN-2001 00:00:00      1          26-JAN-2001 12:00:00        36512
     393>  28-JAN-2001 00:00:00      1          27-JAN-2001 12:00:00        36513
     394>  29-JAN-2001 00:00:00      1          28-JAN-2001 12:00:00        36514
     395>  30-JAN-2001 00:00:00      1          29-JAN-2001 12:00:00        36515
     396>  31-JAN-2001 00:00:00      1          30-JAN-2001 12:00:00        36516
     397>  01-FEB-2001 00:00:00      1          31-JAN-2001 12:00:00        36517
 
 
def axis/t=1-jan-2000:1-jan-2005:1/units=days/caleandar=gregorian tgreg
sh axis/t=25-jan-2001:1-feb-2001 tgreg
 name       axis              # pts   start                end
 TGREG     TIME              1828 r   01-JAN-2000 00:00    01-JAN-2005 00:00
T0 = 15-JAN-1901
   Axis span (to cell edges) = 1828
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
     391>  25-JAN-2001 00:00:00      1          24-JAN-2001 12:00:00        36535
     392>  26-JAN-2001 00:00:00      1          25-JAN-2001 12:00:00        36536
     393>  27-JAN-2001 00:00:00      1          26-JAN-2001 12:00:00        36537
     394>  28-JAN-2001 00:00:00      1          27-JAN-2001 12:00:00        36538
     395>  29-JAN-2001 00:00:00      1          28-JAN-2001 12:00:00        36539
     396>  30-JAN-2001 00:00:00      1          29-JAN-2001 12:00:00        36540
     397>  31-JAN-2001 00:00:00      1          30-JAN-2001 12:00:00        36541
     398>  01-FEB-2001 00:00:00      1          31-JAN-2001 12:00:00        36542
 
! Fix for bug 1279 which was only in the first iteration of v5.81 release
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_nlev.jnl
! err580_nlev.jnl
! bug 1279
 
!FILL/lev=n var
! gave us exactly n levels, not approximately n levels.
 
use coads_climatology
fill/lev=30 sst[l=2]
 
! Fix for bug 1349: formatted axis labels on PLOT/VS and POLYGON plot
! acm 8/29/2005
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_vs_poly_axis.jnl
! err581_vs_poly_axis.jnl
! Test fix of bug 1349: formatted axis labels on PLOT/VS and POLYGON plot
! acm 8/29/2005
 
LET xpts= {144.616,144.621,144.651,144.658,144.660,144.664,144.670,144.670,144.672,144.674,144.676,144.677,144.678,144.679,144.683,144.685,144.686,144.687,144.688,144.690,144.691,144.692,144.693,144.693,144.694,144.694,144.695,144.696,144.697,144.698}
LET ypts= {32.3793,32.3279,32.308,32.3972,32.3938,32.3958,32.3112,32.3924,32.309,32.3095,32.3828,32.3135,32.3861,32.385,32.3265,32.3264,32.3821,32.3772,32.355,32.3657,32.3691,32.3371,32.3495,32.3672,32.3458,32.3625,32.3604,32.3518,32.3643,32.3531}
 
SET VAR/UNITS=degrees_east/TITLE="LONGITUDES" xpts
SET VAR/UNITS=degrees_north/TITLE="LATITUDES" ypts
PLOT/VS xpts, ypts
 
LET ysqr = YSEQUENCE({0,0,.1,.1}*0.01)
LET xsqr = YSEQUENCE({0,.1,.1,0}*0.01)
DEF VAR/UNITS=degrees_east/TITLE="LONGITUDES" xp =  xpts+xsqr
DEF VAR/UNITS=degrees_north/TITLE="LATITUDES" yp =  ypts+ysqr
 
SET VAR/TITLE="COLORED BY LATITUDE" ypts
POLYGON/LINE/fill xp, yp, ypts
 
! Fix for bug 1270: regridding leakage between cells: monthly-> seasonal regridding
! needs file short_bug1270.nc
! ( this fix not checked in for v5.81 release.)
! GO bn_reset
! GO err580_regrid_prec.jnl
 
*** Running ferret script: bn_tab_comma_multivar.jnl
! bn_tab_comma_multivar.jnl
!
! Fixes for bug 1273
! v5.90 8/9/2005
! LIST/FORM=tab and /FORM=comma with more than one variable
! no longer behave as if /SINGLY was specified. New qualifier
! LIST/NOROWLAB removes coordinate labels from the rows listing data
! v7.51 6/2019  precision handling is changed.
 
let country =  {"JP", "JP", "US"}
let id = {1,2,3}
let aa = 4000* id
let bb = 1000000* id + 500
let newcountry = {"w", "c", "e"}
let the_data_var = {4,5,4}
 
 
list/format=comma country, id, aa, bb, newcountry, the_data_var
             X: 0.5 to 3.5
 Column  1: COUNTRY is {"JP", "JP", "US"}
 Column  2: ID is {1,2,3}    BAD FLAG : -1.E+34
 Column  3: AA is 4000* ID    BAD FLAG : -1.E+34
 Column  4: BB is 1000000* ID + 500    BAD FLAG : -1.E+34
 Column  5: NEWCOUNTRY is {"w", "c", "e"}
 Column  6: THE_DATA_VAR is {4,5,4}    BAD FLAG : -1.E+34
     COUNTRY,ID,AA,BB,NEWCOUNTRY,THE_DATA_VAR
1   / 1:"JP",1,4000,1.E+06,"w",4  
2   / 2:"JP",2,8000,2.E+06,"c",5  
3   / 3:"US",3,1.2E+04,3.E+06,"e",4  
 
list/format=tab/norow country, id, aa, bb, newcountry, the_data_var
             X: 0.5 to 3.5
 Column  1: COUNTRY is {"JP", "JP", "US"}
 Column  2: ID is {1,2,3}    BAD FLAG : -1.E+34
 Column  3: AA is 4000* ID    BAD FLAG : -1.E+34
 Column  4: BB is 1000000* ID + 500    BAD FLAG : -1.E+34
 Column  5: NEWCOUNTRY is {"w", "c", "e"}
 Column  6: THE_DATA_VAR is {4,5,4}    BAD FLAG : -1.E+34
COUNTRY	ID	AA	BB	NEWCOUNTRY	THE_DATA_VAR
"JP"	1	4000	1.E+06	"w"	4  
"JP"	2	8000	2.E+06	"c"	5  
"US"	3	1.2E+04	3.E+06	"e"	4  
 
 
! With v7.51 the handling of precision=4 has changed, so that bb isn't
! well represented.
 
list/format=comma/prec=7 country, id, aa, bb, newcountry, the_data_var
             X: 0.5 to 3.5
 Column  1: COUNTRY is {"JP", "JP", "US"}
 Column  2: ID is {1,2,3}    BAD FLAG : -1.E+34
 Column  3: AA is 4000* ID    BAD FLAG : -1.E+34
 Column  4: BB is 1000000* ID + 500    BAD FLAG : -1.E+34
 Column  5: NEWCOUNTRY is {"w", "c", "e"}
 Column  6: THE_DATA_VAR is {4,5,4}    BAD FLAG : -1.E+34
     COUNTRY,ID,AA,BB,NEWCOUNTRY,THE_DATA_VAR
1   / 1:"JP",1,4000,1000500,"w",4  
2   / 2:"JP",2,8000,2000500,"c",5  
3   / 3:"US",3,12000,3000500,"e",4  
list/format=tab/norow/prec=7 country, id, aa, bb, newcountry, the_data_var
             X: 0.5 to 3.5
 Column  1: COUNTRY is {"JP", "JP", "US"}
 Column  2: ID is {1,2,3}    BAD FLAG : -1.E+34
 Column  3: AA is 4000* ID    BAD FLAG : -1.E+34
 Column  4: BB is 1000000* ID + 500    BAD FLAG : -1.E+34
 Column  5: NEWCOUNTRY is {"w", "c", "e"}
 Column  6: THE_DATA_VAR is {4,5,4}    BAD FLAG : -1.E+34
COUNTRY	ID	AA	BB	NEWCOUNTRY	THE_DATA_VAR
"JP"	1	4000	1000500	"w"	4  
"JP"	2	8000	2000500	"c"	5  
"US"	3	12000	3000500	"e"	4  
 
 
*** Running ferret script: bn_element_functions.jnl
 ! NOAA/PMEL TMAP
 ! FERRET v5.81
 ! Solaris 5.6 - 08/08/05
 !  9-Aug-05 14:36
 
use coads_climatology
let a = x[gx=sst]*y[gy=sst]*l[gt=sst]
list/i=1:2/j=1:2/l=3 a
             VARIABLE : X[GX=SST]*Y[GY=SST]*L[GT=SST]
             FILENAME : coads_climatology.cdf
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             TIME     : 17-MAR 02:58
              21E    23E   
               1      2
 87S   / 2: -5481. -6003.
 89S   / 1: -5607. -6141.
list is_element_of (a, -6003)
             VARIABLE : IS_ELEMENT_OF (A, -6003)
             FILENAME : coads_climatology.cdf
             X        : 1
          1.000
 list/i=1:2/j=1:2/l=3 element_index (a, {-6003})
             VARIABLE : ELEMENT_INDEX (A, {-6003})
             FILENAME : coads_climatology.cdf
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             TIME     : 17-MAR 02:58
              21E    23E   
               1      2
 87S   / 2:   ....  1.000
 89S   / 1:   ....   ....
use string4d.nc
list/j=1:2/k=1:2 axy
             VARIABLE : RESHAPE (A,RVAR)
             FILENAME : string4d.nc
             SUBSET   : 2 by 2 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:"alpha""a2"   
 2   / 2:"a3"   "a4"   
 ---- K:2 Z:   2
 1   / 1:"a7"   "a8"   
 2   / 2:"a9"   "a10"  
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:"c5"   "c6"   
 2   / 2:"c7"   "c8"   
 ---- K:2 Z:   2
 1   / 1:"d1"   "d2"   
 2   / 2:"d3"   "d4"   
list is_element_of_str (axy[k=1:2,j=1:2], "a10")
             VARIABLE : IS_ELEMENT_OF_STR (AXY[K=1:2,J=1:2], "a10")
             FILENAME : string4d.nc
             X        : 1
          1.000
list is_element_of_str (axy[k=1:2,j=1:2], "A10")
             VARIABLE : IS_ELEMENT_OF_STR (AXY[K=1:2,J=1:2], "A10")
             FILENAME : string4d.nc
             X        : 1
          0.0000
list is_element_of_str (axy[k=1:2,j=1:2], {"B0", "QQ", "d4", "m5"})
             VARIABLE : IS_ELEMENT_OF_STR (AXY[K=1:2,J=1:2], {"B0", "QQ", "d4", "m5"})
             FILENAME : string4d.nc
             X        : 1
          1.000
list element_index_str (axy[k=1:2,j=1:2], {"a10", "a2", "d4", "c5"})
             VARIABLE : ELEMENT_INDEX_STR (AXY[K=1:2,J=1:2], {"a10", "a2", "d4", "c5"})
             FILENAME : string4d.nc
             SUBSET   : 2 by 2 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   ....  2.000
 2   / 2:   ....   ....
 ---- K:2 Z:   2
 1   / 1:   ....   ....
 2   / 2:   ....  1.000
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:  4.000   ....
 2   / 2:   ....   ....
 ---- K:2 Z:   2
 1   / 1:   ....   ....
 2   / 2:   ....  3.000
 
list is_element_of_str_n (axy[k=1:2,j=1:2], "a10")
             VARIABLE : IS_ELEMENT_OF_STR_N (AXY[K=1:2,J=1:2], "a10")
             FILENAME : string4d.nc
             X        : 1
          1.000
list is_element_of_str_n (axy[k=1:2,j=1:2], "A10")
             VARIABLE : IS_ELEMENT_OF_STR_N (AXY[K=1:2,J=1:2], "A10")
             FILENAME : string4d.nc
             X        : 1
          2.000
list is_element_of_str_n (axy[k=1:2,j=1:2], {"B0", "QQ", "d4", "m5"})
             VARIABLE : IS_ELEMENT_OF_STR_N (AXY[K=1:2,J=1:2], {"B0", "QQ", "d4", "m5"})
             FILENAME : string4d.nc
             X        : 1
          1.000
list element_index_str_n (axy[k=1:2,j=1:2], {"a10", "a2", "d4", "c5"})
             VARIABLE : ELEMENT_INDEX_STR_N (AXY[K=1:2,J=1:2], {"a10", "a2", "d4", "c5"})
             FILENAME : string4d.nc
             SUBSET   : 2 by 2 by 2 by 2 points (X-Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 ---- K:1 Z:   1
 1   / 1:   ....  2.000
 2   / 2:   ....   ....
 ---- K:2 Z:   2
 1   / 1:   ....   ....
 2   / 2:   ....  1.000
 ---- L:2 T:   2
 ---- K:1 Z:   1
 1   / 1:  4.000   ....
 2   / 2:   ....   ....
 ---- K:2 Z:   2
 1   / 1:   ....   ....
 2   / 2:   ....  3.000
 
*** Running ferret script: bn_long_revision_num.jnl
! bn_long_revision_num.jnl
! ACM 8/30/05
! revision numbers were previously limited to 2 decimal places: v5.81
! Now they can be longer, for minor revisions between releases: v5.8101
 
! ferret version
sh sym FERRET_VERSION
FERRET_VERSION = "7.6"
 
! history attribute
let a = 12
sp echo "bn_long_revision_num.jnl --- history attribute" >> all_ncdump.out
save/clobber/file=revision.nc a; sp ncdump revision.nc | grep history >> all_ncdump.out
 
! label in upper right
go ptest; sh sym lab1
! Description: create a simple test line plot
 
! spirograph picture ...
PLOT/VS/LINE/I=1:314 i*cos(i/20),i*sin(i/20)
 
LAB1 = "X : 0.5 to 314.5"
 
! show commands without an argument, lists version number at the top
sho command
 Commands in Program FERRET  version7.6:
 SET
 SET WINDOW/SIZE/NEW/LOCATION/ASPECT/CLEAR/TITLE
 SET REGION/I/J/K/L/M/N/X/Y/Z/T/E/F/DX/DY/DZ/DT/DE/DF/DI/DJ/DK/DL/DM/DN
 SET VIEWPORT
 SET EXPRSION
 SET LIST/PRECISIO/FILE/FORMAT/APPEND/HEADING/NCFORMAT/ENDIAN/DEFLATE/SHUFFLE
      /XCHUNK/YCHUNK/ZCHUNK/TCHUNK/ECHUNK/FCHUNK/OUTTYPE
 SET DATA/EZ/VARIABLE/TITLE/FORMAT/GRID/SKIP/COLUMNS/SAVE/RESTORE/ORDER
      /TYPE/SWAP/REGULART/DELIMITE/STRICT/FEATURE/FMASK
 SET MODE/LAST
 SET MOVI/FILE/COMPRESS/LASER/START
 SET VARIABLE/TITLE/UNITS/GRID/BAD/DATASET/NAME/SCALEFAC/OFFSET/OUTTYPE
      /LAYERZ/CURVILIN
 SET GRID/SAVE/RESTORE
 SET AXIS/MODULO/DEPTH/CALENDAR/T0/UNITS/STRIDE/OFFSET/REGULAR/OUTTYPE/NAME
 SET MEMORY/MAX/SIZE
 SET ATTRIBUT/TYPE/DATASET/OUTPUT/LIKE/QUIET
 SET NCCACHE/SIZE/NELEMS/PREEMPT
 SET REDIRECT/TEE/JOURNAL/FILE/APPEND/CLOBBER
 SET GIFFILE
 SHOW/ALL
 SHOW WINDOW/ALL
 SHOW REGION/ALL
 SHOW AXIS/ALL/I/J/K/L/M/N/X/Y/Z/T/E/F/XML/OUTFILE/APPEND/CLOBBER
 SHOW EXPRSION/ALL
 SHOW LIST/ALL
 SHOW DATA/ALL/BRIEF/FULL/VARIABLE/FILES/XML/ATTR/OUTFILE/APPEND/CLOBBER
       /HIDDEN/MEMBERS
 SHOW MODE/ALL
 SHOW MOVIE/ALL
 SHOW VARIABLE/ALL/DATASET/USER/XML/OUTFILE/APPEND/CLOBBER/TREE/LAYERZ/CURVILIN
 SHOW COMMANDS/ALL/BRIEF
 SHOW MEMORY/ALL/DIAGNOST/TEMPORY/PERMANT/FREE
 SHOW GRID/ALL/I/J/K/L/M/N/X/Y/Z/T/E/F/DYNAMIC/XML/OUTFILE/APPEND/CLOBBER
 SHOW VIEWPORT/ALL
 SHOW TRANFORM/ALL
 SHOW ALIAS/ALL
 SHOW SYMBOL/ALL
 SHOW ATTRIBUT/ALL/DATASET/OUTPUT
 SHOW NCCACHE
 SHOW GIFFILE
 SHOW FUNCTION/ALL/BRIEF/EXTERNAL/INTERNAL/DETAILS
 SHOW QUERIES/ALL
 CANCEL
 CANCEL WIND/ALL
 CANCEL REGION/ALL/I/J/K/L/M/N/X/Y/Z/T/E/F
 CANCEL MEMORY/ALL/TEMPORY/PERMANT
 CANCEL EXPRSION/ALL
 CANCEL LIST/ALL/PRECISIO/FILE/FORMAT/HEADING/APPEND/OUTTYPE
 CANCEL DATA/ALL/NOERROR/FMASK
 CANCEL MODE
 CANCEL MOVIE/ALL
 CANCEL VIEWPORT
 CANCEL VARIABLE/ALL/DATASET/LAYERZ/CURVILIN/NOERROR
 CANCEL AXIS/MODULO/ALL/DEPTH/STRIDE
 CANCEL GRID
 CANCEL ATTRIBUT/OUTPUT/DATASET
 CANCEL REDIRECT
 CANCEL ALIAS/ALL
 CANCEL SYMBOL/ALL
 CANCEL NCCACHE
 CONTOUR/I/J/K/L/M/N/X/Y/Z/T/E/F/OVERLAY/SET_UP/FRAME/DATASET/TRANPOSE/FILL
          /LINE/NOLABEL/LEVELS/KEY/NOKEY/PALETTE/XLIMITS/YLIMITS/TITLE/COLOR
          /NOAXES/PATTERN/SIZE/SPACING/SIGDIG/PEN/HLIMITS/VLIMITS/AXES/HGRATICU
          /VGRATICU/GRATICUL/MODULO/DEGMINSE/HALFSPAC
 LIST/I/J/K/L/M/N/X/Y/Z/T/E/F/DATASET/HEADING/NOHEAD/SINGLY/FILE/APPEND
       /ORDER/FORMAT/TITLE/PRECISIO/RIGID/ILIMITS/JLIMITS/KLIMITS/LLIMITS
       /MLIMITS/NLIMITS/XLIMITS/YLIMITS/ZLIMITS/TLIMITS/ELIMITS/FLIMITS
       /CLOBBER/QUIET/WIDTH/EDGES/BOUNDS/NOBOUNDS/NOROWLAB/KEEP_AXI/NCFORMAT
       /XCHUNK/YCHUNK/ZCHUNK/TCHUNK/ECHUNK/FCHUNK/DEFLATE/SHUFFLE/ENDIAN
       /OUTTYPE/CURVILIN/LAYERZ/ASGLOBAL/STRLEN/NOCOORDS
 PLOT/I/J/K/L/M/N/X/Y/Z/T/E/F/ALONG/OVERLAY/SET_UP/FRAME/DATASET/TRANPOSE
       /VS/SYMBOL/NOLABEL/LINE/COLOR/THICKNES/XLIMITS/YLIMITS/TITLE/SIZE
       /NOAXES/STEP/DASH/AXES/HGRATICU/VGRATICU/HLIMITS/VLIMITS/HLOG/VLOG
       /GRATICUL/NOKEY/NOYADJUS/KEY/RIBBON/LEVELS/PALETTE/FAST/MISSING/GAPLOC
       /SKIPSYM/DEGMINSE/HALFSPAC
 GO/HELP
 HELP
 LOAD/TEMPORY/PERMANT/I/J/K/L/M/N/X/Y/Z/T/E/F/DATASET/NAME
 DEFINE
 DEFINE REGION/I/J/K/L/M/N/X/Y/Z/T/E/F/DEFAULT/DX/DY/DZ/DT/DE/DF/DI/DJ/DK
         /DL/DM/DN
 DEFINE GRID/X/Y/Z/T/E/F/FILE/LIKE
 DEFINE VARIABLE/TITLE/UNITS/QUIET/DATASET/BAD/REMOTE/LIKE
 DEFINE AXIS/X/Y/Z/T/E/F/FILE/UNITS/T0/NAME/FROMDATA/DEPTH/MODULO/NPOINTS
         /EDGES/CALENDAR/BOUNDS/QUIET/MONTHLY/LIKE
 DEFINE VIEWPORT/TEXT/XLIMITS/YLIMITS/SIZE/ORIGIN/CLIP/AXES
 DEFINE ALIAS
 DEFINE SYMBOL
 DEFINE ATTRIBUT/DATASET/TYPE/OUTPUT/QUIET
 DEFINE PYFUNC/NAME
 DEFINE DATA/AGGREGAT/T/E/F/TITLE/QUIET/HIDE/U/TAXIS/FAXIS/TOVERLAP
 DEFINE ANNOTATI/USER/NORM/NOUSER/XPOS/YPOS/HALIGN/VALIGN/ANGLE/SIZE/NLAB
 EXIT/COMMAND/LOOP/SCRIPT/PROMPT/PROGRAM/CYCLE/TOPYTHON
 MESSAGE/CONTINUE/QUIET/JOURNAL/ERROR/OUTFILE/APPEND/CLOBBER
 VECTOR/I/J/K/L/M/N/X/Y/Z/T/E/F/OVERLAY/SET_UP/FRAME/DATASET/TRANPOSE/ASPECT
         /NOLABEL/LENGTH/XSKIP/YSKIP/THICK/XLIMITS/YLIMITS/TITLE/COLOR/NOAXES
         /NOKEY/FLOWLINE/DENSITY/AXES/PEN/HLIMITS/VLIMITS/HGRATICU/VGRATICU
         /GRATICUL/KEY/MODULO
 PPLUS/RESET
 FRAME/FORMAT/FILE/TRANSPAR
 REPEAT/I/J/K/L/M/N/X/Y/Z/T/E/F/ANIMATE/LOOP/RANGE/NAME
 STAT/BRIEF/PRECISIO/I/J/K/L/M/N/X/Y/Z/T/E/F/DATASET
 SHADE/I/J/K/L/M/N/X/Y/Z/T/E/F/OVERLAY/SET_UP/FRAME/DATASET/TRANPOSE/TRIM
        /LINE/NOLABEL/LEVELS/KEY/NOKEY/PALETTE/XLIMITS/YLIMITS/TITLE/AXES
        /NOAXES/PATTERN/HGRATICU/VGRATICU/GRATICUL/MODULO/HLIMITS/VLIMITS
        /DEGMINSE/HALFSPAC
 SPAWN
 WIRE/I/J/K/L/M/N/X/Y/Z/T/E/F/OVERLAY/SET_UP/FRAME/DATASET/VIEWPOIN/ZLIMITS
       /TRANPOSE/NOLABEL/ZSCALE/COLOR/TITLE
 QUERY/ALL/FILE/IGNORE
 IF
 ELSE
 ELIF
 ENDIF
 POLYGON/I/J/K/L/M/N/X/Y/Z/T/E/F/OVERLAY/SET_UP/FRAME/DATASET/TRANPOSE/COORD_AX
          /NOLABEL/LEVELS/LINE/COLOR/PALETTE/XLIMITS/YLIMITS/TITLE/THICKNES
          /NOAXES/PATTERN/FILL/KEY/NOKEY/AXES/HLIMITS/VLIMITS/HLOG/VLOG
          /HGRATICU/VGRATICU/GRATICUL/MODULO
 ANNOTATE/USER/NORM/NOUSER/XPOS/YPOS/HALIGN/VALIGN/ANGLE/SIZE
 
 Use SHOW ALIAS to see alternative command names
*** Running ferret script: bn_window_title.jnl
! bn_window_title.jnl
! Define a title for windows rather than just FERRET_1, FERRET_2, ...
! If no title is set, use SESSION_DATE:SESSION_TIME
 
go ptest
! Description: create a simple test line plot
 
! spirograph picture ...
PLOT/VS/LINE/I=1:314 i*cos(i/20),i*sin(i/20)
 
sh sym win_title
 
set win/title="set the title"
sho sym win_title
WIN_TITLE = "set_the_title"
 
go ptest
! Description: create a simple test line plot
 
! spirograph picture ...
PLOT/VS/LINE/I=1:314 i*cos(i/20),i*sin(i/20)
 
set win/new
set win/title=""/new
sho sym win_title
WIN_TITLE = "_"
 
set win/title="($session_date):($session_time)"
 !-> set win/title="DD-MON-YY HH:MM"
 
! If the date or time starts with a blank then we get an extra
! underscore in the window title. Evaluating the symbols into
! new ones gets rid of this blank at the start.
! the symbols session_date and session_time may have been canceled.
! If so substitute another string.
 
DEFINE SYMBOL the_date = ($session_date"SESSION_DATE")
 !-> DEFINE SYMBOL the_date = DD-MON-YY
DEFINE SYMBOL the_time = ($session_time"SESSION_TIME")
 !-> DEFINE SYMBOL the_time = HH:MM
SET WIN/TITLE="($the_date):($the_time)"
 !-> SET WIN/TITLE="DD-MON-YY HH:MM"
 
can win/all
set win/new
sh sym win_title
WIN_TITLE = "DD-MON-YY HH:MM"
*** Running ferret script: bn_last_error.jnl
! bn_last_error.jnl
! acm Nov 2005
!
! - test the symbol FER_LAST_ERROR (Commands from various bn scripts)
 
 
 
SET MODE IGNORE_ERRORS
 
LIST/ORDER=X  IF I GT 3 THEN ( IF I LT 5 THEN I ELSE -9 ) ELSE .333	! err
SHOW SYM FER_LAST_ERROR
FER_LAST_ERROR = "**ERROR: command syntax: IF I GT 3 THEN ( IF I LT 5 THEN I ELSE -9 ) ELSE .333 \Cannot use multiple IFs in an expression "
 
 
LET A = IF I LT 5 THEN I ELSE -9
SHOW SYM FER_LAST_ERROR
FER_LAST_ERROR = "**ERROR: command syntax: IF I LT 5 THEN I ELSE -9 \ELSE before - is illegal\negative constants need to be enclosed in parentheses "
 
 
load a1,a2,a3
SHOW SYM FER_LAST_ERROR
FER_LAST_ERROR = "**ERROR: variable unknown or not in data set: A1 "
 
set data nofile.nc
SHOW SYM FER_LAST_ERROR
FER_LAST_ERROR = "**TMAP ERR: non-existent or not on line nofile.nc "
 
 
! Repeat/range errors
repeat/name=a (say `a`)
SHOW SYM FER_LAST_ERROR
FER_LAST_ERROR = "**ERROR: invalid command: REPEAT/NAME requires /RANGE "
 
 
! Cannot use pseudo-variables.
repeat/range=1:3/name=L (use coads_climatology; list/nohead [sst=I=1,j=1])
SHOW SYM FER_LAST_ERROR
FER_LAST_ERROR = "**ERROR: command syntax: L is a pseudo-variable; cannot use with REPEAT/RANGE/NAME. Instead use REPEAT/L= "
 
 
! external function errors via ef_bail_out
 
! This  bails out w/Time axis error
USE  "coads_vwnd.cdf"
SET REGION/I=90/J=65
LET vw_fft = ffta(vwnd[l=37:60])
LOAD vw_fft
SHOW SYM FER_LAST_ERROR
FER_LAST_ERROR = "**ERROR: error in external function. Bailing out of external function FFTA\ Time axis must be a regular axis"
 
 
SET MODE/LAST IGNORE_ERROR
*** Running ferret script: bn_deg_min.jnl
! bn_deg_min.jnl
! label axes with degrees and minutes rather than degrees and decimal degrees.
! 19-May-06 add seconds as well...
 
 
 
use ss_small.nc
 
shade/set/x=222.9:223.1/y=58.22:59.1 rose
ppl xfor (dm)
ppl yfor (dm)
ppl shade
 
! plot/vs plots
 
let xpts= {144.616,144.621,144.651,144.658,144.660,144.664,144.670,144.670,144.672,144.674,144.676,144.677,144.678,144.679,144.683,144.685,144.686,144.687,144.688,144.690,144.691,144.692,144.693,144.693,144.694,144.694,144.695,144.696,144.697,144.698}
let ypts= {32.3793,32.3279,32.308,32.3972,32.3938,32.3958,32.3112,32.3924,32.309,32.3095,32.3828,32.3135,32.3861,32.385,32.3265,32.3264,32.3821,32.3772,32.355,32.3657,32.3691,32.3371,32.3495,32.3672,32.3458,32.3625,32.3604,32.3518,32.3643,32.3531}
 
set var/units=degrees_east/title="longitudes" xpts
set var/units=degrees_north/title="latitudes" ypts
 
plot/vs/set xpts, ypts
ppl xfor (dm)
ppl yfor (dm)
ppl plot
 
! DMS degrees-minutes-seconds
plot/vs/set xpts, ypts
ppl xfor (dms)
ppl yfor (dms)
ppl axlint,3,1
ppl plot
 
! Restore the default settings
ppl axlint,2,2
 
! Now do the same using command qualifiers /DEGMINSEC= /HALFSPAC  (ticket 2434)
!  /DEGMINSEC=1 for Deg-Min, =2 for Deg-Min-Sec. Default = 1
!  /HALFSPAC adds a half space between the degree sign and E/W or N/S
 
use ss_small
shade/x=222.9:223.1/y=58.22:59.1/DEGMIN rose
fill/x=222.9:223.1/y=58.22:59.1/DEGMIN=2 rose
plot/vs/DEGMIN=2 xpts, ypts
 
fill/x=222.9:223.1/y=58.22:59.1/HALFSP rose
plot/x=223./DEGMIN/HALFSP rose
plot/y=58.52/DEGMIN=2/HALFSP rose
plot/vs/HALFSP  xpts, ypts
*** Running ferret script: bn_dp_readscale.jnl
! bn_dp_readscale.jnl
! 9-Feb-2006 ACM
 
! When there is a double precision variable,
! and when the user specifies an offset, read the
! variable in double precision, apply the offset and
! then convert to single precision.  When plotting
! the user specifies the offset to add back to the
! axis labels.
 
set list/prec=8
 
use adouble.nc
 
list xax
             VARIABLE : test double prec. data
             FILENAME : adouble.nc
             SUBSET   : 10 points (X)
 1    /  1:  140.00000
 2    /  2:  140.00000
 3    /  3:  140.00000
 4    /  4:  140.00000
 5    /  5:  140.00000
 6    /  6:  140.00001
 7    /  7:  140.00010
 8    /  8:  140.00100
 9    /  9:  140.01000
 10   / 10:  140.10000
let xlon = 140
 
! Now read xax with an offset
set var/offset=`-1*xlon` xax
 !-> set var/offset=-140 xax
can mem
 
list xax
             VARIABLE : test double prec. data
             FILENAME : adouble.nc
             SUBSET   : 10 points (X)
 1    /  1:  0.000000000
 2    /  2:  0.000000001
 3    /  3:  0.000000010
 4    /  4:  0.000000100
 5    /  5:  0.000001000
 6    /  6:  0.000010000
 7    /  7:  0.000100000
 8    /  8:  0.001000000
 9    /  9:  0.010000000
 10   / 10:  0.100000000
 
! define an axis from xax
define axis/x/units=lon xir = xax
let pvar = yvar[gx=xir@asn]
 
! Plot, adding back the offset on axis labels.
plot/set/color=red/line/sym=22 pvar
ppl xvaloff `xlon`
 !-> ppl xvaloff 140
ppl plot
 
! Test a 2-D double precision variable
can data/all
use adouble_2D.nc
set var/offset=`-1*xlon` xax
 !-> set var/offset=-140 xax
list xax
             VARIABLE : test double prec. data
             FILENAME : adouble_2D.nc
             SUBSET   : 5 by 2 points (X-Y)
                1            2            3            4            5       
                1            2            3            4            5
 1   / 1:  0.000000000  0.000000001  0.000000010  0.000000100  0.000001000
 2   / 2:  0.000010000  0.000100000  0.001000000  0.010000000  0.100000000
 
cancel list/precision
*** Running ferret script: bn_bounds_defineax.jnl
! bn_bounds_defineax.jnl
! 3/22/2006
! Previously only allowed 2*N definition of bounds in DEFINE AXIS/BOUNDS
! Now allow N+1 definition of bounds, or three equal-lenght lists of
! coords, lo_bounds, hi_bounds
!
! Define an axis using bounds.  Note the coordinates need not be
! centered in the axis cells.
 
def axis/t/bounds tax={1.2, 2, 3.2, 5, 7, 8.4, 9}, {0.5,1.5, 1.5,2.5, 2.5,3.5, 3.5,6.5, 6.5,7.5, 7.5,8.5, 8.5,9.5}
list t[gt=tax], tboxlo[gt=tax], tboxhi[gt=tax], tbox[gt=tax]
             T: 0.5 to 9.5
 Column  1: T is T (axis TAX)
 Column  2: TBOXLO is TBOXLO (axis TAX)
 Column  3: TBOXHI is TBOXHI (axis TAX)
 Column  4: TBOX is TBOX (axis TAX)
             T  TBOXLO TBOXHI  TBOX
1.2 / 1:  1.200  0.500  1.500  1.000
2   / 2:  2.000  1.500  2.500  1.000
3.2 / 3:  3.200  2.500  3.500  1.000
5   / 4:  5.000  3.500  6.500  3.000
7   / 5:  7.000  6.500  7.500  1.000
8.4 / 6:  8.400  7.500  8.500  1.000
9   / 7:  9.000  8.500  9.500  1.000
 
def axis/t/bounds tax={1.2, 2, 3.2, 5, 7, 8.4, 9}, {0.5,1.5,2.5,3.5,6.5,7.5,8.5,9.5}
list t[gt=tax], tboxlo[gt=tax], tboxhi[gt=tax], tbox[gt=tax]
             T: 0.5 to 9.5
 Column  1: T is T (axis TAX)
 Column  2: TBOXLO is TBOXLO (axis TAX)
 Column  3: TBOXHI is TBOXHI (axis TAX)
 Column  4: TBOX is TBOX (axis TAX)
             T  TBOXLO TBOXHI  TBOX
1.2 / 1:  1.200  0.500  1.500  1.000
2   / 2:  2.000  1.500  2.500  1.000
3.2 / 3:  3.200  2.500  3.500  1.000
5   / 4:  5.000  3.500  6.500  3.000
7   / 5:  7.000  6.500  7.500  1.000
8.4 / 6:  8.400  7.500  8.500  1.000
9   / 7:  9.000  8.500  9.500  1.000
 
! test of DEPTH axis
 
def axis/x xax = {1,2,5,6,7,8}
def axis/z/depth/bounds zax = {0,20,50,75,120}, {0,10,30,60,90,150}
def axis/t tax = {1,2,9,10,11}
let v = x[gx=xax] +z[gz=zax] + t[gt=tax]
save/clobber/file=irrxzt.nc v
sp echo "bn_bounds_defineax.jnl --- N+1 def of bounds." >> all_ncdump.out
sp ncdump irrxzt.nc >> all_ncdump.out
 
! 3-argument bounds definitions
def axis/z/bounds zax={1,2,4,8,16,32,64,128}, {0.5,1.5,2.5,4.5,8.5,16.5,32.5,64.5}, {1.5,2.5,4.5,8.5,16.5,32.5,64.5,200}
list zboxlo[gz=zax], z[gz=zax], zboxhi[gz=zax]
             Z: 0.5 to 200
 Column  1: ZBOXLO is ZBOXLO (axis ZAX)
 Column  2: Z is Z (axis ZAX)
 Column  3: ZBOXHI is ZBOXHI (axis ZAX)
          ZBOXLO     Z   ZBOXHI
1     / 1:   0.50    1.0    1.5
2     / 2:   1.50    2.0    2.5
4     / 3:   2.50    4.0    4.5
8     / 4:   4.50    8.0    8.5
16    / 5:   8.50   16.0   16.5
32    / 6:  16.50   32.0   32.5
64    / 7:  32.50   64.0   64.5
128   / 8:  64.50  128.0  200.0
 
 
! define some new bounds by subsampling:
 
let n = `z[gz=zax],return=ksize`
 !-> DEFINE VARIABLE n = 8
 
! Note this syntax --let zl2 = zboxlo[gz=zax,k=1:`1+n-2`:2]--
! creates a new axis [gz=zax,k=1:`1+n-2`:2]
! and computes its zboxlo. Instead make varibles containing
! the bounds and sample those variables.
 
let boxlo = zboxlo[gz=zax]
let boxhi = zboxhi[gz=zax]
let zl2 = boxlo[k=1:`1+n-2`:2]
 !-> DEFINE VARIABLE zl2 = boxlo[k=1:7:2]
let zh2 = boxhi[k=2:`n`:2]
 !-> DEFINE VARIABLE zh2 = boxhi[k=2:8:2]
 
list  zl2,(zl2+zh2)/2,zh2
 WARNING: Listed variables have ambiguous coordinates on axes: Z
 Column  1: ZL2 is BOXLO[K=1:7:2]
 Column  2: EX#2 is (ZL2+ZH2)/2
 Column  3: ZH2 is BOXHI[K=2:8:2]
         ZL2   EX#2    ZH2
K / 1:   0.50    1.5    2.5
K / 2:   2.50    5.5    8.5
K / 3:   8.50   20.5   32.5
K / 4:  32.50  116.2  200.0
def axis/z/bounds zax2 = (zl2+zh2)/2, zl2, zh2
 
list zboxlo[gz=zax2], z[gz=zax2], zboxhi[gz=zax2]
             Z: 0.5 to 200
 Column  1: ZBOXLO is ZBOXLO (axis ZAX2)
 Column  2: Z is Z (axis ZAX2)
 Column  3: ZBOXHI is ZBOXHI (axis ZAX2)
          ZBOXLO     Z   ZBOXHI
1.5   / 1:   0.50    1.5    2.5
5.5   / 2:   2.50    5.5    8.5
20.5  / 3:   8.50   20.5   32.5
116.2 / 4:  32.50  116.2  200.0
 
use gt4d011
 
! define some new bounds by subsampling:
 
let n = `z[gz=temp],return=ksize`
 !-> DEFINE VARIABLE n = 27
 
let boxlo = zboxlo[gz=temp]
let boxhi = zboxhi[gz=temp]
let zl2 = boxlo[k=1:`1+n-2`:2]
 !-> DEFINE VARIABLE zl2 = boxlo[k=1:26:2]
let zh2 = boxhi[k=2:`n`:2]
 !-> DEFINE VARIABLE zh2 = boxhi[k=2:27:2]
 
list  zl2,(zl2+zh2)/2,zh2
 WARNING: Listed variables have ambiguous coordinates on axes: Z
             DATA SET: ./data/gt4d011.cdf
 Column  1: ZL2[Z=0:3174] is BOXLO[K=1:26:2]
 Column  2: EX#2 is (ZL2+ZH2)/2
 Column  3: ZH2[Z=0:4149] is BOXHI[K=2:27:2]
          ZL2   EX#2    ZH2
K /  1:     0.    10.    20.
K /  2:    20.    30.    40.
K /  3:    40.    50.    60.
K /  4:    60.    70.    80.
K /  5:    80.    90.   100.
K /  6:   100.   114.   128.
K /  7:   128.   146.   165.
K /  8:   165.   192.   220.
K /  9:   220.   268.   317.
K / 10:   317.   438.   559.
K / 11:   559.   858.  1158.
K / 12:  1158.  1678.  2199.
K / 13:  2199.  2849.  3499.
def axis/z/bounds zax2 = (zl2+zh2)/2, zl2, zh2
 
! original axis
list zboxlo[gz=temp], z[gz=temp], zboxhi[gz=temp]
             DATA SET: ./data/gt4d011.cdf
             DEPTH (m): 0 to 4149
 Column  1: ZBOXLO is ZBOXLO (axis PSZT)
 Column  2: Z is Z (axis PSZT)
 Column  3: ZBOXHI is ZBOXHI (axis PSZT)
             ZBOXLO     Z   ZBOXHI
5       /  1:     0.     5.    10.
15      /  2:    10.    15.    20.
25      /  3:    20.    25.    30.
35      /  4:    30.    35.    40.
45      /  5:    40.    45.    50.
55      /  6:    50.    55.    60.
65      /  7:    60.    65.    70.
75      /  8:    70.    75.    80.
85      /  9:    80.    85.    90.
95      / 10:    90.    95.   100.
106.2   / 11:   100.   106.   112.
120     / 12:   112.   120.   128.
136.2   / 13:   128.   136.   145.
155     / 14:   145.   155.   165.
177.5   / 15:   165.   178.   190.
205     / 16:   190.   205.   220.
240     / 17:   220.   240.   260.
288.5   / 18:   260.   288.   317.
362.5   / 19:   317.   362.   408.
483.5   / 20:   408.   484.   559.
680     / 21:   559.   680.   801.
979.5   / 22:   801.   980.  1158.
1395.5  / 23:  1158.  1396.  1633.
1916    / 24:  1633.  1916.  2199.
2524    / 25:  2199.  2524.  2849.
3174    / 26:  2849.  3174.  3499.
3824    / 27:  3499.  3824.  4149.
 
! sampled axis
list zboxlo[gz=zax2], z[gz=zax2], zboxhi[gz=zax2]
             Z: 0 to 3499
 Column  1: ZBOXLO is ZBOXLO (axis ZAX2)
 Column  2: Z is Z (axis ZAX2)
 Column  3: ZBOXHI is ZBOXHI (axis ZAX2)
            ZBOXLO     Z   ZBOXHI
10     /  1:     0.    10.    20.
30     /  2:    20.    30.    40.
50     /  3:    40.    50.    60.
70     /  4:    60.    70.    80.
90     /  5:    80.    90.   100.
113.8  /  6:   100.   114.   128.
146.2  /  7:   128.   146.   165.
192.5  /  8:   165.   192.   220.
268.5  /  9:   220.   268.   317.
438    / 10:   317.   438.   559.
858.5  / 11:   559.   858.  1158.
1678.5 / 12:  1158.  1678.  2199.
2849   / 13:  2199.  2849.  3499.
*** Running ferret script: bn_attributes.jnl
! bn_attributes
! test attribute handling on netcdf intput/output and
! programatic access to attribute information
! needs new cdf files modfalse.nc, test0.nc
 
! 31Aug2006 ACM Remove OPeNDAP references; not essential to the
! benchmark tests.
 
! small addition below 1/17 *sh*
 
!-----
 
! SHOW ATTRIBUTE examples
 
can data/all
can var/all
 
use ocean_atlas_temp
sho att/all temp
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 TEMP.missing_value = -1.E+34
 TEMP._FillValue = -1.E+34
 TEMP.long_name = Temperature 
 TEMP.history = From ocean_atlas_monthly 
 TEMP.units = Deg C 
 
show attribute temp.units
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 TEMP.units = Deg C 
show attribute temp.missing_value
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 TEMP.missing_value = -1.E+34
 
!  specifying data set
 
use gt4d011
use levitus_climatology
 
sh att/all temp[d=2]
     attributes for dataset: ./data/gt4d011.cdf
 TEMP.parent_grid = PS3DT2 
 TEMP.slab_min_index = 91, 35, 1, 0
 TEMP.slab_max_index = 108, 56, 10, 0
 TEMP.missing_value = -1.E+34
 TEMP._FillValue = -1.E+34
 TEMP.long_name = TEMPERATURE 
 TEMP.history = From gt4d011 
 TEMP.units = deg. C 
sh att temp.units[d=1]
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 TEMP.units = Deg C 
 
!  global attributes
use err491_attval
 
show att ..remark
     attributes for dataset: ./data/err491_attval.cdf
  .remark = Generated by oar3d                                                                                                                                               
show att/all .
     attributes for dataset: ./data/err491_attval.cdf
 ..simulation = K-Bay OAR3d model (200m) 
 ..start_date = 980105000000 
 ..history = a
 
 ..option = 1
 ..run_mode = 3
 ..srfc_bndry = 3
 ..rad_penet = 2
 ..dt_external = 1
 ..dt_internal = 15
 ..horiz_diff = 0.2
 ..inv_prandtl = 0.2
 ..min_slope = 0.2
 ..title = K-Bay OAR3d model (200m)                                                         
 ..command =                                                                                                                                                                                                                                                                                                                                  
 ..remark = Generated by oar3d                                                                                                                                               
 ..x_units = degrees                                                                          
 ..y_units = degrees                                                                          
 ..z_units =                                                                                  
 ..nx = 35
 ..ny = 127
 ..x_min = 0
 ..x_max = 0
 ..y_min = 0
 ..y_max = 0
 ..z_min = 0
 ..z_max = 0
 ..x_inc = 0
 ..y_inc = 0
 ..z_scale_factor = 0
 ..z_add_offset = 0
 ..node_offset = 0
 
sho att/all .[d=1]
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 ..history = FERRET V4.90 (GUI) 04-Feb-98 
 
!  Now SHOW DATA/ATT
 
can data/all
use ocean_atlas_temp
sho data/att
     currently SET data sets:
    1> ./data/ocean_atlas_temp.cdf  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        28   T       FERRET V4.90 (GUI) 04-Feb-98
  
(XAX_LEV9421_380)      DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        15   F       XAX_LEV9421_380
  
(YAX_LEV94)            DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        9    F       YAX_LEV94
  
(ZAXLEVIT191_1)        DOUBLE    units           CHAR        6    T       METERS
                                 positive        CHAR        4    T       down
                                 orig_file_axname
                                                 CHAR        13   F       ZAXLEVIT191_1
  
(TIME)                 DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          CHAR        1    T
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 TEMP                  FLOAT     missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        11   T       Temperature
                                 history         CHAR        24   T       From ocean_atlas_monthly
                                 units           CHAR        5    T       Deg C
  
 
use gt4d011
use levitus_climatology
 
sh data/att gt4d011
     currently SET data sets:
    2> ./data/gt4d011.cdf
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        28   T       FERRET V4.45 (GUI) 21-Apr-97
  
 PS3DT2                CHAR      axes            CHAR        20   F       PSXT PSYT PSZT TIME1
  
(PSXT)                 DOUBLE    units           CHAR        12   T       degrees_east
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        4    F       PSXT
  
(PSYT)                 DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        6    T       uneven
                                 edges           CHAR        9    F       PSYTedges
                                 orig_file_axname
                                                 CHAR        4    F       PSYT
  
(PSYTedges)            DOUBLE    edges           CHAR        1    F
                                 orig_file_axname
                                                 CHAR        9    F       PSYTedges
  
(PSZT)                 DOUBLE    units           CHAR        6    T       METERS
                                 positive        CHAR        4    T       down
                                 point_spacing   CHAR        6    T       uneven
                                 edges           CHAR        9    F       PSZTedges
                                 orig_file_axname
                                                 CHAR        4    F       PSZT
  
(PSZTedges)            DOUBLE    edges           CHAR        1    F
                                 orig_file_axname
                                                 CHAR        9    F       PSZTedges
  
(TIME1)                DOUBLE    units           CHAR        30   T       hour since 1980-01-14 14:00:00
                                 time_origin     CHAR        20   T       14-JAN-1980 14:00:00
                                 orig_file_axname
                                                 CHAR        5    F       TIME1
  
(PSXT91_108)           DOUBLE    child_axis      CHAR        1    F
                                 units           CHAR        12   T       degrees_east
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        10   F       PSXT91_108
  
(PSYT35_56)            DOUBLE    child_axis      CHAR        1    F
                                 units           CHAR        13   T       degrees_north
                                 orig_file_axname
                                                 CHAR        9    F       PSYT35_56
  
(PSZT1_10)             DOUBLE    child_axis      CHAR        1    F
                                 units           CHAR        6    T       METERS
                                 positive        CHAR        4    T       down
                                 orig_file_axname
                                                 CHAR        8    F       PSZT1_10
  
 TEMP                  FLOAT     parent_grid     CHAR        6    F       PS3DT2
                                 slab_min_index  INT         4    F       91 35 1 0
                                 slab_max_index  INT         4    F       108 56 10 0
                                 missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        11   T       TEMPERATURE
                                 history         CHAR        12   T       From gt4d011
                                 units           CHAR        6    T       deg. C
  
(PSYT35_55)            DOUBLE    child_axis      CHAR        1    F
                                 units           CHAR        13   T       degrees_north
                                 orig_file_axname
                                                 CHAR        9    F       PSYT35_55
  
 SALT                  FLOAT     parent_grid     CHAR        6    F       PS3DT2
                                 slab_min_index  INT         4    F       91 35 1 0
                                 slab_max_index  INT         4    F       108 55 10 0
                                 missing_value   FLOAT       1    T       0.01
                                 _FillValue      FLOAT       1    T       0.01
                                 long_name       CHAR        26   T       (SALINITY(ppt) - 35) /1000
                                 history         CHAR        12   T       From gt4d011
                                 units           CHAR        22   T       frac. by wt. less .035
  
 PS3DU2                CHAR      axes            CHAR        20   F       PSXU PSYU PSZT TIME1
  
(PSXU)                 DOUBLE    units           CHAR        12   T       degrees_east
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        4    F       PSXU
  
(PSYU)                 DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        6    T       uneven
                                 edges           CHAR        9    F       PSYUedges
                                 orig_file_axname
                                                 CHAR        4    F       PSYU
  
(PSYUedges)            DOUBLE    edges           CHAR        1    F
                                 orig_file_axname
                                                 CHAR        9    F       PSYUedges
  
(PSXU91_108)           DOUBLE    child_axis      CHAR        1    F
                                 units           CHAR        12   T       degrees_east
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        10   F       PSXU91_108
  
(PSYU35_55)            DOUBLE    child_axis      CHAR        1    F
                                 units           CHAR        13   T       degrees_north
                                 orig_file_axname
                                                 CHAR        9    F       PSYU35_55
  
 U                     FLOAT     parent_grid     CHAR        6    F       PS3DU2
                                 slab_min_index  INT         4    F       91 35 1 0
                                 slab_max_index  INT         4    F       108 55 10 0
                                 missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        14   T       ZONAL VELOCITY
                                 history         CHAR        12   T       From gt4d011
                                 units           CHAR        6    T       cm/sec
  
 V                     FLOAT     parent_grid     CHAR        6    F       PS3DU2
                                 slab_min_index  INT         4    F       91 35 1 0
                                 slab_max_index  INT         4    F       108 55 10 0
                                 missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        19   T       MERIDIONAL VELOCITY
                                 history         CHAR        12   T       From gt4d011
                                 units           CHAR        6    T       cm/sec
  
 PS3DW2                CHAR      axes            CHAR        20   F       PSXT PSYT PSZW TIME1
  
(PSZW)                 DOUBLE    units           CHAR        6    T       METERS
                                 positive        CHAR        4    T       down
                                 point_spacing   CHAR        6    T       uneven
                                 edges           CHAR        9    F       PSZWedges
                                 orig_file_axname
                                                 CHAR        4    F       PSZW
  
(PSZWedges)            DOUBLE    edges           CHAR        1    F
                                 orig_file_axname
                                                 CHAR        9    F       PSZWedges
  
(PSYT36_55)            DOUBLE    child_axis      CHAR        1    F
                                 units           CHAR        13   T       degrees_north
                                 orig_file_axname
                                                 CHAR        9    F       PSYT36_55
  
(PSZW1_10)             DOUBLE    child_axis      CHAR        1    F
                                 units           CHAR        6    T       METERS
                                 positive        CHAR        4    T       down
                                 orig_file_axname
                                                 CHAR        8    F       PSZW1_10
  
 W                     FLOAT     parent_grid     CHAR        6    F       PS3DW2
                                 slab_min_index  INT         4    F       91 36 1 0
                                 slab_max_index  INT         4    F       108 55 10 0
                                 missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        17   T       VERTICAL VELOCITY
                                 history         CHAR        12   T       From gt4d011
                                 units           CHAR        6    T       cm/sec
  
 PS2DU2                CHAR      axes            CHAR        22   F       PSXU PSYU NORMAL TIME1
  
 TAUX                  FLOAT     parent_grid     CHAR        6    F       PS2DU2
                                 slab_min_index  INT         4    F       91 35 1 0
                                 slab_max_index  INT         4    F       108 55 1 0
                                 missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        17   T       ZONAL WIND STRESS
                                 history         CHAR        12   T       From gt4d011
                                 units           CHAR        11   T       dynes/cm**2
  
 TAUY                  FLOAT     parent_grid     CHAR        6    F       PS2DU2
                                 slab_min_index  INT         4    F       91 35 1 0
                                 slab_max_index  INT         4    F       108 55 1 0
                                 missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        22   T       MERIDIONAL WIND STRESS
                                 history         CHAR        12   T       From gt4d011
                                 units           CHAR        11   T       dynes/cm**2
  
(PSYU35_56)            DOUBLE    child_axis      CHAR        1    F
                                 units           CHAR        13   T       degrees_north
                                 orig_file_axname
                                                 CHAR        9    F       PSYU35_56
  
 PSI                   FLOAT     parent_grid     CHAR        6    F       PS2DU2
                                 slab_min_index  INT         4    F       91 35 1 0
                                 slab_max_index  INT         4    F       108 56 1 0
                                 missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        15   T       STREAM FUNCTION
                                 history         CHAR        12   T       From gt4d011
                                 units           CHAR        9    T       cm**3/sec
  
 
!  error messages
 
set mode ignore
 
! no argument
sho att/all
 
! dataset not open
can data 2
show att/all temp[d=2]
 
! variable not in default dataset
use ocean_atlas_temp
show att/all salt
 
! nonexistent attribute
use gt4d011
sho att salt.nonsense
 
can data/all
 
! No datasets open
sho att/all .
 
can mode ignore
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
!-----
! attributes of string variables
let/title="my strings" var_b = {"Seattle", "Skykomish", "Snoqualmie"}
sho att/all var_b
     attributes for user-defined variables
 var_b.long_name = my strings 
 var_b.missing_value = -1.E+34
 
save/clobber/file=a.nc var_b
sp echo "bn_attributes.jnl --- 1 attributes of string variables" >> all_ncdump.out
sp ncdump a.nc >> all_ncdump.out
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
!-----
! Demonstrate `var,return=` output for attributes
 
use gt4d011
 
! RETURN=size gives length of attribute:
! # values for numeric attributes
! string length for string attributes
 
show att/all temp
     attributes for dataset: ./data/gt4d011.cdf
 TEMP.parent_grid = PS3DT2 
 TEMP.slab_min_index = 91, 35, 1, 0
 TEMP.slab_max_index = 108, 56, 10, 0
 TEMP.missing_value = -1.E+34
 TEMP._FillValue = -1.E+34
 TEMP.long_name = TEMPERATURE 
 TEMP.history = From gt4d011 
 TEMP.units = deg. C 
 
say `temp.2,return=size`
 !-> MESSAGE/CONTINUE 4
4
say `temp.6,return=size`
 !-> MESSAGE/CONTINUE 11
11
 
say `..history,return=size`
 !-> MESSAGE/CONTINUE 28
28
 
! test0 is from the netcdf distribution;
! vars and attrs of all types
use test0
say `broiled.acd,return=size`
 !-> MESSAGE/CONTINUE 2
2
say `broiled.acf,return=size`
 !-> MESSAGE/CONTINUE 3
3
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
!-----
! define variables to contain attribute value(s)
 
use ocean_atlas_temp
let a = temp.missing_value
list a
             VARIABLE : TEMP.MISSING_VALUE
             FILENAME : ocean_atlas_temp.cdf
             X        : 1
         -1.000E+34
 
use ocean_atlas_temp
let s = temp.units
list s
             VARIABLE : TEMP.UNITS
             FILENAME : ocean_atlas_temp.cdf
             X        : 1
        "Deg C"
 
can data/all
 
! global attribute
use err491_attval
let s = ..remark
list s
             VARIABLE : ..REMARK
             DATA SET : K-Bay OAR3d model (200m)
             FILENAME : err491_attval.cdf
             X        : 1
        "Generated by oar3d                                                                                                                                              "
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
!-----
! Variables containing number of variables, attributes, dimensions,
! lists of variable names, attribute names, coordinate variables,
! global attribute names
 
! Given a variable, return the attribute names
use coads_climatology
let nat = sst.nattrs
 
let anames = sst.attnames
list nat
             VARIABLE : SST.NATTRS
             FILENAME : coads_climatology.cdf
             X        : 1
          5.000
list anames
             VARIABLE : SST.ATTNAMES
             FILENAME : coads_climatology.cdf
             SUBSET   : 5 points (X)
 1   / 1:"missing_value"
 2   / 2:"_FillValue"   
 3   / 3:"long_name"    
 4   / 4:"history"      
 5   / 5:"units"        
 
! Given a variable, return the coordinate number and names
let nd = sst.ndims
let cnames = sst.dimnames
list nd
             VARIABLE : SST.NDIMS
             FILENAME : coads_climatology.cdf
             X        : 1
          3.000
list cnames
             VARIABLE : SST.DIMNAMES
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (X)
 1   / 1:"COADSX"
 2   / 2:"COADSY"
 3   / 3:"TIME"  
 
! ..varnames
can data/all
use gt4d011
use coads_climatology
 
let nv = ..nvars
let nd = ..ndims
let vnames = ..varnames
list/d=1 nv, nd
             DATA SET: ./data/gt4d011.cdf
             X: 1
 Column  1: NV is ..NVARS
 Column  2: ND is ..NDIMS
             NV    ND
I / *:     12.00  21.00
list/d=1 vnames
             VARIABLE : ..VARNAMES
             FILENAME : gt4d011.cdf
             SUBSET   : 12 points (X)
 1    /  1:"PS3DT2"
 2    /  2:"TEMP"  
 3    /  3:"SALT"  
 4    /  4:"PS3DU2"
 5    /  5:"U"     
 6    /  6:"V"     
 7    /  7:"PS3DW2"
 8    /  8:"W"     
 9    /  9:"PS2DU2"
 10   / 10:"TAUX"  
 11   / 11:"TAUY"  
 12   / 12:"PSI"   
 
let vnames = ..varnames
list/d=coads_climatology vnames
             VARIABLE : ..VARNAMES
             FILENAME : coads_climatology.cdf
             X        : 1
        "SST"
list/d=gt4d011 vnames
             VARIABLE : ..VARNAMES
             FILENAME : gt4d011.cdf
             SUBSET   : 12 points (X)
 1    /  1:"PS3DT2"
 2    /  2:"TEMP"  
 3    /  3:"SALT"  
 4    /  4:"PS3DU2"
 5    /  5:"U"     
 6    /  6:"V"     
 7    /  7:"PS3DW2"
 8    /  8:"W"     
 9    /  9:"PS2DU2"
 10   / 10:"TAUX"  
 11   / 11:"TAUY"  
 12   / 12:"PSI"   
 
can data/all
can var/all
 
! global ..dimnames
 
use coads_climatology
use gt4d011
 
let vnames = ..dimnames[d=1]
let lnames = ..dimnames[d=2]
list vnames
             VARIABLE : ..DIMNAMES[D=coads_climatology]
             SUBSET   : 3 points (X)
 1   / 1:"COADSX"
 2   / 2:"COADSY"
 3   / 3:"TIME"  
list lnames
             VARIABLE : ..DIMNAMES[D=gt4d011]
             SUBSET   : 21 points (X)
 1    /  1:"grid_definition"
 2    /  2:"PSXT"           
 3    /  3:"PSYT"           
 4    /  4:"PSYTedges"      
 5    /  5:"PSZT"           
 6    /  6:"PSZTedges"      
 7    /  7:"TIME1"          
 8    /  8:"PSXT91_108"     
 9    /  9:"PSYT35_56"      
 10   / 10:"PSZT1_10"       
 11   / 11:"PSYT35_55"      
 12   / 12:"PSXU"           
 13   / 13:"PSYU"           
 14   / 14:"PSYUedges"      
 15   / 15:"PSXU91_108"     
 16   / 16:"PSYU35_55"      
 17   / 17:"PSZW"           
 18   / 18:"PSZWedges"      
 19   / 19:"PSYT36_55"      
 20   / 20:"PSZW1_10"       
 21   / 21:"PSYU35_56"      
 
can var/all
can data/all
 
! Global attributes ..attnames
use err491_attval
 
let v = ..ndims
list v
             VARIABLE : ..NDIMS
             DATA SET : K-Bay OAR3d model (200m)
             FILENAME : err491_attval.cdf
             X        : 1
          3.000
 
let na = ..nattrs
list na
             VARIABLE : ..NATTRS
             DATA SET : K-Bay OAR3d model (200m)
             FILENAME : err491_attval.cdf
             X        : 1
          31.00
 
let gnames = ..attnames
list gnames
             VARIABLE : ..ATTNAMES
             DATA SET : K-Bay OAR3d model (200m)
             FILENAME : err491_attval.cdf
             SUBSET   : 31 points (X)
 1    /  1:"simulation"    
 2    /  2:"start_date"    
 3    /  3:"history"       
 4    /  4:"option"        
 5    /  5:"run_mode"      
 6    /  6:"srfc_bndry"    
 7    /  7:"rad_penet"     
 8    /  8:"dt_external"   
 9    /  9:"dt_internal"   
 10   / 10:"horiz_diff"    
 11   / 11:"inv_prandtl"   
 12   / 12:"min_slope"     
 13   / 13:"title"         
 14   / 14:"command"       
 15   / 15:"remark"        
 16   / 16:"x_units"       
 17   / 17:"y_units"       
 18   / 18:"z_units"       
 19   / 19:"nx"            
 20   / 20:"ny"            
 21   / 21:"x_min"         
 22   / 22:"x_max"         
 23   / 23:"y_min"         
 24   / 24:"y_max"         
 25   / 25:"z_min"         
 26   / 26:"z_max"         
 27   / 27:"x_inc"         
 28   / 28:"y_inc"         
 29   / 29:"z_scale_factor"
 30   / 30:"z_add_offset"  
 31   / 31:"node_offset"   
 
! attributes of variable number 2
 
use ocean_atlas_temp
use gt4d011
let names = ..varnames
let anames = `names[i=2]`.attnames
 !-> DEFINE VARIABLE anames = TEMP.attnames
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
 
!-----
! more on number of attributes
 
can data/all
can var/all
 
use ocean_atlas_temp
let nat = temp.nattrs
list nat
             VARIABLE : TEMP.NATTRS
             FILENAME : ocean_atlas_temp.cdf
             X        : 1
          5.000
 
list (`temp,return=xaxis`).nattrs
 !-> list (XAX_LEV9421_380).nattrs
             VARIABLE : (XAX_LEV9421_380).NATTRS
             FILENAME : ocean_atlas_temp.cdf
             X        : 1
          4.000
 
use gt4d011
say `temp.nattrs[d=1]`
 !-> MESSAGE/CONTINUE 5
5
 
def sym xaxnam  "(`temp[d=1],return=xaxis`)"
 !-> def sym xaxnam  "(XAX_LEV9421_380)"
list `($xaxnam).nattrs[d=1]`
 !-> list 4
             VARIABLE : constant
          4.000
 
say `(yax_lev94).nattrs[d=1]`
 !-> MESSAGE/CONTINUE 3
3
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
!-----
! more on access to attribute names and values as variables
 
use coads_climatology
use levitus_climatology
use ocean_atlas_temp
use gt4d011
 
let a = temp.units
list/d=3 a
             VARIABLE : TEMP.UNITS
             FILENAME : ocean_atlas_temp.cdf
             X        : 1
        "Deg C"
 
list temp.units[d=3]
             VARIABLE : TEMP.UNITS[D=ocean_atlas_temp]
             FILENAME : ocean_atlas_temp.cdf
        "Deg C"
list/d=3 temp.history
             VARIABLE : TEMP.HISTORY
             FILENAME : ocean_atlas_temp.cdf
        "From ocean_atlas_monthly"
 
can data/all
can var/all
 
use test0.nc
sh data/att
     currently SET data sets:
    1> ./data/test0.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               glob            CHAR        16   F       Global attribute
  
 broiled               CHAR      act             CHAR        16   F       text string
	123
                                 acb             BYTE        1    F       10
                                 acs             SHORT       1    F       -200
                                 acl             INT         1    F       17000
                                 acf             FLOAT       3    F       -2 1 0
                                 acd             DOUBLE      2    F       -1 2.718282
  
 the_bullet            BYTE
  
 order                 SHORT
  
 rigue                 INT
  
 a_loan                FLOAT
  
 entendre              DOUBLE
  
 cscalar               CHAR
  
 dscalar               DOUBLE
  
 cnodata               CHAR
  
 bnodata               BYTE
  
 snodata               SHORT
  
 inodata               INT
  
 fnodata               FLOAT
  
 dnodata               DOUBLE
  
(i)                    INT       orig_file_axname
                                                 CHAR        1    F       i
  
(j)                    FLOAT     orig_file_axname
                                                 CHAR        1    F       j
  
(L)                    BYTE      orig_file_axname
                                                 CHAR        1    F       l
  
 
let a= broiled.acl
list a
             VARIABLE : BROILED.ACL
             FILENAME : test0.nc
             X        : 1
          17000.
 
let a= broiled.acf
list a
             VARIABLE : BROILED.ACF
             FILENAME : test0.nc
             SUBSET   : 3 points (X)
 1   / 1: -2.000
 2   / 2:  1.000
 3   / 3:  0.000
 
list/i=2 a
             VARIABLE : BROILED.ACF
             FILENAME : test0.nc
             X        : 2
          1.000
 
list a[i=2:3]
             VARIABLE : BROILED.ACF
             FILENAME : test0.nc
             SUBSET   : 2 points (X)
 2   / 2:  1.000
 3   / 3:  0.000
 
use coads_climatology
list sst.dimnames[i=2]
             VARIABLE : SST.DIMNAMES[I=2]
             FILENAME : coads_climatology.cdf
             X        : 2
        "COADSY"
 
list/i=3 sst.dimnames
             VARIABLE : SST.DIMNAMES
             FILENAME : coads_climatology.cdf
             X        : 3
        "TIME"
let a= sst.dimnames
 
list a
             VARIABLE : SST.DIMNAMES
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (X)
 1   / 1:"COADSX"
 2   / 2:"COADSY"
 3   / 3:"TIME"  
list a[i=1]
             VARIABLE : SST.DIMNAMES
             FILENAME : coads_climatology.cdf
             X        : 1
        "COADSX"
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
!-----
! keyword . to refer to global properties and attributes
 
use gt4d011
list ..nvars
             VARIABLE : ..NVARS
             FILENAME : gt4d011.cdf
             X        : 1
          12.00
 
use coads_climatology
 
list/d=1 ..nvars
             VARIABLE : ..NVARS
             FILENAME : gt4d011.cdf
             X        : 1
          12.00
list/d=2 ..nvars
             VARIABLE : ..NVARS
             FILENAME : coads_climatology.cdf
             X        : 1
          1.000
 
sh data
     currently SET data sets:
    1> ./data/gt4d011.cdf
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                     91:108    35:56      1:10      1:25
 SALT     (SALINITY(ppt) - 35) /1000      91:108    35:55      1:10      1:25
 U        ZONAL VELOCITY                  91:108    35:55      1:10      1:25
 V        MERIDIONAL VELOCITY             91:108    35:55      1:10      1:25
 W        VERTICAL VELOCITY               91:108    36:55      1:10      1:25
 TAUX     ZONAL WIND STRESS               91:108    35:55      ...       1:25
 TAUY     MERIDIONAL WIND STRESS          91:108    35:55      ...       1:25
 PSI      STREAM FUNCTION                 91:108    35:56      ...       1:25
 
    2> ./data/coads_climatology.cdf  (default)
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:3
 
list/d=2 ..varnames
             VARIABLE : ..VARNAMES
             FILENAME : coads_climatology.cdf
        "SST"
 
list/d=2 ..dimnames
             VARIABLE : ..DIMNAMES
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (X)
 1   / 1:"COADSX"
 2   / 2:"COADSY"
 3   / 3:"TIME"  
list/d=1 ..dimnames
             VARIABLE : ..DIMNAMES
             FILENAME : gt4d011.cdf
             SUBSET   : 21 points (X)
 1    /  1:"grid_definition"
 2    /  2:"PSXT"           
 3    /  3:"PSYT"           
 4    /  4:"PSYTedges"      
 5    /  5:"PSZT"           
 6    /  6:"PSZTedges"      
 7    /  7:"TIME1"          
 8    /  8:"PSXT91_108"     
 9    /  9:"PSYT35_56"      
 10   / 10:"PSZT1_10"       
 11   / 11:"PSYT35_55"      
 12   / 12:"PSXU"           
 13   / 13:"PSYU"           
 14   / 14:"PSYUedges"      
 15   / 15:"PSXU91_108"     
 16   / 16:"PSYU35_55"      
 17   / 17:"PSZW"           
 18   / 18:"PSZWedges"      
 19   / 19:"PSYT36_55"      
 20   / 20:"PSZW1_10"       
 21   / 21:"PSYU35_56"      
 
list/d=1 ..nattrs
             VARIABLE : ..NATTRS
             FILENAME : gt4d011.cdf
             X        : 1
          1.000
list/d=1 ..attnames
             VARIABLE : ..ATTNAMES
             FILENAME : gt4d011.cdf
        "history"
 
list/d=1 ..ndims
             VARIABLE : ..NDIMS
             FILENAME : gt4d011.cdf
             X        : 1
          21.00
list/d=2 ..ndims
             VARIABLE : ..NDIMS
             FILENAME : coads_climatology.cdf
             X        : 1
          3.000
 
list ..nvars[d=1]
             VARIABLE : ..NVARS[D=gt4d011]
             FILENAME : gt4d011.cdf
             X        : 1
          12.00
sh var
 Created by DEFINE VARIABLE:
 
let pp = ..varnames
list pp[d=1]
             VARIABLE : ..VARNAMES
             FILENAME : gt4d011.cdf
             SUBSET   : 12 points (X)
 1    /  1:"PS3DT2"
 2    /  2:"TEMP"  
 3    /  3:"SALT"  
 4    /  4:"PS3DU2"
 5    /  5:"U"     
 6    /  6:"V"     
 7    /  7:"PS3DW2"
 8    /  8:"W"     
 9    /  9:"PS2DU2"
 10   / 10:"TAUX"  
 11   / 11:"TAUY"  
 12   / 12:"PSI"   
 
set data 1
list/d=2 pp
             VARIABLE : ..VARNAMES
             FILENAME : coads_climatology.cdf
             X        : 1
        "SST"
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
!-----
! Editing attributes: add new attributes to a variable.
 
use ocean_atlas_temp
def att/type=string temp.strval = 2
def att/type=float temp.floatval = 22
def att temp.pp = {1.5, 1.9}
def att temp.some_text = "some text about the TEMP variable"
sh att/all temp
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 TEMP.missing_value = -1.E+34
 TEMP._FillValue = -1.E+34
 TEMP.long_name = Temperature 
 TEMP.history = From ocean_atlas_monthly 
 TEMP.units = Deg C 
 TEMP.strval = 2 
 TEMP.floatval = 22
 TEMP.pp = 1.5, 1.9
 TEMP.some_text = some text about the TEMP variable 
 
! Now change some existing attributes (this redefines
! the attribute, behaving like DEFINE AXIS...)
 
def att temp.pp = {1.5, 1.9, 3.45, 7}
def att temp.some_text = "some different text"
sh att temp.pp
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 TEMP.pp = 1.5, 1.9, 3.45, 7
let var = temp.some_text
list/nohead var
        "some different text"
 
! add an attribute to a variable not in the default dataset
 
use gt4d011
def att/D=1 temp.morenew = 2
sh att/all temp[d=1]
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 TEMP.missing_value = -1.E+34
 TEMP._FillValue = -1.E+34
 TEMP.long_name = Temperature 
 TEMP.history = From ocean_atlas_monthly 
 TEMP.units = Deg C 
 TEMP.strval = 2 
 TEMP.floatval = 22
 TEMP.pp = 1.5, 1.9, 3.45, 7
 TEMP.some_text = some different text 
 TEMP.morenew = 2
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
!-----
! Edit existing attributes on variables
 
use ocean_atlas_temp
sh att/all temp
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 TEMP.missing_value = -1.E+34
 TEMP._FillValue = -1.E+34
 TEMP.long_name = Temperature 
 TEMP.history = From ocean_atlas_monthly 
 TEMP.units = Deg C 
set att temp.long_name = "set title via SET ATT temp.longname"
set att temp.units = "Centigrade"
plot/y=0/l=1 temp
 
! two settings of the missing value change both the missing and bad flags
set att temp.missing_value = 12
set att temp.missing_value = 12
shade/L=2 temp
 
!-----
! access and edit attributes of coordinate variables.
! Specify names of coord variables inside parentheses
 
use ocean_atlas_temp
use coads_climatology
 
! Get attributes of a coordinate variable
 
list (coadsx).units
             VARIABLE : (COADSX).UNITS
             FILENAME : coads_climatology.cdf
        "degrees_east"
list (coadsx).modulo
             VARIABLE : (COADSX).MODULO
             FILENAME : coads_climatology.cdf
        " "
sho att/all (coadsx)
     attributes for dataset: ./data/coads_climatology.cdf
 (COADSX).units = degrees_east 
 (COADSX).modulo =   
 (COADSX).point_spacing = even 
 (COADSX).orig_file_axname = COADSX 
 
! Set the attribute output flag
 
set att/output (coadsx).modulo
 
! Define a new attribute on a coordinate axis
 
define att (`sst,return=xaxis`).newatt = 3
 !-> define att (COADSX).newatt = 3
set att/output (`sst,return=xaxis`).newatt
 !-> set att/output (COADSX).newatt
save/clobber/file=a.nc/x=130w/y=0 sst
 
sp echo "bn_attributes.jnl --- 2 access and edit attributes of coordinate variables." >> all_ncdump.out
sp ncdump -c a.nc >> all_ncdump.out
 
! modfalse.nc is a file with modulo attribute on x axis
! explicitly set to FALSE
 
use modfalse.nc
set att/output (`sst,return=xaxis`).modulo
 !-> set att/output (COADSX81_81).modulo
save/clobber/file=a.nc sst
sp echo "bn_attributes.jnl --- 3 modulo set to false" >> all_ncdump.out
sp ncdump -c a.nc >> all_ncdump.out
 
! Reset attributes as in SET AXIS
 
use gt4d011
set view left; shade/y=0/L=1 temp
set att (`temp,return=zaxis`).positive="up"
 !-> set att (PSZT).positive="up"
set view right; shade/y=0/L=1 temp
can data gt4d011
 
set data coads_climatology
sho att (coadsx).modulo
     attributes for dataset: ./data/coads_climatology.cdf
 (COADSX).modulo =   
set att (coadsx).modulo=360
 
! Note here that Ferret is using the name TIME1 instead of TIME.
! axis still found and edited.
 
set att (`sst,return=taxis`).time_origin="1-jan-1980"
 !-> set att (TIME1).time_origin="1-jan-1980"
list/x=130w/y=0 sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (TIME)
             LONGITUDE: 131W
             LATITUDE : 1S
                   131W   
                   105
 16-JAN-1980 / 1:  25.02
 15-FEB-1980 / 2:  26.35
 17-MAR-1980 / 3:  26.98
 
!(coordvar).attname[d=1]
! Can have the parentheses included in a symbol
 
def sym xaxnam  "(`temp[d=1],return=xaxis`)"
 !-> def sym xaxnam  "(XAX_LEV9421_380)"
list `($xaxnam).nattrs[d=1]`
 !-> list 4
             VARIABLE : constant
          4.000
 
! Or parentheses added when symbol is evaluated
def sym yaxnam  "`temp[d=1],return=yaxis`"
 !-> def sym yaxnam  "YAX_LEV94"
list `(($yaxnam)).nattrs[d=1]`
 !-> list 3
             VARIABLE : constant
          3.000
 
! just the name of the axis
list (`sst,return=xaxis`).nattrs[d=2]
 !-> list (COADSX).nattrs[d=2]
             VARIABLE : (COADSX).NATTRS[D=coads_climatology]
             FILENAME : coads_climatology.cdf
             X        : 1
          5.000
 
! using dimension names from the linked list structure
 
let cnames = sst.dimnames
list cnames
             VARIABLE : SST.DIMNAMES
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (X)
 1   / 1:"COADSX"
 2   / 2:"COADSY"
 3   / 3:"TIME1" 
show axis (`cnames[i=1]`)
 !-> show axis (COADSX)
 name       axis              # pts   start                end
list (`cnames[i=1]`).nattrs
 !-> list (COADSX).nattrs
             VARIABLE : (COADSX).NATTRS
             FILENAME : coads_climatology.cdf
             X        : 1
          5.000
 
! Intentional errors.
 
SET MODE IGNORE
 
! Need parentheses around axis name.
list coadsx.units
sh att/all coadsy
 
! Cannot change the direction of an axis
use modfalse.nc
set att (`sst,return=xaxis`).axis = "Z"
 !-> set att (COADSX81_81).axis = "Z"
 
can view
 
can mode ignore
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
!-----
! Edit attributes: inherit all attrs from another variable
 
use gt4d011
sh att/all salt
     attributes for dataset: ./data/gt4d011.cdf
 SALT.parent_grid = PS3DT2 
 SALT.slab_min_index = 91, 35, 1, 0
 SALT.slab_max_index = 108, 55, 10, 0
 SALT.missing_value = 0.01
 SALT._FillValue = 0.01
 SALT.long_name = (SALINITY(ppt) - 35) /1000 
 SALT.history = From gt4d011 
 SALT.units = frac. by wt. less .035 
 
set att/like=temp salt
sh att/all salt
     attributes for dataset: ./data/gt4d011.cdf
 SALT.missing_value = 0.01
 SALT._FillValue = 0.01
 SALT.parent_grid = PS3DT2 
 SALT.slab_min_index = 91, 35, 1, 0
 SALT.slab_max_index = 108, 56, 10, 0
 SALT.long_name = TEMPERATURE 
 SALT.history = From gt4d011 
 SALT.units = deg. C 
 
! If a user variable is defined based on another variable,
! it gets only default attributes. All attributes must be
! specified with qualifiers (/UNITS=) or with DEF ATT
 
! Define a new attribute on a file variable, then a new var as fcn of that
 
define attribute temp.description = "description of TEMP in gt4d011"
let temp2 = temp*2
sh att/all temp2
     attributes for user-defined variables
 temp2.long_name = TEMP*2 
 temp2.missing_value = -1.E+34
 
! Can inherit attributes explicitly, either all at once or individually.
def att temp2.units = "`temp,return=units`"
 !-> def att temp2.units = "deg. C"
sh att/all temp2
     attributes for user-defined variables
 temp2.long_name = TEMP*2 
 temp2.missing_value = -1.E+34
 temp2.units = deg. C 
 
let temp3 = temp*3
set att/like=temp temp3
sh att/all temp3
     attributes for user-defined variables
 temp3.missing_value = -1.E+34
 temp3.parent_grid = PS3DT2 
 temp3.slab_min_index = 91, 35, 1, 0
 temp3.slab_max_index = 108, 56, 10, 0
 temp3.long_name = TEMPERATURE 
 temp3.history = From gt4d011 
 temp3.units = deg. C 
 temp3.description = description of TEMP in gt4d011 
 
can var temp2
let/units="degrees C"/title="my new TEMP"/bad=`temp,return=bad` temp2 = temp*2
 !-> DEFINE VARIABLE/units="degrees C"/title="my new TEMP"/bad=-9.999999790214768E+33 temp2 = temp*2
sh att/all temp2
     attributes for user-defined variables
 temp2.long_name = my new TEMP 
 temp2.units = degrees C 
 temp2.missing_value = -1.E+34
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
!-----
! Edit attributes, changing type
! change values, type, and length of attributes.
 
use ocean_atlas_temp
def att/type=string temp.strval = 2
def att/type=float temp.floatval = 22
def att temp.pp = {1.5, 1.9}
def att temp.some_text = "some text about the TEMP variable"
sh att/all temp
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 TEMP.missing_value = -1.E+34
 TEMP._FillValue = -1.E+34
 TEMP.long_name = Temperature 
 TEMP.history = From ocean_atlas_monthly 
 TEMP.units = Deg C 
 TEMP.strval = 2 
 TEMP.floatval = 22
 TEMP.pp = 1.5, 1.9
 TEMP.some_text = some text about the TEMP variable 
 
! Change attribute values
 
set att temp.pp = {1.5, 1.9, 3.45, 7}
set att temp.some_text = "some different text"
sh att temp.pp
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 TEMP.pp = 1.5, 1.9, 3.45, 7
let var = temp.some_text
list/nohead var
        "some different text"
 
! Now change attribute types
 
set att temp.pp = "PP now has some text."
set att temp.some_text = 745.
 
! Does changing the type of an attribute cause any trouble for a variable
! defined based on that variable?
 
list/nohead var
          745.0
let pq = temp.pp
list pq
             VARIABLE : TEMP.PP
             FILENAME : ocean_atlas_temp.cdf
             X        : 1
        "PP now has some text."
 
! set an attribute when the variable is not in the default dataset.
 
use gt4d011
def att/d=1 temp.morenew = 33
sho att/all temp[d=1]
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 TEMP.missing_value = -1.E+34
 TEMP._FillValue = -1.E+34
 TEMP.long_name = Temperature 
 TEMP.history = From ocean_atlas_monthly 
 TEMP.units = Deg C 
 TEMP.strval = 2 
 TEMP.floatval = 22
 TEMP.pp = PP now has some text. 
 TEMP.some_text = 745
 TEMP.morenew = 33
 
! Edit the text in some of the attributes, make a plot where we see
! the resulting change in title and units.
 
set data ocean_atlas_temp
set att temp.long_name = "Ocean Atlas Temperature"
set att temp.units = "Centigrade"
shade/L=2 temp
 
! Define an attr that already exists: redefines
 
def att temp.pp = {1.5, 1.9, 3}
let pq = temp.pp
list pq
             VARIABLE : TEMP.PP
             FILENAME : ocean_atlas_temp.cdf
             SUBSET   : 3 points (X)
 1   / 1:  1.500
 2   / 2:  1.900
 3   / 3:  3.000
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
! When we CANCEL MODE upcase_output, writing a netcdf file preserves
! case of variable and axis names. This file has lower case and some
! mixed-case names.
 
use err491_attval.cdf
sp echo "bn_attributes.jnl --- 4 CANCEL MODE upcase_output; original file:" >> all_ncdump.out
sp ncdump -h data/err491_attval.cdf >> all_ncdump.out
save/clobber/file=a.nc elev[i=3,j=2:4]
sp echo "bn_attributes.jnl --- 5 before CANCEL MODE upcase_output" >> all_ncdump.out
sp ncdump -h a.nc >> all_ncdump.out
 
cancel mode upcase_output
save/clobber/file=a.nc elev[i=3,j=2:4]
sp echo "bn_attributes.jnl --- 6 after CANCEL MODE upcase_output" >> all_ncdump.out
sp ncdump -h a.nc >> all_ncdump.out
 
set mode/last upcase_output
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
!-----
 
! outtput flags to control attribute output to netcdf files
 
! SET ATT/OUTPUT varname.attname sets individual attr to be written
! SET ATT/OUTPUT=all varname     output all attributes defined when var written
! SET ATT/OUTPUT=default varname output default Ferret attributes
! SET ATT/OUTPUT=none varname    output no attrbutes
 
let aa = 12
let bb = {3,4.5,6,7,4}
 
def att bb.my_title = "This is my new variable bb"
def att bb.another_attr = 6
 
! Output just one of these new attributes
 
set att/output bb.my_title
 
save/clobber/file=a.nc aa,bb
sp echo "bn_attributes.jnl --- 7 outtput flags to control attribute output" >> all_ncdump.out
sp ncdump -c a.nc >> all_ncdump.out
 
! Output all attributes
 
set att/output=all bb
save/clobber/file=a.nc aa,bb
sp echo "bn_attributes.jnl --- 8 outtput all flags" >> all_ncdump.out
sp ncdump -c a.nc >> all_ncdump.out
 
! Just output the default attributes
 
set att/output=default bb
save/clobber/file=a.nc bb
sp echo "bn_attributes.jnl --- 9 Just output the default attributes" >> all_ncdump.out
sp ncdump -c a.nc >> all_ncdump.out
 
! Output none of the attributes for aa
 
set att/output=none aa
save/clobber/file=a.nc aa,bb
sp echo "bn_attributes.jnl --- 10 Output none of the attributes for aa" >> all_ncdump.out
sp ncdump -c a.nc >> all_ncdump.out
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
 
!-----
! CANCEL ATTRIBUTE/OUTPUT= to surpress output of attributes
 
use ocean_atlas_temp
sh att/all  (`temp,return=xaxis`)
 !-> sh att/all  (XAX_LEV9421_380)
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 (XAX_LEV9421_380).units = degrees_east 
 (XAX_LEV9421_380).modulo =   
 (XAX_LEV9421_380).point_spacing = even 
 (XAX_LEV9421_380).orig_file_axname = XAX_LEV9421_380 
 
! Surpress output of existing attribute
can att/out (`temp,return=xaxis`).point_spacing
 !-> can att/out (XAX_LEV9421_380).point_spacing
 
! Surpress output of an attribute that Ferret would otherwise add.
 
can att/out (`temp,return=xaxis`).axis
 !-> can att/out (XAX_LEV9421_380).axis
save/file=a.nc/clobber temp
sp echo "bn_attributes.jnl --- 11 Surpress output of an attribute that Ferret would otherwise add." >> all_ncdump.out
sp ncdump -h a.nc >> all_ncdump.out
 
! subregions create child axes with new names
! Check that settings hold for such an output file.
 
set reg/x=300:360/y=30:45
sh att/all  (`temp,return=xaxis`)
 !-> sh att/all  (XAX_LEV9421_380)
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 (XAX_LEV9421_380).units = degrees_east 
 (XAX_LEV9421_380).modulo =   
 (XAX_LEV9421_380).point_spacing = even 
 (XAX_LEV9421_380).orig_file_axname = XAX_LEV9421_380 
 (XAX_LEV9421_380).axis = 1
can att/out (`temp,return=xaxis`).point_spacing
 !-> can att/out (XAX_LEV9421_380).point_spacing
can att/out (`temp,return=xaxis`).axis
 !-> can att/out (XAX_LEV9421_380).axis
save/file=a.nc/clobber temp
sp echo "bn_attributes.jnl --- 12 Check that settings hold for child axis." >> all_ncdump.out
sp ncdump -h a.nc >> all_ncdump.out
 
! cancel output of attributes of the variable itself
can region
sh att/all  temp
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 TEMP.missing_value = -1.E+34
 TEMP._FillValue = -1.E+34
 TEMP.long_name = Temperature 
 TEMP.history = From ocean_atlas_monthly 
 TEMP.units = Deg C 
can att/out temp.history
can att/out temp.long_name
save/file=a.nc/clobber temp
sp echo "bn_attributes.jnl --- 13 cancel output of attributes of the variable." >> all_ncdump.out
sp ncdump -h a.nc >> all_ncdump.out
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
!-----
! Read EZ ascii, delimited, and stream data files,
! add attributes to their variables.
 
! read file as an ez file
 
file/var="a1,a2,a3" EZ.DAT
def att a1.three={1,2,3}
sh att/all a1
     attributes for dataset: ./data/EZ.DAT
 a1.long_name = a1 
 a1.missing_value = -1.E+34
 a1.three = 1, 2, 3
sh dat/att
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        6    F       EZ.DAT
  
 a1                    DOUBLE    long_name       CHAR        2    T       a1
                                 missing_value   DOUBLE      1    T       -1.E+34
                                 three           FLOAT       3    T       1 2 3
  
 a2                    DOUBLE    long_name       CHAR        2    T       a2
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 a3                    DOUBLE    long_name       CHAR        2    T       a3
                                 missing_value   DOUBLE      1    T       -1.E+34
  
save/file=a.nc/clobber a1,a2,a3
sp echo "bn_attributes.jnl --- 14 attributes of data from ez data." >> all_ncdump.out
sp ncdump a.nc >> all_ncdump.out
 
! now read it as a delimited file
 
can data/all
 
columns/delim=" " EZ.DAT
def att/type=string v1.strval = 2
set att/output v1.strval
sh att/all v1
     attributes for dataset: ./data/EZ.DAT
 V1.long_name = V1 
 V1.missing_value = -1.E+34
 V1.strval = 2 
save/clobber/file=a.nc v1,v4
sp echo "bn_attributes.jnl --- 15 attributes of data from delimited data." >> all_ncdump.out
sp ncdump a.nc >> all_ncdump.out
 
! and a stream dataset
 
def axis/x=1:1:1 xax
def axis/y=1:2:1 yax
def axis/z=1:3:1 zax
def axis/t=1:4:1 tax
def grid/x=xax/y=yax/z=zax/t=tax mygrid
file/format=str/var=num,num1/grid=mygrid/order=xyztv permutedBinaryTest.dat
 
define att/type=string num.new = "a string attribute"
sh att/all num
     attributes for dataset: ./permutedBinaryTest.dat
 num.long_name = num 
 num.missing_value = -1.E+34
 num.new = a string attribute 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
!-----
! manipulate attributes of user-defined variables
 
let a = {12,14,15}
def att a.three={1,2,3}
set att/output a.three
def att a.four = {"theory"}
set att/output a.four
sh att/all a
     attributes for user-defined variables
 a.long_name = {12,14,15} 
 a.missing_value = -1.E+34
 a.three = 1, 2, 3
 a.four = theory 
sh dat/att
     currently SET data sets:
save/file=a.nc/clobber a
sp echo "bn_attributes.jnl --- 16 attributes of user vars" >> all_ncdump.out
sp ncdump a.nc >> all_ncdump.out
 
 
!-----
! write global attributes (Note this implementation needs work;
! what is the right syntax?? Perhaps an undocumented feature for
! the first release)
 
use err491_attval
set att/out=all .   ! from the default data set
 
save/file=a.nc/clobber elev
sp echo "bn_attributes.jnl --- 17 global attrs." >> all_ncdump.out
sp ncdump -h a.nc >> all_ncdump.out
 
! Choose a single global attribute to write, from dataset 1
can data/all
use err491_attval
use gt4d011
set att/output/d=1 ..dt_internal
save/clobber/file=a.nc elev[d=1], temp[d=2,x=130w,k=1,y=-20:20]
 
sp echo "bn_attributes.jnl --- 18 choose global attr to write" >> all_ncdump.out
sp ncdump -h a.nc >> all_ncdump.out
 
! Note: this syntax does not work
! use err491_attval
! use ocean_atlas_temp
! set att/out  ..min_slope[d=1]
! save/file=a.nc/clobber elev[d=1]
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
!-----
 
! File with scale_factor and add_offset
! If we request to write the variable with its scale factor
! and offset attributes, then the data and its missing and fill
! flags are rescaled.  Lets us re-pack data on output, or specify
! new packing.
 
use err491_attval
set att/output elev.scale_factor
set att/output elev.add_offset
set var/outtype=input elev
 
save/clobber/file=a.nc/j=1 elev
sp echo "bn_attributes.jnl --- 19 scale and offset attr." >> all_ncdump.out
 
! Both of these should be scaled the same by Ferret
use a.nc
list/j=1 elev[d=1], elev[d=2]
             LONGITUDE: 135.5163W(-135.5163) to 135.0455W(-135.0
             LATITUDE: 58.595N
             T (day): 1.78368
 Column  1: ELEV[D=err491_attval] is Surface elevation (meter)
 Column  2: ELEV[D=a] is Surface elevation (meter)
                 ELEV   ELEV
135.51W   /  1:   ....   ....
135.496W  /  2:   ....   ....
135.483W  /  3:   ....   ....
135.469W  /  4:   ....   ....
135.456W  /  5:   ....   ....
135.442W  /  6:   ....   ....
135.429W  /  7:   ....   ....
135.415W  /  8:   ....   ....
135.402W  /  9:   ....   ....
135.389W  / 10:   ....   ....
135.375W  / 11:   ....   ....
135.362W  / 12:  2.940  2.940
135.348W  / 13:  2.940  2.940
135.335W  / 14:  2.940  2.940
135.321W  / 15:  2.940  2.940
135.308W  / 16:  2.940  2.940
135.294W  / 17:  2.940  2.940
135.281W  / 18:  2.940  2.940
135.267W  / 19:  2.940  2.940
135.254W  / 20:  2.940  2.940
135.241W  / 21:  2.940  2.940
135.227W  / 22:  2.940  2.940
135.214W  / 23:  2.940  2.940
135.2W    / 24:  2.940  2.940
135.187W  / 25:  2.940  2.940
135.173W  / 26:   ....   ....
135.16W   / 27:   ....   ....
135.146W  / 28:   ....   ....
135.133W  / 29:   ....   ....
135.12W   / 30:   ....   ....
135.106W  / 31:   ....   ....
135.093W  / 32:   ....   ....
135.079W  / 33:   ....   ....
135.066W  / 34:   ....   ....
135.052W  / 35:   ....   ....
sp ncdump a.nc  >> all_ncdump.out
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
!-----
! Set type of data on output, uses netcdf call to output
! the requseted type.
 
use gt4d011
set var/bad=-1000 temp
set var/outtype=int4 temp
save/file=a.nc/clobber/y=1/k=1/L=1 temp
sp echo "bn_attributes.jnl --- 20 set data type on output int4" >> all_ncdump.out
sp ncdump a.nc | grep -A2 -i temp >> all_ncdump.out
 
can data/all
use gt4d011
 
set var/outtype=double salt
save/clobber/file=a.nc/y=1/k=1/L=1 salt
sp echo "bn_attributes.jnl --- 21 set data type on output double" >> all_ncdump.out
sp ncdump a.nc | grep -A2 -i salt >> all_ncdump.out
 
can data gt4d011
 
! Force output type to equal input type (should we have a MODE setting for this??)
 
use test0
let nam = ..varnames
 
repeat/range=1:4/name=q (def sym va = nam[i=`q`]; sh sym va; \
  set var/outtype=input `($va)`;\
  if `q eq 1` THEN save/clobber/file=a.nc `($va)` \
  ELSE save/append/file=a.nc `($va)`)
 !-> repeat/range=1:4/name=q (def sym va = nam[i=`q`]; sh sym va;   set var/outtype=input `($va)`;  if `q eq 1` THEN save/clobber/file=a.nc `($va)`   ELSE save/append/file=a.nc `($va)`)
!-> REPEAT: Q:1
 !-> def sym va = nam[i=1]
VA = "nam[i=1]"
 !-> set var/outtype=input broiled
 !-> if 1 THEN save/clobber/file=a.nc `nam[i=1]`   ELSE save/append/file=a.nc `nam[i=1]`
 !-> LIST/FORMAT=CDF/clobber/file=a.nc broiled
!-> REPEAT: Q:2
 !-> def sym va = nam[i=2]
VA = "nam[i=2]"
 !-> set var/outtype=input the_bullet
 !-> if 0 THEN save/clobber/file=a.nc `nam[i=2]`   ELSE save/append/file=a.nc `nam[i=2]`
 !-> LIST/FORMAT=CDF/append/file=a.nc the_bullet
!-> REPEAT: Q:3
 !-> def sym va = nam[i=3]
VA = "nam[i=3]"
 !-> set var/outtype=input order
 !-> if 0 THEN save/clobber/file=a.nc `nam[i=3]`   ELSE save/append/file=a.nc `nam[i=3]`
 !-> LIST/FORMAT=CDF/append/file=a.nc order
!-> REPEAT: Q:4
 !-> def sym va = nam[i=4]
VA = "nam[i=4]"
 !-> set var/outtype=input rigue
 !-> if 0 THEN save/clobber/file=a.nc `nam[i=4]`   ELSE save/append/file=a.nc `nam[i=4]`
 !-> LIST/FORMAT=CDF/append/file=a.nc rigue
 
sp echo "bn_attributes.jnl --- 22 outtype=input" >> all_ncdump.out
sp ncdump a.nc >> all_ncdump.out
 
set var/outtype=double a_loan
save/file=a.nc/clobber a_loan
 
can data test0
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
!-----
! More tests of user-defined variables. Bug 1427, now fixed, problem with varid of user vars
 
let v = {1,2,3,4}
let a = is_element_of(1,v)
let/title="hello" b = 1
save/clobber/file=a.nc b
sp echo "bn_attributes.jnl --- 23 more user-defined vars" >> all_ncdump.out
sp ncdump a.nc >> all_ncdump.out
 
 
!-----
! Bug 1492, now fixed, output user-defined or redefined attributes
 
! A new setting for the point_spacing attribute using either SET or DEFINE
 
use coads_vwnd
set att (`vwnd,return=xaxis`).point_spacing = "uneven"
 !-> set att (COADSX).point_spacing = "uneven"
define att (`vwnd,return=yaxis`).point_spacing = "uneven"
 !-> define att (COADSY).point_spacing = "uneven"
save/file=a.nc/clobber/L=1 vwnd
 
sp echo "bn_attributes.jnl --- 24 output redefined attr" >> all_ncdump.out
sp ncdump a.nc >> all_ncdump.out
 
! new attribute written to file
 
let t2 = 2*vwnd
DEFINE ATT/OUTPUT  (`t2,return=yaxis`).new_att = "somthing"
 !-> DEFINE ATT/OUTPUT  (COADSY).new_att = "somthing"
 
! shows up on the output of
 
SHOW ATT/ALL (`t2,return=yaxis`)
 !-> SHOW ATT/ALL (COADSY)
     attributes for dataset: ./data/coads_vwnd.cdf
 (COADSY).units = degrees_north 
 (COADSY).point_spacing = uneven 
 (COADSY).orig_file_axname = COADSY 
 (COADSY).new_att = somthing 
 
! Check the new attribute is saved to a file. (if we
! save uwnd to a file, it is output)
 
save/file=a.nc/clobber/L=1 t2
 
sp echo "bn_attributes.jnl --- 25 output new attr on user-defined var" >> all_ncdump.out
sp ncdump a.nc >> all_ncdump.out
 
 
! intentional errors
 
set mode ignore_error
 
! missing value and fill value too large for INT output.
 
use gt4d011
set var/outtype=int4 temp
save/file=a.nc/clobber/x=132w/k=1 temp
can data gt4d011
 
sp rm a.nc
 
! specify incorrect output types
 
use test0
set var/outtype=char broiled
 
set var/outtype=garbage broiled
 
can mode ignore
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
 
!---!!!---
! Manipulate attributes of axes from datasets
! A user-defined variable is used to refer to the axes.
 
use gt4d011.cdf
 
let t2 = t*temp
set att (`t2,return=xaxis`).units = "degrees"
 !-> set att (PSXT).units = "degrees"
sh att/all (`t2,return=xaxis`)
 !-> sh att/all (PSXT)
     attributes for dataset: ./data/gt4d011.cdf
 (PSXT).units = degrees 
 (PSXT).point_spacing = even 
 (PSXT).orig_file_axname = PSXT 
set att/output (`t2,return=xaxis`).point_spacing
 !-> set att/output (PSXT).point_spacing
save/file=a.nc/clobber/L=1 t2
 
sp echo "bn_attributes.jnl --- 26 attributes of axes" >> all_ncdump.out
 
sp ncdump -h a.nc >> all_ncdump.out
define att/out (`t2,return=xaxis`).new_att = "something"
 !-> define att/out (PSXT).new_att = "something"
save/file=a.nc/clobber/L=1 t2
sp ncdump -h a.nc >> all_ncdump.out
 
! A file variable is used to refer to the axes
 
set att (`temp,return=xaxis`).units="meters"
 !-> set att (PSXT).units="meters"
set att (`temp,return=yaxis`).units="meters"
 !-> set att (PSYT).units="meters"
sho att/all (`temp,return=yaxis`)
 !-> sho att/all (PSYT)
     attributes for dataset: ./data/gt4d011.cdf
 (PSYT).units = meters 
 (PSYT).point_spacing = uneven 
 (PSYT).edges = PSYTedges 
 (PSYT).orig_file_axname = PSYT 
save/file=a.nc/clobber/L=1 t2
 
sp ncdump -h a.nc >> all_ncdump.out
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
! User-defined axes and variables
 
def axis/x=1:200:1  x2ax
sh att/all (x2ax)
     attributes for coordinate axis
 (x2ax).point_spacing = even 
 (x2ax).axis = X 
! SET AXIS command changes attributes
set axis/modulo x2ax
sh att/all (x2ax)
     attributes for coordinate axis
 (x2ax).point_spacing = even 
 (x2ax).axis = X 
 (x2ax).modulo =   
 
! DEFINE ATTRIBUTE command changes attributes
define attribute (x2ax).units = "degrees_east"
sh att/all (x2ax)
     attributes for coordinate axis
 (x2ax).point_spacing = even 
 (x2ax).axis = X 
 (x2ax).modulo =   
 (x2ax).units = degrees_east 
 
! Define new attribute on an axis.
! Save file var, and a user var defined from the file var
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
use levitus_climatology
define att/out (`temp,return=xaxis`).new_att = "something"
 !-> define att/out (XAXLEVITR1_160).new_att = "something"
sh dat/att
     currently SET data sets:
    1> ./data/levitus_climatology.cdf  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        24   T       FERRET V5.22    5-Apr-01
  
(XAXLEVITR1_160)       DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        14   F       XAXLEVITR1_160
                                 new_att         CHAR        9    T       something
  
(YAXLEVITR1_90)        DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        13   F       YAXLEVITR1_90
  
(ZAXLEVITR1_1)         DOUBLE    units           CHAR        6    T       METERS
                                 positive        CHAR        4    T       down
                                 orig_file_axname
                                                 CHAR        12   F       ZAXLEVITR1_1
  
 TEMP                  FLOAT     missing_value   FLOAT       1    T       -1.E+10
                                 _FillValue      FLOAT       1    T       -1.E+10
                                 long_name       CHAR        11   T       TEMPERATURE
                                 history         CHAR        24   T       From levitus_climatology
                                 units           CHAR        5    T       DEG C
  
save/file=a.nc/clobber/y=0:5 temp
sp ncdump -h a.nc >> all_ncdump.out
 
let two = 2*temp[y=0:15,x=180:200]
save/file=a.nc/clobber/y=0:5 two
sp ncdump -h a.nc >> all_ncdump.out
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
! defining more axes with attributes
 
show axis x2ax
 name       axis              # pts   start                end
 X2AX      X                  200mr   1                    200
   Axis span (to cell edges) = 200 (modulo length = axis span)
def axis/x=1:2:1/modulo=360 x2ax
def axis/y=1:3:1 y3ax
def axis/z=1:4:1/depth z4ax
def axis/t=1:2:1 t2ax
let a = {"alpha","a2","a3","a4","a5","a6","a7","a8","a9","a10",\
"bravo","b2","b3","b4","b5","b6","b7","b8","b9","b10",\
"c1","c2","c3","c4","c5","c6","c7","c8","c9","c10",\
"d1","d2","d3","d4","d5","d6","d7","d8","d9","d10",\
"echo","e2","e3","e4","e5","e6","e7","e8"}
let rvar = x[gx=x2ax] + y[gy=y3ax] + z[gz=z4ax] + t[gt=t2ax]
 
let axy = reshape (a,rvar)
 
show att/all (z4ax)
     attributes for coordinate axis
 (z4ax).point_spacing = even 
 (z4ax).axis = Z 
 (z4ax).positive = down 
set att (z4ax).positive = "up"
 
sp echo "bn_attributes.jnl --- 27 attributes of  user-defined axes" >> all_ncdump.out
save/clobber/file=string4d.nc axy
sp ncdump -h string4d.nc >> all_ncdump.out
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
! For SET ATT timeaxis.units or SET ATT timeaxis.time_origin
! include the correct time origin as part of the units attribute.
 
! Note original attributes
use coads_climatology
show att/all (`sst,return=taxis`)
 !-> show att/all (TIME)
     attributes for dataset: ./data/coads_climatology.cdf
 (TIME).units = hour since 0000-01-01 00:00:00 
 (TIME).time_origin = 1-JAN-0000 00:00:00 
 (TIME).modulo =   
 (TIME).orig_file_axname = TIME 
 
! change units to days since time origin
set att (`sst,return=taxis`).units="days"
 !-> set att (TIME).units="days"
show att/all (`sst,return=taxis`)
 !-> show att/all (TIME)
     attributes for dataset: ./data/coads_climatology.cdf
 (TIME).units = days since 1-JAN-0000 00:00:00 
 (TIME).time_origin = 1-JAN-0000 00:00:00 
 (TIME).modulo =   
 (TIME).orig_file_axname = TIME 
 
define attribute (`sst,return=taxis`).units = "months"
 !-> define attribute (TIME).units = "months"
show att/all (`sst,return=taxis`)
 !-> show att/all (TIME)
     attributes for dataset: ./data/coads_climatology.cdf
 (TIME).units = months since 1-JAN-0000 00:00:00 
 (TIME).time_origin = 1-JAN-0000 00:00:00 
 (TIME).modulo =   
 (TIME).orig_file_axname = TIME 
 
! change time origin and also units to include time origin
set att (`sst,return=taxis`).time_origin = "1-mar-1955"
 !-> set att (TIME).time_origin = "1-mar-1955"
show att/all (`sst,return=taxis`)
 !-> show att/all (TIME)
     attributes for dataset: ./data/coads_climatology.cdf
 (TIME).units = months since 1-mar-1955 
 (TIME).time_origin = 1-mar-1955 
 (TIME).modulo =   
 (TIME).orig_file_axname = TIME 
 
define attribute (`sst,return=taxis`).time_origin = "15-jan-2002"
 !-> define attribute (TIME).time_origin = "15-jan-2002"
show att/all (`sst,return=taxis`)
 !-> show att/all (TIME)
     attributes for dataset: ./data/coads_climatology.cdf
 (TIME).units = months since 15-jan-2002 
 (TIME).time_origin = 15-jan-2002 
 (TIME).modulo =   
 (TIME).orig_file_axname = TIME 
 
! Likewise on DEFINE AXIS or SET AXIS, change units to
! include the correct since time_origin.
 
use coads_climatology
show att/all (`sst,return=taxis`)
 !-> show att/all (TIME)
     attributes for dataset: ./data/coads_climatology.cdf
 (TIME).units = months since 15-jan-2002 
 (TIME).time_origin = 15-jan-2002 
 (TIME).modulo =   
 (TIME).orig_file_axname = TIME 
def axis/t=1:12:1/unit=months/t0="1-jan-0001" time
show att/all (`sst,return=taxis`)
 !-> show att/all (TIME)
     attributes for dataset: ./data/coads_climatology.cdf
 (TIME).units = MONTHS since 1-JAN-0001 
 (TIME).time_origin = 1-JAN-0001 
 (TIME).orig_file_axname = TIME 
 
set axis/t0="15-jan-0000" time
show att/all (`sst,return=taxis`)
 !-> show att/all (TIME)
     attributes for dataset: ./data/coads_climatology.cdf
 (TIME).units = MONTHS since 15-JAN-0000 
 (TIME).time_origin = 15-JAN-0000 
 (TIME).orig_file_axname = TIME 
 
set axis/units=days time
show att/all (`sst,return=taxis`)
 !-> show att/all (TIME)
     attributes for dataset: ./data/coads_climatology.cdf
 (TIME).units = days since 15-JAN-0000 
 (TIME).time_origin = 15-JAN-0000 
 (TIME).orig_file_axname = TIME 
 
! Fix bug 1518: previously var.attnames for a user-defined variable resulted in an error
use coads_climatology
let sst2 = 2*sst
set att/like=sst sst2
list sst2.attnames
             VARIABLE : SST2.ATTNAMES
             FILENAME : coads_climatology.cdf
             SUBSET   : 4 points (X)
 1   / 1:"missing_value"
 2   / 2:"long_name"    
 3   / 3:"history"      
 4   / 4:"units"        
 
 
! Add a global attribute
use test0
 
DEFINE ATT/OUTPUT ..FERRET_comment = "File written via LAS. Attributes are inherited from originating dataset"
SET ATT/OUTPUT=all .
 
SET ATT/OUTPUT=all broiled
SAVE/CLOBBER/FILE=a.nc broiled
 
sp echo "bn_attributes.jnl --- 28 Define a new global attribute" >> all_ncdump.out
sp echo "bn_attributes.jnl --- 29 SET ATT/OUTPUT=all for global attrs and a var" >> all_ncdump.out
sp ncdump a.nc >> all_ncdump.out
 
 
!-----
! Set type of data on output for a user var
! the requseted type.
 
sp echo "bn_attributes.jnl --- 29 SET VAR/OUTTYPE for user variable" >> all_ncdump.out
 
use gt4d011
let/units="Deg F" faren = temp*9/5 + 32
set var/outtype=double faren
save/file=a.nc/clobber faren
 
sp ncdump -h a.nc  >> all_ncdump.out
 
let/units="Deg F"/bad=-999 faren = temp*9/5 + 32
set var/outtype=int faren
save/file=a.nc/clobber faren
 
sp ncdump -h a.nc  >> all_ncdump.out
 
! Tests for simplified syntax for SHOW ATTRIBUTE:
 
! SHOW ATT varname   is like SHOW ATT/ALL varname
! SHOW ATT dset      same output as SHOW DATA/ATT dset
 
can data/all
use ocean_atlas_temp
sho att temp
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 TEMP.missing_value = -1.E+34
 TEMP._FillValue = -1.E+34
 TEMP.long_name = Temperature 
 TEMP.history = From ocean_atlas_monthly 
 TEMP.units = Deg C 
sho att ocean_atlas_temp
     currently SET data sets:
    1> ./data/ocean_atlas_temp.cdf  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        28   T       FERRET V4.90 (GUI) 04-Feb-98
  
(XAX_LEV9421_380)      DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        15   F       XAX_LEV9421_380
  
(YAX_LEV94)            DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        9    F       YAX_LEV94
  
(ZAXLEVIT191_1)        DOUBLE    units           CHAR        6    T       METERS
                                 positive        CHAR        4    T       down
                                 orig_file_axname
                                                 CHAR        13   F       ZAXLEVIT191_1
  
(TIME1)                DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          CHAR        1    T
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 TEMP                  FLOAT     missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        11   T       Temperature
                                 history         CHAR        24   T       From ocean_atlas_monthly
                                 units           CHAR        5    T       Deg C
  
sho att (`temp,return=xaxis`)
 !-> sho att (XAX_LEV9421_380)
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 (XAX_LEV9421_380).units = degrees_east 
 (XAX_LEV9421_380).modulo =   
 (XAX_LEV9421_380).point_spacing = even 
 (XAX_LEV9421_380).orig_file_axname = XAX_LEV9421_380 
 
use levitus_climatology
sho att 1
     currently SET data sets:
    1> ./data/ocean_atlas_temp.cdf
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        28   T       FERRET V4.90 (GUI) 04-Feb-98
  
(XAX_LEV9421_380)      DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        15   F       XAX_LEV9421_380
  
(YAX_LEV94)            DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        9    F       YAX_LEV94
  
(ZAXLEVIT191_1)        DOUBLE    units           CHAR        6    T       METERS
                                 positive        CHAR        4    T       down
                                 orig_file_axname
                                                 CHAR        13   F       ZAXLEVIT191_1
  
(TIME1)                DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          CHAR        1    T
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 TEMP                  FLOAT     missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        11   T       Temperature
                                 history         CHAR        24   T       From ocean_atlas_monthly
                                 units           CHAR        5    T       Deg C
  
sho att 2
     currently SET data sets:
    2> ./data/levitus_climatology.cdf  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        24   T       FERRET V5.22    5-Apr-01
  
(XAXLEVITR1_160)       DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        14   F       XAXLEVITR1_160
  
(YAXLEVITR1_90)        DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        13   F       YAXLEVITR1_90
  
(ZAXLEVITR1_1)         DOUBLE    units           CHAR        6    T       METERS
                                 positive        CHAR        4    T       down
                                 orig_file_axname
                                                 CHAR        12   F       ZAXLEVITR1_1
  
 TEMP                  FLOAT     missing_value   FLOAT       1    T       -1.E+10
                                 _FillValue      FLOAT       1    T       -1.E+10
                                 long_name       CHAR        11   T       TEMPERATURE
                                 history         CHAR        24   T       From levitus_climatology
                                 units           CHAR        5    T       DEG C
  
 
sho att temp[d=1]
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 TEMP.missing_value = -1.E+34
 TEMP._FillValue = -1.E+34
 TEMP.long_name = Temperature 
 TEMP.history = From ocean_atlas_monthly 
 TEMP.units = Deg C 
sho att temp[d=2]
     attributes for dataset: ./data/levitus_climatology.cdf
 TEMP.missing_value = -1.E+10
 TEMP._FillValue = -1.E+10
 TEMP.long_name = TEMPERATURE 
 TEMP.history = From levitus_climatology 
 TEMP.units = DEG C 
 
sho att (`temp[d=1],return=taxis`[d=1])
 !-> sho att (TIME1[d=1])
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 (TIME1).units = hour since 0000-01-01 00:00:00 
 (TIME1).time_origin = 01-JAN-0000 00:00:00 
 (TIME1).modulo =   
 (TIME1).orig_file_axname = TIME 
 
sho att .
     attributes for dataset: ./data/levitus_climatology.cdf
 ..history = FERRET V5.22    5-Apr-01 
 
! 1/17 *sh*
! added a test of shifting attributes in is_attrib_val.F
define att temp.test_counter = {1, 2, 3, 4, 5}
list temp.test_counter[i=3:5]
             VARIABLE : TEMP.TEST_COUNTER[I=3:5]
             FILENAME : levitus_climatology.cdf
             SUBSET   : 3 points (X)
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
*** Running ferret script: bn_transforms.jnl
! Test the transforms
 
use coads_climatology
 
list/L=1/prec=7 sst[x=100:120@ave,y=10:30@ave]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             LONGITUDE: 100E to 120E (XY ave)
             LATITUDE : 10N to 30N (XY ave)
             TIME     : 16-JAN 06:00
          24.02076
 
list/L=1/prec=7 sst[x=100:120@din,y=10:30@din]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             LONGITUDE: 100E to 120E (XY integ.)
             LATITUDE : 10N to 30N (XY integ.)
             TIME     : 16-JAN 06:00
          6.009285E+13
 
list/L=1/y=0/x=83w:49w sst,sst[x=@cda], sst[x=@cdb], sst[x=@cia], sst[x=@cib]
             DATA SET: ./data/coads_climatology.cdf
             LONGITUDE: 83W to 49W
             LATITUDE: 1S
             TIME: 16-JAN 06:00
 Column  1: SST is SEA SURFACE TEMPERATURE (Deg C)
 Column  2: SST[X=@CDA:1] is SEA SURFACE TEMPERATURE (Deg C)(closest dist above on X)
 Column  3: SST[X=@CDB:1] is SEA SURFACE TEMPERATURE (Deg C)(closest dist below on X)
 Column  4: SST[X=@CIA:1] is SEA SURFACE TEMPERATURE (Deg C)(closest index above on X)
 Column  5: SST[X=@CIB:1] is SEA SURFACE TEMPERATURE (Deg C)(closest index below on X)
               SST    SST    SST    SST    SST
83W   / 129:  24.60   0.00   0.00   0.00   0.00
81W   / 130:  25.44   0.00   0.00   0.00   0.00
79W   / 131:   ....  26.00   2.00  13.00   1.00
77W   / 132:   ....  24.00   4.00  12.00   2.00
75W   / 133:   ....  22.00   6.00  11.00   3.00
73W   / 134:   ....  20.00   8.00  10.00   4.00
71W   / 135:   ....  18.00  10.00   9.00   5.00
69W   / 136:   ....  16.00  12.00   8.00   6.00
67W   / 137:   ....  14.00  14.00   7.00   7.00
65W   / 138:   ....  12.00  16.00   6.00   8.00
63W   / 139:   ....  10.00  18.00   5.00   9.00
61W   / 140:   ....   8.00  20.00   4.00  10.00
59W   / 141:   ....   6.00  22.00   3.00  11.00
57W   / 142:   ....   4.00  24.00   2.00  12.00
55W   / 143:   ....   2.00  26.00   1.00  13.00
53W   / 144:  27.35   0.00   0.00   0.00   0.00
51W   / 145:  27.13   0.00   0.00   0.00   0.00
49W   / 146:  27.38   0.00   0.00   0.00   0.00
 
list/L=1/y=10:33/x=93w sst, sst[y=@ddb], sst[y=@ddc], sst[y=@ddf]
             DATA SET: ./data/coads_climatology.cdf
             LATITUDE: 10N to 33N
             LONGITUDE: 93W
             TIME: 16-JAN 06:00
 Column  1: SST is SEA SURFACE TEMPERATURE (Deg C)
 Column  2: SST[Y=@DDB] is SEA SURFACE TEMPERATURE (Deg C)(backwards derivative on Y)
 Column  3: SST[Y=@DDC] is SEA SURFACE TEMPERATURE (Deg C)(centered derivative on Y)
 Column  4: SST[Y=@DDF] is SEA SURFACE TEMPERATURE (Deg C)(forward derivative on Y)
              SST      SST        SST        SST
11N   / 51:  26.99  2.217E-06  1.611E-06  1.005E-06
13N   / 52:  27.21  1.005E-06  1.468E-06  1.932E-06
15N   / 53:  27.64  1.932E-06  5.847E-07 -7.622E-07
17N   / 54:  27.47 -7.622E-07 -7.072E-06 -1.338E-05
19N   / 55:  24.50 -1.338E-05 -7.908E-06 -2.435E-06
21N   / 56:  23.95 -2.435E-06 -1.473E-06 -5.111E-07
23N   / 57:  23.84 -5.111E-07 -1.898E-06 -3.286E-06
25N   / 58:  23.11 -3.286E-06 -3.738E-06 -4.190E-06
27N   / 59:  22.18 -4.190E-06 -9.122E-06 -1.405E-05
29N   / 60:  19.05 -1.405E-05       ....       ....
31N   / 61:   ....       ....       ....       ....
33N   / 62:   ....       ....       ....       ....
 
list/L=1/y=10:33/x=93w sst, sst[y=@evnt:23.84]
             DATA SET: ./data/coads_climatology.cdf
             LATITUDE: 10N to 33N
             LONGITUDE: 93W
             TIME: 16-JAN 06:00
 Column  1: SST is SEA SURFACE TEMPERATURE (Deg C)
 Column  2: SST[Y=@EVN: 23.84] is SEA SURFACE TEMPERATURE (Deg C)(event mask at 23.84 on Y)
              SST    SST
11N   / 51:  26.99  0.000
13N   / 52:  27.21  0.000
15N   / 53:  27.64  0.000
17N   / 54:  27.47  0.000
19N   / 55:  24.50  0.000
21N   / 56:  23.95  0.000
23N   / 57:  23.84  0.000
25N   / 58:  23.11  1.000
27N   / 59:  22.18  1.000
29N   / 60:  19.05  1.000
31N   / 61:   ....  1.000
33N   / 62:   ....  1.000
 
list/L=1/y=23:51/x=93w sst, sst[y=@fav], sst[y=@fln], sst[y=@fnr]
             DATA SET: ./data/coads_climatology.cdf
             LATITUDE: 23N to 51N
             LONGITUDE: 93W
             TIME: 16-JAN 06:00
 Column  1: SST is SEA SURFACE TEMPERATURE (Deg C)
 Column  2: SST[Y=@FAV:3] is SEA SURFACE TEMPERATURE (Deg C)(ave-filled by 3 pts on Y)
 Column  3: SST[Y=@FLN:1] is SEA SURFACE TEMPERATURE (Deg C)(linear-filled by 1 pts on Y)
 Column  4: SST[Y=@FNR:1] is SEA SURFACE TEMPERATURE (Deg C)(nearest-filled by 1 pts on Y)
              SST    SST    SST    SST
23N   / 57:  23.84  23.84  23.84  23.84
25N   / 58:  23.11  23.11  23.11  23.11
27N   / 59:  22.18  22.18  22.18  22.18
29N   / 60:  19.05  19.05  19.05  19.05
31N   / 61:   ....  19.05  18.15  19.05
33N   / 62:   ....   ....  17.24  19.05
35N   / 63:   ....   ....  16.33  19.05
37N   / 64:   ....   ....  15.43  15.43
39N   / 65:   ....   ....  14.52  11.80
41N   / 66:   ....   ....  13.61  11.80
43N   / 67:   ....  11.80  12.71  11.80
45N   / 68:  11.80  11.80  11.80  11.80
47N   / 69:   2.47   2.47   2.47   2.47
49N   / 70:   ....   2.47   ....   2.47
51N   / 71:   ....   ....   ....   2.47
 
list/L=1/y=23:51/x=93w sst[y=23:51@min], sst[y=23:51@max]
             DATA SET: ./data/coads_climatology.cdf
             LONGITUDE: 93W
             LATITUDE: 23N to 51N
             TIME: 16-JAN 06:00
 Column  1: SST[Y=@MIN] is SEA SURFACE TEMPERATURE (Deg C)
 Column  2: SST[Y=@MAX] is SEA SURFACE TEMPERATURE (Deg C)
            SST    SST
I / *:     2.466  23.84
 
list/L=1/y=23:51/x=93w sst[y=23:51@nbd], sst[y=23:51@ngd]
             DATA SET: ./data/coads_climatology.cdf
             LONGITUDE: 93W
             LATITUDE: 23N to 51N
             TIME: 16-JAN 06:00
 Column  1: SST[Y=@NBD] is SEA SURFACE TEMPERATURE (# of points)
 Column  2: SST[Y=@NGD] is SEA SURFACE TEMPERATURE (# of points)
            SST    SST
I / *:     9.000  6.000
 
list/L=1/y=1:11/x=93w sst, sst[y=@iin]
             DATA SET: ./data/coads_climatology.cdf
             LATITUDE: 1N to 11N
             LONGITUDE: 93W
             TIME: 16-JAN 06:00
 Column  1: SST is SEA SURFACE TEMPERATURE (Deg C)
 Column  2: SST[Y=@IIN] is SEA SURFACE TEMPERATURE (Deg C)(indef. integ. on Y)
              SST      SST
1N    / 46:  25.77  2.865E+06
3N    / 47:  26.60  8.780E+06
5N    / 48:  26.86  1.475E+07
7N    / 49:  26.57  2.066E+07
9N    / 50:  26.49  2.656E+07
11N   / 51:  26.99  2.956E+07
 
list/L=1/y=23:25/x=93w sst, sst[y=24@itp]
             DATA SET: ./data/coads_climatology.cdf
             LONGITUDE: 93W
             TIME: 16-JAN 06:00
 Column  1: SST[Y=23N:25N] is SEA SURFACE TEMPERATURE (Deg C)
 Column  2: SST[Y=24N@ITP] is SEA SURFACE TEMPERATURE (Deg C)
              SST    SST
23N   / 57:  23.84  23.47
25N   / 58:  23.11  23.47
 
list/L=1/y=11:23/x=93w sst, sst[y=@rsum], sst[y=@sbn], sst[y=@sbx], sst[y=@shf:-1]
             DATA SET: ./data/coads_climatology.cdf
             LATITUDE: 11N to 23N
             LONGITUDE: 93W
             TIME: 16-JAN 06:00
 Column  1: SST is SEA SURFACE TEMPERATURE (Deg C)
 Column  2: SST[Y=@RSU] is SEA SURFACE TEMPERATURE (Deg C)(running sum on Y)
 Column  3: SST[Y=@SBN:3] is SEA SURFACE TEMPERATURE (Deg C)(binomial smoothed by 3 pts on Y)
 Column  4: SST[Y=@SBX:3] is SEA SURFACE TEMPERATURE (Deg C)(box smoothed by 3 pts on Y)
 Column  5: SST[Y=@SHF:-1] is SEA SURFACE TEMPERATURE (Deg C)(shifted by -1 pts on Y)
              SST    SST    SST    SST    SST
11N   / 51:  26.99   27.0  26.92  26.90  26.49
13N   / 52:  27.21   54.2  27.26  27.28  26.99
15N   / 53:  27.64   81.8  27.49  27.44  27.21
17N   / 54:  27.47  109.3  26.77  26.54  27.64
19N   / 55:  24.50  133.8  25.10  25.31  27.47
21N   / 56:  23.95  157.8  24.06  24.10  24.50
23N   / 57:  23.84  181.6  23.69  23.63  23.95
 
list/L=1/y=11:23/x=93w sst, sst[y=@shn] , sst[y=@spz], sst[y=@sum], sst[y=@swl], sst[y=@weq:26]
             DATA SET: ./data/coads_climatology.cdf
             LATITUDE: 11N to 23N
             LONGITUDE: 93W
             TIME: 16-JAN 06:00
 Column  1: SST is SEA SURFACE TEMPERATURE (Deg C)
 Column  2: SST[Y=@SHN:3] is SEA SURFACE TEMPERATURE (Deg C)(Hanning smoothed by 3 pts on Y)
 Column  3: SST[Y=@SPZ:3] is SEA SURFACE TEMPERATURE (Deg C)(Parzen smoothed by 3 pts on Y)
 Column  4: SST[Y=@SUM] is SEA SURFACE TEMPERATURE (Deg C)
 Column  5: SST[Y=@SWL:3] is SEA SURFACE TEMPERATURE (Deg C)(Welch smoothed by 3 pts on Y)
 Column  6: SST[Y=@WEQ:26] is SEA SURFACE TEMPERATURE (Deg C)(weighted equal of 26 on Y)
              SST    SST    SST    SST    SST    SST
11N   / 51:  26.99  26.92  26.92  181.6  26.91    ....
13N   / 52:  27.21  27.26  27.26  181.6  27.27    ....
15N   / 53:  27.64  27.49  27.49  181.6  27.46    ....
17N   / 54:  27.47  26.77  26.77  181.6  26.63  0.5056
19N   / 55:  24.50  25.10  25.10  181.6  25.23  0.4944
21N   / 56:  23.95  24.06  24.06  181.6  24.08    ....
23N   / 57:  23.84  23.69  23.69  181.6  23.66    ....
*** Running ferret script: bn_variance.jnl
 ! bn_variance.jnl
 ! the @VAR transform is not tested in bn_transforms.jnl script.
 
use coads_climatology
list/x=100/y=10 sst[t=@var]
             VARIABLE : Variance of SEA SURFACE TEMPERATURE ((Deg C)^2)
             FILENAME : coads_climatology.cdf
             LONGITUDE: 99E
             LATITUDE : 9N
             TIME     : 01-JAN 00:45 to 01-APR 08:12 (variance)
          0.4424
list/x=100/L=1 sst[y=@var]
             VARIABLE : Variance of SEA SURFACE TEMPERATURE ((Deg C)^2)
             FILENAME : coads_climatology.cdf
             LONGITUDE: 99E
             LATITUDE : 90S to 90N (variance)
             TIME     : 16-JAN 06:00
          102.3
list/y=10/L=1 sst[x=@var]
             VARIABLE : Variance of SEA SURFACE TEMPERATURE ((Deg C)^2)
             FILENAME : coads_climatology.cdf
             LONGITUDE: 20E to 20E(380) (variance)
             LATITUDE : 9N
             TIME     : 16-JAN 06:00
          0.5010
 
use gt4d011.cdf
list/y=3/l=1/x=233 u[z=@var]
             VARIABLE : Variance of ZONAL VELOCITY ((cm/sec)^2)
             FILENAME : gt4d011.cdf
             LONGITUDE: 127W
             LATITUDE : 3N
             DEPTH (m): 0 to 100 (variance)
             TIME     : 17-AUG-1982 12:00
          11.33
*** Running ferret script: bn_linecolors.jnl
! bn_linecolors.jnl
! 5/2006 ACM
! test setting more line colors
 
set mode meta linecolors.plt
 
set mode linec:12
sho mode linecolors
      MODE            STATE        ARGUMENT
      LINECOLORS       SET              12
 
can win/all
set win/new
 
ppl color,7,100,65,51   ! orange
ppl color,8,0,55,0      ! dark green
ppl color,9,60,0,100    ! purple
ppl color,10,100,70,100 ! magenta
ppl color,11,80,70,60   ! tan
ppl color,12,100,88,0   ! yellow
 
plot/thick/line/i=1:100 \
 cos(i/20), cos(i/24), cos(i/28), cos(i/32), \
 cos(i/36), cos(i/40), cos(i/44), cos(i/48), \
 cos(i/52), cos(i/56), cos(i/60), cos(i/64)
 
set mode/last meta
 
! Test choosing individual colors and thickness combinations
! All commands except for contour have /THICK
 
plot/color=7/thick=3/i=1:100 cos(i/10)
plot/over/color=8/thick=2/i=1:100 cos(i/12)
plot/over/color=12/thick=1/i=1:100 cos(i/8)
 
vector/color=11/thick=2/i=1:100/j=1:100 cos(i/10)+sin(j/14), cos(i/20)-sin(j/30)
 
polygon/thick=3/color=12/palette=purple {1,2,1}, {2,1,0.5}
 
contour/color=7/i=1:100/j=1:100 cos(i/10)+sin(j/14)
contour/over/color=20/i=1:100/j=1:100 cos(i/15)+sin(j/20)
 
can mode linecolors
sho mode linecolors
      MODE            STATE        ARGUMENT
      LINECOLORS       SET               6
 
! resetting line colors with cancel mode does not
! take effect until we do a SET WIN/NEW
 
plot/line/i=1:100 \
 cos(i/20), cos(i/24), cos(i/28), cos(i/32), \
 cos(i/36), cos(i/40), cos(i/44), cos(i/48), \
 cos(i/52), cos(i/56), cos(i/60), cos(i/64)
 
set win/new
plot/line/i=1:100\
 cos(i/20), cos(i/24), cos(i/28), cos(i/32), \
 cos(i/36), cos(i/40), cos(i/44), cos(i/48), \
 cos(i/52), cos(i/56), cos(i/60), cos(i/64)
 
can win/all
set win/new
 
*** Running ferret script: bn_cdf_errmsg_noremote.jnl
! bn_cdf_errmsg_noremote.jnl
! ACM 7/13/2006
! test reporting of cdf error messages from OPeNDAP library v3.6.2
 
set mode ignore
 
! bad file names; file missing or misspelled
use this_is_not_a_file.nc
 
! Intentional errors
 
! Not a netCDF file: Create an ascii file with extension .nc
 
list/nohead/file=asc.dat {1,2,3}
 
sp rm -f asc.nc
sp mv asc.dat asc.nc
use asc.nc
 
set mode/last ignore
 
*** Running ferret script: bn600_bug_fixes.jnl
! bn600_bug_fixes.jnl
! test various fixes that went into version 6.00
! 8/05 *acm*
!
 
! Bug 1129 axis formatting when /HLIM sets axis length < 0.15 deg
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_hlim_axislab.jnl
! err581_hlim_axislab.jn
! bug 1129
! When longitude range is small (<0.15 deg) using /HLIMITS
! axis labels do not have longitude labelling
 
def axis/x=-180:360:180/units=degrees xfull
def axis/y=90s:90n:90/units=degrees yfull
fill/hlim=312.23:312.380/vlim=37.03:40.91 0*x[gx=xfull] * y[gy=yfull]
 
!  Previously, list xaxis showed LABEL FORMAT is auto, not LONE
ppl list xaxis


         XAXIS QUALITIES
         LO= 3.12E+02 HI= 3.12E+02 TIC= 2.00E-02 LEN= 8.00E+00 CSIZE= 1.00E-01
          TOP AXIS= ON  BOTTOM AXIS= ON 
         MANUAL  NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         XORG= 1.20E+00  LABEL FORMAT=  (F8.3,'LONE')       
 
! But /HLIM=312.23:312.3801/... works.
fill/hlim=312.23:312.3801/vlim=37.03:40.91 0*x[gx=xfull] * y[gy=yfull]
ppl list xaxis


         XAXIS QUALITIES
         LO= 3.12E+02 HI= 3.12E+02 TIC= 2.00E-02 LEN= 8.00E+00 CSIZE= 1.00E-01
          TOP AXIS= ON  BOTTOM AXIS= ON 
         MANUAL  NORMAL NMTC=  0 LINT=  2 LABEL= -1 NSIG=  2 NTIC= 10
         XORG= 1.20E+00  LABEL FORMAT=  (F8.2,'LONE')       
 
! Bug 1275 stray characters appear in data lines listing string data
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_list_stray_chars.jnl
! err581_list_stray_chars.jnl
! 8/2005 (acm) bug 1275  stray characters in data listing
!   (they are leftovers from the buffer containing the header line, was not reinitialized)
!   Also fix the header line so characters are chopped off less.
 
let id = {1, 2, 3, 4}
let country = {"US", "US", "XX", "CN"}
let type = {"MOORED BUOY", "MOORED BUOY", "MOORED BUOY", "MOORED BUOY"}
 
list/i=1:5 id, type, country
             X: 0.5 to 4.5
 Column  1: ID is {1, 2, 3, 4}
 Column  2: TYPE is {"MOORED BUOY", "MOORED BUOY", "MOORED BUOY", "MOORED BUOY"}
 Column  3: COUNTRY is {"US", "US", "XX", "CN"}
            ID       TYPE     COUNTRY
1   / 1:  1.000 "MOORED BUOY" "US"
2   / 2:  2.000 "MOORED BUOY" "US"
3   / 3:  3.000 "MOORED BUOY" "XX"
4   / 4:  4.000 "MOORED BUOY" "CN"
 
list/i=1:5 id, country, type
             X: 0.5 to 4.5
 Column  1: ID is {1, 2, 3, 4}
 Column  2: COUNTRY is {"US", "US", "XX", "CN"}
 Column  3: TYPE is {"MOORED BUOY", "MOORED BUOY", "MOORED BUOY", "MOORED BUOY"}
            ID  COUN      TYPE
1   / 1:  1.000 "US" "MOORED BUOY"
2   / 2:  2.000 "US" "MOORED BUOY"
3   / 3:  3.000 "XX" "MOORED BUOY"
4   / 4:  4.000 "CN" "MOORED BUOY"
 
 
 
! pattern matching for SHO FUNC failed to match all EF's
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_sho_func_pattern_match.jnl
! err581_sho_func_pattern_match.jnl
! bug 1186
! 8/2006
! Pattern matching for SHOW FUNCTION did not match *str  or *str*
! on external functions.
 
! Should list SIN and ASIN
sh func *sin
SIN(theta)
    theta: angle (radians)
ASIN(X)
    arcsin(X) in radians
    X: ABS(X) must be less than or equal to 1
! SHOULD list ELEMENT_INDEX, ELEMENT_INDEX_STRING, IS_ELEMENT_OF, IS_ELEMENT_OF_STR
sh func *element*
ELEMENT_INDEX(VAR,VALUES)
    Return index value in ARG2 for each point in ARG1
    VAR: Variable
    VALUES: list of indices
ELEMENT_INDEX_STR(VAR,STRINGS)
    Return index value in ARG2 for each string in ARG1 (case insensitive matching)
    VAR: string data to mask (STRING)
    STRINGS: list of strings to match (STRING)
ELEMENT_INDEX_STR_N(VAR,STRINGS)
    Return index value in ARG2 for each string in ARG1 (case sensitive matching)
    VAR: string data to mask (STRING)
    STRINGS: list of strings to match (STRING)
IS_ELEMENT_OF(VAR,VALUES)
    Returns 1 if first argument contains any of the values in 2nd arg, else 0
    VAR: data to test
    VALUES: values to search for
IS_ELEMENT_OF_STR(VAR,VALUES)
    Returns 1 if first argument contains any of the values in 2nd arg (case sensitive), else 0
    VAR: string (STRING)
    VALUES: strings to search (STRING)
IS_ELEMENT_OF_STR_N(VAR,VALUES)
    Returns 1 if 1st arg contains any of the values in 2nd arg, 2 if case-insensitve match, else 0
    VAR: string (STRING)
    VALUES: strings to search (STRING)
 
! FILL on data with subspan modulo axis, got wrong data
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_subspanx_fill_bug.jnl
! err581_subspanx_fill_bug.jnl
! bug 900: subspan longitude axis and hlimits gets wrong data
!
! Further fixes 5/2016, with other subspan modulo work.
! Don't list ppl$xlow, ppl$xhigh.
 
use coads_climatology
save/clobber/y=0/x=130e:80w/file=err581_subspanx_fill_bug.nc sst
can data/all; use err581_subspanx_fill_bug.nc
 
set view left; shade/x=120e:80w sst  ! works correctly
 
set view right; fill/x=120e:80w sst
 
! look at axis coord. range 5/9/2016
sh sym ppl$xmin, ppl$xmax    ! should be 131, 279
PPL$XMIN = "25.00000"
PPL$XMAX = "279.0000"
 
sp rm -f err581_subspanx_fill_bug.nc
 
! bug 1318 Spurious error message on USE file where file has axes with bounds.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_use_bounds.jnl
! err581_use_bounds.jnl
! bug 1318 Spurious error message on USE file where file has axes with bounds.
! 8/17/05 ACM
 
def axis/x xir = {1,4,6}
def axis/y yir = {12,42,50}
let aa = x[gx=xir]+ y[gy=yir]
 
save/clobber/file=xyir.nc aa
use xyir
 
! Bug 1332 variable not scaled unless it is first variable in stepfile.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_des_scale.jnl
! err581_des_scale.jnl  bug 1332. When using a descriptor file and
! a varriable has scale_factor and/or add_offset attributes, the
! variable is not scaled unless it is first variable in stepfile.
! acm 8/29/2005
 
! tok_short.des behaves correctly; the stepfile in it, sstok_short.nc lists
! variable sst first.
 
! tnok_short.des, containing sstnok_short.nc results in sst NOT being scaled
! because it is the second variable in the file.
 
! Data in SST should be rescaled in both des files to values 0.1699, 0.1799, ...
 
EXIT/SCRIPT   ! error in namelist record...
 
! Bug 1335 Zero-contour should be dark line.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_contour_zero_lev.jnl
! err581_contour_zero_lev.jnl
! acm 9/7/2005
! See bug report 1335
! Zero-contour should be dark line.
 
use coads_climatology
contour/lev=(-20,20,2) sst[L=1] - 20
 
! Bug 1339, code hangs with this combination of (-INF)(INF) levels and shakey
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_shakey_inf.jnl
! err581_shakey_inf.jnl
! acm 9/7/2005
 
! see bug report 1339; code hangs with this combination of (-INF)(INF) levels
! and SHAKEY with klab_dig=0 (argument 5)
 
use coads_climatology
fill/l=1/lev=(-inf)(0,30,2)(inf)/key/set sst
ppl shakey 1,0,.12,0,0,4,2,8,7.1,7.4
ppl fill
 
ppl/reset  ! undo the SHAKEY setting.
 
 
! Bug 918, immediate mode parsing in IF blocks
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_if_conditional.jnl
! err581_if_conditional.jnl  bug 918.
! acm 10/2005
! Immediate mode parsing: when in an IF block, and when
! the IF is false and therefore not being executed.
! Previously ferret attempted to parse the IF `a` THEN
! but could not because LET a=1 has not been executed/
!
! This should skip to the end, not trying to execute anything inside the IF 0 THEN
 
if 0 then
endif
 
say "finished the if block"
finished the if block
 
! Further tests, after this fix, we get an error
! **ERROR: variable unknown or not in data set: DXYMIN
! The code that skips statements inside the IF false THEN
! was bumping a stack on the internal IF statement...
 
define symbol xend -180
let key_flag = 0
 
IF `($xend) GT 360` THEN
 !-> IF 0 THEN
ENDIF
let dxymin = 0.20
if `dxymin lt 0.12` then
 !-> if 0 then
elif `dxymin lt 0.25` then
 !-> elif 1 then
  SAY "point G"
point G
endif
 
 
 
! try yet another test with a nested block if, not executed.
 
define symbol xend -180
let key_flag = 0
 
IF `($xend) GT 360` THEN
 !-> IF 0 THEN
ENDIF
let dxymin = 0.20
if `dxymin lt 0.12` then
 !-> if 0 then
elif `dxymin lt 0.25` then
 !-> elif 1 then
  SAY "point G"
point G
endif
 
! an entire IF ELSE ENDIF inside an IF clause which is not to be executed
 
IF `($xend) GT 360` THEN
 !-> IF 0 THEN
ELSE
  say "this is the ELSE that should execute"
this is the ELSE that should execute
ENDIF
 
! ELIF examples
 
go non_std_refmap 122.0 228.5 5 5 xline 0
 
! std_refmap.jnl -- requires Ferret V4.3 or later
! 5/96
 
! Mods 6.98 *jd/sh* to improve the aspect ratio of the refmap for t and z
! profiles.  Separate consideration given for each case:
 
! The case of "pt_orient == tseries" which has a horizontally oriented
! reference map, and the case of the default value for pt_orient == 0
! (zprofile), with a vertically oriented reference map, are optimized.
 
! The symbol pt_orient is set in std_gif_t.jnl.
 
! 7.2004 *jmclean* add symbol and min,max functions to keep longitude region with 360 degrees
 
 
! For example:
!	yes? go refmap 180 230 0 20 box 1
! and
!	yes? go refmap 80 80 0 20 yline 2
! and
!	yes? go refmap 70 90 0 20 yline 2 1
! and
!	yes? go refmap 30 180 30 30 xline 2
! and
!	yes? go refmap 30 180 20 60 xline 2 0 1
! and
!	yes? go refmap 180 180 -40 -40 point 2
! and
!	yes? go refmap 20 180 -40 60 point 2 1 1
 
! Description: draw a reference map with region indicated
 
! arguments:	     1    2    3    4    5     6        7         8
! Usage: GO refmap xmin xmax ymin ymax type magnify xcompress ycompress
 
! mins and maxs should be numerical values for lat/long
! type - may be "box", "xline", "yline", or "point" (default: "box")
! xcompress - may be 1 (indicating that X compression is applied or 0
!		(default: "0")
 
! e.g. to indicate a Y line in which X compression has been applied send
! type="yline" and xcompress="1"
 
! this script assumes that the viewport has already been set
 
! NOTE:  MAGNIFY FACTOR
! The argument magnify determines what resolution of land mask is used.
 
!       magnify = 1 - INT(LOG(fraction)/LOG(2))
!               then clip magnify to the interval [1 to 5]
 
! check the region arguments
let refmap_xmin = $1%<Usage: GO refmap xmin xmax ymin ymax type magnify xcompress ycompress%
 !-> DEFINE VARIABLE refmap_xmin = 122.0
let refmap_xmax = $2%<Usage: GO refmap xmin xmax ymin ymax type magnify xcompress ycompress%
 !-> DEFINE VARIABLE refmap_xmax = 228.5
let refmap_ymin = $3%<Usage: GO refmap xmin xmax ymin ymax type magnify xcompress ycompress%
 !-> DEFINE VARIABLE refmap_ymin = 5
let refmap_ymax = $4%<Usage: GO refmap xmin xmax ymin ymax type magnify xcompress ycompress%
 !-> DEFINE VARIABLE refmap_ymax = 5
 
! set default args
DEFINE SYMBOL refmap_type $5%box|xline|yline|box|point|%
 !-> DEFINE SYMBOL refmap_type xline
DEFINE SYMBOL refmap_xcompress $7%0%
 !-> DEFINE SYMBOL refmap_xcompress 0
DEFINE SYMBOL refmap_ycompress $8%0%
 !-> DEFINE SYMBOL refmap_ycompress 0
 
! set the layout in the viewport
! (for performance the code from margins can be inserted in here and optimized)
! GO margins blah blah
 
! determine the lat/long limits to plot
set region/x=$1:$2/Y=$3:$4
 !-> set region/x=122.0:228.5/Y=5:5
 
! Keep longitude region within 360 degrees. Supposes that xhi-xlo <= 360
def sym ref_dx = `(360-ABS($2-$1))/2`
 !-> def sym ref_dx = 126.75
 
IF ($refmap_type%|box>1|*>0%) THEN    ! IF "box"
 !-> IF 0 THEN
ELIF ($refmap_type%|xline>1|*>0%) THEN    ! ELSE IF "xline"
 !-> ELIF 1 THEN
  define region/default/dy=$6"-30:30|1>-30:30|*>-20:20"/dx=$6"0:0|1>0:0|2>0:0|*>`max(-($ref_dx),-50)`:`min(($ref_dx),50)`" band
 !-> define region/default/dy=-20:20/dx=-50:50 band
ELIF ($refmap_type%|yline>1|*>0%) THEN    ! ELSE IF "yline"
 !-> ELIF 0 THEN
ENDIF
! init the land mask data set
set data coads_climatology
set region/L=1
! draw gray shaded continents
! known potential bug: if X region begins at, say, 0E then magnification 3
!	or greater results in negative modulo subscripts
 
shade/lev=(0,10000,10000)/nokey/nolab/palette=grey/@band/set sst
! ==> may want various IF tests to stylize plots: tics, numbering, etc.
 
IF ($refmap_type%|box>1|*>0) THEN    ! IF "box"
 !-> IF 0 THEN
ELIF ($refmap_type%|xline>1|*>0) THEN    ! ELSE IF "xline"
 !-> ELIF 1 THEN
  ppl axlint 3
  ppl shade
  ppl axlint 2
ELIF ($refmap_type%|yline>1|*>0) THEN    ! ELSE IF "yline"
 !-> ELIF 0 THEN
ENDIF
 
! some clean up now to assist with repeated testing
cancel region band
 
set data coads_climatology
set region/L=1
 
! draw a thick red region marker on the reference map
let refmap_xrng = IF i EQ 1 THEN refmap_xmin ELSE refmap_xmax
let refmap_yrng = IF i EQ 1 THEN refmap_ymin ELSE refmap_ymax
let refmap_xmid = ((refmap_xmin)+(refmap_xmax))/2
let refmap_ymid = ((refmap_ymin)+(refmap_ymax))/2
 
IF ($refmap_type%|box>1|*>0) THEN    ! IF "box"
 !-> IF 0 THEN
ELIF ($refmap_type%|xline>1|*>0) THEN    ! ELSE IF "xline"
 !-> ELIF 1 THEN
  IF ($refmap_ycompress) THEN
 !-> IF 0 THEN
  ENDIF
  plot/over/vs/nolab/line=8/i=1:2 refmap_xrng, refmap_ymid+(i-i)
ELIF ($refmap_type%|yline>1|*>0) THEN    ! ELSE IF "yline"
 !-> ELIF 0 THEN
ENDIF
 
! Reset to the current installed default color palette
palette default
 
! Bug 899
! Ungraceful STOP if we asl for multi-var transformations on axis where there is no data
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_illegal_trans.jnl
! err581_illegal_trans.jnl
! Ungraceful STOP if we do @VAR on an axis where there is no data
 
! 6/2018 *acm* This syntax is no longer illegal. This was reporting cases
! where a multi-axis transformation had been set up but the grid doesn't
! have the axes. Now, we detect the fact that the grid doesn't have a Z axis,
! and do the transformation as a 1-D transformation.
 
use coads_climatology
shade sst[x=@var,k=@var]
 
shade sst[t=@AVE,Z=@ave]
can mode ignore_error
 
 
! Bug 491
! missing flag gets scaled by scale and offset factors!
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_missing_scale_off.jnl
! err581_missing_scale_off.jnl
! ACM 11/8/05
! Bug 491 was not correctly fixed... missing flag was scaled with scale, offset
! attribute values.
 
! data contains missing value flag of -999 and scale of 0.1
! Previously this resulted in data values of -99 where should be missing.
 
use missing_scale_off.nc
say `tt,return=bad`
 !-> MESSAGE/CONTINUE -999
-999
list tt
             VARIABLE : 1 + 0*T[GT=DAYT]
             FILENAME : missing_scale_off.nc
             SUBSET   : 10 points (TIME)
 01-JAN-1990 00 /  1:  0.100
 02-JAN-1990 00 /  2:  0.200
 03-JAN-1990 00 /  3:  0.300
 04-JAN-1990 00 /  4:   ....
 05-JAN-1990 00 /  5:  0.500
 06-JAN-1990 00 /  6:  0.600
 07-JAN-1990 00 /  7:  0.700
 08-JAN-1990 00 /  8:   ....
 09-JAN-1990 00 /  9:  0.900
 10-JAN-1990 00 / 10:  1.000
 
 
! bug 1363
! SHOW GRID and other output have wrong dates, non-std calendar axesv
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_cal_dates_output.jnl
! err581_cal_dates_output.jnl
! bug 1363:
! SHOW GRID and other output have wrong dates, non-std calendar axesv
 
! create a time axis with 360-day calendar
def axis/t=1-jan-2000:1-jan-2005:1/units=months/cal=d360/t0=1-jan-1960 t360
let t3 = t[gt=t360]
save/clobber/file=t3file.nc t3
can var/all
can axis t360
 
! Bug showed date range of 30-JUL-2000 to  26-AUG-2005
set data t3file
sho grid t3
    GRID GCG1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 T360      TIME                61 r   01-JAN-2000 00:00    01-JAN-2005 00:00   full
 
! bug 1365
! STOP on shade command when modulo-regridding a time-limited nonstd calendar
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_noleap_mod.jnl
! err581_noleap_mod.jnl
! This is bug 1365: STOP on shade command
! when modulo-regridding a time-limited NOLEAP calendar
 
use gt4d011.cdf
set axis/cal=noleap `u,return=taxis`
 !-> set axis/cal=noleap TIME1
let a = u[t=1-sep-1982:1-jan-1983]
def axis/t/edge/mod/cal=noleap/unit=days/t0=1-jan-0001 mon_irreg_nlp = {0,31,59,90,120,151,181,212,243,273,304,334,365}
 
let a_clim = a[gt=mon_irreg_nlp@mod]
shade/y=0/k=1 a_clim
 
 
! bug 1392
! CANCEL DATA errors
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_cancel_data.jnl
! err581_cancel_data.jnl
 
!  test fixes for bug 1392:
!  cancel data 0000_a.nc
!  cancel data with a pathname, not just the dataset name
 
let a = {1,5,6}
save/clobber/file=0000_a.nc a
set data 0000_a.nc
can data 0000_a
 
sp rm -f subdir/a.dat
sp mkdir -p subdir
 
save/clobber/file="subdir/a.nc" a
use "subdir/a.nc"
sh data
     currently SET data sets:
    1> subdir/a.nc  (default)
 name     title                             I         J         K         L
 A        {1,5,6}                          1:3       ...       ...       ...
 
can data "subdir/a.nc"
sh data
     currently SET data sets:
save/clobber/file="subdir/0000_a.nc" a
set data "subdir/0000_a.nc"
sh data
     currently SET data sets:
    1> subdir/0000_a.nc  (default)
 name     title                             I         J         K         L
 A        {1,5,6}                          1:3       ...       ...       ...
 
can dat 0000_a
set data "subdir/0000_a.nc"
can dat 0000_a.nc
sh data
     currently SET data sets:
set data "subdir/0000_a.nc"
can dat "subdir/0000_a.nc"
sh data
     currently SET data sets:
 
sp rm -f subdir/a.nc
sp rm -f subdir/0000_a.nc
 
! bug 1394
! parsing time units of "months_since_event"
! CANCEL DATA errors
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_since_units.jnl
! err581_since_units.jnl
! bug 1394: units of months_since_event
! the "since" causes Ferret to try to parse "event" as a
! date for time origin.  Change so that if its not a date,
! we just keep the whole units string.
! also increase length of strings in line_units array.
 
def axis/t=1:3:1/unit="months_since_event" tax
let a = t[gt=tax]
save/clobber/file=a.nc a
 
can var a
can ax tax
use a
say `a,ret=tunits`
 !-> MESSAGE/CONTINUE months_since_event
months_since_event
list a
             VARIABLE : T[GT=TAX]
             FILENAME : a.nc
             SUBSET   : 3 points (T (months_since_event))
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 
 
! bug 1395
! parsing exponent expressions: 1.0e-5+0*7 misinterpreted
! CANCEL DATA errors
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_exp_spaces.jnl
! err581_exp_spaces.jnl
! bug 1395
! Expressions with an exponent immediately followed by an operator
! are parsed incorrectly, including the operator in the exponent:
!
! 1.0e-5+0*7  was parsed as (1.0e-5 + 0)* 7
! 1.0e-5 + 0*7  was parsed correctly
 
set mode ignore
 
list 1.0e-5+ 0*7
             VARIABLE : 1.0E-5+ 0*7
          1.000E-05
list 1.0e-5 + 0*7
             VARIABLE : 1.0E-5 + 0*7
          1.000E-05
list 1.0e-5+0*7
             VARIABLE : 1.0E-5+0*7
          1.000E-05
list 1000.6+ 0*7
             VARIABLE : 1000.6+ 0*7
          1001.
 
let xx= x[x=1:5]
 
list 1.0e-5 + 0*xx
             VARIABLE : 1.0E-5 + 0*XX
             SUBSET   : 5 points (X)
 1   / 1:  1.000E-05
 2   / 2:  1.000E-05
 3   / 3:  1.000E-05
 4   / 4:  1.000E-05
 5   / 5:  1.000E-05
list 1.0e-5 + 0*xx
             VARIABLE : 1.0E-5 + 0*XX
             SUBSET   : 5 points (X)
 1   / 1:  1.000E-05
 2   / 2:  1.000E-05
 3   / 3:  1.000E-05
 4   / 4:  1.000E-05
 5   / 5:  1.000E-05
list 1.0e-5+0*xx
             VARIABLE : 1.0E-5+0*XX
             SUBSET   : 5 points (X)
 1   / 1:  1.000E-05
 2   / 2:  1.000E-05
 3   / 3:  1.000E-05
 4   / 4:  1.000E-05
 5   / 5:  1.000E-05
 
can mode ignore
 
! bugs 439,1390: applying command context
GO bn_reset.jnl
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_command_cx.jnl
! err590_command_cx.jnl
! bugs 439 and 1390: the command context should apply to immed. mode evaluation
! only for action commands, not for commands like define
 
use gt4d011
def ax/np=`temp,r=lsize`/t=0:100 tax
 !-> def ax/np=25/t=0:100 tax
let n = `temp,r=lsize`
 !-> DEFINE VARIABLE n = 25
def ax/np=`n`/t=0:100 tax
 !-> def ax/np=25/t=0:100 tax
 
 
! but for an action command, the /I= should apply to the grave-accent
! expression, correctly giving an error
 
set mode ignore
plot/i=100/k=1 temp[x=`temp,r=xend`]
 !-> plot/i=100/k=1 temp[x=122.5W]
 
can mode ignore
 
! bug 1401: define 1-point axis with bounds; gets bounds wrong
GO bn_reset.jnl
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_define_1pt_bounds.jnl
! err581_define_1pt_bounds.jnl
! see bug 1401:
 
! Define a multipoint axis and it works fine.  Then define a 1-point axis and
! the result is wrong.  Then we repeat the first multipoint axis definition
! again, and even that result is now very wrong!! Same results in both v5.81
! for Linux and v5.70 for Irix.
 
def ax/x/bounds xax = {0,3,5},{-2,2,2,4,4,6}
list xboxlo[gx=xax],xboxhi[gx=xax],x[gx=xax]
             X: -2 to 6
 Column  1: XBOXLO is XBOXLO (axis XAX)
 Column  2: XBOXHI is XBOXHI (axis XAX)
 Column  3: X is X (axis XAX)
        XBOXLO  XBOXHI    X
0   / 1: -2.000  2.000  0.000
3   / 2:  2.000  4.000  3.000
5   / 3:  4.000  6.000  5.000
 
def ax/x/bounds xax = {0},{-2,2}
list xboxlo[gx=xax],xboxhi[gx=xax],x[gx=xax]
             X: 0
 Column  1: XBOXLO is XBOXLO (axis XAX)
 Column  2: XBOXHI is XBOXHI (axis XAX)
 Column  3: X is X (axis XAX)
         XBOXLO  XBOXHI    X
I / *:    -2.000  2.000  0.0000
 
def ax/x/bounds xax = {0,3,5},{-2,2,2,4,4,6}
list xboxlo[gx=xax],xboxhi[gx=xax],x[gx=xax]
             X: -2 to 6
 Column  1: XBOXLO is XBOXLO (axis XAX)
 Column  2: XBOXHI is XBOXHI (axis XAX)
 Column  3: X is X (axis XAX)
        XBOXLO  XBOXHI    X
0   / 1: -2.000  2.000  0.000
3   / 2:  2.000  4.000  3.000
5   / 3:  4.000  6.000  5.000
 
! Bug in strrindex when 1st argument is a list of strings
GO bn_reset.jnl
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_strrindex.jnl
! err581_strrindex.jnl
! 5/2/2006
! Bug in strrindex when 1st argument is a list of strings
! This resulted in a crash
 
let var = {"strings", "a.b", "cs.ds", "mmm", "amss.ffst"}
list strrindex(var,"s")
             VARIABLE : STRRINDEX(VAR,"s")
             SUBSET   : 5 points (X)
 1   / 1:  7.000
 2   / 2:  0.000
 3   / 3:  5.000
 4   / 4:  0.000
 5   / 5:  8.000
 
! POLYGON/LINE over a depth axis.
GO bn_reset.jnl
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err581_poly_rev.jnl
! err581_poly_rev.jnl
! POLYGON/LINE mis-locates the line when there is a depth or
! other reversed axis. Bugs 842, 843, 844
! ACM 8/10/2006
! V751:*acm* 6/2019 - memory is restored to the default in bn_reset
 
 
! From Patrick, polygon/line on a depth axis
 
set mem /size=200
 
use gt4d011
 
shade temp[i=@ave,l=1]
 
let v1={-3,2,0.5,2}
let v2={20,80,50,30}
let v3={10,-3,16,3}
 
! Overlay sample data over a variable with a depth axis
! /line=1 did not work
 
go polymark poly/lev=(-5,30,1)/pal=white/fill/line=1/nolab/over v1 v2 v3 circle 2
 
 
! XZ plot
shade temp[j=@ave,l=1]
let v1={221,225,232,235}
let v2={20,80,50,30}
let v3={10,-3,16,3}
 
go polymark poly/lev=(-5,30,1)/pal=white/fill/line=1/nolab/over v1 v2 v3 circle 2
 
 
! ZT plot
shade temp[i=@ave,j=@ave]
let v1={22800,23500,24800,26000}
let v2={20,80,50,30}
let v3={10,-3,16,3}
 
go polymark poly/lev=(-5,30,1)/pal=white/fill/line=1/nolab/over v1 v2 v3 circle 2
 
 
! And, from Andrew with other reversed axes.
 
ppl cross 1
plot/vl=4:-4/hl=4:-4/vs/line/title="there should be just one triangle" {1,2,3,1},{0,2,1,0}
poly/ov/col=2/pal=yellow {1,2,3,1},{0,2,1,0}
 
ppl cross 0
 
 
*** Running ferret script: bn601_bug_fixes.jnl
! bn601_bug_fixes.jnl
! test various fixes that went into version 6.01
! 20-Sep-2006 ACM
!
! Long name for bounds attribute was not read by Ferret
! Bug 1443
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err600_long_bounds_name
! err600_long_bounds_name.jnl
! Long name for bounds attribute was not read by Ferret
! Bug 1443
! 20-Sep-2006 ACM
 
 
def axis/x/bounds layer_between_two_pressure_difference_from_ground = {0,3,5},{-6,2,2,4.5,4.5,9}
let var = x[gx=layer_between_two_pressure_difference_from_ground] + 1
 
save/clobber/file=a.nc var
can var/all
 
! previously the following generated an error
use a
list  x[gx=var], xbox[gx=var], xboxlo[gx=var], xboxhi[gx=var]
             DATA SET: ./a.nc
             X: -6 to 9
 Column  1: X is X (axis LAYER_BETWEEN_TWO_PRESSURE_DIFFERENCE_FROM_GROUND)
 Column  2: XBOX is XBOX (axis LAYER_BETWEEN_TWO_PRESSURE_DIFFERENCE_FROM_GROUND)
 Column  3: XBOXLO is XBOXLO (axis LAYER_BETWEEN_TWO_PRESSURE_DIFFERENCE_FROM_GROUND)
 Column  4: XBOXHI is XBOXHI (axis LAYER_BETWEEN_TWO_PRESSURE_DIFFERENCE_FROM_GROUND)
             X   XBOX  XBOXLO XBOXHI
0   / 1:  0.000  8.000 -6.000  2.000
3   / 2:  3.000  2.500  2.000  4.500
5   / 3:  5.000  4.500  4.500  9.000
 
 
! Previously TM_CHECK_BNDS had not been used to check bounds on regular axes.
! bug1434
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err600_check_bounds_regular.jnl
! err600_check_bounds_regular.jnl
! Previously TM_CHECK_BNDS had not been used to check bounds on regular axes.
! bug1434
 
! 19-Sep-2006 ACM
 
use coads_climatology
save/clobber/l=1/j=45/file=b.nc/bounds sst
can data/all
use b
 
! previously had errors:
! bounds COADSX_bnds do not enclose point on axis COADSX
! Substituting coordinate midpoints
 
! Long values for symbols: previously symbol strings were cut off at 255 characters.
! Bug 1439
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err600_long_symbol_string.jnl
! err600_longsym_symbol_string.jnl
! Long values for symbols: previously strings were cut off at 255 characters.
! Bug 1439
! 20-Sep-2006 ACM
 
! Define a long symbol and use it in a function call
 
DEFINE SYMBOL longsym_a = "........10........20........30........40........50........60........70........80........90.......100.......110.......120.......130.......140.......150.......160.......170.......180.......190.......200.......210.......220.......230.......240.......250.......260.......270.......280.......290.......300.......310"
DEFINE SYMBOL longsym_b = "300.......310"
SHOW SYMBOL longsym_a, longsym_b
LONGSYM_A = ""........10........20........30........40........50........60........70........80........90.......100.......110.......120.......130.......140.......150.......160.......170.......180.......190.......200.......210.......220.......230.......240.......250.......260.......270.......280.......290.......300.......310""
LONGSYM_B = ""300.......310""
 
LIST STRINDEX(($longsym_a),($longsym_b))
 !-> LIST STRINDEX("........10........20........30........40........50........60........70........80........90.......100.......110.......120.......130.......140.......150.......160.......170.......180.......190.......200.......210.......220.......230.......240.......250.......260.......270.......280.......290.......300.......310","300.......310")
             VARIABLE : STRINDEX("........10........20........30........40........50........60........70........80........90.......100.......110.......120.......130.......140.......150.......160.......170
          298.0
 
! Now define a symbol from a file variable
use "longtitle1000.nc"
DEFINE SYMBOL longsym_1000 = "`a,return=dsettitle`"
 !-> DEFINE SYMBOL longsym_1000 = "
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
 
SHOW SYMBOL longsym_1000
LONGSYM_1000 = ""
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890""
 
DEFINE SYMBOL longsym_very_long = strcat (($longsym_a), ($longsym_1000))
 !-> DEFINE SYMBOL longsym_very_long = strcat ("........10........20........30........40........50........60........70........80........90.......100.......110.......120.......130.......140.......150.......160.......170.......180.......190.......200.......210.......220.......230.......240.......250.......260.......270.......280.......290.......300.......310", "
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890")
SHOW SYMBOL longsym_very_long
LONGSYM_VERY_LONG = "strcat ("........10........20........30........40........50........60........70........80........90.......100.......110.......120.......130.......140.......150.......160.......170.......180.......190.......200.......210.......220.......230.......240.......250.......260.......270.......280.......290.......300.......310", "
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890")"
 
CANCEL SYMBOL longsym*
 
! Global missing-value flag for dataset was not initialized and so was
! set to 0 when there was no global attribute in the file
! bug 1445
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err600_missing_flag.jnl
! noglobalhistory.nc has no global history attribute, and
! also the variable B has no missing or fill value flag
! Bug 1445: the missing-value flag got set to 0: (data values are 0,1,2,3)
 
use noglobalhistory.nc
list b
             VARIABLE : {0,1,2,3}
             FILENAME : noglobalhistory.nc
             SUBSET   : 4 points (X)
 1   / 1:  0.000
 2   / 2:  1.000
 3   / 3:  2.000
 4   / 4:  3.000
 
! should be 0,1,2,3; bug had first value missing.
 
 
! err600_returnsize.jnl
! bug 1447, where say `var[d=fname.cdf],return=size` failed
! ( a parsing error, confusing the dot in the filename with dot in `var.att,return=size` )
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err600_returnsize.jnl
! err600_returnsize.jnl
! ACM 10-4-2006
! bug 1447, where say `var[d=fname.cdf],return=size` failed
! ( a parsing error, confusing the dot in the filename with dot in `var.att,return=size` )
 
 
use coads_climatology.cdf
 
say `sst[d=coads_climatology.cdf],return=size`
 !-> MESSAGE/CONTINUE 48600
48600
say `sst.units,return=size`
 !-> MESSAGE/CONTINUE 5
5
 
define symbol the_x_axis = `sst,return=xaxis`
 !-> define symbol the_x_axis = COADSX
say `(($the_x_axis)).units,return=size`
 !-> MESSAGE/CONTINUE 12
12
 
! err600_if_comments_tab.jnl
! bug 1446  When there is a tab before a comment, the parsing gets
! thrown off and we got an error about an invalid ENDIF
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err600_if_comments_tab.jnl
! err600_if_comments_tab.jnl
! ACM 10-4-2006
! bug 1446  When there is a tab before a comment, the parsing gets
! thrown off and we got an error about an invalid ENDIF
 
IF 0 THEN
ENDIF
 
! Here there is a tab before the ! which throws off the parsing...
IF 0 THEN
ENDIF
 
! err600_set_var_title.jnl
! Bug 1454 Settings made by SET VAR/TITLE=/UNITS= were not saved in output file
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err600_set_var_title.jnl
! err600_set_var_title.jnl
! Bug 1454
! The settings made by SET VAR/TITLE=/UNITS= were not saved in output file
! ACM 10/11/06
 
! check the variable name and title in the list command output
use gtbc011
list/y=1/k=1/l=1 temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gtbc011.cdf
             SUBSET   : 3 points (LONGITUDE)
             LATITUDE : 0.833N
             DEPTH (m): 5
             TIME     : 15-MAR-1983 10:00
                0.83N 
                48
 160.5W / 70:  31.20
 159.5W / 71:  31.34
 158.5W / 72:  31.45
 
set var/title="Temp"/units="DegC" temp
list/y=1/k=1/l=1 temp  ! new title and units
             VARIABLE : Temp (DegC)
             FILENAME : gtbc011.cdf
             SUBSET   : 3 points (LONGITUDE)
             LATITUDE : 0.833N
             DEPTH (m): 5
             TIME     : 15-MAR-1983 10:00
                0.83N 
                48
 160.5W / 70:  31.20
 159.5W / 71:  31.34
 158.5W / 72:  31.45
 
save/file=a.nc/clobber temp
can data/all
use a.nc
! This listing should have the NEW var title and units
 list/y=1/k=1/l=1 temp
             VARIABLE : Temp (DegC)
             FILENAME : a.nc
             SUBSET   : 3 points (LONGITUDE)
             LATITUDE : 0.833N
             DEPTH (m): 5
             TIME     : 15-MAR-1983 10:00
               0.83N 
               48
 160.5W / 1:  31.20
 159.5W / 2:  31.34
 158.5W / 3:  31.45
 
! err600_var_label.jnl
! bug1442 If there is no long_name attribute, the plot should
! be labelled with the var name but it only has units label
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err600_var_label.jnl
! err600_var_label.jnl
! bug1442
! If there is no long_name attribute, the plot or listing
! should be labeled with the var name but it has only the units
 
use gtbc011
 
! line VARIABLE has longname (units)  which is TEMPERATURE (deg. C)
list/i=70/l=1/j=30/k=1 temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gtbc011.cdf
             LONGITUDE: 160.5W
             LATITUDE : 5.167S
             DEPTH (m): 5
             TIME     : 15-MAR-1983 10:00
          29.54
 
! Write, without the long_name attribute.
can att/output temp.long_name
save/file=a.nc/clobber temp
 
can data/all
use a.nc
sh att/all temp
     attributes for dataset: ./a.nc
 TEMP.missing_value = -1.E+34
 TEMP._FillValue = -1.E+34
 TEMP.history = From gt160w011 
 TEMP.units = deg. C 
 
! Label should be variablename (units) which is TEMP (deg. C)
list/i=70/l=1/j=30/k=1 temp
             VARIABLE : TEMP (deg. C)
             FILENAME : a.nc
             LONGITUDE: 159.5W(6320.5)
             LATITUDE : 5.167S
             DEPTH (m): 5
             TIME     : 15-MAR-1983 10:00
          29.72
 
! err600_upcase.jnl
! Bug 1461 upcasing of axis name on creating bounds variable for output
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err600_upcase.jnl
 ! err600_upcase.jnl
 ! 10/23/2006
 ! acm
 ! bug 1461: bounds variable is created for netcdf output with upcased axis name,
 !           but cd_write_var looked for it with original lowercase axis name.
 
SET MODE ignore_error
 
USE err600_upcase.nc
SAVE/CLOBBER/FILE=b.nc v
 
! this was the workaround for v6.0. After the fix this works the same as the above
CANCEL MODE upcase
SAVE/CLOBBER/FILE=b.nc v
 
SET MODE/LAST upcase_output
SET MODE/LAST ignore_error
 
! err600_let_d.jnl
! Making a LET/D= assignment caused the return of dimension names from the attribute
! structure fail, and the list of variable names was incorrect.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err600_let_d.jnl
! err600_let_d.jnl
! Making a LET/D= assignment caused the return of dimension
! names from the attribute structure fail, and the list of
! variable names was incorrect.
! 28-Nov-2006
 
use levitus_climatology
let/d=levitus_climatology temp_20 = temp[d=levitus_climatology,z=0:20@sum]
list ..dimnames
             VARIABLE : ..DIMNAMES
             FILENAME : levitus_climatology.cdf
             SUBSET   : 3 points (X)
 1   / 1:"XAXLEVITR1_160"
 2   / 2:"YAXLEVITR1_90" 
 3   / 3:"ZAXLEVITR1_1"  
list ..varnames
             VARIABLE : ..VARNAMES
             FILENAME : levitus_climatology.cdf
             SUBSET   : 2 points (X)
 1   / 1:"TEMP"   
 2   / 2:"temp_20"
 
! err600_nc_des_order.jnl
! Bug 1459 order of multiple descriptor file opening causes netCDF error
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err600_nc_des_order.jnl
! err600_nc_des_order.jnl
! 11/07/2006 ACM
!
! Bug 1459 order of multiple descriptor file opening causes netCDF error
! The bug results in:
!  ** netCDF error: NCSYSERR
! Due to incorrect resetting of sf_lunit in cd_init_dset.F
 
set data tok_short.des
set data ss_small.nc
set data mc_test.des
set data sstok_short.nc
 
stat rose[d=2]
 
             Surface relief
             LONGITUDE: 137.2645W to 135.7314W
             LATITUDE: 58.191N to 59.161N
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: ./data/ss_small.nc
 
 Total # of data points: 2576 (46*56*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: -592
 Maximum value: 3005
 Mean    value: 436.64 (unweighted average)
 Standard deviation: 563.43
 
can data/all
 
set data/form=cdf "ss_small.nc"
set data/form=cdf "sstok_short.nc"
SET DAT/FORM=CDF "mc_test.des"
 
stat rose[j=12,d=1]
 
             Surface relief
             LONGITUDE: 137.2645W to 135.7314W
             LATITUDE: 58.393N
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: ./data/ss_small.nc
 
 Total # of data points: 46 (46*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: -168
 Maximum value: 509
 Mean    value: 62.717 (unweighted average)
 Standard deviation: 156.25
 
! Bug 1470; redefine or reset attributes of an axis
! should change the axis definition and its attributes
! in the attribute structure.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err600_reset_redefine_axis.jnl
! err600_reset_redefine_axis.jnl
! Bug 1470; redefine or reset attributes of an axis
!   should change the axis definition and its attributes
!   in the attribute structure.
 
use coads_climatology
def sym timeax = `sst,return=taxis`
 !-> def sym timeax = TIME5
 
show att/all (($timeax))
 !-> show att/all (TIME5)
     attributes for dataset: ./data/coads_climatology.cdf
 (TIME5).units = hour since 0000-01-01 00:00:00 
 (TIME5).time_origin = 1-JAN-0000 00:00:00 
 (TIME5).modulo =   
 (TIME5).orig_file_axname = TIME 
show axis ($timeax)
 !-> show axis TIME5
 name       axis              # pts   start                end
 TIME5     TIME                 3mr   16-JAN 06:00         17-MAR 02:58
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 2191.455 (modulo length = 8765.82)
define axis/t0=1-jan-0001/t=1:3:1/unit=months ($timeax)
 !-> define axis/t0=1-jan-0001/t=1:3:1/unit=months TIME5
show att/all (($timeax))
 !-> show att/all (TIME5)
     attributes for dataset: ./data/coads_climatology.cdf
 (TIME5).units = MONTHS since 1-JAN-0001 
 (TIME5).time_origin = 1-JAN-0001 
 (TIME5).orig_file_axname = TIME 
show axis ($timeax)
 !-> show axis TIME5
 name       axis              # pts   start                end
 TIME5     TIME                 3 r   31-JAN-0001 10:29    02-APR-0001 07:27
T0 = 1-JAN-0001
   Axis span (to cell edges) = 3
 
! Changing axis with the SET AXIS command
 
can data/all
use gt4d011
def sym timeax = `temp,return=taxis`
 !-> def sym timeax = TIME11
show att/all (($timeax))
 !-> show att/all (TIME11)
     attributes for dataset: ./data/gt4d011.cdf
 (TIME11).units = hour since 1980-01-14 14:00:00 
 (TIME11).time_origin = 14-JAN-1980 14:00:00 
 (TIME11).orig_file_axname = TIME1 
show axis ($timeax)
 !-> show axis TIME11
 name       axis              # pts   start                end
 TIME11    TIME                25 r   17-AUG-1982 12:00    10-JAN-1983 12:00
T0 = 14-JAN-1980 14:00:00
   Axis span (to cell edges) = 3650
 
set ax/modulo/calendar=noleap/t0=1-jan-1900/units=days ($timeax)
 !-> set ax/modulo/calendar=noleap/t0=1-jan-1900/units=days TIME11
show att/all (($timeax))
 !-> show att/all (TIME11)
     attributes for dataset: ./data/gt4d011.cdf
 (TIME11).units = days since 1-JAN-1900 
 (TIME11).time_origin = 1-JAN-1900 
 (TIME11).orig_file_axname = TIME1 
 (TIME11).calendar = NOLEAP 
 (TIME11).modulo =   
show axis ($timeax)
 !-> show axis TIME11
 name       axis              # pts   start                end
 TIME11    TIME                25mr   14-MAR-1962 00:00    19-OCT-1971 00:00
T0 = 1-JAN-1900
CALENDAR = NOLEAP
   Axis span (to cell edges) = 3650 (modulo length = axis span)
 
 
! Changing axis with the CANCEL AXIS/ command
 
can data/all
use gt4d011
def sym timeax = `temp,return=taxis`
 !-> def sym timeax = TIME11
def sym zax = `temp,return=zaxis`
 !-> def sym zax = PSZT
show att/all (($timeax))
 !-> show att/all (TIME11)
     attributes for dataset: ./data/gt4d011.cdf
 (TIME11).units = hour since 1980-01-14 14:00:00 
 (TIME11).time_origin = 14-JAN-1980 14:00:00 
 (TIME11).orig_file_axname = TIME1 
show axis ($zax)
 !-> show axis PSZT
 name       axis              # pts   start                end
 PSZT      DEPTH (m)           27 i-  5                    3824
   Axis span (to cell edges) = 4149
 
cancel axis/modulo ($timeax)
 !-> cancel axis/modulo TIME11
show att/all (($timeax))
 !-> show att/all (TIME11)
     attributes for dataset: ./data/gt4d011.cdf
 (TIME11).units = hour since 1980-01-14 14:00:00 
 (TIME11).time_origin = 14-JAN-1980 14:00:00 
 (TIME11).orig_file_axname = TIME1 
show axis ($timeax)
 !-> show axis TIME11
 name       axis              # pts   start                end
 TIME11    TIME                25 r   17-AUG-1982 12:00    10-JAN-1983 12:00
T0 = 14-JAN-1980 14:00:00
   Axis span (to cell edges) = 3650
cancel axis/depth ($zax)
 !-> cancel axis/depth PSZT
show att/all (($zax))
 !-> show att/all (PSZT)
     attributes for dataset: ./data/gt4d011.cdf
 (PSZT).units = METERS 
 (PSZT).positive = up 
 (PSZT).point_spacing = uneven 
 (PSZT).edges = PSZTedges 
 (PSZT).orig_file_axname = PSZT 
show axis ($zax)
 !-> show axis PSZT
 name       axis              # pts   start                end
 PSZT      Z (METERS)          27 i   5                    3824
   Axis span (to cell edges) = 4149
 
 
! err600_ferret_axis_names.jnl
! If Ferret needed to rename an axis on file initialization for uniqueness,
! we now keep that new name in the attr structure, and an attribute
! orig_file_axname keeps the input name.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err600_ferret_axis_names.jnl
! err600_ferret_axis_names.jnl
! If Ferret needed to rename an axis on file initialization for uniqueness,
! we now keep that new name in the attr structure, and add an attribute
! orig_file_axname with the input name. That orig name is used only on output.
 
def axis/t=1:5:1 time
use coads_climatology
 
! Note TIME1 with attribute orig_file_axname
sh dat/att
     currently SET data sets:
    1> ./data/coads_climatology.cdf  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        28   T       FERRET V4.91 (GUI)  1-Mar-99
  
(COADSX)               DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        6    F       COADSX
  
(COADSY)               DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        6    F       COADSY
  
(TIME6)                DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        19   T       1-JAN-0000 00:00:00
                                 modulo          CHAR        1    T
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 SST                   FLOAT     missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        23   T       SEA SURFACE TEMPERATURE
                                 history         CHAR        22   T       From coads_climatology
                                 units           CHAR        5    T       Deg C
  
save/clobber/bounds/file=a.nc/x=181/y=1 sst
 
can data/all
use gt4d011
save/clobber/file=t2.nc temp[L=2:6]
save/clobber/file=t12.nc temp[L=12:16]
can data/all
 
use t2.nc; use t12.nc
 
sho dat/att
     currently SET data sets:
    1> ./t2.nc
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(PSXT91_108)           DOUBLE    units           CHAR        12   T       degrees_east
                                 point_spacing   CHAR        4    T       even
                                 modulo          DOUBLE      1    T       360
                                 axis            CHAR        1    T       X
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        10   F       PSXT91_108
  
(PSYT35_56)            DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        6    T       uneven
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 bounds          CHAR        14   T       PSYT35_56_bnds
                                 orig_file_axname
                                                 CHAR        9    F       PSYT35_56
  
 PSYT35_56_bnds        DOUBLE
  
(PSZT1_10)             DOUBLE    units           CHAR        6    T       meters
                                 positive        CHAR        4    T       down
                                 point_spacing   CHAR        6    T       uneven
                                 axis            CHAR        1    T       Z
                                 standard_name   CHAR        5    F       depth
                                 bounds          CHAR        13   T       PSZT1_10_bnds
                                 orig_file_axname
                                                 CHAR        8    F       PSZT1_10
  
 PSZT1_10_bnds         DOUBLE
  
(TIME11)               DOUBLE    units           CHAR        30   T       hour since 1980-01-14 14:00:00
                                 time_origin     CHAR        20   T       14-JAN-1980 14:00:00
                                 axis            CHAR        1    T       T
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        6    F       TIME11
  
 TEMP                  FLOAT     missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        11   T       TEMPERATURE
                                 history         CHAR        12   T       From gt4d011
                                 units           CHAR        6    T       deg. C
  
    2> ./t12.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(PSXT91_108)           DOUBLE    units           CHAR        12   T       degrees_east
                                 point_spacing   CHAR        4    T       even
                                 modulo          DOUBLE      1    T       360
                                 axis            CHAR        1    T       X
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        10   F       PSXT91_108
  
(PSYT35_56)            DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        6    T       uneven
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 bounds          CHAR        14   T       PSYT35_56_bnds
                                 orig_file_axname
                                                 CHAR        9    F       PSYT35_56
  
 PSYT35_56_bnds        DOUBLE
  
(PSZT1_10)             DOUBLE    units           CHAR        6    T       meters
                                 positive        CHAR        4    T       down
                                 point_spacing   CHAR        6    T       uneven
                                 axis            CHAR        1    T       Z
                                 standard_name   CHAR        5    F       depth
                                 bounds          CHAR        13   T       PSZT1_10_bnds
                                 orig_file_axname
                                                 CHAR        8    F       PSZT1_10
  
 PSZT1_10_bnds         DOUBLE
  
(TIME111)              DOUBLE    units           CHAR        30   T       hour since 1980-01-14 14:00:00
                                 time_origin     CHAR        20   T       14-JAN-1980 14:00:00
                                 axis            CHAR        1    T       T
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        6    F       TIME11
  
 TEMP                  FLOAT     missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        11   T       TEMPERATURE
                                 history         CHAR        12   T       From gt4d011
                                 units           CHAR        6    T       deg. C
  
 
! err600_tab_comma_missingdat.jnl
! when data contains missing values list/format=comma or list/format=tab
! should output a comma or tab as placeholder for the missing value
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err600_tab_comma_missingdat.jnl
! err600_tab_comma_missingdat.jnl
! 11/21/2006 acm
 
! when data contains missing values: extra comma as placeholder
let a = {1,1,2,1,1,2,1,1}
let b = {4,4,4,4,4,4,4,4}
set var/bad=2 a
list/form=comma a,b
             X: 0.5 to 8.5
 Column  1: A is {1,1,2,1,1,2,1,1}    BAD FLAG : 2
 Column  2: B is {4,4,4,4,4,4,4,4}    BAD FLAG : -1.E+34
       A,B
1   / 1:1,4  
2   / 2:1,4  
3   / 3:2,4  
4   / 4:1,4  
5   / 5:1,4  
6   / 6:2,4  
7   / 7:1,4  
8   / 8:1,4  
list/form=comma a,b,a
             X: 0.5 to 8.5
 Column  1: A is {1,1,2,1,1,2,1,1}    BAD FLAG : 2
 Column  2: B is {4,4,4,4,4,4,4,4}    BAD FLAG : -1.E+34
 Column  3: A is {1,1,2,1,1,2,1,1}    BAD FLAG : 2
       A,B,A
1   / 1:1,4,1  
2   / 2:1,4,1  
3   / 3:2,4,2  
4   / 4:1,4,1  
5   / 5:1,4,1  
6   / 6:2,4,2  
7   / 7:1,4,1  
8   / 8:1,4,1  
 
! when data contains missing values: extra tab as placeholder
let a = {1,1,2,1,1,2,1,1}
let b = {4,4,4,4,4,4,4,4}
set var/bad=2 a
list/form=tab a,b
             X: 0.5 to 8.5
 Column  1: A is {1,1,2,1,1,2,1,1}    BAD FLAG : 2
 Column  2: B is {4,4,4,4,4,4,4,4}    BAD FLAG : -1.E+34
       A	B
1   / 1:1	4  
2   / 2:1	4  
3   / 3:2	4  
4   / 4:1	4  
5   / 5:1	4  
6   / 6:2	4  
7   / 7:1	4  
8   / 8:1	4  
list/form=tab a,b,a
             X: 0.5 to 8.5
 Column  1: A is {1,1,2,1,1,2,1,1}    BAD FLAG : 2
 Column  2: B is {4,4,4,4,4,4,4,4}    BAD FLAG : -1.E+34
 Column  3: A is {1,1,2,1,1,2,1,1}    BAD FLAG : 2
       A	B	A
1   / 1:1	4	1  
2   / 2:1	4	1  
3   / 3:2	4	2  
4   / 4:1	4	1  
5   / 5:1	4	1  
6   / 6:2	4	2  
7   / 7:1	4	1  
8   / 8:1	4	1  
 
! err600_vec_aspect.jnl
! VECTOR/ASPECT plots are wrong (incorrect fix for bug 1348)
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err600_vec_aspect.jnl
! err600_vec_aspect.jnl
! VECTOR/ASPECT plots are wrong (incorrect fix for bug 1348)
! 12/04/2006
 
use gt4d011.cdf
vec/k=1/l=1 u,v
vec/over/asp/k=1/l=1 u,v
 
! Irregular axes
 
def axis/from_data/x/name=xirr/units=deg/modulo  {0,1,2,4,6,7,8,10,14,16,20,23,24}
def axis/from_data/y/name=yirr/units=deg  {0,2,4,5,6,7,8,9,12,13,14,15,18}
let a = 0.1*x[gx=xirr] + 4*y[gy=yirr]
let b = 3*x[gx=xirr] + y[gy=yirr]
vec a,b
vec/asp/over a,b
 
! err600_save_two.jnl
! Bug 1478: save two variables with the same time axis to a file, error
! when checking whether 2nd variable has same grid.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err600_save_two.jnl
! err600_save_two.jnl
! 12/11/2006
! Bug 1478: save two variables with the same time axis to a file.
! got error attempt to redefine line; axis TIME doesnt match CDF file
! This was due to upcasing of output axis TIME, which needed to be upcased
! before checking whether record axis of the second variable matched the
! one just written to the output file.
 
use "a1478.nc"
use "b1478.nc"
save/clobber/file="out.nc" olr[d=1], swdn_toa[d=2]
 
! err600_nc_des_order.jnl
! Bug 1459 order of multiple descriptor file opening causes netCDF error
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err600_nc_des_order.jnl
! err600_nc_des_order.jnl
! 11/07/2006 ACM
!
! Bug 1459 order of multiple descriptor file opening causes netCDF error
! The bug results in:
!  ** netCDF error: NCSYSERR
! Due to incorrect resetting of sf_lunit in cd_init_dset.F
 
set data tok_short.des
set data ss_small.nc
set data mc_test.des
set data sstok_short.nc
 
stat rose[d=2]
 
             Surface relief
             LONGITUDE: 137.2645W to 135.7314W
             LATITUDE: 58.191N to 59.161N
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: ./data/ss_small.nc
 
 Total # of data points: 2576 (46*56*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: -592
 Maximum value: 3005
 Mean    value: 436.64 (unweighted average)
 Standard deviation: 563.43
 
can data/all
 
set data/form=cdf "ss_small.nc"
set data/form=cdf "sstok_short.nc"
SET DAT/FORM=CDF "mc_test.des"
 
stat rose[j=12,d=1]
 
             Surface relief
             LONGITUDE: 137.2645W to 135.7314W
             LATITUDE: 58.393N
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: ./data/ss_small.nc
 
 Total # of data points: 46 (46*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: -168
 Maximum value: 509
 Mean    value: 62.717 (unweighted average)
 Standard deviation: 156.25
*** Running ferret script: bn_set_strides.jnl
! bn_set_strides.jnl
! Jing Li, 11/2006
! tests for SET AXIS/STRIDES
 
! 1/2007 ACM change show axis/all to show commands for individual axes;
!            When run among other benchmark tests, there are a bunch of
!            unrelated axes already defined, which get in the way of
!            seeing the desired output.
 
!set mode ignore_error
 
!..............1. ignore STRIDE = 1
use coads_climatology
show axis `sst,return=xaxis`
 !-> show axis COADSX
 name       axis              # pts   start                end
 COADSX    LONGITUDE          180mr   21E                  19E(379)
   Axis span (to cell edges) = 360 (modulo length = axis span)
show axis `sst,return=yaxis`
 !-> show axis COADSY
 name       axis              # pts   start                end
 COADSY    LATITUDE            90 r   89S                  89N
   Axis span (to cell edges) = 180
show axis `sst,return=taxis`
 !-> show axis TIME
 name       axis              # pts   start                end
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 2191.455 (modulo length = 8765.82)
set axis/stride=1/offset=1 `sst, return=xaxis`
 !-> set axis/stride=1/offset=1 COADSX
show axis `sst,return=xaxis`
 !-> show axis COADSX
 name       axis              # pts   start                end
 COADSX    LONGITUDE          180mr   21E                  19E(379)
   Axis span (to cell edges) = 360 (modulo length = axis span)
cancel data/all
 
!..............2. illegal to stride an already strided axis
use coads_climatology
set axis/stride=2/offset=1 `sst, return=xaxis`
 !-> set axis/stride=2/offset=1 COADSX
show axis `sst,return=xaxis`
 !-> show axis (AX###)
 name       axis              # pts   start                end
 (AX###)   LONGITUDE           90mr   23E                  19E(379)
   Axis span (to cell edges) = 360 (modulo length = axis span)
!can't stride it again
set mode ignore_error
set axis/stride=2/offset=1 `sst, return=xaxis`
 !-> set axis/stride=2/offset=1 (AX###)
show axis `sst,return=xaxis`
 !-> show axis (AX###)
 name       axis              # pts   start                end
 (AX###)   LONGITUDE           90mr   23E                  19E(379)
   Axis span (to cell edges) = 360 (modulo length = axis span)
set mode/last ignore
cancel data/all
 
!..............3. only set STRIDE
use coads_climatology
 
! --- before striding
 
list sst[i=21:30,j=50,k=1,l=50]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 10 points (LONGITUDE)
             LATITUDE : 9N
             TIME     : 15-FEB-0012 14:19
               9N    
               50
 61E   / 21:  26.86
 63E   / 22:  27.00
 65E   / 23:  27.29
 67E   / 24:  27.69
 69E   / 25:  27.93
 71E   / 26:  28.08
 73E   / 27:  28.23
 75E   / 28:  28.32
 77E   / 29:  28.23
 79E   / 30:  27.82
 
! --- after set striding
 
set axis/stride=2 `sst, return=xaxis`
 !-> set axis/stride=2 COADSX
list sst[i=11:15,j=50,k=1,l=50]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 5 points (LONGITUDE)
             LATITUDE : 9N
             TIME     : 15-FEB-0012 14:19
               9N    
               50
 61E   / 11:  26.86
 65E   / 12:  27.29
 69E   / 13:  27.93
 73E   / 14:  28.23
 77E   / 15:  28.23
 
 
! --- after cancel striding
cancel axis/stride `sst,return=xaxis`
 !-> cancel axis/stride (AX###)
list sst[i=21:30,j=50,k=1,l=50]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 10 points (LONGITUDE)
             LATITUDE : 9N
             TIME     : 15-FEB-0012 14:19
               9N    
               50
 61E   / 21:  26.86
 63E   / 22:  27.00
 65E   / 23:  27.29
 67E   / 24:  27.69
 69E   / 25:  27.93
 71E   / 26:  28.08
 73E   / 27:  28.23
 75E   / 28:  28.32
 77E   / 29:  28.23
 79E   / 30:  27.82
cancel data/all
 
!.............4. only set OFFSET
! ingored if you only set OFFSET
 
use coads_climatology
set axis/offset=1 `sst, return=xaxis`
 !-> set axis/offset=1 COADSX
show axis `sst,return=xaxis`
 !-> show axis COADSX
 name       axis              # pts   start                end
 COADSX    LONGITUDE          180mr   21E                  19E(379)
   Axis span (to cell edges) = 360 (modulo length = axis span)
 
set mode ignore
cancel axis/stride `sst,return=xaxis`
 !-> cancel axis/stride COADSX
set mode/last ignore
cancel data/all
 
 
!.............5. OFFSET .LE. STRIDE
use coads_climatology
set mode ignore
set axis/stride=2/offset=4 `sst, return=xaxis`
 !-> set axis/stride=2/offset=4 COADSX
set mode/last ignore
cancel data/all
 
!.............6. SHOW GRID/DYNAMIC
use coads_climatology
set axis/stride=4/offset=2 `sst, return=xaxis`
 !-> set axis/stride=4/offset=2 COADSX
show grid/dynamic
Dynamic grids:
    no implicit grids
Dynamic axes:
    AXIS (AX###)                         use count:   1
cancel data/all
 
!.............7. cancel stride on a non-strided axis
use coads_climatology
set mode ignore
cancel axis/stride `sst,return=xaxis`
 !-> cancel axis/stride COADSX
set mode/last ignore
 
cancel data/all
 
!.............8. striding on a modulo axis
 
! --- 8.1 stride value is an integer factor of the axis length
! the strided axis will inherit the modulo property of its parent
 
use coads_climatology
set axis/stride=6/offset=5 `sst,return=xaxis`
 !-> set axis/stride=6/offset=5 COADSX
show axis `sst,return=xaxis`
 !-> show axis (AX###)
 name       axis              # pts   start                end
 (AX###)   LONGITUDE           30mr   31E                  19E(379)
   Axis span (to cell edges) = 360 (modulo length = axis span)
cancel axis/stride `sst,return=xaxis`
 !-> cancel axis/stride (AX###)
 
!--- 8.2 stride value is not an integer factor of the axis length
! warning: it may lose modulo property
set axis/stride=7/offset=5 `sst,return=xaxis`
 !-> set axis/stride=7/offset=5 COADSX
show axis `sst,return=xaxis`
 !-> show axis (AX###)
 name       axis              # pts   start                end
 (AX###)   LONGITUDE           25 r   31E                  7E(367)
   Axis span (to cell edges) = 350
cancel axis/stride `sst,return=xaxis`
 !-> cancel axis/stride (AX###)
cancel data/all
 
! --- 8.3 testing strided modulo axis
use coads_climatology
set axis/stride=2/offset=1 `sst,return=xaxis`
 !-> set axis/stride=2/offset=1 COADSX
shade/x=-180:180/y=-30:70/L=2 sst
cancel axis/stride `sst,return=xaxis`
 !-> cancel axis/stride (AX###)
cancel data/all
 
!.............9. two datasets share the same grid
 
! --- 9.1 test: use A - use B - stride
! use A; use B; set axis/stride=2 `var[d=A], return=axis`
! -- will affect variables in B
use coads_climatology
save/clobber/file=d2.nc sst[L=1]
use d2
list/x=180:195/j=30/L=1 sst[d=d2]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : d2.nc
             SUBSET   : 8 points (LONGITUDE)
             LATITUDE : 31S
             TIME     : 16-JAN 06:00
                31S   
                30
 179W   / 81:  22.53
 177W   / 82:  22.71
 175W   / 83:  22.44
 173W   / 84:  22.21
 171W   / 85:  21.86
 169W   / 86:  22.07
 167W   / 87:  22.30
 165W   / 88:  22.28
set axis/stride=2 `sst[d=coads_climatology], return=xaxis`
 !-> set axis/stride=2 COADSX
list/x=180:195/j=30/L=1 sst[d=d2]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : d2.nc
             SUBSET   : 4 points (LONGITUDE)
             LATITUDE : 31S
             TIME     : 16-JAN 06:00
                31S   
                30
 179W   / 41:  22.53
 175W   / 42:  22.44
 171W   / 43:  21.86
 167W   / 44:  22.30
 
cancel data/all
 
! --- 9.2 test: use A -stride -useB
! use A; set axis/stride=2 `var[d=A], return=xaxis`; use B
! -- will not affect variables in B
use coads_climatology
set axis/stride=2 `sst[d=coads_climatology], return=xaxis`
 !-> set axis/stride=2 COADSX
list/x=180:195/j=30/L=1 sst[d=coads_climatology]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 4 points (LONGITUDE)
             LATITUDE : 31S
             TIME     : 16-JAN 06:00
                31S   
                30
 179W   / 41:  22.53
 175W   / 42:  22.44
 171W   / 43:  21.86
 167W   / 44:  22.30
use d2
list/x=180:195/j=30/L=1 sst[d=d2]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : d2.nc
             SUBSET   : 8 points (LONGITUDE)
             LATITUDE : 31S
             TIME     : 16-JAN 06:00
                31S   
                30
 179W   / 81:  22.53
 177W   / 82:  22.71
 175W   / 83:  22.44
 173W   / 84:  22.21
 171W   / 85:  21.86
 169W   / 86:  22.07
 167W   / 87:  22.30
 165W   / 88:  22.28
 
can data/all
 
!.............10. strides on permuted and reversed axes
 
! --- 10.1 stride on a permuted axis
use/order=yzt coads_climatology
show data/all
     currently SET data sets:
    1> ./data/coads_climatology.cdf  (default)
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          ...       1:180     1:90      1:3
 
set axis/stride=5 `sst,return=yaxis`
 !-> set axis/stride=5 COADSX
show axis `sst,return=yaxis`
 !-> show axis (AX###)
 name       axis              # pts   start                end
 (AX###)   LONGITUDE           36mr   21E                  11E(371)
   Axis span (to cell edges) = 360 (modulo length = axis span)
 
can data/all
 
! --- 10.2 stride on a reversed axis -- YAXIS
use/order=x-yt coads_climatology
list/x=180/l=5 sst[j=1:30]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 30 points (LATITUDE)
             LONGITUDE: 179E
             TIME     : 15-JAN 11:49
              179E   
               80
 31S   / 30:  18.47
 33S   / 29:  17.05
 35S   / 28:  15.94
 37S   / 27:  14.53
 39S   / 26:  12.83
 41S   / 25:  11.11
 43S   / 24:   8.80
 45S   / 23:   6.42
 47S   / 22:   4.83
 49S   / 21:   4.08
 51S   / 20:   3.89
 53S   / 19:   3.48
 55S   / 18:   3.20
 57S   / 17:   2.52
 59S   / 16:   1.90
 61S   / 15:   1.04
 63S   / 14:   0.14
 65S   / 13:   ....
 67S   / 12:   ....
 69S   / 11:   ....
 71S   / 10:   ....
 73S   /  9:   ....
 75S   /  8:   ....
 77S   /  7:   ....
 79S   /  6:   ....
 81S   /  5:   ....
 83S   /  4:   ....
 85S   /  3:   ....
 87S   /  2:   ....
 89S   /  1:   ....
 
set axis/stride=5/offset=3 `sst,return=yaxis`
 !-> set axis/stride=5/offset=3 COADSY
list/x=180/l=5  sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 18 points (LATITUDE)
             LONGITUDE: 179E
             TIME     : 15-JAN 11:49
              179E   
               80
 87N   / 18:   ....
 77N   / 17:  -0.20
 67N   / 16:   0.06
 57N   / 15:   7.30
 47N   / 14:  13.13
 37N   / 13:  19.97
 27N   / 12:  24.01
 17N   / 11:  28.03
 7N    / 10:  29.14
 3S    /  9:  28.01
 13S   /  8:  27.10
 23S   /  7:  24.41
 33S   /  6:  17.05
 43S   /  5:   8.80
 53S   /  4:   3.48
 63S   /  3:   0.14
 73S   /  2:   ....
 83S   /  1:   ....
list/x=180/l=5 sst[j=3:14:2]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
                        regrid: 20 deg on Y
             FILENAME : coads_climatology.cdf
             SUBSET   : 6 points (LATITUDE)
             LONGITUDE: 179E
             TIME     : 15-JAN 11:49
             179E   
              80
 37N   / 6:  19.97
 17N   / 5:  28.03
 3S    / 4:  28.01
 23S   / 3:  24.41
 43S   / 2:   8.80
 63S   / 1:   0.14
 
cancel data/all
 
!.............11. stride on all axes
use coads_climatology
set axis/stride=2 `sst, return=xaxis`
 !-> set axis/stride=2 COADSX
set axis/stride=2 `sst, return=yaxis`
 !-> set axis/stride=2 COADSY
set axis/stride=2 `sst, return=taxis`
 !-> set axis/stride=2 TIME
 
show axis `sst,return=xaxis`
 !-> show axis (AX###)
 name       axis              # pts   start                end
 (AX###)   LONGITUDE           90mr   21E                  17E(377)
   Axis span (to cell edges) = 360 (modulo length = axis span)
show axis `sst,return=yaxis`
 !-> show axis (AX###)
 name       axis              # pts   start                end
 (AX###)   LATITUDE            45 r   89S                  87N
   Axis span (to cell edges) = 180
show axis `sst,return=taxis`
 !-> show axis (AX###)
 name       axis              # pts   start                end
 (AX###)   TIME                 2 r   16-JAN-0000 06:00    17-MAR-0000 02:58
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 2921.94
 
can data/all
 
!.............12. stride on a NORMAL axis
set mode ignore_error
use coads_climatology
set axis/stride=2 `sst,return=zaxis`
 !-> set axis/stride=2 NORMAL
set mode/last ignore_error
 
show axis `sst,return=xaxis`
 !-> show axis COADSX
 name       axis              # pts   start                end
 COADSX    LONGITUDE          180mr   21E                  19E(379)
   Axis span (to cell edges) = 360 (modulo length = axis span)
show axis `sst,return=yaxis`
 !-> show axis COADSY
 name       axis              # pts   start                end
 COADSY    LATITUDE            90 r   89S                  89N
   Axis span (to cell edges) = 180
show axis `sst,return=taxis`
 !-> show axis TIME
 name       axis              # pts   start                end
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 2191.455 (modulo length = 8765.82)
*** Running ferret script: bn_lsl_lowpass.jnl
! bn_lsl_lowpass.jnl
! Test lsl_lowpass, now included as a statically-linked external function
 
use gtsa056_2
let my_temp = temp[x=180,y=0,k=1]
let f_filtered = lsl_lowpass(my_temp, 40,10)
! plot my_temp
! plot/over f_filtered
 
! List the output so its not just a graphical test;
! Compute based on the whole T region, but just list a portion.
LIST/L=10:20 MY_TEMP[L=1:110], F_FILTERED[L=1:110]
             DATA SET: ./data/gtsa056_2.cdf
             TIME: 10-FEB-1982 10:30 to 15-MAR-1982 21:30
             LONGITUDE: 179.5E
             LATITUDE: 0.167S
             DEPTH (m): 5
 Column  1: MY_TEMP is TEMP[X=180,Y=0,K=1]
 Column  2: F_FILTERED is LSL_LOWPASS(MY_TEMP, 40,10)
                    MY_TEMP  F_FILTERED
11-FEB-1982 23 / 10:   27.50   27.51
15-FEB-1982 00 / 11:   27.47   27.48
18-FEB-1982 01 / 12:   27.45   27.44
21-FEB-1982 02 / 13:   27.41   27.42
24-FEB-1982 03 / 14:   27.37   27.40
27-FEB-1982 04 / 15:   27.35   27.39
02-MAR-1982 05 / 16:   27.39   27.39
05-MAR-1982 06 / 17:   27.43   27.40
08-MAR-1982 07 / 18:   27.41   27.41
11-MAR-1982 08 / 19:   27.41   27.42
14-MAR-1982 09 / 20:   27.42   27.43
 
*** Running ferret script: bn_return_xmod_tmod.jnl
! New `var,return=xmod` `var,return=tmod`
! Return modulo lengths, or blank if not modulo
 
use ocean_atlas_temp
sh grid temp
    GRID GBS1
 name       axis              # pts   start                end                 subset
 XAX_LEV9421_380 LONGITUDE    360mr   20.5E                19.5E(379.5)        full
 YAX_LEV94 LATITUDE           180 r   89.5S                89.5N               full
 ZAXLEVIT191_1 DEPTH (m)        1 r-  0                    0                   full
 TIME      TIME                 2mr   16-JAN 06:00         15-FEB 16:29        full
sh axis XAX_LEV9421_380
 name       axis              # pts   start                end
 XAX_LEV9421_380 LONGITUDE    360mr   20.5E                19.5E(379.5)
   Axis span (to cell edges) = 360 (modulo length = axis span)
sh axis time
 name       axis              # pts   start                end
 TIME      TIME                 2mr   16-JAN 06:00         15-FEB 16:29
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 1460.97 (modulo length = 8765.82)
say `temp,return=xmod`
 !-> MESSAGE/CONTINUE 360
360
say `temp,return=tmod`
 !-> MESSAGE/CONTINUE 8765.81982421875
8765.81982421875
 
! X is modulo but not T
use levitus_climatology.cdf
say `temp,return=xmod`
 !-> MESSAGE/CONTINUE 360
360
say `temp,return=tmod`
 !-> MESSAGE/CONTINUE

 
! Define some subspan modulo axes and check the results
! Modulo because start year in 0000
def ax/t=1-aug-0000:1-aug-0001/np=3/edge/units=days tsub
let a = t[gt=tsub]
say `a,return=tmod`
 !-> MESSAGE/CONTINUE 365.2424926757812
365.2424926757812
 
! Modulo because defined on longitude coordinates
define axis/x=130e:80w:10 xsub
let a = x[gx=xsub]
say `a,return=xmod`
 !-> MESSAGE/CONTINUE 360
360
 
! This file has an x axis with modulo = " " so its modulo, but it
! does not have units of degrees. Thus axis length = modulo length
use string4d
sh grid axy
    GRID GMS2
 name       axis              # pts   start                end                 subset
 X2AX      X                    2mr   1                    2                   full
 Y3AX      Y                    3 r   1                    3                   full
 Z4AX      Z                    4 r   1                    4                   full
 T2AX      T                    2 r   1                    2                   full
show axis x2ax
 name       axis              # pts   start                end
 X2AX      X                    2mr   1                    2
   Axis span (to cell edges) = 2 (modulo length = axis span)
say `axy,return=xmod`
 !-> MESSAGE/CONTINUE 2
2
*** Running ferret script: bn602_bug_fixes.jnl
! bn602_bug_fixes.jnl
! test various fixes that went into version 6.02
! 09-Nov-2006 ACM
 
! err601_sho_ax_xml_calendar.jnl
! bug 1468: SHOW AXIS/ALL/XML listed the wrong info for the calendar
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err601_sho_ax_xml_calendar.jnl
! err601_sho_ax_xml_calendar.jnl
! 11/8/2006 ACM
! bug 1468: SHOW AXIS/XML listed the wrong info for the calendar
! when a time axis has a non-standard calendar.
 
def axis/cal=noleap/t=1-jan-2000:1-jan-2002:1/units=days timenoleap
let v = sin(t[gt=timenoleap]/100)
save/clobber/file=noleap.nc v
use noleap.nc
sh axis/xml timenoleap
<axes>
<axis name="TIMENOLEAP">
<attribute name="direction" type="char">
   <value><![CDATA[L]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[DAYS since 1901-01-15]]></value>
</attribute>
<attribute name="length" type="short">
   <value>731</value>
</attribute>
<attribute name="start" type="double">
   <value>2000-01-01 00:00:00</value>
</attribute>
<attribute name="end" type="double">
   <value>2002-01-01 00:00:00</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="time_origin" type="char">
   <value><![CDATA[1901-01-15]]></value>
</attribute>
<attribute name="calendar" type="char">
   <value><![CDATA[NOLEAP]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="axis" type="char">
   <value><![CDATA[T]]></value>
</attribute>
<attribute name="standard_name" type="char">
   <value><![CDATA[time]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[TIMENOLEAP]]></value>
</attribute>
</axis>
</axes>
 
! err601_index_111.jnl
! bug 1463 region that points to index -111 on modulo axis confused
! with unspecified_int4.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err601_index_111.jnl
 
! err601_index_111.jnl
! 11/09/2006 ACM
! bug 1463 region that points to index -111 on modulo axis confused
! with unspecified_int4. Fixed by changing to -999.
 
! x=-203 corresponds to I=-111.
use coads_climatology
list x[gx=sst,x=-193:-203]
             VARIABLE : X
                        axis COADSX
             FILENAME : coads_climatology.cdf
             SUBSET   : 6 points (LONGITUDE)
 157E    / -111: -203.0
 159E    / -110: -201.0
 161E    / -109: -199.0
 163E    / -108: -197.0
 165E    / -107: -195.0
 167E    / -106: -193.0
 
 
! err601_irregular_axis.jnl
! Check for irregular axis actually being irregular failed; bug 1483
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err601_irregular_axis.jnl
! err601_irregular_axis.jnl
! V6.0 had a new scheme to check for irregular axes; for an axis
! whose delta-coordinates vary widely this failed.  See bug 1483
! The axis should be 6.792e-10, 1.368e-09, ..., 800, 1100, 1400
 
USE z_wide_variation.nc
SHOW GRID/Z atmos
    GRID GOR1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 ALTITUDE  Z (Pa)              50 i   6.7916E-10           1400                full
 TIME      TIME                 1mr   01-JAN 04:00         01-JAN 04:00        full
 
       K     Z                       ZBOX          ZBOXLO
       1>  0                         6.885E-10  0
       2>  0                         1.037E-09  0
       3>  0                         2.089E-09  0
       4>  0                         4.207E-09  0
       5>  0                         8.472E-09  0
       6>  0                         1.706E-08  0
       7>  0                         3.436E-08  0
       8>  0.0000001                 6.919E-08  0.0000001
       9>  0.0000002                 1.393E-07  0.0000001
      10>  0.0000004                 2.806E-07  0.0000003
      11>  0.0000007                 5.65E-07   0.0000006
      12>  0.0000015                 1.138E-06  0.0000011
      13>  0.000003                  2.291E-06  0.0000023
      14>  0.0000061                 4.614E-06  0.0000046
      15>  0.0000122                 9.291E-06  0.0000092
      16>  0.0000247                 1.871E-05  0.0000185
      17>  0.0000497                 3.768E-05  0.0000372
      18>  0.0001                    7.587E-05  0.0000748
      19>  0.0002014                 1.528E-04  0.0001507
      20>  0.0004056                 3.077E-04  0.0003035
      21>  0.0008168                 6.196E-04  0.0006112
      22>  0.0016448                 0.001248   0.0012308
      23>  0.0033121                 0.002513   0.0024784
      24>  0.0066698                 0.00506    0.004991
      25>  0.0134314                 0.01019    0.0100506
      26>  0.0270477                 0.02052    0.0202395
      27>  0.0544674                 0.04132    0.0407575
      28>  0.1096839                 0.0832044  0.0820756
      29>  0.2208762                 0.1675531  0.1652801
      30>  0.44479                   0.3374103  0.3328331
      31>  0.8956969                 0.679461   0.6702434
      32>  1.803712                  1.368287   1.3497044
      33>  3.6322701                 2.098144   2.7179911
      34>  6                         2.683865   4.816135
      35>  9                         3.5        7.5
      36>  13                        4.5        11
      37>  18                        6          15.5
      38>  25                        8.5        21.5
      39>  35                        12.5       30
      40>  50                        17.5       42.5
      41>  70                        25         60
      42>  100                       35         85
      43>  140                       50         120
      44>  200                       70         170
      45>  280                       100        240
      46>  400                       142.5      340
      47>  565                       200        482.5
      48>  800                       267.5      682.5
      49>  1100                      300        950
      50>  1400                      300        1250
 
 
! err601_check_missing_3arg.jnl
! see bug 1485, check on missing coordinates for 3-argument graphics
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err601_check_missing_3arg.jnl
! err601_check_missing_3arg.jnl
! see bug 1485: if missing coordinates in a curvilinear dataset, we should be
! able to still plot other portions of the data. Check was too broad.
 
! Create a dataset in curvilinear coordinates with a few missing coordinates.
use tripolar_subset
let lon = IF geolon_vert_t gt -276 then geolon_vert_t
let lat = geolat_vert_t
save/clobber/file=tripolar_missing_lon.nc lon, lat, ht
can data/all
can var/all
 
! Use this data. If we just look at /I=50:100 the plot works ok
use tripolar_missing_lon
stat/i=50:100 lon
 
             IF GEOLON_VERT_T GT -276 THEN GEOLON_VERT_T
             LONGITUDE: 177E(-183) to 81W(-81)
             LATITUDE: 71.508N to 90.374N
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: ./tripolar_missing_lon.nc
 
 Total # of data points: 1275 (51*25*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: -181.5
 Maximum value: -83.015
 Mean    value: -121.95 (unweighted average)
 Standard deviation: 24.836
shade/i=50:100 HT,lon,lat
 
! The STAT command loads all the coordinates, then when
! we plot, the check of coordinates looked at all of them
! rather than just those needed. (error  was
! X coordinates missing value where val is needed
 
can mem/all
stat LON, LAT
 
             IF GEOLON_VERT_T GT -276 THEN GEOLON_VERT_T
             LONGITUDE: 79E(-281) to 81E
             LATITUDE: 71.508N to 90.374N
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: ./tripolar_missing_lon.nc
 
 Total # of data points: 4525 (181*25*1*1*1*1)
 # flagged as bad  data: 186
 Minimum value: -275.98
 Maximum value: 80
 Mean    value: -92.341 (unweighted average)
 Standard deviation: 106.62
 
             GEOLAT_VERT_T
             LONGITUDE: 79E(-281) to 81E
             LATITUDE: 71.508N to 90.374N
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: ./tripolar_missing_lon.nc
 
 Total # of data points: 4525 (181*25*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 64.383
 Maximum value: 90
 Mean    value: 74.619 (unweighted average)
 Standard deviation: 5.9864
shade/i=50:100 HT,lon,lat
 
sp rm -f tripolar_missing_lon.nc
 
 
! err601_missing_string_element.jnl
! Bug 1488; Seg fault when try to list a string variable
!  when the last element is missing.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err601_missing_string_element.jnl
! err601_missing_string_element.jnl
!  Bug 1488. Seg fault when try to list a string variable
!  when the last element is missing.
 
let a = {"a", "b",  }
list a
             VARIABLE : {"a", "b",  }
             SUBSET   : 3 points (X)
 1   / 1:"a"
 2   / 2:"b"
 3   / 3:"" 
 
*** Running ferret script: bn_modnbd.jnl
! Test MODNBD regridding statistic.
 
use gtsa056_2.cdf
!use climatological_axes
!cancel data climatological_axes
 
set region/x=140/y=1/k=1
 
! What is the total number of possible data going into each month avg?
let nomiss = missing(temp,30)
list nomiss[gt=month_reg@MODNGD]
             VARIABLE : MISSING(TEMP,30) (# of points)
                        regrid: 730.5 hour on T@MODNGD
             FILENAME : gtsa056_2.cdf
             SUBSET   : 12 points (TIME)
             LONGITUDE: 139.5E
             LATITUDE : 0.833N
             DEPTH (m): 5
                    139.5E 
                     10
 16-JAN      /  1:  16.00
 15-FEB      /  2:  20.00
 17-MAR      /  3:  20.00
 16-APR      /  4:  20.00
 16-MAY      /  5:  20.00
 16-JUN      /  6:  12.00
 16-JUL      /  7:  10.00
 16-AUG      /  8:  10.00
 15-SEP      /  9:  10.00
 16-OCT      / 10:  10.00
 15-NOV      / 11:  10.00
 16-DEC      / 12:  10.00
 
! Define a new var with some missing data. See what MODNGD and MODNBD
! are, and check that the sum is the same as the number of pts in each
! month in the no-missing-data variable
 
let var = if temp gt 29.5 then temp
list var[gt=month_reg@MODNGD], var[gt=month_reg@MODNBD], var[gt=month_reg@MODNGD]+var[gt=month_reg@MODNBD], nomiss[gt=month_reg@MODNGD]
             DATA SET: ./data/gtsa056_2.cdf
             TIME: 01-JAN 00:45 to 31-DEC 06:34
             LONGITUDE: 139.5E
             LATITUDE: 0.833N
             DEPTH (m): 5
 Column  1: VAR[G=730.5 hour on T@MODNGD] is IF TEMP GT 29.5 THEN TEMP (# of points)(regrid: 730.5 hour on T@MODNGD)
 Column  2: VAR[G=730.5 hour on T@MODNBD] is IF TEMP GT 29.5 THEN TEMP (# of points)(regrid: 730.5 hour on T@MODNBD)
 Column  3: EX#3 is VAR[GT=MONTH_REG@MODNGD]+VAR[GT=MONTH_REG@MODNBD]
 Column  4: NOMISS[G=730.5 hour on T@MODNGD] is MISSING(TEMP,30) (# of points)(regrid: 730.5 hour on T@MODNGD)
                    VAR    VAR   EX#3  NOMISS
16-JAN      /  1:  10.00   6.00  16.00  16.00
15-FEB      /  2:   2.00  18.00  20.00  20.00
17-MAR      /  3:  18.00   2.00  20.00  20.00
16-APR      /  4:  20.00   0.00  20.00  20.00
16-MAY      /  5:  20.00   0.00  20.00  20.00
16-JUN      /  6:  12.00   0.00  12.00  12.00
16-JUL      /  7:   7.00   3.00  10.00  10.00
16-AUG      /  8:   0.00  10.00  10.00  10.00
15-SEP      /  9:   8.00   2.00  10.00  10.00
16-OCT      / 10:  10.00   0.00  10.00  10.00
15-NOV      / 11:  10.00   0.00  10.00  10.00
16-DEC      / 12:  10.00   0.00  10.00  10.00
*** Running ferret script: bn_fifty_files.jnl
! bn_fifty_files.jnl
! We build OPeNDAP so that 100 files can be opened at a time.
! Test with fifty.
 
set mode ignore_error
 
use 123456789000101_100101_test_numeric.nc
use a1478.nc
use a_cartesian_bug1179.nc
use adouble_2D.nc
use adouble.nc
use b1478.nc
use bad_taxis.nc
use bounds_noenclose.nc
use dstitle.nc
use err542_poly_over_calendar.nc
use err600_upcase.nc
use err_calendar.nc
use gappy_bounds.nc
use illeg_axname.nc
use longtitle1000.nc
use missing_scale_off.nc
use modfalse.nc
use modulo_lon_time.nc
use mylon.nc
use nan_missing.nc
use noglobalhistory.nc
use ss_small.nc
use sstnok_short.nc
use sstok_short.nc
use test0.nc
use test_nan.nc
use time_axis_seconds.nc
use tripolar_subset.nc
use varyscale_1.nc
use varyscale_2.nc
use xz_nozattrib.nc
use z_wide_variation.nc
use bn_strides.cdf
use clim_airt_lev.cdf
use climatological_axes.cdf
use coads_climatology.cdf
use coads_vwnd.cdf
use err491_attval.cdf
use geo_borders.cdf
use gt4d011.cdf
use gtbc011.cdf
use gtsa056_1.cdf
use gtsa056_2.cdf
use levitus_climatology.cdf
use non_COARDS.cdf
use ocean_atlas_temp.cdf
use reverse_axes.cdf
use TAO_SST_clim.cdf
use epic_formatted_file.nc
use weird_name1.cdf
 
cancel mode ignore_error
 
*** Running ferret script: bn603_bug_fixes.jnl
! bn603_bug_fixes.jnl
! test various fixes that went into version 6.03
! 11-May-2006 ACM
 
! Fix for bug 904
! SHADE/LEV did not keep same levels after a SHADE/LINE
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err602_shade_line_lev.jnl
! err602_shade_line_lev.jnl
! Bug 904.
! SHADE/LEV does not keep same levels after a SHADE/LINE
! Was due to fact that SHADE/LINE makes PPL SHADE  call
! followed by PPL CONTOUR/OVER call, but without indicating
! that the same contour levels should be used.
 
! Note that SHOW SYM LEV* indicates that the SHADE/LINE/KEY changes the levels.
 
let a = {1,1}* ysequence({-.29,1.09})
set view ul; shade/key a; sh sym lev*
LEV_MIN = "-0.3"
LEV_MAX = "1.1"
LEV_NUM = "28"
LEV_DEL = "0.05"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "-0.3,-0.25,-0.2,-0.15,-0.1,-0.05,0,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,1,1.05,1.1"
set view ur; shade/lev a; sh sym lev*
LEV_TEXT = ""
LEV_MIN = "-0.3"
LEV_MAX = "1.1"
LEV_NUM = "28"
LEV_DEL = "0.05"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "-0.3,-0.25,-0.2,-0.15,-0.1,-0.05,0,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,1,1.05,1.1"
set view ll; shade/line/key a; sh sym lev*
LEV_TEXT = ""
LEV_MIN = "-0.3"
LEV_MAX = "1.1"
LEV_NUM = "28"
LEV_DEL = "0.05"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "-0.3,-0.25,-0.2,-0.15,-0.1,-0.05,0,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,1,1.05,1.1"
set view lr; shade/lev a; sh sym lev*
LEV_TEXT = ""
LEV_MIN = "-0.3"
LEV_MAX = "1.1"
LEV_NUM = "28"
LEV_DEL = "0.05"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "-0.3,-0.25,-0.2,-0.15,-0.1,-0.05,0,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,1,1.05,1.1"
 
! Fix for bug 1302
! Draw correct SHADE and FILL plots across the modulo branch cut.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err602_curvi_modulo_cut
! err602_curvi_modulo_cut.jnl
! 5/07  bug 1302
!
! For the curvilinear modulo forms of SHADE and FILL, there appears to
! be some inconsistency in plotting across the modulo cut.  SHADE omits
! the half-cells that ought to touch the modulo cut.  FILL looks like
! it's tryingto interpolate across the cut, but something's wrong.
 
! Note this needs an update to tripolar_subset.nc to add some
! coordinate center locations.
 
use tripolar_subset.nc
set view upper
shade/hlim=75:85/vlim=-10:0/mod/pal=rnb2 0*u+mod(i+j,2),geolon_c,geolat_c
set view lower
fill/hlim=75:85/vlim=-10:0/mod u,geolon_c,geolat_c
 
! Fix for bug 1388
! SET LIST/PREC worked for multi-var listings, LIST/PREC= var1,var2 did not
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err602_list_prec
! err602_list_prec.jnl
! fixes for bug 1388: SET LIST/PREC worked for multi-variable listings,
! but LIST/PRECISION= did not.
 
use gt4d011.cdf
 
! Here is a listing with default precision
LIST/NOHEAD/I=91:94/J=37/K=1/L=1 temp,salt
139.5W / 91:  27.29  2.370E-04
138.5W / 92:  27.25  2.380E-04
137.5W / 93:  27.24  2.383E-04
136.5W / 94:  27.18  2.380E-04
 
! Previously this did not have the effect of changing the precision.
LIST/NOHEAD/I=91:94/J=37/K=1/L=1/PREC=3 temp,salt
139.5W / 91:  27.3  2.37E-04
138.5W / 92:  27.3  2.38E-04
137.5W / 93:  27.2  2.38E-04
136.5W / 94:  27.2  2.38E-04
 
! This has always worked
SET LIST/PREC=7
LIST/NOHEAD/I=91:94/J=37/K=1/L=1 temp,salt
139.5W / 91:  27.29276  2.369705E-04
138.5W / 92:  27.25388  2.379802E-04
137.5W / 93:  27.23906  2.382890E-04
136.5W / 94:  27.17807  2.380348E-04
 
! This should override the SET LIST/PREC setting
LIST/NOHEAD/I=91:94/J=37/K=1/L=1/PREC=2 TEMP,SALT
139.5W / 91:  27.  2.4E-04
138.5W / 92:  27.  2.4E-04
137.5W / 93:  27.  2.4E-04
136.5W / 94:  27.  2.4E-04
 
! And then things should go back to the SET LIST/PREC setting
LIST/NOHEAD/I=91:94/J=37/K=1/L=1 TEMP,SALT
139.5W / 91:  27.29276  2.369705E-04
138.5W / 92:  27.25388  2.379802E-04
137.5W / 93:  27.23906  2.382890E-04
136.5W / 94:  27.17807  2.380348E-04
 
*** Running ferret script: bn_set_var_name.jnl
! bn_set_var_name.jnl
! This has been in Ferret since v5.3 but never a benchmark test of it!
! ACM 8/2007
 
USE coads_climatology
 
! Use SET VAR/NAME= to give a variable from the file a new name.
SET VAR/NAME=my_sst sst
SHOW DATA
     currently SET data sets:
    1> ./data/coads_climatology.cdf  (default)
 name     title                             I         J         K         L
 MY_SST   SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:3
 
 
LIST/X=179:183/Y=40/L=3 my_sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (LONGITUDE)
             LATITUDE : 39N
             TIME     : 17-MAR 02:58
                39N   
                65
 179E   / 80:  11.90
 179W   / 81:  12.12
 177W   / 82:  12.08
 
! Now use a LET command to "fix" the data in any way we wish
! Give it the original name, and now it has the new characteristics
! but the old name.
 
LET sst = 3*my_sst
LIST/X=179:183/Y=40/L=3 sst
             VARIABLE : 3*MY_SST
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (LONGITUDE)
             LATITUDE : 39N
             TIME     : 17-MAR 02:58
                39N   
                65
 179E   / 80:  35.69
 179W   / 81:  36.36
 177W   / 82:  36.24
 
*** Running ferret script: bn_memory_symbol.jnl
! bn_memory_symbol.jnl
! Ferret v6.06 15-Aug-07
! Symbol FERRET_MEMORY shows current size of Ferret memory in MWords
! V751:*acm* 6/2019 - memory set and shown in bytes
! V76 :*acm* 11/2019  return to previous setting not a fixed value
 
sh sym ferret_memory, ferret_bytes_mem
FERRET_MEMORY = "62.5"
FERRET_BYTES_MEM = "500Mb"
define symbol mem_save = ($ferret_memory)
 !-> define symbol mem_save = 62.5
 
set mem/siz=90
sh sym ferret_memory, ferret_bytes_mem
FERRET_MEMORY = "90"
FERRET_BYTES_MEM = "720Mb"
show memory
    SET MEMORY/MAX: 720 Mb   (90 megawords)
    Peak demand: 0 Kb
    Current cache: 0 Kb
 
set mem/size=0.05
sh sym ferret_memory, ferret_bytes_mem
FERRET_MEMORY = "0.05"
FERRET_BYTES_MEM = "400Kb"
 
set mem/siz=500000  ! too large to allow
sh sym ferret_memory, ferret_bytes_mem
FERRET_MEMORY = "500000"
FERRET_BYTES_MEM = "4000Gb"
 
set mem/siz=($mem_save)  ! return to the previous setting
 !-> set mem/siz=62.5
sh sym ferret_memory, ferret_bytes_mem
FERRET_MEMORY = "62.5"
FERRET_BYTES_MEM = "500Mb"
*** Running ferret script: bn605_bug_fixes.jnl
! bn604_bug_fixes.jnl
! test various fixes that went into version 6.05
! 27-July-2007 ACM
 
! Fix for Bug 1524: irregular axis detected as REGULAR
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err604_irreg_axis.jnl
! Bug 1524: irregular axis detected as REGULAR!
 
!use climatological_axes
sh ax MONTH_IRREG
 name       axis              # pts   start                end
 MONTH_IRREG TIME              12mi   16-JAN 12:00         15-DEC 17:49
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
list t[gt=month_irreg], tbox[gt=month_irreg]
             TIME: 01-JAN 00:00 to 31-DEC 05:49
 Column  1: T is T (axis MONTH_IRREG)
 Column  2: TBOX is TBOX (axis MONTH_IRREG)
                         T   TBOX
16-JAN 12      /  1:   15.5  31.00
15-FEB 02      /  2:   45.1  28.24
15-MAR 17      /  3:   74.7  31.00
15-APR 05      /  4:  105.2  30.00
15-MAY 17      /  5:  135.7  31.00
15-JUN 05      /  6:  166.2  30.00
15-JUL 17      /  7:  196.7  31.00
15-AUG 17      /  8:  227.7  31.00
15-SEP 05      /  9:  258.2  30.00
15-OCT 17      / 10:  288.7  31.00
15-NOV 05      / 11:  319.2  30.00
15-DEC 17      / 12:  349.7  31.00
 
 
! SHOW FUNCTIONS caused a crash or a message
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err605_show_func.jnl
! err605_show_func.jnl
! Reported by Andrew W.
! SHOW FUNCTIONS caused a crash on his system; I see it only as a message
! in SHOW FUNC/BRIEF
 
SHOW FUNCTION/BRIEF
Functions internal to Ferret:
EXP(X)
LOG(X)
MAX(A,B)
MIN(A,B)
INT(X)
ABS(X)
SIN(theta)
COS(theta)
TAN(theta)
LN(X)
MOD(A,B)
MISSING(A,B)
IGNORE0(X)
ATAN(X)
ATAN2(A,B)
ASIN(X)
ACOS(X)
RANDU(A)
RANDN(A)
RHO_UN(salt,temp,p)
THETA_FO(salt,temp,p,ref)
DAYS1900(year,month,day)
RANDU2(A,ISEED)
RANDN2(A,ISEED)
XSEQUENCE(VAR)
ECHO(STR,NUM)
RESHAPE(A,B)
ZAXREPLACE(V,ZVALS,ZAX)
YSEQUENCE(VAR)
ZSEQUENCE(VAR)
TSEQUENCE(VAR)
ESEQUENCE(VAR)
FSEQUENCE(VAR)
SAMPLEI(TO_BE_SAMPLED,X_INDICES)
SAMPLEJ(TO_BE_SAMPLED,Y_INDICES)
SAMPLEK(TO_BE_SAMPLED,Z_INDICES)
SAMPLEL(TO_BE_SAMPLED,T_INDICES)
SAMPLEM(TO_BE_SAMPLED,E_INDICES)
SAMPLEN(TO_BE_SAMPLED,F_INDICES)
SPAWN(STR)
STRCMP(STR1,STR2)
STRLEN(STR)
UPCASE(STR)
STRINDEX(STR1,SUBSTR)
STRRINDEX(STR1,SUBSTR)
DNCASE(STR)
STRCAT(STR1,STR2)
SUBSTRING(STR,OFFSET,LENGTH)
STRFLOAT(STR)
DOT(VAR1,VAR2,IDIM)
TRANSPOSE(VAR,DIM1,DIM2)
 
Externally defined functions available to Ferret:
AVE_SCAT2GRID_T(TPTS,VPTS,TAXIS)
BIN_INDEX_WT(INDEX,WT,INDXMAX)
BOX_EDGES(A)
COMPRESSI(DAT)
COMPRESSI_BY(dat,mask)
COMPRESSJ(DAT)
COMPRESSJ_BY(dat,mask)
COMPRESSK(DAT)
COMPRESSK_BY(dat,mask)
COMPRESSL(DAT)
COMPRESSL_BY(dat,mask)
COMPRESSM(DAT)
COMPRESSM_BY(dat,mask)
COMPRESSN(DAT)
COMPRESSN_BY(dat,mask)
CONVOLVEI(COM,WEIGHT)
CONVOLVEJ(COM,WEIGHT)
CONVOLVEK(COM,WEIGHT)
CONVOLVEL(COM,WEIGHT)
CONVOLVEM(COM,WEIGHT)
CONVOLVEN(COM,WEIGHT)
CURV_RANGE(LONGITUDES,LATITUDES,xrange_lo,xrange_hi,yrange_lo,yrange_hi,modulo flag for X coordinates)
CURV_TO_RECT(V,mapping)
CURV_TO_RECT_FSU(V,mapping)
CURV_TO_RECT_MAP(lon_in,lat_in,grid_out,radius)
DATE1900(formatted date)
DAYS1900TOYMDHMS(day1900)
DOT_E(VAR1,VAR2)
DOT_F(VAR1,VAR2)
DOT_T(VAR1,VAR2)
DOT_X(VAR1,VAR2)
DOT_Y(VAR1,VAR2)
DOT_Z(VAR1,VAR2)
DSG_FMASK_STR(obsvar,rowsize,Fvar,subset)
EARTH_DISTANCE(longitude,latitude)
ECAT(A,B)
ECAT_STR(A,B)
ELEMENT_INDEX(VAR,VALUES)
ELEMENT_INDEX_STR(VAR,STRINGS)
ELEMENT_INDEX_STR_N(VAR,STRINGS)
EOF_SPACE(A,frac_timeser)
EOF_STAT(A,frac_timeser)
EOFSVD_SPACE(A)
EOFSVD_STAT(A)
EOFSVD_TFUNC(A)
EOF_TFUNC(A,frac_timeser)
EREVERSE(A)
EXPND_BY_LEN(var,len,nx)
EXPND_BY_LEN_STR(var,len,nx)
EXPNDI_BY(dat,mask,outsize)
EXPNDI_BY_M_COUNTS(Data,Row Sizes,Result X axis)
EXPNDI_BY_M_COUNTS_STR(Data,Row Sizes,Result X axis)
EXPNDI_BY_T(dat,mask,n_profiles,max_profile_len)
EXPNDI_BY_Z(dat,mask,n_profiles,max_profile_len)
EXPNDI_BY_Z_COUNTS(dat,counts,max_profile_len)
EXPNDI_ID_BY_Z_COUNTS(counts,max profile len)
EXPNDI_TO_ET(var data,time data,Rowsize (E direction),Result T)
FCAT(A,B)
FCAT_STR(A,B)
FC_ISUBSET(index_list,lengths,nx,FullData)
FFTA(A)
FFT_IM(A)
FFT_INVERSE(A,B)
FFTP(A)
FFT_RE(A)
FILL_XY(DATA,MASK,N)
FINDHI(A,XRANGE,YRANGE)
FINDLO(A,XRANGE,YRANGE)
FLOATSTR(A,FMT)
FREVERSE(A)
FT_TO_ORTHOGONAL(VAR,TIME2D,ALLTIME)
IS_ELEMENT_OF(VAR,VALUES)
IS_ELEMENT_OF_STR(VAR,VALUES)
IS_ELEMENT_OF_STR_N(VAR,VALUES)
LABWID(STR,HT)
LANCZOS(A,F1,F2,N)
LIST_VALUE_XML(tag,value,cdata_flag,outputfile)
LON_LAT_TIME_STRING(longitude,latitude,time,time_axis,string to prepend)
LSL_LOWPASS(A,cutoff_period,filter_span)
MINMAX(A)
MINUTES24(formatted time)
NCO(operator,arguments)
NCO_ATTR(FileName,VariableName,AttributeName,AttType,Mode,AttributeValue)
PIECEWISE3(V1,V2,V3,Control parameter,Tol1,Tol2,Tol3)
PT_IN_POLY(A,XVERT,YVERT)
RECT_TO_CURV(V,lon_bounds_out,lat_bounds_out,missing_allowed)
SAMPLE_FAST_I(V,Indices)
SAMPLE_FAST_I_STR(S,Indices)
SAMPLEF_DATE(DAT_TO_SAMPLE,YR,MO,DAY,HR,MIN,SEC)
SAMPLEIJ(DAT_TO_SAMPLE,XPTS,YPTS)
SAMPLEI_MULTI(DAT_TO_SAMPLE,I_INDICES)
SAMPLEJ_MULTI(DAT_TO_SAMPLE,J_INDICES)
SAMPLEK_MULTI(DAT_TO_SAMPLE,K_INDICES)
SAMPLEL_MULTI(DAT_TO_SAMPLE,L_INDICES)
SAMPLEM_MULTI(DAT_TO_SAMPLE,M_INDICES)
SAMPLEN_MULTI(DAT_TO_SAMPLE,N_INDICES)
SAMPLET_DATE(DAT_TO_SAMPLE,YR,MO,DAY,HR,MIN,SEC)
SAMPLEXY(DAT_TO_SAMPLE,XPTS,YPTS)
SAMPLEXY_CLOSEST(DAT_TO_SAMPLE,XPTS,YPTS)
SAMPLEXY_CURV(DAT_TO_SAMPLE,DAT_LON,DAT_LAT,XPTS,YPTS)
SAMPLEXY_CURV_AVG(DAT_TO_SAMPLE,DAT_LON,DAT_LAT,XPTS,YPTS)
SAMPLEXY_CURV_NRST(DAT_TO_SAMPLE,DAT_LON,DAT_LAT,XPTS,YPTS)
SAMPLEXY_NRST(DAT_TO_SAMPLE,XPTS,YPTS)
SAMPLEXYT_NRST(DAT_TO_SAMPLE,XPTS,YPTS,TPTS)
SAMPLEXYT(DAT_TO_SAMPLE,XPTS,YPTS,TPTS)
SAMPLEXYZ(DAT_TO_SAMPLE,XPTS,YPTS,ZPTS)
SAMPLEXYZT(DAT_TO_SAMPLE,XPTS,YPTS,ZPTS,TPTS)
SAMPLEXZ(DAT_TO_SAMPLE,XPTS,ZPTS)
SAMPLEYZ(DAT_TO_SAMPLE,YPTS,ZPTS)
SCAT2DDUPS(coord 1,coord 2,epsilon 1,epsilon 2)
SCAT2GRID_BIN_XY(XPTS,YPTS,F,XAXPTS,YAXPTS)
SCAT2GRID_BIN_XYT(XPTS,YPTS,TPTS,F,XAXPTS,YAXPTS,TAXPTS)
SCAT2GRID_BIN_XYZ(XPTS,YPTS,ZPTS,F,XAXPTS,YAXPTS,ZAXPTS)
SCAT2GRID_BIN_XYZT(XPTS,YPTS,ZPTS,TPTS,F,XAXPTS,YAXPTS,ZAXPTS,TAXPTS)
SCAT2GRID_MINMAX_XYT(XPTS,YPTS,TPTS,F,XAXPTS,YAXPTS,TAXPTS)
SCAT2GRID_STD_XYT(XPTS,YPTS,TPTS,F,XAXPTS,YAXPTS,TAXPTS)
SCAT2GRIDGAUSS_XT(XPTS,TPTS,F,XAXPTS,TAXPTS,XSCALE,TSCALE,CUTOFF,0)
SCAT2GRIDGAUSS_XY(XPTS,YPTS,F,XAXPTS,YAXPTS,XSCALE,YSCALE,CUTOFF,0)
SCAT2GRIDGAUSS_XZ(XPTS,ZPTS,F,XAXPTS,ZAXPTS,XSCALE,ZSCALE,CUTOFF,0)
SCAT2GRIDGAUSS_YT(YPTS,TPTS,F,YAXPTS,TAXPTS,YSCALE,TSCALE,CUTOFF,0)
SCAT2GRIDGAUSS_YZ(YPTS,ZPTS,F,YAXPTS,ZAXPTS,YSCALE,ZSCALE,CUTOFF,0)
SCAT2GRIDGAUSS_ZT(ZPTS,TPTS,F,ZAXPTS,TAXPTS,ZSCALE,TSCALE,CUTOFF,0)
SCAT2GRIDLAPLACE_XT(XPTS,TPTS,F,XAXPTS,TAXPTS,KAY,NRNG)
SCAT2GRIDLAPLACE_XY(XPTS,YPTS,F,XAXPTS,YAXPTS,KAY,NRNG)
SCAT2GRIDLAPLACE_XZ(XPTS,ZPTS,F,XAXPTS,ZAXPTS,KAY,NRNG)
SCAT2GRIDLAPLACE_YT(YPTS,TPTS,F,YAXPTS,TAXPTS,KAY,NRNG)
SCAT2GRIDLAPLACE_YZ(YPTS,ZPTS,F,YAXPTS,ZAXPTS,KAY,NRNG)
SCAT2GRIDLAPLACE_ZT(ZPTS,TPTS,F,ZAXPTS,TAXPTS,KAY,NRNG)
SCAT2GRID_NBIN_XY(XPTS,YPTS,F,XAXPTS,YAXPTS)
SCAT2GRID_NBIN_XYT(XPTS,YPTS,TPTS,F,XAXPTS,YAXPTS,TAXPTS)
SCAT2GRID_NOBS_XY(XPTS,YPTS,XAXPTS,YAXPTS)
SCAT2GRID_NOBS_XYT(XPTS,YPTS,TPTS,XAXPTS,YAXPTS,TAXPTS)
SCAT2GRID_T(TPTS,TAXIS)
SEPARATE(A,Rowsize,FixLongitudes)
SEPARATE_STR(A,Rowsize,FixLongitudes)
SORTI(DAT)
SORTI_STR(STR)
SORTJ(DAT)
SORTJ_STR(STR)
SORTK(DAT)
SORTK_STR(STR)
SORTL(DAT)
SORTL_STR(STR)
SORTM(DAT)
SORTM_STR(STR)
SORTN(DAT)
SORTN_STR(STR)
STR_MASK(STRING,MASK)
STR_NOBLANKS(STR)
STR_REPLACE(INSTRING,S1,S2)
TAUTO_COR(A)
TAX_DATESTRING(A,B,C)
TAX_DAY(A,B)
TAX_DAYFRAC(A,B)
TAX_JDAY(A,B)
TAX_JDAY1900(A,B)
TAX_MONTH(A,B)
TAX_TIMES(A)
TAX_TSTEP(A,B)
TAX_UNITS(A)
TAX_YEAR(A,B)
TAX_YEARFRAC(A,B)
TCAT(A,B)
TCAT_STR(A,B)
TEST_OPENDAP(url)
TIME_REFORMAT(A)
TRACKS2GRID_MASK_AVE_XYT(VAR,XPTS,YPTS,TPTS,ICRUISE,XAXPTS,YAXPTS,TAXPTS,MASK)
TRACKS2GRID_STD_XYT(VARIABLE,XPTS,YPTS,TPTS,ICRUISE,XAXPTS,YAXPTS,TAXPTS)
TRANSPOSE_EF(VAR)
TRANSPOSE_TE(VAR)
TRANSPOSE_TF(VAR)
TRANSPOSE_XE(VAR)
TRANSPOSE_XF(VAR)
TRANSPOSE_XT(VAR)
TRANSPOSE_XY(VAR)
TRANSPOSE_XZ(VAR)
TRANSPOSE_YE(VAR)
TRANSPOSE_YF(VAR)
TRANSPOSE_YT(VAR)
TRANSPOSE_YZ(VAR)
TRANSPOSE_ZE(VAR)
TRANSPOSE_ZF(VAR)
TRANSPOSE_ZT(VAR)
TREVERSE(A)
UNIQUE_STR2INT(A)
WRITE_WEBROW(id,name,Cruise_Mask,filename)
WRITE_WEBROW_GWT(id,name,Cruise_Mask,filename)
XAUTO_COR(A)
XCAT(A,B)
XCAT_STR(A,B)
XREVERSE(A)
YCAT(A,B)
YCAT_STR(A,B)
YREVERSE(A)
ZAXREPLACE_AVG(V,ZVALS,ZAX)
ZAXREPLACE_BIN(V,ZVALS,ZAX)
ZAXREPLACE_REV(ZVALS,V,ZAX)
ZAXREPLACE_ZLEV(V,THICKNESS,ZAX)
ZCAT(A,B)
ZCAT_STR(A,B)
ZREVERSE(A)
ADD_9(A,B,C,D,E,F,G,H,I)
APPENDE(ENS,VAR)
AVET(A)
DATES(Timesteps,Precision)
EARTH_DISTANCE(longitude,latitude)
FACTORIAL(A)
FFT_AMP(A)
FFTA_SAMPLE(A)
FFT_PHAS(A)
LENGTH_OF_STRINGS(A)
MAXSTRLEN(A)
PASS_THRU(A)
PASS_THRU_STRING(A)
PERCENT_GOOD_T(A)
PICK_A_STRING(A,N)
PIECEWISE3(V1,V2,V3,Control parameter,Tol1,Tol2,Tol3)
SAMPLE_FAST_I(V,Indices)
SEPARATE(A,Rowsize,FixLongitudes)
SEPARATE_STR(A,Rowsize,FixLongitudes)
STORAGE(A)
STRING_ARG(Flags,NString)
STRING_CAT3(A,B,C)
STRING_LEN_SUM(S1,S2)
STRINGS_AS_ARGS(S1,S2,NCHAR)
STR_MISSING(MASK,STR,REPL)
STUDENT_T_CUTOFF(P,nf)
SUBTRACT(A,B)
 
*** Running ferret script: bn608_bug_fixes.jnl
! bn608_bug_fixes
! test various fixes that went into version 6.08
! 24-Sep ACM
 
! Fix for Bug 1539: SHOW VAR/XML
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err607_show_var_xml
! Bug 1539 SHOW VAR/XML didnt show all vars.
 
 
 
! make some short files
let/units="meters" temp = z[z=1:100:5]
save/clobber/file=a.nc temp
 
LET sst = x[x=1:15] + y[y=1:5] + t[gt=month_irreg]
save/clobber/file=b.nc sst
can var/all
 
use a
use b
 
let temp_1_regrid=temp[d=1,z=5.00:75.00@ave]
let sst_2_regrid=sst[d=2,t="15-Feb":"15-Mar"@ave]
let sst_final=sst_2_regrid[d=2,gxy=temp_1_regrid[d=1]]
 
! This shows all 3 vars
show var
 Created by DEFINE VARIABLE:
 >>> Definitions that replace any file variable of same name:
     SST_FINAL = SST_2_REGRID[D=2,GXY=TEMP_1_REGRID[D=1]]
     SST_2_REGRID = SST[D=2,T="15-Feb":"15-Mar"@AVE]
     TEMP_1_REGRID = TEMP[D=1,Z=5.00:75.00@AVE]
 
! But this showed only sst_final and sst_2_regrid (twice)
show var/xml
<global>
<var name="SST_FINAL">
<attribute name="definition" type="char">
   <value><![CDATA[SST_2_REGRID[D=2,GXY=TEMP_1_REGRID[D=1]]]]></value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="GRR1">
<axes>
<xaxis>XAX1_15</xaxis>
<yaxis>YAX1_5</yaxis>
</axes>
</grid>
</var>
<var name="SST_2_REGRID">
<attribute name="definition" type="char">
   <value><![CDATA[SST[D=2,T="15-Feb":"15-Mar"@AVE]]]></value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="GRR1">
<axes>
<xaxis>XAX1_15</xaxis>
<yaxis>YAX1_5</yaxis>
</axes>
</grid>
</var>
<var name="TEMP_1_REGRID">
<attribute name="definition" type="char">
   <value><![CDATA[TEMP[D=1,Z=5.00:75.00@AVE]]]></value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="GSI1">
<axes>
</axes>
</grid>
</var>
</global>
 
! err607_set_new_history_att
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err607_set_new_history_att
! err607_set_new_history_att.jnl
! Previously if we set a history attribute on a user-defined variable that
! was based on a dataset variable, the default history attribute, From dataset
! was always written. Now if we define our own, that is what is written.
 
use coads_climatology.cdf
let var = sst
def att/output var.history = "from Sea Surface Temperature, coads_climatology.cdf"
save/file=a.nc/clobber/x=180:200/y=1 var
 
can data/all
use a.nc
show data
     currently SET data sets:
    1> ./a.nc  (default)
 name     title                             I         J         K         L
 VAR      SST                              1:10      1:1       ...       1:3
 
show att/all var
     attributes for user-defined variables
 var.long_name = SST 
 var.missing_value = -1.E+34
 var.history = from Sea Surface Temperature, coads_climatology.cdf 
 
! Symbols YAXIS_MIN, YAXIS_MAX were 0 when values small
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err607_axis_minmax_syms
! Bug 1542
! Symbols YAXIS_MIN, YAXIS_MAX were 0 when values small
! Should use scientific notation
 
use coads_climatology
let plotvar = sst[L=1]
plot/y=35 plotvar/10000; sh sym yax*
YAXIS_MIN = "7.9999998E-04"
YAXIS_MAX = "2.0999999E-03"
plot/y=35 plotvar/10000000; sh sym yax*
YAXIS_MIN = "8.0000001E-07"
YAXIS_MAX = "2.1000001E-06"
plot/y=35 plotvar*10000000; sh sym yax*
YAXIS_MIN = "8.0000000E+07"
YAXIS_MAX = "2.1000000E+08"
 
def axis/x=0.000004:0.000005/npoints=100 xax
def axis/y=0.000001:0.000002/npoints=100 yax
let a = x[gx=xax] + y[gy=yax]
shade a; sh sym xax*; ; sh sym yax*
XAXIS_REVERSED = "0"
XAXIS_MIN = "3.994949495E-06"
XAXIS_MAX = "5.005050505E-06"
YAXIS_REVERSED = "0"
YAXIS_MIN = "9.949494949E-07"
YAXIS_MAX = "2.005050505E-06"
 
 
 
! Error message for too many contour levels requested
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err607_lev_errmsg
! err607_lev_errmsg.F
! Make the error message more detailed, saying it is the choice of
! number of contours that caused the error.
 
SET MODE ignore
SHADE/LEV=300/I=1:100/J=1:100 i+j
 
SET MODE/LAST ignore
*** Running ferret script: bn_shade_trim.jnl
! bn_shade_trim.jnl
! Test new qualifier SHADE/TRIM which trims the region of
! shade plot as is done by FILL. For LAS scripts which do
! shade underlay for FILL plots.
 
USE ocean_atlas_temp
 
! See the region used by FILL
SET VIEW upper
FILL temp[L=2,X=180:200,Y=30:44]
SHOW SYM xaxis_min, xaxis_max, yaxis_min, yaxis_max
XAXIS_MIN = "180.500000"
XAXIS_MAX = "199.500000"
YAXIS_MIN = "30.5000000"
YAXIS_MAX = "43.5000000"
 
! See the larger region used by default for SHADE
SHADE temp[L=2,X=180:200,y=30:44]
SHOW SYM xaxis_min, xaxis_max, yaxis_min, yaxis_max
XAXIS_MIN = "180.000000"
XAXIS_MAX = "200.000000"
YAXIS_MIN = "30.0000000"
YAXIS_MAX = "44.0000000"
 
! SHADE/TRIM trims the region as for a FILL plot
SET VIEW lower
SHADE/TRIM temp[L=2,X=180:200,y=30:44]
SHOW SYM xaxis_min, xaxis_max, yaxis_min, yaxis_max
XAXIS_MIN = "180.500000"
XAXIS_MAX = "199.500000"
YAXIS_MIN = "30.5000000"
YAXIS_MAX = "43.5000000"
 
*** Running ferret script: bn_mode_nlevels.jnl
! bn_mode_nlevels.jnl
! 3-mar-2008
! v6.1 MODE NLEVELS (default is 40)
 
show mode nlevels
      MODE            STATE        ARGUMENT
      NLEVELS          SET              30
use levitus_climatology
 
shade temp
show sym lev*
LEV_MIN = "-2"
LEV_MAX = "30"
LEV_NUM = "32"
LEV_DEL = "1"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30"
 
! Old default value was 10
set mode nlevels 10
shade temp
show sym lev*
LEV_MIN = "-2"
LEV_MAX = "30"
LEV_NUM = "16"
LEV_DEL = "2"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "-2,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30"
 
! set even higher
set mode nlevels 80
shade temp
show sym lev*
LEV_ALL = "-2,-1.5,-1,-0.5,0,0.5,1,1.5,2,2.5,3,3.5,4,4.5,5,5.5,6,6.5,7,7.5,8,8.5,9,9.5,10,10.5,11,11.5,12,12.5,13,13.5,14,14.5,15,15.5,16,16.5,17,17.5,18,18.5,19,19.5,20,20.5,21,21.5,22,22.5,23,23.5,24,24.5,25,25.5,26,26.5,27,27.5,28,28.5,29,29.5,30"
LEV_MIN = "-2"
LEV_MAX = "30"
LEV_NUM = "64"
LEV_DEL = "0.5"
LEV_CENTERED_LABELS = "off"
 
! restore (new) default
set mode nlevels 40
 
*** Running ferret script: bn61_bug_fixes.jnl
! bn608_bug_fixes
! test various fixes that went into version 6.1
! 2-Jan-2008 ACM
 
! Fix for Bug 1556:
! Error processing parentheses on abstract axis names.
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err608_bug1556
! err608_bug1556.jnl
! Error processing parentheses on abstract axis names.
!
! The file was created with these commands, which MUST BE
! in a separate Ferret session to see the bug.
!
!  use coads_climatology
!  set axis/stride=20 `sst,return=xaxis`
!  set axis/stride=10 `sst,return=yaxis`
!  save/file=err608_bug1556.nc/clobber sst[L=1:2]
 
USE err608_bug1556.nc
SAVE/FILE=a.nc/CLOBBER sst[i=1:5:1,j=1:5:1,l=1:1:1]
 
! The error was,
!      LISTing to file out.nc
!      **TMAP ERR: error in line definition
!             file coords dont match variable coords on axis AX0
!
! The bug was fixed in cd_axis_outname.F
 
 
! Fix for Bug 1538:
! Precision of immediate-mode output of negative values
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err608_precision_neg_numbers
! err608_precision_neg_numbers.jnl
! ACM 1/2/2008
! Bug 1538, precision of immediate-mode output of negative values
! Fixed in tm_fmt.F
 
! The output from a LIST command is correct:
LIST/PREC=10 1.23456789e-15
             VARIABLE : constant
          1.234567890E-15
 
! In immediate mode, output is incorrect, not enough precision:
SAY `1.23456789e-15`
 !-> MESSAGE/CONTINUE 1.23456789E-15
1.23456789E-15
SAY `1.23456789e-15,prec=10`
 !-> MESSAGE/CONTINUE 1.23456789E-15
1.23456789E-15
*** Running ferret script: bn611_bug_fixes.jnl
! bn611_bug_fixes.jnl
! Fixes that go into v6.11 release
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err61_write_bounds
! err61_write_bounds.jnl
! test fixes for bugzilla 1534: write correct bounds
! when bounds were read in from a netCDF file.
 
def ax/x/edges xax={1,2,4,8,9}
let a = x[gx=xax]
save/clobber/file=a.nc a
sp ncdump a.nc >> all_ncdump.out
 
! This is the original bug report
! The bounds attribute was written but the values were bad,
! shown as _, _ in the netcdf output.
can var a
use a.nc
save/clobber/file=b.nc a
sp ncdump a.nc >> all_ncdump.out
 
! It would also be useful to be able to tell Ferret
! not to save the bounds at all.
 
can data/all
use a.nc
can att/output (xax).bounds
save/clobber/file=b.nc a
sp ncdump a.nc >> all_ncdump.out
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err61_poly_shade_over_noaxes
! err61_poly_shade_over_noaxes.jnl
! See bug 1571
 
! plot/ax=0,0,0,0 ; poly/over ! redraws the box
 
set v ul; plot/ax=0,0,0,0 {0,1}; poly/ov {0,1},{0,1}
set v ur; plot/set/ax=0,0,0,0 {0,1}; ppl plot; poly/ov {0,1},{0,1}
set v ll; plot/ax=0,0,0,0 {0,1}; plot/ov {0,1}
set v lr; plot/set/ax=0,0,0,0 {0,1}; ppl plot; plot/ov {0,1}
can view
 
! shade over polygon
set view upper; polygon/thick/color=red/palette=blue/axes=0,0,0,0 {1,2,1}, {2,1,0.5}
shade/over/i=1:2/j=0:2/patt i+j
 
set view lower; polygon/thick/color=red/palette=blue/axes=1,1,1,0 {1,2,1}, {2,1,0.5}
fill/over/i=1:2/j=0:2/patt i+j
can view
 
! Polygon over shade
set view ul
use err542_poly_over_calendar.nc
shade/ax=0,1,1,0 pc
poly/over/fill/pal=red/line/color=black/title="polygon" {220,240,280,250},{-20,70,40,-30}
 
! Polygon over fill
set view ur
use gt4d011
let v1={221,225,232,235}
let v2={20,80,50,30}
let v3={10,-3,16,3}
fill/ax=1,0,0,1 temp[j=@ave,l=1]
go polymark poly/lev=(-5,30,1)/pal=brown/fill/line=1/nolab/over v1 v2 v3 circle 2
 
 
set view ll
plot/ax=0,0,1,1/vl=4:-4/hl=4:-4/vs/line/title="there should be just one triangle" {1,2,3,1},{0,2,1,0}
poly/ov/col=2/pal=yellow {1,2,3,1},{0,2,1,0}
 
set view lr
vector/ax=0,1,1,0/k=1/l=1 u,v
let v1={221,225,232,235}
let v2={-3,2,0.5,2}
let v3={10,-3,16,3}
go polymark poly/lev=(-5,30,1)/fill/line=1/nolab/over v1 v2 v3 circle 2
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err61_context_scalar_strings
! err61_context_scalar_strings.jnl
! Bug 1558, first present in Ferret v6.02
! After SET GRID EZ error was about var not being a scalar.
 
say `"a" EQ "a"`
 !-> MESSAGE/CONTINUE 1
1
set grid ez
say `"a" EQ "a"`
 !-> MESSAGE/CONTINUE 1
1
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err61_exit_script
! Bug 1566 Andrew Wittenberb
!
! I discovered this when testing for an error condition, for which I wanted to
! exit the current script with EXIT/SCRIPT.  It seems that EXIT doesn't always pop
! the IF..ENDIF stack, resulting in a nesting error upon repeated invocations of
! the script.
!
! Note also how the REPEAT at first works, then fails, then works, then fails, in
! an alternating pattern.
 
!        NOAA/PMEL TMAP
!        FERRET v6.08
!        Linux(g77) 2.4.21-32 - 11/13/07
!         7-Mar-08 18:32
 
sp rm -f b1566.jnl
sp echo if 1 then > b1566.jnl
sp echo if 1 then >> b1566.jnl
sp echo exit/script >> b1566.jnl
sp echo endif >> b1566.jnl
sp echo endif >> b1566.jnl
rep/l=1:7 go b1566.jnl
!-> REPEAT: L=1
if 1 then
if 1 then
exit/script
!-> REPEAT: L=2
if 1 then
if 1 then
exit/script
!-> REPEAT: L=3
if 1 then
if 1 then
exit/script
!-> REPEAT: L=4
if 1 then
if 1 then
exit/script
!-> REPEAT: L=5
if 1 then
if 1 then
exit/script
!-> REPEAT: L=6
if 1 then
if 1 then
exit/script
!-> REPEAT: L=7
if 1 then
if 1 then
exit/script
rep/l=1:7 go b1566.jnl
!-> REPEAT: L=1
if 1 then
if 1 then
exit/script
!-> REPEAT: L=2
if 1 then
if 1 then
exit/script
!-> REPEAT: L=3
if 1 then
if 1 then
exit/script
!-> REPEAT: L=4
if 1 then
if 1 then
exit/script
!-> REPEAT: L=5
if 1 then
if 1 then
exit/script
!-> REPEAT: L=6
if 1 then
if 1 then
exit/script
!-> REPEAT: L=7
if 1 then
if 1 then
exit/script
 
!!  IFs nested too deep
 
rep/l=1:7 go b1566.jnl
!-> REPEAT: L=1
if 1 then
if 1 then
exit/script
!-> REPEAT: L=2
if 1 then
if 1 then
exit/script
!-> REPEAT: L=3
if 1 then
if 1 then
exit/script
!-> REPEAT: L=4
if 1 then
if 1 then
exit/script
!-> REPEAT: L=5
if 1 then
if 1 then
exit/script
!-> REPEAT: L=6
if 1 then
if 1 then
exit/script
!-> REPEAT: L=7
if 1 then
if 1 then
exit/script
rep/l=1:7 go b1566.jnl
!-> REPEAT: L=1
if 1 then
if 1 then
exit/script
!-> REPEAT: L=2
if 1 then
if 1 then
exit/script
!-> REPEAT: L=3
if 1 then
if 1 then
exit/script
!-> REPEAT: L=4
if 1 then
if 1 then
exit/script
!-> REPEAT: L=5
if 1 then
if 1 then
exit/script
!-> REPEAT: L=6
if 1 then
if 1 then
exit/script
!-> REPEAT: L=7
if 1 then
if 1 then
exit/script
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err61_new_attr_on_axis
! err61_new_attr_on_axis.jnl
! For any var or axis, allow adding an attribute
! Fix for bug 1574
 
use ocean_atlas_temp
sh dat
     currently SET data sets:
    1> ./data/ocean_atlas_temp.cdf  (default)
 name     title                             I         J         K         L
 TEMP     Temperature                      1:360     1:180     1:1       1:2
 
define att/output (`temp,return=xaxis`).long_name = "Here is a long name for the x axis of TEMP"
 !-> define att/output (XAX_LEV9421_380).long_name = "Here is a long name for the x axis of TEMP"
save/file=a.nc/clobber/j=50/l=2 temp
sp ncdump -h a.nc >> all_ncdump.out
 
! It is saved even on a subset of the axis
save/file=a.nc/clobber/i=1:12/j=50/l=2 temp
sp ncdump -h a.nc >> all_ncdump.out
 
DEFINE AXIS/y=-60:60:2/units=deg yaxis
LET v = y[gy=yaxis]
 
DEFINE att/output (yaxis).standard_name = "latitude"
 
save/file=a.nc/clobber v
sp ncdump -h a.nc >> all_ncdump.out
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO bn_varcontext_attributes
! Examples from bn_attributes, where instead of var.att[specifiers]
! we use var[specifiers].att  where appropriate.
 
!-----
 
! SHOW ATTRIBUTE examples
 
can data/all
can var/all
 
use ocean_atlas_temp
use gt4d011
use levitus_climatology
 
sh att temp[d=1].units
     attributes for dataset: ./data/ocean_atlas_temp.cdf
 TEMP.units = Deg C 
 
 
! note .[d=1].dimnames does not work
use coads_climatology
use gt4d011
 
let vnames = ..dimnames[d=1]
let lnames = ..dimnames[d=2]
list vnames
             VARIABLE : ..DIMNAMES[D=ocean_atlas_temp]
             SUBSET   : 4 points (X)
 1   / 1:"XAX_LEV9421_380"
 2   / 2:"YAX_LEV94"      
 3   / 3:"ZAXLEVIT191_1"  
 4   / 4:"TIME"           
list lnames
             VARIABLE : ..DIMNAMES[D=gt4d011]
             SUBSET   : 21 points (X)
 1    /  1:"grid_definition"
 2    /  2:"PSXT"           
 3    /  3:"PSYT"           
 4    /  4:"PSYTedges"      
 5    /  5:"PSZT"           
 6    /  6:"PSZTedges"      
 7    /  7:"TIME1"          
 8    /  8:"PSXT91_108"     
 9    /  9:"PSYT35_56"      
 10   / 10:"PSZT1_10"       
 11   / 11:"PSYT35_55"      
 12   / 12:"PSXU"           
 13   / 13:"PSYU"           
 14   / 14:"PSYUedges"      
 15   / 15:"PSXU91_108"     
 16   / 16:"PSYU35_55"      
 17   / 17:"PSZW"           
 18   / 18:"PSZWedges"      
 19   / 19:"PSYT36_55"      
 20   / 20:"PSZW1_10"       
 21   / 21:"PSYU35_56"      
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
 
!-----
! more on number of attributes
 
use levitus_climatology
use ocean_atlas_temp
let nat = temp.nattrs
list nat
             VARIABLE : TEMP.NATTRS
             FILENAME : ocean_atlas_temp.cdf
             X        : 1
          5.000
 
list (`temp,return=xaxis`)[d=2].nattrs
 !-> list (XAX_LEV9421_380)[d=2].nattrs
             VARIABLE : (XAX_LEV9421_380)[D=ocean_atlas_temp].NATTRS
             FILENAME : ocean_atlas_temp.cdf
             X        : 1
          4.000
 
use gt4d011
say `temp[d=1].nattrs`
 !-> MESSAGE/CONTINUE 5
5
 
def sym xaxnam  "(`temp[d=1],return=xaxis`)"
 !-> def sym xaxnam  "(XAXLEVITR1_160)"
def sym yaxnam  "(`temp[d=1],return=yaxis`)"
 !-> def sym yaxnam  "(YAXLEVITR1_90)"
list `($xaxnam)[d=1].nattrs`
 !-> list 4
             VARIABLE : constant
          4.000
say `($yaxnam)[d=1].nattrs`
 !-> MESSAGE/CONTINUE 3
3
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
!-----
! more on access to attribute names and values as variables
 
use coads_climatology
use levitus_climatology
use ocean_atlas_temp
use gt4d011
 
let a = temp.units
list/d=3 a
             VARIABLE : TEMP.UNITS
             FILENAME : ocean_atlas_temp.cdf
             X        : 1
        "Deg C"
list temp[d=3].units
             VARIABLE : TEMP[D=ocean_atlas_temp].UNITS
             FILENAME : gt4d011.cdf
        "Deg C"
list/d=3 temp.history
             VARIABLE : TEMP.HISTORY
             FILENAME : ocean_atlas_temp.cdf
        "From ocean_atlas_monthly"
 
can data/all
can var/all
 
use coads_climatology
! This syntax does not work:
! list sst[d=1].dimnames[i=2]
 
! But this does
let a = sst[d=1].dimnames
list a[i=2]
             VARIABLE : SST[D=coads_climatology].DIMNAMES
             FILENAME : coads_climatology.cdf
             X        : 2
        "COADSY"
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
! When the variable context is given in an attribute
! spec, we want to ignore the information except for the
! dataset, and just return the attribute of the variable.
 
use coads_climatology
define symbol ferret_plot_var sst[x=30:39,y=-90:90]
list ($ferret_plot_var).long_name
 !-> list sst[x=30:39,y=-90:90].long_name
             VARIABLE : SST[X=30:39,Y=-90:90].LONG_NAME
             FILENAME : coads_climatology.cdf
        "SEA SURFACE TEMPERATURE"
 
use coads_climatology
define symbol ferret_plot_var sst[d=1,x=30:35,y=-90:90]
list ($ferret_plot_var).units
 !-> list sst[d=1,x=30:35,y=-90:90].units
             VARIABLE : SST[D=coads_climatology,X=30:35,Y=-90:90].UNITS
             FILENAME : coads_climatology.cdf
        "Deg C"
 
use coads_climatology
use levitus_climatology
define symbol ferret_plot_var sst[d=1,x=30:35,y=-90:90]
list ($ferret_plot_var).history
 !-> list sst[d=1,x=30:35,y=-90:90].history
             VARIABLE : SST[D=coads_climatology,X=30:35,Y=-90:90].HISTORY
             FILENAME : levitus_climatology.cdf
        "From coads_climatology"
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
use levitus_climatology
use coads_climatology
 
def sym xaxnam  "(`temp[d=1],return=xaxis`)"
 !-> def sym xaxnam  "(XAXLEVITR1_160)"
def sym yaxnam  "(`temp[d=1],return=yaxis`)"
 !-> def sym yaxnam  "(YAXLEVITR1_90)"
 
list ($xaxnam)[d=1].modulo
 !-> list (XAXLEVITR1_160)[d=1].modulo
             VARIABLE : (XAXLEVITR1_160)[D=levitus_climatology].MODULO
             FILENAME : coads_climatology.cdf
        " "
list ($yaxnam).point_spacing[d=1]
 !-> list (YAXLEVITR1_90).point_spacing[d=1]
             VARIABLE : (YAXLEVITR1_90).POINT_SPACING[D=levitus_climatology]
             FILENAME : levitus_climatology.cdf
        "even"
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err61_show_dat_var_xml
! err61_show_dat_var_xml.jnl
! See bug 1580. Intermediate variablels associated with a
! variable that uses a grid-changing function should be
! skipped when writing variables by SHOW DATA/VAR/XML
 
! Define some varibles as in some of the tests of
! zaxreplace. Write to files.
 
! Define some variables as in some of the benchmark
! tests of zaxreplace. Write to files.
 
LET ddat = ZSEQUENCE({1126,1136,1146,1156,1166})
LET cycle = ZSEQUENCE({346, 347, 349, 350, 351})
DEFINE AXIS/Z=10:50:10 zaxis_orig
LET cycle_orig = cycle[GZ=zaxis_orig@ASN]
LET ddat_orig = ddat[GZ=zaxis_orig@ASN]
 
SAVE/CLOBBER/FILE=z1.nc ddat_orig
SAVE/CLOBBER/FILE=z2.nc cycle_orig
 
! Now use this data and define a user variable
! associated with datset 2 using ZAXREPLACE
 
CAN DAT/ALL; CAN VAR/ALL
USE z1
USE z2
DEFINE AXIS/Z=345:353:1 zaxis_des
LET dummy = Z[GZ=zaxis_des]
LET/D=2 ddat_a = ZAXREPLACE(ddat_orig[d=1], cycle_orig[d=2], dummy)
 
! Note how there are intermediate variables associated with the
! regridding operation
 
SHOW DATA 2
     currently SET data sets:
    2> ./z2.nc  (default)
 name     title                             I         J         K         L
 CYCLE_ORIG
          CYCLE[GZ=ZAXIS_ORIG@ASN]         ...       ...       1:5       ...
 ------------------------------
 DDAT_A[D=z2] = ZAXREPLACE(DDAT_ORIG[D=1], CYCLE_ORIG[D=2], DUMMY)
 
 
! Those intermediate variables should be skipped
! for SHOW DATA/VAR/XML
 
SHOW DATA/VAR/XML 2
<datasets>
<dataset name="./z2.nc" default="true">
<title> </title>
<var name="CYCLE_ORIG">
<attribute name="long_name" type="char">
   <value><![CDATA[CYCLE[GZ=ZAXIS_ORIG@ASN]]]></value>
</attribute>
<attribute name="_FillValue" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<grid name="GIX1">
<axes>
<zaxis>ZAXIS_ORIG</zaxis>
</axes>
</grid>
</var>
<var name="ddat_a">
<attribute name="definition" type="char">
   <value><![CDATA[ZAXREPLACE(DDAT_ORIG[D=1], CYCLE_ORIG[D=2], DUMMY)]]></value>
</attribute>
<attribute name="_FillValue" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[ZAXREPLACE(DDAT_ORIG[D=1], CYCLE_ORIG[D=2], DUMMY)]]></value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="(G###)">
<axes>
<zaxis>ZAXIS_DES</zaxis>
</axes>
</grid>
</var>
</dataset>
</datasets>
<axes>
<axis name="ZAXIS_ORIG">
<attribute name="direction" type="char">
   <value><![CDATA[K]]></value>
</attribute>
<attribute name="length" type="short">
   <value>5</value>
</attribute>
<attribute name="start" type="double">
   <value>10</value>
</attribute>
<attribute name="end" type="double">
   <value>50</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="axis" type="char">
   <value><![CDATA[Z]]></value>
</attribute>
<attribute name="standard_name" type="char">
   <value><![CDATA[altitude]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[ZAXIS_ORIG]]></value>
</attribute>
</axis>
<axis name="ZAXIS_DES">
<attribute name="direction" type="char">
   <value><![CDATA[K]]></value>
</attribute>
<attribute name="length" type="short">
   <value>9</value>
</attribute>
<attribute name="start" type="double">
   <value>345</value>
</attribute>
<attribute name="end" type="double">
   <value>353</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="axis" type="char">
   <value><![CDATA[Z]]></value>
</attribute>
</axis>
</axes>
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err61_360_calendar
! err61_360_calendar.jnl
!
 
! This first has always been ok
define axis/t=28-feb-1909:07-mar-1909:2/units=days/t0=1-jan-1909/calendar=d360 time
list t[gt=time]
             VARIABLE : T
                        axis TIME
             SUBSET   : 6 points (TIME)
             CALENDAR : 360_DAY
 28-FEB-1909 00 / 1:  57.00
 30-FEB-1909 00 / 2:  59.00
 02-MAR-1909 00 / 3:  61.00
 04-MAR-1909 00 / 4:  63.00
 06-MAR-1909 00 / 5:  65.00
 08-MAR-1909 00 / 6:  67.00
 
! Should be able to specify 30-feb-1909 for a 360-day calendar but it
! resulted in an error
define axis/t=30-feb-1909:07-mar-1909:2/units=days/t0=1-jan-1909/calendar=d360 time
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_exit_if.jnl
! err611_exit_if.jnl
!
! Bug 1587
! This only in v6.11 GFDL release bug
! Fixed in xeq_exit.F
 
sp echo if 1 then > a.jnl
sp echo exit/script >> a.jnl
sp echo endif >> a.jnl
sp echo go a > b.jnl
sp echo say hello >> b.jnl
go b  !the following fails to say "hello"
go a
if 1 then
exit/script
say hello
hello
go a
if 1 then
exit/script
if 1 then
exit/script
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_save_irreg.jnl
! err611_save_irreg.jnl
!
! bug1587
 
def axis/t time = {0,1,3}
let a = t[gt=time]
save/clob/file=a.nc a
can var a
can dat/all
use a.nc
save/clob/file=b.nc a
let b = a
list b
             VARIABLE : A
             FILENAME : a.nc
             SUBSET   : 3 points (T)
 0   / 1:  0.000
 1   / 2:  1.000
 3   / 3:  3.000
save/clob/file=b.nc b
 
*** Running ferret script: bn_no_valid_on_plot.jnl
! bn_no_valid_on_plot.jnl
! Bug 1038 points out that the No Valid Data label that is
! put onto 2D plot if there is no good data, is not put onto
! 1D plots.  Add it to the variable title so it shows up in the key
!
! Plot a region where there is no data
use coads_climatology
plot/x=56e:100e/y=40 sst[L=1]
ppl list labels
 @ACSEA SURFACE TEMPERATURE No Valid Data                                       
 @ASLONGITUDE                                                                   
 @ASDeg C                                                                       

          XPOS       YPOS     HGT   ROT   UNITS
 LAB 1  0.000E+00  6.800E+00 0.120    0  SYSTEM  @ASLATITUDE : 39N
 LINE PT:    0.000E+00 0.000E+00  NO LINE     LEFT   JUSTIFY LABEL
 LAB 2  0.000E+00  6.600E+00 0.120    0  SYSTEM  @ASTIME : 16-JAN 06:00
 LINE PT:    0.000E+00 0.000E+00  NO LINE     LEFT   JUSTIFY LABEL
 LAB 3  8.000E+00  6.630E+00 0.120    0  SYSTEM  @ASDATA SET: coads_climatology
 LINE PT:    0.000E+00 0.000E+00  NO LINE     RIGHT  JUSTIFY LABEL
 
! and now valid data overlaid with all-missing data
 
plot/x=56e:100e/y=10 sst[L=1]
plot/over/x=56e:100e/y=40 sst[L=1]
ppl list labels
                                                                                
 @ASLONGITUDE                                                                   
 @ASDeg C                                                                       

          XPOS       YPOS     HGT   ROT   UNITS
 LAB 1 -4.700E-01 -5.500E-01 0.080    0  SYSTEM  @ASSST[Y=39N] No Valid Data
 LINE PT:    0.000E+00 0.000E+00  NO LINE     LEFT   JUSTIFY LABEL
 
! For plots with multi lines in one plot command, mark each if no data
plot/x=56e:100e sst[L=1,y=10], sst[L=1,y=50], sst[L=1,y=20]
ppl list labels
                                                                                
 @ASLONGITUDE                                                                   
 @ASDeg C                                                                       

          XPOS       YPOS     HGT   ROT   UNITS
 LAB 1  0.000E+00  6.600E+00 0.120    0  SYSTEM  @ASTIME : 16-JAN 06:00
 LINE PT:    0.000E+00 0.000E+00  NO LINE     LEFT   JUSTIFY LABEL
 LAB 2  8.000E+00  6.630E+00 0.120    0  SYSTEM  @ASDATA SET: coads_climatology
 LINE PT:    0.000E+00 0.000E+00  NO LINE     RIGHT  JUSTIFY LABEL
 LAB 3  1.750E+00 -8.100E-01 0.120    0  SYSTEM  @ASSST[Y=9N]
 LINE PT:    0.000E+00 0.000E+00  NO LINE     LEFT   JUSTIFY LABEL
 LAB 4  5.370E+00 -8.100E-01 0.120    0  SYSTEM  @ASSST[Y=49N] No Valid Data
 LINE PT:    0.000E+00 0.000E+00  NO LINE     LEFT   JUSTIFY LABEL
 LAB 5  1.750E+00 -1.060E+00 0.120    0  SYSTEM  @ASSST[Y=19N]
 LINE PT:    0.000E+00 0.000E+00  NO LINE     LEFT   JUSTIFY LABEL
 
! For 2D plots create a new MODE NODATA_LAB which if on, puts
! the NO VALID DATA across the middle of the plot when there is
! no data, but allows us to turn this off.
 
CANCEL MODE nodata_lab
SHADE/Y=80:90 sst[L=1]
FILL/Y=80:90 sst[L=1]
CONTOUR/Y=80:90 sst[L=1]
 
VECTOR/Y=80:90 sst[L=1], sst[L=1]
 
SET MODE/last nodata_lab
*** Running ferret script: bn_median.jnl
! Test median smoothing tranform
! Default length is 3
 
use gtsa056_2.cdf
let var = u[x=180,y=0,k=1,t=1-jan-1982:1-jan-1983]
plot var, var[t=@med],  var[t=@med:3], var[t=@med:7]
list/t=1-dec-1982:1-jan-1983 var, var[t=@med],  var[t=@med:3], var[t=@med:7]
             DATA SET: ./data/gtsa056_2.cdf
             TIME: 29-NOV-1982 10:30 to 01-JAN-1983 21:30
             LONGITUDE: 180E
             LATITUDE: 0
             DEPTH (m): 5
 Column  1: VAR is U[X=180,Y=0,K=1,T=1-JAN-1982:1-JAN-1983]
 Column  2: VAR[T=@MED:3] is U[X=180,Y=0,K=1,T=1-JAN-1982:1-JAN-1983] (median smoothed by 3 pts on T)
 Column  3: VAR[T=@MED:3] is U[X=180,Y=0,K=1,T=1-JAN-1982:1-JAN-1983] (median smoothed by 3 pts on T)
 Column  4: VAR[T=@MED:7] is U[X=180,Y=0,K=1,T=1-JAN-1982:1-JAN-1983] (median smoothed by 7 pts on T)
                        VAR    VAR    VAR    VAR
30-NOV-1982 23 / 106: -10.07 -10.07 -10.07 -11.98
04-DEC-1982 00 / 107: -13.42 -13.42 -13.42 -10.07
07-DEC-1982 01 / 108: -15.07 -13.42 -13.42 -10.07
10-DEC-1982 02 / 109: -11.98 -11.98 -11.98 -10.07
13-DEC-1982 03 / 110:  -4.63  -4.63  -4.63  -4.63
16-DEC-1982 04 / 111:   0.77   0.77   0.77   0.77
19-DEC-1982 05 / 112:   1.06   1.06   1.06   1.06
22-DEC-1982 06 / 113:   2.75   2.75   2.75   2.75
25-DEC-1982 07 / 114:   9.07   9.07   9.07   4.21
28-DEC-1982 08 / 115:  10.80   9.07   9.07   4.21
31-DEC-1982 09 / 116:   4.21  10.80  10.80   9.07
 
use coads_climatology
let var= sst[y=0,L=10]
plot var,var[x=@med:3], var[x=@med:7]
list/x=80w:50w var,var[x=@med:3], var[x=@med:7]
             DATA SET: ./data/coads_climatology.cdf
             LONGITUDE: 80W to 50W
             LATITUDE: 1S
             TIME: 15-FEB 04:07
 Column  1: VAR is SST[Y=0,L=10]
 Column  2: VAR[X=@MED:3] is SST[Y=0,L=10] (median smoothed by 3 pts on X)
 Column  3: VAR[X=@MED:7] is SST[Y=0,L=10] (median smoothed by 7 pts on X)
               VAR    VAR    VAR
79W   / 131:   ....  25.99  25.93
77W   / 132:   ....   ....  25.99
75W   / 133:   ....   ....  25.99
73W   / 134:   ....   ....   ....
71W   / 135:   ....   ....   ....
69W   / 136:   ....   ....   ....
67W   / 137:   ....   ....   ....
65W   / 138:   ....   ....   ....
63W   / 139:   ....   ....  27.80
61W   / 140:   ....   ....  27.80
59W   / 141:   ....  27.80  27.65
57W   / 142:  27.80  27.80  27.70
55W   / 143:  27.65  27.65  27.65
53W   / 144:  27.43  27.65  27.65
51W   / 145:  27.70  27.43  27.65
 
let var= sst[x=180,L=10]
plot var,var[y=@med:3], var[y=@med:7]
list/y=-20:0 var,var[y=@med:3], var[y=@med:7]
             DATA SET: ./data/coads_climatology.cdf
             LATITUDE: 20S to 0
             LONGITUDE: 179E
             TIME: 15-FEB 04:07
 Column  1: VAR is SST[X=180,L=10]
 Column  2: VAR[Y=@MED:3] is SST[X=180,L=10] (median smoothed by 3 pts on Y)
 Column  3: VAR[Y=@MED:7] is SST[X=180,L=10] (median smoothed by 7 pts on Y)
              VAR    VAR    VAR
19S   / 36:  28.32  28.32  28.32
17S   / 37:  28.57  28.57  28.57
15S   / 38:  29.06  29.06  29.06
13S   / 39:  29.43  29.24  29.23
11S   / 40:  29.24  29.33  29.23
9S    / 41:  29.33  29.24  29.23
7S    / 42:  29.23  29.23  29.23
5S    / 43:  28.97  28.97  28.97
3S    / 44:  28.40  28.40  28.44
1S    / 45:  28.36  28.40  28.40
 
define axis/z=0:1000:20/depth zax
let var = cos(z[gz=zax]/30) + randu(1+k[gz=zax])
plot/trans var, var[z=@med:3], var[z=@med:9]
list/z=1:140 var, var[z=@med:3], var[z=@med:9]
             Z: 1 to 140
 Column  1: VAR is COS(Z[GZ=ZAX]/30) + RANDU(1+K[GZ=ZAX])
 Column  2: VAR[Z=@MED:3] is COS(Z[GZ=ZAX]/30) + RANDU(1+K[GZ=ZAX]) (median smoothed by 3 pts on Z)
 Column  3: VAR[Z=@MED:9] is COS(Z[GZ=ZAX]/30) + RANDU(1+K[GZ=ZAX]) (median smoothed by 9 pts on Z)
             VAR    VAR    VAR
0     / 1:  1.900  1.900  0.3281
20    / 2:  1.322  1.322  0.3281
40    / 3:  0.328  0.328  0.2405
60    / 4: -0.254 -0.157  0.3281
80    / 5: -0.157 -0.254  0.3281
100   / 6: -0.785 -0.157  0.3281
120   / 7:  0.241  0.241  0.3281
140   / 8:  0.390  0.390  0.3904
 
set mode ignore
! Argument to the median smoother must be odd.
 
plot/trans var, var[z=@med:4]
 
set mode/last ignore
 
*** Running ferret script: bn614_bug_fixes.jnl
! bn614_bug_fixes.jnl
! Fixes that go into v6.14 release
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_axislab
! err611_axislab.jnl
! Fix bug 1582: Horizontal axis label disappeared
! if PPL AXLABP moves it to the upper axis
 
plot/set/i=1:100 sin(i/6)
ppl axlabp,1,-1
ppl xlab TEMP(C)
ppl ylab DEPTH
ppl plot
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err61_360_calendar
! err61_360_calendar.jnl
!
 
! This first has always been ok
define axis/t=28-feb-1909:07-mar-1909:2/units=days/t0=1-jan-1909/calendar=d360 time
list t[gt=time]
             VARIABLE : T
                        axis TIME
             SUBSET   : 6 points (TIME)
             CALENDAR : 360_DAY
 28-FEB-1909 00 / 1:  57.00
 30-FEB-1909 00 / 2:  59.00
 02-MAR-1909 00 / 3:  61.00
 04-MAR-1909 00 / 4:  63.00
 06-MAR-1909 00 / 5:  65.00
 08-MAR-1909 00 / 6:  67.00
 
! Should be able to specify 30-feb-1909 for a 360-day calendar but it
! resulted in an error
define axis/t=30-feb-1909:07-mar-1909:2/units=days/t0=1-jan-1909/calendar=d360 time
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_exit_if.jnl
! err611_exit_if.jnl
!
! Bug 1587
! This only in v6.11 GFDL release bug
! Fixed in xeq_exit.F
 
sp echo if 1 then > a.jnl
sp echo exit/script >> a.jnl
sp echo endif >> a.jnl
sp echo go a > b.jnl
sp echo say hello >> b.jnl
go b  !the following fails to say "hello"
go a
if 1 then
exit/script
say hello
hello
go a
if 1 then
exit/script
if 1 then
exit/script
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_save_irreg.jnl
! err611_save_irreg.jnl
!
! bug1587
 
def axis/t time = {0,1,3}
let a = t[gt=time]
save/clob/file=a.nc a
can var a
can dat/all
use a.nc
save/clob/file=b.nc a
let b = a
list b
             VARIABLE : A
             FILENAME : a.nc
             SUBSET   : 3 points (T)
 0   / 1:  0.000
 1   / 2:  1.000
 3   / 3:  3.000
save/clob/file=b.nc b
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_wrong_fineaxis_range
! err611_wrong_fineaxis_range.jnl
! Bug 1594
 
! (bug was on 64-bit machine only)
! 7200-point axis in longitude. The coordinates run from -179.725 to 179.725,
! delta 0.05.  If we give a range in x of -180:180 this is returned as index
! 1:1  not 1:7200.  If we give a range of x=0:360 the correct range is used.
 
! File saved from
!use/order=xytz "http://apdrc.soest.hawaii.edu/dods/public_data/satellite_product/GHRSST/ghrsst_global"
! save/clobber/file=fine_x_axis.nc sst[i=1:7200,y=0,L=1]
 
use fine_x_axis
sh grid sst
    GRID GPY1
 name       axis              # pts   start                end                 subset
 LON       LONGITUDE         7200mr   179.97W(-179.97)     179.97E             full
 LAT1800_1800 LATITUDE          1 r   0.025S               0.025S              full
 ENS       Z (count)            1 r   1                    1                   full
 TIME1     TIME                 1 r   01-APR-2006 00:00    01-APR-2006 00:00   full
 
! This first was wrong, returned data at x=-180
list/x=180 sst
             VARIABLE : sea surface temperature [degc]
             FILENAME : fine_x_axis.nc
             LONGITUDE: 179.975E
             LATITUDE : 0.025S
             Z (count): 1
             TIME     : 01-APR-2006 00:00
          27.53
 
list/i=7200 sst
             VARIABLE : sea surface temperature [degc]
             FILENAME : fine_x_axis.nc
             LONGITUDE: 179.975E
             LATITUDE : 0.025S
             Z (count): 1
             TIME     : 01-APR-2006 00:00
          27.53
list/x=-180 sst
             VARIABLE : sea surface temperature [degc]
             FILENAME : fine_x_axis.nc
             LONGITUDE: 179.975W(-179.975)
             LATITUDE : 0.025S
             Z (count): 1
             TIME     : 01-APR-2006 00:00
          27.50
list/i=1 sst
             VARIABLE : sea surface temperature [degc]
             FILENAME : fine_x_axis.nc
             LONGITUDE: 179.975W(-179.975)
             LATITUDE : 0.025S
             Z (count): 1
             TIME     : 01-APR-2006 00:00
          27.50
 
! This gave a range in x of no points, so size was 1 should be 7200
let the_plot_var = sst[x=-180:180]
say `the_plot_var,return=size`
 !-> MESSAGE/CONTINUE 7200
7200
 
let the_plot_var = sst[x=0:360]
say `the_plot_var,return=size`
 !-> MESSAGE/CONTINUE 7200
7200
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_digit_filename
! err611_digit_filename.jnl
! Under linux, FILE command fails if filename
! starts with digit(s)
 
! bug 287 (never had a benchmark test)
 
REPEAT/RANGE=1:12:2/name=m \
  (LIST/CLOBBER/NOHEAD/NOROWHEAD/I=1:3/FILE=`m`a.dat i; \
   FILE/VAR="a`m`" `m`a.dat; LIST a`m`)
!-> REPEAT: M:1
 !-> LIST/CLOBBER/NOHEAD/NOROWHEAD/I=1:3/FILE=1a.dat i
 !-> SET DATA/EZ/VAR="a1" 1a.dat
 !-> LIST a1
             VARIABLE : a1
             FILENAME : 1a.dat
             SUBSET   : 3 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
!-> REPEAT: M:3
 !-> LIST/CLOBBER/NOHEAD/NOROWHEAD/I=1:3/FILE=3a.dat i
 !-> SET DATA/EZ/VAR="a3" 3a.dat
 !-> LIST a3
             VARIABLE : a3
             FILENAME : 3a.dat
             SUBSET   : 3 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
!-> REPEAT: M:5
 !-> LIST/CLOBBER/NOHEAD/NOROWHEAD/I=1:3/FILE=5a.dat i
 !-> SET DATA/EZ/VAR="a5" 5a.dat
 !-> LIST a5
             VARIABLE : a5
             FILENAME : 5a.dat
             SUBSET   : 3 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
!-> REPEAT: M:7
 !-> LIST/CLOBBER/NOHEAD/NOROWHEAD/I=1:3/FILE=7a.dat i
 !-> SET DATA/EZ/VAR="a7" 7a.dat
 !-> LIST a7
             VARIABLE : a7
             FILENAME : 7a.dat
             SUBSET   : 3 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
!-> REPEAT: M:9
 !-> LIST/CLOBBER/NOHEAD/NOROWHEAD/I=1:3/FILE=9a.dat i
 !-> SET DATA/EZ/VAR="a9" 9a.dat
 !-> LIST a9
             VARIABLE : a9
             FILENAME : 9a.dat
             SUBSET   : 3 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
!-> REPEAT: M:11
 !-> LIST/CLOBBER/NOHEAD/NOROWHEAD/I=1:3/FILE=11a.dat i
 !-> SET DATA/EZ/VAR="a11" 11a.dat
 !-> LIST a11
             VARIABLE : a11
             FILENAME : 11a.dat
             SUBSET   : 3 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
SHOW DATA
     currently SET data sets:
    1> ./1a.dat
 name     title                             I         J         K         L
 A1       a1                               1:3       ...       ...       ...
 
    2> ./3a.dat
 name     title                             I         J         K         L
 A3       a3                               1:3       ...       ...       ...
 
    3> ./5a.dat
 name     title                             I         J         K         L
 A5       a5                               1:3       ...       ...       ...
 
    4> ./7a.dat
 name     title                             I         J         K         L
 A7       a7                               1:3       ...       ...       ...
 
    5> ./9a.dat
 name     title                             I         J         K         L
 A9       a9                               1:3       ...       ...       ...
 
    6> ./11a.dat  (default)
 name     title                             I         J         K         L
 A11      a11                              1:3       ...       ...       ...
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_parse_semicolon
! err611_parse_semicolon.jnl
! Bug 1608. The first time it was issued, the first command
! below was split into two at the ;
! Test this and some other combinations
 
say "c ; d"
c ; d
say "c //d"
c //d
say "c (d"
c (d
say "c (d"; say "a ; b"
"c (d"; say "a ; b"
say "c (d; say a ; b"
c (d; say a ; b
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_ov_ax
! err611_ov_ax.jnl
!
! bug 1609
!
! in the two lower panels, the plot/over/ax=0,0,0,0
! messes up the ppl axlabp setting in the last command
!
 
can v
set v ul; ppl axlabp -1 -1; plot/nolab {-1,1,6}
plot/ov/vs/nolab/line=2 {1,2,2,1},{0,0,3,0}
set v ur; ppl axlabp 0 0; plot/nolab {-1,1,6}
 
set v ll; ppl axlabp -1 -1; plot/nolab {-1,1,6}
plot/ov/vs/nolab/line=2/ax=0,0,0,0 {1,2,2,1},{0,0,3,0}
set v lr; ppl axlabp 0 0; plot/nolab {-1,1,6}
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_context_after_error
! err611_context_after_error.jnl
! ACM 11/12/08
!
! Bug 1421 - goes back even to older versions of Ferret e.g. 5.41 on stout
! Context errors after
!
!    list a_regrid[d=1,gt=b[d=2]@mod]
!    ...
!    cancel data/all
!
! if the list command is issued before the variable a_regrid is defined.
 
 
SET MODE ignore_error
USE bug1421_a
USE bug1421_b
 
SHOW DATA
     currently SET data sets:
    1> ./data/bug1421_a.nc
 name     title                             I         J         K         L
 A        zonal wind stress                1:1       1:1       ...       1:20
 
    2> ./data/bug1421_b.nc  (default)
 name     title                             I         J         K         L
 B        T[GT=MON_IRREG_NLP]              ...       ...       ...       1:12
 
SHOW AXIS LON88_88
 name       axis              # pts   start                end
 LON88_88  LONGITUDE            1mr   141.25W              141.25W
   Axis span (to cell edges) = 1 (modulo length = 360)
SHOW AXIS LAT45_45
 name       axis              # pts   start                end
 LAT45_45  LATITUDE             1 r   1.011S               1.011S
   Axis span (to cell edges) = 1
SHOW AXIS MON_IRREG_NLP
 name       axis              # pts   start                end
 MON_IRREG_NLP TIME            12mi   16-JAN 12:00         16-DEC 12:00
T0 = 01-JAN-0001 00:00:00
CALENDAR = NOLEAP
   Axis span (to cell edges) = 364 (modulo length = 365)
 
DEF AXIS/T/UNITS="days"/T0="1-jan-0001"/cal=noleap tnew = tboxlo[GT=a[D=1]]
LIST a_regrid[D=1,GT=b[D=2]@MOD]
LET a_regrid = a[D=1,GT=tnew@ASN]
LIST a_regrid[D=1,GT=b[D=2]@MOD]
             VARIABLE : A[D=bug1421_a,GT=TNEW@ASN]
                        regrid: on T@MOD
             SUBSET   : 12 points (TIME)
             CALENDAR : NOLEAP
             LONGITUDE: 141.25W
             LATITUDE : 1.011S
                        141.2W  
                          1
 16-JAN 12      /  1:  0.05848
 15-FEB 00      /  2:  0.05188
 16-MAR 12      /  3:  0.04783
 16-APR 00      /  4:  0.03808
 16-MAY 12      /  5:  0.05938
 16-JUN 00      /  6:  0.06572
 16-JUL 12      /  7:  0.06153
 16-AUG 12      /  8:  0.07461
 16-SEP 00      /  9:  0.05815
 16-OCT 12      / 10:  0.06169
 16-NOV 00      / 11:  0.05655
 16-DEC 12      / 12:  0.05769
 
CANCEL DATA/ALL
SHOW AXIS LON88_88
 name       axis              # pts   start                end
SHOW AXIS LAT45_45
 name       axis              # pts   start                end
SHOW AXIS MON_IRREG_NLP
 name       axis              # pts   start                end
 
SET MODE/LAST ignore_error
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_isize_gc_fcns
! err611_isize_gc_fcns.jnl
! ACM 11/13/2008
!
! Testing the fix for bug 1523.  Previously after the SET REGION,
! the RETURN= always returned a size of 10, the default region size.
 
LET a = {1,2,3,4,5,6}
 
! Should be 6
SAY `a,RETURN=isize`
 !-> MESSAGE/CONTINUE 6
6
SAY `XSEQUENCE(a),RETURN=isize`
 !-> MESSAGE/CONTINUE 6
6
 
SET REGION/X=1:10
! Should still be 6
SAY `XSEQUENCE(a),RETURN=isize`
 !-> MESSAGE/CONTINUE 6
6
 
! Should be 4
SAY `XSEQUENCE(a[i=1:4]),RETURN=isize`
 !-> MESSAGE/CONTINUE 4
4
 
SAY `XSEQUENCE(a[i=1:4]),RETURN=size`
 !-> MESSAGE/CONTINUE 4
4
 
CANCEL REGION
! Should be 5 then 6
SAY `XSEQUENCE(a[i=1:5]),RETURN=size`
 !-> MESSAGE/CONTINUE 5
5
SAY `XSEQUENCE(a),RETURN=size`
 !-> MESSAGE/CONTINUE 6
6
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_return_precision
! err611_return_precision.jnl
! 17-Nov-08 ACM
 
! See bug 1611, where say "a`95,p=1`" yielded "a 95" but
! "a`94,p=1`" yielded "a94"
! Note with ticket 2389 (5/2016), p=1 returns 1 digit, p=2 returns 2, etc.
 
say "a`95,p=1`"
 !-> MESSAGE/CONTINUE "a1.E+02"
a1.E+02
say "a`94,p=1`"
 !-> MESSAGE/CONTINUE "a9.E+01"
a9.E+01
say "a`95,p=1`"
 !-> MESSAGE/CONTINUE "a1.E+02"
a1.E+02
say "a`949,p=1`"
 !-> MESSAGE/CONTINUE "a9.E+02"
a9.E+02
say "a`950,p=1`"
 !-> MESSAGE/CONTINUE "a1.E+03"
a1.E+03
 
! Note that an immediate expr with prec=0 returns an integer.
say "a`95,p=0`"
 !-> MESSAGE/CONTINUE "a95"
a95
say "a`94,p=0`"
 !-> MESSAGE/CONTINUE "a94"
a94
say "a`95,p=0`"
 !-> MESSAGE/CONTINUE "a95"
a95
say "a`949,p=0`"
 !-> MESSAGE/CONTINUE "a949"
a949
say "a`950,p=0`"
 !-> MESSAGE/CONTINUE "a950"
a950
 
! Tests for non-integers
! We always return at least one sig digit
say "a`0.1,p=0`"
 !-> MESSAGE/CONTINUE "a0"
a0
 
say "a`-95,p=1`"
 !-> MESSAGE/CONTINUE "a-1.E+02"
a-1.E+02
say "a`-95.99,p=1`"
 !-> MESSAGE/CONTINUE "a-1.E+02"
a-1.E+02
say "a`-95.001,p=1`"
 !-> MESSAGE/CONTINUE "a-1.E+02"
a-1.E+02
 
say "a`-94,p=1`"
 !-> MESSAGE/CONTINUE "a-9.E+01"
a-9.E+01
say "a`-94.99,p=1`"
 !-> MESSAGE/CONTINUE "a-9.E+01"
a-9.E+01
say "a`-94.001,p=1`"
 !-> MESSAGE/CONTINUE "a-9.E+01"
a-9.E+01
 
say "a`-95,p=1`"
 !-> MESSAGE/CONTINUE "a-1.E+02"
a-1.E+02
say "a`-95.99,p=1`"
 !-> MESSAGE/CONTINUE "a-1.E+02"
a-1.E+02
say "a`-95.001,p=1`"
 !-> MESSAGE/CONTINUE "a-1.E+02"
a-1.E+02
 
say "a`-949,p=1`"
 !-> MESSAGE/CONTINUE "a-9.E+02"
a-9.E+02
say "a`-949.99,p=1`"
 !-> MESSAGE/CONTINUE "a-9.E+02"
a-9.E+02
say "a`-949.001,p=1`"
 !-> MESSAGE/CONTINUE "a-9.E+02"
a-9.E+02
 
say "a`-950,p=1`"
 !-> MESSAGE/CONTINUE "a-1.E+03"
a-1.E+03
say "a`-950.99,p=1`"
 !-> MESSAGE/CONTINUE "a-1.E+03"
a-1.E+03
say "a`-950.001,p=1`"
 !-> MESSAGE/CONTINUE "a-1.E+03"
a-1.E+03
 
 
say "a`-95,p=0`"
 !-> MESSAGE/CONTINUE "a-95"
a-95
say "a`-95.99,p=0`"
 !-> MESSAGE/CONTINUE "a-96"
a-96
say "a`-95.001,p=0`"
 !-> MESSAGE/CONTINUE "a-95"
a-95
 
say "a`-94,p=0`"
 !-> MESSAGE/CONTINUE "a-94"
a-94
say "a`-94.99,p=0`"
 !-> MESSAGE/CONTINUE "a-95"
a-95
say "a`-94.001,p=0`"
 !-> MESSAGE/CONTINUE "a-94"
a-94
 
say "a`-95,p=0`"
 !-> MESSAGE/CONTINUE "a-95"
a-95
say "a`-95.99,p=0`"
 !-> MESSAGE/CONTINUE "a-96"
a-96
say "a`-95.001,p=0`"
 !-> MESSAGE/CONTINUE "a-95"
a-95
 
say "a`-949,p=0`"
 !-> MESSAGE/CONTINUE "a-949"
a-949
say "a`-949.99,p=0`"
 !-> MESSAGE/CONTINUE "a-950"
a-950
say "a`-949.001,p=0`"
 !-> MESSAGE/CONTINUE "a-949"
a-949
 
say "a`-950,p=0`"
 !-> MESSAGE/CONTINUE "a-950"
a-950
say "a`-950.99,p=0`"
 !-> MESSAGE/CONTINUE "a-951"
a-951
say "a`-950.001,p=0`"
 !-> MESSAGE/CONTINUE "a-950"
a-950
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_set_var_ez
! err611_set_var_ez.jnl
! 6-Jan-2009
! Ticket 1615
!
! SET VAR/UNITS=  etc for a variable in an EZ dataset
! The settings were applied within the Ferret session (plots etc)
! but not added to the attribute structure and not written to
! output files.
 
SP echo "err611_set_var_ez.jnl --- " >> all_ncdump.out
 
! Create an ASCII dataset
LET a = {1,3,5}
LIST/NOHEAD/FORM=(F8.1)/FILE=dat.dat/CLOBBER a
FILE/VAR=my_asc dat.dat
 
! use SET VAR to add units, title, reset bad value
SET VAR/UNITS="micrograms/L"/TITLE="chlorophyll"/BAD=3 my_asc
SHOW DAT/ATT
     currently SET data sets:
    1> ./dat.dat  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        7    F       dat.dat
  
 my_asc                DOUBLE    long_name       CHAR        11   T       chlorophyll
                                 missing_value   DOUBLE      1    T       3
                                 units           CHAR        12   T       micrograms/L
  
SAVE/FILE=a.nc/CLOBBER my_asc
SP ncdump -h a.nc >> all_ncdump.out
 
! Create an Unformatted dataset
LIST/FORM=UNF/file=unf.dat/CLOBBER a
FILE/FORM=UNF/VAR=my_unf unf.dat
 
! use SET VAR to add units, title, reset bad value
SET VAR/UNITS="metres"/TITLE="Some Unformatted input"/BAD=5 my_unf
SAVE/FILE=a.nc/CLOBBER my_unf
SP ncdump -h a.nc >> all_ncdump.out
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_convert_missing_type
! err611_convert_missing_type.jnl
! Fix for bug 1620 message about converting data type of
! missing value flag from double to float when the data
! is from an EZ data set and being written to netCDF file.
 
! Save some data and read it in as a delimited file
 
LET xx = {-3,4,5}
LET yy = {1,2,3}
LIST/CLOBBER/NOHEAD/NOROWHEAD/FORM=(3f8.2)/FILE=lonlat.dat xx,yy
DEFINE AXIS/X=1:3:1 xobs
DEFINE GRID/X=xobs gobs
COL/GRID=gobs/VAR="lon,lat"/TYPE="longitude,latitude"  lonlat.dat
 
! On this SAVE, previously got a NOTE about converting the type of the
! missing-value attribute to match the type of the variable.
 
SAVE/CLOBBER/FILE=lonlat.nc lat, lon
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_shade_fill_levs
! err611_shade_fill_levs.jnl
! 2/27/2009
! Bug 1641: On 32-bit linux, these give different
! sets of levels. They should be the same.
 
shade x[gx=0:1:.1]*y[gy=0:1:.1]; sh sym lev*
LEV_MIN = "0"
LEV_MAX = "1.05"
LEV_NUM = "21"
LEV_DEL = "0.05"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "0,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,1,1.05"
fill  x[gx=0:1:.1]*y[gy=0:1:.1]; sh sym lev*
LEV_MIN = "0"
LEV_MAX = "1.05"
LEV_NUM = "21"
LEV_DEL = "0.05"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "0,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,1,1.05"
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_set_uvar_outtyp
! err611_set_uvar_outtyp.jnl
! fix for bug 1646: set outtype for user variables.
 
sp echo "bn_attributes.jnl --- SET VAR/OUTTYPE for user variable" >> all_ncdump.out
 
LET a = {1.1,2.2,3.3}
SET VAR/OUTTYPE = double a
SAVE/CLOBBER/FILE=a.nc a
SP ncdump a.nc >> all_ncdump.out
 
 
! When changing to INT, need to also change the
! missing-value flag.
LET a = { 3.77, 4.00, 4.10, 4.33, 4.38, 4.27, 4.31, 4.40, 4.75, 5.01, 5.27, 5.52}
SET VAR/BAD=999/OUTTYPE=int a
SAVE/CLOBBER/FILE=a.nc a
SP ncdump a.nc >> all_ncdump.out
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_save_from_desc
! err611_save_from_desc.jnl
!
! In Ferret v6.19+ this failed with
!  ** netCDF error: Failed creating coord variable %%
 
use coads_clim.des
save/clobber/file=a.nc/i=100 sst
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_irregular_axis
 ! err611_irregular_axis.jnl
 
 ! See bug 1483, all about detecting irregular and regular axes. Finally
 ! did the right thing and test double-precision coordinates in DP and
 ! if single precision axes comes in, test that in SP.
 
! The dataset was created as follows to have large time coordinates but
! irregularly spaced.
 
! define axis/t=1-jan-2008:"1-jan-2008:00:02:22":1/units=seconds/t0="1-jan-0001" tax
! let cc = L[gt=tax]
! save/file=cc.nc/clobber cc
! Use ncdump to write a cdl file and edit that file to remove one time
! coordinate and one value of cc. Run ncgen and write cc_irreg.nc
 
! Previous versions of this detected the axis as regular.
 
use cc_irreg.nc
sh grid cc
    GRID GCZ1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TAX       TIME               142 i   30-DEC-2007 00:00    30-DEC-2007 00:02   full
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_ef_string_result
! err611_ef_string_result.jnl
! testing the fix for bug 1621
! call to EFCN_GET_RTN_TYPE wasn't hooked up in gcf_rtn_type.F
!
 
define axis/t=1-jan-1980:1-jan-1990:4/unit=days tax
define grid/t=tax gg
let date_list = t[t=29000:29900:100]
list tax_datestring(date_list,t[g=gg],"day")
             VARIABLE : TAX_DATESTRING(DATE_LIST,T[G=GG],"day")
             SUBSET   : 10 points (T)
 29000   /  1:"09-JUN-1980"
 29100   /  2:"17-SEP-1980"
 29200   /  3:"26-DEC-1980"
 29300   /  4:"05-APR-1981"
 29400   /  5:"14-JUL-1981"
 29500   /  6:"22-OCT-1981"
 29600   /  7:"30-JAN-1982"
 29700   /  8:"10-MAY-1982"
 29800   /  9:"18-AUG-1982"
 29900   / 10:"26-NOV-1982"
let v = tax_datestring(date_list,t[g=gg],"day")
list v
             VARIABLE : TAX_DATESTRING(DATE_LIST,T[G=GG],"day")
             SUBSET   : 10 points (T)
 29000   /  1:"09-JUN-1980"
 29100   /  2:"17-SEP-1980"
 29200   /  3:"26-DEC-1980"
 29300   /  4:"05-APR-1981"
 29400   /  5:"14-JUL-1981"
 29500   /  6:"22-OCT-1981"
 29600   /  7:"30-JAN-1982"
 29700   /  8:"10-MAY-1982"
 29800   /  9:"18-AUG-1982"
 29900   / 10:"26-NOV-1982"
 
! Combine tax_datestring call with *cat_str function
 
let yr = tax_datestring(date_list,t[g=gg],"second")
let both = tcat_str(v, yr)
list both
             VARIABLE : TCAT_STR(V, YR)
             SUBSET   : 20 points (T)
 1    /  1:"09-JUN-1980"         
 2    /  2:"17-SEP-1980"         
 3    /  3:"26-DEC-1980"         
 4    /  4:"05-APR-1981"         
 5    /  5:"14-JUL-1981"         
 6    /  6:"22-OCT-1981"         
 7    /  7:"30-JAN-1982"         
 8    /  8:"10-MAY-1982"         
 9    /  9:"18-AUG-1982"         
 10   / 10:"26-NOV-1982"         
 11   / 11:"09-JUN-1980 00:00:00"
 12   / 12:"17-SEP-1980 00:00:00"
 13   / 13:"26-DEC-1980 00:00:00"
 14   / 14:"05-APR-1981 00:00:00"
 15   / 15:"14-JUL-1981 00:00:00"
 16   / 16:"22-OCT-1981 00:00:00"
 17   / 17:"30-JAN-1982 00:00:00"
 18   / 18:"10-MAY-1982 00:00:00"
 19   / 19:"18-AUG-1982 00:00:00"
 20   / 20:"26-NOV-1982 00:00:00"
 
let xt = xcat_str(v, yr)
list xt
             VARIABLE : XCAT_STR(V, YR)
             SUBSET   : 2 by 10 points (X-T)
                         1                     2            
                          1                     2
 29000   /  1:"09-JUN-1980"         "09-JUN-1980 00:00:00"
 29100   /  2:"17-SEP-1980"         "17-SEP-1980 00:00:00"
 29200   /  3:"26-DEC-1980"         "26-DEC-1980 00:00:00"
 29300   /  4:"05-APR-1981"         "05-APR-1981 00:00:00"
 29400   /  5:"14-JUL-1981"         "14-JUL-1981 00:00:00"
 29500   /  6:"22-OCT-1981"         "22-OCT-1981 00:00:00"
 29600   /  7:"30-JAN-1982"         "30-JAN-1982 00:00:00"
 29700   /  8:"10-MAY-1982"         "10-MAY-1982 00:00:00"
 29800   /  9:"18-AUG-1982"         "18-AUG-1982 00:00:00"
 29900   / 10:"26-NOV-1982"         "26-NOV-1982 00:00:00"
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err61_contour_subspan_reps
! err61_contour_subspan_reps.jnl
! Bug 1659.
!
!
! CONTOUR (or FILL) doesn't work properly with a subspan modulo axis,
! unlike SHADE. And we get different CONTOUR results if the subspan modulo
! axis coordinates are supplied on the positive vs. the negative modulo branch.
 
use coads_climatology
let a = sst[x=120:284,y=-2:2@ave]
save/clob/file=a.nc a
 
can var a
use a
set reg/x=125e:70w
shade/x=-360:360 a
fill/ov/pal=greyscale/x=-360:360 a
cont/ov/x=-360:360 a
 
! Now region in negative x
 
can dat/all; can var/all
 
use coads_climatology
let b = sst[x=-240:-76,y=-2:2@ave]
save/clob/file=b.nc b
 
can var b
use b
set reg/x=125e:70w
shade/x=-360:360 b
fill/ov/pal=greyscale/x=-360:360 b
cont/ov/x=-360:360 b
 
*** Running ferret script: bn_mode_nodata_lab.jnl
! bn_mode_nodata_lab
! turns off the No Valid Data label on plots
! (for line plots this is added to the plot label,
!  if the mode is SET).
 
SHOW MODE nodata_lab
      MODE            STATE        ARGUMENT
      NODATA_LAB       SET
 
use coads_climatology
let uwnd = sst
let vwnd = -1*sst
 
plot/y=50/x=70e:110e/L=1 sst
shade/y=40:50/x=70e:110e/L=1 sst
vec/y=40:50/x=70e:110e/L=1 uwnd,vwnd
contour/y=40:50/x=70e:110e/L=1 vwnd
contour/fill/y=40:50/x=70e:110e/L=1 vwnd
 
can mode nodata_lab
plot/y=50/x=70e:110e/L=1 sst
shade/y=40:50/x=70e:110e/L=1 sst
vec/y=40:50/x=70e:110e/L=1 uwnd,vwnd
contour/y=40:50/x=70e:110e/L=1 vwnd
contour/fill/y=40:50/x=70e:110e/L=1 vwnd
 
set mode/last nodata_lab
 
*** Running ferret script: bn_proleptic_gregorian_calendar.jnl
! proleptic_gregorian_calendar.jnl
! Allow PROLEPTIC_GREGORIAN as a calendar attribute
! for the default Ferret calendar.
 
set data proleptic_gregorian.nc
show data
     currently SET data sets:
    1> ./data/proleptic_gregorian.nc  (default)
 name     title                             I         J         K         L
 MY_DATA  SIN(L[GT=TDAYS])                 ...       ...       ...       1:32
 
show axis tdays
 name       axis              # pts   start                end
 TDAYS     TIME                32 r   01-JAN-1988 00:00    01-FEB-1988 00:00
T0 = 15-JAN-1901 00:00:00
CALENDAR = PROLEPTIC_GREGORIAN
   Axis span (to cell edges) = 32
*** Running ferret script: bn_string_ngd_nbd.jnl
! @NGD and @NBD for strings
! Bad data is taken to be the null string
! Compare with results for numeric data
! *ACM 11/2008
 
let a = {"a","b",,"cd"}
list a[i=@ngd]
             VARIABLE : {"a","b",,"cd"} (# of points)
             X        : 0.5 to 4.5 (number of valid)
          3.000
 
let a = {"a","b",,"c",,"d",,,"e","f","g","h"}
let b = { 3,  3 ,, 3 ,, 3 ,,, 3,  3,  3,  3}
list a[i=@nbd]
             VARIABLE : {"a","b",,"c",,"d",,,"e","f","g","h"} (# of points)
             X        : 0.5 to 12.5 (number flagged bad)
          4.000
list b[i=@nbd]
             VARIABLE : { 3,  3 ,, 3 ,, 3 ,,, 3,  3,  3,  3} (# of points)
             X        : 0.5 to 12.5 (number flagged bad)
          4.000
 
define axis/x=1:3:1 xax
define axis/y=1:4:1 yax
let v = x[gx=xax] + y[gy=yax]
 
let av = reshape (a,v)
let bv = reshape (b,v)
list av[i=@ngd]
             VARIABLE : RESHAPE (A,V) (# of points)
             SUBSET   : 4 points (Y)
             X        : 0.5 to 3.5 (number of valid)
 1   / 1:  2.000
 2   / 2:  2.000
 3   / 3:  1.000
 4   / 4:  3.000
list bv[i=@ngd]
             VARIABLE : RESHAPE (B,V) (# of points)
             SUBSET   : 4 points (Y)
             X        : 0.5 to 3.5 (number of valid)
 1   / 1:  2.000
 2   / 2:  2.000
 3   / 3:  1.000
 4   / 4:  3.000
list av[j=@ngd]
             VARIABLE : RESHAPE (A,V) (# of points)
             SUBSET   : 3 points (X)
             Y        : 0.5 to 4.5 (number of valid)
 1   / 1:  3.000
 2   / 2:  2.000
 3   / 3:  3.000
list bv[j=@ngd]
             VARIABLE : RESHAPE (B,V) (# of points)
             SUBSET   : 3 points (X)
             Y        : 0.5 to 4.5 (number of valid)
 1   / 1:  3.000
 2   / 2:  2.000
 3   / 3:  3.000
list av[i=@ngd,j=@ngd]
             VARIABLE : RESHAPE (A,V)
             X        : 0.5 to 3.5 (XY # valid)
             Y        : 0.5 to 4.5 (XY # valid)
          8.000
list bv[i=@ngd,j=@ngd]
             VARIABLE : RESHAPE (B,V)
             X        : 0.5 to 3.5 (XY # valid)
             Y        : 0.5 to 4.5 (XY # valid)
          8.000
 
 
define axis/x=1:3:1 xax
define axis/z=1:4:1 zax
let v = x[gx=xax] + z[gz=zax]
 
let av = reshape (a,v)
list av[i=@nbd]
             VARIABLE : RESHAPE (A,V) (# of points)
             SUBSET   : 4 points (Z)
             X        : 0.5 to 3.5 (number flagged bad)
 1   / 1:  1.000
 2   / 2:  1.000
 3   / 3:  2.000
 4   / 4:  0.000
list bv[i=@nbd]
             VARIABLE : RESHAPE (B,V) (# of points)
             SUBSET   : 4 points (Z)
             X        : 0.5 to 3.5 (number flagged bad)
 1   / 1:  1.000
 2   / 2:  1.000
 3   / 3:  2.000
 4   / 4:  0.000
list av[k=@nbd]
             VARIABLE : RESHAPE (A,V) (# of points)
             SUBSET   : 3 points (X)
             Z        : 0.5 to 4.5 (number flagged bad)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  1.000
list bv[k=@nbd]
             VARIABLE : RESHAPE (B,V) (# of points)
             SUBSET   : 3 points (X)
             Z        : 0.5 to 4.5 (number flagged bad)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  1.000
list av[i=@nbd,k=@nbd]
             VARIABLE : RESHAPE (A,V)
             X        : 0.5 to 3.5 (XZ # bad)
             Z        : 0.5 to 4.5 (XZ # bad)
          4.000
list bv[i=@nbd,k=@nbd]
             VARIABLE : RESHAPE (B,V)
             X        : 0.5 to 3.5 (XZ # bad)
             Z        : 0.5 to 4.5 (XZ # bad)
          4.000
 
define axis/x=1:3:1 xax
define axis/t=1:4:1 tax
let v = x[gx=xax] + t[gt=tax]
 
let av = reshape (a,v)
list av[i=@ngd]
             VARIABLE : RESHAPE (A,V) (# of points)
             SUBSET   : 4 points (T)
             X        : 0.5 to 3.5 (number of valid)
 1   / 1:  2.000
 2   / 2:  2.000
 3   / 3:  1.000
 4   / 4:  3.000
list bv[i=@ngd]
             VARIABLE : RESHAPE (B,V) (# of points)
             SUBSET   : 4 points (T)
             X        : 0.5 to 3.5 (number of valid)
 1   / 1:  2.000
 2   / 2:  2.000
 3   / 3:  1.000
 4   / 4:  3.000
list av[L=@ngd]
             VARIABLE : RESHAPE (A,V) (# of points)
             SUBSET   : 3 points (X)
             T        : 0.5 to 4.5 (number of valid)
 1   / 1:  3.000
 2   / 2:  2.000
 3   / 3:  3.000
list bv[L=@ngd]
             VARIABLE : RESHAPE (B,V) (# of points)
             SUBSET   : 3 points (X)
             T        : 0.5 to 4.5 (number of valid)
 1   / 1:  3.000
 2   / 2:  2.000
 3   / 3:  3.000
list av[i=@ngd,L=@ngd]
             VARIABLE : RESHAPE (A,V)
             X        : 0.5 to 3.5 (XT # valid)
             T        : 0.5 to 4.5 (XT # valid)
          8.000
list bv[i=@ngd,L=@ngd]
             VARIABLE : RESHAPE (B,V)
             X        : 0.5 to 3.5 (XT # valid)
             T        : 0.5 to 4.5 (XT # valid)
          8.000
 
!4D variable
let a = {"a","b",,"c",,"d",,,"e","f","g","h","ab","bb",,"cb",,"db",,,"eb","fb","gb","hb"}
let b = {3,3,,3,,3,,,3,3,3,3,3,3,,3,,3,,,3,3,3,3}
 
define axis/x=1:2:1 xax
define axis/y=1:2:1 yax
define axis/z=1:3:1 zax
define axis/t=1:2:1 tax
let v = x[gx=xax] + y[gy=yax] + z[gz=zax] + t[gt=tax]
 
let av = reshape (a,v)
list av[i=@nbd]
             VARIABLE : RESHAPE (A,V) (# of points)
             SUBSET   : 2 by 3 by 2 points (Y-Z-T)
             X        : 0.5 to 2.5 (number flagged bad)
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  0.000  1.000
 2   / 2:  1.000  2.000
 3   / 3:  0.000  0.000
 ---- L:2 T:   2
 1   / 1:  0.000  1.000
 2   / 2:  1.000  2.000
 3   / 3:  0.000  0.000
list bv[i=@nbd]
             VARIABLE : RESHAPE (B,V) (# of points)
             SUBSET   : 2 by 3 by 2 points (Y-Z-T)
             X        : 0.5 to 2.5 (number flagged bad)
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  0.000  1.000
 2   / 2:  1.000  2.000
 3   / 3:  0.000  0.000
 ---- L:2 T:   2
 1   / 1:  0.000  1.000
 2   / 2:  1.000  2.000
 3   / 3:  0.000  0.000
list av[j=@nbd]
             VARIABLE : RESHAPE (A,V) (# of points)
             SUBSET   : 2 by 3 by 2 points (X-Z-T)
             Y        : 0.5 to 2.5 (number flagged bad)
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  1.000  0.000
 2   / 2:  2.000  1.000
 3   / 3:  0.000  0.000
 ---- L:2 T:   2
 1   / 1:  1.000  0.000
 2   / 2:  2.000  1.000
 3   / 3:  0.000  0.000
list bv[j=@nbd]
             VARIABLE : RESHAPE (B,V) (# of points)
             SUBSET   : 2 by 3 by 2 points (X-Z-T)
             Y        : 0.5 to 2.5 (number flagged bad)
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  1.000  0.000
 2   / 2:  2.000  1.000
 3   / 3:  0.000  0.000
 ---- L:2 T:   2
 1   / 1:  1.000  0.000
 2   / 2:  2.000  1.000
 3   / 3:  0.000  0.000
list av[k=@ngd]
             VARIABLE : RESHAPE (A,V) (# of points)
             SUBSET   : 2 by 2 by 2 points (X-Y-T)
             Z        : 0.5 to 3.5 (number of valid)
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  2.000  3.000
 2   / 2:  1.000  2.000
 ---- L:2 T:   2
 1   / 1:  2.000  3.000
 2   / 2:  1.000  2.000
list bv[k=@ngd]
             VARIABLE : RESHAPE (B,V) (# of points)
             SUBSET   : 2 by 2 by 2 points (X-Y-T)
             Z        : 0.5 to 3.5 (number of valid)
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  2.000  3.000
 2   / 2:  1.000  2.000
 ---- L:2 T:   2
 1   / 1:  2.000  3.000
 2   / 2:  1.000  2.000
list av[L=@ngd]
             VARIABLE : RESHAPE (A,V) (# of points)
             SUBSET   : 2 by 2 by 3 points (X-Y-Z)
             T        : 0.5 to 2.5 (number of valid)
             1      2    
             1      2
 ---- K:1 Z:   1
 1   / 1:  2.000  2.000
 2   / 2:  0.000  2.000
 ---- K:2 Z:   2
 1   / 1:  0.000  2.000
 2   / 2:  0.000  0.000
 ---- K:3 Z:   3
 1   / 1:  2.000  2.000
 2   / 2:  2.000  2.000
list bv[L=@ngd]
             VARIABLE : RESHAPE (B,V) (# of points)
             SUBSET   : 2 by 2 by 3 points (X-Y-Z)
             T        : 0.5 to 2.5 (number of valid)
             1      2    
             1      2
 ---- K:1 Z:   1
 1   / 1:  2.000  2.000
 2   / 2:  0.000  2.000
 ---- K:2 Z:   2
 1   / 1:  0.000  2.000
 2   / 2:  0.000  0.000
 ---- K:3 Z:   3
 1   / 1:  2.000  2.000
 2   / 2:  2.000  2.000
 
list av[i=@nbd,j=@nbd,k=@nbd]
             VARIABLE : RESHAPE (A,V)
             SUBSET   : 2 points (T)
             X        : 0.5 to 2.5 (XYZ # bad)
             Y        : 0.5 to 2.5 (XYZ # bad)
             Z        : 0.5 to 3.5 (XYZ # bad)
 1   / 1:  4.000
 2   / 2:  4.000
list bv[i=@nbd,j=@nbd,k=@nbd]
             VARIABLE : RESHAPE (B,V)
             SUBSET   : 2 points (T)
             X        : 0.5 to 2.5 (XYZ # bad)
             Y        : 0.5 to 2.5 (XYZ # bad)
             Z        : 0.5 to 3.5 (XYZ # bad)
 1   / 1:  4.000
 2   / 2:  4.000
 
list bv[i=@ngd,j=@ngd,k=@ngd,L=@ngd]
             VARIABLE : RESHAPE (B,V)
             X        : 0.5 to 2.5 (XYZT # valid)
             Y        : 0.5 to 2.5 (XYZT # valid)
             Z        : 0.5 to 3.5 (XYZT # valid)
             T        : 0.5 to 2.5 (XYZT # valid)
          16.00
list av[i=@ngd,j=@ngd,k=@ngd,L=@ngd]
             VARIABLE : RESHAPE (A,V)
             X        : 0.5 to 2.5 (XYZT # valid)
             Y        : 0.5 to 2.5 (XYZT # valid)
             Z        : 0.5 to 3.5 (XYZT # valid)
             T        : 0.5 to 2.5 (XYZT # valid)
          16.00
*** Running ferret script: bn_cat_string.jnl
! bn_cat_string.jnl
! Test concatenation functions for string variables
! ACM nov 08  See bug 1577
 
let a = xsequence({"Q", "R", "S"})
let b = xsequence({"U", "V", "W"})
list xcat(a,b)
             VARIABLE : XCAT(A,B)
             SUBSET   : 6 points (X)
 1   / 1:"Q"
 2   / 2:"R"
 3   / 3:"S"
 4   / 4:"U"
 5   / 5:"V"
 6   / 6:"W"
 
! (when xcat is called, and its args are strings,
!  Ferret actually runs xcat_string)
let a = xsequence({"Q", "R", "S"})
let b = xsequence({"U", "V", "W"})
list xcat_str(a,b)
             VARIABLE : XCAT_STR(A,B)
             SUBSET   : 6 points (X)
 1   / 1:"Q"
 2   / 2:"R"
 3   / 3:"S"
 4   / 4:"U"
 5   / 5:"V"
 6   / 6:"W"
 
let a = ysequence({"Q", "R", "S"})
let b = ysequence({"U", "V", "W"})
list ycat(a,b)
             VARIABLE : YCAT(A,B)
             SUBSET   : 6 points (Y)
 1   / 1:"Q"
 2   / 2:"R"
 3   / 3:"S"
 4   / 4:"U"
 5   / 5:"V"
 6   / 6:"W"
 
let a = zsequence({"Q", "R", "S"})
let b = zsequence({"U", "V", "W"})
list zcat(a,b)
             VARIABLE : ZCAT(A,B)
             SUBSET   : 6 points (Z)
 1   / 1:"Q"
 2   / 2:"R"
 3   / 3:"S"
 4   / 4:"U"
 5   / 5:"V"
 6   / 6:"W"
 
let a = tsequence({"Q", "R", "S"})
let b = tsequence({"U", "V", "W"})
list tcat(a,b)
             VARIABLE : TCAT(A,B)
             SUBSET   : 6 points (T)
 1   / 1:"Q"
 2   / 2:"R"
 3   / 3:"S"
 4   / 4:"U"
 5   / 5:"V"
 6   / 6:"W"
*** Running ferret script: bn_sort_strings.jnl
! bn_sort_strings.jnl
! 11/08 acm
 
! show func/detail now shows the alternative function for
! other arg types, if it exists.
 
SHOW FUNC/DETAIL sorti
SORTI(DAT)
    Returns indices of data, sorted on the I axis in increasing order
        Axes of result:
          X: ABSTRACT (result will occupy indices 1...N)
          Y: inherited from argument(s)
          Z: inherited from argument(s)
          T: inherited from argument(s)
          E: inherited from argument(s)
          F: inherited from argument(s)
    DAT: variable to sort in I (FLOAT)
        Influence on output axes:
          X: no influence (indicate argument limits with "[]")
          Y: passed to result grid
          Z: passed to result grid
          T: passed to result grid
          E: passed to result grid
          F: passed to result grid
    Alternative function called for other argument types: SORTI_STR
 
 
let ai = {"a rat in the house will eat the zucchini", \
  "a rat in the house will eat the ice cream", \
  "ze rats in the house will eat the ice cream",\
  "A rat in the house will eat the ICE CREAM" }
 
let bi = {"AB", "C", "", "aa", "abc", ,"0"}
 
let indx_ai = SORTI_STR(ai)
list indx_ai, samplei(ai,indx_ai)
             X: 0.5 to 4.5
 Column  1: INDX_AI is SORTI_STR(AI)
 Column  2: EX#2 is SAMPLEI(AI,INDX_AI)
        INDX_AI                       EX#2
1   / 1:   4.000 "A rat in the house will eat the ICE CREAM"  
2   / 2:   2.000 "a rat in the house will eat the ice cream"  
3   / 3:   1.000 "a rat in the house will eat the zucchini"   
4   / 4:   3.000 "ze rats in the house will eat the ice cream"
 
let indx_bi = SORTI_STR(bi)
list indx_bi, samplei(bi,indx_bi)
             X: 0.5 to 7.5
 Column  1: INDX_BI is SORTI_STR(BI)
 Column  2: EX#2 is SAMPLEI(BI,INDX_BI)
        INDX_BI   EX#2
1   / 1:   7.000 "0"  
2   / 2:   1.000 "AB" 
3   / 3:   2.000 "C"  
4   / 4:   4.000 "aa" 
5   / 5:   5.000 "abc"
6   / 6:    .... ""   
7   / 7:    .... ""   
 
! Calling via SORTI
let indx_ai = SORTI(ai)
list indx_ai, samplei(ai,indx_ai)
             X: 0.5 to 4.5
 Column  1: INDX_AI is SORTI(AI)
 Column  2: EX#2 is SAMPLEI(AI,INDX_AI)
        INDX_AI                       EX#2
1   / 1:   4.000 "A rat in the house will eat the ICE CREAM"  
2   / 2:   2.000 "a rat in the house will eat the ice cream"  
3   / 3:   1.000 "a rat in the house will eat the zucchini"   
4   / 4:   3.000 "ze rats in the house will eat the ice cream"
 
let indx_bi = SORTI(bi)
list indx_bi, samplei(bi,indx_bi)
             X: 0.5 to 7.5
 Column  1: INDX_BI is SORTI(BI)
 Column  2: EX#2 is SAMPLEI(BI,INDX_BI)
        INDX_BI   EX#2
1   / 1:   7.000 "0"  
2   / 2:   1.000 "AB" 
3   / 3:   2.000 "C"  
4   / 4:   4.000 "aa" 
5   / 5:   5.000 "abc"
6   / 6:    .... ""   
7   / 7:    .... ""   
 
 
! SORTJ
let aj = ysequence(ai)
let bj = ysequence(bi)
 
let indx_aj = SORTJ(aj)
list indx_aj, samplej(aj,indx_aj)
             Y: 0.5 to 4.5
 Column  1: INDX_AJ is SORTJ(AJ)
 Column  2: EX#2 is SAMPLEJ(AJ,INDX_AJ)
        INDX_AJ                       EX#2
1   / 1:   4.000 "A rat in the house will eat the ICE CREAM"  
2   / 2:   2.000 "a rat in the house will eat the ice cream"  
3   / 3:   1.000 "a rat in the house will eat the zucchini"   
4   / 4:   3.000 "ze rats in the house will eat the ice cream"
 
let indx_bj = SORTJ(bj)
list indx_bj, samplej(bj,indx_bj)
             Y: 0.5 to 7.5
 Column  1: INDX_BJ is SORTJ(BJ)
 Column  2: EX#2 is SAMPLEJ(BJ,INDX_BJ)
        INDX_BJ   EX#2
1   / 1:   7.000 "0"  
2   / 2:   1.000 "AB" 
3   / 3:   2.000 "C"  
4   / 4:   4.000 "aa" 
5   / 5:   5.000 "abc"
6   / 6:    .... ""   
7   / 7:    .... ""   
 
 
! SORTK
let ak = zsequence(ai)
let bk = zsequence(bi)
 
let indx_ak = SORTK(ak)
list indx_ak, samplek(ak,indx_ak)
             Z: 0.5 to 4.5
 Column  1: INDX_AK is SORTK(AK)
 Column  2: EX#2 is SAMPLEK(AK,INDX_AK)
        INDX_AK                       EX#2
1   / 1:   4.000 "A rat in the house will eat the ICE CREAM"  
2   / 2:   2.000 "a rat in the house will eat the ice cream"  
3   / 3:   1.000 "a rat in the house will eat the zucchini"   
4   / 4:   3.000 "ze rats in the house will eat the ice cream"
 
let indx_bk = SORTK(bk)
list indx_bk, samplek(bk,indx_bk)
             Z: 0.5 to 7.5
 Column  1: INDX_BK is SORTK(BK)
 Column  2: EX#2 is SAMPLEK(BK,INDX_BK)
        INDX_BK   EX#2
1   / 1:   7.000 "0"  
2   / 2:   1.000 "AB" 
3   / 3:   2.000 "C"  
4   / 4:   4.000 "aa" 
5   / 5:   5.000 "abc"
6   / 6:    .... ""   
7   / 7:    .... ""   
 
 
! SORTL
let al = tsequence(ai)
let bl = tsequence(bi)
 
let indx_al = SORTL(al)
list indx_al, samplel(al,indx_al)
             T: 0.5 to 4.5
 Column  1: INDX_AL is SORTL(AL)
 Column  2: EX#2 is SAMPLEL(AL,INDX_AL)
        INDX_AL                       EX#2
1   / 1:   4.000 "A rat in the house will eat the ICE CREAM"  
2   / 2:   2.000 "a rat in the house will eat the ice cream"  
3   / 3:   1.000 "a rat in the house will eat the zucchini"   
4   / 4:   3.000 "ze rats in the house will eat the ice cream"
 
let indx_bl = SORTL(bl)
list indx_bl, samplel(bl,indx_bl)
             T: 0.5 to 7.5
 Column  1: INDX_BL is SORTL(BL)
 Column  2: EX#2 is SAMPLEL(BL,INDX_BL)
        INDX_BL   EX#2
1   / 1:   7.000 "0"  
2   / 2:   1.000 "AB" 
3   / 3:   2.000 "C"  
4   / 4:   4.000 "aa" 
5   / 5:   5.000 "abc"
6   / 6:    .... ""   
7   / 7:    .... ""   
 
*** Running ferret script: bn_samplexyt.jnl
! bn_samplexyt.jnl
! 1/2009
 
! Check the SAMPLEXYT function, should give missing results for T sample points
! that lie beyond the ends of the T axis of the grid being sampled
 
define axis/x=0:360:180/units=longitude/edges/modulo x1
define axis/y=-90:90:45/units=latitude/edges y1
define axis/t0=1-jan-1990/t=1-jan-1991:31-dec-1991:1/units=days/edges t1
define grid/x=x1/y=y1/t=t1 g1
 
let my_data = 0*x[g=g1]+y[g=g1]+t[g=g1]
 
DEFINE AXIS/T0=1-JAN-1990/T=1-JAN-1990:31-DEC-1992:40/UNITS=DAYS/EDGES TSAMPLES
LET TPTS = XSEQUENCE(T[GT=TSAMPLES])
LET YPTS = XSEQUENCE((RANDU(TPTS)-0.5)*90)
LET XPTS = 180 + 0*YPTS
LET sampl_pts =  SAMPLEXYT(my_data,xpts,ypts,tpts)
 
!  NOTE THAT THE SAMPLEXYT SHOULD FLAG POINTS BEFORE THE START OF THE TIME INTERVAL
!  AND ALOS THOSE THAT LIE ABOVE THE END OF THE TIME INTERVAL
 
! CHECK THE RESULTS WITH A LISTING
list ypts, tpts, sampl_pts
             X: 0.5 to 28.5
 Column  1: YPTS is XSEQUENCE((RANDU(TPTS)-0.5)*90)
 Column  2: TPTS is XSEQUENCE(T[GT=TSAMPLES])
 Column  3: SAMPL_PTS is SAMPLEXYT(MY_DATA,XPTS,YPTS,TPTS)
            YPTS   TPTS  SAMPL_PTS
1    /  1:  20.54    20.    ....
2    /  2: -29.07    60.    ....
3    /  3:  26.64   100.    ....
4    /  4: -28.97   140.    ....
5    /  5: -17.10   180.    ....
6    /  6:  -8.79   220.    ....
7    /  7: -26.49   260.    ....
8    /  8:  -9.00   300.    ....
9    /  9: -19.19   340.    ....
10   / 10: -19.84   380.   360.7
11   / 11: -44.11   420.   376.4
12   / 12:  34.07   460.   494.6
13   / 13:  34.63   500.   535.1
14   / 14:  -6.60   540.   533.9
15   / 15: -39.01   580.   541.5
16   / 16: -25.63   620.   594.9
17   / 17: -22.97   660.   637.5
18   / 18: -30.91   700.   669.6
19   / 19: -22.52   740.    ....
20   / 20: -20.65   780.    ....
21   / 21: -41.66   820.    ....
22   / 22:  39.14   860.    ....
23   / 23:  22.88   900.    ....
24   / 24: -41.03   940.    ....
25   / 25:  33.35   980.    ....
26   / 26:  22.54  1020.    ....
27   / 27:  13.98  1060.    ....
28   / 28:  21.99  1100.    ....
 
! AND HERE WE SHOW IT GRAPHICALLY
cancel mode calendar
set view upper
shade/hlim=20:1100 my_data[x=180]
 
set view lower
plot/vs/xlim=20:1100/ylim=0:1000 tpts, 0*MISSING(sampl_pts,0) + 500
plot/vs/color=red/over tpts, sampl_pts
 
 
set mode calendar
*** Running ferret script: bn_last_go_file.jnl
! bn_last_go_file.jnl
! test the automatically-defined symbol LAST_GO_FILE
 
show sym last_go_file
LAST_GO_FILE = "./v6jnls/bn_last_go_file.jnl"
 
*** Running ferret script: bn_cancel_upcase_uservar.jnl
! bn_cancel_upcase_uservar.jnl
!
! Ferret v6.2
! MODE upcase_only cancelled, now writes lowercase
! spelling for user-defined variables and for coordinate
! variables even coming from two different datasets.
 
CANCEL MODE upcase
 
! User variable with lowercase letters in the name
 
DEFINE AXIS/t=1-jan-1999:31-jan-1999:1/units=days/t0=31-dec-1998 tday
LET MyUpperLowerCaseVar = x[x=1:10] + t[gt=tday]
save/file=a.nc/clobber MyUpperLowerCaseVar
 
! Open two datafiles. These have variable and axis
! names in lowercase.
 
USE a1478.nc
USE a_cartesian_bug1179.nc
 
! Define an output variable with some axes from each dataset.
LET/D=2 zvar = z[gz=temp[d=2]]
LET newvar =  0*zvar[d=2] + olr[d=1]
SET ATT/LIKE=olr[d=1] newvar
SET ATT/OUTPUT=all newvar
 
SAVE/APPEND/FILE=a.nc newvar
SP ncdump -h a.nc >> all_ncdump.out
 
SET MODE/LAST upcase_output
*** Running ferret script: bn_cdf_keepax.jnl
! bn320_cdf
! benchmark to test netCDF input and output
! This is the same as bn_cdf with /KEEP_AXNAMES added to SAVE commands.
 
! test many simultaneous netCDF files
GO bn_cdf_keepax.sub1
! bn230_cdf.sub1
! benchmark to test multiple netCDF simultaneous accesses
! requires version 2.30 or later
! 6/92
 
! V5 *sh* 7/99 -- clean up files before writing
 
cancel region
canc var/all
cancel data/all
 
! delete old ones
sp rm -f test0[a-p].cdf
 
! write a bunch of em
list/format=cdf/keep_axnames/append/l=1:500/file=test0a.cdf l
list/format=cdf/keep_axnames/append/l=1:500/file=test0b.cdf/rigid l
list/format=cdf/keep_axnames/append/l=1:500/file=test0c.cdf/rigid l
list/format=cdf/keep_axnames/append/l=1:500/file=test0d.cdf/rigid l
list/format=cdf/keep_axnames/append/l=1:500/file=test0e.cdf/rigid l
list/format=cdf/keep_axnames/append/l=1:500/file=test0f.cdf/rigid l
list/format=cdf/keep_axnames/append/l=1:500/file=test0g.cdf/rigid l
list/format=cdf/keep_axnames/append/l=1:500/file=test0h.cdf/rigid l
list/format=cdf/keep_axnames/append/l=1:500/file=test0i.cdf/rigid l
list/format=cdf/keep_axnames/append/l=1:500/file=test0j.cdf/rigid l
list/format=cdf/keep_axnames/append/l=1:500/file=test0k.cdf/rigid l
list/format=cdf/keep_axnames/append/l=1:500/file=test0l.cdf/rigid l
list/format=cdf/keep_axnames/append/l=1:500/file=test0m.cdf/rigid l
list/format=cdf/keep_axnames/append/l=1:500/file=test0n.cdf/rigid l
list/format=cdf/keep_axnames/append/l=1:500/file=test0o.cdf/rigid l
list/format=cdf/keep_axnames/append/l=1:500/file=test0p.cdf/rigid l
 
! initialize all at once
set data/format=cdf test0a, test0b, test0c, test0d, test0e, test0f, test0g, test0h, test0i, test0j, test0k, test0l, test0n, test0m, test0o, test0p
show data 1
     currently SET data sets:
    1> ./test0a.cdf
 name     title                             I         J         K         L
 L_       L                                ...       ...       ...       1:500
       (axis ABSTRACT)
 
show data/br
     currently SET data sets:
    1> ./test0a.cdf
    2> ./test0b.cdf
    3> ./test0c.cdf
    4> ./test0d.cdf
    5> ./test0e.cdf
    6> ./test0f.cdf
    7> ./test0g.cdf
    8> ./test0h.cdf
    9> ./test0i.cdf
   10> ./test0j.cdf
   11> ./test0k.cdf
   12> ./test0l.cdf
   13> ./test0n.cdf
   14> ./test0m.cdf
   15> ./test0o.cdf
   16> ./test0p.cdf  (default)
 
! test access to one
stat l_[d=1]
 
             L
             axis ABSTRACT
             X:  N/A
             Y:  N/A
             Z:  N/A
             T: 0.5 to 500.5
             E:  N/A
             F:  N/A
             DATA SET: ./test0a.cdf
 
 Total # of data points: 500 (1*1*1*500*1*1)
 # flagged as bad  data: 0
 Minimum value: 1
 Maximum value: 500
 Mean    value: 250.5 (unweighted average)
 Standard deviation: 144.48
 
! test access to all
stat l_[d=1]-l_[d=2]+l_[d=3]-l_[d=4]+l_[d=5]-l_[d=6]+l_[d=7]-l_[d=8]+l_[d=9]-l_[d=10]+l_[d=11]-l_[d=12]+l_[d=13]-l_[d=14]+l_[d=15]-l_[d=16]
 
             L_[D=test0a]-L_[D=test0b]+L_[D=test0c]-L_[D=test0d]+L_[D=test0e]-L_[D=test0f]+L_[D=test0g]-L_[D=test0h]+L_[D=test0i]-L_[D=test0j]+L_[D=test0k]-L_[D=test0l]+L_[D=test0n]-L_[D=test0m
             X:  N/A
             Y:  N/A
             Z:  N/A
             T: 0.5 to 500.5
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 500 (1*1*1*500*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
cancel data/all
 
! test abstract variable io
GO bn_cdf_keepax.sub2
! bn230_cdf.sub2
! benchmark to test abstract variable netCDF input and output
! requires version 2.30 or later
! 6/92
 
! V5 *sh* 7/99 added /CLOBBER
 
cancel region
canc var/all
cancel data/all
 
! define a realistic time series grid
define axis/t="1-jan-1902":"1-jan-2010":1/unit=day tcentury
define grid/like=abstract/t=tcentury gcentury
let tlong = t[g=gcentury]
 
let i1 = i
let j1 = j
let k1 = k
let l1 = l[g=gcentury]
let l2 = l
let ij = i+j
let ik = i+k
let il = i+l1
let jk = j+k
let jl = j+l1
let kl = k+l1
let ijk = i+j+k
let ikl = i+k+l1
let ijl = i+j+l1
let jkl = j+k+l1
let ijkl = i+j+k+l1
let ijk2 = i+j+k
let ikl2 = i+k+l1
let ijl2 = i+j+l1
let jkl2 = j+k+l1
let iavejkl = ijkl[i=@ave]
let ijavekl = ijkl[j=@ave]
let ijkavel = ijkl[k=@ave]
let ijklave = ijkl[l=@ave]
 
! a bunch of basic geometries
! 1d
list/format=cdf/keep_axnames/i=1:10/clobber/file=test_abs.cdf i1   ! not /APPEND - must be new
list/format=cdf/keep_axnames/j=1:20/append/file=test_abs.cdf j1
list/format=cdf/keep_axnames/k=1:100/append/file=test_abs.cdf k1
list/format=cdf/keep_axnames/l=1:10/append/file=test_abs.cdf l1           ! record axis
list/format=cdf/keep_axnames/l=1:10/append/file=test_abs.cdf l2           ! rigid axis
 
! 2D
list/format=cdf/keep_axnames/i=1:10/j=1:20/append/file=test_abs.cdf ij
list/format=cdf/keep_axnames/i=1:10/k=1:100/append/file=test_abs.cdf ik
list/format=cdf/keep_axnames/i=1:10/l=5:10/append/file=test_abs.cdf il
list/format=cdf/keep_axnames/k=1:100/j=1:20/append/file=test_abs.cdf jk
 
!3D
set region/i=1:10/j=1:20/k=1:100/l=4:8
list/format=cdf/keep_axnames/append/file=test_abs.cdf ijk
list/format=cdf/keep_axnames/append/file=test_abs.cdf ikl
list/format=cdf/keep_axnames/append/file=test_abs.cdf ijl
list/format=cdf/keep_axnames/append/file=test_abs.cdf jkl
 
!4D
list/format=cdf/keep_axnames/append/file=test_abs.cdf ijkl
 
! extend along time axis and write sub-regions
! (note: this may leave undefined regions in other variables)
list/format=cdf/keep_axnames/append/file=test_abs.cdf/i=1:5 /j=1:5 /l=11:12 ijl
list/format=cdf/keep_axnames/append/file=test_abs.cdf/i=6:10/j=1:5 /l=11:12 ijl
list/format=cdf/keep_axnames/append/file=test_abs.cdf/i=1:5 /j=6:10/l=11:12 ijl
list/format=cdf/keep_axnames/append/file=test_abs.cdf/i=6:10/j=6:10/l=11:12 ijl
 
! rewrite a sub-region in the middle of the data
list/format=cdf/keep_axnames/append/file=test_abs.cdf/i=6:8/j=6:8/l=8:10/k=3:5 ijkl
 
! check documentation of transforms
list/format=cdf/keep_axnames/append/file=test_abs.cdf ijk2[i=@ave]
list/format=cdf/keep_axnames/append/file=test_abs.cdf ikl2[i=@ave,k=@sbx:3]
list/format=cdf/keep_axnames/append/file=test_abs.cdf ijl2[i=@ave,j=@ave]
list/format=cdf/keep_axnames/append/file=test_abs.cdf jkl2[k=@ave,l=@ave]
list/format=cdf/keep_axnames/append/file=test_abs.cdf iavejkl
list/format=cdf/keep_axnames/append/file=test_abs.cdf ijavekl
list/format=cdf/keep_axnames/append/file=test_abs.cdf ijkavel
list/format=cdf/keep_axnames/append/file=test_abs.cdf ijklave
 
! look at what we've created - time axis should be regular
set data/format=cdf test_abs
show data/full
     currently SET data sets:
    1> ./test_abs.cdf  (default)
 
 name     title                             I         J         K         L
 I1       I                                1:10      ...       ...       ...
               on grid GEU1 with -1.E+34 for missing data
             X=0.5:10.5  
 J1       J                                ...       1:20      ...       ...
               on grid GEU2 with -1.E+34 for missing data
             Y=0.5:20.5  
 K1       K                                ...       ...       1:100     ...
               on grid GEU3 with -1.E+34 for missing data
             Z=0.5:100.5  
 L1       L[G=GCENTURY]                    ...       ...       ...       1:12
               on grid GEU4 with -1.E+34 for missing data
             
 L2       L                                ...       ...       ...       1:10
               on grid GEU5 with -1.E+34 for missing data
             
 IJ       I+J                              1:10      1:20      ...       ...
               on grid GEU6 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  
 IK       I+K                              1:10      ...       1:100     ...
               on grid GEU7 with -1.E+34 for missing data
             X=0.5:10.5  Z=0.5:100.5  
 IL       I+L1                             1:10      ...       ...       1:12
               on grid GEU8 with -1.E+34 for missing data
             X=0.5:10.5  
 JK       J+K                              ...       1:20      1:100     ...
               on grid GEU9 with -1.E+34 for missing data
             Y=0.5:20.5  Z=0.5:100.5  
 IJK      I+J+K                            1:10      1:20      1:100     ...
               on grid GEU10 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  Z=0.5:100.5  
 IKL      I+K+L1                           1:10      ...       1:100     1:12
               on grid GEU11 with -1.E+34 for missing data
             X=0.5:10.5  Z=0.5:100.5  
 IJL      I+J+L1                           1:10      1:20      ...       1:12
               on grid GEU12 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  
 JKL      J+K+L1                           ...       1:20      1:100     1:12
               on grid GEU13 with -1.E+34 for missing data
             Y=0.5:20.5  Z=0.5:100.5  
 IJKL     I+J+K+L1                         1:10      1:20      1:100     1:12
               on grid GEU14 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  Z=0.5:100.5  
 IJK2     I+J+K                            ...       1:20      1:100     ...
       (X=0.5:10.5@AVE)
               on grid GEU9 with -1.E+34 for missing data
             Y=0.5:20.5  Z=0.5:100.5  
 IKL2     I+K+L1                           ...       ...       1:100     1:12
       (X=0.5:10.5@AVE, box smoothed by 3 pts on Z)
               on grid GEU15 with -1.E+34 for missing data
             Z=0.5:100.5  
 IJL2     I+J+L1                           ...       ...       ...       1:12
       (X=0.5:10.5@AV4, Y=0.5:20.5@AV4)
               on grid GEU4 with -1.E+34 for missing data
             
 JKL2     J+K+L1                           ...       1:20      ...       ...
       (Z=0.5:100.5@AV4, T=03-JAN-1902 12:00:08-JAN-1902 12:00@AV4)
               on grid GEU2 with -1.E+34 for missing data
             Y=0.5:20.5  
 IAVEJKL  IJKL[I=@AVE]                     ...       1:20      1:100     1:12
       (X=0.5:10.5)
               on grid GEU13 with -1.E+34 for missing data
             Y=0.5:20.5  Z=0.5:100.5  
 IJAVEKL  IJKL[J=@AVE]                     1:10      ...       1:100     1:12
       (Y=0.5:20.5)
               on grid GEU11 with -1.E+34 for missing data
             X=0.5:10.5  Z=0.5:100.5  
 IJKAVEL  IJKL[K=@AVE]                     1:10      1:20      ...       1:12
       (Z=0.5:100.5)
               on grid GEU12 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  
 IJKLAVE  IJKL[L=@AVE]                     1:10      1:20      1:100     ...
       (T=03-JAN-1902 12:00:08-JAN-1902 12:00)
               on grid GEU10 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  Z=0.5:100.5  
 
  time range: 01-JAN-1902 00:00 to 12-JAN-1902 00:00
 
cancel variable ijkl
show grid ijkl
    GRID GEU14
 name       axis              # pts   start                end                 subset
 XAX       X                   10 r   1                    10                  full
 YAX       Y                   20 r   1                    20                  full
 ZAX       Z                  100 r   1                    100                 full
 TCENTURY1 TIME                12 r   01-JAN-1902 00:00    12-JAN-1902 00:00   full
cancel data test_abs
 
! make the time axis irregular by leaving out l=13
list/format=cdf/keep_axnames/l=14:16/append/file=test_abs.cdf l1
set data/format=cdf test_abs
show data/full
     currently SET data sets:
    1> ./test_abs.cdf  (default)
 
 name     title                             I         J         K         L
 I1       I                                1:10      ...       ...       ...
               on grid GEU1 with -1.E+34 for missing data
             X=0.5:10.5  
 J1       J                                ...       1:20      ...       ...
               on grid GEU2 with -1.E+34 for missing data
             Y=0.5:20.5  
 K1       K                                ...       ...       1:100     ...
               on grid GEU3 with -1.E+34 for missing data
             Z=0.5:100.5  
 L1       L[G=GCENTURY]                    ...       ...       ...       1:15
               on grid GEU4 with -1.E+34 for missing data
             
 L2       L                                ...       ...       ...       1:10
               on grid GEU5 with -1.E+34 for missing data
             
 IJ       I+J                              1:10      1:20      ...       ...
               on grid GEU6 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  
 IK       I+K                              1:10      ...       1:100     ...
               on grid GEU7 with -1.E+34 for missing data
             X=0.5:10.5  Z=0.5:100.5  
 IL       I+L1                             1:10      ...       ...       1:15
               on grid GEU8 with -1.E+34 for missing data
             X=0.5:10.5  
 JK       J+K                              ...       1:20      1:100     ...
               on grid GEU9 with -1.E+34 for missing data
             Y=0.5:20.5  Z=0.5:100.5  
 IJK      I+J+K                            1:10      1:20      1:100     ...
               on grid GEU10 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  Z=0.5:100.5  
 IKL      I+K+L1                           1:10      ...       1:100     1:15
               on grid GEU11 with -1.E+34 for missing data
             X=0.5:10.5  Z=0.5:100.5  
 IJL      I+J+L1                           1:10      1:20      ...       1:15
               on grid GEU12 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  
 JKL      J+K+L1                           ...       1:20      1:100     1:15
               on grid GEU13 with -1.E+34 for missing data
             Y=0.5:20.5  Z=0.5:100.5  
 IJKL     I+J+K+L1                         1:10      1:20      1:100     1:15
               on grid GEU14 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  Z=0.5:100.5  
 IJK2     I+J+K                            ...       1:20      1:100     ...
       (X=0.5:10.5@AVE)
               on grid GEU9 with -1.E+34 for missing data
             Y=0.5:20.5  Z=0.5:100.5  
 IKL2     I+K+L1                           ...       ...       1:100     1:15
       (X=0.5:10.5@AVE, box smoothed by 3 pts on Z)
               on grid GEU15 with -1.E+34 for missing data
             Z=0.5:100.5  
 IJL2     I+J+L1                           ...       ...       ...       1:15
       (X=0.5:10.5@AV4, Y=0.5:20.5@AV4)
               on grid GEU4 with -1.E+34 for missing data
             
 JKL2     J+K+L1                           ...       1:20      ...       ...
       (Z=0.5:100.5@AV4, T=03-JAN-1902 12:00:08-JAN-1902 12:00@AV4)
               on grid GEU2 with -1.E+34 for missing data
             Y=0.5:20.5  
 IAVEJKL  IJKL[I=@AVE]                     ...       1:20      1:100     1:15
       (X=0.5:10.5)
               on grid GEU13 with -1.E+34 for missing data
             Y=0.5:20.5  Z=0.5:100.5  
 IJAVEKL  IJKL[J=@AVE]                     1:10      ...       1:100     1:15
       (Y=0.5:20.5)
               on grid GEU11 with -1.E+34 for missing data
             X=0.5:10.5  Z=0.5:100.5  
 IJKAVEL  IJKL[K=@AVE]                     1:10      1:20      ...       1:15
       (Z=0.5:100.5)
               on grid GEU12 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  
 IJKLAVE  IJKL[L=@AVE]                     1:10      1:20      1:100     ...
       (T=03-JAN-1902 12:00:08-JAN-1902 12:00)
               on grid GEU10 with -1.E+34 for missing data
             X=0.5:10.5  Y=0.5:20.5  Z=0.5:100.5  
 
  time range: 01-JAN-1902 00:00 to 16-JAN-1902 00:00
 
show grid ijkl
    GRID GEU14
 name       axis              # pts   start                end                 subset
 XAX       X                   10 r   1                    10                  full
 YAX       Y                   20 r   1                    20                  full
 ZAX       Z                  100 r   1                    100                 full
 TCENTURY1 TIME                15 i   01-JAN-1902 00:00    16-JAN-1902 00:00   full
 
 
! list long time series using a rigid (non-record axis) time axis --> FAST
list/clobber/format=cdf/keep_axnames/l=1:300000/rigid/file=test2.cdf l  ! without record dimension
! list time series using the record dimension --> SLOW (1/50th as long axis)
list/clobber/format=cdf/keep_axnames/l=1:5000 l                               ! auto-filename
list/clobber/format=cdf/keep_axnames/t="1-jan-1902":"1-jan-2010"/rigid tlong  ! auto-filename
 
! deliberate errors
can dat/all
set mode ignore
list/format=cdf/keep_axnames/l=1:10/file=test_abs.cdf l    ! file exists error
list/format=cdf/keep_axnames/i=5:15/l=5:10/append/file=test_abs.cdf il  ! inconsistent i limits
list/format=cdf/keep_axnames/i=1:10/j=20:25/append/file=test_abs.cdf ij ! inconsistent j limits
list/format=cdf/keep_axnames/append/file=test_abs.cdf ijl2              ! i and j not avg'd
list/format=cdf/keep_axnames/append/file=test_abs.cdf ijkl[k=@ave]      ! k axis averaged
list/format=cdf/keep_axnames/l=13/append/file=test_abs.cdf l1           ! inconsistent time pt
set data/format=cdf test0a, test0b, test0c, test0d, test0e, test0f, test0g, test0h, test0i, test0j, test0k, test0l, test0n, test0m, test0o, test0p
list/clobber/format=cdf/keep_axnames/i=1:10 i                                ! too many netcdf files
canc data/all
cancel mode ignore
 
! show the grids created
cancel variables/all
set data/format=cdf test_abs
show grid j1 jkl jkl2 iavejkl ijkl
    GRID GEU2
 name       axis              # pts   start                end                 subset
 normal    X
 YAX       Y                   20 r   1                    20                  full
 normal    Z
 normal    T
    GRID GEU13
 name       axis              # pts   start                end                 subset
 normal    X
 YAX       Y                   20 r   1                    20                  full
 ZAX       Z                  100 r   1                    100                 full
 TCENTURY1 TIME                15 i   01-JAN-1902 00:00    16-JAN-1902 00:00   full
    GRID GEU2
 name       axis              # pts   start                end                 subset
 normal    X
 YAX       Y                   20 r   1                    20                  full
 normal    Z
 normal    T
    GRID GEU13
 name       axis              # pts   start                end                 subset
 normal    X
 YAX       Y                   20 r   1                    20                  full
 ZAX       Z                  100 r   1                    100                 full
 TCENTURY1 TIME                15 i   01-JAN-1902 00:00    16-JAN-1902 00:00   full
    GRID GEU14
 name       axis              # pts   start                end                 subset
 XAX       X                   10 r   1                    10                  full
 YAX       Y                   20 r   1                    20                  full
 ZAX       Z                  100 r   1                    100                 full
 TCENTURY1 TIME                15 i   01-JAN-1902 00:00    16-JAN-1902 00:00   full
cancel data test_abs
 
! test TMAP data io
GO bn_cdf_keepax.sub3 	! matches old outputs by using /HEADING=enhanced
! bn320_cdf.sub3
! benchmark to test netCDF input and output of TMAP data set variables
! this routine added 1/26/95 to test the SAVE/HEADING=enhanced option
 
! V5 *sh* 7/99 added /CLOBBER
 
cancel data/all
cancel variables/all
cancel region
 
use gtbc011
 
let i1 = x[g=temp,i=1:10]
let j1 = y[g=temp,j=5:10]
let k1 = z[g=u,k=5:15]
let l1 = l[g=u,l=1:3]
let l2 = l
let ij = taux[l=@ave]
let ik = i1+k1
let il = i1+l1
let jk = j1+k1
let jl = j1+l1
let kl = k1+l1
let ijk = temp[l=@ave]
let ikl = temp[j=@ave]
let ijl = temp[k=@ave]
let jkl = temp[i=@ave]
let ijkl = u
let ijk2 = temp
let iavejkl = ijkl[i=@ave]
let ijavekl = ijkl[j=@ave]
let ijkavel = ijkl[k=@ave]
let ijklave = ijkl[l=@ave]
 
set region/l=1:2  ! i,j, and k unspecified
 
! a bunch of basic geometries
! 1d
list/format=cdf/keep_axnames/clobber/file=test_fil0.cdf/heading="enh" i1      ! not /APPEND - must be new
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh" j1
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh" k1
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh" l1       ! record axis
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh" l2       ! rigid axis
 
! 2D
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh" ij
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh" ik
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh" il
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh" jk
 
!3D
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh" ijk
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh" ikl
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh" ijl
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh" jkl
 
!4D
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh" ijkl
 
! extend along time axis and write sub-regions
! (note: this may leave undefined regions in other variables)
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh"/j=1:50/l=2:3 ijl
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh"/j=51:100/l=2:3 ijl
 
! rewrite a sub-region in the middle of the data
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh"/j=30:40/k=5/l=1:3 ijkl
 
! check documentation of transforms
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh" iavejkl
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh" ijavekl
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh" ijkavel
list/format=cdf/keep_axnames/append/file=test_fil0.cdf/heading="enh" ijklave
 
! look at what we've created - time axis should be regular
set data/format=cdf test_fil0
show data/full
     currently SET data sets:
    1> ./data/gtbc011.cdf
 
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                     70:72      1:100     1:27      1:3
             deg. C on grid PS3DT1 with -1.E+34 for missing data
             X=161W:158W  Y=30S:50N  Z=0:4149  
 SALT     (SALINITY(ppt) - 35) /1000      70:71      1:100     1:27      1:3
             frac. by wt. less .035 on grid PS3DT1 with 0.01 for missing data
             X=161W:159W  Y=30S:50N  Z=0:4149  
 U        ZONAL VELOCITY                  69:72      1:100     1:27      1:3
             cm/sec on grid PS3DU1 with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  Z=0:4149  
 V        MERIDIONAL VELOCITY             69:72      1:100     1:27      1:3
             cm/sec on grid PS3DU1 with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  Z=0:4149  
 W        VERTICAL VELOCITY               70:71      1:100     1:27      1:3
             cm/sec on grid PS3DW1 with -1.E+34 for missing data
             X=161W:159W  Y=30S:50N  Z=5:4149  
 TAUX     ZONAL WIND STRESS               69:71      1:100     ...       1:3
             dynes/cm**2 on grid PS2DU1 with -1.E+34 for missing data
             X=161.5W:158.5W  Y=28.8S:51.4N  
 TAUY     MERIDIONAL WIND STRESS          69:71      1:100     ...       1:3
             dynes/cm**2 on grid PS2DU1 with -1.E+34 for missing data
             X=161.5W:158.5W  Y=28.8S:51.4N  
 PSI      STREAM FUNCTION                 69:73      1:100     ...       1:3
             cm**3/sec on grid PS2DU1 with -1.E+34 for missing data
             X=161.5W:156.5W  Y=28.8S:51.4N  
 
  time range: 15-MAR-1983 10:00 to 15-MAR-1983 12:00
 
    2> ./test_fil0.cdf  (default)
 
 name     title                             I         J         K         L
 I1       X[G=TEMP,I=1:10]                 1:10      ...       ...       ...
               on grid PS3DT1_NYZT with -1.E+34 for missing data
             X=130E:140E  
 J1       Y[G=TEMP,J=5:10]                 ...       5:10      ...       ...
               on grid PS3DT1_NXZT with -1.E+34 for missing data
             Y=21.1S:12.5S  
 K1       Z[G=U,K=5:15]                    ...       ...       5:15      ...
               on grid PS3DU1_NXYT with -1.E+34 for missing data
             Z=40:190  
 L1       L[G=U,L=1:3]                     ...       ...       ...       1:3
               on grid GRH1 with -1.E+34 for missing data
             
 L2       L                                ...       ...       ...       1:2
               on grid GRH2 with -1.E+34 for missing data
             
 IJ       TAUX[L=@AVE]                    69:71      1:100     ...       ...
       (T=15-MAR-1983 09:30:15-MAR-1983 11:30)
               on grid PS2DU1_NT with -1.E+34 for missing data
             X=161.5W:158.5W  Y=28.8S:51.4N  
 IK       I1+K1                            1:10      ...       5:15      ...
               on grid G016_NYT with -1.E+34 for missing data
             X=130E:140E  Z=40:190  
 IL       I1+L1                            1:10      ...       ...       1:3
               on grid G016_NYZ with -1.E+34 for missing data
             X=130E:140E  
 JK       J1+K1                            ...       5:10      5:15      ...
               on grid G002_NXT with -1.E+34 for missing data
             Y=21.1S:12.5S  Z=40:190  
 IJK      TEMP[L=@AVE]                    70:72      1:100     1:27      ...
       (T=15-MAR-1983 09:30:15-MAR-1983 11:30)
               on grid PS3DT1_NT with -1.E+34 for missing data
             X=161W:158W  Y=30S:50N  Z=0:4149  
 IKL      TEMP[J=@AVE]                    70:72      ...       1:27      1:3
       (Y=30S:50N)
               on grid PS3DT1_NY with -1.E+34 for missing data
             X=161W:158W  Z=0:4149  
 IJL      TEMP[K=@AVE]                    70:72      1:100     ...       1:3
       (Z=0:4149)
               on grid PS3DT1_NZ with -1.E+34 for missing data
             X=161W:158W  Y=30S:50N  
 JKL      TEMP[I=@AVE]                     ...       1:100     1:27      1:3
       (X=130E:70W)
               on grid GRH3 with -1.E+34 for missing data
             Y=30S:50N  Z=0:4149  
 IJKL     U                               69:72      1:100     1:27      1:3
               on grid PS3DU1 with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  Z=0:4149  
 IAVEJKL  IJKL[I=@AVE]                     ...       1:100     1:27      1:3
       (X=130.5E:69.5W)
               on grid GRH4 with -1.E+34 for missing data
             Y=28.8S:51.4N  Z=0:4149  
 IJAVEKL  IJKL[J=@AVE]                    69:72      ...       1:27      1:3
       (Y=28.836S:51.432N)
               on grid PS3DU1_NY with -1.E+34 for missing data
             X=161.5W:157.5W  Z=0:4149  
 IJKAVEL  IJKL[K=@AVE]                    69:72      1:100     ...       1:3
       (Z=0:4149)
               on grid PS3DU1_NZ with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  
 IJKLAVE  IJKL[L=@AVE]                    69:72      1:100     1:27      ...
       (T=15-MAR-1983 09:30:15-MAR-1983 11:30)
               on grid PS3DU1_NT with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  Z=0:4149  
 
  time range: 15-MAR-1983 10:00 to 15-MAR-1983 12:00
 
cancel variable ijkl
show grid ijkl
    GRID PS3DU1
 name       axis              # pts   start                end                 subset
 PSXU      LONGITUDE          160mr   131E                 70W                 full
 PSYU      LATITUDE           100 i   27.672S              50N                 full
 PSZT      DEPTH (m)           27 i-  5                    3824                full
 TIME      TIME                 3 r   15-MAR-1983 10:00    15-MAR-1983 12:00   full
cancel data test_fil0
! 5/99 moved old bn230_cdf.sub3 to bn_cdf_keepax.sub4 to stay inline w/ old benchmarks *kob*
GO bn_cdf_keepax.sub4
! bn230_cdf
! benchmark to test netCDF input and output of TMAP data set variables
! requires version 2.30 or later
! 6/92
 
! V5 *sh* 7/99 -- added /CLOBBER
 
cancel data/all
cancel variables/all
cancel region
 
use gtbc011
 
let i1 = x[g=temp,i=1:10]
let j1 = y[g=temp,j=5:10]
let k1 = z[g=u,k=5:15]
let l1 = l[g=u,l=1:3]
let l2 = l
let ij = taux[l=@ave]
let ik = i1+k1
let il = i1+l1
let jk = j1+k1
let jl = j1+l1
let kl = k1+l1
let ijk = temp[l=@ave]
let ikl = temp[j=@ave]
let ijl = temp[k=@ave]
let jkl = temp[i=@ave]
let ijkl = u
let ijk2 = temp
let iavejkl = ijkl[i=@ave]
let ijavekl = ijkl[j=@ave]
let ijkavel = ijkl[k=@ave]
let ijklave = ijkl[l=@ave]
 
set region/l=1:2  ! i,j, and k unspecified
 
! a bunch of basic geometries
! 1d
list/format=cdf/keep_axnames/clobber/file=test_fil.cdf i1      ! not /APPEND - must be new
list/format=cdf/keep_axnames/append/file=test_fil.cdf j1
list/format=cdf/keep_axnames/append/file=test_fil.cdf k1
list/format=cdf/keep_axnames/append/file=test_fil.cdf l1           ! record axis
list/format=cdf/keep_axnames/append/file=test_fil.cdf l2          ! rigid axis
 
! 2D
list/format=cdf/keep_axnames/append/file=test_fil.cdf ij
list/format=cdf/keep_axnames/append/file=test_fil.cdf ik
list/format=cdf/keep_axnames/append/file=test_fil.cdf il
list/format=cdf/keep_axnames/append/file=test_fil.cdf jk
 
!3D
! The following is an error - axis already in the file
!
set mode ignore
 
list/format=cdf/keep_axnames/append/file=test_fil.cdf ijk
list/format=cdf/keep_axnames/append/file=test_fil.cdf ikl
list/format=cdf/keep_axnames/append/file=test_fil.cdf ijl
list/format=cdf/keep_axnames/append/file=test_fil.cdf jkl
 
!4D
list/format=cdf/keep_axnames/append/file=test_fil.cdf ijkl
 
! extend along time axis and write sub-regions
! (note: this may leave undefined regions in other variables)
list/format=cdf/keep_axnames/append/file=test_fil.cdf/j=1:50/l=2:3 ijl
list/format=cdf/keep_axnames/append/file=test_fil.cdf/j=51:100/l=2:3 ijl
 
! rewrite a sub-region in the middle of the data
list/format=cdf/keep_axnames/append/file=test_fil.cdf/j=30:40/k=5/l=1:3 ijkl
 
! check documentation of transforms
list/format=cdf/keep_axnames/append/file=test_fil.cdf iavejkl
list/format=cdf/keep_axnames/append/file=test_fil.cdf ijavekl
list/format=cdf/keep_axnames/append/file=test_fil.cdf ijkavel
list/format=cdf/keep_axnames/append/file=test_fil.cdf ijklave
 
! look at what we've created - time axis should be regular
set data/format=cdf test_fil
show data/full
     currently SET data sets:
    1> ./data/gtbc011.cdf
 
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                     70:72      1:100     1:27      1:3
             deg. C on grid PS3DT1 with -1.E+34 for missing data
             X=161W:158W  Y=30S:50N  Z=0:4149  
 SALT     (SALINITY(ppt) - 35) /1000      70:71      1:100     1:27      1:3
             frac. by wt. less .035 on grid PS3DT1 with 0.01 for missing data
             X=161W:159W  Y=30S:50N  Z=0:4149  
 U        ZONAL VELOCITY                  69:72      1:100     1:27      1:3
             cm/sec on grid PS3DU1 with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  Z=0:4149  
 V        MERIDIONAL VELOCITY             69:72      1:100     1:27      1:3
             cm/sec on grid PS3DU1 with -1.E+34 for missing data
             X=161.5W:157.5W  Y=28.8S:51.4N  Z=0:4149  
 W        VERTICAL VELOCITY               70:71      1:100     1:27      1:3
             cm/sec on grid PS3DW1 with -1.E+34 for missing data
             X=161W:159W  Y=30S:50N  Z=5:4149  
 TAUX     ZONAL WIND STRESS               69:71      1:100     ...       1:3
             dynes/cm**2 on grid PS2DU1 with -1.E+34 for missing data
             X=161.5W:158.5W  Y=28.8S:51.4N  
 TAUY     MERIDIONAL WIND STRESS          69:71      1:100     ...       1:3
             dynes/cm**2 on grid PS2DU1 with -1.E+34 for missing data
             X=161.5W:158.5W  Y=28.8S:51.4N  
 PSI      STREAM FUNCTION                 69:73      1:100     ...       1:3
             cm**3/sec on grid PS2DU1 with -1.E+34 for missing data
             X=161.5W:156.5W  Y=28.8S:51.4N  
 
  time range: 15-MAR-1983 10:00 to 15-MAR-1983 12:00
 
    2> ./test_fil.cdf  (default)
 
 name     title                             I         J         K         L
 I1       X[G=TEMP,I=1:10]                 1:10      ...       ...       ...
               on grid GLZ1 with -1.E+34 for missing data
             X=130E:140E  
 J1       Y[G=TEMP,J=5:10]                 ...       1:6       ...       ...
               on grid GLZ2 with -1.E+34 for missing data
             Y=21.1S:12.5S  
 K1       Z[G=U,K=5:15]                    ...       ...       1:11      ...
               on grid GLZ3 with -1.E+34 for missing data
             Z=40:190  
 L1       L[G=U,L=1:3]                     ...       ...       ...       1:3
               on grid GLZ4 with -1.E+34 for missing data
             
 L2       L                                ...       ...       ...       1:2
               on grid GLZ5 with -1.E+34 for missing data
             
 IJ       TAUX[L=@AVE]                     1:3       1:100     ...       ...
       (T=15-MAR-1983 09:30:15-MAR-1983 11:30)
               on grid GLZ6 with -1.E+34 for missing data
             X=161.5W:158.5W  Y=28.8S:51.4N  
 IK       I1+K1                            1:10      ...       1:11      ...
               on grid GLZ7 with -1.E+34 for missing data
             X=130E:140E  Z=40:190  
 IL       I1+L1                            1:10      ...       ...       1:3
               on grid GLZ8 with -1.E+34 for missing data
             X=130E:140E  
 JK       J1+K1                            ...       1:6       1:11      ...
               on grid GLZ9 with -1.E+34 for missing data
             Y=21.1S:12.5S  Z=40:190  
 
  time range: 15-MAR-1983 10:00 to 15-MAR-1983 12:00
 
cancel variable ijkl
show grid ijkl
cancel data test_fil
 
set mode/last ignore
 
GO bn_cdf_reversed_keepax.sub
! bn320_cdf_reversed.sub
! benchmark to test netCDF input of reverse-coordinate axes
! this routine added 3/2/95
 
cancel data/all
cancel variables/all
cancel region
 
set data reverse_axes
 
show data/var
     currently SET data sets:
    1> ./data/reverse_axes.cdf  (default)
 
 name     title                             I         J         K         L
 FCN_NORM COS(X/10)*SIN(Y/2)               1:51      1:21      ...       ...
               on grid GAF1 with -1.E+34 for missing data
             X=129.5E:179.5W  Y=10.5S:10.5N  
 FCN_REV  COS(X/10)*SIN(Y/2)               1:51      1:21      ...       ...
               on grid GAF2 with -1.E+34 for missing data
             X=129.5E:179.5W  Y=10.5S:10.5N  
 FCN_REV_SUB
          COS(X/10)*SIN(Y/2)               1:51     10:19      ...       ...
               on grid GREV with -1.E+34 for missing data
             X=129.5E:179.5W  Y=1.5S:8.5N  
 
 
list/x=180 fcn_norm,fcn_rev
 WARNING: Listed variables have ambiguous coordinates on axes: Y
             DATA SET: ./data/reverse_axes.cdf
             LONGITUDE: 180E
 Column  1: FCN_NORM is COS(X/10)*SIN(Y/2)
 Column  2: FCN_REV is COS(X/10)*SIN(Y/2)
       FCN_NOR  FCN_REV
J /  1:  0.6332 -0.6332
J /  2:  0.6455 -0.6455
J /  3:  0.4997 -0.4997
J /  4:  0.2316 -0.2316
J /  5: -0.0932  0.0932
J /  6: -0.3952  0.3952
J /  7: -0.6004  0.6004
J /  8: -0.6587  0.6587
J /  9: -0.5556  0.5556
J / 10: -0.3166  0.3166
J / 11:  0.0000  0.0000
J / 12:  0.3166 -0.3166
J / 13:  0.5556 -0.5556
J / 14:  0.6587 -0.6587
J / 15:  0.6004 -0.6004
J / 16:  0.3952 -0.3952
J / 17:  0.0932 -0.0932
J / 18: -0.2316  0.2316
J / 19: -0.4997  0.4997
J / 20: -0.6455  0.6455
J / 21: -0.6332  0.6332
list/x=180 fcn_rev_sub
             VARIABLE : COS(X/10)*SIN(Y/2)
             FILENAME : reverse_axes.cdf
             SUBSET   : 10 points (LATITUDE)
             LONGITUDE: 180E
              180E   
               51
 8N   / 19:  0.4997
 7N   / 18:  0.2316
 6N   / 17: -0.0932
 5N   / 16: -0.3952
 4N   / 15: -0.6004
 3N   / 14: -0.6587
 2N   / 13: -0.5556
 1N   / 12: -0.3166
 0    / 11:  0.0000
 1S   / 10:  0.3166
*** Running ferret script: bn_keep_axisnames.jnl
! bn_keep_axisnames.jnl
! 2/2009 ACM
 
! save/KEEP_AXISNAMES prevents changes to
! axis name when a subset is written.
 
sh command list
 LIST/I/J/K/L/M/N/X/Y/Z/T/E/F/DATASET/HEADING/NOHEAD/SINGLY/FILE/APPEND
       /ORDER/FORMAT/TITLE/PRECISIO/RIGID/ILIMITS/JLIMITS/KLIMITS/LLIMITS
       /MLIMITS/NLIMITS/XLIMITS/YLIMITS/ZLIMITS/TLIMITS/ELIMITS/FLIMITS
       /CLOBBER/QUIET/WIDTH/EDGES/BOUNDS/NOBOUNDS/NOROWLAB/KEEP_AXI/NCFORMAT
       /XCHUNK/YCHUNK/ZCHUNK/TCHUNK/ECHUNK/FCHUNK/DEFLATE/SHUFFLE/ENDIAN
       /OUTTYPE/CURVILIN/LAYERZ/ASGLOBAL/STRLEN/NOCOORDS
define axis/x=1:100:1/units=deg x100
define axis/t=1-jan-2000:31-jan-2000:1/units=days/t0=31-dec-1999 t31
let a = x[gx=x100] + t[gt=t31]
save/file=a.nc/clobber/i=30:40/L=15:28/KEEP_AXISNAMES a
 
sp echo "bn_keep_axisnames.jnl --- test SAVE/KEEP_AXISNAMES" >> all_ncdump.out
sp ncdump -h a.nc >> all_ncdump.out
 
save/file=a.nc/clobber/i=30:40/L=15:28 a
 
sp echo "bn_keep_axisnames.jnl --- without /KEEP_AXISNAMES" >> all_ncdump.out
sp ncdump -h a.nc >> all_ncdump.out
 
*** Running ferret script: bn_key_label_minmax.jnl
! bn_key_label_minmax.jnl
 
! Label data min and max on vertical and horizontal keys
 
can mode logo
 
! One setting turns on annotate_key, which persists until turned off.
PPL SHAKEY 1,,,,,,,,,,1
 
use levitus_climatology
shade/lev=(-inf)(4,28,1)(inf) temp[z=0]
 
shade/set/lev=(-inf)(4,28,1)(inf) temp[z=0]
ppl shakey,1,0
ppl shade
 
! FILL with min and max on vertical and horizontal keys
 
fill/lev=(-inf)(4,28,1)(inf) temp[z=0]
 
fill/set/lev=(-inf)(4,28,1)(inf) temp[z=0]
PPL SHAKEY 1,0
ppl fill
 
! POLYGON with min and max on vertical key
 
use coads_climatology
def axis/x=0:360:5 xq
def axis/y=-90:90:4 yq
let fsst =  sst[l=1,gx=xq,gy=yq]
 
let lon = xsequence(x[gx=xq] + 0*y[gy=yq])
let lat = xsequence(0*x[gx=xq] + y[gy=yq])
shade/nokey/pal=white/nolab/axes=0,0,0,0 fsst  ! set up
go polymark poly/key/title="polygons"/lev=(-inf)(4,26,1)(inf), lon, lat, xsequence(fsst), square, 0.4
 
 
! Now with closed-ended colorbars
use levitus_climatology
shade/lev=(4,28,1) temp[z=0]
 
shade/set/lev=(4,28,1) temp[z=0]
ppl shakey,1,0
ppl shade
 
 
! restore setting: keys not annotated
PPL SHAKEY 1,,,,,,,,,,0
 
! The setting can alternatively be made with the alias KEYMARK
KEYMARK 1
 
! FILL with min and max on vertical and horizontal keys
 
fill/lev=(4,28,1) temp[z=0]
 
fill/set/lev=(4,28,1) temp[z=0]
PPL SHAKEY 1,0
ppl fill
 
! POLYGON with min and max on vertical key
 
use coads_climatology
def axis/x=0:360:5 xq
def axis/y=-90:90:4 yq
let fsst =  sst[l=1,gx=xq,gy=yq]
 
let lon = xsequence(x[gx=xq] + 0*y[gy=yq])
let lat = xsequence(0*x[gx=xq] + y[gy=yq])
shade/nokey/pal=white/nolab/axes=0,0,0,0 fsst  ! set up
go polymark poly/key/title="polygons"/lev=(4,26,1), lon, lat, xsequence(fsst), square, 0.4
 
 
! restore setting: keys not annotated
KEYMARK 0
 
set mode/last logo
shade/lev=35 sst[L=1]
 
*** Running ferret script: bn62_bug_fixes.jnl
! bn62_bug_fixes.jnl
! Fixes that go into v6.2 release
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err618_julday.jnl
! err618_julday.jnl
! Bug 1639
! ACM 2/12/09
 
! reported by Martin Shcmidt, 12-Feb-2009
!
define axis/t=1-dec-1998:31-mar-2002:12/unit=hours/t0=1-jan-1955/cal=gregorian tax
define grid/t=tax tgrid
let tdummy=0*t[gt=tgrid]
 
let rjulianday = TAX_JDAY(t[gt=tdummy],tdummy)
! This is correct
list/t=27-feb-1999:02-mar-1999 rjulianday
             VARIABLE : TAX_JDAY(T[GT=TDUMMY],TDUMMY)
             SUBSET   : 7 points (TIME)
 27-FEB-1999 00:00 / 177:  58.00
 27-FEB-1999 12:00 / 178:  58.00
 28-FEB-1999 00:00 / 179:  59.00
 28-FEB-1999 12:00 / 180:  59.00
 01-MAR-1999 00:00 / 181:  60.00
 01-MAR-1999 12:00 / 182:  60.00
 02-MAR-1999 00:00 / 183:  61.00
 
! Now look to somewhere else
list/t=31-dec-1999:02-jan-2000 rjulianday
             VARIABLE : TAX_JDAY(T[GT=TDUMMY],TDUMMY)
             SUBSET   : 5 points (TIME)
 31-DEC-1999 00:00 / 791:  365.0
 31-DEC-1999 12:00 / 792:  365.0
 01-JAN-2000 00:00 / 793:    1.0
 01-JAN-2000 12:00 / 794:    1.0
 02-JAN-2000 00:00 / 795:    2.0
 
! Now list the first region again. March 1 was
! being listed as day 61 not day 60
list/t=27-feb-1999:02-mar-1999 rjulianday
             VARIABLE : TAX_JDAY(T[GT=TDUMMY],TDUMMY)
             SUBSET   : 7 points (TIME)
 27-FEB-1999 00:00 / 177:  58.00
 27-FEB-1999 12:00 / 178:  58.00
 28-FEB-1999 00:00 / 179:  59.00
 28-FEB-1999 12:00 / 180:  59.00
 01-MAR-1999 00:00 / 181:  60.00
 01-MAR-1999 12:00 / 182:  60.00
 02-MAR-1999 00:00 / 183:  61.00
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err611_polygons.jnl
! err611_polygons.jnl
! bug 1661
 
! Polygons over a depth axis, where the
! plot is transposed, didnt appear.
 
! (from error_bars_demo script) Z axis
define axis/z=1:15:1/depth/units=meters z5
let/quiet xp4 = Z[gz=z5]
let/quiet yp4 = SIN(xp4/5)
let/quiet errors = 0.5/(xp4+5)
plot/title="vertical profile" yp4
 
GO error_bars polygon/color=red/thickness=2/title="variability" yp4 errors
 
*** Running ferret script: bn_convolve.jnl
! bn_convolve.jnl
! test convolutions, including with missing-data.
! compare behavior with smoothing transform spz.
 
let a = {0,1,1,0,1,0,0,0,,0,0,0}
list a, a[i=@spz], convolvei(a,{.25,.5,.25})
             X: 0.5 to 12.5
 Column  1: A is {0,1,1,0,1,0,0,0,,0,0,0}
 Column  2: A[X=@SPZ:3] is {0,1,1,0,1,0,0,0,,0,0,0} (Parzen smoothed by 3 pts on X)
 Column  3: EX#3 is CONVOLVEI(A,{.25,.5,.25})
               A     A      EX#3
1    /  1:  0.000    ....    ....
2    /  2:  1.000  0.7500  0.7500
3    /  3:  1.000  0.7500  0.7500
4    /  4:  0.000  0.5000  0.5000
5    /  5:  1.000  0.5000  0.5000
6    /  6:  0.000  0.2500  0.2500
7    /  7:  0.000  0.0000  0.0000
8    /  8:  0.000    ....    ....
9    /  9:   ....    ....    ....
10   / 10:  0.000    ....    ....
11   / 11:  0.000  0.0000  0.0000
12   / 12:  0.000    ....    ....
 
! The second argument does not have to be on the
! same axis as the first.
let b = ysequence({0,1,1,0,1,0,0,0,,0,0,0})
let bpat = ysequence({.25,.5,.25})
list b, b[j=@spz], convolvej(b,bpat), convolvej(b,{.1,.4,.4,.1})
             Y: 0.5 to 12.5
 Column  1: B is YSEQUENCE({0,1,1,0,1,0,0,0,,0,0,0})
 Column  2: B[Y=@SPZ:3] is YSEQUENCE({0,1,1,0,1,0,0,0,,0,0,0}) (Parzen smoothed by 3 pts on Y)
 Column  3: EX#3 is CONVOLVEJ(B,BPAT)
 Column  4: EX#4 is CONVOLVEJ(B,{.1,.4,.4,.1})
               B     B      EX#3    EX#4
1    /  1:  0.000    ....    ....    ....
2    /  2:  1.000  0.7500  0.7500  0.8000
3    /  3:  1.000  0.7500  0.7500  0.6000
4    /  4:  0.000  0.5000  0.5000  0.5000
5    /  5:  1.000  0.5000  0.5000  0.4000
6    /  6:  0.000  0.2500  0.2500  0.1000
7    /  7:  0.000  0.0000  0.0000    ....
8    /  8:  0.000    ....    ....    ....
9    /  9:   ....    ....    ....    ....
10   / 10:  0.000    ....    ....    ....
11   / 11:  0.000  0.0000  0.0000    ....
12   / 12:  0.000    ....    ....    ....
 
 
let c = zsequence({0,1,1,0,1,0,0,0,,0,0,0})
list c, c[k=@spz], convolvek(c,{.25,.5,.25})
             Z: 0.5 to 12.5
 Column  1: C is ZSEQUENCE({0,1,1,0,1,0,0,0,,0,0,0})
 Column  2: C[Z=@SPZ:3] is ZSEQUENCE({0,1,1,0,1,0,0,0,,0,0,0}) (Parzen smoothed by 3 pts on Z)
 Column  3: EX#3 is CONVOLVEK(C,{.25,.5,.25})
               C     C      EX#3
1    /  1:  0.000    ....    ....
2    /  2:  1.000  0.7500  0.7500
3    /  3:  1.000  0.7500  0.7500
4    /  4:  0.000  0.5000  0.5000
5    /  5:  1.000  0.5000  0.5000
6    /  6:  0.000  0.2500  0.2500
7    /  7:  0.000  0.0000  0.0000
8    /  8:  0.000    ....    ....
9    /  9:   ....    ....    ....
10   / 10:  0.000    ....    ....
11   / 11:  0.000  0.0000  0.0000
12   / 12:  0.000    ....    ....
 
let d = tsequence({0,1,1,0,1,0,0,0,,0,0,0})
let dpat = tsequence({.25,.5,.25})
list d, d[l=@spz], convolvel(d,{.25,.5,.25})
             T: 0.5 to 12.5
 Column  1: D is TSEQUENCE({0,1,1,0,1,0,0,0,,0,0,0})
 Column  2: D[T=@SPZ:3] is TSEQUENCE({0,1,1,0,1,0,0,0,,0,0,0}) (Parzen smoothed by 3 pts on T)
 Column  3: EX#3 is CONVOLVEL(D,{.25,.5,.25})
               D     D      EX#3
1    /  1:  0.000    ....    ....
2    /  2:  1.000  0.7500  0.7500
3    /  3:  1.000  0.7500  0.7500
4    /  4:  0.000  0.5000  0.5000
5    /  5:  1.000  0.5000  0.5000
6    /  6:  0.000  0.2500  0.2500
7    /  7:  0.000  0.0000  0.0000
8    /  8:  0.000    ....    ....
9    /  9:   ....    ....    ....
10   / 10:  0.000    ....    ....
11   / 11:  0.000  0.0000  0.0000
12   / 12:  0.000    ....    ....
 
! 2D - convolvei convolves in x ...
let a = {0,1,1,0,1,0,0,0,,0,0,0} + y[y=1:2]
list a, a[i=@spz], convolvei(a,{.25,.5,.25})
             X: 0.5 to 12.5
             Y: 0.5 to 2.5
 Column  1: A is {0,1,1,0,1,0,0,0,,0,0,0} + Y[Y=1:2]
 Column  2: A[X=@SPZ:3] is {0,1,1,0,1,0,0,0,,0,0,0} + Y[Y=1:2] (Parzen smoothed by 3 pts on X)
 Column  3: EX#3 is CONVOLVEI(A,{.25,.5,.25})
               A     A    EX#3
 ---- J:1 Y:   1
1    /  1:  1.000   ....   ....
2    /  2:  2.000  1.750  1.750
3    /  3:  2.000  1.750  1.750
4    /  4:  1.000  1.500  1.500
5    /  5:  2.000  1.500  1.500
6    /  6:  1.000  1.250  1.250
7    /  7:  1.000  1.000  1.000
8    /  8:  1.000   ....   ....
9    /  9:   ....   ....   ....
10   / 10:  1.000   ....   ....
11   / 11:  1.000  1.000  1.000
12   / 12:  1.000   ....   ....
 ---- J:2 Y:   2
1    /  1:  2.000   ....   ....
2    /  2:  3.000  2.750  2.750
3    /  3:  3.000  2.750  2.750
4    /  4:  2.000  2.500  2.500
5    /  5:  3.000  2.500  2.500
6    /  6:  2.000  2.250  2.250
7    /  7:  2.000  2.000  2.000
8    /  8:  2.000   ....   ....
9    /  9:   ....   ....   ....
10   / 10:  2.000   ....   ....
11   / 11:  2.000  2.000  2.000
12   / 12:  2.000   ....   ....
 
 
*** Running ferret script: bn_tax_tstep.jnl
! bn_tax_tstep.jnl
!
! Working with the coordinates of this axis loses accuracy because its
! time origin is so far back from the time it represents
 
DEFINE AXIS/T="1-JAN-2000:00:00:01":"1-JAN-2000:00:15:00":2/UNITS=seconds tsec
LIST/L=440:451 T[GT=tsec]  ! See the accuracy problem here
             VARIABLE : T
                        axis TSEC
             SUBSET   : 12 points (TIME)
 01-JAN-2000 00:14:39 / 440:  3.123E+09
 01-JAN-2000 00:14:41 / 441:  3.123E+09
 01-JAN-2000 00:14:43 / 442:  3.123E+09
 01-JAN-2000 00:14:45 / 443:  3.123E+09
 01-JAN-2000 00:14:47 / 444:  3.123E+09
 01-JAN-2000 00:14:49 / 445:  3.123E+09
 01-JAN-2000 00:14:51 / 446:  3.123E+09
 01-JAN-2000 00:14:53 / 447:  3.123E+09
 01-JAN-2000 00:14:55 / 448:  3.123E+09
 01-JAN-2000 00:14:57 / 449:  3.123E+09
 01-JAN-2000 00:14:59 / 450:  3.123E+09
 01-JAN-2000 00:15:01 / 451:  3.123E+09
 
LET bsin = SIN(t[GT=tsec]/40000)
SAVE/FILE=a.nc/clobber bsin
CAN VAR/all
USE a.nc
 
SET LIST/PREC=7
! Reset the date to dec 1999
! Function lets us leave off the leading 0.
LIST/L=1:15  TAX_TSTEP(bsin, "1-dec-1999:00:00:00" )
             VARIABLE : TAX_TSTEP(BSIN, "1-dec-1999:00:00:00" )
             FILENAME : a.nc
             SUBSET   : 15 points (TIME)
 01-JAN-2000 00:00:01 /  1:  2678401.
 01-JAN-2000 00:00:03 /  2:  2678403.
 01-JAN-2000 00:00:05 /  3:  2678405.
 01-JAN-2000 00:00:07 /  4:  2678407.
 01-JAN-2000 00:00:09 /  5:  2678409.
 01-JAN-2000 00:00:11 /  6:  2678411.
 01-JAN-2000 00:00:13 /  7:  2678413.
 01-JAN-2000 00:00:15 /  8:  2678415.
 01-JAN-2000 00:00:17 /  9:  2678417.
 01-JAN-2000 00:00:19 / 10:  2678419.
 01-JAN-2000 00:00:21 / 11:  2678421.
 01-JAN-2000 00:00:23 / 12:  2678423.
 01-JAN-2000 00:00:25 / 13:  2678425.
 01-JAN-2000 00:00:27 / 14:  2678427.
 01-JAN-2000 00:00:29 / 15:  2678429.
 
! argument can be upper or lowercase
! Should list values 1, 3, 5...
LIST/L=1:15  TAX_TSTEP(bsin, "1-JAN-2000:00:00:00" )
             VARIABLE : TAX_TSTEP(BSIN, "1-JAN-2000:00:00:00" )
             FILENAME : a.nc
             SUBSET   : 15 points (TIME)
 01-JAN-2000 00:00:01 /  1:   1.00000
 01-JAN-2000 00:00:03 /  2:   3.00000
 01-JAN-2000 00:00:05 /  3:   5.00000
 01-JAN-2000 00:00:07 /  4:   7.00000
 01-JAN-2000 00:00:09 /  5:   9.00000
 01-JAN-2000 00:00:11 /  6:  11.00000
 01-JAN-2000 00:00:13 /  7:  13.00000
 01-JAN-2000 00:00:15 /  8:  15.00000
 01-JAN-2000 00:00:17 /  9:  17.00000
 01-JAN-2000 00:00:19 / 10:  19.00000
 01-JAN-2000 00:00:21 / 11:  21.00000
 01-JAN-2000 00:00:23 / 12:  23.00000
 01-JAN-2000 00:00:25 / 13:  25.00000
 01-JAN-2000 00:00:27 / 14:  27.00000
 01-JAN-2000 00:00:29 / 15:  29.00000
 
! Test  with TAX_DATESTRING to set the date (but argument to
! TAX_DATESTRING is also limited by precision so use a different
! axis def.)
 
DEFINE AXIS/T="1-JAN-1902:00:00:00":"1-JAN-1902:00:30:00":5/UNITS=seconds tsec
LIST/L=200:205 T[GT=tsec]  ! accuracy loss in single-precision t
             VARIABLE : T
                        axis TSEC
             SUBSET   : 6 points (TIME)
 01-JAN-1902 00:16:35 / 200:  30327395.
 01-JAN-1902 00:16:40 / 201:  30327400.
 01-JAN-1902 00:16:45 / 202:  30327405.
 01-JAN-1902 00:16:50 / 203:  30327410.
 01-JAN-1902 00:16:55 / 204:  30327415.
 01-JAN-1902 00:17:00 / 205:  30327420.
 
LET tt = t[gt=tsec]
LET reset_date = TAX_DATESTRING(`t[gt=tsec,l=1]`, tt, "sec")
 !-> DEFINE VARIABLE reset_date = TAX_DATESTRING(30326400, tt, "sec")
LIST/L=1:15 TAX_TSTEP(tt, "`reset_date`")
 !-> LIST/L=1:15 TAX_TSTEP(tt, "01-JAN-1902 00:00:00.0")
             VARIABLE : TAX_TSTEP(TT, "01-JAN-1902 00:00:00.0")
             SUBSET   : 15 points (TIME)
 01-JAN-1902 00:00:00 /  1:   0.00000
 01-JAN-1902 00:00:05 /  2:   5.00000
 01-JAN-1902 00:00:10 /  3:  10.00000
 01-JAN-1902 00:00:15 /  4:  15.00000
 01-JAN-1902 00:00:20 /  5:  20.00000
 01-JAN-1902 00:00:25 /  6:  25.00000
 01-JAN-1902 00:00:30 /  7:  30.00000
 01-JAN-1902 00:00:35 /  8:  35.00000
 01-JAN-1902 00:00:40 /  9:  40.00000
 01-JAN-1902 00:00:45 / 10:  45.00000
 01-JAN-1902 00:00:50 / 11:  50.00000
 01-JAN-1902 00:00:55 / 12:  55.00000
 01-JAN-1902 00:01:00 / 13:  60.00000
 01-JAN-1902 00:01:05 / 14:  65.00000
 01-JAN-1902 00:01:10 / 15:  70.00000
*** Running ferret script: bn_grads_z.jnl
! bn_grads_z.jnl
! acm 3/31/09
! Fixing bug 1651.
! The file has no axis attributes other than units and long_name,
! does not contain any other clues that Ferret uses to get a Z
! axis direction but for variable AR, has attribute
! DAXIS:long_name = "depth" ; This bug came from a question about the file
! http://www.usgodae.org/dods/GDS_NC/gdem/sspgdemv3s"
! See the bug report for more.
 
USE grads_bug_file.nc
 
! Previously A1 thru A4 showed as if on an x axis
! A1 has z axis with long_name elev
! A2 has z axis with long name height
! A3 has z axis with long name level
! A4 has z axis with long name layer
SHOW DATA
     currently SET data sets:
    1> ./data/grads_bug_file.nc  (default)
 name     title                             I         J         K         L
 AM       Z[GZ=CAXIS] + Y[GY=BAXIS] + X[G  1:10      1:5       1:5       ...
 AR       Z[GZ=DAXIS]+ Y[GY=BAXIS] + X[GX  1:10      1:5       1:6       ...
 A1                                        ...       ...       1:5       ...
 A2                                        ...       ...       1:5       ...
 A3                                        ...       ...       1:5       ...
 A4                                        ...       ...       1:5       ...
 
 
! The z axis of AM has no useful clues about its direction.
! Ferret uses it as Z only because of the order in which it comes in
SH GRID am
    GRID GMY1
 name       axis              # pts   start                end                 subset
 AAXIS     X (METERS)          10 r   1                    10                  full
 BAXIS     Y (METERS)           5 r   1                    9                   full
 CAXIS     Z (METERS)           5 r   2                    10                  full
 normal    T
 
! This axis has long_name = "depth" so it is (now) reversed.
! Previously it was not.
SH GRID ar
    GRID GMY2
 name       axis              # pts   start                end                 subset
 AAXIS     X (METERS)          10 r   1                    10                  full
 BAXIS     Y (METERS)           5 r   1                    9                   full
 DAXIS     DEPTH (m)            6 i-  0                    8                   full
 normal    T
 
! Can redefine the axis for variable AM to make it a z depth axis
 
DEFINE SYMBOL zname = `am,RETURN=zaxis`
 !-> DEFINE SYMBOL zname = CAXIS
DEFINE AXIS/Z/UNITS="`am,RETURN=zunits`"/DEPTH ($zname) = Z[GZ=am]
 !-> DEFINE AXIS/Z/UNITS="METERS"/DEPTH CAXIS = Z[GZ=am]
SH GRID am
    GRID GMY1
 name       axis              # pts   start                end                 subset
 AAXIS     X (METERS)          10 r   1                    10                  full
 BAXIS     Y (METERS)           5 r   1                    9                   full
 CAXIS     DEPTH (m)            5 r-  2                    10                  full
 normal    T
*** Running ferret script: bn_clock_syms.jnl
SH SYM delta_cpu, clock_secs, current_date, current_time
DELTA_CPU = "######"
CLOCK_SECS = "######"
CURRENT_DATE = "DD-MON-YY"
CURRENT_TIME = "HH:MM:SS"
! test special symbols DELTA_CPU, CLOCK_SECS
!
! NOTE THAT THE VALUES OF THE SYMBOLS WILL VARY FROM ONE
! RUN OF THIS TO ANOTHER...
 
use gt4d011
shade/k=1 temp[L=@ave]
sh sym DELTA_CPU, CLOCK_SECS
DELTA_CPU = "######"
CLOCK_SECS = "######"
 
repeat/k=1:10 shade temp[L=@ave]
!-> REPEAT: K=1
!-> REPEAT: K=2
!-> REPEAT: K=3
!-> REPEAT: K=4
!-> REPEAT: K=5
!-> REPEAT: K=6
!-> REPEAT: K=7
!-> REPEAT: K=8
!-> REPEAT: K=9
!-> REPEAT: K=10
let ten_plots = ($DELTA_CPU)
 !-> DEFINE VARIABLE ten_plots = 0.######
sh sym DELTA_CPU, CLOCK_SECS
DELTA_CPU = "######"
CLOCK_SECS = "######"
 
let  sumclock = 0
let  sumcpu = 0
sh sym CLOCK_SECS
CLOCK_SECS = "######"
repeat/k=1:10 (shade/pal=rnb2 temp[L=@ave]; let dt = ($DELTA_CPU);\
let sumcpu =`sumcpu + dt`)
 !-> repeat/k=1:10 (shade/pal=rnb2 temp[L=@ave]; let dt = ($DELTA_CPU);let sumcpu =`sumcpu + dt`)
!-> REPEAT: K=1
 !-> DEFINE VARIABLE dt = 0.######
 !-> DEFINE VARIABLE sumcpu = 0.######
!-> REPEAT: K=2
 !-> DEFINE VARIABLE dt = 0.######
 !-> DEFINE VARIABLE sumcpu = 0.######
!-> REPEAT: K=3
 !-> DEFINE VARIABLE dt = 0.######
 !-> DEFINE VARIABLE sumcpu = 0.######
!-> REPEAT: K=4
 !-> DEFINE VARIABLE dt = 0.######
 !-> DEFINE VARIABLE sumcpu = 0.######
!-> REPEAT: K=5
 !-> DEFINE VARIABLE dt = 0.######
 !-> DEFINE VARIABLE sumcpu = 0.######
!-> REPEAT: K=6
 !-> DEFINE VARIABLE dt = 0.######
 !-> DEFINE VARIABLE sumcpu = 0.######
!-> REPEAT: K=7
 !-> DEFINE VARIABLE dt = 0.######
 !-> DEFINE VARIABLE sumcpu = 0.######
!-> REPEAT: K=8
 !-> DEFINE VARIABLE dt = 0.######
 !-> DEFINE VARIABLE sumcpu = 0.######
!-> REPEAT: K=9
 !-> DEFINE VARIABLE dt = 0.######
 !-> DEFINE VARIABLE sumcpu = 0.######
!-> REPEAT: K=10
 !-> DEFINE VARIABLE dt = 0.######
 !-> DEFINE VARIABLE sumcpu = 0.######
 
say `sumcpu`
 !-> MESSAGE/CONTINUE 0.######
0.######
sh sym CLOCK_SECS
CLOCK_SECS = "######"
 
SH SYM session_date, current_date, session_time, current_time
SESSION_DATE = "DD-MON-YY"
SESSION_TIME = "HH:MM"
CURRENT_DATE = "DD-MON-YY"
CURRENT_TIME = "HH:MM:SS"
*** Running ferret script: bn63_bug_fixes.jnl
! bn63_bug_fixes.jnl
! Fixes that go into v6.3 release
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err62_string_write_nc
! err62_string_write_nc.jnl
! Bug 1664: string variable written as a float.
!
 
!!!! Make a smaller file from the original file:
 
!!!! use "/home/nstout/hankin/SOCAT_triples.nc"
!!!! save/file=err62_string_write.nc/clobber cruise_id[i=1:104000:1000], cruise_no[i=1:104000:1000]
 
! use "/home/nstout/hankin/SOCAT_triples.nc"
! set mem/siz=200
!DEFINE SYMBOL clen 3000
 
use err62_string_write.nc
DEFINE SYMBOL clen 30
 
let I1d = i[g=cruise_no]
 
let cm0 = IF CRUISE_NO NE CRUISE_NO[I=@SHF:-1] THEN 1    ! marks each real cruise
let cm1 = if i eq 1 then 1 else cm0                      ! start of first cruise, too
let cm2 = if MOD(cm1[i=@cib], ($clen) ) eq 0 then 1          ! break into chunks
 !-> DEFINE VARIABLE cm2 = if MOD(cm1[i=@cib], 30 ) eq 0 then 1
let mask = MISSING(cm1, cm2)
 
DEFINE SYMBOL nk = `mask[i=@ngd]`
 !-> DEFINE SYMBOL nk = 11
 
! **** IF EITHER OF THESE LINES IS COMMENTED OUT
!      THE STRING VAR cruise_id_xz IS SAVED OK
let/title="cruise no"  cruise_no_xz = EXPNDI_BY_Z(cruise_no,mask,`($nk)+1`,($clen) )
 !-> DEFINE VARIABLE/title="cruise no"  cruise_no_xz = EXPNDI_BY_Z(cruise_no,mask,12,30 )
SAVE/CLOBBER/FILE="a.nc"/i=1:10 cruise_no
 
let kstarts = mask * i
let kst = COMPRESSI(kstarts)
let/title="cruise ID" cruise_id_xz = SAMPLEI(cruise_id, kst[i=1:($nk)])
 !-> DEFINE VARIABLE/title="cruise ID" cruise_id_xz = SAMPLEI(cruise_id, kst[i=1:11])
list/i=1:10 cruise_id_xz
             VARIABLE : cruise ID
             FILENAME : err62_string_write.nc
             SUBSET   : 10 points (X)
 1    /  1:"0001SFC_PRT"
 2    /  2:"0002SFC_PRT"
 3    /  3:"0003SFC_PRT"
 4    /  4:"0004SFC_PRT"
 5    /  5:"0005SFC_PRT"
 6    /  6:"0006SFC_PRT"
 7    /  7:"0008SFC_PRT"
 8    /  8:"007ASFC_PRT"
 9    /  9:"0101SFC_PRT"
 10   / 10:"0102SFC_PRT"
 
! *** THE VARIABLE cruise_id_xz GETS SAVED AS FLOAT INSTEAD OF STRING
save/clobber/file=a.nc/i=1:10 cruise_id_xz
 
! Check the file
canc var/all
use a.nc
 
! Should be the same strings as above.
list cruise_id_xz
             VARIABLE : cruise ID
             FILENAME : a.nc
             SUBSET   : 10 points (X)
 1    /  1:"0001SFC_PRT"
 2    /  2:"0002SFC_PRT"
 3    /  3:"0003SFC_PRT"
 4    /  4:"0004SFC_PRT"
 5    /  5:"0005SFC_PRT"
 6    /  6:"0006SFC_PRT"
 7    /  7:"0008SFC_PRT"
 8    /  8:"007ASFC_PRT"
 9    /  9:"0101SFC_PRT"
 10   / 10:"0102SFC_PRT"
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err62_levset
! err62_levset.jnl
! fix for bug 1672, top color level chopped off in some circumstances
! The color bar should extend to 385.4
 
let var = 0*y + x
shade/x=350:390/y=1:10/lev=(376.6,379.0,0.8)(379.0,385.4,0.2) var
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err62_thick_tic_time_axis
! err62_thick_tic_time_axis.jnl
! Fixing bug 1668
!
! On multi-year or multi-decade time-axis plots, the
! dark line every year or 5- or 10-years, sometimes
! disappeared due to pixel aliasing. Fixed by setting
! the thick-line for these tics.
 
! restore default setting
ppl axlabp,-1,-1
 
define axis/t=1-jan-1990:1-jan-2010:1/units=months tax
 
set mode meta timetics.plt
let tt = l[gt=tax]
set view upper; plot/thick/line cos(tt/20)
set view lower; plot/thick/line/t=1-jan-1991:1-jan-1997 cos(tt/20)
can view
 
! Check that we get the thick dark black line for the tics on
! plots with more line colors
set mode linec:12
sho mode linecolors
      MODE            STATE        ARGUMENT
      LINECOLORS       SET              12
 
can win/all
set win/new
 
set mode meta timetics2.plt
 
ppl color,7,100,50,0   ! orange
ppl color,8,0,55,0     ! dark green
ppl color,9,60,0,100   ! purple
ppl color,10,100,60,70 ! pink
ppl color,11,80,70,60  ! tan
ppl color,12,100,75,0  ! yellow
 
 
let tt = l[gt=tax]
plot/thick/line \
 cos(tt/20), cos(tt/24), cos(tt/28), cos(tt/32), \
 cos(tt/36), cos(tt/40), cos(tt/44), cos(tt/48), \
 cos(tt/52), cos(tt/56), cos(tt/60), cos(tt/64)
 
can mode linecolors
can win/all
set win/new
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err62_reset_after_inf
! err62_reset_after_inf.jnl
! Bug 1292
! The levels did not reset to default closed levels
 
Set mode meta closed_lev.plt
 
use levitus_climatology
set view left
shade/lev=(-inf)(2,24,2)(inf) temp[k=1]
 
! The bug was that this did not reset to default closed levels
set view right
shade/lev=20 temp[k=1]
cancel mode meta
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err62_reversed_up
! err62_reversed_up.jnl
!
! bug 1676:
! reversed axis, positive up, with edges could
! not check points-inside-edges and so would
! just use midpts between coordinates as edges
 
use lev_rev_up.nc
 
use lev_rev_up.nc
list z[gz=temp], zboxlo[gz=temp], zboxhi[gz=temp]
             DATA SET: ./data/lev_rev_up.nc
             Z (METERS): -5000 to 0
 Column  1: Z is Z (axis ZAXLEVITR)
 Column  2: ZBOXLO is ZBOXLO (axis ZAXLEVITR)
 Column  3: ZBOXHI is ZBOXHI (axis ZAXLEVITR)
                  Z  ZBOXLO ZBOXHI
-5000   /  1: -5000. -5000. -4500.
-4000   /  2: -4000. -4500. -3500.
-3000   /  3: -3000. -3500. -2500.
-2000   /  4: -2000. -2500. -1800.
-1500   /  5: -1500. -1800. -1300.
-1200   /  6: -1200. -1300. -1100.
-1000   /  7: -1000. -1100.  -900.
-800    /  8:  -800.  -900.  -700.
-600    /  9:  -600.  -700.  -500.
-400    / 10:  -400.  -500.  -350.
-300    / 11:  -300.  -350.  -250.
-200    / 12:  -200.  -250.  -180.
-150    / 13:  -150.  -180.  -120.
-100    / 14:  -100.  -120.   -90.
-75     / 15:   -75.   -90.   -60.
-50     / 16:   -50.   -60.   -32.
-30     / 17:   -30.   -32.   -24.
-20     / 18:   -20.   -24.   -12.
-10     / 19:   -10.   -12.    -5.
0       / 20:     0.    -5.     0.
 
! shade/j=1 temp[z=-55:0]
! let xpts = xsequence(x[gx=temp] + 0*z[gz=temp])
! let zpts = xsequence(0*x[gx=temp] + z[gz=temp])
! plot/over/vs/color=lightblue/sym=27 xpts,zpts
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err62_samplexy
! err62_samplexy
! bug 1677
 
use coads_climatology
 
! put the data on 1:360 for convenience in seeing whats going on
save/clobber/file=xz.nc sst[x=1:360,L=1]
can dat/all; can mem
 
use xz
 
let xpts = {357.6,358.8,359.9,360.,0.1,1.2,2.4}
let ypts = 0*xpts
 
let sr = SAMPLEXY(sst[L=1], xpts, ypts)
 
! previously the middle 3 points of this were missing.
list sr
             VARIABLE : SAMPLEXY(SST[L=1], XPTS, YPTS)
             FILENAME : xz.nc
             SUBSET   : 7 points (X)
             TIME     : 16-JAN 06:00
 1   / 1:  27.46
 2   / 2:  27.45
 3   / 3:  27.54
 4   / 4:  27.55
 5   / 5:  27.56
 6   / 6:  27.66
 7   / 7:  27.75
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err62_one_point_bounds
! err62_one_point_bounds.jnl
! Bug 1680
! If a single-point axis has bounds specified,
! then on a SAVE/BOUNDS, Ferret did not save the
! correct bounds (but instead saved coord+/- 0.5)
 
DEFINE AXIS/BOUNDS/Z/UNITS=meters myzaxis = {5}, {4.89,5.11}
LET zz = Z[GZ=myzaxis]
SAVE/BOUNDS/CLOBBER/FILE=a.nc zz
LIST Z[GZ=zz], ZBOXLO[GZ=zz], ZBOXHI[GZ=zz]
             Z (METERS): 5
 Column  1: Z is Z (axis MYZAXIS)
 Column  2: ZBOXLO is ZBOXLO (axis MYZAXIS)
 Column  3: ZBOXHI is ZBOXHI (axis MYZAXIS)
              Z  ZBOXLO ZBOXHI
I / *:     5.000  4.890  5.110
 
CAN DAT/ALL; CAN VAR/ALL
USE a.nc
! This should match the output of the LIST above
LIST Z[GZ=zz], ZBOXLO[GZ=zz], ZBOXHI[GZ=zz]
             DATA SET: ./a.nc
             Z (meters): 5
 Column  1: Z is Z (axis MYZAXIS1)
 Column  2: ZBOXLO is ZBOXLO (axis MYZAXIS1)
 Column  3: ZBOXHI is ZBOXHI (axis MYZAXIS1)
              Z  ZBOXLO ZBOXHI
I / *:     5.000  4.890  5.110
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err62_cos_lat_uncentered
!err62_cos_lat_uncentered.jnl
! See this thread, here is the esample, with his test.nc renamed to uncentered.nc
! http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2009/msg00510.html
! Also see the last comments from Andrew on bug 1348.
 
use uncentered.nc
define grid/like=test grd
 
! list edges
list yboxlo[g=grd],yboxhi[g=grd]
             LATITUDE: 90S to 90N
 Column  1: YBOXLO is YBOXLO (axis LAT_T)
 Column  2: YBOXHI is YBOXHI (axis LAT_T)
           YBOXLO  YBOXHI
76.5S /  1: -90.00 -70.81
66.4S /  2: -70.81 -62.73
59.4S /  3: -62.73 -56.44
53.7S /  4: -56.44 -51.06
48.6S /  5: -51.06 -46.24
44S   /  6: -46.24 -41.81
39.7S /  7: -41.81 -37.67
35.7S /  8: -37.67 -33.75
31.9S /  9: -33.75 -30.00
28.2S / 10: -30.00 -26.39
24.6S / 11: -26.39 -22.89
21.2S / 12: -22.89 -19.47
17.8S / 13: -19.47 -16.13
14.5S / 14: -16.13 -12.84
11.2S / 15: -12.84  -9.59
8S    / 16:  -9.59  -6.38
4.8S  / 17:  -6.38  -3.18
1.6S  / 18:  -3.18  -0.00
1.6N  / 19:  -0.00   3.18
4.8N  / 20:   3.18   6.38
8N    / 21:   6.38   9.59
11.2N / 22:   9.59  12.84
14.5N / 23:  12.84  16.13
17.8N / 24:  16.13  19.47
21.2N / 25:  19.47  22.89
24.6N / 26:  22.89  26.39
28.2N / 27:  26.39  30.00
31.9N / 28:  30.00  33.75
35.7N / 29:  33.75  37.67
39.7N / 30:  37.67  41.81
44N   / 31:  41.81  46.24
48.6N / 32:  46.24  51.06
53.7N / 33:  51.06  56.44
59.4N / 34:  56.44  62.73
66.4N / 35:  62.73  70.81
76.5N / 36:  70.81  90.00
 
! calculate weights w1 and w2
let rad = 3.14159265/180
let w1 = (yboxhi[i=1,g=grd]-yboxlo[i=1,g=grd])*cos(y[i=1,g=grd]*rad)
let w2 = sin(yboxhi[i=1,g=grd]*rad) - sin(yboxlo[i=1,g=grd]*rad)
 
! list normalized weights
list w1/w1[j=@sum],w2/w2[j=@sum]
             LATITUDE: 90S to 90N
 Column  1: EX#1 is W1/W1[J=@SUM]
 Column  2: EX#2 is W2/W2[J=@SUM]
               EX#1    EX#2
76.5S /  1:  0.03826  0.02778
66.4S /  2:  0.02750  0.02778
59.4S /  3:  0.02725  0.02778
53.7S /  4:  0.02718  0.02778
48.6S /  5:  0.02716  0.02778
44S   /  6:  0.02714  0.02778
39.7S /  7:  0.02714  0.02778
35.7S /  8:  0.02713  0.02778
31.9S /  9:  0.02713  0.02778
28.2S / 10:  0.02713  0.02778
24.6S / 11:  0.02712  0.02778
21.2S / 12:  0.02712  0.02778
17.8S / 13:  0.02712  0.02778
14.5S / 14:  0.02712  0.02778
11.2S / 15:  0.02712  0.02778
8S    / 16:  0.02712  0.02778
4.8S  / 17:  0.02712  0.02778
1.6S  / 18:  0.02712  0.02778
1.6N  / 19:  0.02712  0.02778
4.8N  / 20:  0.02712  0.02778
8N    / 21:  0.02712  0.02778
11.2N / 22:  0.02712  0.02778
14.5N / 23:  0.02712  0.02778
17.8N / 24:  0.02712  0.02778
21.2N / 25:  0.02712  0.02778
24.6N / 26:  0.02712  0.02778
28.2N / 27:  0.02713  0.02778
31.9N / 28:  0.02713  0.02778
35.7N / 29:  0.02713  0.02778
39.7N / 30:  0.02714  0.02778
44N   / 31:  0.02714  0.02778
48.6N / 32:  0.02716  0.02778
53.7N / 33:  0.02718  0.02778
59.4N / 34:  0.02725  0.02778
66.4N / 35:  0.02750  0.02778
76.5N / 36:  0.03826  0.02778
 
! list weights calculated by Ferret at j=1,2,3,4,5,18
let all = if test gt 0 then 1
let total_area = all[x=@din,y=@din]
let cell1 = if test eq 1 then 1
let cell2 = if test eq 2 then 1
let cell3 = if test eq 3 then 1
let cell4 = if test eq 4 then 1
let cell5 = if test eq 5 then 1
let cell18 = if test eq 18 then 1
list cell1[x=@din,y=@din]/total_area
             VARIABLE : CELL1[X=@DIN,Y=@DIN]/TOTAL_AREA
             FILENAME : uncentered.nc
             LONGITUDE: 100E to 100E(460)
             LATITUDE : 90S to 90N
          0.02778
list cell2[x=@din,y=@din]/total_area
             VARIABLE : CELL2[X=@DIN,Y=@DIN]/TOTAL_AREA
             FILENAME : uncentered.nc
             LONGITUDE: 100E to 100E(460)
             LATITUDE : 90S to 90N
          0.02778
list cell3[x=@din,y=@din]/total_area
             VARIABLE : CELL3[X=@DIN,Y=@DIN]/TOTAL_AREA
             FILENAME : uncentered.nc
             LONGITUDE: 100E to 100E(460)
             LATITUDE : 90S to 90N
          0.02778
list cell4[x=@din,y=@din]/total_area
             VARIABLE : CELL4[X=@DIN,Y=@DIN]/TOTAL_AREA
             FILENAME : uncentered.nc
             LONGITUDE: 100E to 100E(460)
             LATITUDE : 90S to 90N
          0.02778
list cell5[x=@din,y=@din]/total_area
             VARIABLE : CELL5[X=@DIN,Y=@DIN]/TOTAL_AREA
             FILENAME : uncentered.nc
             LONGITUDE: 100E to 100E(460)
             LATITUDE : 90S to 90N
          0.02778
list cell18[x=@din,y=@din]/total_area
             VARIABLE : CELL18[X=@DIN,Y=@DIN]/TOTAL_AREA
             FILENAME : uncentered.nc
             LONGITUDE: 100E to 100E(460)
             LATITUDE : 90S to 90N
          0.02778
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err62_if_inside_repeat
! err62_if_inside_repeat.jnl
! Bug 1681. Parsing error when, inside the REPEAT, we have
! endif) on a line of its own.
 
! the fix for this bug causes a worse bug for GFDL (see #1706).
! Thought I had a better fix but it turns out not. For now
! reverting all the code surrounding these fixes. Do not
! execute these tests.
 
cancel mode verify
test1
test2
test3
Now try the same tests with IF 1 inside the REPEATs
test4
test5
test6
Now try the same tests with IF 1 to execute everything.
test7
  hello7
  hello7
test8
  hello8
  hello8
test9
  hello9
  hello9
Now try the same tests with IF 1 and ELSE.
test10
  hello10
  hello10
test11
  hello11
  hello11
test12
  hello12
  hello12
Now try the same tests with IF 0 and ELSE.
test13
  else13
  else13
test14
  else14
  else14
test15
  else15
  else15
Now try the same tests with IF 0 and ELIF.
test16
  elif16
  elif16
test17
  elif17
  elif17
test18
  elif18
  elif18
Next should a line that says --->here
And then    a line that says 201.
--->here
   201.0
done
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err62_title_curvi_plot
! err62_title_curvi_plot.jnl
! bug 1669; when the variable and its coordinate variables
! come from different datasets, we get the variable def, not
! its title as the main title.
! The titles should all be SEA SURFACE TEMPERATURE (Deg C)
 
use coads_climatology
let xval = x[gx=sst[d=1]]+0*y[gy=sst[d=1]]
let yval = y[gy=sst[d=1]]+0*x[gx=sst[d=1]]
save/clob/file=a.nc sst[l=1:2], xval, yval
 
can var/all
use a.nc
set v ul; shade sst[d=1,l=1], xval[d=2], yval[d=2]; sh sym labtit
LABTIT = "SEA SURFACE TEMPERATURE (Deg C)"
set v ur; shade sst[d=2,l=1], xval[d=2], yval[d=2]; sh sym labtit
LABTIT = "SEA SURFACE TEMPERATURE (Deg C)"
 
set v ll; fill sst[d=1,l=1], xval[d=2], yval[d=2]; sh sym labtit
LABTIT = "SEA SURFACE TEMPERATURE (Deg C)"
set v lr; fill sst[d=2,l=1], xval[d=2], yval[d=2]; sh sym labtit
LABTIT = "SEA SURFACE TEMPERATURE (Deg C)"
 
can view
set v ul; vector/xskip=10/yskip=10 sst[d=1,l=1],sst[d=1,l=2], xval[d=2], yval[d=2]; sh sym labtit
LABTIT = "SEA SURFACE TEMPERATURE (Deg C) , SEA SURFACE TEMPERATURE (Deg C)"
set v ur; vector/xskip=10/yskip=10 sst[d=2,l=1],sst[d=2,l=2], xval[d=2], yval[d=2]; sh sym labtit
LABTIT = "SEA SURFACE TEMPERATURE (Deg C) , SEA SURFACE TEMPERATURE (Deg C)"
 
set v ll; contour sst[d=1,l=1], xval[d=2], yval[d=2]; sh sym labtit
LABTIT = "SEA SURFACE TEMPERATURE (Deg C)"
set v lr; contour sst[d=2,l=1], xval[d=2], yval[d=2]; sh sym labtit
LABTIT = "SEA SURFACE TEMPERATURE (Deg C)"
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err62_save_missingcoordvar
! err62_save_missingcoordvar.jnl
! see bug 1686
! The dataset doesn't have a coordinate variable, in this case TIME
! Ferret gives it an abstract axis, but then cant SAVE the variable.
 
! This dataset behaves this way
! use "http://test.opendap.org/opendap/data/nc/data.nc"
 
! create a local dataset
use timemissing.nc
save/clobber/file=a.nc sst
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err62_contourbug
! err62_contourbug.jnl
! Bug 1688
! contours of curvi data when x units not longitude
! some contour lines draw across the plot
 
let xb=x[x=0:290:10]
let yb=y[y=0:290:10]
let xb2 = xb + 0*yb
let zb=I[x=0:290:10]*J[y=0:290:10]
contour/hlimits=-100:400:50 xb2+zb,xb2,zb
 
! A FILL version of the same general thing
let xb = x[x=0:290:10]
let yb = y[y=0:290:10]
let xb2 = xb + 0*yb
let zb = I[x=0:290:10] * J[y=0:290:10]
fill/hlimits=-100:400:50 0.0000001*(xb2+zb)^3,xb2,zb
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err62_append_irreg_to_reg
! err62_append_irreg_to_reg.jnl
! bug 1692
 
! See Patrick's report:
! http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2009/msg00620.html
! where he points to another example.
!
! Turns out he was appending irreg time coords to a regular time axis
! and Ferret needs a better error message
 
SET MODE IGNORE
 
! By default a regular axis gets no bounds on a SAVE
DEFINE AXIS/T t_axis = {1,2,3,4,5}
LET var = T[GT=t_axis]
SAVE/CLOBBER/FILE=t_bug.nc var
 
! Now try to append this irregularly-spaced data to the above
DEFINE AXIS/T t_axis = {6,8,9,10,12,13}
SAVE/FILE=t_bug.nc/APPEND var
 
! previously the message just said
! ** netCDF error: Variable not found
 
! Msg should explain that it was the bounds variable, needed
! for the append, but not found in the existing file.
 
SET MODE/LAST IGNORE
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err62_axis_stride_off
! err62_axis_stride_off.jnl
! fixing bug 1689: offset shifted by 1 so /OFFSET=0 >> start index = 1
! 1/2017 *acm* changes in output due to backing off auto-detection of truemonth axes, tkt 2497
 
USE truemonth.nc
 
SET AXIS/STRIDE=12/OFFSET=0 truemonth  ! every January
LIST var
             VARIABLE : COS(T[GT=TRUEMONTH]/100)
             FILENAME : truemonth.nc
             SUBSET   : 20 points (TIME)
 16-JAN-1950 /  1:  0.8459
 16-JAN-1951 /  2: -0.4792
 16-JAN-1952 /  3: -0.0086
 16-JAN-1953 /  4:  0.5030
 16-JAN-1954 /  5: -0.8601
 16-JAN-1955 /  6:  0.9996
 16-JAN-1956 /  7: -0.8863
 16-JAN-1957 /  8:  0.5404
 16-JAN-1958 /  9: -0.0625
 16-JAN-1959 / 10: -0.4313
 16-JAN-1960 / 11:  0.8159
 16-JAN-1961 / 12: -0.9952
 16-JAN-1962 / 13:  0.9170
 16-JAN-1963 / 14: -0.6068
 16-JAN-1964 / 15:  0.1432
 16-JAN-1965 / 16:  0.3660
 16-JAN-1966 / 17: -0.7727
 16-JAN-1967 / 18:  0.9840
 16-JAN-1968 / 19: -0.9463
 16-JAN-1969 / 20:  0.6618
 
CAN AXIS/STRIDE `var,return=taxis`
 !-> CAN AXIS/STRIDE (AX###)
SET AXIS/STRIDE=12/OFFSET=11 truemonth ! every December
LIST var
             VARIABLE : COS(T[GT=TRUEMONTH]/100)
             FILENAME : truemonth.nc
             SUBSET   : 19 points (TIME)
 DEC-1950 /  1: -0.7241
 DEC-1951 /  2:  0.2968
 DEC-1952 /  3:  0.2154
 DEC-1953 /  4: -0.6635
 DEC-1954 /  5:  0.9438
 DEC-1955 /  6: -0.9853
 DEC-1956 /  7:  0.7713
 DEC-1957 /  8: -0.3640
 DEC-1958 /  9: -0.1355
 DEC-1959 / 10:  0.6006
 DEC-1960 / 11: -0.9179
 DEC-1961 / 12:  0.9950
 DEC-1962 / 13: -0.8204
 DEC-1963 / 14:  0.4383
 DEC-1964 / 15:  0.0647
 DEC-1965 / 16: -0.5423
 DEC-1966 / 17:  0.8827
 DEC-1967 / 18: -0.9998
 DEC-1968 / 19:  0.8589
 
SET MODE IGNORE_ERRROR
! Previously didnt check for negative offset value
CAN AXIS/STRIDE `var,return=taxis`
 !-> CAN AXIS/STRIDE (AX###)
SET AXIS/STRIDE=12/OFFSET=-1 truemonth
 
! Previously didnt give err msg; just ignored non-positive stride value
SET AXIS/STRIDE=-1/OFFSET=1 truemonth
 
SET MODE/LAST IGNORE
 
 
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err62_compound_string_conditional
! err62_compound_string_conditional
! Bug 1380
 
LIST 1 EQ 2 or 3 EQ 3  ! all numeric
             VARIABLE : 1 EQ 2 OR 3 EQ 3
          1.000
 
LIST "a" EQ "b"
             VARIABLE : "a" EQ "b"
          0.0000
LIST "b" EQ "b"
             VARIABLE : "b" EQ "b"
          1.000
LIST "a" EQ "b" OR  "b" EQ "b"  ! should be 1
             VARIABLE : "a" EQ "b" OR  "b" EQ "b"
          1.000
LIST "a" EQ "b" AND "b" EQ "b"  ! should be 0
             VARIABLE : "a" EQ "b" AND "b" EQ "b"
          0.0000
 
LIST  "a" LE "b" AND 3 EQ 3  ! should be 1
             VARIABLE : "a" LE "b" AND 3 EQ 3
          1.000
 
LIST 1 EQ 2 OR "A" EQ "B"    ! should be 0
             VARIABLE : 1 EQ 2 OR "A" EQ "B"
          0.0000
 
*** Running ferret script: bn_axis_reversed_syms.jnl
! bn_axis_reversed_syms.jnl
! XAXIS_REVERSED and YAXIS_REVERSED are
! set to 0 or if the reversed-axis is
! plotted upside-down, set to 1
 
use gt4d011.cdf
shade/i=91/L=1 temp
sh sym *axis_reversed
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "1"
contour/i=91/j=35 temp
sh sym *axis_reversed
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "1"
vector/k=1/l=4 u,v
sh sym *axis_reversed
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "0"
vector/j=41/l=4 u,v
sh sym *axis_reversed
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "1"
fill/j=41/l=4 temp
sh sym *axis_reversed
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "1"
shade/j=41/k=4 temp
sh sym *axis_reversed
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "0"
 
! with /TRANS. None of these will have YAXIS_REVERSED=1
shade/trans/i=91/L=1 temp
sh sym *axis_reversed
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "0"
contour/trans/i=91/j=35 temp
sh sym *axis_reversed
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "0"
vector/trans/k=1/l=4 u,v
sh sym *axis_reversed
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "0"
vector/trans/j=41/l=4 u,v
sh sym *axis_reversed
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "0"
fill/trans/j=41/l=4 temp
sh sym *axis_reversed
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "0"
shade/trans/j=41/k=4 temp
sh sym *axis_reversed
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "0"
 
! in viewports
set view ul; shade/i=91/L=1 temp
sh sym *axis_reversed
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "1"
set view ur; contour/i=91/j=35 temp
sh sym *axis_reversed
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "1"
set view ll; vector/k=1/l=4 u,v
sh sym *axis_reversed
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "0"
set view lr; fill/j=41/l=4 temp
sh sym *axis_reversed
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "1"
 
! also set with  SHADE/SET
cancel viewports
 
shade/set/i=91/L=1 temp
sh sym *axis_reversed
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "1"
 
*** Running ferret script: bn_isdepth.jnl
! Tests of `var,RETURN=ISDEPTH`
 
define axis/units=meters/z=0:100:2 zup
let zz = z[gz=zup]
say `zz,return=isdep`
 !-> MESSAGE/CONTINUE 0
0
 
define axis/units=meters/z=0:200:2/depth zdn
let zz = z[gz=zdn]
say `zz,return=isdep`
 !-> MESSAGE/CONTINUE 1
1
 
use gtbc011
say `temp,return=isdepth`
 !-> MESSAGE/CONTINUE 1
1
 
use coads_climatology
say `sst,return=isdepth`
 !-> MESSAGE/CONTINUE 0
0
 
can data 2
 
cancel axis/depth `temp,return=zaxis`
 !-> cancel axis/depth PSZT
say `temp,return=isdepth`
 !-> MESSAGE/CONTINUE 0
0
 
*** Running ferret script: bn_var_hist_levels.jnl
! bn_var_hist_levels.jnl
! Syntax for variance-based or histogram-based levels
!
 
use levitus_climatology
 
! Variance levels
shade/line/lev=50v/title="/LEV=50v" temp[K=1]
 
! New symbol LEV_OPNLEVS captures the levels set with /V or VC
sh sym lev*
LEV_ALL = "-2,-1.495,-0.99,-0.485,0.02,0.525,1.03,1.535,2.04,2.545,3.05,3.5,4,4.5,5,5.5,6,6.5,7,7.5,8,8.5,9,9.5,10,10.5,11,11.5,12,12.5,13,13.5,14,14.5,15,15.5,16,16.5,17,17.5,18,18.5,19,19.5,20,20.5,21,21.5,22,22.5,23,23.5,24,24.5,25,25.45,30.74"
LEV_TEXT = "50V"
LEV_MIN = "-2"
LEV_MAX = "open-ended"
LEV_NUM = "56"
LEV_DEL = "irregular"
LEV_OPNLEVS = "(-2,3.05,0.505)(3.5,25.5,0.5)(25.5,25.5,0.505)(inf)"
LEV_CENTERED_LABELS = "off"
 
shade/line/lev=50v,5min/title="/LEV=50v,5min" temp[K=1]
shade/line/lev=50v,5mean/title="/LEV=50v,5mean" temp[K=1]
shade/line/lev=50v,25max/title="/LEV=50v,25max" temp[K=1]
shade/line/lev=50v,1d/title="/LEV=50v,1d" temp[K=1]
 
! If the data has lots of negative data, the computation of
! the std deviation was incorrect.  See ticket 1778.
 
let negvar = -1* temp
 
shade/line/lev=50v,-20min/title="/LEV=50v,-20min" negvar[K=1]
shade/line/lev=50v,-15mean/title="/LEV=50v,-15mean" negvar[K=1]
shade/line/lev=50v,-15max/title="/LEV=50v,-15max" negvar[K=1]
shade/line/lev=50v,1d/title="/LEV=50v,1d" negvar[K=1]
 
! Histogram-based
shade/line/lev=50h/title="/LEV=50h" temp[K=1]
 
 
! Need some tests with centered levels and with /LINE
 
let cvar = temp - 15
 
shade/line/key/lev=50v/title="/LEV=50v,-20min" cvar[K=1]
shade/line/key/lev=50v/title="/LEV=50v,-15mean" cvar[K=1]
shade/line/key/lev=50v/title="/LEV=50v,-15max" cvar[K=1]
shade/line/key/lev=50v,1d/title="/LEV=50v,1d" cvar[K=1]
 
 
shade/line/key/lev=cv/title="/LEV=cv" cvar[K=1]
shade/line/key/lev=50/title="/LEV=50" cvar[K=1]
shade/line/key/lev=50c/title="/LEV=50c" cvar[K=1]
shade/line/key/lev=c,1d/title="/LEV=c,1d" cvar[K=1]
shade/line/key/lev=20c,1d/title="/LEV=20c,1d" cvar[K=1]
 
! Histogram-based
shade/line/key/lev=50h/title="/LEV=50h" cvar[K=1]
 
*** Running ferret script: bn64_bug_fixes.jnl
! bn64_bug_fixes.jnl
! Fixes that go into v6.4 release
 
! (changes were made to err62_if_inside_repeat.jnl
!  which is run previously.)
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err63_days1900toydmhms
! err63_days1900toydmhms.jnl
!
! Bug reported by Jaison Kurian
! 32-bit linux, this returned the wrong month
! and day for start of March.
 
define axis/t=21241:21245:1 tax
let julshift = DAYS1900(1950,1,1)
let julday   = t[gt=tax] + julshift
let tpts     = DAYS1900TOYMDHMS(julday)
list/k=2:3 tpts
             VARIABLE : DAYS1900TOYMDHMS(JULDAY)
             SUBSET   : 2 by 5 points (Z-T)
                 2      3    
                 2      3
 21241   / 1:   2.00  27.00
 21242   / 2:   2.00  28.00
 21243   / 3:   2.00  29.00
 21244   / 4:   3.00   1.00
 21245   / 5:   3.00   2.00
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err63_log_vaxis
! err63_log_vaxis.jnl
! fix for bug 1708
! This example from Patrick Brockmann.
 
! ok
set view left
def axis/z=10:10000:10 vert_axis_up
plot/vlog z[gz=vert_axis_up]
 
 
! not ok : left vertical log axis is down. right vertical axis is up
set view right
def axis/z=10:10000:10/depth vert_axis_dn
plot/vlog z[gz=vert_axis_dn]
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err63_delim_E.jnl
! err63_delim_E.jnl
! bug 1700
! On delimited reads, looking for strings ending with E for longitudes.
! But need to check if its just a string ending in E such as ZAIRE
 
sp rm -f names
sp echo ZAIRE > names
sp echo E >> names
columns names
list v1
             VARIABLE : V1
             FILENAME : names
             SUBSET   : 2 points (X)
 1   / 1:"ZAIRE"
 2   / 2:"E"    
 
can dat/all
sp rm -f names
sp echo zaire > names
columns names
list v1
             VARIABLE : V1
             FILENAME : names
             X        : 1
        "zaire"
 
can dat/all
sp rm -f names
sp echo ZAIRA > names
columns names
list v1
             VARIABLE : V1
             FILENAME : names
             X        : 1
        "ZAIRA"
*** Running ferret script: bn_long_grid_names.jnl
! bn_long_grid_names.jnl
! test longer grid names (16 --> 64 chars)
! tests taken from other bn scripts but with longer grid names
 
! read onto a 2D grid
DEFINE AXIS/X=1:3:1 xez1
DEFINE GRID/X=XEZ1/Y=EZ ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890
 
FILE/VAR="X1,X2"/COLUMNS=6/GRID=ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 EZ.DAT
SHOW DATA/FULL
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 
 name     title                             I         J         K         L
 X1       X1                               1:3       1:20480   ...       ...
               on grid ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 with -1.E+34 for missing data
             X=0.5:3.5  Y=0.5:2.05E+04  
 X2       X2                               1:3       1:20480   ...       ...
               on grid ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 with -1.E+34 for missing data
             X=0.5:3.5  Y=0.5:2.05E+04  
 
 /FORMAT = FREE
 /SKIP = 0
 /COLUMNS = 6
LIST X1
             VARIABLE : X1
             FILENAME : EZ.DAT
             SUBSET   : 3 by 5 points (X-Y)
             1       2       3     
              1       2       3
 1   / 1:  0.0060  0.1760  0.2820
 2   / 2:  0.3550  0.3790  0.3930
 3   / 3:  0.4100  0.4170  0.4670
 4   / 4:  0.4350  0.4440  0.4700
 5   / 5:  0.4780  0.5150  0.4690
SHOW DATA
     currently SET data sets:
    1> ./data/EZ.DAT  (default)
 name     title                             I         J         K         L
 X1       X1                               1:3       1:5       ...       ...
 X2       X2                               1:3       1:5       ...       ...
 
CAN DATA/ALL
 
define axis/x=2:20:2 xeven
define axis/x=1:19:2 xodd
define axis/y=2:20:2 yeven
define axis/y=1:19:2 yodd
define axis/z=2:20:2 zeven
define axis/z=1:19:2 zodd
define axis/t=2:20:2/t0="1-jan-1980"/unit=days teven
define axis/t=1:19:2/t0="1-jan-1980"/unit=days todd
 
define grid/x=xeven/y=yeven/z=zeven/t=teven even
 
define grid/x=xodd/y=yodd/z=zodd/t=todd g00abcdefghijklmnopqrstuvwxyz1234567890
 
LET veven = 1000*i[g=even] + 100*j[g=even] + 10*k[g=even] + l[g=even]
 
LET v1234 = veven[g=g00abcdefghijklmnopqrstuvwxyz1234567890]
 
SET REGION/X=4.01:8.99/Y=4.01:8.99/Z=4.01:8.99/T=4.01:8.99
 
list veven
             VARIABLE : 1000*I[G=EVEN] + 100*J[G=EVEN] + 10*K[G=EVEN] + L[G=EVEN]
             SUBSET   : 3 by 3 by 3 by 3 points (X-Y-Z-TIME)
             4      6      8    
             2      3      4
 ---- L:2 T:   05-JAN-1980 00:00
 ---- K:2 Z:   4
 4   / 2:  2222.  3222.  4222.
 6   / 3:  2322.  3322.  4322.
 8   / 4:  2422.  3422.  4422.
 ---- K:3 Z:   6
 4   / 2:  2232.  3232.  4232.
 6   / 3:  2332.  3332.  4332.
 8   / 4:  2432.  3432.  4432.
 ---- K:4 Z:   8
 4   / 2:  2242.  3242.  4242.
 6   / 3:  2342.  3342.  4342.
 8   / 4:  2442.  3442.  4442.
 ---- L:3 T:   07-JAN-1980 00:00
 ---- K:2 Z:   4
 4   / 2:  2223.  3223.  4223.
 6   / 3:  2323.  3323.  4323.
 8   / 4:  2423.  3423.  4423.
 ---- K:3 Z:   6
 4   / 2:  2233.  3233.  4233.
 6   / 3:  2333.  3333.  4333.
 8   / 4:  2433.  3433.  4433.
 ---- K:4 Z:   8
 4   / 2:  2243.  3243.  4243.
 6   / 3:  2343.  3343.  4343.
 8   / 4:  2443.  3443.  4443.
 ---- L:4 T:   09-JAN-1980 00:00
 ---- K:2 Z:   4
 4   / 2:  2224.  3224.  4224.
 6   / 3:  2324.  3324.  4324.
 8   / 4:  2424.  3424.  4424.
 ---- K:3 Z:   6
 4   / 2:  2234.  3234.  4234.
 6   / 3:  2334.  3334.  4334.
 8   / 4:  2434.  3434.  4434.
 ---- K:4 Z:   8
 4   / 2:  2244.  3244.  4244.
 6   / 3:  2344.  3344.  4344.
 8   / 4:  2444.  3444.  4444.
list v1234
             VARIABLE : VEVEN[G=G00ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890]
             SUBSET   : 3 by 3 by 3 by 3 points (X-Y-Z-TIME)
             5      7      9    
             3      4      5
 ---- L:3 T:   06-JAN-1980 00:00
 ---- K:3 Z:   5
 5   / 3:  2778.  3778.  4778.
 7   / 4:  2878.  3878.  4878.
 9   / 5:  2978.  3978.  4978.
 ---- K:4 Z:   7
 5   / 3:  2788.  3788.  4788.
 7   / 4:  2888.  3888.  4888.
 9   / 5:  2988.  3988.  4988.
 ---- K:5 Z:   9
 5   / 3:  2798.  3798.  4798.
 7   / 4:  2898.  3898.  4898.
 9   / 5:  2998.  3998.  4998.
 ---- L:4 T:   08-JAN-1980 00:00
 ---- K:3 Z:   5
 5   / 3:  2778.  3778.  4778.
 7   / 4:  2878.  3878.  4878.
 9   / 5:  2978.  3978.  4978.
 ---- K:4 Z:   7
 5   / 3:  2788.  3788.  4788.
 7   / 4:  2888.  3888.  4888.
 9   / 5:  2988.  3988.  4988.
 ---- K:5 Z:   9
 5   / 3:  2798.  3798.  4798.
 7   / 4:  2898.  3898.  4898.
 9   / 5:  2998.  3998.  4998.
 ---- L:5 T:   10-JAN-1980 00:00
 ---- K:3 Z:   5
 5   / 3:  2780.  3780.  4780.
 7   / 4:  2880.  3880.  4880.
 9   / 5:  2980.  3980.  4980.
 ---- K:4 Z:   7
 5   / 3:  2790.  3790.  4790.
 7   / 4:  2890.  3890.  4890.
 9   / 5:  2990.  3990.  4990.
 ---- K:5 Z:   9
 5   / 3:  2800.  3800.  4800.
 7   / 4:  2900.  3900.  4900.
 9   / 5:  3000.  4000.  5000.
stat veven
 
             1000*I[G=EVEN] + 100*J[G=EVEN] + 10*K[G=EVEN] + L[G=EVEN]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2222
 Maximum value: 4444
 Mean    value: 3333 (unweighted average)
 Standard deviation: 825.72
 
! first all from one memory variable
load/x=1:11/y=1:11/z=1:11/t=1:11 veven
stat v1234[g=even]-veven, v1234
 
             V1234[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G00ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z: 4.01 to 8.99
             TIME: 05-JAN-1980 00:14 to 09-JAN-1980 23:45
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*3*3*1*1)
 # flagged as bad  data: 0
 Minimum value: 2777.5
 Maximum value: 4999.5
 Mean    value: 3888.5 (unweighted average)
 Standard deviation: 825.72
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
! regrid_transforms
use gtsa056_1
use gtsa056_2
set mode diag
 
define axis/t=15-jan-1982:15-mar-1984:120/unit=hour tax5day
define axis/x=120e:60w:10/unit=degrees xax10
define grid/like=u/t=tax5day g5dayg5dayg5dayg5dayg5dayg5dayg5dayg5dayg5dayg5day
 getgrid EX#1     C:  7 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
define grid/like=u/x=xax10/z=w/t=tax5day g5_10g00abcdefghijklmnopqrstuvwxyz1234567890
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 getgrid EX#1     C:  8 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 getgrid EX#1     C:  9 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DW11         PSXT      PSYT      PSZW      TIME1
 
set reg/x=130w:125w/y=0:1.5/z=0:15/t=21-JAN-1982:24-jan-1982
!set reg/i=101:105/j=41:42/k=1:2/l=3:4
 
use gtsa056_1    	!kob 4/99
 
LIST temp[g=g5_10g00abcdefghijklmnopqrstuvwxyz1234567890@ave]
 dealloc  dynamic grid PS3DW11         PSXT      PSYT      PSZW      TIME1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10G00ABCDEFGH @AAV
 strip regrid on Z: TEMP --> XNTERMED         @AVE
 strip regrid on T: TEMP --> ZNTERMED         @AVE
 reading TEMP     M:  6 dset:   1 I:     95    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M:  5 dset:   1 I:     95    106  J:   45   50  K:    1    2  L:      2      3
 regrid  TEMP     M:  2 dset:   1 I:     95    106  J:   45   50  K:    1    1  L:      2      3
 -DELETE TEMP     M:  5 dset:   1 I:     95    106  J:   45   50  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid XY
 regrid  TEMP     M:  5 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M:  2 dset:   1 I:     95    106  J:   45   50  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5_10G00ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 on X@AAV, on Y@AAV,
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 2 points (LATITUDE-TIME)
             LONGITUDE: 130W
             DEPTH (m): 10
                       0      0.33N  0.67N  1N     1.33N 
                       45     46     47     48     49
 20-JAN-1982 00 / 2:  23.88  23.97  24.15  24.37  24.63
 25-JAN-1982 00 / 3:  23.89  23.98  24.17  24.40  24.65
LIST temp[g=g5_10g00abcdefghijklmnopqrstuvwxyz1234567890,gx=g5_10g00abcdefghijklmnopqrstuvwxyz1234567890@ave]
 dealloc  dynamic grid G5_10G00ABCDEFGHXAX10     PSYU      PSZW      TAX5DAY
 -DELETE TEMP     M:  5 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10G00ABCDEFGH @AVE
 strip regrid on Y: TEMP --> XNTERMED         @LIN
 strip regrid on Z: TEMP --> YNTERMED         @LIN
 strip regrid on T: TEMP --> ZNTERMED         @LIN
 found   TEMP     M:  6 dset:   1 I:     95    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M:  5 dset:   1 I:     95    106  J:   45   50  K:    1    2  L:      2      3
 regrid  TEMP     M:  2 dset:   1 I:     95    106  J:   45   50  K:    1    1  L:      2      3
 -DELETE TEMP     M:  5 dset:   1 I:     95    106  J:   45   50  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M:  5 dset:   1 I:     95    106  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M:  2 dset:   1 I:     95    106  J:   45   50  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
 regrid  TEMP     M:  2 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M:  5 dset:   1 I:     95    106  J:   45   49  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5_10G00ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 on X@AVE, on Y@LIN,
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 2 points (LATITUDE-TIME)
             LONGITUDE: 130W
             DEPTH (m): 10
                       0      0.33N  0.67N  1N     1.33N 
                       45     46     47     48     49
 20-JAN-1982 00 / 2:  23.88  23.98  24.15  24.38  24.63
 25-JAN-1982 00 / 3:  23.88  23.97  24.15  24.39  24.64
 
LIST temp[g=g5_10g00abcdefghijklmnopqrstuvwxyz1234567890,gt=g5_10g00abcdefghijklmnopqrstuvwxyz1234567890@asn]
 dealloc  dynamic grid G5_10G00ABCDEFGHXAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 strip regrid on X: TEMP --> G5_10G00ABCDEFGH @LIN
 strip regrid on Z: TEMP --> XNTERMED         @LIN
 strip regrid on T: TEMP --> ZNTERMED         @ASN
 found   TEMP     M:  6 dset:   1 I:     95    106  J:   45   50  K:    1    2  L:      2      5
 regrid  TEMP     M:  5 dset:   1 I:    100    101  J:   45   50  K:    1    2  L:      2      3
 regrid  TEMP     M:  1 dset:   1 I:    100    101  J:   45   50  K:    1    1  L:      2      3
 -DELETE TEMP     M:  5 dset:   1 I:    100    101  J:   45   50  K:    1    2  L:      2      3  M: -999 -999  N: -999 -999
 regrid XY
 regrid  TEMP     M:  5 dset:   1 I:     12     12  J:   45   49  K:    1    1  L:      2      3
 -DELETE TEMP     M:  1 dset:   1 I:    100    101  J:   45   50  K:    1    1  L:      2      3  M: -999 -999  N: -999 -999
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5_10G00ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 on X@LIN, on Y@LIN,
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 by 2 points (LATITUDE-TIME)
             LONGITUDE: 130W
             DEPTH (m): 10
                       0      0.33N  0.67N  1N     1.33N 
                       45     46     47     48     49
 20-JAN-1982 00 / 2:  23.75  23.76  23.87  24.04  24.25
 25-JAN-1982 00 / 3:  23.74  23.73  23.82  23.97  24.15
 
! T axis
use gtsa056_2	!kob  4/99
set region/x=180W/y=0/z=5/t=21-JAN-1982:13-JUN-1983
load temp[i=50:51,j=45:56,k=1:2,l=1:172]  ! preload to save time
 dealloc  dynamic grid G5_10G00ABCDEFGHXAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DT1          PSXT      PSYT      PSZT      TIME1
 eval    EX#1     C:  4 dset:   2 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 strip moduloing TEMP on T axis:        1      172 dset:   2
 reading TEMP     M:  1 dset:   2 I:     50     51  J:   45   50  K:    1    2  L:      1    168
 doing moduloing TEMP on T axis:        1      168 dset:   2
plot temp
 dealloc  dynamic grid PS3DT1          PSXT      PSYT      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DT1          PSXT      PSYT      PSZT      TIME1
 eval    EX#1     C:  4 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      3    170
 found   TEMP     M:  7 dset:   2 I:     50     51  J:   45   50  K:    1    2  L:      1    172
setting up plot
PPL plot 1    complete
plot/over temp[g=u]
 dealloc  dynamic grid PS3DT1          PSXT      PSYT      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 eval    EX#1     C:  4 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      3    170
 strip moduloing TEMP on T axis:        3      170 dset:   2
 strip regrid on X: TEMP --> PS3DU1           @LIN
 found   TEMP     M:  7 dset:   2 I:     50     51  J:   45   50  K:    1    2  L:      1    172
 regrid XY
 regrid  TEMP     M:  3 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      3    168
 doing moduloing TEMP on T axis:        3      168 dset:   2
 strip regrid on X: TEMP --> PS3DU1           @LIN
 found   TEMP     M:  7 dset:   2 I:     50     51  J:   45   50  K:    1    2  L:      1    172
 regrid XY
 regrid  TEMP     M:  8 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      1      2
 doing moduloing TEMP on T axis:        1        2 dset:   2
setting up plot
PPL plot 2    complete
plot/over temp[g=g5dayg5dayg5dayg5dayg5dayg5dayg5dayg5dayg5dayg5day]
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      2    104
 strip regrid on X: TEMP --> G5DAYG5DAYG5DAYG @LIN
 strip regrid on T: TEMP --> XNTERMED         @LIN
 found   TEMP     M:  7 dset:   2 I:     50     51  J:   45   50  K:    1    2  L:      1    172
 regrid  TEMP     M:  4 dset:   2 I:     50     51  J:   45   46  K:    1    1  L:      2    104
 regrid XY
 regrid  TEMP     M:  9 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      2    104
 -DELETE TEMP     M:  4 dset:   2 I:     50     51  J:   45   46  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
setting up plot
PPL plot 3    complete
plot/over temp[g=g5_10g00abcdefghijklmnopqrstuvwxyz1234567890]
 dealloc  dynamic grid G5DAYG5DAYG5DAYGPSXU      PSYU      PSZT      TAX5DAY
 -DELETE TEMP     M:  9 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      2    104
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   2 I:      7      7  J:   45   45  K:    1    1  L:      2    104
 strip regrid on X: TEMP --> G5_10G00ABCDEFGH @LIN
 strip regrid on Z: TEMP --> XNTERMED         @LIN
 strip regrid on T: TEMP --> ZNTERMED         @LIN
 found   TEMP     M:  7 dset:   2 I:     50     51  J:   45   50  K:    1    2  L:      1    172
 regrid  TEMP     M:  9 dset:   2 I:     50     51  J:   45   46  K:    1    2  L:      2    104
 regrid  TEMP     M:  4 dset:   2 I:     50     51  J:   45   46  K:    1    1  L:      2    104
 -DELETE TEMP     M:  9 dset:   2 I:     50     51  J:   45   46  K:    1    2  L:      2    104  M: -999 -999  N: -999 -999
 regrid XY
 regrid  TEMP     M:  9 dset:   2 I:      7      7  J:   45   45  K:    1    1  L:      2    104
 -DELETE TEMP     M:  4 dset:   2 I:     50     51  J:   45   46  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
setting up plot
PPL plot 4    complete
plot/over temp[g=u@ave]
 dealloc  dynamic grid G5_10G00ABCDEFGHXAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 eval    EX#1     C:  4 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      3    170
 strip moduloing TEMP on T axis:        3      170 dset:   2
 strip regrid on X: TEMP --> PS3DU1           @AAV
 found   TEMP     M:  7 dset:   2 I:     50     51  J:   45   50  K:    1    2  L:      1    172
 regrid XY
 regrid  TEMP     M:  4 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      3    168
 doing moduloing TEMP on T axis:        3      168 dset:   2
 strip regrid on X: TEMP --> PS3DU1           @AAV
 found   TEMP     M:  7 dset:   2 I:     50     51  J:   45   50  K:    1    2  L:      1    172
 regrid XY
 regrid  TEMP     M: 12 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      1      2
 doing moduloing TEMP on T axis:        1        2 dset:   2
setting up plot
PPL plot 5    complete
plot/over temp[g=g5dayg5dayg5dayg5dayg5dayg5dayg5dayg5dayg5dayg5day@ave]
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      2    104
 strip regrid on X: TEMP --> G5DAYG5DAYG5DAYG @AAV
 strip regrid on T: TEMP --> XNTERMED         @AVE
 found   TEMP     M:  7 dset:   2 I:     50     51  J:   45   50  K:    1    2  L:      1    172
 regrid  TEMP     M: 13 dset:   2 I:     50     51  J:   45   46  K:    1    1  L:      2    104
 regrid XY
 regrid  TEMP     M: 14 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      2    104
 -DELETE TEMP     M: 13 dset:   2 I:     50     51  J:   45   46  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
setting up plot
PPL plot 6    complete
plot/over temp[g=g5_10g00abcdefghijklmnopqrstuvwxyz1234567890@ave]
 dealloc  dynamic grid G5DAYG5DAYG5DAYGPSXU      PSYU      PSZT      TAX5DAY
 -DELETE TEMP     M: 14 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      2    104
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   2 I:      7      7  J:   45   45  K:    1    1  L:      2    104
 strip regrid on X: TEMP --> G5_10G00ABCDEFGH @AAV
 strip regrid on Z: TEMP --> XNTERMED         @AVE
 strip regrid on T: TEMP --> ZNTERMED         @AVE
 strip moduloing TEMP on T axis:        2      171 dset:   2
 reading TEMP     M: 14 dset:   2 I:     45     56  J:   45   46  K:    1    2  L:      1    168
 doing moduloing TEMP on T axis:        1      168 dset:   2
 regrid  TEMP     M: 15 dset:   2 I:     45     56  J:   45   46  K:    1    2  L:      2    104
 regrid  TEMP     M: 16 dset:   2 I:     45     56  J:   45   46  K:    1    1  L:      2    104
 -DELETE TEMP     M: 15 dset:   2 I:     45     56  J:   45   46  K:    1    2  L:      2    104  M: -999 -999  N: -999 -999
 regrid XY
 regrid  TEMP     M: 15 dset:   2 I:      7      7  J:   45   45  K:    1    1  L:      2    104
 -DELETE TEMP     M: 16 dset:   2 I:     45     56  J:   45   46  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
setting up plot
PPL plot 7    complete
plot/over temp[g=u@asn]
 dealloc  dynamic grid G5_10G00ABCDEFGHXAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 eval    EX#1     C:  4 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      3    170
 strip moduloing TEMP on T axis:        3      170 dset:   2
 strip regrid on X: TEMP --> PS3DU1           @ASN
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 found   TEMP     M: 13 dset:   2 I:     45     56  J:   45   46  K:    1    2  L:      2    171
 regrid  TEMP     M: 16 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      3    168
 regrid  TEMP     M: 17 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      3    168
 -DELETE TEMP     M: 16 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      3    168  M: -999 -999  N: -999 -999
 doing moduloing TEMP on T axis:        3      168 dset:   2
 strip regrid on X: TEMP --> PS3DU1           @ASN
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 found   TEMP     M: 14 dset:   2 I:     45     56  J:   45   46  K:    1    2  L:      1    168
 regrid  TEMP     M: 18 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      1      2
 regrid  TEMP     M: 19 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      1      2
 -DELETE TEMP     M: 18 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      1      2  M: -999 -999  N: -999 -999
 doing moduloing TEMP on T axis:        1        2 dset:   2
setting up plot
PPL plot 8    complete
plot/over temp[g=g5_10g00abcdefghijklmnopqrstuvwxyz1234567890@asn]
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   2 I:      7      7  J:   45   45  K:    1    1  L:      2    104
 strip regrid on X: TEMP --> G5_10G00ABCDEFGH @ASN
 strip regrid on Y: TEMP --> XNTERMED         @ASN
 strip regrid on Z: TEMP --> YNTERMED         @ASN
 strip regrid on T: TEMP --> ZNTERMED         @ASN
 reading TEMP     M: 18 dset:   2 I:      7      7  J:   45   45  K:    1    1  L:      2    104
 regrid  TEMP     M: 20 dset:   2 I:      7      7  J:   45   45  K:    1    1  L:      2    104
 regrid  TEMP     M: 21 dset:   2 I:      7      7  J:   45   45  K:    1    1  L:      2    104
 -DELETE TEMP     M: 20 dset:   2 I:      7      7  J:   45   45  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 20 dset:   2 I:      7      7  J:   45   45  K:    1    1  L:      2    104
 -DELETE TEMP     M: 21 dset:   2 I:      7      7  J:   45   45  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
 regrid  TEMP     M: 21 dset:   2 I:      7      7  J:   45   45  K:    1    1  L:      2    104
 -DELETE TEMP     M: 20 dset:   2 I:      7      7  J:   45   45  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
setting up plot
PPL plot 9    complete
plot/over temp[g=u,gt=u@ave]
 dealloc  dynamic grid G5_10G00ABCDEFGHXAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 eval    EX#1     C:  4 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      3    170
 allocate dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 found   TEMP     M: 10 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      3    170
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
setting up plot
PPL plot 10   complete
plot/over temp[g=g5dayg5dayg5dayg5dayg5dayg5dayg5dayg5dayg5dayg5day,gt=g5dayg5dayg5dayg5dayg5dayg5dayg5dayg5dayg5dayg5day@ave]
 dealloc  dynamic grid PS3DU1          PSXU      PSYU      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      2    104
 strip regrid on X: TEMP --> G5DAYG5DAYG5DAYG @LIN
 strip regrid on T: TEMP --> XNTERMED         @AVE
 found   TEMP     M: 13 dset:   2 I:     45     56  J:   45   46  K:    1    2  L:      2    171
 regrid  TEMP     M: 20 dset:   2 I:     50     51  J:   45   46  K:    1    1  L:      2    104
 regrid XY
 regrid  TEMP     M: 22 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      2    104
 -DELETE TEMP     M: 20 dset:   2 I:     50     51  J:   45   46  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
setting up plot
PPL plot 11   complete
plot/over temp[g=g5_10g00abcdefghijklmnopqrstuvwxyz1234567890,gt=g5_10g00abcdefghijklmnopqrstuvwxyz1234567890@ave]
 dealloc  dynamic grid G5DAYG5DAYG5DAYGPSXU      PSYU      PSZT      TAX5DAY
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   2 I:      7      7  J:   45   45  K:    1    1  L:      2    104
 strip regrid on X: TEMP --> G5_10G00ABCDEFGH @LIN
 strip regrid on Z: TEMP --> XNTERMED         @LIN
 strip regrid on T: TEMP --> ZNTERMED         @AVE
 found   TEMP     M: 13 dset:   2 I:     45     56  J:   45   46  K:    1    2  L:      2    171
 regrid  TEMP     M: 20 dset:   2 I:     50     51  J:   45   46  K:    1    2  L:      2    104
 regrid  TEMP     M: 23 dset:   2 I:     50     51  J:   45   46  K:    1    1  L:      2    104
 -DELETE TEMP     M: 20 dset:   2 I:     50     51  J:   45   46  K:    1    2  L:      2    104  M: -999 -999  N: -999 -999
 regrid XY
 regrid  TEMP     M: 20 dset:   2 I:      7      7  J:   45   45  K:    1    1  L:      2    104
 -DELETE TEMP     M: 23 dset:   2 I:     50     51  J:   45   46  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
setting up plot
PPL plot 12   complete
plot/over temp[g=g5dayg5dayg5dayg5dayg5dayg5dayg5dayg5dayg5dayg5day,gt=g5dayg5dayg5dayg5dayg5dayg5dayg5dayg5dayg5dayg5day@asn]  ! invalid interpretation of data
 dealloc  dynamic grid G5_10G00ABCDEFGHXAX10     PSYU      PSZW      TAX5DAY
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      2    104
 strip regrid on X: TEMP --> G5DAYG5DAYG5DAYG @LIN
 strip regrid on T: TEMP --> XNTERMED         @ASN
 found   TEMP     M: 13 dset:   2 I:     45     56  J:   45   46  K:    1    2  L:      2    171
 regrid  TEMP     M: 23 dset:   2 I:     50     51  J:   45   46  K:    1    1  L:      2    104
 regrid XY
 regrid  TEMP     M: 24 dset:   2 I:     50     50  J:   45   45  K:    1    1  L:      2    104
 -DELETE TEMP     M: 23 dset:   2 I:     50     51  J:   45   46  K:    1    1  L:      2    104  M: -999 -999  N: -999 -999
setting up plot
PPL plot 13   complete
 
 
set mode/last diag
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
! regrid_to_user
 
use coads_climatology
use levitus_climatology
 
! define test objects
let a = sst[d=coads_climatology] + 1
let b = sst + 1		! data set unspecified
DEFINE AXIS/Y=20s:20n:.5/units=degrees yax
DEFINE GRID/like=sst[d=coads_climatology]/y=yax gg12345678901234567890
 
! reference data
list/x=158e:161e/y=6s:4s temp[d=2,k=1]
             VARIABLE : TEMPERATURE (DEG C)
             FILENAME : levitus_climatology.cdf
             SUBSET   : 3 by 2 points (LONGITUDE-LATITUDE)
             DEPTH (m): 0
             158.5E 159.5E 160.5E 
             139    140    141
 4.5S / 86:  29.51  29.44  29.38
 5.5S / 85:  29.59  29.53  29.46
 
! basic regrid (implicit grid -- sst and temp geometries are mismatched)
list/x=160e/y=5s temp[d=2,k=1,g=a[d=1]]
             VARIABLE : TEMPERATURE (DEG C)
                        regrid: 2 deg on X, 2 deg on Y
             FILENAME : levitus_climatology.cdf
             LONGITUDE: 159E
             LATITUDE : 5S
             DEPTH (m): 0
          29.52
show grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 ZAXLEVITR1_1 DEPTH (m)         1 r-  0                    0                   1 pt
 normal    T
 
! per axis regrid
! 5/01 note: changed from y=0 yo y=5s to accomodate Y-truncated
! levitus_climatology.cdf
list/x=160e/y=5s temp[d=2,k=1,gx=a[d=1],gy=yax]
             VARIABLE : TEMPERATURE (DEG C)
                        regrid: 2 deg on X, 0.5 deg on Y
             FILENAME : levitus_climatology.cdf
             LONGITUDE: 159E
             LATITUDE : 5S
             DEPTH (m): 0
          29.52
list/x=160e/y=5s temp[d=2,k=1,gy=yax,gx=a[d=1]]
             VARIABLE : TEMPERATURE (DEG C)
                        regrid: 2 deg on X, 0.5 deg on Y
             FILENAME : levitus_climatology.cdf
             LONGITUDE: 159E
             LATITUDE : 5S
             DEPTH (m): 0
          29.52
show grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 YAX       LATITUDE            81 r   20S                  20N                 full
 ZAXLEVITR1_1 DEPTH (m)         1 r-  0                    0                   1 pt
 normal    T
 
! combined full grid and per-axis
list/x=160e/y=5s temp[d=2,k=1,g=gg12345678901234567890,gx=a[d=1]]
             VARIABLE : TEMPERATURE (DEG C)
                        regrid: 2 deg on X, 0.5 deg on Y
             FILENAME : levitus_climatology.cdf
             LONGITUDE: 159E
             LATITUDE : 5S
             DEPTH (m): 0
          29.52
list/x=160e/y=5s temp[d=2,k=1,gx=a[d=1],g=gg12345678901234567890]
             VARIABLE : TEMPERATURE (DEG C)
                        regrid: 2 deg on X, 0.5 deg on Y
             FILENAME : levitus_climatology.cdf
             LONGITUDE: 159E
             LATITUDE : 5S
             DEPTH (m): 0
          29.52
show grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 YAX       LATITUDE            81 r   20S                  20N                 full
 ZAXLEVITR1_1 DEPTH (m)         1 r-  0                    0                   1 pt
 normal    T
 
! pseudo-variable access
list/i=1:4 i[g=a]		! a is previously loaded
             VARIABLE : I
                        axis COADSX
             SUBSET   : 4 points (LONGITUDE)
 21E   / 1:  1.000
 23E   / 2:  2.000
 25E   / 3:  3.000
 27E   / 4:  4.000
let c = a
list/i=1:4 i[g=c]		! c is not previously loaded
             VARIABLE : I
                        axis COADSX
             SUBSET   : 4 points (LONGITUDE)
 21E   / 1:  1.000
 23E   / 2:  2.000
 25E   / 3:  3.000
 27E   / 4:  4.000
let d = c
list/i=1:4 x[gx=d]
             VARIABLE : X
                        axis COADSX
             SUBSET   : 4 points (LONGITUDE)
 21E   / 1:  21.00
 23E   / 2:  23.00
 25E   / 3:  25.00
 27E   / 4:  27.00
 
! DEFINE GRID based on a user-defined variable
let e = d
DEFINE GRID/LIKE=e/x=temp[d=levitus_climatology] gg123456789012345678901
show grid gg123456789012345678901
    GRID GG123456789012345678901
 name       axis              # pts   start                end
 XAXLEVITR1_160 LONGITUDE     160mr   20.5E                179.5E
 COADSY    LATITUDE            90 r   89S                  89N
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58
let f = sst[y=20s:20n:.1,d=coads_climatology]
DEFINE GRID/LIKE=f/x=temp[d=levitus_climatology] gg123456789012345678902
cancel variable f
show grid gg123456789012345678902
    GRID GG123456789012345678902
 name       axis              # pts   start                end
 XAXLEVITR1_160 LONGITUDE     160mr   20.5E                179.5E
 (AX###)   LATITUDE           401 r   20S                  20N
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58
show grid/dynamic
Dynamic grids:
    no implicit grids
Dynamic axes:
    AXIS (AX###)                         use count:   1
 
! demonstrate proper management of dynamic axes
DEFINE GRID/LIKE=gg123456789012345678902 gg123456789012345678903
show grid/dynamic
Dynamic grids:
    no implicit grids
Dynamic axes:
    AXIS (AX###)                         use count:   2
DEFINE GRID/like=temp[d=levitus_climatology] gg123456789012345678902
show grid gg123456789012345678902
    GRID GG123456789012345678902
 name       axis              # pts   start                end
 XAXLEVITR1_160 LONGITUDE     160mr   20.5E                179.5E
 YAXLEVITR1_90 LATITUDE        90 r   89.5S                0.5S
 ZAXLEVITR1_1 DEPTH (m)         1 r-  0                    0
 normal    T
show grid/dynamic
Dynamic grids:
    no implicit grids
Dynamic axes:
    AXIS (AX###)                         use count:   1
 
! SET GRID using a user-defined variable
let g = sst[x=0:30:.1,d=coads_climatology]
set grid g
show grid
 Default grid for DEFINE VARIABLE is (G###)
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 (AX###)   LONGITUDE          301 r   0E                   30E                 full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
 
! The SET GRID (default) definition should be protected -- not altered
load/d=coads_climatology sst[y=-10:10:.1,l=1,x=160e]
show grid
 Default grid for DEFINE VARIABLE is (G###)
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            1 pt
 (AX###)   LATITUDE           201 r   10S                  10N                 201 pts
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        1 pt
show grid/dynamic
Dynamic grids:
    GRID (G###)                          use count:   1
 name       axis              # pts   start                end
 COADSX    LONGITUDE          180mr   21E                  19E(379)
 (AX###)   LATITUDE           201 r   10S                  10N
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58
 
! deliberate errors
set mode ignore
load/x=160e/y=5s temp[d=2,k=1,g=no_exist12345678901234567890]	! non-existent target variable
 
set mode/last ignore
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
! dynamic grid commands
 
use coads_climatology
use levitus_climatology
 
DEFINE GRID/LIKE="temp[d=2,gx=sst[d=1],y=10s:2s:.2] + 5" mygrid_123456789012345678901234567890
SHOW GRID mygrid_123456789012345678901234567890
    GRID MYGRID_123456789012345678901234567890
 name       axis              # pts   start                end
 COADSX    LONGITUDE          180mr   21E                  19E(379)
 (AX###)   LATITUDE            41 r   10S                  2S
 ZAXLEVITR1_1 DEPTH (m)         1 r-  0                    0
 normal    T
*** Running ferret script: bn_xml_repl.jnl
! bn_xml_repl.jnl
! replace > and < and & with their html equivalents.
 
! make a short file
let/units="meters" myvar = 7
save/clobber/file=a.nc myvar
can var/all
use a.nc
 
set var/title="a title with & and > and < characters" myvar
set var/units="<<" myvar
define att myvar.history = "Adding some ampersands.& & to the history"
sh dat/xml/var
<datasets>
<dataset name="./a.nc" default="true">
<title> </title>
<var name="MYVAR">
<attribute name="units" type="char">
   <value><![CDATA[&lt;&lt;]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[a title with &amp; and &gt; and &lt; characters]]></value>
</attribute>
<attribute name="_FillValue" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<grid name="GSI1">
<axes>
</axes>
</grid>
</var>
</dataset>
</datasets>
<axes>
</axes>
*** Running ferret script: bn65_bug_fixes.jnl
! bn65_bug_fixes.jnl
! Fixes that go into v6.5 release
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err64_very_small_latlon
! err64_very_small_latlon.jnl
! Based on a report and data file from Jean Newman.
 
use err64_small_latlon
 
! crashed because of formats for lon/lat axis labels.
shade bathy
 
! This one uses so many digits it will not be formatted
shade/i=1:10/j=1:10 bathy
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err64_packed_data
! err64_packed_data.jnl
! Test writing packed data. Prior to v6.4 this example shows the
! crash described in bug 1715.
! 4/15/19: Output changes with fix to issue 334: coordinates are not
! regular but have a point_spacing="even" attribute. Ferret now checks
! and overrides this.
 
! ncpdq from NCO operators
! sp ncpdq fine_x_axis.nc err64_packed_data.nc
use err64_packed_data.nc
sh att/all sst
     attributes for dataset: ./data/err64_packed_data.nc
 SST.missing_value = 1.E+20
 SST._FillValue = 1.E+20
 SST.long_name = sea surface temperature [degc] 
 SST.history = From ghrsst_global 
 SST.scale_factor = -1.263447E-04
 SST.add_offset = 27.32
 
! check that the coordinates packed by ncpdq are unpacked ok.
list/i=1:15 sst
             VARIABLE : sea surface temperature [degc]
             FILENAME : err64_packed_data.nc
             SUBSET   : 15 points (LONGITUDE)
             LATITUDE : 0.025S
             Z (count): 1
             TIME     : 01-APR-2006 00:00
                   0S    
                    1
 179.972W  /  1:  27.50
 179.923W  /  2:  27.48
 179.873W  /  3:  27.47
 179.824W  /  4:  27.47
 179.775W  /  5:  27.45
 179.72W   /  6:  27.43
 179.67W   /  7:  27.43
 179.621W  /  8:  27.43
 179.571W  /  9:  27.45
 179.522W  / 10:  27.46
 179.472W  / 11:  27.47
 179.423W  / 12:  27.46
 179.374W  / 13:  27.47
 179.324W  / 14:  27.48
 179.275W  / 15:  27.49
 
! we can write the data out - saving the scaling to re-pack.
set att/output sst.scale_factor
set att/output sst.add_offset
 
! With double-precision Ferret, need to write as float,
! or the FillValue cant be represnted.
 
set var/outtype=float sst
 
save/clobber/file=mypack.nc/i=1:15 sst
can data/all; use mypack.nc
sh att/all sst
     attributes for dataset: ./mypack.nc
 SST.missing_value = 1.E+20
 SST._FillValue = 1.E+20
 SST.long_name = sea surface temperature [degc] 
 SST.history = From ghrsst_global 
 SST.scale_factor = -1.263447E-04
 SST.add_offset = 27.32
 SST.Ferret_Precision_Note = This variable written using Ferret was converted from SHORT to FLOAT 
 
list/i=1:15 sst
             VARIABLE : sea surface temperature [degc]
             FILENAME : mypack.nc
             SUBSET   : 15 points (LONGITUDE)
             LATITUDE : 0.025S
             Z (count): 1
             TIME     : 01-APR-2006 00:00
                   0S    
                    1
 179.972W  /  1:  27.50
 179.923W  /  2:  27.48
 179.873W  /  3:  27.47
 179.824W  /  4:  27.47
 179.775W  /  5:  27.45
 179.72W   /  6:  27.43
 179.67W   /  7:  27.43
 179.621W  /  8:  27.43
 179.571W  /  9:  27.45
 179.522W  / 10:  27.46
 179.472W  / 11:  27.47
 179.423W  / 12:  27.46
 179.374W  / 13:  27.47
 179.324W  / 14:  27.48
 179.275W  / 15:  27.49
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO bn_repl_9999999
! bn_repl_9999999.jnl
! Bug 1717
! Bug on 64-bit ferret, replacing variable var= .9999999
! which should just evaluate to 1. TM_FMT wound up with a
! fortran FORMAT(I0) to write the value to the new command line.
 
let var=0.9999999
def view/xlim=0,`var`/ylim=0,1 view9999999
 !-> def view/xlim=0,0.9999999/ylim=0,1 view9999999
can view view9999999
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err64_shakey_missingdata
! err64_shakey_missingdata.jnl
! starting with v6.2 a polygon plot with all missing data.
! The shakey is just blank, not the requested colors.
!
! was ok ferret_v6193
!        Linux(g77) 2.4.21-32 - 02/18/09
!
! Not   FERRET v6.194
!        Linux(g77) 2.4.21-32 - 03/03/09
!
! This is in fillpol - the fix to bug 1641
 
! Define some data; zpts all missing
let xpts = {3,5,6,7,8,9,10,13,15,16,17,18,19,21,22}
let ypts = {1,2,3,4,5,6, 7, 8, 9, 4, 5, 6, 7, 8, 9}
let zpts = { , , , , , ,  ,  ,  ,  ,  ,  ,  ,  ,  }
 
plot/vs/line xpts,ypts
go polytube polygon/over/key/lev=(0,6,1) xpts,ypts,zpts
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err64_return_precision
!err64_return_precision.jnl
! most of these resulted in *** - format too small.
! see bug1611
 
say `.099,p=-1`
 !-> MESSAGE/CONTINUE 0.1
0.1
 
say `.99,p=-1`
 !-> MESSAGE/CONTINUE 1.0
1.0
 
say `9.99,p=-1`
 !-> MESSAGE/CONTINUE 10.0
10.0
 
say `99.99,p=-1`
 !-> MESSAGE/CONTINUE 100.0
100.0
 
say `999.99,p=-1`
 !-> MESSAGE/CONTINUE 1000.0
1000.0
 
say `999.999,p=-2`
 !-> MESSAGE/CONTINUE 1000.00
1000.00
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err64_parse_equals
! err64_parse_equals
! Bug1469 (and duplicate 1690)
! Parsing equals sign when it is in a string within
! grave accents.
 
say `"+" EQ " "`
 !-> MESSAGE/CONTINUE 0
0
 
say `"=" EQ "="`
 !-> MESSAGE/CONTINUE 1
1
 
DEFINE SYMBOL my_sym  = `UPCASE("/lev=(0,30,2)")`
 !-> DEFINE SYMBOL my_sym  = /LEV=(0,30,2)
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err64_regrid_noleap
! err64_regrid_noleap.jnl
!
! Bug 1723
! Seen only under 32-bit, exec. built with netcdf4.1 library
 
def ax/t/unit=days/t0=1-jan-0001/cal=noleap/edge tax = \
    {419263, 419293, 419324, 419354, 419385, 419416, \
    419444, 419475, 419505, 419536, 419566, 419597}
def ax/t/unit=days/t0=1-jan-0001/cal=noleap/edge/modulo=365 tax_c = \
    {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}
 
let a = t[gt=tax]
let a_c = t[gt=tax_c]
let b = a_c[gt=a]
list b[t=15-feb-1150]  ! missing??
             VARIABLE : A_C[GT=A]
             TIME     : 15-FEB-1150 00:00 NOLEAP
          419430.
 
list b  ! includes Feb 15 1150, not missing...
             VARIABLE : A_C[GT=A]
             SUBSET   : 11 points (TIME)
             CALENDAR : NOLEAP
 16-SEP-1149 00 /  1:  419278.
 16-OCT-1149 12 /  2:  419308.
 16-NOV-1149 00 /  3:  419339.
 16-DEC-1149 12 /  4:  419370.
 16-JAN-1150 12 /  5:  419400.
 15-FEB-1150 00 /  6:  419430.
 16-MAR-1150 12 /  7:  419460.
 16-APR-1150 00 /  8:  419490.
 16-MAY-1150 12 /  9:  419520.
 16-JUN-1150 00 / 10:  419551.
 16-JUL-1150 12 / 11:  419582.
 
list b[t=15-feb-1150]  ! Now ok??
             VARIABLE : A_C[GT=A]
             TIME     : 15-FEB-1150 00:00 NOLEAP
          419430.
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err64_polymark_over_calendar
! err64_polymark_over_calendar.jnl
! bug1722.  Polymark script failed with calendar mismatch
!           it should not if the overlay time axis is abstract.
!
def ax/t=1-jan-0002:1-jan-0010:1/cal=noleap/unit=year/edges tax
let tval = t[gt=tax]
plot tval
let pos = {`tval[l=4]`,`tval[l=5]`}
 !-> DEFINE VARIABLE pos = {5.5,6.5}
poly/ov/nolab/line=15 pos,pos      ! this works
 
! Here we got an error about mismatched calendars on time axes:
go polymark "poly/ov/nolab/pal=red/line=1" pos pos " " circle .5
 
 
*** Running ferret script: bn_txtype_dmy.jnl
! bn_txtype_dmy.jnl
! 2/2010 ACM
!
! Testing Time Axis plot style "DMY" labels the year
! as well as month or day,month on MON and DAY axes.
! Symbol TXTYPE_SETTING contains YR, MON, DAY after the
! axis type has been set for the axis; lets us plot/set
! and then choose the time axis label style
! Useful when going across years or plotting with /NOLAB
 
set win/asp=1
use gtsa056_2.cdf
 
! Plot the whole series; txtype is YR
plot/x=140w/y=-1/k=1/set temp
sh sym TXTYPE_SETTING
TXTYPE_SETTING = "YR"
if ($TXTYPE_SETTING"0|MON>1|*>0") THEN PPL TXTYPE,MON,DMY
 !-> if 0 THEN PPL TXTYPE,MON,DMY
ppl plot
 
! This will be MON
shade/x=140w/k=1/t=1-feb-1982:15-apr-1982/set temp
sh sym TXTYPE_SETTING
TXTYPE_SETTING = "MON"
if ($TXTYPE_SETTING"0|MON>1|*>0") THEN PPL TXTYPE,MON,DMY
 !-> if 1 THEN PPL TXTYPE,MON,DMY
ppl shade
 
! Also MON so setting not changed.
contour/x=140w/k=1/t=1-feb-1982:15-feb-1982/set temp
sh sym TXTYPE_SETTING
TXTYPE_SETTING = "MON"
if ($TXTYPE_SETTING"0|MON>1|*>0") THEN PPL TXTYPE,MON,DMY
 !-> if 1 THEN PPL TXTYPE,MON,DMY
ppl contour
 
 
! Is DAY so setting not changed.
 
plot/set/x=140w/y=-1/k=1/t=27-feb-1982:2-mar-1982 temp
sh sym TXTYPE_SETTING
TXTYPE_SETTING = "DAY"
if ($TXTYPE_SETTING"0|MON>1|*>0") THEN PPL TXTYPE,MON,DMY
 !-> if 0 THEN PPL TXTYPE,MON,DMY
ppl plot
 
! Set PPL TXTYPE with DAY,DMY
plot/set/x=140w/y=-1/k=1/t=27-feb-1982:2-mar-1982 temp
sh sym TXTYPE_SETTING
TXTYPE_SETTING = "DAY"
if ($TXTYPE_SETTING"0|DAY>1|*>0") THEN PPL TXTYPE,DAY,DMY
 !-> if 1 THEN PPL TXTYPE,DAY,DMY
ppl plot
 
! If the type is going to be EITHER DAY or MON then set
! the style to DMY. Leave the 1st argument blank to keep the
! default
plot/set/x=140w/y=-1/k=1/t=27-feb-1982:28-mar-1982 temp
sh sym TXTYPE_SETTING
TXTYPE_SETTING = "MON"
if ($TXTYPE_SETTING"0|DAY>1|MON>1|*>0") THEN PPL TXTYPE,,DMY
 !-> if 1 THEN PPL TXTYPE,,DMY
ppl plot
 
 
! Same commands with the TIME axis on the vertical
! Plot the whole series; txtype is YR
plot/x=140w/y=-1/k=1/set temp
sh sym TXTYPE_SETTING
TXTYPE_SETTING = "YR"
if ($TXTYPE_SETTING"0|MON>1|*>0") THEN PPL TXTYPE,MON,DMY
 !-> if 0 THEN PPL TXTYPE,MON,DMY
ppl plot
 
! This will be MON
shade/y=-1/k=1/t=1-feb-1982:15-apr-1982/set temp
sh sym TXTYPE_SETTING
TXTYPE_SETTING = "MON"
if ($TXTYPE_SETTING"0|MON>1|*>0") THEN PPL TXTYPE,MON,DMY
 !-> if 1 THEN PPL TXTYPE,MON,DMY
ppl shade
 
! Also MON so setting not changed.
contour/y=-1/k=1/t=1-feb-1982:15-feb-1982/set temp
sh sym TXTYPE_SETTING
TXTYPE_SETTING = "MON"
if ($TXTYPE_SETTING"0|MON>1|*>0") THEN PPL TXTYPE,MON,DMY
 !-> if 1 THEN PPL TXTYPE,MON,DMY
ppl contour
 
 
! Is DAY so setting not changed.
 
plot/set/trans/x=140w/y=-1/k=1/t=27-feb-1982:2-mar-1982 temp
sh sym TXTYPE_SETTING
TXTYPE_SETTING = "DAY"
if ($TXTYPE_SETTING"0|MON>1|*>0") THEN PPL TXTYPE,MON,DMY
 !-> if 0 THEN PPL TXTYPE,MON,DMY
ppl plot
 
! Set PPL TXTYPE with DAY,DMY
plot/set/trans/x=140w/y=-1/k=1/t=27-feb-1982:2-mar-1982 temp
sh sym TXTYPE_SETTING
TXTYPE_SETTING = "DAY"
if ($TXTYPE_SETTING"0|DAY>1|*>0") THEN PPL TXTYPE,DAY,DMY
 !-> if 1 THEN PPL TXTYPE,DAY,DMY
ppl plot
 
! If the type is going to be EITHER DAY or MON then set
! the style to DMY. Leave the 1st argument blank to keep the
! default
plot/set/trans/x=140w/y=-1/k=1/t=27-feb-1982:28-mar-1982 temp
sh sym TXTYPE_SETTING
TXTYPE_SETTING = "MON"
if ($TXTYPE_SETTING"0|DAY>1|MON>1|*>0") THEN PPL TXTYPE,,DMY
 !-> if 1 THEN PPL TXTYPE,,DMY
ppl plot
 
! make sure this setting doesnt persist
plot/y=-1/k=1/t=5-mar-1982:28-mar-1982/x=144w temp
plot/y=-1/k=1/t=5-mar-1982:28-apr-1982/x=144w temp
*** Running ferret script: bn_n_open_dsets_sym.jnl
 !  bn_n_open_dsets_sym.jnl
! Ferret v6.5
! New special symbol N_OPEN_DSETS, evaulated when requested.
! Gives a count of the number of open datasets.
 
! Initially should be zero
sh sym N_OPEN_DSETS
N_OPEN_DSETS = "0"
 
! Open some datasets
use dstitle
use TAO_SST_clim
use clim_airt_lev
 
! Check
sh sym N_OPEN_DSETS
N_OPEN_DSETS = "3"
 
! Open a few more. Any type of data
set data tok_short.des
 
list/clobber/file=list_of_numbers.dat/nohead/norowhead {1,3,4,5,6,8,9}
file/var=v1 list_of_numbers.dat
 
! now  there are five
sh sym N_OPEN_DSETS
N_OPEN_DSETS = "5"
 
! cancel a couple
can data 3
can data TAO_SST_clim
 
! Now three
sh sym N_OPEN_DSETS
N_OPEN_DSETS = "3"
 
can dat/all
sh sym N_OPEN_DSETS
N_OPEN_DSETS = "0"
 
*** Running ferret script: bn_multi_decade.jnl
! bn_multi_decade.jnl
! New default no-small tics for multi-decade plots
! See bug 670
 
def axis/t="01-JAN-1860":"30-DEC-2300":1/edges/units="years"/cal="360d" simutaxis1
let tvar = t[gt=simutaxis1]*-1E+34
 
define view/x=0:1/y=0.000:0.125 v1
define view/x=0:1/y=0.125:0.250 v2
define view/x=0:1/y=0.250:0.375 v3
define view/x=0:1/y=0.375:0.500 v4
define view/x=0:1/y=0.500:0.625 v5
define view/x=0:1/y=0.625:0.750 v6
define view/x=0:1/y=0.750:0.875 v7
define view/x=0:1/y=0.875:1.000 v8
 
! Plot a variety of time axis lengths.
set view v1; plot/nolab/ax=0,1,0,0/vlim=0:1 tvar[t=1-jan-1860:1-jan-1870]
set view v2; plot/nolab/ax=0,1,0,0/vlim=0:1 tvar[t=1-jan-1860:1-jan-1880]
 
! New default: no small tics for multi-decade plots
set view v3; plot/nolab/ax=0,1,0,0/vlim=0:1 tvar[t=1-jan-1860:1-jan-1890]
set view v4; plot/nolab/ax=0,1,0,0/vlim=0:1 tvar[t=1-jan-1860:1-jan-2000]
set view v5; plot/nolab/ax=0,1,0,0/vlim=0:1 tvar[t=1-jan-1860:1-jan-2060]
set view v6; plot/nolab/ax=0,1,0,0/vlim=0:1 tvar[t=1-jan-1860:1-jan-2160]
set view v7; plot/nolab/ax=0,1,0,0/vlim=0:1 tvar
 
! can plot the tics even on a multi-decade axis by specifying PPL TICS.
set view v8; plot/nolab/ax=0,1,0,0/vlim=0:1/set tvar
  ppl tics,0.1,0.25
  ppl plot
 
cancel view
 
! Test vertical time axes.
 
define view/x=0.000:0.125/y=0:1 v1
define view/x=0.125:0.250/y=0:1 v2
define view/x=0.250:0.375/y=0:1 v3
define view/x=0.375:0.500/y=0:1 v4
define view/x=0.500:0.625/y=0:1 v5
define view/x=0.625:0.750/y=0:1 v6
define view/x=0.750:0.875/y=0:1 v7
define view/x=0.875:1.000/y=0:1 v8
 
! Plot a variety of time axis lengths.
set view v1; plot/trans/nolab/ax=0,0,1,0/hlim=0:1 tvar[t=1-jan-1860:1-jan-1870]
set view v2; plot/trans/nolab/ax=0,0,1,0/hlim=0:1 tvar[t=1-jan-1860:1-jan-1880]
 
! New default: no small tics for multi-decade plots
set view v3; plot/trans/nolab/ax=0,0,1,0/hlim=0:1 tvar[t=1-jan-1860:1-jan-1890]
set view v4; plot/trans/nolab/ax=0,0,1,0/hlim=0:1 tvar[t=1-jan-1860:1-jan-2000]
set view v5; plot/trans/nolab/ax=0,0,1,0/hlim=0:1 tvar[t=1-jan-1860:1-jan-2060]
set view v6; plot/trans/nolab/ax=0,0,1,0/hlim=0:1 tvar[t=1-jan-1860:1-jan-2160]
set view v7; plot/trans/nolab/ax=0,0,1,0/hlim=0:1 tvar
 
! can plot the tics even on a multi-decade axis by specifying PPL TICS.
set view v8; plot/trans/nolab/ax=0,0,1,0/hlim=0:1/set tvar
  ppl tics,0.1,0.25
  ppl plot
*** Running ferret script: bn_show_xml_file.jnl
! bn_show_xml_file.jnl
! Testing SHOW DATA/OUTFILE
!         SHOW AXIS/OUTFILE
!         SHOW VAR/OUTFILE
!         SAY/OUTFILE
!
! Similar to LAS iosp script header.jnl
! capability to be expanded to all SHOW commands in the future.
! 5/2012:
! Do this on a dataset with just one variable.
! Dont do show axis/all. Just the axes for one variable is a lot of output.
! Ferret v685, show/data/var/xml includes the output of show axis, so remove that.
 
! create a short file
LET sst = x[x=1:15] + y[y=1:5] + t[gt=month_irreg]
save/clobber/file=b.nc sst
can var/all
 
use b
 
DEFINE SYMBOL output_xml_file = the_xml_file.xml
 
say/quiet/outfile=($output_xml_file)/clobber <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
 !-> MESSAGE/CONTINUE/quiet/outfile=the_xml_file.xml/clobber <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
say/quiet/outfile=($output_xml_file)/append <data>
 !-> MESSAGE/CONTINUE/quiet/outfile=the_xml_file.xml/append <data>
 
show var/xml/append/outfile=($output_xml_file)
 !-> show var/xml/append/outfile=the_xml_file.xml
show data/var/xml/append/outfile=($output_xml_file)
 !-> show data/var/xml/append/outfile=the_xml_file.xml
say/quiet/outfile=($output_xml_file)/append </data>
 !-> MESSAGE/CONTINUE/quiet/outfile=the_xml_file.xml/append </data>
 
! on 32-bit machine the cat command below doesnt show file contents if
! the file is still open. Close it by listing to another file.
list/clobber/file=dummy.dat 1
 
 
! Note with the fix to ticket 883, the ordering of the axis listing is
! different. This is unimportant to using the xml files.
sp cat the_xml_file.xml
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<data>
<datasets>
<dataset name="./b.nc" default="true">
<title> </title>
<var name="SST">
<attribute name="long_name" type="char">
   <value><![CDATA[X[X=1:15] + Y[Y=1:5] + T[GT=MONTH_IRREG]]]></value>
</attribute>
<attribute name="_FillValue" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<grid name="GRR1">
<axes>
<xaxis>XAX1_15</xaxis>
<yaxis>YAX1_5</yaxis>
<taxis>MONTH_IRREG</taxis>
</axes>
</grid>
</var>
</dataset>
</datasets>
<axes>
<axis name="MONTH_IRREG">
<attribute name="direction" type="char">
   <value><![CDATA[L]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[DAYS since 0000-01-01 00:00:00]]></value>
</attribute>
<attribute name="length" type="short">
   <value>12</value>
</attribute>
<attribute name="start" type="double">
   <value>0000-01-16 12:00:00</value>
</attribute>
<attribute name="end" type="double">
   <value>0000-12-15 17:49:12</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value>uneven</value>
</attribute>
<attribute name="modulo" type="char">
   <value><![CDATA[yes]]></value>
</attribute>
<attribute name="time_origin" type="char">
   <value><![CDATA[0000-01-01 00:00:00]]></value>
</attribute>
<attribute name="calendar" type="char">
   <value><![CDATA[GREGORIAN]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="axis" type="char">
   <value><![CDATA[T]]></value>
</attribute>
<attribute name="standard_name" type="char">
   <value><![CDATA[time]]></value>
</attribute>
<attribute name="bounds" type="char">
   <value><![CDATA[MONTH_IRREG_bnds]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[MONTH_IRREG]]></value>
</attribute>
</axis>
<axis name="XAX1_15">
<attribute name="direction" type="char">
   <value><![CDATA[I]]></value>
</attribute>
<attribute name="length" type="short">
   <value>15</value>
</attribute>
<attribute name="start" type="double">
   <value>1</value>
</attribute>
<attribute name="end" type="double">
   <value>15</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="axis" type="char">
   <value><![CDATA[X]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[XAX1_15]]></value>
</attribute>
</axis>
<axis name="YAX1_5">
<attribute name="direction" type="char">
   <value><![CDATA[J]]></value>
</attribute>
<attribute name="length" type="short">
   <value>5</value>
</attribute>
<attribute name="start" type="double">
   <value>1</value>
</attribute>
<attribute name="end" type="double">
   <value>5</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="axis" type="char">
   <value><![CDATA[Y]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[YAX1_5]]></value>
</attribute>
</axis>
</axes>
</data>
 
*** Running ferret script: bn66_bug_fixes.jnl
! bn66_bug_fixes.jnl
! Fixes that go into v6.6 release
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err65_averages.jnl
 
use gt4d011
set region/z=0:90/y=-3.5:3.5
stat temp[x=@ave,t=@ave]
 
             TEMPERATURE
             LONGITUDE: 140W to 122W (XT ave)
             LATITUDE: 3.5S to 3.5N
             DEPTH (m): 0 to 90
             TIME: 14-AUG-1982 11:00 to 13-JAN-1983 13:00 (XT ave)
             E:  N/A
             F:  N/A
             DATA SET: ./data/gt4d011.cdf
 
 Total # of data points: 198 (1*22*9*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 24.279
 Maximum value: 31.248
 Mean    value: 28.047 (unweighted average)
 Standard deviation: 1.7502
 
stat temp[x=@ave,z=@ave]
 
             TEMPERATURE
             LONGITUDE: 140W to 122W (XZ ave)
             LATITUDE: 3.5S to 3.5N
             DEPTH (m): 0 to 90 (XZ ave)
             TIME: 14-AUG-1982 11:00 to 13-JAN-1983 13:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/gt4d011.cdf
 
 Total # of data points: 550 (1*22*1*25*1*1)
 # flagged as bad  data: 0
 Minimum value: 25.194
 Maximum value: 30.027
 Mean    value: 28.047 (unweighted average)
 Standard deviation: 1.1926
 
list temp[x=@ave,z=@ave,t=@ave]
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 22 points (LATITUDE)
             LONGITUDE: 140W to 122W (XZT ave)
             DEPTH (m): 0 to 90 (XZT ave)
             TIME     : 14-AUG-1982 11:00 to 13-JAN-1983 13:00 (XZT ave)
 3.5N  / 56:  27.59
 3.17N / 55:  27.76
 2.83N / 54:  27.90
 2.5N  / 53:  28.00
 2.17N / 52:  28.08
 1.83N / 51:  28.14
 1.5N  / 50:  28.16
 1.17N / 49:  28.16
 0.83N / 48:  28.15
 0.5N  / 47:  28.14
 0.17N / 46:  28.14
 0.17S / 45:  28.15
 0.5S  / 44:  28.18
 0.83S / 43:  28.21
 1.17S / 42:  28.23
 1.5S  / 41:  28.23
 1.83S / 40:  28.22
 2.17S / 39:  28.17
 2.5S  / 38:  28.08
 2.83S / 37:  27.96
 3.17S / 36:  27.80
 3.5S  / 35:  27.61
 
stat temp[z=@ave,t=@ave,y=-2:2]
 
             TEMPERATURE
             LONGITUDE: 140W to 122W
             LATITUDE: 2S to 2N
             DEPTH (m): 0 to 90 (ZT ave)
             TIME: 14-AUG-1982 11:00 to 13-JAN-1983 13:00 (ZT ave)
             E:  N/A
             F:  N/A
             DATA SET: ./data/gt4d011.cdf
 
 Total # of data points: 234 (18*13*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 27.445
 Maximum value: 28.925
 Mean    value: 28.173 (unweighted average)
 Standard deviation: 0.40997
 
cancel region
*** Running ferret script: bn_netcdf4.jnl
! bn_netcdf4.jnl
! test syntax for controling NetCDF-4 intput and output.
! 2/2016 change file name in second intentinal-error case
!        Also list the file sizes for compressed data
 
show nccache
Current NCDF Chunk Cache size 4.19 MB, n_elems = 1009, preemption = 75
 
set nccache/siz=4
 
show nccache
Current NCDF Chunk Cache size 4 MB, n_elems = 1009, preemption = 75
cancel nccache
 
show nccache
Current NCDF Chunk Cache size 4.19 MB, n_elems = 1009, preemption = 75
 
set nccache/siz=8
show nccache
Current NCDF Chunk Cache size 8 MB, n_elems = 1009, preemption = 75
cancel nccache
 
! --------------------------
! Set choice of chunking.
can dat/all; can var/all; can mem/all
 
use coads_climatology
set var/title=deflate_x30_y30 sst
 
save/file=nc4_deflate4.nc/clobber/ncformat=4/deflate=1/xchunk=30/ychunk=30/tchunk=1 sst
 
! With /NCFORMAT=3 the other stuff is meaningless.  Will see NOTEs
save/file=nc4_nodeflate3.nc/clobber/ncformat=3/deflate=1/xchunk=30/ychunk=30/tchunk=1 sst
 
! --------------------------
! Compare choices of chunking.
can var/all; can mem/all
 
set var/title=deflate_x180_y90 sst
save/file=nc4_deflate4bigchunk.nc/clobber/ncformat=4/deflate=1/xchunk=180/ychunk=90/tchunk=1 sst
 
 
set var/title=undeflated sst
 
save/file=nc4_nodeflate3.nc/clobber/ncformat=3 sst
 
save/file=nc4_deflate4_xyt.nc/clobber/ncformat=4/deflate/shuffle/tchunk=2/xchunk=30/ychunk=20  sst
save/file=nc4_deflate4_defaultchunk.nc/clobber/ncformat=4/deflate/shuffle sst
 
! get the file sizes
! Note that small changes in file size may be caused by differences in the global
! history attribute; e.g. changing the Ferret version name from v6.97 to v7
 
sp stat nc4_nodeflate3.nc --printf="Bytes: %s\n"
Bytes: 197508
sp stat nc4_deflate4bigchunk.nc --printf="Bytes: %s\n"
Bytes: 125602
sp stat nc4_deflate4_xyt.nc --printf="Bytes: %s\n"
Bytes: 125216
sp stat nc4_deflate4_defaultchunk.nc --printf="Bytes: %s\n"
Bytes: 119281
 
! Write variable as INT
CAN DAT/all; can var/all; can mem/all
use levitus_climatology
SET VAR/OUTTYPE=int/BAD=-99999 temp
save/clobber/ncformat=classic/file=nc4_inttemp_classic.nc temp
 
set list/ncformat=4/deflate=1/xchunk=10/ychunk=10/zchunk=1
save/clobber/file=nc4_inttemp_set_list_deflate_chunk.nc temp
 
save/clobber/shuffle=1/file=nc4_inttemp_shuffle_set_list_deflate_chunk.nc temp
 
! get the file sizes
sp stat nc4_inttemp_classic.nc --printf="Bytes: %s\n"
Bytes: 60548
sp stat nc4_inttemp_set_list_deflate_chunk.nc --printf="Bytes: %s\n"
Bytes: 32800
sp stat nc4_inttemp_shuffle_set_list_deflate_chunk.nc --printf="Bytes: %s\n"
Bytes: 33015
 
cancel list/all
set list/ncformat=classic
save/clobber/file=nc4_inttemp_set_classic.nc temp
 
cancel list/all
 
! Check SHOW LIST, and CANCEL LIST
 
set list/xchunk=30/ychunk=20/tchunk=5/zchunk=1/deflate=1/shuffle=0/ncformat=4
sh list/all
        SET LIST/PRECISION =   4
        SET LIST/FORMAT = [Default]
        SET LIST/HEADING is ENABLED
        SET LIST/APPEND is DISABLED
        SET LIST/FILE=AUTO [created by program] ( when LIST/FILE is used )
        SET LIST/OUTTYPE = [Default]
           ----
        NetCDF-4 settings:
        NetCDF file type = NetCDF-4
        Compression (deflate) level set to 1
        XCHUNK size set to 30
        YCHUNK size set to 20
        ZCHUNK size set to 1
        TCHUNK size set to 5
        SHUFFLE set to on
        ENDIAN set to native
 
can list/all
sh list/all
        SET LIST/PRECISION =   4
        SET LIST/FORMAT = [Default]
        SET LIST/HEADING is ENABLED
        SET LIST/APPEND is DISABLED
        SET LIST/FILE=AUTO [created by program] ( when LIST/FILE is used )
        SET LIST/OUTTYPE = [Default]
           ----
        NetCDF-4 settings:
        NetCDF file type = classic
        NetCDF chunk sizes = default
        SHUFFLE set to on
        ENDIAN set to native
 
! Intentional errors:
can dat/all
use coads_climatology
set mode ignore
! If set any chunksizes, must set them all
save/file=nc4_deflate4_t1.nc/clobber/ncformat=4/deflate/shuffle/tchunk=1  sst
 
! Chunk sizes bigger than dim sizes
save/file=nc4_deflate4chunktoobig.nc/clobber/ncformat=4/deflate=1/xchunk=6/ychunk=18/tchunk=15 sst
can mode ignore
 
*** Running ferret script: bn_scat2grid_bin.jnl
! bn_scat2grid_bin.jnl
! Tests of scat2grid_bin and scat2grid_nbin functions.
 
! define some variables (as in bench_gridding)
 
define axis/t=1-jan-2010:30-mar-2010:1/units=days tin
define axis/t=1-jan-2010:30-mar-2010:10/units=days tout
let tt = t[gt=tout,L=1:10]
sh grid tt
    GRID (G###)
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TOUT      TIME                10 r   01-JAN-2010 00:00    01-APR-2010 00:00   10 pts
 
 
define axis/x=0:10:0.05 x10
define axis/y=0:10:0.05 y10
define grid/x=x10/y=y10 g10x10
set grid g10x10
 
let WAVE = SIN(KX*XPTS + KY*YPTS - PHASE) / 3
let PHASE = 0
let KAPPA = 0.4
let KX = 0.4
let KY = 0.7
let FCN1 = SIN(R)/(R+1)
let R = ((XPTS-X0)^2+ 5*(YPTS-Y0)^2)^0.5
let X0 = 3
let Y0 = 8
LET sample_function = fcn1 + wave
set view ul
let xpts = x; let ypts = y
SHADE/title="A field with 200 sample points marked" sample_function
let xpts = 10*randu(i); let ypts = 10*randu(i+2)
set region/i=1:200
plot/vs/over/symbols xpts,ypts
define axis/x=1:10:.5 xax5
define axis/y=1:10:.5 yax5
define axis/x=1:10:.2 xax2
define axis/y=1:10:.2 yax2
set view ll
let sgrid = scat2grid_bin_xy (xpts, ypts, sample_function, x[gx=xax5], y[gy=yax5])
SHADE/TITLE="Bin Gridding (5,5) to 20x20 grid" sgrid
list/x=2:3 sgrid
             VARIABLE : SCAT2GRID_BIN_XY (XPTS, YPTS, SAMPLE_FUNCTION, X[GX=XAX5], Y[GY=YAX5])
             SUBSET   : 3 by 19 points (X-Y)
                2       2.5     3     
                 3       4       5
 1     /  1:    ....    ....    ....
 1.5   /  2:    ....  0.3250    ....
 2     /  3:  0.3365    ....    ....
 2.5   /  4:    ....  0.0915    ....
 3     /  5:    .... -0.0921 -0.1235
 3.5   /  6:    ....    ....    ....
 4     /  7:    ....    ....    ....
 4.5   /  8: -0.1083    .... -0.1934
 5     /  9: -0.2851 -0.2127 -0.2336
 5.5   / 10: -0.4247    .... -0.4259
 6     / 11: -0.4858 -0.4472 -0.3515
 6.5   / 12: -0.2793    .... -0.3158
 7     / 13: -0.1265    ....    ....
 7.5   / 14:    ....    ....  0.4598
 8     / 15:    ....    ....  0.4264
 8.5   / 16:    ....    ....  0.6377
 9     / 17:  0.4793    ....  0.5147
 9.5   / 18:    ....  0.2919    ....
 10    / 19:    ....    ....    ....
 
set view lr
let sgrid = scat2grid_bin_xy(xpts, ypts, sample_function, x[gx=xax2], y[gy=yax2])
SHADE/TITLE="Bin Gridding (1,1) to 100x100" sgrid
list/x=2:3 sgrid
             VARIABLE : SCAT2GRID_BIN_XY(XPTS, YPTS, SAMPLE_FUNCTION, X[GX=XAX2], Y[GY=YAX2])
             SUBSET   : 6 by 46 points (X-Y)
                2       2.2     2.4     2.6     2.8     3     
                 6       7       8       9      10      11
 1     /  1:    ....    ....    ....    ....    ....    ....
 1.2   /  2:    ....    ....    ....    ....    ....    ....
 1.4   /  3:    ....    ....    ....    ....    ....    ....
 1.6   /  4:    ....    ....    ....    ....  0.3250    ....
 1.8   /  5:    ....    ....    ....    ....    ....    ....
 2     /  6:    ....    ....    ....    ....    ....    ....
 2.2   /  7:    ....    ....    ....    ....    ....    ....
 2.4   /  8:    ....    ....    ....    ....    ....    ....
 2.6   /  9:    ....    ....  0.0915    ....    ....    ....
 2.8   / 10:    ....    ....    ....    ....    ....    ....
 3     / 11:    ....    ....    .... -0.0921 -0.1235    ....
 3.2   / 12:    ....    ....    ....    ....    ....    ....
 3.4   / 13:    ....    ....    ....    ....    ....    ....
 3.6   / 14:    ....    ....    ....    ....    ....    ....
 3.8   / 15:    ....    ....    ....    ....    ....    ....
 4     / 16:    ....    ....    ....    ....    ....    ....
 4.2   / 17: -0.1083    ....    ....    ....    ....    ....
 4.4   / 18:    ....    ....    ....    ....    ....    ....
 4.6   / 19:    ....    ....    ....    .... -0.1934    ....
 4.8   / 20:    ....    .... -0.2127    .... -0.2336    ....
 5     / 21:    .... -0.2851    ....    ....    ....    ....
 5.2   / 22:    ....    ....    ....    ....    ....    ....
 5.4   / 23:    ....    ....    ....    ....    ....    ....
 5.6   / 24: -0.4552    ....    ....    .... -0.4259    ....
 5.8   / 25:    .... -0.4810    ....    ....    ....    ....
 6     / 26:    ....    ....    ....    ....    ....    ....
 6.2   / 27:    ....    .... -0.4134    ....    ....    ....
 6.4   / 28:    ....    ....    ....    .... -0.3158    ....
 6.6   / 29: -0.2793    ....    ....    ....    ....    ....
 6.8   / 30:    ....    ....    ....    ....    ....    ....
 7     / 31:    ....    ....    ....    ....    ....    ....
 7.2   / 32:    ....    ....    ....    ....    ....    ....
 7.4   / 33:    ....    ....    ....    ....    ....    ....
 7.6   / 34:    ....    ....    ....    ....    ....    ....
 7.8   / 35:    ....    ....    ....    ....    ....  0.4264
 8     / 36:    ....    ....    ....    ....    ....    ....
 8.2   / 37:    ....    ....    ....    ....    ....    ....
 8.4   / 38:    ....    ....    ....    ....  0.6377    ....
 8.6   / 39:    ....    ....    ....    ....    ....    ....
 8.8   / 40:  0.4703    ....    ....    ....    ....    ....
 9     / 41:    ....  0.4883    ....    ....    ....    ....
 9.2   / 42:    ....    ....    ....    ....    ....    ....
 9.4   / 43:    ....    ....    ....    ....  0.3475    ....
 9.6   / 44:    ....    ....    ....    ....  0.2364    ....
 9.8   / 45:    ....    ....    ....    ....    ....    ....
 10    / 46:    ....    ....    ....    ....    ....    ....
 
! Now the NBIN functios
 
let sgrid = scat2grid_nbin_xy (xpts, ypts, sample_function, x[gx=xax5], y[gy=yax5])
SHADE/TITLE="NBIN Gridding (5,5) to 20x20 grid" sgrid
list/x=2:3 sgrid
             VARIABLE : SCAT2GRID_NBIN_XY (XPTS, YPTS, SAMPLE_FUNCTION, X[GX=XAX5], Y[GY=YAX5])
             SUBSET   : 3 by 19 points (X-Y)
               2      2.5    3     
                3      4      5
 1     /  1:  0.000  0.000  0.000
 1.5   /  2:  0.000  1.000  0.000
 2     /  3:  2.000  0.000  0.000
 2.5   /  4:  0.000  1.000  0.000
 3     /  5:  0.000  1.000  1.000
 3.5   /  6:  0.000  0.000  0.000
 4     /  7:  0.000  0.000  0.000
 4.5   /  8:  1.000  0.000  1.000
 5     /  9:  1.000  1.000  1.000
 5.5   / 10:  2.000  0.000  1.000
 6     / 11:  1.000  2.000  1.000
 6.5   / 12:  1.000  0.000  1.000
 7     / 13:  1.000  0.000  0.000
 7.5   / 14:  0.000  0.000  2.000
 8     / 15:  0.000  0.000  1.000
 8.5   / 16:  0.000  0.000  1.000
 9     / 17:  2.000  0.000  1.000
 9.5   / 18:  0.000  2.000  0.000
 10    / 19:  0.000  0.000  0.000
 
set view lr
let sgrid = scat2grid_nbin_xy(xpts, ypts, sample_function, x[gx=xax2], y[gy=yax2])
SHADE/TITLE="NBIN Gridding (1,1) to 100x100" sgrid
list/x=2:3 sgrid
             VARIABLE : SCAT2GRID_NBIN_XY(XPTS, YPTS, SAMPLE_FUNCTION, X[GX=XAX2], Y[GY=YAX2])
             SUBSET   : 6 by 46 points (X-Y)
               2      2.2    2.4    2.6    2.8    3     
                6      7      8      9     10     11
 1     /  1:  0.000  0.000  0.000  0.000  0.000  0.000
 1.2   /  2:  0.000  0.000  0.000  0.000  0.000  0.000
 1.4   /  3:  0.000  0.000  0.000  0.000  0.000  0.000
 1.6   /  4:  0.000  0.000  0.000  0.000  1.000  0.000
 1.8   /  5:  0.000  0.000  0.000  0.000  0.000  0.000
 2     /  6:  0.000  0.000  0.000  0.000  0.000  0.000
 2.2   /  7:  0.000  0.000  0.000  0.000  0.000  0.000
 2.4   /  8:  0.000  0.000  0.000  0.000  0.000  0.000
 2.6   /  9:  0.000  0.000  1.000  0.000  0.000  0.000
 2.8   / 10:  0.000  0.000  0.000  0.000  0.000  0.000
 3     / 11:  0.000  0.000  0.000  1.000  1.000  0.000
 3.2   / 12:  0.000  0.000  0.000  0.000  0.000  0.000
 3.4   / 13:  0.000  0.000  0.000  0.000  0.000  0.000
 3.6   / 14:  0.000  0.000  0.000  0.000  0.000  0.000
 3.8   / 15:  0.000  0.000  0.000  0.000  0.000  0.000
 4     / 16:  0.000  0.000  0.000  0.000  0.000  0.000
 4.2   / 17:  1.000  0.000  0.000  0.000  0.000  0.000
 4.4   / 18:  0.000  0.000  0.000  0.000  0.000  0.000
 4.6   / 19:  0.000  0.000  0.000  0.000  1.000  0.000
 4.8   / 20:  0.000  0.000  1.000  0.000  1.000  0.000
 5     / 21:  0.000  1.000  0.000  0.000  0.000  0.000
 5.2   / 22:  0.000  0.000  0.000  0.000  0.000  0.000
 5.4   / 23:  0.000  0.000  0.000  0.000  0.000  0.000
 5.6   / 24:  1.000  0.000  0.000  0.000  1.000  0.000
 5.8   / 25:  0.000  1.000  0.000  0.000  0.000  0.000
 6     / 26:  0.000  0.000  0.000  0.000  0.000  0.000
 6.2   / 27:  0.000  0.000  1.000  0.000  0.000  0.000
 6.4   / 28:  0.000  0.000  0.000  0.000  1.000  0.000
 6.6   / 29:  1.000  0.000  0.000  0.000  0.000  0.000
 6.8   / 30:  0.000  0.000  0.000  0.000  0.000  0.000
 7     / 31:  0.000  0.000  0.000  0.000  0.000  0.000
 7.2   / 32:  0.000  0.000  0.000  0.000  0.000  0.000
 7.4   / 33:  0.000  0.000  0.000  0.000  0.000  0.000
 7.6   / 34:  0.000  0.000  0.000  0.000  0.000  0.000
 7.8   / 35:  0.000  0.000  0.000  0.000  0.000  1.000
 8     / 36:  0.000  0.000  0.000  0.000  0.000  0.000
 8.2   / 37:  0.000  0.000  0.000  0.000  0.000  0.000
 8.4   / 38:  0.000  0.000  0.000  0.000  1.000  0.000
 8.6   / 39:  0.000  0.000  0.000  0.000  0.000  0.000
 8.8   / 40:  1.000  0.000  0.000  0.000  0.000  0.000
 9     / 41:  0.000  1.000  0.000  0.000  0.000  0.000
 9.2   / 42:  0.000  0.000  0.000  0.000  0.000  0.000
 9.4   / 43:  0.000  0.000  0.000  0.000  1.000  0.000
 9.6   / 44:  0.000  0.000  0.000  0.000  1.000  0.000
 9.8   / 45:  0.000  0.000  0.000  0.000  0.000  0.000
 10    / 46:  0.000  0.000  0.000  0.000  0.000  0.000
 
 
! Now the XYT functions
 
let tpts = 39798 + 87*RANDU(I)
show grid tt
    GRID (G###)
 name       axis              # pts   start                end                 subset
 X10       X                  201 r   0                    10                  full
 Y10       Y                  201 r   0                    10                  full
 normal    Z
 TOUT      TIME                10 r   01-JAN-2010 00:00    01-APR-2010 00:00   10 pts
 
let sgrid = scat2grid_bin_xyt (xpts, ypts, tpts, sample_function, x[gx=xax5], y[gy=yax5], tt)
SAVE/FILE=a.nc/clobber sgrid
 
 
let ngrid = scat2grid_nbin_xyt (xpts, ypts, tpts, sample_function, x[gx=xax5], y[gy=yax5], tt)
SAVE/FILE=a.nc/append ngrid
 
can var/all
use a.nc
stat sgrid
 
             SCAT2GRID_BIN_XYT (XPTS, YPTS, TPTS, SAMPLE_FUNCTION, X[GX=XAX5], Y[GY=YAX5], TT)
             X: 0.75 to 10.25
             Y: 0.75 to 10.25
             Z:  N/A
             TIME: 27-DEC-2009 00:00 to 06-APR-2010 00:00
             E:  N/A
             F:  N/A
             DATA SET: ./a.nc
 
 Total # of data points: 3610 (19*19*1*10*1*1)
 # flagged as bad  data: 3464
 Minimum value: -0.48583
 Maximum value: 0.63765
 Mean    value: 0.014003 (unweighted average)
 Standard deviation: 0.28222
stat ngrid
 
             SCAT2GRID_NBIN_XYT (XPTS, YPTS, TPTS, SAMPLE_FUNCTION, X[GX=XAX5], Y[GY=YAX5], TT)
             X: 0.75 to 10.25
             Y: 0.75 to 10.25
             Z:  N/A
             TIME: 27-DEC-2009 00:00 to 06-APR-2010 00:00
             E:  N/A
             F:  N/A
             DATA SET: ./a.nc
 
 Total # of data points: 3610 (19*19*1*10*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 3
 Mean    value: 0.047645 (unweighted average)
 Standard deviation: 0.24679
list/x=2:3/L=3 sgrid
             VARIABLE : SCAT2GRID_BIN_XYT (XPTS, YPTS, TPTS, SAMPLE_FUNCTION, X[GX=XAX5], Y[GY=YAX5], TT)
             FILENAME : a.nc
             SUBSET   : 3 by 19 points (X-Y)
             TIME     : 21-JAN-2010 00:00
                2       2.5     3     
                 3       4       5
 1     /  1:    ....    ....    ....
 1.5   /  2:    ....  0.3250    ....
 2     /  3:  0.3365    ....    ....
 2.5   /  4:    ....  0.0915    ....
 3     /  5:    .... -0.0921 -0.1235
 3.5   /  6:    ....    ....    ....
 4     /  7:    ....    ....    ....
 4.5   /  8: -0.1083    .... -0.1934
 5     /  9: -0.2851 -0.2127 -0.2336
 5.5   / 10: -0.4247    .... -0.4259
 6     / 11: -0.4858 -0.4472    ....
 6.5   / 12: -0.2793    .... -0.3158
 7     / 13: -0.1265    ....    ....
 7.5   / 14:    ....    ....    ....
 8     / 15:    ....    ....    ....
 8.5   / 16:    ....    ....  0.6377
 9     / 17:  0.4793    ....    ....
 9.5   / 18:    ....  0.2919    ....
 10    / 19:    ....    ....    ....
list/x=2:3/L=3 ngrid
             VARIABLE : SCAT2GRID_NBIN_XYT (XPTS, YPTS, TPTS, SAMPLE_FUNCTION, X[GX=XAX5], Y[GY=YAX5], TT)
             FILENAME : a.nc
             SUBSET   : 3 by 19 points (X-Y)
             TIME     : 21-JAN-2010 00:00
               2      2.5    3     
                3      4      5
 1     /  1:  0.000  0.000  0.000
 1.5   /  2:  0.000  1.000  0.000
 2     /  3:  2.000  0.000  0.000
 2.5   /  4:  0.000  1.000  0.000
 3     /  5:  0.000  1.000  1.000
 3.5   /  6:  0.000  0.000  0.000
 4     /  7:  0.000  0.000  0.000
 4.5   /  8:  1.000  0.000  1.000
 5     /  9:  1.000  1.000  1.000
 5.5   / 10:  2.000  0.000  1.000
 6     / 11:  1.000  2.000  0.000
 6.5   / 12:  1.000  0.000  1.000
 7     / 13:  1.000  0.000  0.000
 7.5   / 14:  0.000  0.000  0.000
 8     / 15:  0.000  0.000  0.000
 8.5   / 16:  0.000  0.000  1.000
 9     / 17:  2.000  0.000  0.000
 9.5   / 18:  0.000  2.000  0.000
 10    / 19:  0.000  0.000  0.000
 
can mem /all
can var /all
can data /all
set grid abstract
can grid g10x10
 
can axis yax2
can axis xax2
can axis yax5
can axis xax5
can axis y10
can axis x10
can axis tout
can axis tin
 
*** Running ferret script: bn_axis_dir_symbols.jnl
! bn_axis_dir_symbols.jnl
! 5/2010
!
! For LAS:
! SYMBOL AX_HORIZ and AX_VERT identify the direction of
! the plot axes (x, y, z, or t).  Add this for 1D plots
! as well as 2D ones.
 
plot/i=1:10 i; show sym ax*; can sym ax*
AX_HORIZ = "X"
plot/j=1:10 j; show sym ax*; can sym ax*
AX_HORIZ = "Y"
 
use gt4d011
plot/i=100/j=40/L=1 temp; show sym ax*; can sym ax*
AX_VERT = "Z"
 
use coads_climatology
plot/x=180/y=0 sst; show sym ax*; can sym ax*
AX_HORIZ = "T"
plot/x=180/y=0/trans sst; show sym ax*; can sym ax*
AX_VERT = "T"
shade/x=180 sst; show sym ax*; can sym ax*
AX_HORIZ = "T"
AX_VERT = "Y"
*** Running ferret script: bn663_bug_fixes.jnl
! bn663_bug_fixes.jnl
! Fixes that go into v6.63 release
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err65_dots_in_dashes.jnl
! err65_dots_in_dashes.jnl
! Test fix to bug 1396: dots where there should
! be gaps in dashed lines.
! Same test has been added for -gif mode and
! metafile batch mode
 
can view
set mode metafile dashbug.plt
set v ul; plot/dash x[gx=0:20:.5]
set v ur; plot/dash x[gx=0:20:.1]
set v ll; plot/dash x[gx=0:20:.05]
set v lr; plot/dash x[gx=0:20:.01]
frame/file=dashbug.gif
 
cancel mode meta
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err66_all_missing_lev_v.jnl
! err66_all_missing_lev_v.jnl
! Ferret hangs with /LEV=V and all missing data
 
USE coads_climatology
SHADE/L=1/X=60:70/Y=40:50/LEV=v sst
 
FILL/L=2/X=60:70/Y=40:50/LEV=v sst
*** Running ferret script: bn_set_axis_regular.jnl
! bn_set_axis_regular.jnl
! Karl Smith, 5/2010
! tests for SET AXIS /REGULAR
 
! --- create irregular but monotonic data with integer endpoints
set region /i=1:10 /j=1:10
let deltax = if (i gt 1 and i lt 10) then 0.5 * sin((x - 1.0) * 3.14159265 / 2.33333333) else 0.0
let xdata = x + deltax
let deltay = if (j gt 1 and j lt 10) then 0.5 * sin((y - 1.0) * 3.14159265 / 2.33333333) else 0.0
let ydata = y - deltay
 
! --- define axes and grid from this data
define axis /x /from_data /name=myx xdata
define axis /y /from_data /name=myy ydata
define grid /x=myx /y=myy mygrid
set grid mygrid
 
! --- define a variable using this grid; show everything is irregular
let myvar = 2 * x + y
list /format=(F8.5) x
             VARIABLE : X
                        axis MYX
             BAD FLAG : -1.E+34       
             SUBSET   : 10 points (X)
             X        : 0.2563 to 10.7437
 1.00000
 2.48746
 3.21694
 3.60908
 4.60908
 6.21694
 7.48746
 8.00000
 8.51254
10.00000
list /format=(F8.5) y
             VARIABLE : Y
                        axis MYY
             BAD FLAG : -1.E+34       
             SUBSET   : 10 points (Y)
             Y        : 0.744 to 10.256
 1.00000
 1.51254
 2.78306
 4.39092
 5.39092
 5.78306
 6.51254
 8.00000
 9.48746
10.00000
list myvar
             VARIABLE : 2 * X + Y
             SUBSET   : 10 by 10 points (X-Y)
               1      2.49   3.22   3.61   4.61   6.22   7.49   8      8.51   10    
                1      2      3      4      5      6      7      8      9     10
 1     /  1:   3.00   5.97   7.43   8.22  10.22  13.43  15.97  17.00  18.03  21.00
 1.51  /  2:   3.51   6.49   7.95   8.73  10.73  13.95  16.49  17.51  18.54  21.51
 2.78  /  3:   4.78   7.76   9.22  10.00  12.00  15.22  17.76  18.78  19.81  22.78
 4.39  /  4:   6.39   9.37  10.82  11.61  13.61  16.82  19.37  20.39  21.42  24.39
 5.39  /  5:   7.39  10.37  11.82  12.61  14.61  17.82  20.37  21.39  22.42  25.39
 5.78  /  6:   7.78  10.76  12.22  13.00  15.00  18.22  20.76  21.78  22.81  25.78
 6.51  /  7:   8.51  11.49  12.95  13.73  15.73  18.95  21.49  22.51  23.54  26.51
 8     /  8:  10.00  12.97  14.43  15.22  17.22  20.43  22.97  24.00  25.03  28.00
 9.49  /  9:  11.49  14.46  15.92  16.71  18.71  21.92  24.46  25.49  26.51  29.49
 10    / 10:  12.00  14.97  16.43  17.22  19.22  22.43  24.97  26.00  27.03  30.00
show grid
 Default grid for DEFINE VARIABLE is MYGRID
 Last successful data access was on grid MYGRID
    GRID MYGRID
 name       axis              # pts   start                end                 subset
 MYX       X                   10 i   1                    10                  full
 MYY       Y                   10 i   1                    10                  full
 normal    Z
 normal    T
 
! --- force the x axis to be regular
set axis /regular myx
list /format=(F8.5) x
             VARIABLE : X
                        axis MYX
             BAD FLAG : -1.E+34       
             SUBSET   : 10 points (X)
             X        : 0.5 to 10.5
 1.00000
 2.00000
 3.00000
 4.00000
 5.00000
 6.00000
 7.00000
 8.00000
 9.00000
10.00000
list /format=(F8.5) y
             VARIABLE : Y
                        axis MYY
             BAD FLAG : -1.E+34       
             SUBSET   : 10 points (Y)
             Y        : 0.744 to 10.256
 1.00000
 1.51254
 2.78306
 4.39092
 5.39092
 5.78306
 6.51254
 8.00000
 9.48746
10.00000
list myvar
             VARIABLE : 2 * X + Y
             SUBSET   : 10 by 10 points (X-Y)
                1      2      3      4      5      6      7      8      9     10    
                1      2      3      4      5      6      7      8      9     10
 1     /  1:   3.00   5.97   7.43   8.22  10.22  13.43  15.97  17.00  18.03  21.00
 1.51  /  2:   3.51   6.49   7.95   8.73  10.73  13.95  16.49  17.51  18.54  21.51
 2.78  /  3:   4.78   7.76   9.22  10.00  12.00  15.22  17.76  18.78  19.81  22.78
 4.39  /  4:   6.39   9.37  10.82  11.61  13.61  16.82  19.37  20.39  21.42  24.39
 5.39  /  5:   7.39  10.37  11.82  12.61  14.61  17.82  20.37  21.39  22.42  25.39
 5.78  /  6:   7.78  10.76  12.22  13.00  15.00  18.22  20.76  21.78  22.81  25.78
 6.51  /  7:   8.51  11.49  12.95  13.73  15.73  18.95  21.49  22.51  23.54  26.51
 8     /  8:  10.00  12.97  14.43  15.22  17.22  20.43  22.97  24.00  25.03  28.00
 9.49  /  9:  11.49  14.46  15.92  16.71  18.71  21.92  24.46  25.49  26.51  29.49
 10    / 10:  12.00  14.97  16.43  17.22  19.22  22.43  24.97  26.00  27.03  30.00
show grid
 Default grid for DEFINE VARIABLE is MYGRID
 Last successful data access was on grid MYGRID
    GRID MYGRID
 name       axis              # pts   start                end                 subset
 MYX       X                   10 r   1                    10                  full
 MYY       Y                   10 i   1                    10                  full
 normal    Z
 normal    T
 
! --- setting a regular axis as regular does nothing
set axis /regular myx
list /format=(F8.5) x
             VARIABLE : X
                        axis MYX
             BAD FLAG : -1.E+34       
             SUBSET   : 10 points (X)
             X        : 0.5 to 10.5
 1.00000
 2.00000
 3.00000
 4.00000
 5.00000
 6.00000
 7.00000
 8.00000
 9.00000
10.00000
list /format=(F8.5) y
             VARIABLE : Y
                        axis MYY
             BAD FLAG : -1.E+34       
             SUBSET   : 10 points (Y)
             Y        : 0.744 to 10.256
 1.00000
 1.51254
 2.78306
 4.39092
 5.39092
 5.78306
 6.51254
 8.00000
 9.48746
10.00000
list myvar
             VARIABLE : 2 * X + Y
             SUBSET   : 10 by 10 points (X-Y)
                1      2      3      4      5      6      7      8      9     10    
                1      2      3      4      5      6      7      8      9     10
 1     /  1:   3.00   5.97   7.43   8.22  10.22  13.43  15.97  17.00  18.03  21.00
 1.51  /  2:   3.51   6.49   7.95   8.73  10.73  13.95  16.49  17.51  18.54  21.51
 2.78  /  3:   4.78   7.76   9.22  10.00  12.00  15.22  17.76  18.78  19.81  22.78
 4.39  /  4:   6.39   9.37  10.82  11.61  13.61  16.82  19.37  20.39  21.42  24.39
 5.39  /  5:   7.39  10.37  11.82  12.61  14.61  17.82  20.37  21.39  22.42  25.39
 5.78  /  6:   7.78  10.76  12.22  13.00  15.00  18.22  20.76  21.78  22.81  25.78
 6.51  /  7:   8.51  11.49  12.95  13.73  15.73  18.95  21.49  22.51  23.54  26.51
 8     /  8:  10.00  12.97  14.43  15.22  17.22  20.43  22.97  24.00  25.03  28.00
 9.49  /  9:  11.49  14.46  15.92  16.71  18.71  21.92  24.46  25.49  26.51  29.49
 10    / 10:  12.00  14.97  16.43  17.22  19.22  22.43  24.97  26.00  27.03  30.00
show grid
 Default grid for DEFINE VARIABLE is MYGRID
 Last successful data access was on grid MYGRID
    GRID MYGRID
 name       axis              # pts   start                end                 subset
 MYX       X                   10 r   1                    10                  full
 MYY       Y                   10 i   1                    10                  full
 normal    Z
 normal    T
 
! --- clean up
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
cancel grid mygrid
 
! --- read a NetCDF file with the irregular axes and data
use bn_set_axis_regular
show data
     currently SET data sets:
    1> ./data/bn_set_axis_regular.nc  (default)
 name     title                             I         J         K         L
 MYDATA   2 * X + Y                        1:10      1:10      ...       ...
 
list mydata
             VARIABLE : 2 * X + Y
             FILENAME : bn_set_axis_regular.nc
             SUBSET   : 10 by 10 points (X-Y)
               1      2.49   3.22   3.61   4.61   6.22   7.49   8      8.51   10    
                1      2      3      4      5      6      7      8      9     10
 1     /  1:   3.00   5.97   7.43   8.22  10.22  13.43  15.97  17.00  18.03  21.00
 1.51  /  2:   3.51   6.49   7.95   8.73  10.73  13.95  16.49  17.51  18.54  21.51
 2.78  /  3:   4.78   7.76   9.22  10.00  12.00  15.22  17.76  18.78  19.81  22.78
 4.39  /  4:   6.39   9.37  10.82  11.61  13.61  16.82  19.37  20.39  21.42  24.39
 5.39  /  5:   7.39  10.37  11.82  12.61  14.61  17.82  20.37  21.39  22.42  25.39
 5.78  /  6:   7.78  10.76  12.22  13.00  15.00  18.22  20.76  21.78  22.81  25.78
 6.51  /  7:   8.51  11.49  12.95  13.73  15.73  18.95  21.49  22.51  23.54  26.51
 8     /  8:  10.00  12.97  14.43  15.22  17.22  20.43  22.97  24.00  25.03  28.00
 9.49  /  9:  11.49  14.46  15.92  16.71  18.71  21.92  24.46  25.49  26.51  29.49
 10    / 10:  12.00  14.97  16.43  17.22  19.22  22.43  24.97  26.00  27.03  30.00
show grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid GOZ1
    GRID GOZ1
 name       axis              # pts   start                end                 subset
 MYX1      X                   10 i   1                    10                  full
 MYY       Y                   10 i   1                    10                  full
 normal    Z
 normal    T
 
! --- force the x axis to be regular
set axis /regular `..dimnames[i=1]`
 !-> set axis /regular MYX1
list mydata
             VARIABLE : 2 * X + Y
             FILENAME : bn_set_axis_regular.nc
             SUBSET   : 10 by 10 points (X-Y)
                1      2      3      4      5      6      7      8      9     10    
                1      2      3      4      5      6      7      8      9     10
 1     /  1:   3.00   5.97   7.43   8.22  10.22  13.43  15.97  17.00  18.03  21.00
 1.51  /  2:   3.51   6.49   7.95   8.73  10.73  13.95  16.49  17.51  18.54  21.51
 2.78  /  3:   4.78   7.76   9.22  10.00  12.00  15.22  17.76  18.78  19.81  22.78
 4.39  /  4:   6.39   9.37  10.82  11.61  13.61  16.82  19.37  20.39  21.42  24.39
 5.39  /  5:   7.39  10.37  11.82  12.61  14.61  17.82  20.37  21.39  22.42  25.39
 5.78  /  6:   7.78  10.76  12.22  13.00  15.00  18.22  20.76  21.78  22.81  25.78
 6.51  /  7:   8.51  11.49  12.95  13.73  15.73  18.95  21.49  22.51  23.54  26.51
 8     /  8:  10.00  12.97  14.43  15.22  17.22  20.43  22.97  24.00  25.03  28.00
 9.49  /  9:  11.49  14.46  15.92  16.71  18.71  21.92  24.46  25.49  26.51  29.49
 10    / 10:  12.00  14.97  16.43  17.22  19.22  22.43  24.97  26.00  27.03  30.00
show grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid GOZ1
    GRID GOZ1
 name       axis              # pts   start                end                 subset
 MYX1      X                   10 r   1                    10                  full
 MYY       Y                   10 i   1                    10                  full
 normal    Z
 normal    T
 
*** Running ferret script: bn_set_cancel_redirect.jnl
! bn_set_cancel_redirect.jnl
! Karl Smith, 5/2010
! test for SET REDIRECT and CANCEL REDIRECT
 
! --- 1. redirect/tee both stdout and stderr to a file
set redirect /tee /file="redirect.txt" /clobber stdout stderr
 
! --- 2. produce some output to both stdout and stderr
define axis /x=0:6:0.5 myaxis
set axis myaxis
define grid /x=myaxis mygrid
set grid mygrid
let wave=sin(x)
list wave
             VARIABLE : SIN(X)
             SUBSET   : 13 points (X)
 0    /  1:  0.0000
 0.5  /  2:  0.4794
 1    /  3:  0.8415
 1.5  /  4:  0.9975
 2    /  5:  0.9093
 2.5  /  6:  0.5985
 3    /  7:  0.1411
 3.5  /  8: -0.3508
 4    /  9: -0.7568
 4.5  / 10: -0.9775
 5    / 11: -0.9589
 5.5  / 12: -0.7055
 6    / 13: -0.2794
go /help
 
! --- 3. cancel the stderr redirect and produce output
cancel redirect stderr
show axis myaxis
 name       axis              # pts   start                end
 MYAXIS    X                   13 r   0                    6
   Axis span (to cell edges) = 6.5
go /help
 
! --- 4. cancel all redirection and produce some output
cancel redirect
show grid mygrid
    GRID MYGRID
 name       axis              # pts   start                end
 MYAXIS    X                   13 r   0                    6
 normal    Y
 normal    Z
 normal    T
go /help
 
! --- 5. show the contents of the redirect file
! ---    should be all contents of 2., stdout of 3. and nothing but the cancel from 4.
let contents = { spawn:"cat redirect.txt" }
list contents
             VARIABLE : { SPAWN:"cat redirect.txt" }
             SUBSET   : 39 points (X)
 1    /  1:" "                                                                         
 2    /  2:"! --- 2. produce some output to both stdout and stderr"                    
 3    /  3:"define axis /x=0:6:0.5 myaxis"                                             
 4    /  4:"set axis myaxis"                                                           
 5    /  5:"define grid /x=myaxis mygrid"                                              
 6    /  6:"set grid mygrid"                                                           
 7    /  7:"let wave=sin(x)"                                                           
 8    /  8:"list wave"                                                                 
 9    /  9:"             VARIABLE : SIN(X)"                                            
 10   / 10:"             SUBSET   : 13 points (X)"                                     
 11   / 11:" 0    /  1:  0.0000"                                                       
 12   / 12:" 0.5  /  2:  0.4794"                                                       
 13   / 13:" 1    /  3:  0.8415"                                                       
 14   / 14:" 1.5  /  4:  0.9975"                                                       
 15   / 15:" 2    /  5:  0.9093"                                                       
 16   / 16:" 2.5  /  6:  0.5985"                                                       
 17   / 17:" 3    /  7:  0.1411"                                                       
 18   / 18:" 3.5  /  8: -0.3508"                                                       
 19   / 19:" 4    /  9: -0.7568"                                                       
 20   / 20:" 4.5  / 10: -0.9775"                                                       
 21   / 21:" 5    / 11: -0.9589"                                                       
 22   / 22:" 5.5  / 12: -0.7055"                                                       
 23   / 23:" 6    / 13: -0.2794"                                                       
 24   / 24:"go /help"                                                                  
 25   / 25:" Use the GO command to name a file of FERRET commands to be executed."     
 26   / 26:"     e.g.   yes? GO filename"                                              
 27   / 27:" "                                                                         
 28   / 28:" Use "GO/HELP filename" to read documentation in  the file to be executed."
 29   / 29:" "                                                                         
 30   / 30:"! --- 3. cancel the stderr redirect and produce output"                    
 31   / 31:"cancel redirect stderr"                                                    
 32   / 32:"show axis myaxis"                                                          
 33   / 33:" name       axis              # pts   start                end"            
 34   / 34:" MYAXIS    X                   13 r   0                    6"              
 35   / 35:"   Axis span (to cell edges) = 6.5"                                        
 36   / 36:"go /help"                                                                  
 37   / 37:" "                                                                         
 38   / 38:"! --- 4. cancel all redirection and produce some output"                   
 39   / 39:"cancel redirect"                                                           
cancel var contents
 
! --- 6. redirect/tee both stdout and stderr, appending to the redirect file
set redirect /tee /file="redirect.txt" /append stdout stderr
 
! --- 7. produce output to both stdout and stderr
list wave
             VARIABLE : SIN(X)
             SUBSET   : 13 points (X)
 0    /  1:  0.0000
 0.5  /  2:  0.4794
 1    /  3:  0.8415
 1.5  /  4:  0.9975
 2    /  5:  0.9093
 2.5  /  6:  0.5985
 3    /  7:  0.1411
 3.5  /  8: -0.3508
 4    /  9: -0.7568
 4.5  / 10: -0.9775
 5    / 11: -0.9589
 5.5  / 12: -0.7055
 6    / 13: -0.2794
go /help
 
! --- 8. cancel the stdout redirect and produce output
cancel redirect stdout
show axis myaxis
 name       axis              # pts   start                end
 MYAXIS    X                   13 r   0                    6
   Axis span (to cell edges) = 6.5
go /help
 
! --- 9. cancel all redirection and produce some output
cancel redirect stderr
show grid mygrid
    GRID MYGRID
 name       axis              # pts   start                end
 MYAXIS    X                   13 r   0                    6
 normal    Y
 normal    Z
 normal    T
go /help
 
! --- 10. results of CANCEL REDIRECT when nothing is redirected
cancel redirect
 
! --- 11. show the updated contents of the redirect file
! ---     should be all contents of 2., stdout of 3. and nothing but the cancel from 4.
! ---     plus all contents of 7. and stderr of 8.
let contents = { spawn:"cat redirect.txt" }
list contents
             VARIABLE : { SPAWN:"cat redirect.txt" }
             SUBSET   : 69 points (X)
 1    /  1:" "                                                                         
 2    /  2:"! --- 2. produce some output to both stdout and stderr"                    
 3    /  3:"define axis /x=0:6:0.5 myaxis"                                             
 4    /  4:"set axis myaxis"                                                           
 5    /  5:"define grid /x=myaxis mygrid"                                              
 6    /  6:"set grid mygrid"                                                           
 7    /  7:"let wave=sin(x)"                                                           
 8    /  8:"list wave"                                                                 
 9    /  9:"             VARIABLE : SIN(X)"                                            
 10   / 10:"             SUBSET   : 13 points (X)"                                     
 11   / 11:" 0    /  1:  0.0000"                                                       
 12   / 12:" 0.5  /  2:  0.4794"                                                       
 13   / 13:" 1    /  3:  0.8415"                                                       
 14   / 14:" 1.5  /  4:  0.9975"                                                       
 15   / 15:" 2    /  5:  0.9093"                                                       
 16   / 16:" 2.5  /  6:  0.5985"                                                       
 17   / 17:" 3    /  7:  0.1411"                                                       
 18   / 18:" 3.5  /  8: -0.3508"                                                       
 19   / 19:" 4    /  9: -0.7568"                                                       
 20   / 20:" 4.5  / 10: -0.9775"                                                       
 21   / 21:" 5    / 11: -0.9589"                                                       
 22   / 22:" 5.5  / 12: -0.7055"                                                       
 23   / 23:" 6    / 13: -0.2794"                                                       
 24   / 24:"go /help"                                                                  
 25   / 25:" Use the GO command to name a file of FERRET commands to be executed."     
 26   / 26:"     e.g.   yes? GO filename"                                              
 27   / 27:" "                                                                         
 28   / 28:" Use "GO/HELP filename" to read documentation in  the file to be executed."
 29   / 29:" "                                                                         
 30   / 30:"! --- 3. cancel the stderr redirect and produce output"                    
 31   / 31:"cancel redirect stderr"                                                    
 32   / 32:"show axis myaxis"                                                          
 33   / 33:" name       axis              # pts   start                end"            
 34   / 34:" MYAXIS    X                   13 r   0                    6"              
 35   / 35:"   Axis span (to cell edges) = 6.5"                                        
 36   / 36:"go /help"                                                                  
 37   / 37:" "                                                                         
 38   / 38:"! --- 4. cancel all redirection and produce some output"                   
 39   / 39:"cancel redirect"                                                           
 40   / 40:" "                                                                         
 41   / 41:"! --- 7. produce output to both stdout and stderr"                         
 42   / 42:"list wave"                                                                 
 43   / 43:"             VARIABLE : SIN(X)"                                            
 44   / 44:"             SUBSET   : 13 points (X)"                                     
 45   / 45:" 0    /  1:  0.0000"                                                       
 46   / 46:" 0.5  /  2:  0.4794"                                                       
 47   / 47:" 1    /  3:  0.8415"                                                       
 48   / 48:" 1.5  /  4:  0.9975"                                                       
 49   / 49:" 2    /  5:  0.9093"                                                       
 50   / 50:" 2.5  /  6:  0.5985"                                                       
 51   / 51:" 3    /  7:  0.1411"                                                       
 52   / 52:" 3.5  /  8: -0.3508"                                                       
 53   / 53:" 4    /  9: -0.7568"                                                       
 54   / 54:" 4.5  / 10: -0.9775"                                                       
 55   / 55:" 5    / 11: -0.9589"                                                       
 56   / 56:" 5.5  / 12: -0.7055"                                                       
 57   / 57:" 6    / 13: -0.2794"                                                       
 58   / 58:"go /help"                                                                  
 59   / 59:" Use the GO command to name a file of FERRET commands to be executed."     
 60   / 60:"     e.g.   yes? GO filename"                                              
 61   / 61:" "                                                                         
 62   / 62:" Use "GO/HELP filename" to read documentation in  the file to be executed."
 63   / 63:" "                                                                         
 64   / 64:"! --- 8. cancel the stdout redirect and produce output"                    
 65   / 65:"cancel redirect stdout"                                                    
 66   / 66:" Use the GO command to name a file of FERRET commands to be executed."     
 67   / 67:"     e.g.   yes? GO filename"                                              
 68   / 68:" "                                                                         
 69   / 69:" Use "GO/HELP filename" to read documentation in  the file to be executed."
cancel var contents
 
! --- 12. redirect only stdout to a file and produce some output to show stdout redirected, stderr normal
! ---     warning: can get confusing - look ahead for file contents
! ---     immediately following redirect line should be stderr of 12 and contents of 13,
! ---     which shows file contents of stdout of 12 and cancel redirect of 13
set redirect /file="redirect.txt" /clobber stdout
let contents = { spawn:"cat redirect.txt" }
list contents
             VARIABLE : { SPAWN:"cat redirect.txt" }
             SUBSET   : 21 points (X)
 1    /  1:"list wave"                                                           
 2    /  2:"             VARIABLE : SIN(X)"                                      
 3    /  3:"             SUBSET   : 13 points (X)"                               
 4    /  4:" 0    /  1:  0.0000"                                                 
 5    /  5:" 0.5  /  2:  0.4794"                                                 
 6    /  6:" 1    /  3:  0.8415"                                                 
 7    /  7:" 1.5  /  4:  0.9975"                                                 
 8    /  8:" 2    /  5:  0.9093"                                                 
 9    /  9:" 2.5  /  6:  0.5985"                                                 
 10   / 10:" 3    /  7:  0.1411"                                                 
 11   / 11:" 3.5  /  8: -0.3508"                                                 
 12   / 12:" 4    /  9: -0.7568"                                                 
 13   / 13:" 4.5  / 10: -0.9775"                                                 
 14   / 14:" 5    / 11: -0.9589"                                                 
 15   / 15:" 5.5  / 12: -0.7055"                                                 
 16   / 16:" 6    / 13: -0.2794"                                                 
 17   / 17:"go /help"                                                            
 18   / 18:" "                                                                   
 19   / 19:"! --- 13. cancel the redirection and show the redirect file contents"
 20   / 20:"! ---     should be the "missing" stdout of 12."                     
 21   / 21:"cancel redirect stdout"                                              
cancel var contents
 
! --- 14. redirect only stderr, appending to a file and produce some output to show stdout normal, stderr redirected
set redirect /file="redirect.txt" /append stderr
show axis myaxis
 name       axis              # pts   start                end
 MYAXIS    X                   13 r   0                    6
   Axis span (to cell edges) = 6.5
go /help
 
! --- 15. cancel the redirection and show the redirect file contents
! ---     should be the stdout of 12, cancel redirect of 13, and stderr of 14
cancel redirect stderr
let contents = { spawn:"cat redirect.txt" }
list contents
             VARIABLE : { SPAWN:"cat redirect.txt" }
             SUBSET   : 25 points (X)
 1    /  1:"list wave"                                                                 
 2    /  2:"             VARIABLE : SIN(X)"                                            
 3    /  3:"             SUBSET   : 13 points (X)"                                     
 4    /  4:" 0    /  1:  0.0000"                                                       
 5    /  5:" 0.5  /  2:  0.4794"                                                       
 6    /  6:" 1    /  3:  0.8415"                                                       
 7    /  7:" 1.5  /  4:  0.9975"                                                       
 8    /  8:" 2    /  5:  0.9093"                                                       
 9    /  9:" 2.5  /  6:  0.5985"                                                       
 10   / 10:" 3    /  7:  0.1411"                                                       
 11   / 11:" 3.5  /  8: -0.3508"                                                       
 12   / 12:" 4    /  9: -0.7568"                                                       
 13   / 13:" 4.5  / 10: -0.9775"                                                       
 14   / 14:" 5    / 11: -0.9589"                                                       
 15   / 15:" 5.5  / 12: -0.7055"                                                       
 16   / 16:" 6    / 13: -0.2794"                                                       
 17   / 17:"go /help"                                                                  
 18   / 18:" "                                                                         
 19   / 19:"! --- 13. cancel the redirection and show the redirect file contents"      
 20   / 20:"! ---     should be the "missing" stdout of 12."                           
 21   / 21:"cancel redirect stdout"                                                    
 22   / 22:" Use the GO command to name a file of FERRET commands to be executed."     
 23   / 23:"     e.g.   yes? GO filename"                                              
 24   / 24:" "                                                                         
 25   / 25:" Use "GO/HELP filename" to read documentation in  the file to be executed."
cancel var contents
 
! --- 16. redirect/tee stdout to one file and stderr to another file
set redirect /tee /file="redirect_stdout.txt" /clobber stdout
set redirect /tee /file="redirect_stderr.txt" /clobber stderr
 
! --- 17. produce some output
show grid mygrid
    GRID MYGRID
 name       axis              # pts   start                end
 MYAXIS    X                   13 r   0                    6
 normal    Y
 normal    Z
 normal    T
go /help
 
! --- 18. see what happens to messages (say, warn, error)
say "   This is a say message"
   This is a say message
set axis /regular myaxis
set mode ignore_error
show grid garbage
cancel mode ignore_error
 
! --- 19. cancel redirections and show the contents of the files
cancel redirect
let contents = { spawn:"cat redirect_stdout.txt" }
! ---     should be the stdout of 17, whatever stdout of 18, and cancel redirect from 19
list contents
             VARIABLE : { SPAWN:"cat redirect_stdout.txt" }
             SUBSET   : 22 points (X)
 1    /  1:"set redirect /tee /file="redirect_stderr.txt" /clobber stderr"   
 2    /  2:" "                                                               
 3    /  3:"! --- 17. produce some output"                                   
 4    /  4:"show grid mygrid"                                                
 5    /  5:"    GRID MYGRID"                                                 
 6    /  6:" name       axis              # pts   start                end"  
 7    /  7:" MYAXIS    X                   13 r   0                    6"    
 8    /  8:" normal    Y"                                                    
 9    /  9:" normal    Z"                                                    
 10   / 10:" normal    T"                                                    
 11   / 11:"go /help"                                                        
 12   / 12:" "                                                               
 13   / 13:"! --- 18. see what happens to messages (say, warn, error)"       
 14   / 14:"say "   This is a say message""                                  
 15   / 15:"   This is a say message"                                        
 16   / 16:"set axis /regular myaxis"                                        
 17   / 17:"set mode ignore_error"                                           
 18   / 18:"show grid garbage"                                               
 19   / 19:"cancel mode ignore_error"                                        
 20   / 20:" "                                                               
 21   / 21:"! --- 19. cancel redirections and show the contents of the files"
 22   / 22:"cancel redirect"                                                 
cancel var contents
let contents = { spawn:"cat redirect_stderr.txt" }
! ---     should be the stderr of 17.
list contents
             VARIABLE : { SPAWN:"cat redirect_stderr.txt" }
             SUBSET   : 8 points (X)
 1   / 1:" Use the GO command to name a file of FERRET commands to be executed."     
 2   / 2:"     e.g.   yes? GO filename"                                              
 3   / 3:" "                                                                         
 4   / 4:" Use "GO/HELP filename" to read documentation in  the file to be executed."
 5   / 5:"           *** NOTE: Axis is already regular: MYAXIS"                      
 6   / 6:" **ERROR: variable unknown or not in data set: GARBAGE"                    
 7   / 7:"show grid garbage"                                                         
 8   / 8:"Executed by script: *** GO bn_set_cancel_redirect.jnl ***"                 
cancel var contents
 
! --- 20. turn on journal mode to a special filename
set mode journal:redirect_journal.txt
 
! --- 21. turn on redirection to the journal with default source (stdout)
set redirect /tee /journal
 
! --- 22. produce some output to stdout and stderr
list wave
             VARIABLE : SIN(X)
             SUBSET   : 13 points (X)
 0    /  1:  0.0000
 0.5  /  2:  0.4794
 1    /  3:  0.8415
 1.5  /  4:  0.9975
 2    /  5:  0.9093
 2.5  /  6:  0.5985
 3    /  7:  0.1411
 3.5  /  8: -0.3508
 4    /  9: -0.7568
 4.5  / 10: -0.9775
 5    / 11: -0.9589
 5.5  / 12: -0.7055
 6    / 13: -0.2794
go /help
 
! --- 23. cancel journal redirect and produce some output
! ---     should warn that stderr not redirected
cancel redirect stdout stderr
show axis myaxis
 name       axis              # pts   start                end
 MYAXIS    X                   13 r   0                    6
   Axis span (to cell edges) = 6.5
go /help
 
! --- 24. redirect/tee both stdout and stderr to the journal
set redirect /tee /journal stderr stdout
 
! --- 25. produce some output to stdout and stderr
show grid mygrid
    GRID MYGRID
 name       axis              # pts   start                end
 MYAXIS    X                   13 r   0                    6
 normal    Y
 normal    Z
 normal    T
go /help
 
! --- 26. turn off journal mode
set mode journal:ferret.jnl
cancel mode journal
 
! --- 27. produce some output to show journal redirect with no journal is not a problem
list wave
             VARIABLE : SIN(X)
             SUBSET   : 13 points (X)
 0    /  1:  0.0000
 0.5  /  2:  0.4794
 1    /  3:  0.8415
 1.5  /  4:  0.9975
 2    /  5:  0.9093
 2.5  /  6:  0.5985
 3    /  7:  0.1411
 3.5  /  8: -0.3508
 4    /  9: -0.7568
 4.5  / 10: -0.9775
 5    / 11: -0.9589
 5.5  / 12: -0.7055
 6    / 13: -0.2794
go /help
 
! --- 28. cancel journal redirect and show contents of the journal file
! ---     all redirected output should be commented, and should be the stdout of 22.,
! ---     cancel redirect of 23., all contents of 25, and set mode journal of 26
cancel redirect
let contents = { spawn:"cat redirect_journal.txt" }
list contents
             VARIABLE : { SPAWN:"cat redirect_journal.txt" }
             SUBSET   : 45 points (X)
 1    /  1:" ! NOAA/PMEL TMAP"                                                          
 2    /  2:" ! FERRET v7.6 (debug)"                                                     
 3    /  3:" ! Linux 3.10.0-1127.10.1.el7.x86_64 64-bit - MM-DD-YY"                     
 4    /  4:" ! DD-MON-YY HH:MM     "                                                    
 5    /  5:""                                                                           
 6    /  6:"! "                                                                         
 7    /  7:"!! --- 22. produce some output to stdout and stderr"                        
 8    /  8:"!list wave"                                                                 
 9    /  9:"!             VARIABLE : SIN(X)"                                            
 10   / 10:"!             SUBSET   : 13 points (X)"                                     
 11   / 11:"! 0    /  1:  0.0000"                                                       
 12   / 12:"! 0.5  /  2:  0.4794"                                                       
 13   / 13:"! 1    /  3:  0.8415"                                                       
 14   / 14:"! 1.5  /  4:  0.9975"                                                       
 15   / 15:"! 2    /  5:  0.9093"                                                       
 16   / 16:"! 2.5  /  6:  0.5985"                                                       
 17   / 17:"! 3    /  7:  0.1411"                                                       
 18   / 18:"! 3.5  /  8: -0.3508"                                                       
 19   / 19:"! 4    /  9: -0.7568"                                                       
 20   / 20:"! 4.5  / 10: -0.9775"                                                       
 21   / 21:"! 5    / 11: -0.9589"                                                       
 22   / 22:"! 5.5  / 12: -0.7055"                                                       
 23   / 23:"! 6    / 13: -0.2794"                                                       
 24   / 24:"!go /help"                                                                  
 25   / 25:"! "                                                                         
 26   / 26:"!! --- 23. cancel journal redirect and produce some output"                 
 27   / 27:"!! ---     should warn that stderr not redirected"                          
 28   / 28:"!cancel redirect stdout stderr"                                             
 29   / 29:"! "                                                                         
 30   / 30:"!! --- 25. produce some output to stdout and stderr"                        
 31   / 31:"!show grid mygrid"                                                          
 32   / 32:"!    GRID MYGRID"                                                           
 33   / 33:"! name       axis              # pts   start                end"            
 34   / 34:"! MYAXIS    X                   13 r   0                    6"              
 35   / 35:"! normal    Y"                                                              
 36   / 36:"! normal    Z"                                                              
 37   / 37:"! normal    T"                                                              
 38   / 38:"!go /help"                                                                  
 39   / 39:"! Use the GO command to name a file of FERRET commands to be executed."     
 40   / 40:"!     e.g.   yes? GO filename"                                              
 41   / 41:"! "                                                                         
 42   / 42:"! Use "GO/HELP filename" to read documentation in  the file to be executed."
 43   / 43:"! "                                                                         
 44   / 44:"!! --- 26. turn off journal mode"                                           
 45   / 45:"!set mode journal:ferret.jnl"                                               
cancel var contents
 
! --- clean-up: get rid of mygrid
set grid abstract
cancel grid mygrid
 
!!! NOTE: journal mode is now turned off !!!
*** Running ferret script: bn_min_max_smoothers.jnl
! bn_min_max_smoothers.jnl
! New transforms @SMN and @SMX, smoothers based on the
! min and max of the data in the window.
sh trans
variable transforms e.g.SST[T=1-jan:15-mar@DDC]
   code        description                  code        description
   ----        -----------                  ----        -----------
   @ITP        interpolated                 @FAV        ave-filled
   @AVE        averaged                     @FLN        linear-filled
   @VAR        variance                     @FNR        nearest-filled
   @SUM        summed                       @NGD        number of valid
   @RSU        running sum                  @NBD        number flagged bad
   @SHF        shifted                      @LOC        location
   @MIN        minimum                      @WEQ        weighted equal
   @MAX        maximum                      @CDA        closest dist above
   @DDC        centered derivative          @CDB        closest dist below
   @DDF        forward derivative           @CIA        closest index above
   @DDB        backwards derivative         @CIB        closest index below
   @DIN        integrated                   @EVN        event mask
   @IIN        indef. integ.                @MED        median smoothed
   @SBX        box smoothed                 @SMX        maximum smoothed
   @SBN        binomial smoothed            @SMN        minimum smoothed
   @SWL        Welch smoothed               @STD        standard deviation
   @SHN        Hanning smoothed             @WGT        weights for avg,int
   @SPZ        Parzen smoothed              @SPX        box smooth w/missing
 
regridding transforms e.g.SST[GX=x5deg@AVE]
   code        description                  code        description
   ----        -----------                  ----        -----------
   @LIN        lin. interp.                 @MODVAR     modulo var
   @AVE        area-wgtd avgd               @MODNGD     # gd mod pts
   @XACT       exact match                  @MODNBD     #bad mod pts
   @ASN        index assn                   @MODSUM     modulo sum
   @VAR        variance                     @MODMIN     modulo min
   @MIN        minimum                      @MODMAX     modulo max
   @MAX        maximum                      @NRST       nearst coord
   @SUM        area-wgtd sum                @BIN        unwgtd avg
   @NGD        #gd pts, area wgtd           @NBIN       #good in bin
   @MOD        modulo ave                   @IIN        #indef integral
 
auxiliary varible regridding transforms e.g.TEMP[GZ(depth)=zax@AVE]
   code        description                  code        description
   ----        -----------                  ----        -----------
   @LIN        lin. interp.                 @PLAVE      pc-wise linear ave
use gt4d011
plot/x=123.5w/y=2.5/k=1 temp, temp[L=@med], temp[L=@smx], temp[L=@smn]
 
plot/x=123.5w/y=2.5/k=1 temp, temp[L=@med:3], temp[L=@smx:3], temp[L=@smn:3]
plot/x=123.5w/y=2.5/k=1 temp, temp[L=@med:5], temp[L=@smx:5], temp[L=@smn:5]
plot/x=123.5w/y=2.5/k=1 temp, temp[L=@med:5], temp[L=@smx:6], temp[L=@smn:6]
 
plot/y=2.5/k=1/l=1/x=139.5W:122.5W temp, temp[i=@med], temp[i=@smx], temp[i=@smn]
plot/k=1/l=1/x=123.5w temp, temp[j=@med], temp[j=@smx], temp[j=@smn]
plot/l=1/x=123.5w/y=2.5/z=0:100 temp, temp[k=@med], temp[k=@smx], temp[k=@smn]
 
! Numeric results
list/x=123.5w/y=2.5/k=1 temp, temp[L=@med], temp[L=@smx], temp[L=@smn]
             DATA SET: ./data/gt4d011.cdf
             TIME: 14-AUG-1982 11:00 to 13-JAN-1983 13:00
             LONGITUDE: 123.5W
             LATITUDE: 2.5N
             DEPTH (m): 5
 Column  1: TEMP is TEMPERATURE (deg. C)
 Column  2: TEMP[T=@MED:3] is TEMPERATURE (deg. C)(median smoothed by 3 pts on T)
 Column  3: TEMP[T=@SMX:3] is TEMPERATURE (deg. C)(maximum smoothed by 3 pts on T)
 Column  4: TEMP[T=@SMN:3] is TEMPERATURE (deg. C)(minimum smoothed by 3 pts on T)
                      TEMP   TEMP   TEMP   TEMP
17-AUG-1982 12 /  1:  27.15  27.23  27.23  27.15
23-AUG-1982 14 /  2:  27.23  27.23  27.36  27.15
29-AUG-1982 16 /  3:  27.36  27.36  27.54  27.23
04-SEP-1982 18 /  4:  27.54  27.54  27.79  27.36
10-SEP-1982 20 /  5:  27.79  27.79  28.09  27.54
16-SEP-1982 22 /  6:  28.09  28.09  28.33  27.79
23-SEP-1982 00 /  7:  28.33  28.33  28.47  28.09
29-SEP-1982 02 /  8:  28.47  28.47  28.61  28.33
05-OCT-1982 04 /  9:  28.61  28.61  28.91  28.47
11-OCT-1982 06 / 10:  28.91  28.91  29.34  28.61
17-OCT-1982 08 / 11:  29.34  29.34  29.76  28.91
23-OCT-1982 10 / 12:  29.76  29.76  30.20  29.34
29-OCT-1982 12 / 13:  30.20  30.20  30.75  29.76
04-NOV-1982 14 / 14:  30.75  30.75  31.42  30.20
10-NOV-1982 16 / 15:  31.42  31.42  31.84  30.75
16-NOV-1982 18 / 16:  31.84  31.84  31.98  31.42
22-NOV-1982 20 / 17:  31.98  31.98  32.13  31.84
28-NOV-1982 22 / 18:  32.13  32.13  32.41  31.98
05-DEC-1982 00 / 19:  32.41  32.41  32.73  32.13
11-DEC-1982 02 / 20:  32.73  32.73  32.94  32.41
17-DEC-1982 04 / 21:  32.94  32.94  32.97  32.73
23-DEC-1982 06 / 22:  32.97  32.94  32.97  32.94
29-DEC-1982 08 / 23:  32.94  32.94  32.97  32.81
04-JAN-1983 10 / 24:  32.81  32.81  32.94  32.59
10-JAN-1983 12 / 25:  32.59  32.81  32.81  32.59
 
list/x=123.5w/y=2.5/k=1 temp, temp[L=@med:3], temp[L=@smx:3], temp[L=@smn:3]
             DATA SET: ./data/gt4d011.cdf
             TIME: 14-AUG-1982 11:00 to 13-JAN-1983 13:00
             LONGITUDE: 123.5W
             LATITUDE: 2.5N
             DEPTH (m): 5
 Column  1: TEMP is TEMPERATURE (deg. C)
 Column  2: TEMP[T=@MED:3] is TEMPERATURE (deg. C)(median smoothed by 3 pts on T)
 Column  3: TEMP[T=@SMX:3] is TEMPERATURE (deg. C)(maximum smoothed by 3 pts on T)
 Column  4: TEMP[T=@SMN:3] is TEMPERATURE (deg. C)(minimum smoothed by 3 pts on T)
                      TEMP   TEMP   TEMP   TEMP
17-AUG-1982 12 /  1:  27.15  27.23  27.23  27.15
23-AUG-1982 14 /  2:  27.23  27.23  27.36  27.15
29-AUG-1982 16 /  3:  27.36  27.36  27.54  27.23
04-SEP-1982 18 /  4:  27.54  27.54  27.79  27.36
10-SEP-1982 20 /  5:  27.79  27.79  28.09  27.54
16-SEP-1982 22 /  6:  28.09  28.09  28.33  27.79
23-SEP-1982 00 /  7:  28.33  28.33  28.47  28.09
29-SEP-1982 02 /  8:  28.47  28.47  28.61  28.33
05-OCT-1982 04 /  9:  28.61  28.61  28.91  28.47
11-OCT-1982 06 / 10:  28.91  28.91  29.34  28.61
17-OCT-1982 08 / 11:  29.34  29.34  29.76  28.91
23-OCT-1982 10 / 12:  29.76  29.76  30.20  29.34
29-OCT-1982 12 / 13:  30.20  30.20  30.75  29.76
04-NOV-1982 14 / 14:  30.75  30.75  31.42  30.20
10-NOV-1982 16 / 15:  31.42  31.42  31.84  30.75
16-NOV-1982 18 / 16:  31.84  31.84  31.98  31.42
22-NOV-1982 20 / 17:  31.98  31.98  32.13  31.84
28-NOV-1982 22 / 18:  32.13  32.13  32.41  31.98
05-DEC-1982 00 / 19:  32.41  32.41  32.73  32.13
11-DEC-1982 02 / 20:  32.73  32.73  32.94  32.41
17-DEC-1982 04 / 21:  32.94  32.94  32.97  32.73
23-DEC-1982 06 / 22:  32.97  32.94  32.97  32.94
29-DEC-1982 08 / 23:  32.94  32.94  32.97  32.81
04-JAN-1983 10 / 24:  32.81  32.81  32.94  32.59
10-JAN-1983 12 / 25:  32.59  32.81  32.81  32.59
list/x=123.5w/y=2.5/k=1 temp, temp[L=@med:5], temp[L=@smx:5], temp[L=@smn:5]
             DATA SET: ./data/gt4d011.cdf
             TIME: 14-AUG-1982 11:00 to 13-JAN-1983 13:00
             LONGITUDE: 123.5W
             LATITUDE: 2.5N
             DEPTH (m): 5
 Column  1: TEMP is TEMPERATURE (deg. C)
 Column  2: TEMP[T=@MED:5] is TEMPERATURE (deg. C)(median smoothed by 5 pts on T)
 Column  3: TEMP[T=@SMX:5] is TEMPERATURE (deg. C)(maximum smoothed by 5 pts on T)
 Column  4: TEMP[T=@SMN:5] is TEMPERATURE (deg. C)(minimum smoothed by 5 pts on T)
                      TEMP   TEMP   TEMP   TEMP
17-AUG-1982 12 /  1:  27.15  27.23  27.36  27.15
23-AUG-1982 14 /  2:  27.23  27.36  27.54  27.15
29-AUG-1982 16 /  3:  27.36  27.36  27.79  27.15
04-SEP-1982 18 /  4:  27.54  27.54  28.09  27.23
10-SEP-1982 20 /  5:  27.79  27.79  28.33  27.36
16-SEP-1982 22 /  6:  28.09  28.09  28.47  27.54
23-SEP-1982 00 /  7:  28.33  28.33  28.61  27.79
29-SEP-1982 02 /  8:  28.47  28.47  28.91  28.09
05-OCT-1982 04 /  9:  28.61  28.61  29.34  28.33
11-OCT-1982 06 / 10:  28.91  28.91  29.76  28.47
17-OCT-1982 08 / 11:  29.34  29.34  30.20  28.61
23-OCT-1982 10 / 12:  29.76  29.76  30.75  28.91
29-OCT-1982 12 / 13:  30.20  30.20  31.42  29.34
04-NOV-1982 14 / 14:  30.75  30.75  31.84  29.76
10-NOV-1982 16 / 15:  31.42  31.42  31.98  30.20
16-NOV-1982 18 / 16:  31.84  31.84  32.13  30.75
22-NOV-1982 20 / 17:  31.98  31.98  32.41  31.42
28-NOV-1982 22 / 18:  32.13  32.13  32.73  31.84
05-DEC-1982 00 / 19:  32.41  32.41  32.94  31.98
11-DEC-1982 02 / 20:  32.73  32.73  32.97  32.13
17-DEC-1982 04 / 21:  32.94  32.94  32.97  32.41
23-DEC-1982 06 / 22:  32.97  32.94  32.97  32.73
29-DEC-1982 08 / 23:  32.94  32.94  32.97  32.59
04-JAN-1983 10 / 24:  32.81  32.94  32.97  32.59
10-JAN-1983 12 / 25:  32.59  32.81  32.94  32.59
list/x=123.5w/y=2.5/k=1 temp, temp[L=@med:5], temp[L=@smx:6], temp[L=@smn:6]
             DATA SET: ./data/gt4d011.cdf
             TIME: 14-AUG-1982 11:00 to 13-JAN-1983 13:00
             LONGITUDE: 123.5W
             LATITUDE: 2.5N
             DEPTH (m): 5
 Column  1: TEMP is TEMPERATURE (deg. C)
 Column  2: TEMP[T=@MED:5] is TEMPERATURE (deg. C)(median smoothed by 5 pts on T)
 Column  3: TEMP[T=@SMX:6] is TEMPERATURE (deg. C)(maximum smoothed by 6 pts on T)
 Column  4: TEMP[T=@SMN:6] is TEMPERATURE (deg. C)(minimum smoothed by 6 pts on T)
                      TEMP   TEMP   TEMP   TEMP
17-AUG-1982 12 /  1:  27.15  27.23  27.54  27.15
23-AUG-1982 14 /  2:  27.23  27.36  27.79  27.15
29-AUG-1982 16 /  3:  27.36  27.36  28.09  27.15
04-SEP-1982 18 /  4:  27.54  27.54  28.33  27.15
10-SEP-1982 20 /  5:  27.79  27.79  28.47  27.23
16-SEP-1982 22 /  6:  28.09  28.09  28.61  27.36
23-SEP-1982 00 /  7:  28.33  28.33  28.91  27.54
29-SEP-1982 02 /  8:  28.47  28.47  29.34  27.79
05-OCT-1982 04 /  9:  28.61  28.61  29.76  28.09
11-OCT-1982 06 / 10:  28.91  28.91  30.20  28.33
17-OCT-1982 08 / 11:  29.34  29.34  30.75  28.47
23-OCT-1982 10 / 12:  29.76  29.76  31.42  28.61
29-OCT-1982 12 / 13:  30.20  30.20  31.84  28.91
04-NOV-1982 14 / 14:  30.75  30.75  31.98  29.34
10-NOV-1982 16 / 15:  31.42  31.42  32.13  29.76
16-NOV-1982 18 / 16:  31.84  31.84  32.41  30.20
22-NOV-1982 20 / 17:  31.98  31.98  32.73  30.75
28-NOV-1982 22 / 18:  32.13  32.13  32.94  31.42
05-DEC-1982 00 / 19:  32.41  32.41  32.97  31.84
11-DEC-1982 02 / 20:  32.73  32.73  32.97  31.98
17-DEC-1982 04 / 21:  32.94  32.94  32.97  32.13
23-DEC-1982 06 / 22:  32.97  32.94  32.97  32.41
29-DEC-1982 08 / 23:  32.94  32.94  32.97  32.59
04-JAN-1983 10 / 24:  32.81  32.94  32.97  32.59
10-JAN-1983 12 / 25:  32.59  32.81  32.97  32.59
 
list/y=2.5/k=1/l=1/x=139.5W:122.5W temp, temp[i=@med], temp[i=@smx], temp[i=@smn]
             DATA SET: ./data/gt4d011.cdf
             LONGITUDE: 139.5W to 122.5W
             LATITUDE: 2.5N
             DEPTH (m): 5
             TIME: 17-AUG-1982 12:00
 Column  1: TEMP is TEMPERATURE (deg. C)
 Column  2: TEMP[X=@MED:3] is TEMPERATURE (deg. C)(median smoothed by 3 pts on X)
 Column  3: TEMP[X=@SMX:3] is TEMPERATURE (deg. C)(maximum smoothed by 3 pts on X)
 Column  4: TEMP[X=@SMN:3] is TEMPERATURE (deg. C)(minimum smoothed by 3 pts on X)
               TEMP   TEMP   TEMP   TEMP
139.5W /  91:  26.58  26.65  26.65  26.58
138.5W /  92:  26.65  26.65  26.90  26.58
137.5W /  93:  26.90  26.90  27.14  26.65
136.5W /  94:  27.14  27.14  27.24  26.90
135.5W /  95:  27.24  27.18  27.24  27.14
134.5W /  96:  27.18  27.18  27.24  26.91
133.5W /  97:  26.91  26.91  27.18  26.70
132.5W /  98:  26.70  26.81  26.91  26.70
131.5W /  99:  26.81  26.81  27.01  26.70
130.5W / 100:  27.01  27.01  27.16  26.81
129.5W / 101:  27.16  27.16  27.21  27.01
128.5W / 102:  27.21  27.20  27.21  27.16
127.5W / 103:  27.20  27.20  27.21  27.18
126.5W / 104:  27.18  27.18  27.20  27.14
125.5W / 105:  27.14  27.14  27.18  27.13
124.5W / 106:  27.13  27.14  27.15  27.13
123.5W / 107:  27.15  27.15  27.17  27.13
122.5W / 108:  27.17  27.17  27.17  27.15
list/k=1/l=1/x=123.5w temp, temp[j=35:56@med], temp[j=35:56@smx], temp[j=35:56@smn]
             DATA SET: ./data/gt4d011.cdf
             LATITUDE: 3.667S to 3.667N
             LONGITUDE: 123.5W
             DEPTH (m): 5
             TIME: 17-AUG-1982 12:00
 Column  1: TEMP is TEMPERATURE (deg. C)
 Column  2: TEMP[Y=@MED:3] is TEMPERATURE (deg. C)(median smoothed by 3 pts on Y)
 Column  3: TEMP[Y=@SMX:3] is TEMPERATURE (deg. C)(maximum smoothed by 3 pts on Y)
 Column  4: TEMP[Y=@SMN:3] is TEMPERATURE (deg. C)(minimum smoothed by 3 pts on Y)
             TEMP   TEMP   TEMP   TEMP
3.5S  / 35:  26.00  26.00  26.00  25.95
3.17S / 36:  25.95  25.95  26.00  25.89
2.83S / 37:  25.89  25.89  25.95  25.82
2.5S  / 38:  25.82  25.82  25.89  25.74
2.17S / 39:  25.74  25.74  25.82  25.66
1.83S / 40:  25.66  25.66  25.74  25.60
1.5S  / 41:  25.60  25.60  25.66  25.54
1.17S / 42:  25.54  25.54  25.60  25.50
0.83S / 43:  25.50  25.50  25.54  25.50
0.5S  / 44:  25.50  25.50  25.54  25.50
0.17S / 45:  25.54  25.54  25.63  25.50
0.17N / 46:  25.63  25.63  25.76  25.54
0.5N  / 47:  25.76  25.76  25.93  25.63
0.83N / 48:  25.93  25.93  26.15  25.76
1.17N / 49:  26.15  26.15  26.42  25.93
1.5N  / 50:  26.42  26.42  26.69  26.15
1.83N / 51:  26.69  26.69  26.92  26.42
2.17N / 52:  26.92  26.92  27.15  26.69
2.5N  / 53:  27.15  27.15  27.40  26.92
2.83N / 54:  27.40  27.40  27.70  27.15
3.17N / 55:  27.70  27.70  28.06  27.40
3.5N  / 56:  28.06  28.06  28.06  27.70
 
list/l=1/x=123.5w/y=2.5/z=0:100 temp, temp[k=@med], temp[k=@smx], temp[k=@smn]
             DATA SET: ./data/gt4d011.cdf
             DEPTH (m): 0 to 100
             LONGITUDE: 123.5W
             LATITUDE: 2.5N
             TIME: 17-AUG-1982 12:00
 Column  1: TEMP is TEMPERATURE (deg. C)
 Column  2: TEMP[Z=@MED:3] is TEMPERATURE (deg. C)(median smoothed by 3 pts on Z)
 Column  3: TEMP[Z=@SMX:3] is TEMPERATURE (deg. C)(maximum smoothed by 3 pts on Z)
 Column  4: TEMP[Z=@SMN:3] is TEMPERATURE (deg. C)(minimum smoothed by 3 pts on Z)
             TEMP   TEMP   TEMP   TEMP
5     /  1:  27.15  27.15  27.15  27.10
15    /  2:  27.10  27.10  27.15  27.10
25    /  3:  27.10  27.10  27.10  27.10
35    /  4:  27.10  27.10  27.10  27.09
45    /  5:  27.09  27.09  27.10  26.84
55    /  6:  26.84  26.84  27.09  26.21
65    /  7:  26.21  26.21  26.84  25.40
75    /  8:  25.40  25.40  26.21  24.51
85    /  9:  24.51  24.51  25.40  23.54
95    / 10:  23.54  24.51  24.51  23.54
 
*** Running ferret script: bn_vector_symbols.jnl
! bn_vector_symbols.jnl
! ACM 7/16/21010 Ferret V6.6.3
!
! On any vector plot command, define symbols
! PPL_VECLEN containing the vector length scale
! PPL_VEC_XSKIP, PPL_VEC_YSKIP containing the skip
!
! They are defined whether they are automatically set or
! set via qualifiers.
 
VECTOR/I=1:10/J=1:20 i/j,j/i
SHOW SYMBOL ppl_vec*
PPL_VECLEN = "  7.39"
PPL_VEC_XSKIP = "1"
PPL_VEC_YSKIP = "1"
 
VECTOR/I=1:10/J=1:20/LEN=8 i/j,j/i
SHOW SYMBOL ppl_vec*
PPL_VECLEN = "  8.00"
PPL_VEC_XSKIP = "1"
PPL_VEC_YSKIP = "1"
 
VECTOR/I=1:300/J=1:200/LEN=8.2 i/j,j/i
SHOW SYMBOL ppl_vec*
PPL_VECLEN = "  8.20"
PPL_VEC_XSKIP = "8"
PPL_VEC_YSKIP = "7"
 
VECTOR/I=1:300/J=1:200/XSKIP=10/YSKIP=8 i/j,j/i
SHOW SYMBOL ppl_vec*
PPL_VECLEN = "  25.1"
PPL_VEC_XSKIP = "10"
PPL_VEC_YSKIP = "8"
 
VECTOR/I=1:300/J=1:200/LEN=12.2/XSKIP=10/YSKIP=8 i/j,j/i
SHOW SYMBOL ppl_vec*
PPL_VECLEN = "  12.2"
PPL_VEC_XSKIP = "10"
PPL_VEC_YSKIP = "8"
 
! Also, vector/KEY turns on the key even if /NOLAB was set.
VECTOR/NOLAB/KEY/I=1:300/J=1:200/LEN=12.2/XSKIP=10/YSKIP=6 i/j,j/i
 
VECTOR/OVER/KEY/NOLAB/I=1:300/J=1:200/LEN=12.2/XSKIP=10/YSKIP=4 i/j,j/i
*** Running ferret script: bn_variance_large.jnl
! bn_variance_large.jnl
! Previous to v6.6.4, these returned messages **too big**
 
USE coads_climatology
LET huge = sst*1.e18
STAT/L=1 huge
 
             SST*1.E18
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 16200 (180*90*1*1*1*1)
 # flagged as bad  data: 6694
 Minimum value: -1.8E+18
 Maximum value: 3.1E+19
 Mean    value: 1.652E+19 (unweighted average)
 Standard deviation: 1.0139E+19
SHADE/L=1/LEV=v huge
 
LET huge = sst*1.e25
STAT/L=1 huge
 
             SST*1.E25
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 16200 (180*90*1*1*1*1)
 # flagged as bad  data: 6694
 Minimum value: -1.8E+25
 Maximum value: 3.1E+26
 Mean    value: 1.652E+26 (unweighted average)
 Standard deviation: 1.0139E+26
SHADE/L=1/LEV=v huge
 
CANCEL SYMBOL lev*
*** Running ferret script: bn_labnum_calendar.jnl
! bn_labnum_calendar.jn.
! Define new symbol, when a Calendar label is on
! the plot, pointing to its ppl label number.
 
! Use a non-standard calendar
! label LABNUM_CALEN is defined.
 
use gt4d011
set axis/calendar=noleap `temp,return=taxis`
 !-> set axis/calendar=noleap TIME1
plot/x=132w/y=2n/k=1 temp
sh sym LABNUM_CALEND
LABNUM_CALEND = "4"
sh sym lab($labnum_calend)
 !-> sh sym lab4
LAB4 = "CALENDAR: NOLEAP"
 
*** Running ferret script: bn665_bug_fixes.jnl
! bn65_bug_fixes.jnl
! test various fixes that went into version 6.6.5
! 11/2010 ACM
!
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err664_xml_keep_case
! err664_xml_keep_case.jnl
!
! See bug 1177, xml output should keep the original case of
! variables and axis names.  Previously xml output upcased
! variable and coordinate axis names.
!
! This dataset has variables and axes in various cases:
! upper case axis TIME
! lower case axis zt, variable temp
! mixed case axes grid_x_T, grid_y_T
 
!******* Note this is NOT implemented in the V6.65 release ******!
!******* Needs further changes to integrate it with LAS    ******!
 
use a_cartesian_bug1179.nc
sh var/xml
 
! List the xml for just the axes in this file. sho axis/all/xml
! lists all axes here at the end of the benchmarks.
 
LET axis_names = ..dimnames
LET nd = ..ndims
REPEAT/RANGE=1:`nd`/name=m (DEFINE SYMBOL m = `m`; SH AXIS/XML `axis_names[i=($m)]`)
 !-> REPEAT/RANGE=1:4/name=m (DEFINE SYMBOL m = `m`; SH AXIS/XML `axis_names[i=($m)]`)
!-> REPEAT: M:1
 !-> DEFINE SYMBOL m = 1
 !-> SH AXIS/XML TIME
<axes>
<axis name="TIME">
<attribute name="direction" type="char">
   <value><![CDATA[L]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[days since 1900-01-01 00:00:00]]></value>
</attribute>
<attribute name="length" type="short">
   <value>1</value>
</attribute>
<attribute name="start" type="double">
   <value>1900-02-15 03:00:00</value>
</attribute>
<attribute name="end" type="double">
   <value>1900-02-15 03:00:00</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value><![CDATA[yes]]></value>
</attribute>
<attribute name="time_origin" type="char">
   <value><![CDATA[1900-01-01 00:00:00]]></value>
</attribute>
<attribute name="calendar" type="char">
   <value><![CDATA[JULIAN]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[TIME]]></value>
</attribute>
</axis>
</axes>
!-> REPEAT: M:2
 !-> DEFINE SYMBOL m = 2
 !-> SH AXIS/XML grid_x_T
<axes>
<axis name="GRID_X_T">
<attribute name="direction" type="char">
   <value><![CDATA[I]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[degrees_east]]></value>
</attribute>
<attribute name="length" type="short">
   <value>1</value>
</attribute>
<attribute name="start" type="double">
   <value>79</value>
</attribute>
<attribute name="end" type="double">
   <value>79</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[Nominal Longitude of T-cell center]]></value>
</attribute>
<attribute name="cartesian_axis" type="char">
   <value><![CDATA[X]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[grid_x_T]]></value>
</attribute>
</axis>
</axes>
!-> REPEAT: M:3
 !-> DEFINE SYMBOL m = 3
 !-> SH AXIS/XML grid_y_T
<axes>
<axis name="GRID_Y_T">
<attribute name="direction" type="char">
   <value><![CDATA[J]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[degrees_north]]></value>
</attribute>
<attribute name="length" type="short">
   <value>1</value>
</attribute>
<attribute name="start" type="double">
   <value>-0.25</value>
</attribute>
<attribute name="end" type="double">
   <value>-0.25</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[Nominal Latitude of T-cell center]]></value>
</attribute>
<attribute name="cartesian_axis" type="char">
   <value><![CDATA[Y]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[grid_y_T]]></value>
</attribute>
</axis>
</axes>
!-> REPEAT: M:4
 !-> DEFINE SYMBOL m = 4
 !-> SH AXIS/XML zt
<axes>
<axis name="ZT">
<attribute name="direction" type="char">
   <value><![CDATA[K]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[meters]]></value>
</attribute>
<attribute name="length" type="short">
   <value>10</value>
</attribute>
<attribute name="start" type="double">
   <value>22.5</value>
</attribute>
<attribute name="end" type="double">
   <value>157.9952</value>
</attribute>
<attribute name="positive" type="char">
   <value><![CDATA[down]]></value>
</attribute>
<attribute name="point_spacing" type="char">
   <value>uneven</value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[zt]]></value>
</attribute>
<attribute name="cartesian_axis" type="char">
   <value><![CDATA[z]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[zt]]></value>
</attribute>
<attribute name="bounds" type="char">
   <value>zt_bnds</value>
</attribute>
</axis>
</axes>
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err664_xml_one_point_axis
! err664_xml_one_point_axis.jnl
! See LAS ticket 969.
! Previously the xml listing incorrectly skipped valid one-point axes.
! (When an axis is averaged away xml listings correctly
! skip the now-degenerate axis.
 
USE a_cartesian_bug1179.nc
SH DAT
     currently SET data sets:
    1> ./data/a_cartesian_bug1179.nc  (default)
 name     title                             I         J         K         L
 TEMP     THETA_FO(SALT_EXTRAP,TEMP_EXTRA  1:1       1:1       1:10      1:1
 
 
LET/D=1 a = temp
! These listings should show the X,Y, and T axes, valid one-point axes
! and also the Z axis which has 10 points.
SH VAR/XML
<global>
<var name="A[D=./data/a_cartesian_bug1179.nc]">
<attribute name="definition" type="char">
   <value><![CDATA[TEMP]]></value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="GHU1">
<axes>
<xaxis>GRID_X_T</xaxis>
<yaxis>GRID_Y_T</yaxis>
<zaxis>ZT</zaxis>
<taxis>TIME</taxis>
</axes>
</grid>
</var>
</global>
 
CANCEL VAR a
 
LET/D=1 temp_ave_t = temp[Z=37.5:112.5@AVE]
! These listings should show the X,Y, and T axes, valid one-point axes
! but not the Z axis, which has been averaged away.
SH VAR/XML
<global>
<var name="TEMP_AVE_T[D=./data/a_cartesian_bug1179.nc]">
<attribute name="definition" type="char">
   <value><![CDATA[TEMP[Z=37.5:112.5@AVE]]]></value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="GHU1">
<axes>
<xaxis>GRID_X_T</xaxis>
<yaxis>GRID_Y_T</yaxis>
<taxis>TIME</taxis>
</axes>
</grid>
</var>
<var name="A[D=./data/a_cartesian_bug1179.nc]">
<attribute name="definition" type="char">
   <value><![CDATA[TEMP]]></value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="GHU1">
<axes>
<xaxis>GRID_X_T</xaxis>
<yaxis>GRID_Y_T</yaxis>
<zaxis>ZT</zaxis>
<taxis>TIME</taxis>
</axes>
</grid>
</var>
</global>
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err65_read_epic_cdf
! Ned Cokelet reports that the time coordinate is read incorrectly
! from this file.  Should translate to  04-MAY-2007 05:02
! Bug was in v6.4 - 6.6 Ferret
 
set mode calendar:minutes ! this was set to months, back in bn_pattern.jnl
use epic_formatted_file.nc
list/prec=7 t[gt=t_28]
             VARIABLE : T
                        axis TIME
             FILENAME : epic_formatted_file.nc
             TIME     : 04-MAY-2007 05:02
          38825.21
 
! 1/2016 additional tests, reading and saving data,
! getting attribute information.
 
set att/output=all .
save/file=a.nc/clobber/k=1:5 t_28
sp ncdump -h a.nc | grep INST_TYPE
		:INST_TYPE = "Sea-Bird CTD SBE 9" ;
 
let evar = T_28.generic_name
save/append/file=a.nc evar
 
list ..dimnames
             VARIABLE : ..DIMNAMES
             FILENAME : epic_formatted_file.nc
             SUBSET   : 4 points (X)
 1   / 1:"time"
 2   / 2:"dep" 
 3   / 3:"lat" 
 4   / 4:"lon" 
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err664_tax_fcns
! err664_tax_fcns.jnl
! Fixes for tickets 1766 and 1765
 
! 1765 Functions did not test for missing data.
 
 
! tax_ functions
use gt4d011
let tval = t[gt=temp]
 
list tax_dayfrac({`tval[l=1]`,`tval[l=13]`,},tval)
 !-> list tax_dayfrac({22702,24454,},tval)
             VARIABLE : TAX_DAYFRAC({22702,24454,},TVAL)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 points (X)
 1   / 1:  0.5000
 2   / 2:  0.5000
 3   / 3:    ....
list tax_day({`tval[l=1]`,`tval[l=13]`,},tval)
 !-> list tax_day({22702,24454,},tval)
             VARIABLE : TAX_DAY({22702,24454,},TVAL)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 points (X)
 1   / 1:  17.00
 2   / 2:  29.00
 3   / 3:   ....
list tax_month({`tval[l=1]`,`tval[l=13]`,},tval)
 !-> list tax_month({22702,24454,},tval)
             VARIABLE : TAX_MONTH({22702,24454,},TVAL)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 points (X)
 1   / 1:   8.00
 2   / 2:  10.00
 3   / 3:   ....
list tax_year({`tval[l=1]`,`tval[l=13]`,},tval)
 !-> list tax_year({22702,24454,},tval)
             VARIABLE : TAX_YEAR({22702,24454,},TVAL)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 points (X)
 1   / 1:  1982.
 2   / 2:  1982.
 3   / 3:   ....
 
! 1766 tax_year retured 0 for year 0001
 
def ax/edge/t=1-jan-0000:1-jan-0005:1/unit=year tax
let a = t[gt=tax]
list tax_year(a,a)
             VARIABLE : TAX_YEAR(A,A)
             SUBSET   : 6 points (TIME)
 JUL-0000 / 1:  0.000
 JUL-0001 / 2:  1.000
 JUL-0002 / 3:  2.000
 JUL-0003 / 4:  3.000
 JUL-0004 / 5:  4.000
 JUL-0005 / 6:  5.000
 
! Likewise no year for year 0000 and 0001 in tax_datestring
 list tax_datestring(a, a, "day")
             VARIABLE : TAX_DATESTRING(A, A, "day")
             SUBSET   : 6 points (TIME)
 JUL-0000 / 1:"01-JUL-0000"
 JUL-0001 / 2:"01-JUL-0001"
 JUL-0002 / 3:"02-JUL-0002"
 JUL-0003 / 4:"02-JUL-0003"
 JUL-0004 / 5:"01-JUL-0004"
 JUL-0005 / 6:"01-JUL-0005"
 
*** Running ferret script: bn_floatstr.jnl
! bn_floatstr.jnl
! testing new function to convert floating-point
! variables to strings.
 
LET string = FLOATSTR({3.14159,2.71828},"(f3.1)")
LIST string
             VARIABLE : FLOATSTR({3.14159,2.71828},"(f3.1)")
             SUBSET   : 2 points (X)
 1   / 1:"3.1"
 2   / 2:"2.7"
 
! Missing data returned as the null string
LET string = FLOATSTR({3.14159,2.71828,},"(g8.2)")
LIST string
             VARIABLE : FLOATSTR({3.14159,2.71828,},"(g8.2)")
             SUBSET   : 3 points (X)
 1   / 1:" 3.1"
 2   / 2:" 2.7"
 3   / 3:""    
 
! Test some large and small values
LET var = {3.14159,2.71828,}
LIST FLOATSTR(36*var,"(e9.4)")
             VARIABLE : FLOATSTR(36*VAR,"(e9.4)")
             SUBSET   : 3 points (X)
 1   / 1:".1131E+03"
 2   / 2:".9786E+02"
 3   / 3:""         
LIST FLOATSTR(1.e14*var,"(e9.4)")
             VARIABLE : FLOATSTR(1.E14*VAR,"(e9.4)")
             SUBSET   : 3 points (X)
 1   / 1:".3142E+15"
 2   / 2:".2718E+15"
 3   / 3:""         
LIST FLOATSTR(1.e-14*var,"(e9.4)")
             VARIABLE : FLOATSTR(1.E-14*VAR,"(e9.4)")
             SUBSET   : 3 points (X)
 1   / 1:".3142E-13"
 2   / 2:".2718E-13"
 3   / 3:""         
LIST FLOATSTR(1.e-14*var,"(f4.1)")
             VARIABLE : FLOATSTR(1.E-14*VAR,"(f4.1)")
             SUBSET   : 3 points (X)
 1   / 1:" 0.0"
 2   / 2:" 0.0"
 3   / 3:""    
LIST FLOATSTR(1.e-14*var,"(1pg9.2)")
             VARIABLE : FLOATSTR(1.E-14*VAR,"(1pg9.2)")
             SUBSET   : 3 points (X)
 1   / 1:" 3.14E-14"
 2   / 2:" 2.72E-14"
 3   / 3:""         
 
! Result shape is inherited from the input variable
USE gt4d011.cdf
LIST/I=100/J=36:38/T=1-dec-1982:1-jan-1983 FLOATSTR(tauy, "(f8.4)")
             VARIABLE : FLOATSTR(TAUY, "(f8.4)")
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 6 points (LATITUDE-TIME)
             LONGITUDE: 130W
                         3S        2.67S     2.33S   
                          36        37        38
 28-NOV-1982 22 / 18:" -0.0272"" -0.0240"" -0.0208"
 05-DEC-1982 00 / 19:" -0.0283"" -0.0252"" -0.0220"
 11-DEC-1982 02 / 20:" -0.0294"" -0.0263"" -0.0232"
 17-DEC-1982 04 / 21:" -0.0357"" -0.0324"" -0.0291"
 23-DEC-1982 06 / 22:" -0.0470"" -0.0434"" -0.0397"
 29-DEC-1982 08 / 23:" -0.0583"" -0.0543"" -0.0503"
 
USE coads_climatology
LET var =  FLOATSTR(sst,"(1pg8.3)")
 
LIST/X=165W:135W/Y=-50/L=1 var
             VARIABLE : FLOATSTR(SST,"(1pg8.3)")
             FILENAME : coads_climatology.cdf
             SUBSET   : 16 points (LONGITUDE)
             LATITUDE : 51S
             TIME     : 16-JAN 06:00
                51S   
                 20
 165W   /  88:"10.5"
 163W   /  89:"11.2"
 161W   /  90:"11.8"
 159W   /  91:"11.0"
 157W   /  92:"10.7"
 155W   /  93:"10.9"
 153W   /  94:"10.7"
 151W   /  95:"10.5"
 149W   /  96:"10.6"
 147W   /  97:"11.0"
 145W   /  98:"10.1"
 143W   /  99:"11.0"
 141W   / 100:""    
 139W   / 101:""    
 137W   / 102:""    
 135W   / 103:""    
LIST/X=165W:135W/Y=-50/L=1 STRLEN(var)
             VARIABLE : STRLEN(VAR)
             FILENAME : coads_climatology.cdf
             SUBSET   : 16 points (LONGITUDE)
             LATITUDE : 51S
             TIME     : 16-JAN 06:00
                 51S   
                 20
 165W   /  88:  4.000
 163W   /  89:  4.000
 161W   /  90:  4.000
 159W   /  91:  4.000
 157W   /  92:  4.000
 155W   /  93:  4.000
 153W   /  94:  4.000
 151W   /  95:  4.000
 149W   /  96:  4.000
 147W   /  97:  4.000
 145W   /  98:  4.000
 143W   /  99:  4.000
 141W   / 100:  0.000
 139W   / 101:  0.000
 137W   / 102:  0.000
 135W   / 103:  0.000
*** Running ferret script: bn67_bug_fixes.jnl
! bn67_bug_fixes.jnl
! test various fixes that went into version 6.7
! 2/2011 ACM
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err665_sum_4d_labels
! A multi-dimensioned sum is now done as a 4D transformation.
! the labels on a LISTing of the result contained ???
! ticket 1788
 
use coads_climatology
list sst[X=125E,Y=75S:75N@sum,l=1:12@sum]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             LONGITUDE: 125E
             LATITUDE : 75S to 75N (YT summed)
             TIME     : 01-JAN 00:45 to 31-DEC 18:13 (YT summed)
          7563.
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err665_din
! err665_din
! Fixing incorrect latitude corrections for single-point y axis,
! and the @DIN transformation. See ticket 1348, comment 12.
 
! Compute the correct area of a 10m-deep, 1-deglon cell at 26.5N.
let pi = 3.1415926
let/unit="m"/title="authalic radius of earth" r_authalic = 6371005
let/unit="degrees_north" lat = 26.5
let/unit="degrees_east" dx = 1
let/unit="m" dz = 10
let dx_meters = r_authalic * cos(lat * pi/180) * (dx * pi/180)
list dx_meters*dz
             VARIABLE : DX_METERS*DZ
          995122.
 
! Next try to reproduce this with Ferret.
! First make a one-cell XYZ variable, with a value of 1.
def ax/x=279:280:1/modulo=360/unit=degrees_east/edge xax
def ax/y=`lat-0.5`:`lat+0.5`:1/unit=degrees_north/edge yax
 !-> def ax/y=26:27:1/unit=degrees_north/edge yax
def ax/z=0:10:10/unit=m/edge/depth zax
let p = 1+0*(x[gx=xax]+y[gy=yax]+z[gz=zax])
 
! Compute its integral (area) over XZ.
list p[x=279:380@din,z=0:10@din]
             VARIABLE : 1+0*(X[GX=XAX]+Y[GY=YAX]+Z[GZ=ZAX])
             LONGITUDE: 81W to 20E(380) (XZ integ.)
             LATITUDE : 26.5N
             DEPTH (m): 0 to 10 (XZ integ.)
          995121.
 
 
! Now do it farther north.
LET/unit="degrees_north" lat = 72.5
list dx_meters*dz
             VARIABLE : DX_METERS*DZ
          334370.
 
! Next try to reproduce this with Ferret.
! Compute its integral (area) over XZ.
def ax/y=`lat-0.5`:`lat+0.5`:1/unit=degrees_north/edge yax
 !-> def ax/y=72:73:1/unit=degrees_north/edge yax
list p[x=279:380@din,z=0:10@din]
             VARIABLE : 1+0*(X[GX=XAX]+Y[GY=YAX]+Z[GZ=ZAX])
             LONGITUDE: 81W to 20E(380) (XZ integ.)
             LATITUDE : 72.5N
             DEPTH (m): 0 to 10 (XZ integ.)
          334370.
 
! Now in the south.
LET/unit="degrees_north" lat = -72.5
list dx_meters*dz
             VARIABLE : DX_METERS*DZ
          334370.
 
! Next try to reproduce this with Ferret.
! Compute its integral (area) over XZ.
def ax/y=`lat-0.5`:`lat+0.5`:1/unit=degrees_north/edge yax
 !-> def ax/y=-73:-72:1/unit=degrees_north/edge yax
list p[x=279:380@din,z=0:10@din]
             VARIABLE : 1+0*(X[GX=XAX]+Y[GY=YAX]+Z[GZ=ZAX])
             LONGITUDE: 81W to 20E(380) (XZ integ.)
             LATITUDE : 72.5S
             DEPTH (m): 0 to 10 (XZ integ.)
          334370.
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err665_centered_lev
! err665_centered_lev
! Bug 1803; computation of new levels isnt requested for
! centered levels after a SHADE/LINE/LEV=c or FILL/LINE/LEV=c
 
USE coads_climatology
SHADE/L=1/LINE/KEY/LEV=c sst
SHO SYM lev*
LEV_TEXT = "C"
LEV_MIN = "-32"
LEV_MAX = "32"
LEV_NUM = "32"
LEV_DEL = "2"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "-32,-30,-28,-26,-24,-22,-20,-18,-16,-14,-12,-10,-8,-6,-4,-2,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32"
 
SHADE/L=1/LINE/KEY/LEV=10c sst
SHO SYM lev*
LEV_TEXT = "10C"
LEV_MIN = "-35"
LEV_MAX = "35"
LEV_NUM = "14"
LEV_DEL = "5"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "-35,-30,-25,-20,-15,-10,-5,0,5,10,15,20,25,30,35"
 
FILL/L=3/LINE/KEY/LEV=c sst
SHO SYM lev*
LEV_TEXT = "C"
LEV_MIN = "-34"
LEV_MAX = "34"
LEV_NUM = "34"
LEV_DEL = "2"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "-34,-32,-30,-28,-26,-24,-22,-20,-18,-16,-14,-12,-10,-8,-6,-4,-2,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34"
 
FILL/L=3/LINE/KEY/LEV=10c sst
SHO SYM lev*
LEV_TEXT = "10C"
LEV_MIN = "-35"
LEV_MAX = "35"
LEV_NUM = "14"
LEV_DEL = "5"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "-35,-30,-25,-20,-15,-10,-5,0,5,10,15,20,25,30,35"
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err665_hours_since_T
! err665_hours_since_T.jnl
! Ticket 1806: allow time-axis units string to
! be written with a T between the date and time parts,
! e.g. units: "hours since 2011-03-08T12:00:00Z"
 
! Check that T0 includes hour 12:00
! Previously the hours, minutes, seconds were set to 00
 
use hourst.nc
sh axis/all hourax
 name       axis              # pts   start                end
 HOURAX    TIME                29 r   01-JAN-2001 12:00    15-JAN-2001 12:00
T0 = 15-JAN-1901 12:00:00
   Axis span (to cell edges) = 348
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err667_att_too_long
! err667_att_too_long.jnl
! 3/25/2011 ACM
! bug 1820; too-long string attribute causes crash or hang
 
use toolong.nc
sh dat/att
     currently SET data sets:
    1> ./data/toolong.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        28   T       FERRET V6.7 (beta) 25-Mar-11
                                 Conventions     CHAR        6    F       CF-1.0
                                 nco_input_file_number
                                                 INT         1    F       1000
                                 nco_input_file_list
                                                 CHAR        2760 F       b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0001.SURF.nc b40.coup_carb.004.cam2.h0.0002.SURF.nc b40.coup_carb.004.cam2.h0.0003.SURF.nc b40.coup_carb.004.cam2.h0.0004.SURF.nc b40.coup_carb.004.cam2.h0.0005.SURF.nc b40.coup_carb.004.cam2.h0.0006.SURF.nc b40.coup_carb.004.cam2.h0.0007.SURF.nc b40.coup_carb.004.cam2.h0.0008.SURF.nc b40.coup_carb.004.cam2.h0.0009.SURF.nc b40.coup_carb.004.cam2.h0.0010.SURF.nc b40.coup_carb.004.cam2.h0.0011.SURF.nc b40.coup_carb.004.cam2.h0.0012.SURF.nc b40.coup_carb.004.cam2.h0.0013.SURF.nc b40.coup_carb.004.cam2.h0.0014.SURF.nc b40.coup_carb.004.cam2.h0.0015.SURF.nc b40.coup_carb.004.cam2.h0.0016.SURF.nc b40.coup_carb.004.cam2.h0.0017.SURF.nc b40.coup_carb.004.cam2.h0.0018.SURF.nc b40.coup_carb.004.cam2.h0.0019.SURF.nc b40.coup_carb.004.cam2.h0.0020.SURF.nc b40.coup_carb.004.cam2.h0.0021.SURF.nc b40.coup_carb.004.cam2.h0.0022.SURF.nc b40.coup_carb.004.cam2.h0.0023.SURF.nc b40.coup_carb.004.cam2.h0.0024.SURF.nc b40.coup_carb.004.cam2.h0.0025.SURF.nc b40.coup_carb.004.cam2.h0.0026.SURF.nc b40.coup_carb.004.cam2.h0.0027.SURF.nc b40.coup_carb.004.cam2.h0.0028.SURF.nc b40.coup_carb.004.cam2.h0.0029.SURF.nc b40.coup_carb.004.cam2.h0.0030.SURF.nc b40.coup_carb.004.cam2.h0.0031.SURF.nc b40.coup_carb.004.cam2.h0.0032.SURF.nc b40.coup_carb.004.cam2.h0.0033.SURF.nc b40.coup_carb.004.cam2.h0.0034.SURF.nc b40.coup_carb.004.cam2.h0.0035.SURF.nc b40.coup_carb.004.cam2.h0.0036.SURF.nc b40.coup_carb.004.cam2.h0.0037.SURF.nc b40.coup_carb.004.cam2.h0.0038.SURF.nc b40.coup_carb.004.cam2.h0.0039.SURF.nc b40.coup_carb.004.cam2.h0.0040.SURF.nc b40.coup_carb.004.cam2.h0.0041.SURF.nc b40.coup_carb.004.cam2.h0.0042.SURF.nc b40.coup_carb.004.cam2.h0.0043.SURF.nc b40.coup_carb.004.cam2.h0.0044.SURF.nc b40.coup_carb.004.cam2.h0.0045.SURF.nc b40.coup_carb.004.cam2.h0.0046.SURF.nc b40.coup_carb.004.cam2.h0.0047.SURF.nc b40.coup_carb.004.cam2.h0.0048.SURF.nc b40.coup_carb.004.cam2.h0.0049.SURF.nc b40.coup_carb.004.cam2.h0.0050.SURF.nc b40.coup_carb.004.cam2.h0.0051.SURF.nc b40.coup_carb.004.cam2.h0.0052
  
(LON273_289)           DOUBLE    long_name       CHAR        9    T       longitude
                                 units           CHAR        12   T       degrees_east
                                 modulo          DOUBLE      1    T       360
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 orig_file_axname
                                                 CHAR        10   F       LON273_289
  
(LAT54_54)             DOUBLE    long_name       CHAR        8    T       latitude
                                 units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Y
                                 orig_file_axname
                                                 CHAR        8    F       LAT54_54
  
(TIME)                 DOUBLE    long_name       CHAR        23   T       time interval endpoints
                                 units           CHAR        30   T       days since 0001-01-01 00:00:00
                                 calendar        CHAR        6    T       noleap
                                 axis            CHAR        1    T       T
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 SFCO2                 FLOAT     units           CHAR        7    T       kg/m2/s
                                 long_name       CHAR        16   T       CO2 surface flux
                                 history         CHAR        10   T       From SFCO2
  
save/file=aa.nc/clobber sfco2
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err667_mode_desperate
! err667_mode_desperate
! 3/25/2011 ACM
! Fixing bug 1819: too-large requests for value of
! MODE DESPERATE, and formatting of the value of the
! setting in SHOW MODE.
 
! Mode desperate is no longer used as of Ferret v7.2
EXIT/SCRIPT
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err667_dup_axnames
! err667_dup_axnames.jnl
! See bug 1750
!
! create two files with same-named y-axis
def ax/y=-90:90:5 yax_dup_axnames
let g = y[gy=yax_dup_axnames]
save/clob/file=g.nc g
def ax/y=-30:30:5 yax_dup_axnames
let h = y[gy=yax_dup_axnames]
save/clob/file=h.nc h
 
can var g h
can ax yax_dup_axnames
! collect variables into a single file
use g.nc
use h.nc
 
save/clob/file="gh.nc" g[d=1], h[d=2]
 
! When the two datasets are opened, they both have Y axes with the same name
! but different contents, so internally the axis of H is named yax_dup_axnames1.
! If there is not a duplicate name in the output file, we want to write H with
! the original axis name. Check for that.
 
save/clob/file="justh.nc" h[d=2]
save/clob/file="justg.nc" g[d=1]
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err667_string_if
! err667_string_if.jnl
! Previously both of these LIST commands caused a crash.
! tickets 1764, 1795
!
 
let a = {"x","y"}
let b = IF a EQ "x" THEN "z" ELSE a
list b
             VARIABLE : IF A EQ "x" THEN "z" ELSE A
             SUBSET   : 2 points (X)
 1   / 1:"z"
 2   / 2:"y"
 
let strings = {"a","b"}
list IF strings EQ "a" THEN "" ELSE strings
             VARIABLE : IF STRINGS EQ "a" THEN "" ELSE STRINGS
             SUBSET   : 2 points (X)
 1   / 1:"" 
 2   / 2:"b"
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err667_show_var_twice
 ! err667_show_var_twice.jnl
 ! ticket 1825
 
use coads_climatology
sh var sst[d=1]
 SST[D=1]: SEA SURFACE TEMPERATURE, in dataset ./data/coads_climatology.cdf
sh var sst[d=1]
 SST[D=1]: SEA SURFACE TEMPERATURE, in dataset ./data/coads_climatology.cdf
 
!should return nothing
sh var airt
 
let/d=1 airt2 = airt*2
sh var airt2[d=1]
 AIRT2[D=coads_climatology] = AIRT*2
sh var airt2[d=1]
 AIRT2[D=coads_climatology] = AIRT*2
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err667_5d_netcdf
exit/script  ! this test is not valid for 6D Ferret.
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err67_save_append_open
! err67_save_append_open.jnl
! ticket 1832
! SAVE to a file that's open for reading
 
! Create a file
use gt4d011.cdf
save/clobber/file=a.nc temp
can data/all
 
! Open for reading
use a.nc
let tempave = temp[t=@ave]
let temp_mm = temp - tempave
 
! read from the file and then append to it
save/append/file=a.nc temp_mm
 
! The dataset still shows just the original contents
sh dat
     currently SET data sets:
    1> ./a.nc  (default)
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                      1:18      1:22      1:10      1:25
 
can dat/all
 
! Close it and open again.
! Now it shows the variable we appended
use a.nc
sh dat
     currently SET data sets:
    1> ./a.nc  (default)
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                      1:18      1:22      1:10      1:25
 TEMP_MM  TEMP - TEMPAVE                   1:18      1:22      1:10      1:25
       (T=14-AUG-1982 11:00:13-JAN-1983 13:00)
 
 
*** Running ferret script: bn_NaN_note.jnl
! bn_NaN_note.jnl
! Ferret v6.7  2/2011
! The message about no missing flags, and assuming NaN,
! is issued only when MODE DIAGNOSTIC is turned on.
 
! This dataset has no missing-valueu flags on its variables
! No notes on opening it
USE test0
!
! Close it and then open it with MODE DIAG
! Now we get the NOTE
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
SET MODE diag
USE test0
CANCEL MODE diag
*** Running ferret script: bn671_bug_fixes.jnl
! bn671_bug_fixes.jnl
! test various fixes that went into version 6.71
! 4/2011 ACM
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err67_tax_modtime
! err67_tax_modtime.jnl
! 5/17/2011
! tickets 1853, 1854: TAX_* functions returned
! incorrect results when the time axis is modulo
set mode ignore_error
 
!use climatological_axes
!can dat climatological_axes
let tvar = t[gt=month_reg]
 
list/L=15:20 tax_datestring(t[gt=tvar],tvar,"hour")
             VARIABLE : TAX_DATESTRING(T[GT=TVAR],TVAR,"hour")
             SUBSET   : 6 points (TIME)
 17-MAR      / 15:"17-MAR 08"
 16-APR      / 16:"16-APR 19"
 17-MAY      / 17:"17-MAY 05"
 16-JUN      / 18:"16-JUN 16"
 17-JUL      / 19:"17-JUL 02"
 16-AUG      / 20:"16-AUG 13"
list/L=15:20 tax_datestring(t[gt=tvar],tvar,"day")
             VARIABLE : TAX_DATESTRING(T[GT=TVAR],TVAR,"day")
             SUBSET   : 6 points (TIME)
 17-MAR      / 15:"17-MAR"
 16-APR      / 16:"16-APR"
 17-MAY      / 17:"17-MAY"
 16-JUN      / 18:"16-JUN"
 17-JUL      / 19:"17-JUL"
 16-AUG      / 20:"16-AUG"
list/L=15:20 tax_dayfrac(t[gt=tvar],tvar), tax_dayfrac(t[gt=tvar],tvar)*24.
             TIME: 02-MAR 03:32 to 31-AUG 18:27
 Column  1: TAX_DAYFRAC(T[GT=TVAR],TVAR)
 Column  2: EX#2 is TAX_DAYFRAC(T[GT=TVAR],TVAR)*24.
             (C001,V002)   EX#2
17-MAR      / 15:  0.3662   8.79
16-APR      / 16:  0.8031  19.27
17-MAY      / 17:  0.2400   5.76
16-JUN      / 18:  0.6769  16.25
17-JUL      / 19:  0.1138   2.73
16-AUG      / 20:  0.5506  13.21
list/L=15:20 tax_day(t[gt=tvar],tvar), tax_jday(t[gt=tvar],tvar)
             TIME: 02-MAR 03:32 to 31-AUG 18:27
 Column  1: TAX_DAY(T[GT=TVAR],TVAR)
 Column  2: TAX_JDAY(T[GT=TVAR],TVAR)
             (C001,V002)  (C001,V005)
17-MAR      / 15:   17.00    76.0
16-APR      / 16:   16.00   106.0
17-MAY      / 17:   17.00   137.0
16-JUN      / 18:   16.00   167.0
17-JUL      / 19:   17.00   198.0
16-AUG      / 20:   16.00   228.0
list/L=15:20 tax_month(t[gt=tvar],tvar), tax_yearfrac(t[gt=tvar],tvar)
             TIME: 02-MAR 03:32 to 31-AUG 18:27
 Column  1: TAX_MONTH(T[GT=TVAR],TVAR)
 Column  2: TAX_YEARFRAC(T[GT=TVAR],TVAR)
             (C001,V002)  (C001,V005)
17-MAR      / 15:   3.000  0.2092
16-APR      / 16:   4.000  0.2926
17-MAY      / 17:   5.000  0.3760
16-JUN      / 18:   6.000  0.4594
17-JUL      / 19:   7.000  0.5428
16-AUG      / 20:   8.000  0.6262
! the following is an error for a modulo time axis
list/L=15:20 tax_year(t[gt=tvar],tvar)
list tax_units(tvar)
             VARIABLE : TAX_UNITS(TVAR)
          3600.
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err67_save_append_open
! err67_save_append_open.jnl
! ticket 1832
! SAVE to a file that's open for reading
 
! Create a file
use gt4d011.cdf
save/clobber/file=a.nc temp
can data/all
 
! Open for reading
use a.nc
let tempave = temp[t=@ave]
let temp_mm = temp - tempave
 
! read from the file and then append to it
save/append/file=a.nc temp_mm
 
! The dataset still shows just the original contents
sh dat
     currently SET data sets:
    1> ./a.nc  (default)
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                      1:18      1:22      1:10      1:25
 
can dat/all
 
! Close it and open again.
! Now it shows the variable we appended
use a.nc
sh dat
     currently SET data sets:
    1> ./a.nc  (default)
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                      1:18      1:22      1:10      1:25
 TEMP_MM  TEMP - TEMPAVE                   1:18      1:22      1:10      1:25
       (T=14-AUG-1982 11:00:13-JAN-1983 13:00)
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err67_regridding_dyn
! err67_regridding_dyn.jnl
!  6/2011
! See ticket 1862
! Create three variables. Regrid one to the grid
! of the other two which share an X axis and
! have different Y axes; one coarser than the other.
! The regridding and modulo operatinons incorrectly
! re-use intermediate results.
 
! Create test datasets to use
use coads_climatology
let filled = MISSING(sst[L=1], 0)
save/file=cc.nc/clobber filled[x=-179:179]
 
! Define an x axis over a different x range from above,
! and two y axes, same y range but different resoloutions.
 
define axis/x=0:356.25:3.75/units=deg lon
define axis/y=-90:90/npoints=72/units=deg lat1
define axis/y=-90:90/npoints=92/units=deg lat2
 
save/clobber/file=c1.nc filled[gx=lon,gy=lat1]
can mem
save/clobber/file=c2.nc filled[gx=lon,gy=lat2]
 
can dat/all; can mem; can var/all;
 
! Now regrid the data coming in on x=-179:179 to the other grids
use c1
use c2
use cc
 
set view upper
shade filled[d=3,gxy=filled[d=1]]
list/x=330/y=40:90 filled[d=3,gxy=filled[d=1]]
             VARIABLE : MISSING(SST[L=1], 0)
                        regrid: FILLED[D=c1]
             FILENAME : cc.nc
             SUBSET   : 21 points (LATITUDE)
             LONGITUDE: 30W
             TIME     : 16-JAN 06:00
               30W   
               89
 90N   / 72:   ....
 87.5N / 71:   0.00
 84.9N / 70:   0.00
 82.4N / 69:   0.00
 79.9N / 68:   0.00
 77.3N / 67:   0.00
 74.8N / 66:   0.00
 72.3N / 65:   0.00
 69.7N / 64:   0.96
 67.2N / 63:   3.25
 64.6N / 62:   5.60
 62.1N / 61:   6.40
 59.6N / 60:   7.31
 57N   / 59:   7.79
 54.5N / 58:   7.79
 52N   / 57:   9.27
 49.4N / 56:  11.43
 46.9N / 55:  12.80
 44.4N / 54:  14.01
 41.8N / 53:  15.02
 39.3N / 52:  15.98
 
! The bug has data wrapped around incorrectly
set view lower
shade  filled[d=3,gxy=filled[d=2]]
list/x=330/y=40:90 filled[d=3,gxy=filled[d=2]]
             VARIABLE : MISSING(SST[L=1], 0)
                        regrid: FILLED[D=c2]
             FILENAME : cc.nc
             SUBSET   : 26 points (LATITUDE)
             LONGITUDE: 30W
             TIME     : 16-JAN 06:00
               30W   
               89
 90N   / 92:   ....
 88N   / 91:   0.00
 86N   / 90:   0.00
 84.1N / 89:   0.00
 82.1N / 88:   0.00
 80.1N / 87:   0.00
 78.1N / 86:   0.00
 76.2N / 85:   0.00
 74.2N / 84:   0.00
 72.2N / 83:   0.00
 70.2N / 82:   0.59
 68.2N / 81:   2.23
 66.3N / 80:   4.17
 64.3N / 79:   5.74
 62.3N / 78:   6.37
 60.3N / 77:   6.93
 58.4N / 76:   7.66
 56.4N / 75:   7.76
 54.4N / 74:   7.81
 52.4N / 73:   8.75
 50.4N / 72:  10.77
 48.5N / 71:  11.99
 46.5N / 70:  13.01
 44.5N / 69:  13.95
 42.5N / 68:  14.76
 40.5N / 67:  15.50
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err67_reverse_bounds
! err67_reverse_bounds.jnl
!
! Bug in reversing the bounds when an axis is reversed
! previously this gave a warning:
! NOTE: Error in bounds "lev_bnds" or bounds do not enclose point
 
use reverse_z_bnds.nc
list lev_var, zboxlo[gz=lev_var], zboxhi[gz=lev_var]
             DATA SET: ./data/reverse_z_bnds.nc
             Z: 0 to 1
 Column  1: LEV_VAR is a variable on the depth axis (none)
 Column  2: ZBOXLO is ZBOXLO (axis LEV)
 Column  3: ZBOXHI is ZBOXHI (axis LEV)
            LEV_VAR   ZBOXLO ZBOXHI
0.0045 /  1:   24.00  0.0000  0.009
0.0216 /  2:   23.00  0.0089  0.034
0.0542 /  3:   22.00  0.0343  0.074
0.1001 /  4:   21.00  0.0741  0.126
0.1574 /  5:   20.00  0.1262  0.189
0.2239 /  6:   19.00  0.1886  0.259
0.2977 /  7:   18.00  0.2593  0.336
0.3765 /  8:   17.00  0.3361  0.417
0.4565 /  9:   16.00  0.4170  0.496
0.5318 / 10:   15.00  0.4961  0.568
0.5998 / 11:   14.00  0.5676  0.632
0.6608 / 12:   13.00  0.6320  0.690
0.7152 / 13:   12.00  0.6896  0.741
0.7635 / 14:   11.00  0.7408  0.786
0.806  / 15:   10.00  0.7861  0.826
0.8432 / 16:    9.00  0.8259  0.860
0.8754 / 17:    8.00  0.8605  0.890
0.9031 / 18:    7.00  0.8903  0.916
0.9266 / 19:    6.00  0.9158  0.937
0.9464 / 20:    5.00  0.9374  0.955
0.9628 / 21:    4.00  0.9554  0.970
0.9763 / 22:    3.00  0.9703  0.982
0.9873 / 23:    2.00  0.9824  0.992
0.9961 / 24:    1.00  0.9922  1.000
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err67_nrst_trans
! err67_nrst_trans.jnl
!
! See ticket 1875: for short axes the @NRST transform
! missed points - no valid data was returned from this LIST.
 
define axis/x=333:335:1 xax
define axis/x=300:400:10 xlong
let x3 = x[gx=xax]
let var = x3[gx=xlong@nrst]
list var
             VARIABLE : X3[GX=XLONG@NRST]
             SUBSET   : 11 points (X)
 300   /  1:   ....
 310   /  2:   ....
 320   /  3:   ....
 330   /  4:  333.0
 340   /  5:  335.0
 350   /  6:   ....
 360   /  7:   ....
 370   /  8:   ....
 380   /  9:   ....
 390   / 10:   ....
 400   / 11:   ....
*** Running ferret script: bn68_bug_fixes.jnl
! bn68_bug_fixes.jnl
! test various fixes that went into version 6.8
!
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err672_stray_line
! err672_stray_line.jnl
! bug 1545, present in older versions of Ferret too.
! Lines ( as in go land ), that go near but outside the outer
! corners of the plot, either from the bottom to the left side
! of the plot, or from the top to the left, but not crossing
! any axis, may cause a stray line to be drawn outward from the
! corner.
 
use coads_climatology
shade/noax/nolab/nokey sst[x=148.68:262.0,y=-29.83:45.35,L=1]
 
! Line near but not crossing from top to left
plot/vs/over/nolab/line/sym {148.83, 148.33}, {45.5, 45.25}
 
! Line near but not crossing from bottom to the left
plot/over/vs/nolab/line/sym {148.83, 148.17}, {-29.96, -29.68}
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err672_tax_functions_prec
! See ticket 1642: arg 1 of TAX_* functions
! is a single-precision variale representing double-precision coords.
 
 
set mode ignore
 
define axis/t=30-jan-2010:31-dec-2010:86400/unit=seconds taxis
let var = t[gt=taxis]
 
! Previously this was incorrect- varied in the seconds place
list/l=1:7 TAX_DATESTRING(t[gt=var],var,"seconds")
             VARIABLE : TAX_DATESTRING(T[GT=VAR],VAR,"seconds")
             SUBSET   : 7 points (TIME)
 30-JAN-2010 00 / 1:"30-JAN-2010 00:00:00.0"
 31-JAN-2010 00 / 2:"31-JAN-2010 00:00:00.0"
 01-FEB-2010 00 / 3:"01-FEB-2010 00:00:00.0"
 02-FEB-2010 00 / 4:"02-FEB-2010 00:00:00.0"
 03-FEB-2010 00 / 5:"03-FEB-2010 00:00:00.0"
 04-FEB-2010 00 / 6:"04-FEB-2010 00:00:00.0"
 05-FEB-2010 00 / 7:"05-FEB-2010 00:00:00.0"
 
! Note there is no complete fix. This axis needs more than single-
! precision representation at the far end.
list/t=1-dec-2010:5-dec-2010 TAX_DATESTRING(t[gt=var],var,"seconds")
             VARIABLE : TAX_DATESTRING(T[GT=VAR],VAR,"seconds")
             SUBSET   : 5 points (TIME)
 01-DEC-2010 00 / 306:"01-DEC-2010 00:00:00.0"
 02-DEC-2010 00 / 307:"02-DEC-2010 00:00:00.0"
 03-DEC-2010 00 / 308:"03-DEC-2010 00:00:00.0"
 04-DEC-2010 00 / 309:"04-DEC-2010 00:00:00.0"
 05-DEC-2010 00 / 310:"05-DEC-2010 00:00:00.0"
 
! Likewise all these were off by a bit (except month and year)
list/l=1:7 TAX_DAY(t[gt=var], var)
             VARIABLE : TAX_DAY(T[GT=VAR], VAR)
             SUBSET   : 7 points (TIME)
 30-JAN-2010 00 / 1:  30.00
 31-JAN-2010 00 / 2:  31.00
 01-FEB-2010 00 / 3:   1.00
 02-FEB-2010 00 / 4:   2.00
 03-FEB-2010 00 / 5:   3.00
 04-FEB-2010 00 / 6:   4.00
 05-FEB-2010 00 / 7:   5.00
list/l=1:7 TAX_DAYFRAC(t[gt=var], var)
             VARIABLE : TAX_DAYFRAC(T[GT=VAR], VAR)
             SUBSET   : 7 points (TIME)
 30-JAN-2010 00 / 1:  0.0000
 31-JAN-2010 00 / 2:  0.0000
 01-FEB-2010 00 / 3:  0.0000
 02-FEB-2010 00 / 4:  0.0000
 03-FEB-2010 00 / 5:  0.0000
 04-FEB-2010 00 / 6:  0.0000
 05-FEB-2010 00 / 7:  0.0000
list/l=1:7 TAX_jday1900(t[gt=var], var)
             VARIABLE : TAX_JDAY1900(T[GT=VAR], VAR)
             SUBSET   : 7 points (TIME)
 30-JAN-2010 00 / 1:  40206.
 31-JAN-2010 00 / 2:  40207.
 01-FEB-2010 00 / 3:  40208.
 02-FEB-2010 00 / 4:  40209.
 03-FEB-2010 00 / 5:  40210.
 04-FEB-2010 00 / 6:  40211.
 05-FEB-2010 00 / 7:  40212.
list/l=1:7 TAX_jday(t[gt=var], var)
             VARIABLE : TAX_JDAY(T[GT=VAR], VAR)
             SUBSET   : 7 points (TIME)
 30-JAN-2010 00 / 1:  30.00
 31-JAN-2010 00 / 2:  31.00
 01-FEB-2010 00 / 3:  32.00
 02-FEB-2010 00 / 4:  33.00
 03-FEB-2010 00 / 5:  34.00
 04-FEB-2010 00 / 6:  35.00
 05-FEB-2010 00 / 7:  36.00
list/l=1:7 TAX_month(t[gt=var], var)
             VARIABLE : TAX_MONTH(T[GT=VAR], VAR)
             SUBSET   : 7 points (TIME)
 30-JAN-2010 00 / 1:  1.000
 31-JAN-2010 00 / 2:  1.000
 01-FEB-2010 00 / 3:  2.000
 02-FEB-2010 00 / 4:  2.000
 03-FEB-2010 00 / 5:  2.000
 04-FEB-2010 00 / 6:  2.000
 05-FEB-2010 00 / 7:  2.000
list/l=1:7 TAX_year(t[gt=var], var)
             VARIABLE : TAX_YEAR(T[GT=VAR], VAR)
             SUBSET   : 7 points (TIME)
 30-JAN-2010 00 / 1:  2010.
 31-JAN-2010 00 / 2:  2010.
 01-FEB-2010 00 / 3:  2010.
 02-FEB-2010 00 / 4:  2010.
 03-FEB-2010 00 / 5:  2010.
 04-FEB-2010 00 / 6:  2010.
 05-FEB-2010 00 / 7:  2010.
list/l=1:7 TAX_yearfrac(t[gt=var], var)
             VARIABLE : TAX_YEARFRAC(T[GT=VAR], VAR)
             SUBSET   : 7 points (TIME)
 30-JAN-2010 00 / 1:  0.08219
 31-JAN-2010 00 / 2:  0.08493
 01-FEB-2010 00 / 3:  0.08767
 02-FEB-2010 00 / 4:  0.09041
 03-FEB-2010 00 / 5:  0.09315
 04-FEB-2010 00 / 6:  0.09589
 05-FEB-2010 00 / 7:  0.09863
 
! This axis even worse, all results the same
! All of these will bail out with repeated ARG1 values
define axis/t=1-jan-2010:2-jan-2010:5/unit=seconds taxis
let var = t[gt=taxis]
list/l=1:7 TAX_DATESTRING(t[gt=var,L=1:50],var[L=1:50],"seconds")
             VARIABLE : TAX_DATESTRING(T[GT=VAR,L=1:50],VAR[L=1:50],"seconds")
             SUBSET   : 7 points (TIME)
 01-JAN-2010 00:00:00 / 1:"01-JAN-2010 00:00:00.0"
 01-JAN-2010 00:00:05 / 2:"01-JAN-2010 00:00:05.0"
 01-JAN-2010 00:00:10 / 3:"01-JAN-2010 00:00:10.0"
 01-JAN-2010 00:00:15 / 4:"01-JAN-2010 00:00:15.0"
 01-JAN-2010 00:00:20 / 5:"01-JAN-2010 00:00:20.0"
 01-JAN-2010 00:00:25 / 6:"01-JAN-2010 00:00:25.0"
 01-JAN-2010 00:00:30 / 7:"01-JAN-2010 00:00:30.0"
 
list/l=1:7 TAX_DAY(t[gt=var], var)
             VARIABLE : TAX_DAY(T[GT=VAR], VAR)
             SUBSET   : 7 points (TIME)
 01-JAN-2010 00:00:00 / 1:  1.000
 01-JAN-2010 00:00:05 / 2:  1.000
 01-JAN-2010 00:00:10 / 3:  1.000
 01-JAN-2010 00:00:15 / 4:  1.000
 01-JAN-2010 00:00:20 / 5:  1.000
 01-JAN-2010 00:00:25 / 6:  1.000
 01-JAN-2010 00:00:30 / 7:  1.000
list/l=1:7 TAX_DAYFRAC(t[gt=var], var)
             VARIABLE : TAX_DAYFRAC(T[GT=VAR], VAR)
             SUBSET   : 7 points (TIME)
 01-JAN-2010 00:00:00 / 1:  0.000E+00
 01-JAN-2010 00:00:05 / 2:  5.787E-05
 01-JAN-2010 00:00:10 / 3:  1.157E-04
 01-JAN-2010 00:00:15 / 4:  1.736E-04
 01-JAN-2010 00:00:20 / 5:  2.315E-04
 01-JAN-2010 00:00:25 / 6:  2.894E-04
 01-JAN-2010 00:00:30 / 7:  3.472E-04
list/l=1:7 TAX_jday1900(t[gt=var], var)
             VARIABLE : TAX_JDAY1900(T[GT=VAR], VAR)
             SUBSET   : 7 points (TIME)
 01-JAN-2010 00:00:00 / 1:  40177.
 01-JAN-2010 00:00:05 / 2:  40177.
 01-JAN-2010 00:00:10 / 3:  40177.
 01-JAN-2010 00:00:15 / 4:  40177.
 01-JAN-2010 00:00:20 / 5:  40177.
 01-JAN-2010 00:00:25 / 6:  40177.
 01-JAN-2010 00:00:30 / 7:  40177.
list/l=1:7 TAX_jday(t[gt=var], var)
             VARIABLE : TAX_JDAY(T[GT=VAR], VAR)
             SUBSET   : 7 points (TIME)
 01-JAN-2010 00:00:00 / 1:  1.000
 01-JAN-2010 00:00:05 / 2:  1.000
 01-JAN-2010 00:00:10 / 3:  1.000
 01-JAN-2010 00:00:15 / 4:  1.000
 01-JAN-2010 00:00:20 / 5:  1.000
 01-JAN-2010 00:00:25 / 6:  1.000
 01-JAN-2010 00:00:30 / 7:  1.000
list/l=1:7 TAX_month(t[gt=var], var)
             VARIABLE : TAX_MONTH(T[GT=VAR], VAR)
             SUBSET   : 7 points (TIME)
 01-JAN-2010 00:00:00 / 1:  1.000
 01-JAN-2010 00:00:05 / 2:  1.000
 01-JAN-2010 00:00:10 / 3:  1.000
 01-JAN-2010 00:00:15 / 4:  1.000
 01-JAN-2010 00:00:20 / 5:  1.000
 01-JAN-2010 00:00:25 / 6:  1.000
 01-JAN-2010 00:00:30 / 7:  1.000
list/l=1:7 TAX_year(t[gt=var], var)
             VARIABLE : TAX_YEAR(T[GT=VAR], VAR)
             SUBSET   : 7 points (TIME)
 01-JAN-2010 00:00:00 / 1:  2010.
 01-JAN-2010 00:00:05 / 2:  2010.
 01-JAN-2010 00:00:10 / 3:  2010.
 01-JAN-2010 00:00:15 / 4:  2010.
 01-JAN-2010 00:00:20 / 5:  2010.
 01-JAN-2010 00:00:25 / 6:  2010.
 01-JAN-2010 00:00:30 / 7:  2010.
list/l=1:7 TAX_yearfrac(t[gt=var], var)
             VARIABLE : TAX_YEARFRAC(T[GT=VAR], VAR)
             SUBSET   : 7 points (TIME)
 01-JAN-2010 00:00:00 / 1:  0.002740
 01-JAN-2010 00:00:05 / 2:  0.002740
 01-JAN-2010 00:00:10 / 3:  0.002740
 01-JAN-2010 00:00:15 / 4:  0.002740
 01-JAN-2010 00:00:20 / 5:  0.002740
 01-JAN-2010 00:00:25 / 6:  0.002741
 01-JAN-2010 00:00:30 / 7:  0.002741
 
! This example from Patrick B. Output of TAX_dayfrac repeats.
! We need to just return an error mesage. Cant represent 2.5 years
! of seconds as a single-precision variable. (Can't represent even a month...)
 
def axis/t="1-jan-2008":"31-dec-2010":1/units=seconds/t0="1-jan-2008" mytaxis
let tt = t[gt=mytaxis]
 
let a =  TAX_year(tt[t="02-JUN-2010:13:34:40":"02-JUN-2010:13:34:50"], tt[L=76340000:76350000])
let b =  TAX_jday(tt[t="02-JUN-2010:13:34:40":"02-JUN-2010:13:34:50"], tt[L=76340000:76350000])
let c =  TAX_dayfrac(tt[t="02-JUN-2010:13:34:40":"02-JUN-2010:13:34:50"], tt[L=76340000:76350000])
 
list/prec=7 a
             VARIABLE : TAX_YEAR(TT[T="02-JUN-2010:13:34:40":"02-JUN-2010:13:34:50"], TT[L=76340000:76350000])
             SUBSET   : 11 points (TIME)
 02-JUN-2010 13:34:40 / 76340081:  2010.000
 02-JUN-2010 13:34:41 / 76340082:  2010.000
 02-JUN-2010 13:34:42 / 76340083:  2010.000
 02-JUN-2010 13:34:43 / 76340084:  2010.000
 02-JUN-2010 13:34:44 / 76340085:  2010.000
 02-JUN-2010 13:34:45 / 76340086:  2010.000
 02-JUN-2010 13:34:46 / 76340087:  2010.000
 02-JUN-2010 13:34:47 / 76340088:  2010.000
 02-JUN-2010 13:34:48 / 76340089:  2010.000
 02-JUN-2010 13:34:49 / 76340090:  2010.000
 02-JUN-2010 13:34:50 / 76340091:  2010.000
list/prec=7 b
             VARIABLE : TAX_JDAY(TT[T="02-JUN-2010:13:34:40":"02-JUN-2010:13:34:50"], TT[L=76340000:76350000])
             SUBSET   : 11 points (TIME)
 02-JUN-2010 13:34:40 / 76340081:  153.0000
 02-JUN-2010 13:34:41 / 76340082:  153.0000
 02-JUN-2010 13:34:42 / 76340083:  153.0000
 02-JUN-2010 13:34:43 / 76340084:  153.0000
 02-JUN-2010 13:34:44 / 76340085:  153.0000
 02-JUN-2010 13:34:45 / 76340086:  153.0000
 02-JUN-2010 13:34:46 / 76340087:  153.0000
 02-JUN-2010 13:34:47 / 76340088:  153.0000
 02-JUN-2010 13:34:48 / 76340089:  153.0000
 02-JUN-2010 13:34:49 / 76340090:  153.0000
 02-JUN-2010 13:34:50 / 76340091:  153.0000
list/prec=7 c
             VARIABLE : TAX_DAYFRAC(TT[T="02-JUN-2010:13:34:40":"02-JUN-2010:13:34:50"], TT[L=76340000:76350000])
             SUBSET   : 11 points (TIME)
 02-JUN-2010 13:34:40 / 76340081:  0.5657407
 02-JUN-2010 13:34:41 / 76340082:  0.5657523
 02-JUN-2010 13:34:42 / 76340083:  0.5657639
 02-JUN-2010 13:34:43 / 76340084:  0.5657755
 02-JUN-2010 13:34:44 / 76340085:  0.5657870
 02-JUN-2010 13:34:45 / 76340086:  0.5657986
 02-JUN-2010 13:34:46 / 76340087:  0.5658102
 02-JUN-2010 13:34:47 / 76340088:  0.5658218
 02-JUN-2010 13:34:48 / 76340089:  0.5658333
 02-JUN-2010 13:34:49 / 76340090:  0.5658449
 02-JUN-2010 13:34:50 / 76340091:  0.5658565
 
! Can do this example
let a =  TAX_year(tt[t="13-JAN-2008:13:34:40":"13-JAN-2008:13:34:50"], tt[L=1080000:1090000])
let b =  TAX_jday(tt[t="13-JAN-2008:13:34:40":"13-JAN-2008:13:34:50"], tt[L=1080000:1090000])
let c =  TAX_dayfrac(tt[t="13-JAN-2008:13:34:40":"13-JAN-2008:13:34:50"], tt[L=1080000:1090000])
 
list/prec=7 a
             VARIABLE : TAX_YEAR(TT[T="13-JAN-2008:13:34:40":"13-JAN-2008:13:34:50"], TT[L=1080000:1090000])
             SUBSET   : 11 points (TIME)
 13-JAN-2008 13:34:40 / 1085681:  2008.000
 13-JAN-2008 13:34:41 / 1085682:  2008.000
 13-JAN-2008 13:34:42 / 1085683:  2008.000
 13-JAN-2008 13:34:43 / 1085684:  2008.000
 13-JAN-2008 13:34:44 / 1085685:  2008.000
 13-JAN-2008 13:34:45 / 1085686:  2008.000
 13-JAN-2008 13:34:46 / 1085687:  2008.000
 13-JAN-2008 13:34:47 / 1085688:  2008.000
 13-JAN-2008 13:34:48 / 1085689:  2008.000
 13-JAN-2008 13:34:49 / 1085690:  2008.000
 13-JAN-2008 13:34:50 / 1085691:  2008.000
list/prec=7 b
             VARIABLE : TAX_JDAY(TT[T="13-JAN-2008:13:34:40":"13-JAN-2008:13:34:50"], TT[L=1080000:1090000])
             SUBSET   : 11 points (TIME)
 13-JAN-2008 13:34:40 / 1085681:  13.00000
 13-JAN-2008 13:34:41 / 1085682:  13.00000
 13-JAN-2008 13:34:42 / 1085683:  13.00000
 13-JAN-2008 13:34:43 / 1085684:  13.00000
 13-JAN-2008 13:34:44 / 1085685:  13.00000
 13-JAN-2008 13:34:45 / 1085686:  13.00000
 13-JAN-2008 13:34:46 / 1085687:  13.00000
 13-JAN-2008 13:34:47 / 1085688:  13.00000
 13-JAN-2008 13:34:48 / 1085689:  13.00000
 13-JAN-2008 13:34:49 / 1085690:  13.00000
 13-JAN-2008 13:34:50 / 1085691:  13.00000
list/prec=7 c
             VARIABLE : TAX_DAYFRAC(TT[T="13-JAN-2008:13:34:40":"13-JAN-2008:13:34:50"], TT[L=1080000:1090000])
             SUBSET   : 11 points (TIME)
 13-JAN-2008 13:34:40 / 1085681:  0.5657407
 13-JAN-2008 13:34:41 / 1085682:  0.5657523
 13-JAN-2008 13:34:42 / 1085683:  0.5657639
 13-JAN-2008 13:34:43 / 1085684:  0.5657755
 13-JAN-2008 13:34:44 / 1085685:  0.5657870
 13-JAN-2008 13:34:45 / 1085686:  0.5657986
 13-JAN-2008 13:34:46 / 1085687:  0.5658102
 13-JAN-2008 13:34:47 / 1085688:  0.5658218
 13-JAN-2008 13:34:48 / 1085689:  0.5658333
 13-JAN-2008 13:34:49 / 1085690:  0.5658449
 13-JAN-2008 13:34:50 / 1085691:  0.5658565
 
can mode ignore
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err672_subscr_precision
! err672_subscr_precision.jnl
! See ticket 1888.
 
 
def axis/t="1-jan-2008":"31-dec-2010":1/units=sec/t0="1-jan-2008" mytaxis
let tt = t[gt=mytaxis]
 
! This command should list 11 timesteps, previously listed only 8 (64-bit)
! or 9 (32-bit).
list/t="02-JUN-2010:13:34:40":"02-JUN-2010:13:34:50" tt
             VARIABLE : T[GT=MYTAXIS]
             SUBSET   : 11 points (TIME)
 02-JUN-2010 13:34:40 / 76340081:  7.634E+07
 02-JUN-2010 13:34:41 / 76340082:  7.634E+07
 02-JUN-2010 13:34:42 / 76340083:  7.634E+07
 02-JUN-2010 13:34:43 / 76340084:  7.634E+07
 02-JUN-2010 13:34:44 / 76340085:  7.634E+07
 02-JUN-2010 13:34:45 / 76340086:  7.634E+07
 02-JUN-2010 13:34:46 / 76340087:  7.634E+07
 02-JUN-2010 13:34:47 / 76340088:  7.634E+07
 02-JUN-2010 13:34:48 / 76340089:  7.634E+07
 02-JUN-2010 13:34:49 / 76340090:  7.634E+07
 02-JUN-2010 13:34:50 / 76340091:  7.634E+07
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err672_vert_axislabel
! err672_vert_axislabel.jnl
! bug 1896
!
! When the vertical axis needs a lot of characters
! in the numeric axis, the axis label runs off the edge
! of the plot
 
! starting w/ v683, shrink yaxis lab size only if
! MODE shrink_ylab is set. (ticket 1958)
 
SET MODE shrink_ylab
 
define axis/x=1:100:1 xax
let/units="Observation value" var = 1.e37 * sin(randu(x[gx=xax])-1)
plot var
 
use gt4d011
plot/x=130w psi[t=@din]
 
! If the margins are too small the method just makes a nominal setting.
go margins 0.2 0.6 0.2, 0.2
plot/i=1:200 (sin(x/30))
 
go margins "reset"
 
SET MODE/LAST shrink_ylab
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err672_axis_label_prec
! See ticket 1907
! Axis label format didnt give enough precision for accurate labels
! for some cases where the range is between -1 and 1.
 
! The upper tic was labeled 0.04 (or 0.05 depending on the OS and compiler)
! Should be 0.045
let v = {0.02, 0.047,0.007, 0.02}
set view left
plot v
 
! This was a workaround
set view right
plot/set v
ppl yfor (f5.3)
ppl plot
 
can view
 
! Here are more variables that caused similar
! inadequate precision in the format.
 
let v = -1*{0.02, 0.042, 0.007, 0.02}
set view left
plot v
 
! This one had labels -0.02, -0.02, -0.02, -0.01, -0.01, 0.00, 0.00, 0.1
let v = {-0.023, -0.01, 0.007, 0.004}
set view right
plot v
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err672_long_show_axis
! See ticket 1905 - axes with very large number of points overflowed
! the format in SHOW AXIS commands
 
define axis/t=1-jan-1900:1-jan-2000:1/units=minutes huge
sh axis huge
 name       axis              # pts   start                end
 HUGE      TIME          52594561 r   01-JAN-1900 00:00    01-JAN-2000 00:00
T0 = 01-JAN-1900
   Axis span (to cell edges) = 5.259456E+07
can axis huge
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err672_axis_order
! err672_axis_order
! See comment 5 under ticket 1774.
 
 
use err67_axis_order.nc
sp cp data/err67_axis_order.nc err67_axis_order_copy.nc
use err67_axis_order_copy.nc
sh dat
     currently SET data sets:
    1> ./data/err67_axis_order.nc
 name     title                             I         J         K         L
 UCOV     UCOV                             1:6       1:9       1:3       1:1
 CONTROLE CONTROLE                         1:6       ...       ...       ...
 NIVSIGS  NIVSIGS                          ...       ...       1:3       ...
 NIVSIG   NIVSIG                           1:6       ...       ...       ...
 AP       AP                               1:6       ...       ...       ...
 
    2> ./err67_axis_order_copy.nc  (default)
 name     title                             I         J         K         L
 UCOV     UCOV                             1:6       1:9       1:3       1:1
 CONTROLE CONTROLE                         1:6       ...       ...       ...
 NIVSIGS  NIVSIGS                          ...       ...       1:3       ...
 NIVSIG   NIVSIG                           1:6       ...       ...       ...
 AP       AP                               1:6       ...       ...       ...
 
 
! Listings should be identical with the bug they are reversed.
list/k=3/i=1 ucov[d=1]
             VARIABLE : UCOV
             FILENAME : err67_axis_order.nc
             SUBSET   : 9 points (Y)
             X        : 1.0145
             Z        : 3
             TIME     : 08-JAN-1980 00:00
                1.014  
                 1
 -1.554 / 1: -642176.
 -1.521 / 2: -621550.
 -1.488 / 3: -700065.
 -1.455 / 4: -640073.
 0.033  / 5: -375011.
 1.455  / 6: -153460.
 1.488  / 7:   10663.
 1.521  / 8:   60693.
 1.554  / 9:       0.
list/k=3/i=1 ucov[d=2]
             VARIABLE : UCOV
             FILENAME : err67_axis_order_copy.nc
             SUBSET   : 9 points (Y)
             X        : 1.0145
             Z        : 3
             TIME     : 08-JAN-1980 00:00
                1.014  
                 1
 -1.554 / 1: -642176.
 -1.521 / 2: -621550.
 -1.488 / 3: -700065.
 -1.455 / 4: -640073.
 0.033  / 5: -375011.
 1.455  / 6: -153460.
 1.488  / 7:   10663.
 1.521  / 8:   60693.
 1.554  / 9:       0.
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err672_runoff_page
! err672_runoff_page
! acm 5/3/2012
! Test for the fix to ticket 1896 . Y-Axis labels may run off the
! edge of the page if the numbers have lots of digits.
! We change the ax-label size just for this axis issue a note.
!
! starting w/ v683, shrink yaxis lab size only if
! MODE shrink_ylab is set. (ticket 1958)
 
SET MODE shrink_ylab
 
define axis/x=1:100:1 xax
let/units="Observation value" var = 1.e37 * sin(randu(x[gx=xax])-1)
plot var
 
SET MODE/LAST shrink_ylab
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err672_samplexy_modulo
! err672_samplexy_modulo.jnl
! See ticket 1950: samplexy doesnt correctly do modulo operations.
 
use coads_climatology
! There is data at x=-20,y=0:
list  sst[x=-20,y=0]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (TIME)
             LONGITUDE: 21W(-21)
             LATITUDE : 1S
                   21W    
                   -20
 16-JAN      / 1:  26.91
 15-FEB      / 2:  27.39
 17-MAR      / 3:  27.85
 
! But samplexy doesn't find it.
! Previously the last column was all-missing.
list samplexy(sst,{160,180,-20},{0,0,0})
             VARIABLE : SAMPLEXY(SST,{160,180,-20},{0,0,0})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 3 points (X-TIME)
                     1      2      3    
                     1      2      3
 16-JAN      / 1:  29.09  28.36  26.90
 15-FEB      / 2:  29.09  28.38  27.42
 17-MAR      / 3:  29.01  28.00  27.87
 
! Check that we get data back at the edges of the longitude axis
list  samplexy(sst,{21,379},{-41,-41})
             VARIABLE : SAMPLEXY(SST,{21,379},{-41,-41})
             FILENAME : coads_climatology.cdf
             SUBSET   : 2 by 3 points (X-TIME)
                     1      2    
                     1      2
 16-JAN      / 1:  16.45  18.15
 15-FEB      / 2:  17.85  17.90
 17-MAR      / 3:  17.19  17.11
 
! Check samplexyt
let t1 = `t[gt=sst,L=1]`
 !-> DEFINE VARIABLE t1 = 366
list samplexyt(sst,{160,180,-20},{0,0,0},{`t1`,`t1`,`t1`})
 !-> list samplexyt(sst,{160,180,-20},{0,0,0},{366,366,366})
             VARIABLE : SAMPLEXYT(SST,{160,180,-20},{0,0,0},{366,366,366})
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (X)
 1   / 1:  29.09
 2   / 2:  28.36
 3   / 3:  26.90
 
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err672_varnames
! err672_varnames.jnl
! ticket 1938
!
! We can define variable names that match operators,
! but not use them.
!   yes? let ne = 5
!   yes? list ne
! previously the LET command was allowed but an error on the
! LIST, (unless we do list 'NE'). Just disallow those names
! to begin with, in xeq_define. Using these names now returns error
! AND OR GT GE LT LE EQ NE, also IF and ELSE.
 
SET MODE IGNORE
 
LET AND = 5
LET OR = 5
LET GT = 5
LET GE = 5
LET LT = 5
LET LE = 5
LET EQ = 5
LET NE = 5
LET IF  = 5
LET ELSE = 5
 
CAN MODE IGNORE
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err672_dset_cx
! err672_dset_cx.jnl
! Ticket 1951: The dataset specified in list x[gx=a[d=1,i=1:3]] is not applied.
!
 
let a = x[gx=0:2:1]; save/clob/file=a1.nc a
sho grid/x a
    GRID (G###)
 name       axis              # pts   start                end                 subset
 (AX###)   X                    3 r   0                    2                   3 pts
 normal    Y
 normal    Z
 normal    T
 
       I     X                       XBOX          XBOXLO
       1>  0                         1          -0.5
       2>  1                         1          0.5
       3>  2                         1          1.5
 
let a = x[gx=1:3:1]; save/clob/file=a2.nc a
sho grid/x a
    GRID (G###)
 name       axis              # pts   start                end                 subset
 (AX###)   X                    3 r   1                    3                   3 pts
 normal    Y
 normal    Z
 normal    T
 
       I     X                       XBOX          XBOXLO
       1>  1                         1          0.5
       2>  2                         1          1.5
       3>  3                         1          2.5
 
can var/all; can dat/all
 
! It's already strange that the first axis is named AX002 and the second AX001,
! but oh well. Let's use the first dataset, and list the axis values in two ways
! that give identical answers. No problem here.
 
use a1
list x[gx=a[d=1]]
             VARIABLE : X
                        axis AX007
             SUBSET   : 3 points (X)
 0   / 1:  0.000
 1   / 2:  1.000
 2   / 3:  2.000
list x[gx=a[d=1,i=1:3]]
             VARIABLE : X
                        axis AX007
             SUBSET   : 3 points (X)
 0   / 1:  0.000
 1   / 2:  1.000
 2   / 3:  2.000
 
! Next we use the second dataset, and repeat the exact same commands as above --
! note that we are again listing the variables from the first dataset, not the
! second one. Our results shouldn't have changed, since they explicitly refer to
! dataset 1 -- but one of them does change!
 
use a2
 
list x[gx=a[d=1]]
             VARIABLE : X
                        axis AX007
             SUBSET   : 3 points (X)
 0   / 1:  0.000
 1   / 2:  1.000
 2   / 3:  2.000
 
! The bug was that this listed 1,2,3 rather than 0,1,2
list x[gx=a[d=1,i=1:3]]
             VARIABLE : X
                        axis AX007
             SUBSET   : 3 points (X)
 0   / 1:  0.000
 1   / 2:  1.000
 2   / 3:  2.000
 
! The second LIST has somehow associated variable A from the first file
! with AX001 from the second file!
!
! The only thing that the second USE should have changed about Ferret's state,
! was that it brought a new dataset into memory and made it the default. Why should
! that have affected the second evaluation of the variable from dataset 1?
 
! Why is the following different?
list x[gx=a[d=1],i=1:3]
             VARIABLE : X
                        axis AX007
             SUBSET   : 3 points (X)
 0   / 1:  0.000
 1   / 2:  1.000
 2   / 3:  2.000
*** Running ferret script: bn_ifv.jnl
! bn_ifv.jnl
! test IFV IfValid masking for a variety of combos
 
 
 
! operators
CANCEL REGION
SET REGION/I=1:5/J=1:5
 
! IF, THEN, ELSE
LIST/ORDER=X  IFV I GT 3 THEN I
             VARIABLE : IFV I GT 3 THEN I
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
           ....   ....   ....  4.000  5.000
LIST/ORDER=X  IFV I GT 3 THEN I ELSE 0
             VARIABLE : IFV I GT 3 THEN I ELSE 0
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          0.000  0.000  0.000  4.000  5.000
! error: nested IFV tests
SET MODE IGNORE_ERRORS
LIST/ORDER=X  IFV I GT 3 THEN ( IFV I LT 5 THEN I ELSE -9 ) ELSE .333	! err
LET A = ifv I LT 5 THEN I ELSE -9					! err
SET MODE/LAST IGNORE_ERRORS
LET A = ifv I LT 5 THEN I ELSE (-9)
LIST/ORDER=X  IFV I GT 3 THEN ( A ) ELSE .333
             VARIABLE : IFV I GT 3 THEN ( A ) ELSE .333
             SUBSET   : 5 points (X)
            1      2      3      4      5    
            1      2      3      4      5
          0.333  0.333  0.333  4.000 -9.000
CANCEL REGION
 
LET r =  {1,2,0,1,,3,4,5,0,,1}
LIST r, IF r THEN 1, IFV r THEN 1, IF r THEN 1 ELSE 2, IFV r THEN 1 ELSE 2
             X: 0.5 to 11.5
 Column  1: R is {1,2,0,1,,3,4,5,0,,1}
 Column  2: EX#2 is IF R THEN 1
 Column  3: EX#3 is IFV R THEN 1
 Column  4: EX#4 is IF R THEN 1 ELSE 2
 Column  5: EX#5 is IFV R THEN 1 ELSE 2
               R   EX#2   EX#3   EX#4   EX#5
1    /  1:  1.000  1.000  1.000  1.000  1.000
2    /  2:  2.000  1.000  1.000  1.000  1.000
3    /  3:  0.000   ....  1.000  2.000  1.000
4    /  4:  1.000  1.000  1.000  1.000  1.000
5    /  5:   ....   ....   ....  2.000  2.000
6    /  6:  3.000  1.000  1.000  1.000  1.000
7    /  7:  4.000  1.000  1.000  1.000  1.000
8    /  8:  5.000  1.000  1.000  1.000  1.000
9    /  9:  0.000   ....  1.000  2.000  1.000
10   / 10:   ....   ....   ....  2.000  2.000
11   / 11:  1.000  1.000  1.000  1.000  1.000
 
! Mask with data that has integer values including zero,
USE coads_climatology
SET REG/L=1
LET intvar = INT(sst/5)
 
SET VIEW ul
SHADE IF intvar THEN 1
STAT IF intvar THEN 1
 
             IF INTVAR THEN 1
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 16200 (180*90*1*1*1*1)
 # flagged as bad  data: 8780
 Minimum value: 1
 Maximum value: 1
 Mean    value: 1 (unweighted average)
 Standard deviation: 0
 
SET VIEW ur
SHADE IFV intvar THEN 1
STAT IFV intvar THEN 1
 
             IFV INTVAR THEN 1
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 90S to 90N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 16200 (180*90*1*1*1*1)
 # flagged as bad  data: 6694
 Minimum value: 1
 Maximum value: 1
 Mean    value: 1 (unweighted average)
 Standard deviation: 0
 
! IFV on string arguments behaves just like IF.
 
LET a = {"x","y"}
LET b = IF a EQ "x" THEN "z" ELSE a
LIST b
             VARIABLE : IF A EQ "x" THEN "z" ELSE A
             SUBSET   : 2 points (X)
 1   / 1:"z"
 2   / 2:"y"
LET b = IFV a EQ "x" THEN "z" ELSE a
LIST b
             VARIABLE : IFV A EQ "x" THEN "z" ELSE A
             SUBSET   : 2 points (X)
 1   / 1:"z"
 2   / 2:"y"
 
 
let strings = {"a","b",}
list IF strings EQ "a" THEN "" ELSE strings
             VARIABLE : IF STRINGS EQ "a" THEN "" ELSE STRINGS
             SUBSET   : 3 points (X)
 1   / 1:"" 
 2   / 2:"b"
 3   / 3:"" 
 
let strings = {"a","b",}
list IFV strings EQ "a" THEN "" ELSE strings
             VARIABLE : IFV STRINGS EQ "a" THEN "" ELSE STRINGS
             SUBSET   : 3 points (X)
 1   / 1:"" 
 2   / 2:"b"
 3   / 3:"" 
*** Running ferret script: bn_randu2_randn2.jnl
! Test randu2 and randn2 with newer random-number algorithm.
! 9/2011 acm
! Note that most of these results will differe from one
! run of the benchmarks to the next.
 
! Changes to make it easier to see that theser results vary from
! one run to another because they are calls to random-number functions
 
! 1/2014 *acm* To make it easier to clean up the logs for comparison, write
! each output line with the text randu2_randn2 at the start of each line.
 
can mode ver
             VARIABLE : RANDU2(XBIG,-1)
             BAD FLAG : -1.E+34       
             SUBSET   : 5 points (X)
             X        : 0.5 to 5.5
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
             VARIABLE : RANDU2(XBIG,-1)
             BAD FLAG : -1.E+34       
             SUBSET   : 5 points (X)
             X        : 0.5 to 5.5
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
             VARIABLE : RANDU2(XX,0)
             BAD FLAG : -1.E+34       
             SUBSET   : 6 points (X)
             X        : 0.5 to 6.5
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
             VARIABLE : RANDU2(XX,0)
             BAD FLAG : -1.E+34       
             SUBSET   : 6 points (X)
             X        : 0.5 to 6.5
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
             VARIABLE : RANDU2(XX,12436)
             BAD FLAG : -1.E+34       
             SUBSET   : 6 points (X)
             X        : 0.5 to 6.5
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
             VARIABLE : RANDU2(XX,12436)
             BAD FLAG : -1.E+34       
             SUBSET   : 6 points (X)
             X        : 0.5 to 6.5
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
             VARIABLE : RANDN2(XBIG,-1)
             BAD FLAG : -1.E+34       
             SUBSET   : 5 points (X)
             X        : 0.5 to 5.5
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
             VARIABLE : RANDN2(XBIG,-1)
             BAD FLAG : -1.E+34       
             SUBSET   : 5 points (X)
             X        : 0.5 to 5.5
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
             VARIABLE : RANDN2(XX,0)
             BAD FLAG : -1.E+34       
             SUBSET   : 6 points (X)
             X        : 0.5 to 6.5
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
             VARIABLE : RANDN2(XX,0)
             BAD FLAG : -1.E+34       
             SUBSET   : 6 points (X)
             X        : 0.5 to 6.5
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
             VARIABLE : RANDN2(XX,12436)
             BAD FLAG : -1.E+34       
             SUBSET   : 6 points (X)
             X        : 0.5 to 6.5
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
             VARIABLE : RANDN2(XX,12436)
             BAD FLAG : -1.E+34       
             SUBSET   : 6 points (X)
             X        : 0.5 to 6.5
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
             Z: 1 to 140
 Column  1: VAR2 is COS(Z[GZ=ZAX]/30) + RANDU2(1+K[GZ=ZAX],-1)
 Column  2: VAR2[Z=@MED:3] is COS(Z[GZ=ZAX]/30) + RANDU2(1+K[GZ=ZAX],-1) (median smoothed by 3 pts on Z)
 Column  3: VAR2[Z=@MED:9] is COS(Z[GZ=ZAX]/30) + RANDU2(1+K[GZ=ZAX],-1) (median smoothed by 9 pts on Z)
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
randu2_randn2      ......
*** Running ferret script: bn_axis_cf.jnl
! Ticket 1792: Write axes with CF-compliant units
! and with standard name attributes for geophysical attrs.
 
 
define axis/x=-10:10:2/units="deg" xax
let xx = x[gx=xax]
save/clobber/file=a.nc xx
 
define axis/y=1:15:3/units="degrees" yax
let yy = y[gy=yax]
save/append/file=a.nc yy
 
define axis/t="1-jan-2001":"5-jan-2001":1/units="DAYS"/t0="1-jan-2000" taxis
let tt = t[gt=taxis]
save/append/file=a.nc tt
 
define axis/z/depth/units="meters" zaxdn = {0,10,40,100}
let zdn = z[gz=zaxdn]
save/append/file=a.nc zdn
 
define axis/z/units="meters" zaxup = {0,10,40,100,200}
let zup = z[gz=zaxup]
save/append/file=a.nc zup
 
sp echo "bn_axis_cf.jnl, degrees_east, degrees_north, std names on axes:" >> all_ncdump.out
sp ncdump -h a.nc >> all_ncdump.out
 
! If the axis is defined in a file or the command line as
! having units of "degrees" in any of its forms, write units
! as the cf-compliant "degrees_east" or "degrees_north"
! Previously these would have been saved as "DEGREES" and "DEG"
 
use degrees
sh att/all (`var,return=xaxis`)
 !-> sh att/all (XAXIS)
     attributes for dataset: ./data/degrees.nc
 (XAXIS).units = degrees_east 
 (XAXIS).point_spacing = even 
 (XAXIS).axis = X 
 (XAXIS).modulo = 360
 (XAXIS).orig_file_axname = XAXIS 
save/clobber/file=a.nc var
 
define axis/units="DEG"/y=-90:90:15 yfifteen
save/append/file=a.nc y[gy=yfifteen]
 
sp echo "bn_axis_cf.jnl, Convert forms of DEG, degrees to degrees_east:" >> all_ncdump.out
sp ncdump -h a.nc >> all_ncdump.out
 
! This dataset has time units of "DAYS since ..."
! On output, downcase the units string.
 
use bn_strides
sh att/all (TTIME)
     attributes for dataset: ./data/bn_strides.cdf
 (TTIME).units = DAYS since 1901-01-15 00:00:00 
 (TTIME).time_origin = 15-JAN-1901 
 (TTIME).point_spacing = even 
 (TTIME).orig_file_axname = TTIME 
save/clobber/file=a.nc xytvar
 
sp echo "bn_axis_cf.jnl, Downcase units, e.g. in time axis DAYS since" >> all_ncdump.out
sp ncdump -h a.nc >> all_ncdump.out
 
 
*** Running ferret script: bn_repeated_coords.jnl
! Test the use of micro-adjusting on NetCDF read
! when coordinates are repeated.
! See ticket 1910
 
! Axis has repeated coordinate values.
 
use repeat_t_coord.nc
show grid a
    GRID GKT1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TMIN      TIME                71 i   01-JAN-2001 00:00    01-JAN-2001 01:10   full
show axis tmin
 name       axis              # pts   start                end
 TMIN      TIME                71 i   01-JAN-2001 00:00    01-JAN-2001 01:10
T0 = 15-JAN-1901 00:00:00
   Axis span (to cell edges) = 71
list a[L=1:71:10]
             VARIABLE : SIN(L[GT=TMIN]/30)
                        regrid: on T
             FILENAME : repeat_t_coord.nc
             SUBSET   : 8 points (TIME)
 01-JAN-2001 00:00:00 / 1:  0.0333
 01-JAN-2001 00:10:00 / 2:  0.3585
 01-JAN-2001 00:20:00 / 3:  0.6442
 01-JAN-2001 00:30:00 / 4:  0.8590
 01-JAN-2001 00:40:00 / 5:  0.9792
 01-JAN-2001 00:50:00 / 6:  0.9917
 01-JAN-2001 01:00:00 / 7:  0.8949
 01-JAN-2001 01:10:00 / 8:  0.6997
 
! Previous behavior is retained with qualifier /STRICT
! The listing of variable aa here is identical to what is just above.
can dat/all
 
use/strict repeat_t_coord.nc
show grid a
    GRID GKT1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TMIN      T                   71 r   1                    71                  full
show axis tmin
 name       axis              # pts   start                end
 TMIN      T                   71 r   1                    71
T0 = %%
   Axis span (to cell edges) = 71
 
define axis/t/t0=15-jan-1901/units=minute tnew = tmin
let aa = RESHAPE(a, t[gt=tnew])
list aa[L=1:71:10]
             VARIABLE : RESHAPE(A, T[GT=TNEW])
                        regrid: on T
             FILENAME : repeat_t_coord.nc
             SUBSET   : 8 points (TIME)
 01-JAN-2001 00:00:00 / 1:  0.0333
 01-JAN-2001 00:10:00 / 2:  0.3585
 01-JAN-2001 00:20:00 / 3:  0.6442
 01-JAN-2001 00:30:00 / 4:  0.8590
 01-JAN-2001 00:40:00 / 5:  0.9792
 01-JAN-2001 00:50:00 / 6:  0.9917
 01-JAN-2001 01:00:00 / 7:  0.8949
 01-JAN-2001 01:10:00 / 8:  0.6997
 
*** Running ferret script: bn_xml_header.jnl
! bn_xml_header.jnl
! run the exact script that LAS uses to make XML header files
 
go xml_header_script.jnl xml_use_coads.jnl xml_out.xml
!header.jnl
! argument 1 is a script that opens the dataset
! argument 2 is the name of the xml file to write
! Requires Ferret v6.5 or higher
 
! This is the header.jnl script from LAS; comment out can mode verify
! Ferret v685, show/data/var/xml includes the output of show axis, so remove that.
 
! cancel mode verify
IF `($ferret_version) LT 6.5` THEN
 !-> IF 0 THEN
ENDIF
 
go "$1"
 !-> go "xml_use_coads.jnl"
use coads_climatology
 
DEFINE SYMBOL output_xml_file = $2
 !-> DEFINE SYMBOL output_xml_file = xml_out.xml
 
say/quiet/outfile="($output_xml_file)"/clobber <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
 !-> MESSAGE/CONTINUE/quiet/outfile="xml_out.xml"/clobber <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
say/quiet/outfile="($output_xml_file)"/append <data>
 !-> MESSAGE/CONTINUE/quiet/outfile="xml_out.xml"/append <data>
 
show data/var/xml/append/outfile="($output_xml_file)" 1
 !-> show data/var/xml/append/outfile="xml_out.xml" 1
say/quiet/append/outfile="($output_xml_file)" </data>
 !-> MESSAGE/CONTINUE/quiet/append/outfile="xml_out.xml" </data>
sp cat xml_out.xml
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<data>
<datasets>
<dataset name="./data/coads_climatology.cdf" default="true">
<title> </title>
<var name="SST">
<attribute name="units" type="char">
   <value><![CDATA[Deg C]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[SEA SURFACE TEMPERATURE]]></value>
</attribute>
<attribute name="_FillValue" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="GSQ1">
<axes>
<xaxis>COADSX</xaxis>
<yaxis>COADSY</yaxis>
<taxis>TIME</taxis>
</axes>
</grid>
</var>
</dataset>
</datasets>
<axes>
<axis name="COADSX">
<attribute name="direction" type="char">
   <value><![CDATA[I]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[degrees_east]]></value>
</attribute>
<attribute name="length" type="short">
   <value>180</value>
</attribute>
<attribute name="start" type="double">
   <value>21</value>
</attribute>
<attribute name="end" type="double">
   <value>379</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value><![CDATA[yes]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[COADSX]]></value>
</attribute>
</axis>
<axis name="COADSY">
<attribute name="direction" type="char">
   <value><![CDATA[J]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[degrees_north]]></value>
</attribute>
<attribute name="length" type="short">
   <value>90</value>
</attribute>
<attribute name="start" type="double">
   <value>-89</value>
</attribute>
<attribute name="end" type="double">
   <value>89</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[COADSY]]></value>
</attribute>
</axis>
<axis name="TIME">
<attribute name="direction" type="char">
   <value><![CDATA[L]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[hour since 0000-01-01 00:00:00]]></value>
</attribute>
<attribute name="length" type="short">
   <value>3</value>
</attribute>
<attribute name="start" type="double">
   <value>0000-01-16 06:00:00</value>
</attribute>
<attribute name="end" type="double">
   <value>0000-03-17 02:58:12</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value><![CDATA[yes]]></value>
</attribute>
<attribute name="time_origin" type="char">
   <value><![CDATA[0000-01-01 00:00:00]]></value>
</attribute>
<attribute name="calendar" type="char">
   <value><![CDATA[GREGORIAN]]></value>
</attribute>
<attribute name="modulo_length" type="short">
   <value>8765.82</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[TIME]]></value>
</attribute>
</axis>
</axes>
</data>
 
! Here's one where the dataset has a string variable
 
can dat/all
 
go xml_header_script.jnl xml_use_numstring.jnl xml_out_string.xml
!header.jnl
! argument 1 is a script that opens the dataset
! argument 2 is the name of the xml file to write
! Requires Ferret v6.5 or higher
 
! This is the header.jnl script from LAS; comment out can mode verify
! Ferret v685, show/data/var/xml includes the output of show axis, so remove that.
 
! cancel mode verify
IF `($ferret_version) LT 6.5` THEN
 !-> IF 0 THEN
ENDIF
 
go "$1"
 !-> go "xml_use_numstring.jnl"
use numstring
 
DEFINE SYMBOL output_xml_file = $2
 !-> DEFINE SYMBOL output_xml_file = xml_out_string.xml
 
say/quiet/outfile="($output_xml_file)"/clobber <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
 !-> MESSAGE/CONTINUE/quiet/outfile="xml_out_string.xml"/clobber <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
say/quiet/outfile="($output_xml_file)"/append <data>
 !-> MESSAGE/CONTINUE/quiet/outfile="xml_out_string.xml"/append <data>
 
show data/var/xml/append/outfile="($output_xml_file)" 1
 !-> show data/var/xml/append/outfile="xml_out_string.xml" 1
say/quiet/append/outfile="($output_xml_file)" </data>
 !-> MESSAGE/CONTINUE/quiet/append/outfile="xml_out_string.xml" </data>
 
! Find instances of dimension and list the next several lines
sp grep -A5 dimension xml_out_string.xml
<dimension>STRING1_7</dimension>
<xaxis>XAX1_10</xaxis>
</axes>
</grid>
</var>
</dataset>
--
<dimensions>
<dimension name="STRING1_7">
<attribute name="length" type="short">
   <value>7</value>
</attribute>
</dimension>
</dimensions>
</data>
*** Running ferret script: bn_eof_simple.jnl
! bn_eof_simple
! Define a simple function with two known functions.
! decompose with EOFs.
! 7/2012
! In version 6.8 (double precision), the old eof functions are not available
! Run the script calling eofsvd functions and exit, leaving old eof function calls.
! 11/2017 - still try to test old eof functions, if they are re-implemented
 
! Define two locations.
def axis /X=1:2:1 xaxis
def axis /Y=1:1:1 yaxis
 
! Thinking of the time axis as number of months.
def axis /T=0.0:59.75:0.25 taxis
def grid /X=xaxis /Y=yaxis /T=taxis xytgrid
set grid xytgrid
 
! Make standing waves with a period of 12 months.
let cosT = cos(T * 3.141592653589793 / 6.0)
let sinT = sin(T * 3.141592653589793 / 6.0)
 
! Put a standing wave at each location.
! The two waves are orthonormal and zero-mean over time.
let spacetime = if (i eq 1) then cosT else sinT + 1
show grid spacetime
    GRID XYTGRID
 name       axis              # pts   start                end                 subset
 XAXIS     X                    2 r   1                    2                   full
 YAXIS     Y                    1 r   1                    1                   full
 normal    Z
 TAXIS     T                  240 r   0                    59.75               full
 
show func eofsvd_stat
EOFSVD_STAT(A)
    SVD EOF statistics from XYT field. j=1:#EOFs, j=2:%variation, j=3:eigenvalues
    A: Variable in x,y,t; may be fcn of z,e,f
! Run each of the eof functions and show the results.
! Both are equally significant.  Eigenvalues should be 0.5.
! Other EOF descriptions do not divide the covariance
! matrix by the number of time values, in which case the
! the eigenvalues will be much larger, but still equal
! to each other.
list eofsvd_stat(spacetime)
             VARIABLE : EOFSVD_STAT(SPACETIME)
             SUBSET   : 2 by 3 points (X-Y)
             1      2    
             1      2
 1   / 1:   2.00   2.00
 2   / 2:  50.00  50.00
 3   / 3:   0.50   0.50
 
show func eofsvd_space
EOFSVD_SPACE(A)
    Return SVD EOF spatial fields from XYT field
    A: Variable in x,y,t; may be fcn of z,e,f
! Ideally the vectors (0.0, sqrt(0.5)) and (sqrt(0.5), 0.0),
! but might be mixed by rotation.
! This is if the EOF functions are in units of the original data,
! thus the eigenvectors times the square-root of the eigenvalue.
! EOF vectors are always orthogonal to each other.
let eofs = eofsvd_space(spacetime[I=1:2])
load eofs
let v1 = eofs[I=1]
show grid v1
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXIS     X                    2 r   1                    2                   1 pt
 YAXIS     Y                    1 r   1                    1                   full
 normal    Z
 ABSTRACT  T             99999999 r   1                    1.E+08              (axis from grid-changing func)
let v2 = eofs[I=2]
show grid v2
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXIS     X                    2 r   1                    2                   1 pt
 YAXIS     Y                    1 r   1                    1                   full
 normal    Z
 ABSTRACT  T             99999999 r   1                    1.E+08              (axis from grid-changing func)
list dot_t(v1, v1)
             VARIABLE : DOT_T(V1, V1)
             X        : 1
          0.5000
list dot_t(v1, v2)
             VARIABLE : DOT_T(V1, V2)
             X        : 1
          0.0000
list dot_t(v2, v1)
             VARIABLE : DOT_T(V2, V1)
             X        : 2
          0.0000
list dot_t(v2, v2)
             VARIABLE : DOT_T(V2, V2)
             X        : 2
          0.5000
 
show func eofsvd_tfunc
EOFSVD_TFUNC(A)
    Return SVD EOF time functions from XYT field.
    A: Variable in x,y,t; may be fcn of z,e,f
! Ideally sqrt(2.0) * (cosT, sinT), but may be mixed by rotation.
! TAF vectors are always orthogonal to each other.
let tafs = eofsvd_tfunc(spacetime[I=1:2])
load tafs
let v1 = tafs[I=1]
show grid v1
    GRID (G###)
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              (axis from grid-changing func)
 normal    Y
 normal    Z
 TAXIS     T                  240 r   0                    59.75               full
let v2 = tafs[I=2]
show grid v2
    GRID (G###)
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              (axis from grid-changing func)
 normal    Y
 normal    Z
 TAXIS     T                  240 r   0                    59.75               full
list dot_t(v1, v1)
             VARIABLE : DOT_T(V1, V1)
             X        : 1
          240.0
list dot_t(v1, v2)
             VARIABLE : DOT_T(V1, V2)
             X        : 1
         -3.775E-15
list dot_t(v2, v1)
             VARIABLE : DOT_T(V2, V1)
             X        : 2
         -3.775E-15
list dot_t(v2, v2)
             VARIABLE : DOT_T(V2, V2)
             X        : 2
          240.0
 
! The sum over all significant EOFs of the outer product of
! EOF(i) and TAF(i) should return the zero-time-meaned data
! (original data with the time-series mean subtracted to give
! a zero mean for each time series).
! In this case, EOF(1) o TAF(1) + EOF(2) o TAF(2) = (cosT, sinT)
 
! Missing-data cases
!
! If there are locations where the timeseries is all missing or incomplete
! (as in a dataset where missing data represents land), return a result
! based only locations with complete timeseries.
 
def axis /X=1:3:1 xaxis
let spacetime = if (i eq 1) then cosT else sinT + 1
let space12 = if i ne 3 then spacetime
 
list eofsvd_stat(space12)
             VARIABLE : EOFSVD_STAT(SPACE12)
             SUBSET   : 3 by 3 points (X-Y)
             1      2      3    
             1      2      3
 1   / 1:   2.00   2.00   2.00
 2   / 2:  50.00  50.00   0.00
 3   / 3:   0.50   0.50   0.00
 
let eofs = eofsvd_space(space12[I=1:3])
load eofs
let v1 = eofs[I=1]
show grid v1
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXIS     X                    3 r   1                    3                   1 pt
 YAXIS     Y                    1 r   1                    1                   full
 normal    Z
 ABSTRACT  T             99999999 r   1                    1.E+08              (axis from grid-changing func)
let v2 = eofs[I=2]
show grid v2
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXIS     X                    3 r   1                    3                   1 pt
 YAXIS     Y                    1 r   1                    1                   full
 normal    Z
 ABSTRACT  T             99999999 r   1                    1.E+08              (axis from grid-changing func)
list dot_t(v1, v1)
             VARIABLE : DOT_T(V1, V1)
             X        : 1
          0.5000
list dot_t(v1, v2)
             VARIABLE : DOT_T(V1, V2)
             X        : 1
          0.0000
list dot_t(v2, v1)
             VARIABLE : DOT_T(V2, V1)
             X        : 2
          0.0000
list dot_t(v2, v2)
             VARIABLE : DOT_T(V2, V2)
             X        : 2
          0.5000
 
let tafs = eofsvd_tfunc(space12[I=1:3])
load tafs
let v1 = tafs[I=1]
show grid v1
    GRID (G###)
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              (axis from grid-changing func)
 normal    Y
 normal    Z
 TAXIS     T                  240 r   0                    59.75               full
let v2 = tafs[I=2]
show grid v2
    GRID (G###)
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              (axis from grid-changing func)
 normal    Y
 normal    Z
 TAXIS     T                  240 r   0                    59.75               full
list dot_t(v1, v1)
             VARIABLE : DOT_T(V1, V1)
             X        : 1
          240.0
list dot_t(v1, v2)
             VARIABLE : DOT_T(V1, V2)
             X        : 1
         -3.775E-15
list dot_t(v2, v1)
             VARIABLE : DOT_T(V2, V1)
             X        : 2
         -3.775E-15
list dot_t(v2, v2)
             VARIABLE : DOT_T(V2, V2)
             X        : 2
          240.0
 
! If there are no complete time series, the functions should bail with an error
 
let spacegap = if L ne 2 then spacetime
 
set mode ignore
 
list eofsvd_stat(spacegap)
list eofsvd_space(spacegap)
list eofsvd_tfunc(spacegap)
 
set mode/last ignore
 
! -----------------------------------------------
! previous commands that called eof_space, eof_stat, eof_tfunc
! these functions all now bail out - do not work properly in double precision
 
set mode ignore
 
def axis /X=1:2:1 xaxis
let spacetime = if (i eq 1) then cosT else sinT + 1
 
show func eof_stat
EOF_STAT(A,frac_timeser)
    Function NOT AVAILABLE in this Ferret version
    A: Variable in x,y,t; may be fcn of z,e,f
    frac_timeser: Use only those time series with this fraction valid data.
! Run each of the eof functions and show the results.
! Both are equally significant.  Eigenvalues should be 0.5.
! Other EOF descriptions do not divide the covariance
! matrix by the number of time values, in which case the
! the eigenvalues will be much larger, but still equal
! to each other.
list eof_stat(spacetime, 1.0)
 
show func eof_space
EOF_SPACE(A,frac_timeser)
    Function NOT AVAILABLE in this Ferret version
    A: Variable in x,y,t; may be fcn of z,e,f
    frac_timeser: Use only those time series with this fraction valid data
! Ideally the vectors (0.0, sqrt(0.5)) and (sqrt(0.5), 0.0),
! but might be mixed by rotation.
! This is if the EOF functions are in units of the original data,
! thus the eigenvectors times the square-root of the eigenvalue.
! EOF vectors are always orthogonal to each other.
let eofs = eof_space(spacetime[I=1:2], 1.0)
load eofs
let v1 = eofs[I=1]
show grid v1
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXIS     X                    2 r   1                    2                   1 pt
 YAXIS     Y                    1 r   1                    1                   full
 normal    Z
 ABSTRACT  T             99999999 r   1                    1.E+08              (axis from grid-changing func)
let v2 = eofs[I=2]
show grid v2
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXIS     X                    2 r   1                    2                   1 pt
 YAXIS     Y                    1 r   1                    1                   full
 normal    Z
 ABSTRACT  T             99999999 r   1                    1.E+08              (axis from grid-changing func)
list dot_t(v1, v1)
list dot_t(v1, v2)
list dot_t(v2, v1)
list dot_t(v2, v2)
 
show func eof_tfunc
EOF_TFUNC(A,frac_timeser)
    Function NOT AVAILABLE in this Ferret version
    A: Variable in x,y,t; may be fcn of z,e,f
    frac_timeser: Use only those time series with this fraction valid data
! Ideally sqrt(2.0) * (cosT, sinT), but may be mixed by rotation.
! TAF vectors are always orthogonal to each other.
let tafs = eof_tfunc(spacetime[I=1:2], 1.0)
load tafs
let v1 = tafs[I=1]
show grid v1
    GRID (G###)
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              (axis from grid-changing func)
 normal    Y
 normal    Z
 TAXIS     T                  240 r   0                    59.75               full
let v2 = tafs[I=2]
show grid v2
    GRID (G###)
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              (axis from grid-changing func)
 normal    Y
 normal    Z
 TAXIS     T                  240 r   0                    59.75               full
list dot_t(v1, v1)
list dot_t(v1, v2)
list dot_t(v2, v1)
list dot_t(v2, v2)
 
set mode/last ignore
 
! The sum over all significant EOFs of the outer product of
! EOF(i) and TAF(i) should return the zero-time-meaned data
! (original data with the time-series mean subtracted to give
! a zero mean for each time series).
! In this case, EOF(1) o TAF(1) + EOF(2) o TAF(2) = (cosT, sinT)
 
! clean-up
set grid abstract
can var /all
can grid xytgrid
*** Running ferret script: bn_eof_simple2.jnl
! bn_eof_simple2
! Define a simple function with four known functions, two of which are degenerate.
! decompose with EOFs.
! 7/2012
! In version 6.8 (double precision), the old eof functions are not available
! Run the script calling eofsvd functions and exit, leaving old eof function calls.
! 11/2017 - still try to test old eof functions, if they are re-implemented
 
! Define four locations.
def axis /X=1:2:1 xaxis
def axis /Y=1:2:1 yaxis
 
! Thinking of the time axis as number of months.
def axis /T=0.0:23.9:0.1 taxis
def grid /X=xaxis /Y=yaxis /T=taxis xytgrid
set grid xytgrid
 
! Make standing waves with a period of 12 months.
let cosT = cos(T * 3.141592653589793 / 6.0)
let sinT = sin(T * 3.141592653589793 / 6.0)
 
! Put a products of the standing waves at each location.
let spacetime12 = if (i eq 1) and (j eq 1) then cost * cost else cost * sint + 1
let spacetime123 = if (i eq 2) and (j eq 1) then cost * sint + 2 else spacetime12
let spacetime = if (i eq 2) and (j eq 2) then sint * sint + 3 else spacetime123
show grid spacetime
    GRID XYTGRID
 name       axis              # pts   start                end                 subset
 XAXIS     X                    2 r   1                    2                   full
 YAXIS     Y                    2 r   1                    2                   full
 normal    Z
 TAXIS     T                  240 r   0                    23.9                full
 
show func eofsvd_stat
EOFSVD_STAT(A)
    SVD EOF statistics from XYT field. j=1:#EOFs, j=2:%variation, j=3:eigenvalues
    A: Variable in x,y,t; may be fcn of z,e,f
! Two are of equal significance with eigenvalues of 0.25.
! Two are negligable (eigenvalues of zero or close to it).
list eofsvd_stat(spacetime)
             VARIABLE : EOFSVD_STAT(SPACETIME)
             SUBSET   : 4 by 3 points (X-Y)
             1      2      3      4    
             1      2      3      4
 1   / 1:   4.00   4.00   4.00   4.00
 2   / 2:  50.00  50.00   0.00   0.00
 3   / 3:   0.25   0.25   0.00   0.00
 
show func eofsvd_space
EOFSVD_SPACE(A)
    Return SVD EOF spatial fields from XYT field
    A: Variable in x,y,t; may be fcn of z,e,f
! Ideally:
! +- [ 0.35355,  0.0,
!      0.0,     -0.35355 ]  (norm^2 = 0.25)
!      corresponding to 0.25 * sqrt(2.0) * (cosT^2 - sinT^2)
!                     = 0.25 * sqrt(2.0) * cos2T
! and
! +- [ 0.0,      0.35355,
!      0.35355,  0.0     ]  (norm^2 = 0.25)
!      corresponding to 0.25 * sqrt(2.0) * 2 * cosT * sinT
!                     = 0.25 * sqrt(2.0) * sin2T
! The norm^2 of an EOF should be the eigenvalue.
! The two EOFs should be orthogonal to each other.
! Rotation (mixing) of these two may occur.
let eofs = eofsvd_space(spacetime[I=1:2])
load eofs
let v1 = eofs[I=1]
show grid v1
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXIS     X                    2 r   1                    2                   1 pt
 YAXIS     Y                    2 r   1                    2                   full
 normal    Z
 ABSTRACT  T             99999999 r   1                    1.E+08              (axis from grid-changing func)
let v2 = eofs[I=2]
show grid v2
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXIS     X                    2 r   1                    2                   1 pt
 YAXIS     Y                    2 r   1                    2                   full
 normal    Z
 ABSTRACT  T             99999999 r   1                    1.E+08              (axis from grid-changing func)
list dot_t(v1, v1)
             VARIABLE : DOT_T(V1, V1)
             SUBSET   : 2 points (Y)
             X        : 1
             1     
              1
 1   / 1:  0.1250
 2   / 2:  0.1250
list dot_t(v1, v2)
             VARIABLE : DOT_T(V1, V2)
             SUBSET   : 2 points (Y)
             X        : 1
               1      
               1
 1   / 1: -3.123E-17
 2   / 2:  2.082E-17
list dot_t(v2, v1)
             VARIABLE : DOT_T(V2, V1)
             SUBSET   : 2 points (Y)
             X        : 2
               2      
               2
 1   / 1: -3.123E-17
 2   / 2:  2.082E-17
list dot_t(v2, v2)
             VARIABLE : DOT_T(V2, V2)
             SUBSET   : 2 points (Y)
             X        : 2
             2     
              2
 1   / 1:  0.1250
 2   / 2:  0.1250
 
show func eofsvd_tfunc
EOFSVD_TFUNC(A)
    Return SVD EOF time functions from XYT field.
    A: Variable in x,y,t; may be fcn of z,e,f
! Ideally:
! +- sqrt(2.0) * cos2T  (norm^2 = 240)
! +- sqrt(2.0) * sin2T  (norm^2 = 240)
! The norm^2 of a TAF should be the number of time values.
! The two TAFs should be orthogonal to each other.
! Rotation (mixing) of these two may occur.
let tafs = eofsvd_tfunc(spacetime[I=1:2])
load tafs
let v1 = tafs[I=1]
show grid v1
    GRID (G###)
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              (axis from grid-changing func)
 normal    Y
 normal    Z
 TAXIS     T                  240 r   0                    23.9                full
let v2 = tafs[I=2]
show grid v2
    GRID (G###)
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              (axis from grid-changing func)
 normal    Y
 normal    Z
 TAXIS     T                  240 r   0                    23.9                full
list dot_t(v1, v1)
             VARIABLE : DOT_T(V1, V1)
             X        : 1
          240.0
list dot_t(v1, v2)
             VARIABLE : DOT_T(V1, V2)
             X        : 1
         -5.285E-14
list dot_t(v2, v1)
             VARIABLE : DOT_T(V2, V1)
             X        : 2
         -5.285E-14
list dot_t(v2, v2)
             VARIABLE : DOT_T(V2, V2)
             X        : 2
          240.0
 
! Explanation:
! Time series means = (0.5, 0.0, 0.0, 0.5) + (0, 1, 2, 3)
! EOF1 * TAF1 = (0.5 * cos2T,  0.0, 0.0, -0.5 * cos2T)
!             = (cosT^2 - 0.5, 0.0, 0.0, sinT^2 - 0.5)
! EOF2 * TAF2 = (0.0, 0.5 * sin2T, 0.5 * sin2T, 0.0)
!             = (0.0, cosT * sinT, cosT * sinT, 0.0)
! Adding these three gives the original data
 
! -----------------------------------------------
! previous commands that called eof_space, eof_stat, eof_tfunc
! these functions all now bail out - do not work properly in double precision
 
set mode ignore
 
show func eof_stat
EOF_STAT(A,frac_timeser)
    Function NOT AVAILABLE in this Ferret version
    A: Variable in x,y,t; may be fcn of z,e,f
    frac_timeser: Use only those time series with this fraction valid data.
! Two are of equal significance with eigenvalues of 0.25.
! Two are negligable (eigenvalues of zero or close to it).
list eof_stat(spacetime, 1.0)
 
show func eof_space
EOF_SPACE(A,frac_timeser)
    Function NOT AVAILABLE in this Ferret version
    A: Variable in x,y,t; may be fcn of z,e,f
    frac_timeser: Use only those time series with this fraction valid data
! Ideally:
! +- [ 0.35355,  0.0,
!      0.0,     -0.35355 ]  (norm^2 = 0.25)
!      corresponding to 0.25 * sqrt(2.0) * (cosT^2 - sinT^2)
!                     = 0.25 * sqrt(2.0) * cos2T
! and
! +- [ 0.0,      0.35355,
!      0.35355,  0.0     ]  (norm^2 = 0.25)
!      corresponding to 0.25 * sqrt(2.0) * 2 * cosT * sinT
!                     = 0.25 * sqrt(2.0) * sin2T
! The norm^2 of an EOF should be the eigenvalue.
! The two EOFs should be orthogonal to each other.
! Rotation (mixing) of these two may occur.
let eofs = eof_space(spacetime[I=1:2], 1.0)
load eofs
let v1 = eofs[I=1]
show grid v1
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXIS     X                    2 r   1                    2                   1 pt
 YAXIS     Y                    2 r   1                    2                   full
 normal    Z
 ABSTRACT  T             99999999 r   1                    1.E+08              (axis from grid-changing func)
let v2 = eofs[I=2]
show grid v2
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXIS     X                    2 r   1                    2                   1 pt
 YAXIS     Y                    2 r   1                    2                   full
 normal    Z
 ABSTRACT  T             99999999 r   1                    1.E+08              (axis from grid-changing func)
list dot_t(v1, v1)
list dot_t(v1, v2)
list dot_t(v2, v1)
list dot_t(v2, v2)
 
show func eof_tfunc
EOF_TFUNC(A,frac_timeser)
    Function NOT AVAILABLE in this Ferret version
    A: Variable in x,y,t; may be fcn of z,e,f
    frac_timeser: Use only those time series with this fraction valid data
! Ideally:
! +- sqrt(2.0) * cos2T  (norm^2 = 240)
! +- sqrt(2.0) * sin2T  (norm^2 = 240)
! The norm^2 of a TAF should be the number of time values.
! The two TAFs should be orthogonal to each other.
! Rotation (mixing) of these two may occur.
let tafs = eof_tfunc(spacetime, 1.0)
load tafs
let v1 = tafs[I=1]
show grid v1
    GRID (G###)
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              (axis from grid-changing func)
 normal    Y
 normal    Z
 TAXIS     T                  240 r   0                    23.9                full
let v2 = tafs[I=2]
show grid v2
    GRID (G###)
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              (axis from grid-changing func)
 normal    Y
 normal    Z
 TAXIS     T                  240 r   0                    23.9                full
list dot_t(v1, v1)
list dot_t(v1, v2)
list dot_t(v2, v1)
list dot_t(v2, v2)
 
! Explanation:
! Time series means = (0.5, 0.0, 0.0, 0.5) + (0, 1, 2, 3)
! EOF1 * TAF1 = (0.5 * cos2T,  0.0, 0.0, -0.5 * cos2T)
!             = (cosT^2 - 0.5, 0.0, 0.0, sinT^2 - 0.5)
	! EOF2 * TAF2 = (0.0, 0.5 * sin2T, 0.5 * sin2T, 0.0)
!             = (0.0, cosT * sinT, cosT * sinT, 0.0)
! Adding these three gives the original data
 
set mode/last ignore
 
! clean-up
set grid abstract
can var /all
can grid xytgrid
*** Running ferret script: bn_interpolate_6d.jnl
! bn_interpolate_6d.JNL
! benchmark interpolation along various axes
! including the E and F axis
! note with fix to ticket 2399 mode calendar applies to F axis
 
SET LIST/PRECISION=6
SET MODE LATITUDE:4
set mode calendar:years
 
LET v = x + 10*y + 100*_e + 1000*_f
SET REGION/X=1:3/Y=1:3/E=1:3/F=1:3
DEF REG/X=1.5 xpt
DEF REG/Y=1.05 ypt
DEF REG/E=1.005 ept
DEF REG/F=1.0005 fpt
 
! first without interpolation
CANCEL MODE INTERPOLATE
GO bn_interpolate_6d.sub
! bn_interpolate_6d.SUB
! interpolate in various geometries
 
! this routine assumes that a 4-D region and an expression are already set
 
! cubes of data
LIST v[@xpt]
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 by 3 points (Y-E-F)
             X        : 1
              1        2        3     
              1        2        3
 ---- N:1 F:   1
 1   / 1:  1111.00  1121.00  1131.00
 2   / 2:  1211.00  1221.00  1231.00
 3   / 3:  1311.00  1321.00  1331.00
 ---- N:2 F:   2
 1   / 1:  2111.00  2121.00  2131.00
 2   / 2:  2211.00  2221.00  2231.00
 3   / 3:  2311.00  2321.00  2331.00
 ---- N:3 F:   3
 1   / 1:  3111.00  3121.00  3131.00
 2   / 2:  3211.00  3221.00  3231.00
 3   / 3:  3311.00  3321.00  3331.00
LIST v[@ypt]
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 by 3 points (X-E-F)
             Y        : 1
              1        2        3     
              1        2        3
 ---- N:1 F:   1
 1   / 1:  1111.00  1112.00  1113.00
 2   / 2:  1211.00  1212.00  1213.00
 3   / 3:  1311.00  1312.00  1313.00
 ---- N:2 F:   2
 1   / 1:  2111.00  2112.00  2113.00
 2   / 2:  2211.00  2212.00  2213.00
 3   / 3:  2311.00  2312.00  2313.00
 ---- N:3 F:   3
 1   / 1:  3111.00  3112.00  3113.00
 2   / 2:  3211.00  3212.00  3213.00
 3   / 3:  3311.00  3312.00  3313.00
LIST v[@ept]
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 by 3 points (X-Y-F)
             E        : 1
              1        2        3     
              1        2        3
 ---- N:1 F:   1
 1   / 1:  1111.00  1112.00  1113.00
 2   / 2:  1121.00  1122.00  1123.00
 3   / 3:  1131.00  1132.00  1133.00
 ---- N:2 F:   2
 1   / 1:  2111.00  2112.00  2113.00
 2   / 2:  2121.00  2122.00  2123.00
 3   / 3:  2131.00  2132.00  2133.00
 ---- N:3 F:   3
 1   / 1:  3111.00  3112.00  3113.00
 2   / 2:  3121.00  3122.00  3123.00
 3   / 3:  3131.00  3132.00  3133.00
LIST v[@fpt]
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 by 3 points (X-Y-E)
             F        : 1
              1        2        3     
              1        2        3
 ---- M:1 E:   1
 1   / 1:  1111.00  1112.00  1113.00
 2   / 2:  1121.00  1122.00  1123.00
 3   / 3:  1131.00  1132.00  1133.00
 ---- M:2 E:   2
 1   / 1:  1211.00  1212.00  1213.00
 2   / 2:  1221.00  1222.00  1223.00
 3   / 3:  1231.00  1232.00  1233.00
 ---- M:3 E:   3
 1   / 1:  1311.00  1312.00  1313.00
 2   / 2:  1321.00  1322.00  1323.00
 3   / 3:  1331.00  1332.00  1333.00
 
! planes of data
LIST v[@ept,@fpt]	!XY
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 points (X-Y)
             E        : 1
             F        : 1
              1        2        3     
              1        2        3
 1   / 1:  1111.00  1112.00  1113.00
 2   / 2:  1121.00  1122.00  1123.00
 3   / 3:  1131.00  1132.00  1133.00
LIST v[@ypt,@fpt]	!XE
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 points (X-E)
             Y        : 1
             F        : 1
              1        2        3     
              1        2        3
 1   / 1:  1111.00  1112.00  1113.00
 2   / 2:  1211.00  1212.00  1213.00
 3   / 3:  1311.00  1312.00  1313.00
LIST v[@ypt,@ept]	!XF
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 points (X-F)
             Y        : 1
             E        : 1
              1        2        3     
              1        2        3
 1   / 1:  1111.00  1112.00  1113.00
 2   / 2:  2111.00  2112.00  2113.00
 3   / 3:  3111.00  3112.00  3113.00
LIST v[@xpt,@fpt]	!YE
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 points (Y-E)
             X        : 1
             F        : 1
              1        2        3     
              1        2        3
 1   / 1:  1111.00  1121.00  1131.00
 2   / 2:  1211.00  1221.00  1231.00
 3   / 3:  1311.00  1321.00  1331.00
LIST v[@xpt,@ept]	!YF
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 points (Y-F)
             X        : 1
             E        : 1
              1        2        3     
              1        2        3
 1   / 1:  1111.00  1121.00  1131.00
 2   / 2:  2111.00  2121.00  2131.00
 3   / 3:  3111.00  3121.00  3131.00
LIST v[@xpt,@ypt]	!EF
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 points (E-F)
             X        : 1
             Y        : 1
              1        2        3     
              1        2        3
 1   / 1:  1111.00  1211.00  1311.00
 2   / 2:  2111.00  2211.00  2311.00
 3   / 3:  3111.00  3211.00  3311.00
 
! lines of data
LIST/ORDER=F v[@xpt,@ypt,@ept]	! F
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 points (F)
             X        : 1
             Y        : 1
             E        : 1
             1        2        3     
             1        2        3
          1111.00  2111.00  3111.00
LIST/ORDER=E v[@xpt,@ypt,@fpt]	! E
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 points (E)
             X        : 1
             Y        : 1
             F        : 1
             1        2        3     
             1        2        3
          1111.00  1211.00  1311.00
LIST/ORDER=Y v[@xpt,@ept,@fpt]	! Y
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 points (Y)
             X        : 1
             E        : 1
             F        : 1
             1        2        3     
             1        2        3
          1111.00  1121.00  1131.00
LIST/ORDER=X v[@ypt,@ept,@fpt]	! X
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 points (X)
             Y        : 1
             E        : 1
             F        : 1
             1        2        3     
             1        2        3
          1111.00  1112.00  1113.00
 
! point of data
LIST v[@xpt,@ypt,@ept,@fpt]
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             X        : 1
             Y        : 1
             E        : 1
             F        : 1
          1111.00
 
! then with interpolation
SET MODE INTERPOLATE
GO bn_interpolate_6d.sub
! bn_interpolate_6d.SUB
! interpolate in various geometries
 
! this routine assumes that a 4-D region and an expression are already set
 
! cubes of data
LIST v[@xpt]
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 by 3 points (Y-E-F)
             X        : 1.5 (interpolated)
              1        2        3     
              1        2        3
 ---- N:1 F:   1
 1   / 1:  1111.50  1121.50  1131.50
 2   / 2:  1211.50  1221.50  1231.50
 3   / 3:  1311.50  1321.50  1331.50
 ---- N:2 F:   2
 1   / 1:  2111.50  2121.50  2131.50
 2   / 2:  2211.50  2221.50  2231.50
 3   / 3:  2311.50  2321.50  2331.50
 ---- N:3 F:   3
 1   / 1:  3111.50  3121.50  3131.50
 2   / 2:  3211.50  3221.50  3231.50
 3   / 3:  3311.50  3321.50  3331.50
LIST v[@ypt]
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 by 3 points (X-E-F)
             Y        : 1.05 (interpolated)
              1        2        3     
              1        2        3
 ---- N:1 F:   1
 1   / 1:  1111.50  1112.50  1113.50
 2   / 2:  1211.50  1212.50  1213.50
 3   / 3:  1311.50  1312.50  1313.50
 ---- N:2 F:   2
 1   / 1:  2111.50  2112.50  2113.50
 2   / 2:  2211.50  2212.50  2213.50
 3   / 3:  2311.50  2312.50  2313.50
 ---- N:3 F:   3
 1   / 1:  3111.50  3112.50  3113.50
 2   / 2:  3211.50  3212.50  3213.50
 3   / 3:  3311.50  3312.50  3313.50
LIST v[@ept]
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 by 3 points (X-Y-F)
             E        : 1.005 (interpolated)
              1        2        3     
              1        2        3
 ---- N:1 F:   1
 1   / 1:  1111.50  1112.50  1113.50
 2   / 2:  1121.50  1122.50  1123.50
 3   / 3:  1131.50  1132.50  1133.50
 ---- N:2 F:   2
 1   / 1:  2111.50  2112.50  2113.50
 2   / 2:  2121.50  2122.50  2123.50
 3   / 3:  2131.50  2132.50  2133.50
 ---- N:3 F:   3
 1   / 1:  3111.50  3112.50  3113.50
 2   / 2:  3121.50  3122.50  3123.50
 3   / 3:  3131.50  3132.50  3133.50
LIST v[@fpt]
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 by 3 points (X-Y-E)
             F        : 1 (interpolated)
              1        2        3     
              1        2        3
 ---- M:1 E:   1
 1   / 1:  1111.50  1112.50  1113.50
 2   / 2:  1121.50  1122.50  1123.50
 3   / 3:  1131.50  1132.50  1133.50
 ---- M:2 E:   2
 1   / 1:  1211.50  1212.50  1213.50
 2   / 2:  1221.50  1222.50  1223.50
 3   / 3:  1231.50  1232.50  1233.50
 ---- M:3 E:   3
 1   / 1:  1311.50  1312.50  1313.50
 2   / 2:  1321.50  1322.50  1323.50
 3   / 3:  1331.50  1332.50  1333.50
 
! planes of data
LIST v[@ept,@fpt]	!XY
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 points (X-Y)
             E        : 1.005 (interpolated)
             F        : 1 (interpolated)
              1        2        3     
              1        2        3
 1   / 1:  1112.00  1113.00  1114.00
 2   / 2:  1122.00  1123.00  1124.00
 3   / 3:  1132.00  1133.00  1134.00
LIST v[@ypt,@fpt]	!XE
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 points (X-E)
             Y        : 1.05 (interpolated)
             F        : 1 (interpolated)
              1        2        3     
              1        2        3
 1   / 1:  1112.00  1113.00  1114.00
 2   / 2:  1212.00  1213.00  1214.00
 3   / 3:  1312.00  1313.00  1314.00
LIST v[@ypt,@ept]	!XF
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 points (X-F)
             Y        : 1.05 (interpolated)
             E        : 1.005 (interpolated)
              1        2        3     
              1        2        3
 1   / 1:  1112.00  1113.00  1114.00
 2   / 2:  2112.00  2113.00  2114.00
 3   / 3:  3112.00  3113.00  3114.00
LIST v[@xpt,@fpt]	!YE
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 points (Y-E)
             X        : 1.5 (interpolated)
             F        : 1 (interpolated)
              1        2        3     
              1        2        3
 1   / 1:  1112.00  1122.00  1132.00
 2   / 2:  1212.00  1222.00  1232.00
 3   / 3:  1312.00  1322.00  1332.00
LIST v[@xpt,@ept]	!YF
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 points (Y-F)
             X        : 1.5 (interpolated)
             E        : 1.005 (interpolated)
              1        2        3     
              1        2        3
 1   / 1:  1112.00  1122.00  1132.00
 2   / 2:  2112.00  2122.00  2132.00
 3   / 3:  3112.00  3122.00  3132.00
LIST v[@xpt,@ypt]	!EF
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 by 3 points (E-F)
             X        : 1.5 (interpolated)
             Y        : 1.05 (interpolated)
              1        2        3     
              1        2        3
 1   / 1:  1112.00  1212.00  1312.00
 2   / 2:  2112.00  2212.00  2312.00
 3   / 3:  3112.00  3212.00  3312.00
 
! lines of data
LIST/ORDER=F v[@xpt,@ypt,@ept]	! F
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 points (F)
             X        : 1.5 (interpolated)
             Y        : 1.05 (interpolated)
             E        : 1.005 (interpolated)
             1        2        3     
             1        2        3
          1112.50  2112.50  3112.50
LIST/ORDER=E v[@xpt,@ypt,@fpt]	! E
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 points (E)
             X        : 1.5 (interpolated)
             Y        : 1.05 (interpolated)
             F        : 1 (interpolated)
             1        2        3     
             1        2        3
          1112.50  1212.50  1312.50
LIST/ORDER=Y v[@xpt,@ept,@fpt]	! Y
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 points (Y)
             X        : 1.5 (interpolated)
             E        : 1.005 (interpolated)
             F        : 1 (interpolated)
             1        2        3     
             1        2        3
          1112.50  1122.50  1132.50
LIST/ORDER=X v[@ypt,@ept,@fpt]	! X
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             SUBSET   : 3 points (X)
             Y        : 1.05 (interpolated)
             E        : 1.005 (interpolated)
             F        : 1 (interpolated)
             1        2        3     
             1        2        3
          1112.50  1113.50  1114.50
 
! point of data
LIST v[@xpt,@ypt,@ept,@fpt]
             VARIABLE : X + 10*Y + 100*_E + 1000*_F
             X        : 1.5 (interpolated)
             Y        : 1.05 (interpolated)
             E        : 1.005 (interpolated)
             F        : 1 (interpolated)
          1113.00
 
set mode/last calendar
*** Running ferret script: bn_regrid_6d.jnl
! bn_regrid_6d.jnl
! version of bn_regrid, using E and F directions.
! note with fix to ticket 2399 mode calendar applies to F axis
 
set mode latit_label -4
set mode long_label -4
set mode calendar:years
 
define axis/x=2:20:2 xeven
define axis/x=1:19:2 xodd
define axis/y=2:20:2 yeven
define axis/y=1:19:2 yodd
define axis/e=2:20:2 eeven
define axis/e=1:19:2 eodd
define axis/f=2:20:2/t0="1-jan-1980"/unit=days feven
define axis/f=1:19:2/t0="1-jan-1980"/unit=days fodd
 
! default grid
define grid/x=xeven/y=yeven/e=eeven/f=feven even
 
! 1 axis different
define grid/x=xodd/y=yeven/e=eeven/f=feven g1
define grid/x=xeven/y=yodd/e=eeven/f=feven g2
define grid/x=xeven/y=yeven/e=eodd/f=feven g3
define grid/x=xeven/y=yeven/e=eeven/f=fodd g4
 
! 2 axes different
define grid/x=xodd/y=yodd/e=eeven/f=feven g12
define grid/x=xodd/y=yeven/e=eodd/f=feven g13
define grid/x=xodd/y=yeven/e=eeven/f=fodd g14
define grid/x=xeven/y=yodd/e=eodd/f=feven g23
define grid/x=xeven/y=yodd/e=eeven/f=fodd g24
define grid/x=xeven/y=yeven/e=eodd/f=fodd g33
 
! 3 axes different
define grid/x=xeven/y=yodd/e=eodd/f=fodd g234
define grid/x=xodd/y=yeven/e=eodd/f=fodd g134
define grid/x=xodd/y=yodd/e=eeven/f=fodd g124
define grid/x=xodd/y=yodd/e=eodd/f=feven g123
 
! all axes different
define grid/x=xodd/y=yodd/e=eodd/f=fodd g1234
 
LET veven = 1000*i[g=even] + 100*j[g=even] + 10*_m[g=even] + _n[g=even]
 
LET v1    = veven[g=g1]
LET v2    = veven[g=g2]
LET v3    = veven[g=g3]
LET v4    = veven[g=g4]
LET v12   = veven[g=g12]
LET v13   = veven[g=g13]
LET v14   = veven[g=g14]
LET v23   = veven[g=g23]
LET v24   = veven[g=g24]
LET v33   = veven[g=g33]
LET v234  = veven[g=g234]
LET v134  = veven[g=g134]
LET v124  = veven[g=g124]
LET v123  = veven[g=g123]
LET v1234 = veven[g=g1234]
 
SET REGION/X=4.01:8.99/Y=4.01:8.99/e=4.01:8.99/f=4.01:8.99
 
! background
list veven
             VARIABLE : 1000*I[G=EVEN] + 100*J[G=EVEN] + 10*_M[G=EVEN] + _N[G=EVEN]
             SUBSET   : 3 by 3 by 3 by 3 points (X-Y-E-FORECAST)
             4      6      8    
             2      3      4
 ---- N:2 F:   1980
 ---- M:2 E:   4
 4   / 2:  2222.  3222.  4222.
 6   / 3:  2322.  3322.  4322.
 8   / 4:  2422.  3422.  4422.
 ---- M:3 E:   6
 4   / 2:  2232.  3232.  4232.
 6   / 3:  2332.  3332.  4332.
 8   / 4:  2432.  3432.  4432.
 ---- M:4 E:   8
 4   / 2:  2242.  3242.  4242.
 6   / 3:  2342.  3342.  4342.
 8   / 4:  2442.  3442.  4442.
 ---- N:3 F:   1980
 ---- M:2 E:   4
 4   / 2:  2223.  3223.  4223.
 6   / 3:  2323.  3323.  4323.
 8   / 4:  2423.  3423.  4423.
 ---- M:3 E:   6
 4   / 2:  2233.  3233.  4233.
 6   / 3:  2333.  3333.  4333.
 8   / 4:  2433.  3433.  4433.
 ---- M:4 E:   8
 4   / 2:  2243.  3243.  4243.
 6   / 3:  2343.  3343.  4343.
 8   / 4:  2443.  3443.  4443.
 ---- N:4 F:   1980
 ---- M:2 E:   4
 4   / 2:  2224.  3224.  4224.
 6   / 3:  2324.  3324.  4324.
 8   / 4:  2424.  3424.  4424.
 ---- M:3 E:   6
 4   / 2:  2234.  3234.  4234.
 6   / 3:  2334.  3334.  4334.
 8   / 4:  2434.  3434.  4434.
 ---- M:4 E:   8
 4   / 2:  2244.  3244.  4244.
 6   / 3:  2344.  3344.  4344.
 8   / 4:  2444.  3444.  4444.
list v1234
             VARIABLE : VEVEN[G=G1234]
             SUBSET   : 3 by 3 by 3 by 3 points (X-Y-E-FORECAST)
             5      7      9    
             3      4      5
 ---- N:3 F:   1980
 ---- M:3 E:   5
 5   / 3:  2778.  3778.  4778.
 7   / 4:  2878.  3878.  4878.
 9   / 5:  2978.  3978.  4978.
 ---- M:4 E:   7
 5   / 3:  2788.  3788.  4788.
 7   / 4:  2888.  3888.  4888.
 9   / 5:  2988.  3988.  4988.
 ---- M:5 E:   9
 5   / 3:  2798.  3798.  4798.
 7   / 4:  2898.  3898.  4898.
 9   / 5:  2998.  3998.  4998.
 ---- N:4 F:   1980
 ---- M:3 E:   5
 5   / 3:  2778.  3778.  4778.
 7   / 4:  2878.  3878.  4878.
 9   / 5:  2978.  3978.  4978.
 ---- M:4 E:   7
 5   / 3:  2788.  3788.  4788.
 7   / 4:  2888.  3888.  4888.
 9   / 5:  2988.  3988.  4988.
 ---- M:5 E:   9
 5   / 3:  2798.  3798.  4798.
 7   / 4:  2898.  3898.  4898.
 9   / 5:  2998.  3998.  4998.
 ---- N:5 F:   1980
 ---- M:3 E:   5
 5   / 3:  2780.  3780.  4780.
 7   / 4:  2880.  3880.  4880.
 9   / 5:  2980.  3980.  4980.
 ---- M:4 E:   7
 5   / 3:  2790.  3790.  4790.
 7   / 4:  2890.  3890.  4890.
 9   / 5:  2990.  3990.  4990.
 ---- M:5 E:   9
 5   / 3:  2800.  3800.  4800.
 7   / 4:  2900.  3900.  4900.
 9   / 5:  3000.  4000.  5000.
stat veven
 
             1000*I[G=EVEN] + 100*J[G=EVEN] + 10*_M[G=EVEN] + _N[G=EVEN]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2222
 Maximum value: 4444
 Mean    value: 3333 (unweighted average)
 Standard deviation: 825.72
 
! first all from one memory variable
load/x=1:11/y=1:11/e=1:11/f=1:11 veven
GO bn_regrid.sub
! BN200_REGRID.SUB
! compare various regriddings to the original data
 
stat v1[g=even]-veven, v1
 
             V1[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G1]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2722
 Maximum value: 4944
 Mean    value: 3833 (unweighted average)
 Standard deviation: 825.72
stat v2[g=even]-veven, v2
 
             V2[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G2]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2272
 Maximum value: 4494
 Mean    value: 3383 (unweighted average)
 Standard deviation: 825.72
stat v3[g=even]-veven, v3
 
             V3[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G3]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2227
 Maximum value: 4449
 Mean    value: 3338 (unweighted average)
 Standard deviation: 825.72
stat v4[g=even]-veven, v4
 
             V4[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G4]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2222.5
 Maximum value: 4444.5
 Mean    value: 3333.5 (unweighted average)
 Standard deviation: 825.72
stat v12[g=even]-veven, v12
 
             V12[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G12]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2772
 Maximum value: 4994
 Mean    value: 3883 (unweighted average)
 Standard deviation: 825.72
stat v13[g=even]-veven, v13
 
             V13[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G13]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2727
 Maximum value: 4949
 Mean    value: 3838 (unweighted average)
 Standard deviation: 825.72
stat v14[g=even]-veven, v14
 
             V14[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G14]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2722.5
 Maximum value: 4944.5
 Mean    value: 3833.5 (unweighted average)
 Standard deviation: 825.72
stat v23[g=even]-veven, v23
 
             V23[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G23]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2277
 Maximum value: 4499
 Mean    value: 3388 (unweighted average)
 Standard deviation: 825.72
stat v24[g=even]-veven, v24
 
             V24[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G24]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2272.5
 Maximum value: 4494.5
 Mean    value: 3383.5 (unweighted average)
 Standard deviation: 825.72
stat v33[g=even]-veven, v33
 
             V33[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G33]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2227.5
 Maximum value: 4449.5
 Mean    value: 3338.5 (unweighted average)
 Standard deviation: 825.72
stat v234[g=even]-veven, v234
 
             V234[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G234]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2277.5
 Maximum value: 4499.5
 Mean    value: 3388.5 (unweighted average)
 Standard deviation: 825.72
stat v134[g=even]-veven, v134
 
             V134[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G134]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2727.5
 Maximum value: 4949.5
 Mean    value: 3838.5 (unweighted average)
 Standard deviation: 825.72
stat v124[g=even]-veven, v124
 
             V124[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G124]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2772.5
 Maximum value: 4994.5
 Mean    value: 3883.5 (unweighted average)
 Standard deviation: 825.72
stat v123[g=even]-veven, v123
 
             V123[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G123]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2777
 Maximum value: 4999
 Mean    value: 3888 (unweighted average)
 Standard deviation: 825.72
stat v1234[g=even]-veven, v1234
 
             V1234[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G1234]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2777.5
 Maximum value: 4999.5
 Mean    value: 3888.5 (unweighted average)
 Standard deviation: 825.72
 
! and now with recalculations at every step
CANCEL MEMORY/ALL
SET MODE STUPID
GO bn_regrid.sub
! BN200_REGRID.SUB
! compare various regriddings to the original data
 
stat v1[g=even]-veven, v1
 
             V1[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G1]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2722
 Maximum value: 4944
 Mean    value: 3833 (unweighted average)
 Standard deviation: 825.72
stat v2[g=even]-veven, v2
 
             V2[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G2]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2272
 Maximum value: 4494
 Mean    value: 3383 (unweighted average)
 Standard deviation: 825.72
stat v3[g=even]-veven, v3
 
             V3[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G3]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2227
 Maximum value: 4449
 Mean    value: 3338 (unweighted average)
 Standard deviation: 825.72
stat v4[g=even]-veven, v4
 
             V4[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G4]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2222.5
 Maximum value: 4444.5
 Mean    value: 3333.5 (unweighted average)
 Standard deviation: 825.72
stat v12[g=even]-veven, v12
 
             V12[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G12]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2772
 Maximum value: 4994
 Mean    value: 3883 (unweighted average)
 Standard deviation: 825.72
stat v13[g=even]-veven, v13
 
             V13[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G13]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2727
 Maximum value: 4949
 Mean    value: 3838 (unweighted average)
 Standard deviation: 825.72
stat v14[g=even]-veven, v14
 
             V14[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G14]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2722.5
 Maximum value: 4944.5
 Mean    value: 3833.5 (unweighted average)
 Standard deviation: 825.72
stat v23[g=even]-veven, v23
 
             V23[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G23]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2277
 Maximum value: 4499
 Mean    value: 3388 (unweighted average)
 Standard deviation: 825.72
stat v24[g=even]-veven, v24
 
             V24[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G24]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2272.5
 Maximum value: 4494.5
 Mean    value: 3383.5 (unweighted average)
 Standard deviation: 825.72
stat v33[g=even]-veven, v33
 
             V33[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G33]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2227.5
 Maximum value: 4449.5
 Mean    value: 3338.5 (unweighted average)
 Standard deviation: 825.72
stat v234[g=even]-veven, v234
 
             V234[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G234]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2277.5
 Maximum value: 4499.5
 Mean    value: 3388.5 (unweighted average)
 Standard deviation: 825.72
stat v134[g=even]-veven, v134
 
             V134[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G134]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2727.5
 Maximum value: 4949.5
 Mean    value: 3838.5 (unweighted average)
 Standard deviation: 825.72
stat v124[g=even]-veven, v124
 
             V124[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G124]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2772.5
 Maximum value: 4994.5
 Mean    value: 3883.5 (unweighted average)
 Standard deviation: 825.72
stat v123[g=even]-veven, v123
 
             V123[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G123]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2777
 Maximum value: 4999
 Mean    value: 3888 (unweighted average)
 Standard deviation: 825.72
stat v1234[g=even]-veven, v1234
 
             V1234[G=EVEN]-VEVEN
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
             VEVEN[G=G1234]
             X: 4.01 to 8.99
             Y: 4.01 to 8.99
             Z:  N/A
             T:  N/A
             E: 4.01 to 8.99
             FORECAST: 1980 to 1980
             DATA SET: N/A
 
 Total # of data points: 81 (3*3*1*1*3*3)
 # flagged as bad  data: 0
 Minimum value: 2777.5
 Maximum value: 4999.5
 Mean    value: 3888.5 (unweighted average)
 Standard deviation: 825.72
 
!****************** area-averaging regrids *******************
! check easily computable area-averaged regrid
LET vfine = X+Y
LET vcoarse = vfine[g=gcoarse]
 
! first test without COS(latitude) corrections
define axis/x=1:100:1/unit=cm xfine
define axis/x=5.5:95.5:10/unit=cm xcoarse
define axis/y=1:100:1/unit=cm yfine
define axis/y=5.5:95.5:10/unit=cm ycoarse
define grid/x=xfine/y=yfine gfine
define grid/x=xcoarse/y=ycoarse gcoarse
 
set grid gfine
set reg/x=20.5:80.5/y=20.5:80.5
list vcoarse
             VARIABLE : VFINE[G=GCOARSE]
             SUBSET   : 6 by 6 points (X (CM)-Y (CM))
             25.5   35.5   45.5   55.5   65.5   75.5  
              3      4      5      6      7      8
 25.5 / 3:   51.0   61.0   71.0   81.0   91.0  101.0
 35.5 / 4:   61.0   71.0   81.0   91.0  101.0  111.0
 45.5 / 5:   71.0   81.0   91.0  101.0  111.0  121.0
 55.5 / 6:   81.0   91.0  101.0  111.0  121.0  131.0
 65.5 / 7:   91.0  101.0  111.0  121.0  131.0  141.0
 75.5 / 8:  101.0  111.0  121.0  131.0  141.0  151.0
stat vcoarse,vfine
 
             VFINE[G=GCOARSE]
             X (CM): 20.5 to 80.5
             Y (CM): 20.5 to 80.5
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 36 (6*6*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 51
 Maximum value: 151
 Mean    value: 101 (unweighted average)
 Standard deviation: 24.495
 
             X+Y
             X (CM): 20.5 to 80.5
             Y (CM): 20.5 to 80.5
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 3600 (60*60*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 42
 Maximum value: 160
 Mean    value: 101 (unweighted average)
 Standard deviation: 24.495
list vcoarse[x=@ave,y=@ave],vfine[x=@ave,y=@ave]
             X (CM): 20.5 to 80.5 (XY ave)
             Y (CM): 20.5 to 80.5 (XY ave)
 Column  1: VCOARSE is VFINE[G=GCOARSE]
 Column  2: VFINE is X+Y
         VCOARSE   VFINE
I / *:      101.0  101.0
 
! then test with COS(latitude) corrections
define axis/x=1:100:1/unit=degrees xfine
define axis/x=5.5:95.5:10/unit=degrees xcoarse
define axis/y=1:100:1/unit=degrees yfine
define axis/y=5.5:95.5:10/unit=degrees ycoarse
define grid/x=xfine/y=yfine gfine
define grid/x=xcoarse/y=ycoarse gcoarse
 
set grid gfine
set reg/x=20.5:80.5/y=20.5:80.5
list vcoarse
             VARIABLE : VFINE[G=GCOARSE]
             SUBSET   : 6 by 6 points (LONGITUDE-LATITUDE)
              25.5E  35.5E  45.5E  55.5E  65.5E  75.5E 
               3      4      5      6      7      8
 75.5N / 8:  101.0  111.0  121.0  131.0  141.0  151.0
 65.5N / 7:   91.0  101.0  111.0  121.0  131.0  141.0
 55.5N / 6:   81.0   91.0  101.0  111.0  121.0  131.0
 45.5N / 5:   71.0   81.0   91.0  101.0  111.0  121.0
 35.5N / 4:   61.0   71.0   81.0   91.0  101.0  111.0
 25.5N / 3:   51.0   61.0   71.0   81.0   91.0  101.0
stat vcoarse,vfine
 
             VFINE[G=GCOARSE]
             LONGITUDE: 20.5E to 80.5E
             LATITUDE: 20.5N to 80.5N
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 36 (6*6*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 51
 Maximum value: 151
 Mean    value: 101 (unweighted average)
 Standard deviation: 24.495
 
             X+Y
             LONGITUDE: 20.5E to 80.5E
             LATITUDE: 20.5N to 80.5N
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 3600 (60*60*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 42
 Maximum value: 160
 Mean    value: 101 (unweighted average)
 Standard deviation: 24.495
list vcoarse[x=@ave,y=@ave],vfine[x=@ave,y=@ave]
             LONGITUDE: 20.5E to 80.5E (XY ave)
             LATITUDE: 20.5N to 80.5N (XY ave)
 Column  1: VCOARSE is VFINE[G=GCOARSE]
 Column  2: VFINE is X+Y
         VCOARSE   VFINE
I / *:      94.71  94.53
 
!****************** F axis regridding *******************
define axis/f="1-jan-1980":"1-jan-1982":24/t0="1-jan-1970" fax24
define axis/f="1-jan-1980":"1-jan-1982":48/t0="1-jan-1920" fax48
define grid/f=fax24 g24
define grid/f=fax48 g48
show grid/N=1:4 g24 g48
    GRID G24
 name       axis              # pts   start                end
 normal    X
 normal    Y
 normal    Z
 normal    T
 normal    E
 FAX24     FORECAST           732 r   01-JAN-1980 00:00    01-JAN-1982 00:00
 
       N     F                       FBOX          FBOXLO                TSTEP (HOURS)
       1>  01-JAN-1980 00:00:00      24         31-DEC-1979 12:00:00       87648
       2>  02-JAN-1980 00:00:00      24         01-JAN-1980 12:00:00       87672
       3>  03-JAN-1980 00:00:00      24         02-JAN-1980 12:00:00       87696
       4>  04-JAN-1980 00:00:00      24         03-JAN-1980 12:00:00       87720
    GRID G48
 name       axis              # pts   start                end
 normal    X
 normal    Y
 normal    Z
 normal    T
 normal    E
 FAX48     FORECAST           367 r   01-JAN-1980 00:00    02-JAN-1982 00:00
 
       N     F                       FBOX          FBOXLO                TSTEP (HOURS)
       1>  01-JAN-1980 00:00:00      48         31-DEC-1979 00:00:00       525960
       2>  03-JAN-1980 00:00:00      48         02-JAN-1980 00:00:00       526008
       3>  05-JAN-1980 00:00:00      48         04-JAN-1980 00:00:00       526056
       4>  07-JAN-1980 00:00:00      48         06-JAN-1980 00:00:00       526104
set region/F="1-jan-1980":"8-jan-1980"
let a24 = _F[g=g24]
let a48 = _F[g=g48]
list a24
             VARIABLE : _F[G=G24]
             SUBSET   : 8 points (FORECAST)
 01-JAN-1980 00 / 1:  87648.
 02-JAN-1980 00 / 2:  87672.
 03-JAN-1980 00 / 3:  87696.
 04-JAN-1980 00 / 4:  87720.
 05-JAN-1980 00 / 5:  87744.
 06-JAN-1980 00 / 6:  87768.
 07-JAN-1980 00 / 7:  87792.
 08-JAN-1980 00 / 8:  87816.
list a48
             VARIABLE : _F[G=G48]
             SUBSET   : 4 points (FORECAST)
 01-JAN-1980 00 / 1:  525960.
 03-JAN-1980 00 / 2:  526008.
 05-JAN-1980 00 / 3:  526056.
 07-JAN-1980 00 / 4:  526104.
 
list a24[g=g48]
             VARIABLE : _F[G=G24]
                        regrid: G48
             SUBSET   : 4 points (FORECAST)
 01-JAN-1980 00 / 1:  87648.
 03-JAN-1980 00 / 2:  87696.
 05-JAN-1980 00 / 3:  87744.
 07-JAN-1980 00 / 4:  87792.
list a24[g=g48]-a48
             VARIABLE : A24[G=G48]-A48
             SUBSET   : 4 points (FORECAST)
 01-JAN-1980 00 / 1: -438312.
 03-JAN-1980 00 / 2: -438312.
 05-JAN-1980 00 / 3: -438312.
 07-JAN-1980 00 / 4: -438312.
 
 
 
set mode/last latit_label
set mode/last long_label
set mode/last calendar
 
*** Running ferret script: bn_syntax_6d.jnl
! bn_syntax_6d.JNL
! - test syntax interpretation of Program FERRET 6D
 
! SET - SHOW - CANCEL DATA
 
! 6D file based on gtbc011
USE 6dfile
 
SHOW GRID
 Default grid for DEFINE VARIABLE is ABSTRACT
LIST/I=1:2/J=50/K=1/L=2/M=3/N=4 SALT
             VARIABLE : (SALINITY(ppt) - 35) /1000 (frac. by wt. less .035)
             FILENAME : 6dfile.nc
             SUBSET   : 2 points (LONGITUDE)
             LATITUDE : 6.167N
             DEPTH (m): 5
             TIME     : 15-MAR-1983 11:00
             E        : 3
             F        : 7
               6.17N 
               50
 160.5W / 1:  3.700
 159.5W / 2:  3.700
SHOW GRID
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid GNJ2
    GRID GNJ2
 name       axis              # pts   start                end                 subset
 PSXT70_71 LONGITUDE            2mr   160.5W               159.5W              full
 PSYT15_75 LATITUDE            61 i   10.169S              9.833N              full
 PSZT      DEPTH (m)           27 i-  5                    3824                full
 TIME      TIME                 3 r   15-MAR-1983 10:00    15-MAR-1983 12:00   full
 EAXIS     E                    5 r   1                    5                   full
 FAXIS     F                    4 r   1                    7                   full
SET GRID/SAVE
SET GRID ABSTRACT
SHOW GRID
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid GNJ2
    GRID GNJ2
 name       axis              # pts   start                end                 subset
 PSXT70_71 LONGITUDE            2mr   160.5W               159.5W              full
 PSYT15_75 LATITUDE            61 i   10.169S              9.833N              full
 PSZT      DEPTH (m)           27 i-  5                    3824                full
 TIME      TIME                 3 r   15-MAR-1983 10:00    15-MAR-1983 12:00   full
 EAXIS     E                    5 r   1                    5                   full
 FAXIS     F                    4 r   1                    7                   full
SHOW GRID/X=180:165W SALT
    GRID GNJ2
 name       axis              # pts   start                end                 subset
 PSXT70_71 LONGITUDE            2mr   160.5W               159.5W              full
 PSYT15_75 LATITUDE            61 i   10.169S              9.833N              full
 PSZT      DEPTH (m)           27 i-  5                    3824                full
 TIME      TIME                 3 r   15-MAR-1983 10:00    15-MAR-1983 12:00   full
 EAXIS     E                    5 r   1                    5                   full
 FAXIS     F                    4 r   1                    7                   full
 
       I     X                       XBOX          XBOXLO
       0>  20E                       358        159W(-159)
SET GRID/RESTORE
SHOW GRID
 Default grid for DEFINE VARIABLE is ABSTRACT
 
can dat/all
 
! nested brackets (7/95 - version 4.01)
use 6dfile,gt4d011
stat/k=1/l=1/j=40/i=3/M=3/N=4/d=2 temp[d=1]
 
             TEMPERATURE
             LONGITUDE: 158.5W
             LATITUDE: 2.833N
             DEPTH (m): 5
             TIME: 15-MAR-1983 10:00
             E: 3
             F: 7
             DATA SET: ./data/6dfile.nc
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 34.97
 Maximum value: 34.97
 Mean    value: 34.97 (unweighted average)
stat/k=1/l=1/j=40/i=3/M=3/N=4/d=2 temp[d=1,g=u]
 
             TEMPERATURE
             regrid: U
             LONGITUDE: 159W
             LATITUDE: 3N
             DEPTH (m): 5
             TIME: 15-MAR-1983 10:00
             E: 3
             F: 7
             DATA SET: ./data/6dfile.nc
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 34.962
 Maximum value: 34.962
 Mean    value: 34.962 (unweighted average)
 
! a common example: continuation for REPEAT loops
repeat/M=1:3 (cancel data/all;\
show data;\
let a = _m;\
list/nohead a;\
cancel variables/all;\
)
!-> REPEAT: M=1
     currently SET data sets:
          1.000
!-> REPEAT: M=2
     currently SET data sets:
          2.000
!-> REPEAT: M=3
     currently SET data sets:
          3.000
*** Running ferret script: bn_expressions_6d.jnl
! bn_expressions_6d.jnl
! testing expressions syntax in E and F directions.
! Note pseudo-variables are _E,
 
! test grid creation for a variety of combos
let c1 = 2
let m1 = _m
let n1 = _n
 
! ... constant plus variable or pseudovariable
set reg/m=1:3
list/order=e _m + 2
             VARIABLE : _M + 2
             SUBSET   : 3 points (E)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=e 2 + _m
             VARIABLE : 2 + _M
             SUBSET   : 3 points (E)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=e m1 + 2
             VARIABLE : M1 + 2
             SUBSET   : 3 points (E)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=e 2 + m1
             VARIABLE : 2 + M1
             SUBSET   : 3 points (E)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=e _m + c1
             VARIABLE : _M + C1
             SUBSET   : 3 points (E)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=e c1 + _m
             VARIABLE : C1 + _M
             SUBSET   : 3 points (E)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=e m1 + c1
             VARIABLE : M1 + C1
             SUBSET   : 3 points (E)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=e c1 + m1
             VARIABLE : C1 + M1
             SUBSET   : 3 points (E)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
 
! ... constant plus variable or pseudovariable with modified region
set reg/m=11:13
list/order=e _m[m=1:3] + 2
             VARIABLE : _M[M=1:3] + 2
             SUBSET   : 3 points (E)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=e 2 + _m[m=1:3]
             VARIABLE : 2 + _M[M=1:3]
             SUBSET   : 3 points (E)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=e m1[m=1:3] + 2
             VARIABLE : M1[M=1:3] + 2
             SUBSET   : 3 points (E)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=e 2 + m1[m=1:3]
             VARIABLE : 2 + M1[M=1:3]
             SUBSET   : 3 points (E)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=e _m[m=1:3] + c1
             VARIABLE : _M[M=1:3] + C1
             SUBSET   : 3 points (E)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=e c1 + _m[m=1:3]
             VARIABLE : C1 + _M[M=1:3]
             SUBSET   : 3 points (E)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=e m1[m=1:3] + c1
             VARIABLE : M1[M=1:3] + C1
             SUBSET   : 3 points (E)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=e c1 + m1[m=1:3]
             VARIABLE : C1 + M1[M=1:3]
             SUBSET   : 3 points (E)
            1      2      3    
            1      2      3
          3.000  4.000  5.000
 
! ... two variables or pseudovariables
set reg/m=1:3/n=2
list/order=e _m + _n
             VARIABLE : _M + _N
             SUBSET   : 3 points (E)
             F        : 2
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=e _m + n1
             VARIABLE : _M + N1
             SUBSET   : 3 points (E)
             F        : 2
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=e n1 + _m
             VARIABLE : N1 + _M
             SUBSET   : 3 points (E)
             F        : 2
            1      2      3    
            1      2      3
          3.000  4.000  5.000
 
! ... two variables or pseudovariables with modified region
set reg/m=1:3/n=1
list/order=e _m + _n[n=2]
             VARIABLE : _M + _N[N=2]
             SUBSET   : 3 points (E)
             F        : 2
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=e _m + n1[n=2]
             VARIABLE : _M + N1[N=2]
             SUBSET   : 3 points (E)
             F        : 2
            1      2      3    
            1      2      3
          3.000  4.000  5.000
list/order=e n1[n=2] + _m
             VARIABLE : N1[N=2] + _M
             SUBSET   : 3 points (E)
             F        : 2
            1      2      3    
            1      2      3
          3.000  4.000  5.000
 
! operators
CANCEL REGION
SET REGION/m=1:5/n=1:5
LIST 10+2
             VARIABLE : 10+2
          12.00
LIST/order=e  _m
             VARIABLE : _M
                        axis ABSTRACT
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  2.000  3.000  4.000  5.000
LIST/order=e  _m*3
             VARIABLE : _M*3
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
           3.00   6.00   9.00  12.00  15.00
LIST/order=e  _m/3
             VARIABLE : _M/3
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          0.333  0.667  1.000  1.333  1.667
LIST/order=e  _m+3
             VARIABLE : _M+3
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          4.000  5.000  6.000  7.000  8.000
LIST/order=e  _m-3
             VARIABLE : _M-3
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
         -2.000 -1.000  0.000  1.000  2.000
LIST/order=e  _m^3
             VARIABLE : _M^3
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
            1.0    8.0   27.0   64.0  125.0
LIST/order=e  _m EQ 3
             VARIABLE : _M EQ 3
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          0.000  0.000  1.000  0.000  0.000
LIST/order=e  _m NE 3
             VARIABLE : _M NE 3
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  1.000  0.000  1.000  1.000
LIST/order=e  _m GT 3
             VARIABLE : _M GT 3
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          0.000  0.000  0.000  1.000  1.000
LIST/order=e  _m GE 3
             VARIABLE : _M GE 3
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          0.000  0.000  1.000  1.000  1.000
LIST/order=e  _m LT 3
             VARIABLE : _M LT 3
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  1.000  0.000  0.000  0.000
LIST/order=e  _m LE 3
             VARIABLE : _M LE 3
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  1.000  1.000  0.000  0.000
LIST/order=e  (_m LT 3) OR (_m GT 3)
             VARIABLE : (_M LT 3) OR (_M GT 3)
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  1.000  0.000  1.000  1.000
LIST/order=e  (_m LE 3) AND (_m GE 3)
             VARIABLE : (_M LE 3) AND (_M GE 3)
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          0.000  0.000  1.000  0.000  0.000
LIST/order=e  (_m+3)*3 - 9 - (_m+_m+_m)
             VARIABLE : (_M+3)*3 - 9 - (_M+_M+_M)
             SUBSET   : 5 points (E)
            1       2       3       4       5     
             1       2       3       4       5
          0.0000  0.0000  0.0000  0.0000  0.0000
LIST/order=e  _n * ( (_m+3)*3 - 9 - (_m+_m+_m) )
             VARIABLE : _N * ( (_M+3)*3 - 9 - (_M+_M+_M) )
             SUBSET   : 5 by 5 points (E-F)
            1       2       3       4       5     
             1       2       3       4       5
 ---- N:1 F:   1
 N:1 F:   0.0000  0.0000  0.0000  0.0000  0.0000
 ---- N:2 F:   2
 N:2 F:   0.0000  0.0000  0.0000  0.0000  0.0000
 ---- N:3 F:   3
 N:3 F:   0.0000  0.0000  0.0000  0.0000  0.0000
 ---- N:4 F:   4
 N:4 F:   0.0000  0.0000  0.0000  0.0000  0.0000
 ---- N:5 F:   5
 N:5 F:   0.0000  0.0000  0.0000  0.0000  0.0000
 
! IF, THEN, ELSE
LIST/order=e  IF _m GT 3 THEN _m
             VARIABLE : IF _M GT 3 THEN _M
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
           ....   ....   ....  4.000  5.000
LIST/order=e  IF _m GT 3 THEN _m ELSE 0
             VARIABLE : IF _M GT 3 THEN _M ELSE 0
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          0.000  0.000  0.000  4.000  5.000
! error: nested IF tests
SET MODE IGNORE_ERRORS
LIST/order=e  IF _m GT 3 THEN ( IF _m LT 5 THEN _m ELSE -9 ) ELSE .333	! err
LET A = IF _m LT 5 THEN _m ELSE -9					! err
SET MODE/LAST IGNORE_ERRORS
LET A = IF _m LT 5 THEN _m ELSE (-9)
LIST/order=e  IF _m GT 3 THEN ( A ) ELSE .333
             VARIABLE : IF _M GT 3 THEN ( A ) ELSE .333
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          0.333  0.333  0.333  4.000 -9.000
 
! functions
LIST/order=e  MAX(_m,3)
             VARIABLE : MAX(_M,3)
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          3.000  3.000  3.000  4.000  5.000
LIST/order=e  MIN(_m,3)
             VARIABLE : MIN(_M,3)
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  2.000  3.000  3.000  3.000
LIST/order=e  INT(_m/3)
             VARIABLE : INT(_M/3)
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          0.000  0.000  1.000  1.000  1.000
LIST/order=e  ABS(_m-3)
             VARIABLE : ABS(_M-3)
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          2.000  1.000  0.000  1.000  2.000
LIST/order=e  EXP(_m)
             VARIABLE : EXP(_M)
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
            2.7    7.4   20.1   54.6  148.4
LIST/order=e  LN(_m)
             VARIABLE : LN(_M)
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          0.000  0.693  1.099  1.386  1.609
LIST/order=e  LN(EXP(_m))
             VARIABLE : LN(EXP(_M))
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  2.000  3.000  4.000  5.000
LIST/order=e  EXP(LN(_m))
             VARIABLE : EXP(LN(_M))
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  2.000  3.000  4.000  5.000
LIST/order=e  LOG(_m)
             VARIABLE : LOG(_M)
             SUBSET   : 5 points (E)
            1       2       3       4       5     
             1       2       3       4       5
          0.0000  0.3010  0.4771  0.6021  0.6990
LIST/order=e  LOG(10^_m)
             VARIABLE : LOG(10^_M)
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  2.000  3.000  4.000  5.000
LIST/order=e  10^LOG(_m)
             VARIABLE : 10^LOG(_M)
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  2.000  3.000  4.000  5.000
LIST/order=e  SIN(_m)
             VARIABLE : SIN(_M)
             SUBSET   : 5 points (E)
            1       2       3       4       5     
             1       2       3       4       5
          0.8415  0.9093  0.1411 -0.7568 -0.9589
LIST/order=e  ASIN(SIN(_m/3))
             VARIABLE : ASIN(SIN(_M/3))
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          0.333  0.667  1.000  1.333  1.475
LIST/order=e  COS(_m)
             VARIABLE : COS(_M)
             SUBSET   : 5 points (E)
            1       2       3       4       5     
             1       2       3       4       5
          0.5403 -0.4161 -0.9900 -0.6536  0.2837
LIST/order=e  ACOS(COS(_m/3))
             VARIABLE : ACOS(COS(_M/3))
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          0.333  0.667  1.000  1.333  1.667
LIST/order=e  TAN(_m)
             VARIABLE : TAN(_M)
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          1.557 -2.185 -0.143  1.158 -3.381
LIST/order=e  ATAN(TAN(_m/3))
             VARIABLE : ATAN(TAN(_M/3))
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          0.333  0.667  1.000  1.333 -1.475
LIST/n=1:3    ATAN2(_n-1,_m-1)
             VARIABLE : ATAN2(_N-1,_M-1)
             SUBSET   : 5 by 3 points (E-F)
             1      2      3      4      5    
             1      2      3      4      5
 1   / 1:   ....  0.000  0.000  0.000  0.000
 2   / 2:  1.571  0.785  0.464  0.322  0.245
 3   / 3:  1.571  1.107  0.785  0.588  0.464
LIST/order=e  MOD(_m,3)
             VARIABLE : MOD(_M,3)
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
          1.000  2.000  0.000  1.000  2.000
LIST/order=e  IGNORE0(_m-3)
             VARIABLE : IGNORE0(_M-3)
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
         -2.000 -1.000   ....  1.000  2.000
LIST/order=e  MISSING( IGNORE0(_m-3),-9 )
             VARIABLE : MISSING( IGNORE0(_M-3),-9 )
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
         -2.000 -1.000 -9.000  1.000  2.000
LIST/order=e  RANDU(_m)
             VARIABLE : RANDU(_M)
             SUBSET   : 5 points (E)
            1       2       3       4       5     
             1       2       3       4       5
          0.3376  0.7238  0.0304  0.8499  0.1694
LIST/order=e  RANDN(_m)
             VARIABLE : RANDN(_M)
             SUBSET   : 5 points (E)
            1      2      3      4      5    
            1      2      3      4      5
         -0.267  0.283 -0.323  1.217 -0.304
 
! syntax errors
SET MODE IGNORE_ERRORS
load a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21
SET MODE/LAST IGNORE_ERRORS
 
! test formatted output where the output field is too small
LIST/m=1:3/FORMAT=(F6.2) 1/(_m-2)		! single column test
             VARIABLE : 1/(_M-2)
             BAD FLAG : -1.E+34       
             SUBSET   : 3 points (E)
             E        : 0.5 to 3.5
 -1.00
******
  1.00
LIST/m=1:3/FORMAT=(2F6.2) 1/(_m-2),2/(_m-2)	! multi-column test
             E: 0.5 to 3.5
 Column  1: EX#1 is 1/(_M-2)
 Column  2: EX#2 is 2/(_M-2)
 -1.00 -2.00
************
  1.00  2.00
 
! test grid box limit pseudo-variables
LIST/m=5:7 EBOXLO, EBOXHI
             E: 4.5 to 7.5
 Column  1: EBOXLO is EBOXLO (axis ABSTRACT)
 Column  2: EBOXHI is EBOXHI (axis ABSTRACT)
        EBOXLO  EBOXHI
5   / 5:  4.500  5.500
6   / 6:  5.500  6.500
7   / 7:  6.500  7.500
LIST/n=5:7 FBOXLO, FBOXHI
             F: 4.5 to 7.5
 Column  1: FBOXLO is FBOXLO (axis ABSTRACT)
 Column  2: FBOXHI is FBOXHI (axis ABSTRACT)
        FBOXLO  FBOXHI
5   / 5:  4.500  5.500
6   / 6:  5.500  6.500
7   / 7:  6.500  7.500
*** Running ferret script: bn_direction_fcns_6d.jnl
! bn_direction_functions_6d
! Tests of sort, sample, reverse, convolve, compress, and compess_by
! functions in the E and F directions.
 
! Sort and sort-string in E direction
 
let b = {5,4,3}
let c = esequence(b)
let m_index = sortm(c)
list c, m_index, samplem(c, m_index)
             E: 0.5 to 3.5
 Column  1: C is ESEQUENCE(B)
 Column  2: M_INDEX is SORTM(C)
 Column  3: EX#3 is SAMPLEM(C, M_INDEX)
             C  M_INDEX  EX#3
1   / 1:  5.000   3.000  3.000
2   / 2:  4.000   2.000  4.000
3   / 3:  3.000   1.000  5.000
 
let e1 = esequence({"q", "0", "c"})
let m_index = sortm(e1)  ! or sortm_str
list e1, m_index, samplem(e1, m_index)
             E: 0.5 to 3.5
 Column  1: E1 is ESEQUENCE({"q", "0", "c"})
 Column  2: M_INDEX is SORTM(E1)
 Column  3: EX#3 is SAMPLEM(E1, M_INDEX)
         E1  M_INDEX EX#3
1   / 1: "q"   2.000 "0"
2   / 2: "0"   3.000 "c"
3   / 3: "c"   1.000 "q"
 
 
! Sort and sort-string in F direction
 
let b = {5,4,3}
let c = fsequence(b)
let n_index = sortn(c)
list c, n_index, samplen(c, n_index)
             F: 0.5 to 3.5
 Column  1: C is FSEQUENCE(B)
 Column  2: N_INDEX is SORTN(C)
 Column  3: EX#3 is SAMPLEN(C, N_INDEX)
             C  N_INDEX  EX#3
1   / 1:  5.000   3.000  3.000
2   / 2:  4.000   2.000  4.000
3   / 3:  3.000   1.000  5.000
 
let f1 = fsequence({"q", "0", "c"})
let n_index = sortn(f1)  ! or sortn_str
list f1, n_index, samplen(f1, n_index)
             F: 0.5 to 3.5
 Column  1: F1 is FSEQUENCE({"q", "0", "c"})
 Column  2: N_INDEX is SORTN(F1)
 Column  3: EX#3 is SAMPLEN(F1, N_INDEX)
         F1  N_INDEX EX#3
1   / 1: "q"   2.000 "0"
2   / 2: "0"   3.000 "c"
3   / 3: "c"   1.000 "q"
 
! Ereverse and Freverse
use 6dfile
 
list/i=1/j=15/k=1/l=1/n=1 temp, ereverse(temp)
 WARNING: Listed variables have ambiguous coordinates on axes: E
             DATA SET: ./data/6dfile.nc
             LONGITUDE: 160.5W
             LATITUDE: 5.5S
             DEPTH (m): 5
             TIME: 15-MAR-1983 10:00
             F: 1
 Column  1: TEMP is TEMPERATURE (deg. C)
 Column  2: EX#2 is EREVERSE(TEMP)
        TEMP   EX#2
M / 1:  30.75  34.75
M / 2:  31.75  33.75
M / 3:  32.75  32.75
M / 4:  33.75  31.75
M / 5:  34.75  30.75
list/i=1/j=15/k=1/l=1/m=1 temp, freverse(temp)
 WARNING: Listed variables have ambiguous coordinates on axes: F
             DATA SET: ./data/6dfile.nc
             LONGITUDE: 160.5W
             LATITUDE: 5.5S
             DEPTH (m): 5
             TIME: 15-MAR-1983 10:00
             E: 1
 Column  1: TEMP[D=6dfile,F=0:8] is TEMPERATURE (deg. C)
 Column  2: EX#2 is FREVERSE(TEMP)
        TEMP   EX#2
N / 1:  30.75  31.35
N / 2:  30.95  31.15
N / 3:  31.15  30.95
N / 4:  31.35  30.75
can dat/all
 
! ConvolveM, ConvolveN
let a = esequence({0,1,1,0,1,0,0,0,,0,0,0})
let apat = esequence({.25,.5,.25})
list a, a[m=@spz], convolvem(a,apat), convolvem(a,{.1,.4,.4,.1})
             E: 0.5 to 12.5
 Column  1: A is ESEQUENCE({0,1,1,0,1,0,0,0,,0,0,0})
 Column  2: A[E=@SPZ:3] is ESEQUENCE({0,1,1,0,1,0,0,0,,0,0,0}) (Parzen smoothed by 3 pts on E)
 Column  3: EX#3 is CONVOLVEM(A,APAT)
 Column  4: EX#4 is CONVOLVEM(A,{.1,.4,.4,.1})
               A     A      EX#3    EX#4
1    /  1:  0.000    ....    ....    ....
2    /  2:  1.000  0.7500  0.7500  0.8000
3    /  3:  1.000  0.7500  0.7500  0.6000
4    /  4:  0.000  0.5000  0.5000  0.5000
5    /  5:  1.000  0.5000  0.5000  0.4000
6    /  6:  0.000  0.2500  0.2500  0.1000
7    /  7:  0.000  0.0000  0.0000    ....
8    /  8:  0.000    ....    ....    ....
9    /  9:   ....    ....    ....    ....
10   / 10:  0.000    ....    ....    ....
11   / 11:  0.000  0.0000  0.0000    ....
12   / 12:  0.000    ....    ....    ....
 
let b = fsequence({0,1,1,0,1,0,0,0,,0,0,0})
let bpat = fsequence({.25,.5,.25})
list b, b[n=@spz], convolven(b,bpat), convolven(b,{.1,.4,.4,.1})
             F: 0.5 to 12.5
 Column  1: B is FSEQUENCE({0,1,1,0,1,0,0,0,,0,0,0})
 Column  2: B[F=@SPZ:3] is FSEQUENCE({0,1,1,0,1,0,0,0,,0,0,0}) (Parzen smoothed by 3 pts on F)
 Column  3: EX#3 is CONVOLVEN(B,BPAT)
 Column  4: EX#4 is CONVOLVEN(B,{.1,.4,.4,.1})
               B     B      EX#3    EX#4
1    /  1:  0.000    ....    ....    ....
2    /  2:  1.000  0.7500  0.7500  0.8000
3    /  3:  1.000  0.7500  0.7500  0.6000
4    /  4:  0.000  0.5000  0.5000  0.5000
5    /  5:  1.000  0.5000  0.5000  0.4000
6    /  6:  0.000  0.2500  0.2500  0.1000
7    /  7:  0.000  0.0000  0.0000    ....
8    /  8:  0.000    ....    ....    ....
9    /  9:   ....    ....    ....    ....
10   / 10:  0.000    ....    ....    ....
11   / 11:  0.000  0.0000  0.0000    ....
12   / 12:  0.000    ....    ....    ....
 
! CompressM, CompressN
let a = esequence({0,1,1,,1,0,,0}) + fsequence({0,,1,,1})
list a
             VARIABLE : ESEQUENCE({0,1,1,,1,0,,0}) + FSEQUENCE({0,,1,,1})
             SUBSET   : 8 by 5 points (E-F)
             1      2      3      4      5      6      7      8    
             1      2      3      4      5      6      7      8
 1   / 1:  0.000  1.000  1.000   ....  1.000  0.000   ....  0.000
 2   / 2:   ....   ....   ....   ....   ....   ....   ....   ....
 3   / 3:  1.000  2.000  2.000   ....  2.000  1.000   ....  1.000
 4   / 4:   ....   ....   ....   ....   ....   ....   ....   ....
 5   / 5:  1.000  2.000  2.000   ....  2.000  1.000   ....  1.000
list compressm(a)
             VARIABLE : COMPRESSM(A)
             SUBSET   : 8 by 5 points (E-F)
             1      2      3      4      5      6      7      8    
             1      2      3      4      5      6      7      8
 1   / 1:  0.000  1.000  1.000  1.000  0.000  0.000   ....   ....
 2   / 2:   ....   ....   ....   ....   ....   ....   ....   ....
 3   / 3:  1.000  2.000  2.000  2.000  1.000  1.000   ....   ....
 4   / 4:   ....   ....   ....   ....   ....   ....   ....   ....
 5   / 5:  1.000  2.000  2.000  2.000  1.000  1.000   ....   ....
list compressn(a)
             VARIABLE : COMPRESSN(A)
             SUBSET   : 8 by 5 points (E-F)
             1      2      3      4      5      6      7      8    
             1      2      3      4      5      6      7      8
 1   / 1:  0.000  1.000  1.000   ....  1.000  0.000   ....  0.000
 2   / 2:  1.000  2.000  2.000   ....  2.000  1.000   ....  1.000
 3   / 3:  1.000  2.000  2.000   ....  2.000  1.000   ....  1.000
 4   / 4:   ....   ....   ....   ....   ....   ....   ....   ....
 5   / 5:   ....   ....   ....   ....   ....   ....   ....   ....
 
let mask = esequence({1,,1,,1}) + 0*L[l=101:102]
list mask
             VARIABLE : ESEQUENCE({1,,1,,1}) + 0*L[L=101:102]
             SUBSET   : 2 by 5 points (T-E)
            101    102   
           101    102
 1   / 1:  1.000  1.000
 2   / 2:   ....   ....
 3   / 3:  1.000  1.000
 4   / 4:   ....   ....
 5   / 5:  1.000  1.000
list compressm_by(esequence({10,20,30,40,50}),mask)
             VARIABLE : COMPRESSM_BY(ESEQUENCE({10,20,30,40,50}),MASK)
             SUBSET   : 2 by 5 points (T-E)
            101    102   
           101    102
 1   / 1:  10.00  10.00
 2   / 2:  30.00  30.00
 3   / 3:  50.00  50.00
 4   / 4:   ....   ....
 5   / 5:   ....   ....
 
let mask = fsequence({1,,1,,1}) + 0*L[l=101:102]
list mask
             VARIABLE : FSEQUENCE({1,,1,,1}) + 0*L[L=101:102]
             SUBSET   : 2 by 5 points (T-F)
            101    102   
           101    102
 1   / 1:  1.000  1.000
 2   / 2:   ....   ....
 3   / 3:  1.000  1.000
 4   / 4:   ....   ....
 5   / 5:  1.000  1.000
list compressn_by(fsequence({10,20,30,40,50}),mask)
             VARIABLE : COMPRESSN_BY(FSEQUENCE({10,20,30,40,50}),MASK)
             SUBSET   : 2 by 5 points (T-F)
            101    102   
           101    102
 1   / 1:  10.00  10.00
 2   / 2:  30.00  30.00
 3   / 3:  50.00  50.00
 4   / 4:   ....   ....
 5   / 5:   ....   ....
*** Running ferret script: bn_regrid_transforms_6d.jnl
! bn_regrid_transforms_6d.jnl
! benchmark to test regridding transformations and syntax
! version of bn_regrid_transforms, using E and F directions.
! note with fix to ticket 2399 mode calendar applies to F axis
 
use gtsa056_1_ef
set mode diag
set mode calendar:years
 
define axis/f=23-jan-1982:30-jan-1982:20/unit=hour fax20
define axis/x=120e:60w:10/unit=degrees xax10
define grid/like=temp/f=fax20 g5day
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GGR1            PSXT      PSYT5_89  PSZT1_2   TIME2     EAXIS     FAXIS
 
set reg/x=130w:125w/y=0:1.5/e=1:2/f=23-JAN-1982:24-jan-1982/t=21-JAN-1982/z=5
 
use gtsa056_1_ef    	!kob 4/99
 
stat temp[g=g5day] - temp[g=g5day@ave]
 dealloc  dynamic grid GGR1            PSXT      PSYT5_89  PSZT1_2   TIME2     EAXIS     FAXIS
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:    101    105  J:   41   46  K:    1    1  L:      3      3  M:    1    2  N:    1    2
 strip regrid on F: TEMP --> G5DAY            @LIN
 reading TEMP     M:  1 dset:   1 I:    101    105  J:   41   46  K:    1    1  L:      3      3  M:    1    2  N:    1    2
 regrid  TEMP     M:  2 dset:   1 I:    101    105  J:   41   46  K:    1    1  L:      3      3  M:    1    2  N:    1    2
 strip regrid on F: TEMP --> G5DAY            @AVE
 found   TEMP     M:  1 dset:   1 I:    101    105  J:   41   46  K:    1    1  L:      3      3  M:    1    2  N:    1    2
 regrid  TEMP     M:  3 dset:   1 I:    101    105  J:   41   46  K:    1    1  L:      3      3  M:    1    2  N:    1    2
 
             TEMP[G=G5DAY] - TEMP[G=G5DAY@AVE]
             LONGITUDE: 130W to 125W
             LATITUDE: 0 to 1.5N
             DEPTH (m): 5
             TIME: 1982
             E: 1 to 2
             FORECAST: 1982 to 1982
             DATA SET: ./data/gtsa056_1_ef.nc
 
 Total # of data points: 120 (5*6*1*1*2*2)
 # flagged as bad  data: 0
 Minimum value: -1.7333
 Maximum value: 2
 Mean    value: 0.13333 (unweighted average)
 Standard deviation: 1.8745
 
! basic regrid tests
LIST temp[g=g5day@ave]
 -DELETE EX#1     M:  4 dset:   1 I:    101    105  J:   41   46  K:    1    1  L:      3      3  M:    1    2  N:    1    2
 dealloc  dynamic grid G5DAY           PSXT      PSYT5_89  PSZT1_2   TIME2     EAXIS     FAX20
 -DELETE TEMP     M:  2 dset:   1 I:    101    105  J:   41   46  K:    1    1  L:      3      3  M:    1    2  N:    1    2
 -DELETE TEMP     M:  3 dset:   1 I:    101    105  J:   41   46  K:    1    1  L:      3      3  M:    1    2  N:    1    2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:    101    105  J:   41   46  K:    1    1  L:      3      3  M:    1    2  N:    1    2
 strip regrid on F: TEMP --> G5DAY            @AVE
 found   TEMP     M:  1 dset:   1 I:    101    105  J:   41   46  K:    1    1  L:      3      3  M:    1    2  N:    1    2
 regrid  TEMP     M:  3 dset:   1 I:    101    105  J:   41   46  K:    1    1  L:      3      3  M:    1    2  N:    1    2
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5DAY on F@AVE
             FILENAME : gtsa056_1_ef.nc
             SUBSET   : 5 by 6 by 2 by 2 points (LONGITUDE-LATITUDE-E-FORECAST)
             DEPTH (m): 5
             TIME     : 1982
              129.5W 128.5W 127.5W 126.5W 125.5W 
              101    102    103    104    105
 ---- N:1 F:   1982
 ---- M:1 E:   1
 1.5N  / 46:  32.35  32.37  32.56  32.97  33.45
 1.17N / 45:  32.17  32.19  32.33  32.69  33.14
 0.83N / 44:  32.02  32.01  32.10  32.39  32.79
 0.5N  / 43:  31.93  31.90  31.91  32.09  32.43
 0.17N / 42:  31.89  31.84  31.79  31.86  32.10
 0.17S / 41:  31.95  31.86  31.77  31.74  31.87
 ---- M:2 E:   2
 1.5N  / 46:  38.35  38.37  38.56  38.97  39.45
 1.17N / 45:  38.17  38.19  38.33  38.69  39.14
 0.83N / 44:  38.02  38.01  38.10  38.39  38.79
 0.5N  / 43:  37.93  37.90  37.91  38.09  38.43
 0.17N / 42:  37.89  37.84  37.79  37.86  38.10
 0.17S / 41:  37.95  37.86  37.77  37.74  37.87
 ---- N:2 F:   1982
 ---- M:1 E:   1
 1.5N  / 46:  37.75  37.77  37.96  38.37  38.85
 1.17N / 45:  37.57  37.59  37.73  38.09  38.54
 0.83N / 44:  37.42  37.41  37.50  37.79  38.19
 0.5N  / 43:  37.33  37.30  37.31  37.49  37.83
 0.17N / 42:  37.29  37.24  37.19  37.26  37.50
 0.17S / 41:  37.35  37.26  37.17  37.14  37.27
 ---- M:2 E:   2
 1.5N  / 46:  43.75  43.77  43.96  44.37  44.85
 1.17N / 45:  43.57  43.59  43.73  44.09  44.54
 0.83N / 44:  43.42  43.41  43.50  43.79  44.19
 0.5N  / 43:  43.33  43.30  43.31  43.49  43.83
 0.17N / 42:  43.29  43.24  43.19  43.26  43.50
 0.17S / 41:  43.35  43.26  43.17  43.14  43.27
LIST temp[g=g5day]
 dealloc  dynamic grid G5DAY           PSXT      PSYT5_89  PSZT1_2   TIME2     EAXIS     FAX20
 -DELETE TEMP     M:  3 dset:   1 I:    101    105  J:   41   46  K:    1    1  L:      3      3  M:    1    2  N:    1    2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:    101    105  J:   41   46  K:    1    1  L:      3      3  M:    1    2  N:    1    2
 strip regrid on F: TEMP --> G5DAY            @LIN
 found   TEMP     M:  1 dset:   1 I:    101    105  J:   41   46  K:    1    1  L:      3      3  M:    1    2  N:    1    2
 regrid  TEMP     M:  3 dset:   1 I:    101    105  J:   41   46  K:    1    1  L:      3      3  M:    1    2  N:    1    2
             VARIABLE : TEMPERATURE (deg. C)
                        regrid: G5DAY
             FILENAME : gtsa056_1_ef.nc
             SUBSET   : 5 by 6 by 2 by 2 points (LONGITUDE-LATITUDE-E-FORECAST)
             DEPTH (m): 5
             TIME     : 1982
              129.5W 128.5W 127.5W 126.5W 125.5W 
              101    102    103    104    105
 ---- N:1 F:   1982
 ---- M:1 E:   1
 1.5N  / 46:  34.35  34.37  34.56  34.97  35.45
 1.17N / 45:  34.17  34.19  34.33  34.69  35.14
 0.83N / 44:  34.02  34.01  34.10  34.39  34.79
 0.5N  / 43:  33.93  33.90  33.91  34.09  34.43
 0.17N / 42:  33.89  33.84  33.79  33.86  34.10
 0.17S / 41:  33.95  33.86  33.77  33.74  33.87
 ---- M:2 E:   2
 1.5N  / 46:  40.35  40.37  40.56  40.97  41.45
 1.17N / 45:  40.17  40.19  40.33  40.69  41.14
 0.83N / 44:  40.02  40.01  40.10  40.39  40.79
 0.5N  / 43:  39.93  39.90  39.91  40.09  40.43
 0.17N / 42:  39.89  39.84  39.79  39.86  40.10
 0.17S / 41:  39.95  39.86  39.77  39.74  39.87
 ---- N:2 F:   1982
 ---- M:1 E:   1
 1.5N  / 46:  36.01  36.04  36.23  36.64  37.12
 1.17N / 45:  35.84  35.85  36.00  36.36  36.80
 0.83N / 44:  35.69  35.68  35.77  36.06  36.45
 0.5N  / 43:  35.59  35.56  35.58  35.76  36.09
 0.17N / 42:  35.56  35.50  35.46  35.53  35.76
 0.17S / 41:  35.62  35.53  35.44  35.41  35.53
 ---- M:2 E:   2
 1.5N  / 46:  42.01  42.04  42.23  42.64  43.12
 1.17N / 45:  41.84  41.85  42.00  42.36  42.80
 0.83N / 44:  41.69  41.68  41.77  42.06  42.45
 0.5N  / 43:  41.59  41.56  41.58  41.76  42.09
 0.17N / 42:  41.56  41.50  41.46  41.53  41.76
 0.17S / 41:  41.62  41.53  41.44  41.41  41.53
 
! unspecified regions
SET MODE IGNORE	! V.5 change
canc reg
set reg/n=1:3/t=21-JAN-1982/z=5  ! x,y,e unspecified
 
canc reg
set reg/i=101:105/j=41:42/t=21-JAN-1982/z=5  ! e,f unspecified
 
SET MODE/LAST IGNORE	! V.5 change
 
! plot verifications
set mode interp    ! regridding is also an interpolation
cancel viewports
set window/size=.5/aspect=.4 1
 
! E axis
use gtsa056_1_ef 		!kob 4/99
set region/x=180E/y=0/f=23-JAN-1982/t=21-JAN-1982/z=5
plot temp
 dealloc  dynamic grid G5DAY           PSXT      PSYT5_89  PSZT1_2   TIME2     EAXIS     FAX20
 -DELETE TEMP     M:  3 dset:   1 I:    101    105  J:   41   46  K:    1    1  L:      3      3  M:    1    2  N:    1    2
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GGR1            PSXT      PSYT5_89  PSZT1_2   TIME2     EAXIS     FAXIS
 strip --> EX#1[F=1982@ITP,D=1]
 strip --> EX#1[T=1982@ITP,D=1]
 strip --> EX#1[Y=0@ITP,D=1]
 strip --> EX#1[X=180E@ITP,D=1]
 eval    EX#1     C:  8 dset:   1 I:     50     51  J:   41   42  K:    1    1  L:      2      3  M:    1    2  N:    1    2
 reading TEMP     M:  3 dset:   1 I:     50     51  J:   41   42  K:    1    1  L:      2      3  M:    1    2  N:    1    2
 doing --> TEMP[X=180E@ITP,D=1]
 doing --> TEMP[Y=0@ITP,D=1]
 doing --> TEMP[T=1982@ITP,D=1]
 doing --> TEMP[F=1982@ITP,D=1]
setting up plot
PPL plot 1    complete
plot/over temp[g=g5day]
 dealloc  dynamic grid GGR1            PSXT      PSYT5_89  PSZT1_2   TIME2     EAXIS     FAXIS
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=1982@ITP,D=1]
 strip --> EX#1[Y=0@ITP,D=1]
 strip --> EX#1[X=180E@ITP,D=1]
 eval    EX#1     C:  7 dset:   1 I:     50     51  J:   41   42  K:    1    1  L:      2      3  M:    1    2  N:    1    1
 strip regrid on F: TEMP --> G5DAY            @LIN
 found   TEMP     M:  3 dset:   1 I:     50     51  J:   41   42  K:    1    1  L:      2      3  M:    1    2  N:    1    2
 regrid  TEMP     M:  7 dset:   1 I:     50     51  J:   41   42  K:    1    1  L:      2      3  M:    1    2  N:    1    1
 doing --> TEMP[X=180E@ITP,D=1]
 doing --> TEMP[Y=0@ITP,D=1]
 doing --> TEMP[T=1982@ITP,D=1]
setting up plot
PPL plot 2    complete
plot/over temp[g=g5day@ave]
 dealloc  dynamic grid G5DAY           PSXT      PSYT5_89  PSZT1_2   TIME2     EAXIS     FAX20
 -DELETE TEMP     M:  7 dset:   1 I:     50     51  J:   41   42  K:    1    1  L:      2      3  M:    1    2  N:    1    1
 -DELETE TEMP     M:  8 dset:   1 I:   -999   -999  J:   41   42  K:    1    1  L:      2      3  M:    1    2  N:    1    1
 -DELETE TEMP     M:  9 dset:   1 I:   -999   -999  J: -999 -999  K:    1    1  L:      2      3  M:    1    2  N:    1    1
 -DELETE TEMP     M: 10 dset:   1 I:   -999   -999  J: -999 -999  K:    1    1  L:   -999   -999  M:    1    2  N:    1    1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=1982@ITP,D=1]
 strip --> EX#1[Y=0@ITP,D=1]
 strip --> EX#1[X=180E@ITP,D=1]
 eval    EX#1     C:  7 dset:   1 I:     50     51  J:   41   42  K:    1    1  L:      2      3  M:    1    2  N:    1    1
 strip regrid on F: TEMP --> G5DAY            @AVE
 found   TEMP     M:  3 dset:   1 I:     50     51  J:   41   42  K:    1    1  L:      2      3  M:    1    2  N:    1    2
 regrid  TEMP     M: 10 dset:   1 I:     50     51  J:   41   42  K:    1    1  L:      2      3  M:    1    2  N:    1    1
 doing --> TEMP[X=180E@ITP,D=1]
 doing --> TEMP[Y=0@ITP,D=1]
 doing --> TEMP[T=1982@ITP,D=1]
setting up plot
PPL plot 3    complete
plot/over temp[g=g5day@asn]
 dealloc  dynamic grid G5DAY           PSXT      PSYT5_89  PSZT1_2   TIME2     EAXIS     FAX20
 -DELETE TEMP     M:  7 dset:   1 I:   -999   -999  J: -999 -999  K:    1    1  L:   -999   -999  M:    1    2  N:    1    1
 -DELETE TEMP     M:  8 dset:   1 I:   -999   -999  J: -999 -999  K:    1    1  L:      2      3  M:    1    2  N:    1    1
 -DELETE TEMP     M:  9 dset:   1 I:   -999   -999  J:   41   42  K:    1    1  L:      2      3  M:    1    2  N:    1    1
 -DELETE TEMP     M: 10 dset:   1 I:     50     51  J:   41   42  K:    1    1  L:      2      3  M:    1    2  N:    1    1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=1982@ITP,D=1]
 strip --> EX#1[Y=0@ITP,D=1]
 strip --> EX#1[X=180E@ITP,D=1]
 eval    EX#1     C:  7 dset:   1 I:     50     51  J:   41   42  K:    1    1  L:      2      3  M:    1    2  N:    1    1
 strip regrid on F: TEMP --> G5DAY            @ASN
 found   TEMP     M:  3 dset:   1 I:     50     51  J:   41   42  K:    1    1  L:      2      3  M:    1    2  N:    1    2
 regrid  TEMP     M: 10 dset:   1 I:     50     51  J:   41   42  K:    1    1  L:      2      3  M:    1    2  N:    1    1
 doing --> TEMP[X=180E@ITP,D=1]
 doing --> TEMP[Y=0@ITP,D=1]
 doing --> TEMP[T=1982@ITP,D=1]
setting up plot
PPL plot 4    complete
 
! F axis
set region/x=180/y=20s:20n/e=2/t=21-JAN-1982/z=5
plot temp
 dealloc  dynamic grid G5DAY           PSXT      PSYT5_89  PSZT1_2   TIME2     EAXIS     FAX20
 -DELETE TEMP     M:  7 dset:   1 I:   -999   -999  J: -999 -999  K:    1    1  L:   -999   -999  M:    1    2  N:    1    1
 -DELETE TEMP     M:  8 dset:   1 I:   -999   -999  J: -999 -999  K:    1    1  L:      2      3  M:    1    2  N:    1    1
 -DELETE TEMP     M:  9 dset:   1 I:   -999   -999  J:   41   42  K:    1    1  L:      2      3  M:    1    2  N:    1    1
 -DELETE TEMP     M: 10 dset:   1 I:     50     51  J:   41   42  K:    1    1  L:      2      3  M:    1    2  N:    1    1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GGR1            PSXT      PSYT5_89  PSZT1_2   TIME2     EAXIS     FAXIS
 strip --> EX#1[F=1982@ITP,D=1]
 strip --> EX#1[T=1982@ITP,D=1]
 strip --> EX#1[X=180E@ITP,D=1]
 eval    EX#1     C:  7 dset:   1 I:     50     51  J:    1   84  K:    1    1  L:      2      3  M:    2    2  N:    1    2
 reading TEMP     M: 10 dset:   1 I:     50     51  J:    1   84  K:    1    1  L:      2      3  M:    2    2  N:    1    2
 doing --> TEMP[X=180E@ITP,D=1]
 doing --> TEMP[T=1982@ITP,D=1]
 doing --> TEMP[F=1982@ITP,D=1]
setting up plot
PPL plot 5    complete
plot/over temp[g=g5day]
 dealloc  dynamic grid GGR1            PSXT      PSYT5_89  PSZT1_2   TIME2     EAXIS     FAXIS
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=1982@ITP,D=1]
 strip --> EX#1[X=180E@ITP,D=1]
 eval    EX#1     C:  6 dset:   1 I:     50     51  J:    1   84  K:    1    1  L:      2      3  M:    2    2  N:    1    1
 strip regrid on F: TEMP --> G5DAY            @LIN
 found   TEMP     M: 10 dset:   1 I:     50     51  J:    1   84  K:    1    1  L:      2      3  M:    2    2  N:    1    2
 regrid  TEMP     M: 11 dset:   1 I:     50     51  J:    1   84  K:    1    1  L:      2      3  M:    2    2  N:    1    1
 doing --> TEMP[X=180E@ITP,D=1]
 doing --> TEMP[T=1982@ITP,D=1]
setting up plot
PPL plot 6    complete
plot/over temp[g=g5day@ave]
 dealloc  dynamic grid G5DAY           PSXT      PSYT5_89  PSZT1_2   TIME2     EAXIS     FAX20
 -DELETE TEMP     M: 11 dset:   1 I:     50     51  J:    1   84  K:    1    1  L:      2      3  M:    2    2  N:    1    1
 -DELETE TEMP     M: 12 dset:   1 I:   -999   -999  J:    1   84  K:    1    1  L:      2      3  M:    2    2  N:    1    1
 -DELETE TEMP     M: 13 dset:   1 I:   -999   -999  J:    1   84  K:    1    1  L:   -999   -999  M:    2    2  N:    1    1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=1982@ITP,D=1]
 strip --> EX#1[X=180E@ITP,D=1]
 eval    EX#1     C:  6 dset:   1 I:     50     51  J:    1   84  K:    1    1  L:      2      3  M:    2    2  N:    1    1
 strip regrid on F: TEMP --> G5DAY            @AVE
 found   TEMP     M: 10 dset:   1 I:     50     51  J:    1   84  K:    1    1  L:      2      3  M:    2    2  N:    1    2
 regrid  TEMP     M: 13 dset:   1 I:     50     51  J:    1   84  K:    1    1  L:      2      3  M:    2    2  N:    1    1
 doing --> TEMP[X=180E@ITP,D=1]
 doing --> TEMP[T=1982@ITP,D=1]
setting up plot
PPL plot 7    complete
plot/over temp[g=g5day@asn]
 dealloc  dynamic grid G5DAY           PSXT      PSYT5_89  PSZT1_2   TIME2     EAXIS     FAX20
 -DELETE TEMP     M: 11 dset:   1 I:   -999   -999  J:    1   84  K:    1    1  L:   -999   -999  M:    2    2  N:    1    1
 -DELETE TEMP     M: 12 dset:   1 I:   -999   -999  J:    1   84  K:    1    1  L:      2      3  M:    2    2  N:    1    1
 -DELETE TEMP     M: 13 dset:   1 I:     50     51  J:    1   84  K:    1    1  L:      2      3  M:    2    2  N:    1    1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 strip --> EX#1[T=1982@ITP,D=1]
 strip --> EX#1[X=180E@ITP,D=1]
 eval    EX#1     C:  6 dset:   1 I:     50     51  J:    1   84  K:    1    1  L:      2      3  M:    2    2  N:    1    1
 strip regrid on F: TEMP --> G5DAY            @ASN
 found   TEMP     M: 10 dset:   1 I:     50     51  J:    1   84  K:    1    1  L:      2      3  M:    2    2  N:    1    2
 regrid  TEMP     M: 13 dset:   1 I:     50     51  J:    1   84  K:    1    1  L:      2      3  M:    2    2  N:    1    1
 doing --> TEMP[X=180E@ITP,D=1]
 doing --> TEMP[T=1982@ITP,D=1]
setting up plot
PPL plot 8    complete
 
set mode/last interp
cancel region
 
! test 2D regrid
define axis/e=1.1:2.1:1 eoffset
define axis/e=2.5/npoints=1 e1pt
define axis/e=1.5:2.5:1 e2pt
define axis/e=1.5:2.5:.5 e4pt
 
define axis/f=15-jan-1982:15-mar-1982:4/unit=day fax4day
define axis/f=21-jan-1982/npoints=1/unit=day f1pt
define axis/f=21-jan-1982:25-jan-1982/npoints=48/unit=hour f2pt
define axis/f=15-jan-1982:15-mar-1982:96/unit=hour fax4day
 
 
let a1 = _e[ge=e1pt]+_f[gf=f1pt]
let a2 = _e[ge=e2pt]+_f[gf=f2pt]
 
list a1[ge=eoffset@ave, gf=fax4day@ave]
 dealloc  dynamic grid G5DAY           PSXT      PSYT5_89  PSZT1_2   TIME2     EAXIS     FAX20
 -DELETE TEMP     M: 11 dset:   1 I:   -999   -999  J:    1   84  K:    1    1  L:   -999   -999  M:    2    2  N:    1    1
 -DELETE TEMP     M: 12 dset:   1 I:   -999   -999  J:    1   84  K:    1    1  L:      2      3  M:    2    2  N:    1    1
 -DELETE TEMP     M: 13 dset:   1 I:     50     51  J:    1   84  K:    1    1  L:      2      3  M:    2    2  N:    1    1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A1       C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    F1PT
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    F1PT
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E1PT      NORMAL
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E1PT      NORMAL
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E1PT      F1PT
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 strip regrid on E: A1 --> (G###)           @AVE
 strip regrid on F: A1 --> ENTERMED         @AVE
 eval    A1       C:  8 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E1PT      NORMAL
 pseudo  _E       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    1  N: -999 -999
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    F1PT
 pseudo  _F       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N:    1    1
 -DELETE _F       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N:    1    1
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    F1PT
 -DELETE _E       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    1  N: -999 -999
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E1PT      NORMAL
 regrid  A1       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    1  N:    1   16
 regrid  A1       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 -DELETE A1       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    1  N:    1   16
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
             VARIABLE : _E[GE=E1PT]+_F[GF=F1PT]
                        regrid: 1 delta on E@AVE, 96 hour on F@AVE
             SUBSET   : 2 by 16 points (E-FORECAST)
                         1.1     2.1   
                          1       2
 15-JAN-1982 00 /  1:    ....    ....
 19-JAN-1982 00 /  2:    ....  29594.
 23-JAN-1982 00 /  3:    ....  29594.
 27-JAN-1982 00 /  4:    ....    ....
 31-JAN-1982 00 /  5:    ....    ....
 04-FEB-1982 00 /  6:    ....    ....
 08-FEB-1982 00 /  7:    ....    ....
 12-FEB-1982 00 /  8:    ....    ....
 16-FEB-1982 00 /  9:    ....    ....
 20-FEB-1982 00 / 10:    ....    ....
 24-FEB-1982 00 / 11:    ....    ....
 28-FEB-1982 00 / 12:    ....    ....
 04-MAR-1982 00 / 13:    ....    ....
 08-MAR-1982 00 / 14:    ....    ....
 12-MAR-1982 00 / 15:    ....    ....
 16-MAR-1982 00 / 16:    ....    ....
list a1[ge=eoffset@sum, gf=fax4day@sum]
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 -DELETE A1       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 strip regrid on E: A1 --> (G###)           @SUM
 strip regrid on F: A1 --> ENTERMED         @SUM
 found   A1       M: 11 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    1  N:    1    1
 regrid  A1       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    1  N:    1   16
 regrid  A1       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 -DELETE A1       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    1  N:    1   16
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
             VARIABLE : _E[GE=E1PT]+_F[GF=F1PT]
                        regrid: 1 delta on E@SUM, 96 hour on F@SUM
             SUBSET   : 2 by 16 points (E-FORECAST)
                         1.1    2.1  
                         1      2
 15-JAN-1982 00 /  1:   ....   ....
 19-JAN-1982 00 /  2:   ....  8878.
 23-JAN-1982 00 /  3:   ....  8878.
 27-JAN-1982 00 /  4:   ....   ....
 31-JAN-1982 00 /  5:   ....   ....
 04-FEB-1982 00 /  6:   ....   ....
 08-FEB-1982 00 /  7:   ....   ....
 12-FEB-1982 00 /  8:   ....   ....
 16-FEB-1982 00 /  9:   ....   ....
 20-FEB-1982 00 / 10:   ....   ....
 24-FEB-1982 00 / 11:   ....   ....
 28-FEB-1982 00 / 12:   ....   ....
 04-MAR-1982 00 / 13:   ....   ....
 08-MAR-1982 00 / 14:   ....   ....
 12-MAR-1982 00 / 15:   ....   ....
 16-MAR-1982 00 / 16:   ....   ....
list a1[ge=eoffset@var, gf=fax4day@var]
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 -DELETE A1       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 strip regrid on E: A1 --> (G###)           @VAR
 strip regrid on F: A1 --> ENTERMED         @VAR
 found   A1       M: 11 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    1  N:    1    1
 regrid  A1       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    1  N:    1   16
 regrid  A1       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 -DELETE A1       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    1  N:    1   16
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
             VARIABLE : Variance of _E[GE=E1PT]+_F[GF=F1PT]
                        regrid: 1 delta on E@VAR, 96 hour on F@VAR
             SUBSET   : 2 by 16 points (E-FORECAST)
                       1.1 2.1 
                        1   2
 15-JAN-1982 00 /  1:........
 19-JAN-1982 00 /  2:........
 23-JAN-1982 00 /  3:........
 27-JAN-1982 00 /  4:........
 31-JAN-1982 00 /  5:........
 04-FEB-1982 00 /  6:........
 08-FEB-1982 00 /  7:........
 12-FEB-1982 00 /  8:........
 16-FEB-1982 00 /  9:........
 20-FEB-1982 00 / 10:........
 24-FEB-1982 00 / 11:........
 28-FEB-1982 00 / 12:........
 04-MAR-1982 00 / 13:........
 08-MAR-1982 00 / 14:........
 12-MAR-1982 00 / 15:........
 16-MAR-1982 00 / 16:........
 
list a2[ge=eoffset@ave, gf=fax4day@ave]
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 -DELETE A1       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A2       C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    F2PT
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    F2PT
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E2PT      NORMAL
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E2PT      NORMAL
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E2PT      F2PT
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 strip regrid on E: A2 --> (G###)           @AVE
 strip regrid on F: A2 --> ENTERMED         @AVE
 eval    A2       C:  8 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   48
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E2PT      NORMAL
 pseudo  _E       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    F2PT
 pseudo  _F       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N:    1   48
 -DELETE _F       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N:    1   48
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    F2PT
 -DELETE _E       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E2PT      NORMAL
 regrid  A2       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 regrid  A2       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 -DELETE A2       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
             VARIABLE : _E[GE=E2PT]+_F[GF=F2PT]
                        regrid: 1 delta on E@AVE, 96 hour on F@AVE
             SUBSET   : 2 by 16 points (E-FORECAST)
                          1.1      2.1   
                          1        2
 15-JAN-1982 00 /  1:     ....     ....
 19-JAN-1982 00 /  2:  710186.  710186.
 23-JAN-1982 00 /  3:  710234.  710234.
 27-JAN-1982 00 /  4:  710282.  710282.
 31-JAN-1982 00 /  5:     ....     ....
 04-FEB-1982 00 /  6:     ....     ....
 08-FEB-1982 00 /  7:     ....     ....
 12-FEB-1982 00 /  8:     ....     ....
 16-FEB-1982 00 /  9:     ....     ....
 20-FEB-1982 00 / 10:     ....     ....
 24-FEB-1982 00 / 11:     ....     ....
 28-FEB-1982 00 / 12:     ....     ....
 04-MAR-1982 00 / 13:     ....     ....
 08-MAR-1982 00 / 14:     ....     ....
 12-MAR-1982 00 / 15:     ....     ....
 16-MAR-1982 00 / 16:     ....     ....
list a2[ge=eoffset@sum, gf=fax4day@sum]
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 -DELETE A2       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 strip regrid on E: A2 --> (G###)           @SUM
 strip regrid on F: A2 --> ENTERMED         @SUM
 found   A2       M: 14 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   48
 regrid  A2       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 regrid  A2       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 -DELETE A2       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
             VARIABLE : _E[GE=E2PT]+_F[GF=F2PT]
                        regrid: 1 delta on E@SUM, 96 hour on F@SUM
             SUBSET   : 2 by 16 points (E-FORECAST)
                           1.1        2.1    
                           1          2
 15-JAN-1982 00 /  1:       ....       ....
 19-JAN-1982 00 /  2:  2.131E+05  3.551E+05
 23-JAN-1982 00 /  3:  2.003E+07  3.338E+07
 27-JAN-1982 00 /  4:  2.131E+05  3.551E+05
 31-JAN-1982 00 /  5:       ....       ....
 04-FEB-1982 00 /  6:       ....       ....
 08-FEB-1982 00 /  7:       ....       ....
 12-FEB-1982 00 /  8:       ....       ....
 16-FEB-1982 00 /  9:       ....       ....
 20-FEB-1982 00 / 10:       ....       ....
 24-FEB-1982 00 / 11:       ....       ....
 28-FEB-1982 00 / 12:       ....       ....
 04-MAR-1982 00 / 13:       ....       ....
 08-MAR-1982 00 / 14:       ....       ....
 12-MAR-1982 00 / 15:       ....       ....
 16-MAR-1982 00 / 16:       ....       ....
list a2[ge=eoffset@var, gf=fax4day@var]
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 -DELETE A2       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 strip regrid on E: A2 --> (G###)           @VAR
 strip regrid on F: A2 --> ENTERMED         @VAR
 found   A2       M: 14 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   48
 regrid  A2       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 regrid  A2       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 -DELETE A2       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
             VARIABLE : Variance of _E[GE=E2PT]+_F[GF=F2PT]
                        regrid: 1 delta on E@VAR, 96 hour on F@VAR
             SUBSET   : 2 by 16 points (E-FORECAST)
                         1.1     2.1   
                          1       2
 15-JAN-1982 00 /  1:    ....    ....
 19-JAN-1982 00 /  2:    ....    ....
 23-JAN-1982 00 /  3:    ....  0.0000
 27-JAN-1982 00 /  4:    ....    ....
 31-JAN-1982 00 /  5:    ....    ....
 04-FEB-1982 00 /  6:    ....    ....
 08-FEB-1982 00 /  7:    ....    ....
 12-FEB-1982 00 /  8:    ....    ....
 16-FEB-1982 00 /  9:    ....    ....
 20-FEB-1982 00 / 10:    ....    ....
 24-FEB-1982 00 / 11:    ....    ....
 28-FEB-1982 00 / 12:    ....    ....
 04-MAR-1982 00 / 13:    ....    ....
 08-MAR-1982 00 / 14:    ....    ....
 12-MAR-1982 00 / 15:    ....    ....
 16-MAR-1982 00 / 16:    ....    ....
 
! 1/00 additions to check details of @MIN,@MAX bevavior
 
let a1 = _e[ge=e1pt]
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   FAX4DAY
 -DELETE A2       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   16
 -DELETE A2       M: 14 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N:    1   48
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E2PT      F2PT
 -DELETE A1       M: 11 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    1  N:    1    1
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E1PT      F1PT
let a2 = _e[ge=e2pt]
let a4 = _e[ge=e4pt]
 
list a1[ge=eoffset@max]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A1       C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E1PT      NORMAL
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E1PT      NORMAL
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E1PT      NORMAL
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 strip regrid on E: A1 --> (G###)           @MAX
 eval    A1       C:  7 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    1  N: -999 -999
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E1PT      NORMAL
 pseudo  _E       M: 11 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    1  N: -999 -999
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E1PT      NORMAL
 regrid  A1       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
             VARIABLE : _E[GE=E1PT]
                        regrid: 1 delta on E@MAX
             SUBSET   : 2 points (E)
 1.1 / 1:   ....
 2.1 / 2:  2.500
list a2[ge=eoffset@max]
 -DELETE _E       M: 11 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    1  N: -999 -999
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 -DELETE A1       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A2       C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E2PT      NORMAL
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E2PT      NORMAL
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E2PT      NORMAL
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 strip regrid on E: A2 --> (G###)           @MAX
 eval    A2       C:  7 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E2PT      NORMAL
 pseudo  _E       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E2PT      NORMAL
 regrid  A2       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
             VARIABLE : _E[GE=E2PT]
                        regrid: 1 delta on E@MAX
             SUBSET   : 2 points (E)
 1.1 / 1:  1.500
 2.1 / 2:  2.500
list a4[ge=eoffset@max]
 -DELETE _E       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 -DELETE A2       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A4       C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E4PT      NORMAL
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E4PT      NORMAL
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E4PT      NORMAL
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 strip regrid on E: A4 --> (G###)           @MAX
 eval    A4       C:  7 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    3  N: -999 -999
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E4PT      NORMAL
 pseudo  _E       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    3  N: -999 -999
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    E4PT      NORMAL
 regrid  A4       M: 15 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
             VARIABLE : _E[GE=E4PT]
                        regrid: 1 delta on E@MAX
             SUBSET   : 2 points (E)
 1.1 / 1:  1.500
 2.1 / 2:  2.500
list a4[ge=eoffset@min]
 -DELETE _E       M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    3  N: -999 -999
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 -DELETE A4       M: 15 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 strip regrid on E: A4 --> (G###)           @MIN
 found   A4       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    3  N: -999 -999
 regrid  A4       M: 15 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
             VARIABLE : _E[GE=E4PT]
                        regrid: 1 delta on E@MIN
             SUBSET   : 2 points (E)
 1.1 / 1:  1.500
 2.1 / 2:  2.000
list a4[ge=eoffset@sum] ! 5+5.5+6+6.5=23
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 -DELETE A4       M: 15 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 strip regrid on E: A4 --> (G###)           @SUM
 found   A4       M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    3  N: -999 -999
 regrid  A4       M: 15 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
             VARIABLE : _E[GE=E4PT]
                        regrid: 1 delta on E@SUM
             SUBSET   : 2 points (E)
 1.1 / 1:  1.050
 2.1 / 2:  4.200
 
! time axes with different encodings
define axis/f=1-jan-1990:5-jan-1990:1/units=days eday
define axis/f=1-jan-1990:5-jan-1990:24/units=hours ehour
let afcst = _f[gf=eday]
list afcst
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    EOFFSET   NORMAL
 -DELETE A4       M: 15 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1    2  N: -999 -999
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid AFCST    C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    EDAY
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    EDAY
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    EDAY
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    EDAY
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N:    1    5
 eval    AFCST    C:  6 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N:    1    5
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    EDAY
 pseudo  _F       M: 15 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N:    1    5
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    EDAY
             VARIABLE : _F[GF=EDAY]
             SUBSET   : 5 points (FORECAST)
 01-JAN-1990 00 / 1:  32493.
 02-JAN-1990 00 / 2:  32494.
 03-JAN-1990 00 / 3:  32495.
 04-JAN-1990 00 / 4:  32496.
 05-JAN-1990 00 / 5:  32497.
show grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 normal    T
 normal    E
 EDAY      FORECAST             5 r   01-JAN-1990 00:00    05-JAN-1990 00:00   full
list afcst[gf=ehour@max]
 -DELETE _F       M: 15 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N:    1    5
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    EDAY
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    EHOUR
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    EHOUR
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    EHOUR
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N:    1    5
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    EHOUR
 strip regrid on F: AFCST --> (G###)           @MAX
 found   AFCST    M: 12 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N:    1    5
 regrid  AFCST    M: 15 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N:    1    5
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    NORMAL    NORMAL    EHOUR
             VARIABLE : _F[GF=EDAY]
                        regrid: 24 hour on F@MAX
             SUBSET   : 5 points (FORECAST)
 01-JAN-1990 00 / 1:  32493.
 02-JAN-1990 00 / 2:  32494.
 03-JAN-1990 00 / 3:  32495.
 04-JAN-1990 00 / 4:  32496.
 05-JAN-1990 00 / 5:  32497.
show grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 normal    T
 normal    E
 EHOUR     FORECAST             5 r   01-JAN-1990 00:00    05-JAN-1990 00:00   full
 
set mode/last diag
set mode/last calendar
*** Running ferret script: bn_aggregate_e.jnl
! bn_aggregate_e.jnl
! using the DEFINE DATA/AGGREGATE/E command
! Datasets share sst, but only ens1 has airt.
 
! v6.95+ 11/15 *sh* -- /T is now the default orientation
! v6.98 12/15 *sh -- modified so that the sequence number of each
!   dataset in the aggregation is not also its Ferret dataset number
!   Allowing them to be the same was hiding bugs
 
! V741 6/18 Global attributes of member files are promoted to variables
!           on the E axis. Note auto-generated grid names changedfrom
!           previous benchmark runs
 
set mode diag
 
use ens1, ens2, ens3, ens4
define data/agg/E fourfiles = ens1, ens3, ens2, ens4
 
! The grid of SST is known.
! global attributes are promoted to varibles on e-axis
 
show data fourfiles
     currently SET data sets:
    5> fourfiles  (default)  Ensemble aggregation
 name     title                             I         J         K         L         M         N
 SST      SST_IN                           1:10      1:9       ...       1:12      1:4       ...
 ------------------------------
 MEMBER_DSET
          Member dataset names in Ensembl  ...       ...       ...       ...       1:4       ...
 TITLE    Global Att *title* in Ensemble   ...       ...       ...       ...       1:4       ...
 HISTORY  Global Att *history* in Ensembl  ...       ...       ...       ...       1:4       ...
 CONVENTIONS
          Global Att *Conventions* in Ens  ...       ...       ...       ...       1:4       ...
 MODEL    Global Att *MODEL* in Ensemble   ...       ...       ...       ...       1:4       ...
 NUMBER   Global Att *NUMBER* in Ensemble  ...       ...       ...       ...       1:4       ...
 
 
list/i=3 sst[T=@ave]
 getgrid EX#1     C:  5 dset:   5 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          COADSX116_COADSY52_6NORMAL    TIME      ENSEMBLE  NORMAL
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   5 I:      3      3  J:    1    9  K: -999 -999  L:      1     12  M:    1    4  N: -999 -999
 strip --> SST[T=01-JAN00:45:31-DEC06:34@AVE,D=5]
 strip aggregate gathering SST on E axis:        1        4 dset:   5
 reading SST      M:  1 dset:   1 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 doing aggregate gathering SST on E axis:        1        1 dset:   1
 -DELETE SST      M:  1 dset:   1 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 reading SST      M:  1 dset:   3 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 doing aggregate gathering SST on E axis:        2        2 dset:   3
 -DELETE SST      M:  1 dset:   3 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 reading SST      M:  1 dset:   2 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 doing aggregate gathering SST on E axis:        3        3 dset:   2
 -DELETE SST      M:  1 dset:   2 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 reading SST      M:  1 dset:   4 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 doing aggregate gathering SST on E axis:        4        4 dset:   4
 -DELETE SST      M:  1 dset:   4 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 doing --> SST[T=01-JAN00:45:31-DEC06:34@AVE,D=5]
 final --> SST[T=01-JAN00:45:31-DEC06:34@AVE,D=5]
             VARIABLE : SST_IN (Deg C)
             DATA SET : Ensemble series of 4 datasets patterned on ens1
             FILENAME : fourfiles
             SUBSET   : 9 by 4 points (LATITUDE-E (realization))
             LONGITUDE: 105W
             TIME     : 01-JAN 00:45 to 31-DEC 06:34 (averaged)
            13N    15N    17N    19N    21N    23N    25N    27N    29N   
             1      2      3      4      5      6      7      8      9
 1   / 1:   28.5   28.4   27.9   27.5   26.7   25.6   ....   ....   ....
 2   / 2:   85.5   85.3   83.7   82.4   80.2   76.7   ....   ....   ....
 3   / 3:   57.0   56.9   55.8   54.9   53.5   51.1   ....   ....   ....
 4   / 4:  114.1  113.8  111.6  109.8  106.9  102.2   ....   ....   ....
 
show memory/all  ! show memory-resident variables before canceling dataset
    SET MEMORY/MAX: 500 Mb   (62.5 megawords)
    Peak demand: 4.32 Kb
    Current cache: 4.03 Kb
all data in memory:
 SST[D=fourfiles]                  YE    mr:1 size:0.58 Kb
         3/106W                1/12N              ... / ...             ... /01-JAN 00:45        1/0.5              ... / ...
         3/104W                9/30N              ... / ...             ... /31-DEC 06:34        4/4.5              ... / ...
                                                              AVE
 SST[D=fourfiles]                  YTE   mr:2 size:3.46 Kb
         3/106W                1/12N              ... / ...                1/01-JAN 00:45        1/0.5              ... / ...
         3/104W                9/30N              ... / ...               12/31-DEC 06:34        4/4.5              ... / ...
 
cancel data fourfiles
 dealloc  dynamic grid (G###)          COADSX116_COADSY52_6NORMAL    TIME      ENSEMBLE  NORMAL
 canceling dset fourfiles
 -DELETE SST      M:  1 dset:   5 I:      3      3  J:    1    9  K: -999 -999  L:   -999   -999  M:    1    4  N: -999 -999
 -DELETE SST      M:  2 dset:   5 I:      3      3  J:    1    9  K: -999 -999  L:      1     12  M:    1    4  N: -999 -999
show memory/all  ! show memory-resident variables after  canceling dataset
    SET MEMORY/MAX: 500 Mb   (62.5 megawords)
    Peak demand: 4.32 Kb
    Current cache: 0 Kb
all data in memory:
 
! 12/15 now do again adding COADS to de-align toe dset #s from the sequence #s
cancel data/all
 canceling dset ./data/ens1.nc
 canceling dset ./data/ens2.nc
 canceling dset ./data/ens3.nc
 canceling dset ./data/ens4.nc
use coads_climatology
use ens1, ens2, ens3, ens4
define data/agg/E/hide fourfiles = ens1, ens3, ens2, ens4
! confirm that it isn't COADS that got hidden
show data
     currently SET data sets:
    1> ./data/coads_climatology.cdf
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:3
 
    6> fourfiles  (default)  Ensemble aggregation
 name     title                             I         J         K         L         M         N
 SST      SST_IN                           1:10      1:9       ...       1:12      1:4       ...
 ------------------------------
 MEMBER_DSET
          Member dataset names in Ensembl  ...       ...       ...       ...       1:4       ...
 TITLE    Global Att *title* in Ensemble   ...       ...       ...       ...       1:4       ...
 HISTORY  Global Att *history* in Ensembl  ...       ...       ...       ...       1:4       ...
 CONVENTIONS
          Global Att *Conventions* in Ens  ...       ...       ...       ...       1:4       ...
 MODEL    Global Att *MODEL* in Ensemble   ...       ...       ...       ...       1:4       ...
 NUMBER   Global Att *NUMBER* in Ensemble  ...       ...       ...       ...       1:4       ...
 
cancel data fourfiles
 canceling dset ./data/ens1.nc
 canceling dset ./data/ens3.nc
 canceling dset ./data/ens2.nc
 canceling dset ./data/ens4.nc
 canceling dset fourfiles
show data/brief/all/hidden
     currently SET data sets:
    1> ./data/coads_climatology.cdf  (default)
 
! Create airt in the other datasets by LET/D definitions.
use ens1, ens2, ens3, ens4
let/d=ens2 airt = sst + 1
let/d=ens3 airt = sst + 1
let/d=ens4 airt = sst + 1
 
ENSEMBLE fourfiles = ens1, ens3, ens2, ens4
 getgrid AIRT     C:  5 dset:   4 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GOH1            COADSX116_COADSY52_6NORMAL    TIME1
 getgrid AIRT     C:  5 dset:   3 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GOH1            COADSX116_COADSY52_6NORMAL    TIME1
 getgrid AIRT     C:  5 dset:   5 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GOH1            COADSX116_COADSY52_6NORMAL    TIME1
show data fourfiles
     currently SET data sets:
    6> fourfiles  (default)  Ensemble aggregation
 name     title                             I         J         K         L         M         N
 SST      SST_IN                           1:10      1:9       ...       1:12      1:4       ...
 AIRT     AIR TEMPERATURE                  1:10      1:9       ...       1:12      1:4       ...
 ------------------------------
 MEMBER_DSET
          Member dataset names in Ensembl  ...       ...       ...       ...       1:4       ...
 TITLE    Global Att *title* in Ensemble   ...       ...       ...       ...       1:4       ...
 HISTORY  Global Att *history* in Ensembl  ...       ...       ...       ...       1:4       ...
 CONVENTIONS
          Global Att *Conventions* in Ens  ...       ...       ...       ...       1:4       ...
 MODEL    Global Att *MODEL* in Ensemble   ...       ...       ...       ...       1:4       ...
 NUMBER   Global Att *NUMBER* in Ensemble  ...       ...       ...       ...       1:4       ...
 
 
list/i=3 airt[T=@ave]
 getgrid EX#1     C:  5 dset:   6 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          COADSX116_COADSY52_6NORMAL    TIME1     ENSEMBLE  NORMAL
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   6 I:      3      3  J:    1    9  K: -999 -999  L:      1     12  M:    1    4  N: -999 -999
 strip --> AIRT[T=01-JAN00:45:31-DEC06:34@AVE,D=6]
 strip aggregate gathering AIRT on E axis:        1        4 dset:   6
 reading AIRT     M:  2 dset:   2 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 doing aggregate gathering AIRT on E axis:        1        1 dset:   2
 -DELETE AIRT     M:  2 dset:   2 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 eval    AIRT     C:  9 dset:   4 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 reading SST      M:  2 dset:   4 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 constan cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 doing aggregate gathering AIRT on E axis:        2        2 dset:   4
 -DELETE AIRT     M:  4 dset:   4 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 eval    AIRT     C:  9 dset:   3 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 reading SST      M:  4 dset:   3 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 constan cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 doing aggregate gathering AIRT on E axis:        3        3 dset:   3
 -DELETE AIRT     M:  5 dset:   3 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 eval    AIRT     C:  9 dset:   5 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 reading SST      M:  5 dset:   5 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 constan cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 doing aggregate gathering AIRT on E axis:        4        4 dset:   5
 -DELETE AIRT     M:  6 dset:   5 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 doing --> AIRT[T=01-JAN00:45:31-DEC06:34@AVE,D=6]
 final --> AIRT[T=01-JAN00:45:31-DEC06:34@AVE,D=6]
             VARIABLE : AIR TEMPERATURE (DEG C)
             DATA SET : Ensemble series of 4 datasets patterned on ens1
             FILENAME : fourfiles
             SUBSET   : 9 by 4 points (LATITUDE-E (realization))
             LONGITUDE: 105W
             TIME     : 01-JAN 00:45 to 31-DEC 06:34 (averaged)
            13N    15N    17N    19N    21N    23N    25N    27N    29N   
             1      2      3      4      5      6      7      8      9
 1   / 1:   27.7   27.6   27.1   26.7   25.8   25.2   ....   ....   ....
 2   / 2:   86.5   86.3   84.7   83.4   81.2   77.7   ....   ....   ....
 3   / 3:   58.0   57.9   56.8   55.9   54.5   52.1   ....   ....   ....
 4   / 4:  115.1  114.8  112.6  110.8  107.9  103.2   ....   ....   ....
 
! create an ensemble where one member is missing
ENSEMBLE fourfiles_gap = ens1, -, ens3, ens4
 getgrid AIRT     C:  5 dset:   4 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GOH1            COADSX116_COADSY52_6NORMAL    TIME1
 getgrid AIRT     C:  5 dset:   5 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GOH1            COADSX116_COADSY52_6NORMAL    TIME1
show data/files fourfiles_gap
     currently SET data sets:
    7> fourfiles_gap  (default)  Ensemble aggregation
 name     title                             I         J         K         L         M         N
 SST      SST_IN                           1:10      1:9       ...       1:12      1:4       ...
 AIRT     AIR TEMPERATURE                  1:10      1:9       ...       1:12      1:4       ...
 ------------------------------
 MEMBER_DSET
          Member dataset names in Ensembl  ...       ...       ...       ...       1:4       ...
 TITLE    Global Att *title* in Ensemble   ...       ...       ...       ...       1:4       ...
 HISTORY  Global Att *history* in Ensembl  ...       ...       ...       ...       1:4       ...
 CONVENTIONS
          Global Att *Conventions* in Ens  ...       ...       ...       ...       1:4       ...
 MODEL    Global Att *MODEL* in Ensemble   ...       ...       ...       ...       1:4       ...
 NUMBER   Global Att *NUMBER* in Ensemble  ...       ...       ...       ...       1:4       ...
 
          Member datasets:
      7.1: ./data/ens1.nc
      7.2: (dummy)
      7.3: ./data/ens3.nc
      7.4: ./data/ens4.nc
list/i=3 airt[T=@ave]
 getgrid EX#1     C:  5 dset:   7 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          COADSX116_COADSY52_6NORMAL    TIME1     ENSEMBLE  NORMAL
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   7 I:      3      3  J:    1    9  K: -999 -999  L:      1     12  M:    1    4  N: -999 -999
 strip --> AIRT[T=01-JAN00:45:31-DEC06:34@AVE,D=7]
 strip aggregate gathering AIRT on E axis:        1        4 dset:   7
 reading AIRT     M:  3 dset:   2 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 doing aggregate gathering AIRT on E axis:        1        1 dset:   2
 -DELETE AIRT     M:  3 dset:   2 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 dummy AIRT     M:  3 dset:5001 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 doing aggregate gathering AIRT on E axis:        2        2 dset:5001
 -DELETE AIRT     M:  3 dset:5001 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 eval    AIRT     C:  9 dset:   4 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 found   SST      M:  2 dset:   4 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 constan cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 doing aggregate gathering AIRT on E axis:        3        3 dset:   4
 -DELETE AIRT     M:  8 dset:   4 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 eval    AIRT     C:  9 dset:   5 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 found   SST      M:  5 dset:   5 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 constan cnst     M:  8 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE cnst     M:  8 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 doing aggregate gathering AIRT on E axis:        4        4 dset:   5
 -DELETE AIRT     M:  3 dset:   5 I:      3      3  J:    1    9  K: -999 -999  L:      1     12
 doing --> AIRT[T=01-JAN00:45:31-DEC06:34@AVE,D=7]
 final --> AIRT[T=01-JAN00:45:31-DEC06:34@AVE,D=7]
             VARIABLE : AIR TEMPERATURE (DEG C)
             DATA SET : Ensemble series of 4 datasets patterned on ens1
             FILENAME : fourfiles_gap
             SUBSET   : 9 by 4 points (LATITUDE-E (realization))
             LONGITUDE: 105W
             TIME     : 01-JAN 00:45 to 31-DEC 06:34 (averaged)
            13N    15N    17N    19N    21N    23N    25N    27N    29N   
             1      2      3      4      5      6      7      8      9
 1   / 1:   27.7   27.6   27.1   26.7   25.8   25.2   ....   ....   ....
 2   / 2:   ....   ....   ....   ....   ....   ....   ....   ....   ....
 3   / 3:   86.5   86.3   84.7   83.4   81.2   77.7   ....   ....   ....
 4   / 4:  115.1  114.8  112.6  110.8  107.9  103.2   ....   ....   ....
 
cancel mode diag
cancel data/all
cancel var/all
 
! Subsets of coads_climatology and monthly_navy_winds.
! Define an ensemble after making LET/D definitions so that
! variables have the same name and grid.
use coads_uw
use navy_uw
 
! Define the ensemble dataset
 
! intentional errors:
set mode ignore
 
! Use dataset thats not open.
ensemble windy = 1,2,3
 
! No variables on comparable grids.
ensemble windy = 1,2
 
set mode/last ignore
 
! Rename the varibles in dataset 2, then define UWND and VWND as
! variables on the grid of dset 1.
set dat 2
set var/name=uin uwnd
set var/name=vin vwnd
 
! Define uwnd and vwnd in dataset 2 to have the grid of
! those variables in dataset 1
 
let/d=2/units="`uin,return=units`"/title="`uin,return=title`" \
 uwnd = uin[d=2,gxy=uwnd[d=1],gt=uwnd[d=1]@mod]
 !-> DEFINE VARIABLE/DATA=2/units="M/S"/title="ZONAL WIND"  uwnd = uin[d=2,gxy=uwnd[d=1],gt=uwnd[d=1]@mod]
let/d=2/units="`vin,return=units`"/title="`vin,return=title`" \
 vwnd = vin[d=2,gxy=vwnd[d=1],gt=vwnd[d=1]@mod]
 !-> DEFINE VARIABLE/DATA=2/units="M/S"/title="MERIDIONAL WIND"  vwnd = vin[d=2,gxy=vwnd[d=1],gt=vwnd[d=1]@mod]
 
show data
     currently SET data sets:
    1> ./data/coads_uw.nc
 name     title                             I         J         K         L
 UWND     ZONAL WIND                       1:30      1:30      ...       1:12
 VWND     MERIDIONAL WIND                  1:30      1:30      ...       1:12
 SPEH     SPECIFIC HUMIDITY                1:30      1:30      ...       1:12
 
    2> ./data/navy_uw.nc  (default)
 name     title                             I         J         K         L
 UIN      ZONAL WIND                       1:30      1:30      ...       1:30
 VIN      MERIDIONAL WIND                  1:30      1:30      ...       1:30
 ------------------------------
 VWND[D=navy_uw] = VIN[D=2,GXY=VWND[D=1],GT=VWND[D=1]@MOD]
 UWND[D=navy_uw] = UIN[D=2,GXY=UWND[D=1],GT=UWND[D=1]@MOD]
 
 
! Define the ensemble dataset
ensemble windy = 1,2
 
! The grid of the aggregate variables with LET/D is known.
show data windy
     currently SET data sets:
    3> windy  (default)  Ensemble aggregation
 name     title                             I         J         K         L         M         N
 UWND     ZONAL WIND                       1:30      1:30      ...       1:12      1:2       ...
 VWND     MERIDIONAL WIND                  1:30      1:30      ...       1:12      1:2       ...
 ------------------------------
 MEMBER_DSET
          Member dataset names in Ensembl  ...       ...       ...       ...       1:2       ...
 HISTORY  Global Att *history* in Ensembl  ...       ...       ...       ...       1:2       ...
 CONVENTIONS
          Global Att *Conventions* in Ens  ...       ...       ...       ...       1:2       ...
 
 
! Use variable from the new dataset
list/l=3/y=30/x=-59:-51 uwnd[d=1], uwnd[d=2], uwnd[d=3,e=1], uwnd[d=3,e=2], uwnd[d=3,e=@ave]
             LONGITUDE: 59W(-59) to 51W(-51)
             LATITUDE: 29N
             TIME: 17-MAR 02:58
 Column  1: UWND[D=coads_uw] is ZONAL WIND (M/S)
 Column  2: UWND[D=navy_uw] is ZONAL WIND (M/S)
 Column  3: UWND[D=windy,E=1 (coads_uw)] is ZONAL WIND (M/S)
 Column  4: UWND[D=windy,E=2 (navy_uw)] is ZONAL WIND (M/S)
 Column  5: UWND[D=windy,E=1:2@AVE] is ZONAL WIND (M/S)
               UWND    UWND   UWND    UWND    UWND
59W    / -30:  1.643  0.2317  1.643  0.2317  0.9371
57W    / -29:  1.404  0.1102  1.404  0.1102  0.7573
55W    / -28:  1.353 -0.0184  1.353 -0.0184  0.6674
53W    / -27:  1.210 -0.1624  1.210 -0.1624  0.5237
51W    / -26:  1.086 -0.3088  1.086 -0.3088  0.3887
 
! Use the other order. As long as we have a file variable, we're ok
show data/brief    ! see what is *not* hidden
     currently SET data sets:
    1> ./data/coads_uw.nc
    2> ./data/navy_uw.nc
    3> windy  (default)  Ensemble aggregation
 
 
cancel data 3
show data/brief    ! see what is *not* hidden
     currently SET data sets:
    1> ./data/coads_uw.nc
    2> ./data/navy_uw.nc
 
! Define the ensemble dataset
ensemble windy = 2,1
 
! The grid of the aggregate variables with LET/D is known.
show data windy
     currently SET data sets:
    3> windy  (default)  Ensemble aggregation
 name     title                             I         J         K         L         M         N
 VWND     MERIDIONAL WIND                  1:30      1:30      ...       1:12      1:2       ...
 UWND     ZONAL WIND                       1:30      1:30      ...       1:12      1:2       ...
 ------------------------------
 MEMBER_DSET
          Member dataset names in Ensembl  ...       ...       ...       ...       1:2       ...
 HISTORY  Global Att *history* in Ensembl  ...       ...       ...       ...       1:2       ...
 CONVENTIONS
          Global Att *Conventions* in Ens  ...       ...       ...       ...       1:2       ...
 
 
! Use variable from the new dataset
list/l=3/y=30/x=-59:-51 uwnd[d=1], uwnd[d=2], uwnd[d=3,e=1], uwnd[d=3,e=2], uwnd[d=3,e=@ave]
             LONGITUDE: 59W(-59) to 51W(-51)
             LATITUDE: 29N
             TIME: 17-MAR 02:58
 Column  1: UWND[D=coads_uw] is ZONAL WIND (M/S)
 Column  2: UWND[D=navy_uw] is ZONAL WIND (M/S)
 Column  3: UWND[D=windy,E=1 (navy_uw)] is ZONAL WIND (M/S)
 Column  4: UWND[D=windy,E=2 (coads_uw)] is ZONAL WIND (M/S)
 Column  5: UWND[D=windy,E=1:2@AVE] is ZONAL WIND (M/S)
               UWND    UWND    UWND   UWND    UWND
59W    / -30:  1.643  0.2317  0.2317  1.643  0.9371
57W    / -29:  1.404  0.1102  0.1102  1.404  0.7573
55W    / -28:  1.353 -0.0184 -0.0184  1.353  0.6674
53W    / -27:  1.210 -0.1624 -0.1624  1.210  0.5237
51W    / -26:  1.086 -0.3088 -0.3088  1.086  0.3887
 
cancel data/all
cancel variable/all
 
! DEFINE DATA/HIDE
! SHOW DATA/HIDDEN
! Alias ENSEMBLE for DEFINE DATA/AGG/E
 
! If define the ensemble with /HIDE then SHOW DAT will skip the
! member datasets and show only the ensemble.
! show dat/hidden forces showing all
 
show command define
 DEFINE
 DEFINE REGION/I/J/K/L/M/N/X/Y/Z/T/E/F/DEFAULT/DX/DY/DZ/DT/DE/DF/DI/DJ/DK
         /DL/DM/DN
 DEFINE GRID/X/Y/Z/T/E/F/FILE/LIKE
 DEFINE VARIABLE/TITLE/UNITS/QUIET/DATASET/BAD/REMOTE/LIKE
 DEFINE AXIS/X/Y/Z/T/E/F/FILE/UNITS/T0/NAME/FROMDATA/DEPTH/MODULO/NPOINTS
         /EDGES/CALENDAR/BOUNDS/QUIET/MONTHLY/LIKE
 DEFINE VIEWPORT/TEXT/XLIMITS/YLIMITS/SIZE/ORIGIN/CLIP/AXES
 DEFINE ALIAS
 DEFINE SYMBOL
 DEFINE ATTRIBUT/DATASET/TYPE/OUTPUT/QUIET
 DEFINE PYFUNC/NAME
 DEFINE DATA/AGGREGAT/T/E/F/TITLE/QUIET/HIDE/U/TAXIS/FAXIS/TOVERLAP
 DEFINE ANNOTATI/USER/NORM/NOUSER/XPOS/YPOS/HALIGN/VALIGN/ANGLE/SIZE/NLAB
show command show
 SHOW/ALL
 SHOW WINDOW/ALL
 SHOW REGION/ALL
 SHOW AXIS/ALL/I/J/K/L/M/N/X/Y/Z/T/E/F/XML/OUTFILE/APPEND/CLOBBER
 SHOW EXPRSION/ALL
 SHOW LIST/ALL
 SHOW DATA/ALL/BRIEF/FULL/VARIABLE/FILES/XML/ATTR/OUTFILE/APPEND/CLOBBER
       /HIDDEN/MEMBERS
 SHOW MODE/ALL
 SHOW MOVIE/ALL
 SHOW VARIABLE/ALL/DATASET/USER/XML/OUTFILE/APPEND/CLOBBER/TREE/LAYERZ/CURVILIN
 SHOW COMMANDS/ALL/BRIEF
 SHOW MEMORY/ALL/DIAGNOST/TEMPORY/PERMANT/FREE
 SHOW GRID/ALL/I/J/K/L/M/N/X/Y/Z/T/E/F/DYNAMIC/XML/OUTFILE/APPEND/CLOBBER
 SHOW VIEWPORT/ALL
 SHOW TRANFORM/ALL
 SHOW ALIAS/ALL
 SHOW SYMBOL/ALL
 SHOW ATTRIBUT/ALL/DATASET/OUTPUT
 SHOW NCCACHE
 SHOW GIFFILE
 SHOW FUNCTION/ALL/BRIEF/EXTERNAL/INTERNAL/DETAILS
 SHOW QUERIES/ALL
 
use coads_climatology ! to offset indices so they arent equal to Ferret dset #s
 
use ens1, ens2, ens3, ens4
ensemble/HIDE/title="ensemble with hidden members" fourfiles = ens1, ens2, ens3, ens4
 
! should just show the ensemble set.  Members are hidden.
show data/brief
     currently SET data sets:
    1> ./data/coads_climatology.cdf
    6> fourfiles  (default)  Ensemble aggregation
 
! If ask for a member set by name or number, do show it
show data/brief 2
     currently SET data sets:
    2> ./data/ens1.nc
show data/brief ens3
     currently SET data sets:
    4> ./data/ens3.nc
 
! should show all members plus ensemble
show data/brief/hidden
     currently SET data sets:
    1> ./data/coads_climatology.cdf
    2> ./data/ens1.nc
    3> ./data/ens2.nc
    4> ./data/ens3.nc
    5> ./data/ens4.nc
    6> fourfiles  (default)  Ensemble aggregation
 
! Since the members were hidden, they get deleted with the aggregation
cancel data fourfiles
show data/brief
     currently SET data sets:
    1> ./data/coads_climatology.cdf  (default)
cancel data/all
 
! Cancel a member, then the ensemble gets canceled.
! The hidden members get canceled along with the parent (1/16)
use coads_climatology ! to offset indices so they arent equal to Ferret dset #s
use ens1, ens2, ens3, ens4
ensemble/HIDE/title="uvars in dset 2"  my_ens = 2,3
show data/brief
     currently SET data sets:
    1> ./data/coads_climatology.cdf
    4> ./data/ens3.nc
    5> ./data/ens4.nc
    6> my_ens  (default)  Ensemble aggregation
cancel data  ens2
show data/brief
     currently SET data sets:
    1> ./data/coads_climatology.cdf
    4> ./data/ens3.nc
    5> ./data/ens4.nc
 
! Cancel the ensemble, then hidden members get canceled too
 
use ens1, ens2, ens3, ens4
ensemble/HIDE/title="uvars in dset 2"  my_ens = 2,3,4,5
 
! members hidden, showing only ensemble.
show data/brief
     currently SET data sets:
    1> ./data/coads_climatology.cdf
    6> my_ens  (default)  Ensemble aggregation
cancel data my_ens
 
! Cancel ensemble dataset: hidden members deleted
show data/brief
     currently SET data sets:
    1> ./data/coads_climatology.cdf  (default)
 
! Define several ensembles with /HIDE
ensemble/HIDE/title="ensemble with hidden members" fourfiles = ens1, ens2, ens3, ens4
ensemble/HIDE/title="ensemble with hidden members" some = ens1, ens2
ensemble/HIDE/title="ensemble with hidden members" more = ens2, ens3, ens4
 
! Shows all the ensembles
show data/brief/files
     currently SET data sets:
    1> ./data/coads_climatology.cdf
    6> fourfiles     Ensemble aggregation
./data/ens4.nc
./data/ens4.nc
./data/ens4.nc
./data/ens4.nc
    7> some     Ensemble aggregation
./data/ens4.nc
./data/ens4.nc
    8> more  (default)  Ensemble aggregation
./data/ens4.nc
./data/ens4.nc
./data/ens4.nc
 
! Cancel a member of all the ensembles.  All the ensembles get deleted.
cancel data ens2
show data/brief
     currently SET data sets:
    1> ./data/coads_climatology.cdf  (default)
 
*** Running ferret script: bn_6d_lab_mode.jnl
! bn_6d_lab_mode.jnl
!
! Tests of CANCEL MODE 6d_lab, writes SHOW and STAT output in classic 4D form.
!
use gt4d011
 
! Mode affects output of SHOW
 
set mode 6d_lab  ! this is the default setting
show data
     currently SET data sets:
    1> ./data/gt4d011.cdf  (default)
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                     91:108    35:56      1:10      1:25
 SALT     (SALINITY(ppt) - 35) /1000      91:108    35:55      1:10      1:25
 U        ZONAL VELOCITY                  91:108    35:55      1:10      1:25
 V        MERIDIONAL VELOCITY             91:108    35:55      1:10      1:25
 W        VERTICAL VELOCITY               91:108    36:55      1:10      1:25
 TAUX     ZONAL WIND STRESS               91:108    35:55      ...       1:25
 TAUY     MERIDIONAL WIND STRESS          91:108    35:55      ...       1:25
 PSI      STREAM FUNCTION                 91:108    35:56      ...       1:25
 
cancel mode 6d_lab
show data
     currently SET data sets:
    1> ./data/gt4d011.cdf  (default)
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                     91:108    35:56      1:10      1:25
 SALT     (SALINITY(ppt) - 35) /1000      91:108    35:55      1:10      1:25
 U        ZONAL VELOCITY                  91:108    35:55      1:10      1:25
 V        MERIDIONAL VELOCITY             91:108    35:55      1:10      1:25
 W        VERTICAL VELOCITY               91:108    36:55      1:10      1:25
 TAUX     ZONAL WIND STRESS               91:108    35:55      ...       1:25
 TAUY     MERIDIONAL WIND STRESS          91:108    35:55      ...       1:25
 PSI      STREAM FUNCTION                 91:108    35:56      ...       1:25
 
 
! Mode affects output of SHOW GRID
 
set mode 6d_lab
show grid temp
    GRID PS3DT2
 name       axis              # pts   start                end                 subset
 PSXT      LONGITUDE          160mr   130.5E               70.5W               full
 PSYT      LATITUDE           100 i   28.836S              48.568N             full
 PSZT      DEPTH (m)           27 i-  5                    3824                full
 TIME1     TIME                25 r   17-AUG-1982 12:00    10-JAN-1983 12:00   full
cancel mode 6d_lab
show grid temp
    GRID PS3DT2
 name       axis              # pts   start                end                 subset
 PSXT      LONGITUDE          160mr   130.5E               70.5W               full
 PSYT      LATITUDE           100 i   28.836S              48.568N             full
 PSZT      DEPTH (m)           27 i-  5                    3824                full
 TIME1     TIME                25 r   17-AUG-1982 12:00    10-JAN-1983 12:00   full
 
! Mode affects output of STAT
 
set mode 6d_lab
stat temp
 
             TEMPERATURE
             LONGITUDE: 140W to 122W
             LATITUDE: 3.667S to 3.667N
             DEPTH (m): 0 to 100
             TIME: 14-AUG-1982 11:00 to 13-JAN-1983 13:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/gt4d011.cdf
 
 Total # of data points: 99000 (18*22*10*25*1*1)
 # flagged as bad  data: 0
 Minimum value: 21.597
 Maximum value: 33.497
 Mean    value: 27.704 (unweighted average)
 Standard deviation: 2.4542
cancel mode 6d_lab
stat temp
 
             TEMPERATURE
             LONGITUDE: 140W to 122W
             LATITUDE: 3.667S to 3.667N
             DEPTH (m): 0 to 100
             TIME: 14-AUG-1982 11:00 to 13-JAN-1983 13:00
             DATA SET: ./data/gt4d011.cdf
 
 Total # of data points: 99000 (18*22*10*25)
 # flagged as bad  data: 0
 Minimum value: 21.597
 Maximum value: 33.497
 Mean    value: 27.704 (unweighted average)
 Standard deviation: 2.4542
 
! Mode affects diagnostic output
 
set mode diag
set mode 6d_lab
list/L=1:8 taux[x=@ave,y=@ave]
 dealloc  dynamic grid PS3DT2          PSXT      PSYT      PSZT      TIME1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS2DU2          PSXU      PSYU      NORMAL    TIME1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1    160  J:    1  100  K: -999 -999  L:      1      8
 strip --> TAUX[Y=28.836S:51.432N@AV4,D=1]
 reading TAUX     M:  2 dset:   1 I:     91    108  J:   35   55  K: -999 -999  L:      1      8
 doing --> TAUX[Y=3.5S:3.5N@AV4,D=1]
 final --> TAUX[Y=3.5S:3.5N@AV4,D=1]
             VARIABLE : ZONAL WIND STRESS (dynes/cm**2)
             FILENAME : gt4d011.cdf
             SUBSET   : 8 points (TIME)
             LONGITUDE: 139.5W to 121.5W (XY ave)
             LATITUDE : 3.5S to 3.5N (XY ave)
 17-AUG-1982 12 / 1: -0.2742
 23-AUG-1982 14 / 2: -0.2363
 29-AUG-1982 16 / 3: -0.1984
 04-SEP-1982 18 / 4: -0.1605
 10-SEP-1982 20 / 5: -0.1227
 16-SEP-1982 22 / 6: -0.1041
 23-SEP-1982 00 / 7: -0.1047
 29-SEP-1982 02 / 8: -0.1054
cancel mode 6d_lab
list/L=1:8 taux[x=@sum,y=@sum]
 dealloc  dynamic grid PS2DU2          PSXU      PSYU      NORMAL    TIME1
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid PS2DU2          PSXU      PSYU      NORMAL    TIME1
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1    160  J:    1  100  K: -999 -999  L:      1      8
 strip --> TAUX[Y=28.836S:51.432N@SM4,D=1]
 found   TAUX     M:  2 dset:   1 I:     91    108  J:   35   55  K: -999 -999  L:      1      8
 doing --> TAUX[Y=3.5S:3.5N@SM4,D=1]
             VARIABLE : ZONAL WIND STRESS (dynes/cm**2)
             FILENAME : gt4d011.cdf
             SUBSET   : 8 points (TIME)
             LONGITUDE: 139.5W to 121.5W (XY summed)
             LATITUDE : 3.5S to 3.5N (XY summed)
 17-AUG-1982 12 / 1: -103.6
 23-AUG-1982 14 / 2:  -89.3
 29-AUG-1982 16 / 3:  -75.0
 04-SEP-1982 18 / 4:  -60.7
 10-SEP-1982 20 / 5:  -46.4
 16-SEP-1982 22 / 6:  -39.3
 23-SEP-1982 00 / 7:  -39.6
 29-SEP-1982 02 / 8:  -39.8
can mode diag
 
! restore default setting
set mode 6d_lab
*** Running ferret script: bn682_bug_fixes.jnl
! bn682_bug_fixes.jnl
! test various fixes that went into version 6.82
! 8/2012 ACM
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err681_dims_direction
! err681_dims_direction.jnl
! ticket 1955: Code still existed that determined axis direction
! according to axis name.  Here, coordinate variables are defined,
! but their dimensions are not coordinate variables, so there isn't
! direct info in the file about the directions of the dimensions.
! netcdf dims {
! dimensions:
!        ETA = 4 ;
!        TAU1 = 7 ;
!        ZT_OCEAN = 1 ;
! variables:
!  ...
!        float LON_C(TAU, ETA) ;
!                LON_C:long_name = "uv longitude" ;
!                LON_C:units = "degrees_E" ;
!                LON_C:history = "From data_1302" ;
!
! Where tau is intended to be a Y axis and ETA is an X axis.
! 4D Ferret puts these in an X and a T direction, and inital versions
! of 6D Ferret had them in the E and T directions.  They should just
! get assigned by position, here with TAU in the Y direction an ETA in x.
 
use dims_not_coord
sh dat
     currently SET data sets:
    1> ./data/dims_not_coord.nc  (default)
 name     title                             I         J         K         L
 U        zonal current                    1:4       1:7       1:1       ...
 LON_C    uv longitude                     1:4       1:7       ...       ...
 LAT_C    uv latitude                      1:4       1:7       ...       ...
 
sho grid lon_c
    GRID GOS2
 name       axis              # pts   start                end                 subset
 ETA       X                    4 r   1                    4                   full
 TAU1      Y                    7 r   1                    7                   full
 normal    Z
 normal    T
 
*** Running ferret script: bn683_bug_fixes.jnl
! bn683_bug_fixes.jnl
! test various fixes that went into version 6.83
! 8/2012 ACM
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err682_shrink_axlab
! err682_shrink_axlab.jnl
! See ticket 1958. Scripts may want the axis labels to
! run out of the viewport or off the page. So shrink labels
! only if MODE SHRINK_YLAB has been set.
! See also err672_runoff_page.jnl and err672_vert_axislabel.jnl
!
! Default setting, mode shrink_ylab is cancelled.
 
! The lower plot has its vertical axis labels intact and visible.
! The upper one will have them shrink away to nothing.
 
set view lr
go magnify
plot/vs {-1,1},{-1,1}
 
set mode shrink_ylab
 
set view ur
go magnify
plot/vs {-1,1},{-1,1}
 
set mode/last shrink_ylab
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err682_xact_high_prec
! err682_xact_high_prec.jnl
! based on an example from the Users List,
! http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2012/msg00477.html
 
! shows that the @XACT regridding in double-precision Ferret is broken.
 
! 3/17 *sh* - broke after change to RESHAPE in GCF_IMPOSE_AXES
!           - fixed it by cleaning up the definition of var_regrid
 
Let time = {\
 22585.3295833333,\
 22585.3302777778,\
 22585.3309722222,\
 22585.3316666667,\
 22585.3323611111,\
 22585.3330555556,\
 22585.33375,\
 22585.3344444444,\
 22585.3351388889,\
 22585.3358333333}
 
Define Axis /T /From /T0=1-JAN-1950 /Units=days my_axis = time
 
Let fake_var = T[GT=my_axis]
! this was the definition prior to 3/17
!Let var = RANDU( fake_var )
!Let var_regrid = RESHAPE( var, fake_var )
Let var_regrid = RANDU( fake_var )   ! new definition
 
 
List /T="2-nov-2011 07:54":"2-nov-2011 08:04" var_regrid
             VARIABLE : RANDU( FAKE_VAR )
             SUBSET   : 10 points (TIME)
 02-NOV-2011 07:54:36 /  1:  0.6251
 02-NOV-2011 07:55:36 /  2:  0.2209
 02-NOV-2011 07:56:36 /  3:  0.6074
 02-NOV-2011 07:57:36 /  4:  0.3226
 02-NOV-2011 07:58:36 /  5:  0.1075
 02-NOV-2011 07:59:36 /  6:  0.2257
 02-NOV-2011 08:00:36 /  7:  0.0811
 02-NOV-2011 08:01:36 /  8:  0.8980
 02-NOV-2011 08:02:36 /  9:  0.7163
 02-NOV-2011 08:03:36 / 10:  0.6649
 
! Note that if we define the axis as below, the regridding is
! successful. But the @XACT regridding in v6.82 was requiring too
! much matching precision.
 
!    DEFINE AXIS/t="02-nov-2011:07:54:36":"02-nov-2011:08:03:36":60/units=seconds/T0=1-JAN-1950 my_axis
!    let time = t[gt=my_axis]
!    Let var = TSEQUENCE( RANDU( time ) )
!    Let fake_var = T[GT=my_axis]
!    Let var_regrid = RESHAPE( var, fake_var )
 
! New time axis
Define Axis /T="01-NOV-2011 00:00":"30-NOV-2011 23:00":1 /Units=seconds /T0=1-JAN-1950 t_axis_seconds
 
Let var_sec = var_regrid[ GT=t_axis_seconds@XACT ]
 
! Here we got no good data, should be one at 7:54:36.
 
List /T="2-nov-2011 07:54:30":"2-nov-2011 07:54:50" var_sec
             VARIABLE : VAR_REGRID[ GT=T_AXIS_SECONDS@XACT ]
             SUBSET   : 21 points (TIME)
 02-NOV-2011 07:54:30 / 114871:    ....
 02-NOV-2011 07:54:31 / 114872:    ....
 02-NOV-2011 07:54:32 / 114873:    ....
 02-NOV-2011 07:54:33 / 114874:    ....
 02-NOV-2011 07:54:34 / 114875:    ....
 02-NOV-2011 07:54:35 / 114876:    ....
 02-NOV-2011 07:54:36 / 114877:  0.6251
 02-NOV-2011 07:54:37 / 114878:    ....
 02-NOV-2011 07:54:38 / 114879:    ....
 02-NOV-2011 07:54:39 / 114880:    ....
 02-NOV-2011 07:54:40 / 114881:    ....
 02-NOV-2011 07:54:41 / 114882:    ....
 02-NOV-2011 07:54:42 / 114883:    ....
 02-NOV-2011 07:54:43 / 114884:    ....
 02-NOV-2011 07:54:44 / 114885:    ....
 02-NOV-2011 07:54:45 / 114886:    ....
 02-NOV-2011 07:54:46 / 114887:    ....
 02-NOV-2011 07:54:47 / 114888:    ....
 02-NOV-2011 07:54:48 / 114889:    ....
 02-NOV-2011 07:54:49 / 114890:    ....
 02-NOV-2011 07:54:50 / 114891:    ....
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err682_if_yes_exit
! err682_if_yes_exit.jnl
! Ticket 1965
!
! As reported by Hein Zelle
! http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2012/msg00487.html
! This should exit the script on failure of the first test.
! Instead it continues on and only exits with the /script qualifier or as part
! of a block
 
let test = 1
if `test` then exit
 !-> if 1 then exit
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err682_use_no_quotes
! err682_use_no_quotes.jnl
! See ticket 1974 - on 64-bit machines, this statement causes a crash.
! It should just generate an error message, as the file spec. should have
! quotes around it.
 
SET MODE ignore
use ./z1.nc
 
CANCEL MODE ignore
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err682_axis_no_clue
! err682_axis_no_clue.jnl
! See ticket 1975. The axis sax is intended to be
! used as a Y axis. The axes of the variable are
! TEMP(zax, sax, xax). The grid should be XYZ but
! Ferret v6.82 created a grid thats XZT instead.
 
use xsz.nc
sh dat
     currently SET data sets:
    1> ./data/xsz.nc  (default)
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                      1:5       1:7       1:3       ...
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err682_grid_merge
! err682_grid_merge.jnl
! Bug 1972. When merging contexts, the calendar time-axis
! info gets lost, causing an error with the time axis.
 
use truemonth.nc
let a = 2
let b = a * var
list a*var[t=1-jan-1960:1-jan-1961]
             VARIABLE : A*VAR[T=1-JAN-1960:1-JAN-1961]
             FILENAME : truemonth.nc
             SUBSET   : 12 points (TIME)
 16-JAN-1960 12 / 121:  1.632
 15-FEB-1960 12 / 122:  1.901
 16-MAR-1960 12 / 123:  2.000
 16-APR-1960 00 / 124:  1.917
 16-MAY-1960 12 / 125:  1.658
 16-JUN-1960 00 / 126:  1.246
 16-JUL-1960 12 / 127:  0.718
 16-AUG-1960 12 / 128:  0.114
 16-SEP-1960 00 / 129: -0.490
 16-OCT-1960 12 / 130: -1.050
 16-NOV-1960 00 / 131: -1.513
 16-DEC-1960 12 / 132: -1.836
 
! The bug had this statement failing with a time-region error
list b[T=1-JAN-1960:1-JAN-1961]
             VARIABLE : A * VAR
             FILENAME : truemonth.nc
             SUBSET   : 12 points (TIME)
 16-JAN-1960 12 / 121:  1.632
 15-FEB-1960 12 / 122:  1.901
 16-MAR-1960 12 / 123:  2.000
 16-APR-1960 00 / 124:  1.917
 16-MAY-1960 12 / 125:  1.658
 16-JUN-1960 00 / 126:  1.246
 16-JUL-1960 12 / 127:  0.718
 16-AUG-1960 12 / 128:  0.114
 16-SEP-1960 00 / 129: -0.490
 16-OCT-1960 12 / 130: -1.050
 16-NOV-1960 00 / 131: -1.513
 16-DEC-1960 12 / 132: -1.836
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err682_scale_no_offset
! err682_scale_no_offset.jnl
! See ticket 1980 and the report on the Ferret list at
! http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2012/msg00585.html
! Dataset with a scale_factor attributue on variables but no add_offset att.
 
 
use err682_scale_no_offset.nc
say `sst_rms[x=@ngd,y=@ngd]` SHOULD BE 91
 !-> MESSAGE/CONTINUE 91 SHOULD BE 91
91 SHOULD BE 91
 
can dat 1
use err682_scale_no_offset.nc
say `sst_cor[x=@ngd,y=@ngd]` SHOULD BE 91
 !-> MESSAGE/CONTINUE 91 SHOULD BE 91
91 SHOULD BE 91
use tripolar_subset
can dat 2
 
say `sst_rms[x=@ngd,y=@ngd]` SHOULD BE 91
 !-> MESSAGE/CONTINUE 91 SHOULD BE 91
91 SHOULD BE 91
load sst_rms
 
say `sst_rms[x=@ngd,y=@ngd]`  SHOULD BE 91
 !-> MESSAGE/CONTINUE 91  SHOULD BE 91
91  SHOULD BE 91
load sst_rms
say `sst_rms[x=@nbd,y=@nbd]`  SHOULD BE 30
 !-> MESSAGE/CONTINUE 30  SHOULD BE 30
30  SHOULD BE 30
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err682_append_packed
! err682_append_packed.jnl
! See ticket 2004. Write packed variable with scale attributes
! Append more values, data was not correctly scaled.
 
use append_pack.nc
list temp  ! values should be  28.69, 28.63
             VARIABLE : Potential temperature (degrees C)
             FILENAME : append_pack.nc
             SUBSET   : 2 points (TIME)
             LONGITUDE: 179.95E
             LATITUDE : 0.05S
             DEPTH (m): 2.5
                      179.95E
                        1
 01-JAN-1994 12 / 1:  28.69
 02-JAN-1994 12 / 2:  28.63
 
cancel mode upcase_output
set att/output=all temp
save/clobber/file=a.nc/outtype=short/L=1 temp
save/append/file=a.nc/outtype=short/L=2 temp
 
can data/all
use a.nc
 
list temp  ! values should match those above.
             VARIABLE : Potential temperature (degrees C)
             FILENAME : a.nc
             SUBSET   : 2 points (TIME)
             LONGITUDE: 179.95E
             LATITUDE : 0.05S
             DEPTH (m): 2.5
                      179.95E
                        1
 01-JAN-1994 12 / 1:  28.69
 02-JAN-1994 12 / 2:  28.63
 
set mode/last upcase_output
*** Running ferret script: bn_outtype.jnl
! bn_outtype
! Tests of output-type control:
!  SET VAR/OUTTYPE
!  SET LIST/OUTTYPE
!  save/x=300/y=0:5/OUTTYPE
 
! SET LIST/OUTTYPE takes precedence over the variable type from
! an input dataset or the SET VAR/OUTTYPE
! save/x=300/y=0:5/OUTTYPE takes precedence over both
 
! SET VAR/OUTTYPE
can dat/all
use coads_climatology
 
let sst2 = 2*sst
set var/outtype=double sst2
 
! For saving as INT and smaller, the default missing value
! can't be the default Ferret value
let/bad=-999 sst3 = missing(sst, -999)
set var/outtype=int sst3
 
! sst is saved in its native type, float
! sst2 and sst3 have SET VAR/OUTTYPE types
 
save/x=300/y=0:5/clobber/file=mytype.nc sst, sst2, sst3
use mytype.nc; sh dat/att mytype.nc; can data mytype
     currently SET data sets:
    2> ./mytype.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(COADSX140_140)        DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        13   F       COADSX140_140
  
(COADSY46_48)          DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 orig_file_axname
                                                 CHAR        11   F       COADSY46_48
  
(TIME)                 DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          CHAR        1    T
                                 axis            CHAR        1    T       T
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 SST                   FLOAT     missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        23   T       SEA SURFACE TEMPERATURE
                                 history         CHAR        22   T       From coads_climatology
                                 units           CHAR        5    T       Deg C
  
 SST2                  DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 long_name       CHAR        5    T       2*SST
                                 history         CHAR        22   T       From coads_climatology
  
 SST3                  INT       missing_value   INT         1    T       -999
                                 _FillValue      INT         1    T       -999
                                 long_name       CHAR        18   T       MISSING(SST, -999)
                                 history         CHAR        22   T       From coads_climatology
  
 
! SET LIST/OUTTYPE overrides native type and SET VAR/OUTTYPE
can var/all
 
let sst2 = 2*sst
let/bad=-999 sst3 = missing(sst, -999)
set var/outtype=int sst3
 
set list/outtype=double
save/x=300/y=0:5/clobber/file=mytype.nc sst, sst2
use mytype.nc; sh dat/att mytype.nc; can data mytype
     currently SET data sets:
    2> ./mytype.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(COADSX140_140)        DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        13   F       COADSX140_140
  
(COADSY46_48)          DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 orig_file_axname
                                                 CHAR        11   F       COADSY46_48
  
(TIME)                 DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          CHAR        1    T
                                 axis            CHAR        1    T       T
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 SST                   DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 long_name       CHAR        23   T       SEA SURFACE TEMPERATURE
                                 history         CHAR        22   T       From coads_climatology
                                 units           CHAR        5    T       Deg C
                                 Ferret_Precision_Note
                                                 CHAR        69   F       This variable written using Ferret was converted from FLOAT to DOUBLE
  
 SST2                  DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 long_name       CHAR        5    T       2*SST
                                 history         CHAR        22   T       From coads_climatology
  
 
set list/outtype=float
save/x=300/y=0:5/clobber/file=mytype.nc sst, sst2
use mytype.nc; sh dat/att mytype.nc; can data mytype
     currently SET data sets:
    2> ./mytype.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(COADSX140_140)        DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        13   F       COADSX140_140
  
(COADSY46_48)          DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 orig_file_axname
                                                 CHAR        11   F       COADSY46_48
  
(TIME)                 DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          CHAR        1    T
                                 axis            CHAR        1    T       T
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 SST                   FLOAT     missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        23   T       SEA SURFACE TEMPERATURE
                                 history         CHAR        22   T       From coads_climatology
                                 units           CHAR        5    T       Deg C
                                 Ferret_Precision_Note
                                                 CHAR        69   F       This variable written using Ferret was converted from FLOAT to DOUBLE
  
 SST2                  FLOAT     missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        5    T       2*SST
                                 history         CHAR        22   T       From coads_climatology
  
 
set list/outtype=int
save/x=300/y=0:5/clobber/file=mytype.nc sst3
use mytype.nc; sh dat/att mytype.nc; can data mytype
     currently SET data sets:
    2> ./mytype.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(COADSX140_140)        DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        13   F       COADSX140_140
  
(COADSY46_48)          DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 orig_file_axname
                                                 CHAR        11   F       COADSY46_48
  
(TIME)                 DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          CHAR        1    T
                                 axis            CHAR        1    T       T
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 SST3                  INT       missing_value   INT         1    T       -999
                                 _FillValue      INT         1    T       -999
                                 long_name       CHAR        18   T       MISSING(SST, -999)
                                 history         CHAR        22   T       From coads_climatology
  
 
set list/outtype=short
save/x=300/y=0:5/clobber/file=mytype.nc sst3
use mytype.nc; sh dat/att mytype.nc; can data mytype
     currently SET data sets:
    2> ./mytype.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(COADSX140_140)        DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        13   F       COADSX140_140
  
(COADSY46_48)          DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 orig_file_axname
                                                 CHAR        11   F       COADSY46_48
  
(TIME)                 DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          CHAR        1    T
                                 axis            CHAR        1    T       T
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 SST3                  SHORT     missing_value   SHORT       1    T       -999
                                 _FillValue      SHORT       1    T       -999
                                 long_name       CHAR        18   T       MISSING(SST, -999)
                                 history         CHAR        22   T       From coads_climatology
  
 
set list/outtype=byte
let/bad=-99 sst4 = missing(sst, -99)
save/x=300/y=0:5/clobber/file=mytype.nc sst4
use mytype.nc; sh dat/att mytype.nc; can data mytype
     currently SET data sets:
    2> ./mytype.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(COADSX140_140)        DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        13   F       COADSX140_140
  
(COADSY46_48)          DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 orig_file_axname
                                                 CHAR        11   F       COADSY46_48
  
(TIME)                 DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          CHAR        1    T
                                 axis            CHAR        1    T       T
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 SST4                  BYTE      missing_value   BYTE        1    T       -99
                                 _FillValue      BYTE        1    T       -99
                                 long_name       CHAR        17   T       MISSING(SST, -99)
                                 history         CHAR        22   T       From coads_climatology
  
 
! shows the outtype
show list
        SET LIST/PRECISION =   4
        SET LIST/FORMAT = [Default]
        SET LIST/HEADING is ENABLED
        SET LIST/APPEND is DISABLED
        SET LIST/FILE=AUTO [created by program] ( when LIST/FILE is used )
        SET LIST/OUTTYPE = Byte
           ----
        NetCDF-4 settings:
        NetCDF file type = classic
        NetCDF chunk sizes = default
        SHUFFLE set to on
        ENDIAN set to native
 
! CANCEL LIST/OUTTYPE
cancel list/outtype
show list
        SET LIST/PRECISION =   4
        SET LIST/FORMAT = [Default]
        SET LIST/HEADING is ENABLED
        SET LIST/APPEND is DISABLED
        SET LIST/FILE=AUTO [created by program] ( when LIST/FILE is used )
        SET LIST/OUTTYPE = [Default]
           ----
        NetCDF-4 settings:
        NetCDF file type = classic
        NetCDF chunk sizes = default
        SHUFFLE set to on
        ENDIAN set to native
 
save/x=300/y=0:5/clobber/file=mytype.nc sst, sst2, sst3
use mytype.nc; sh dat/att mytype.nc; can data mytype
     currently SET data sets:
    2> ./mytype.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(COADSX140_140)        DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        13   F       COADSX140_140
  
(COADSY46_48)          DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 orig_file_axname
                                                 CHAR        11   F       COADSY46_48
  
(TIME)                 DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          CHAR        1    T
                                 axis            CHAR        1    T       T
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 SST                   FLOAT     missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        23   T       SEA SURFACE TEMPERATURE
                                 history         CHAR        22   T       From coads_climatology
                                 units           CHAR        5    T       Deg C
                                 Ferret_Precision_Note
                                                 CHAR        69   F       This variable written using Ferret was converted from FLOAT to DOUBLE
  
 SST2                  DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 long_name       CHAR        5    T       2*SST
                                 history         CHAR        22   T       From coads_climatology
  
 SST3                  INT       missing_value   INT         1    T       -999
                                 _FillValue      INT         1    T       -999
                                 long_name       CHAR        18   T       MISSING(SST, -999)
                                 history         CHAR        22   T       From coads_climatology
  
 
set list/outtype=int
save/x=300/y=0:5/clobber/file=mytype.nc sst3
use mytype.nc; sh dat/att mytype.nc; can data mytype
     currently SET data sets:
    2> ./mytype.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(COADSX140_140)        DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        13   F       COADSX140_140
  
(COADSY46_48)          DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 orig_file_axname
                                                 CHAR        11   F       COADSY46_48
  
(TIME)                 DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          CHAR        1    T
                                 axis            CHAR        1    T       T
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 SST3                  INT       missing_value   INT         1    T       -999
                                 _FillValue      INT         1    T       -999
                                 long_name       CHAR        18   T       MISSING(SST, -999)
                                 history         CHAR        22   T       From coads_climatology
  
cancel list/all
show list
        SET LIST/PRECISION =   4
        SET LIST/FORMAT = [Default]
        SET LIST/HEADING is ENABLED
        SET LIST/APPEND is DISABLED
        SET LIST/FILE=AUTO [created by program] ( when LIST/FILE is used )
        SET LIST/OUTTYPE = [Default]
           ----
        NetCDF-4 settings:
        NetCDF file type = classic
        NetCDF chunk sizes = default
        SHUFFLE set to on
        ENDIAN set to native
 
! SAVE/OUTTYPE overrides all other settings
can var/all
let sst2 = 2*sst3
 
let/bad=-999 sst3 = missing(sst, -999)
set var/outtype=int sst3
 
let/bad=-99 sst4 = missing(sst, -99)
set var/outtype=short sst4
 
 
save/x=300/y=0:5/clobber/file=mytype.nc/outtype=double sst2, sst3
use mytype.nc; sh dat/att mytype.nc; can data mytype
     currently SET data sets:
    2> ./mytype.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(COADSX140_140)        DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        13   F       COADSX140_140
  
(COADSY46_48)          DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 orig_file_axname
                                                 CHAR        11   F       COADSY46_48
  
(TIME)                 DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          CHAR        1    T
                                 axis            CHAR        1    T       T
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 SST2                  DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 long_name       CHAR        6    T       2*SST3
                                 history         CHAR        22   T       From coads_climatology
  
 SST3                  DOUBLE    missing_value   DOUBLE      1    T       -999
                                 _FillValue      DOUBLE      1    T       -999
                                 long_name       CHAR        18   T       MISSING(SST, -999)
                                 history         CHAR        22   T       From coads_climatology
  
 
save/x=300/y=0:5/clobber/file=mytype.nc/outtype=float sst2, sst3
use mytype.nc; sh dat/att mytype.nc; can data mytype
     currently SET data sets:
    2> ./mytype.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(COADSX140_140)        DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        13   F       COADSX140_140
  
(COADSY46_48)          DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 orig_file_axname
                                                 CHAR        11   F       COADSY46_48
  
(TIME)                 DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          CHAR        1    T
                                 axis            CHAR        1    T       T
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 SST2                  FLOAT     missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        6    T       2*SST3
                                 history         CHAR        22   T       From coads_climatology
  
 SST3                  FLOAT     missing_value   FLOAT       1    T       -999
                                 _FillValue      FLOAT       1    T       -999
                                 long_name       CHAR        18   T       MISSING(SST, -999)
                                 history         CHAR        22   T       From coads_climatology
  
 
save/x=300/y=0:5/clobber/file=mytype.nc/outtype=int sst4, sst3
use mytype.nc; sh dat/att mytype.nc; can data mytype
     currently SET data sets:
    2> ./mytype.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(COADSX140_140)        DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        13   F       COADSX140_140
  
(COADSY46_48)          DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 orig_file_axname
                                                 CHAR        11   F       COADSY46_48
  
(TIME)                 DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          CHAR        1    T
                                 axis            CHAR        1    T       T
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 SST4                  INT       missing_value   INT         1    T       -99
                                 _FillValue      INT         1    T       -99
                                 long_name       CHAR        17   T       MISSING(SST, -99)
                                 history         CHAR        22   T       From coads_climatology
  
 SST3                  INT       missing_value   INT         1    T       -999
                                 _FillValue      INT         1    T       -999
                                 long_name       CHAR        18   T       MISSING(SST, -999)
                                 history         CHAR        22   T       From coads_climatology
  
 
save/x=300/y=0:5/clobber/file=mytype.nc/outtype=byte sst4
use mytype.nc; sh dat/att mytype.nc; can data mytype
     currently SET data sets:
    2> ./mytype.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(COADSX140_140)        DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        13   F       COADSX140_140
  
(COADSY46_48)          DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 orig_file_axname
                                                 CHAR        11   F       COADSY46_48
  
(TIME)                 DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          CHAR        1    T
                                 axis            CHAR        1    T       T
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 SST4                  BYTE      missing_value   BYTE        1    T       -99
                                 _FillValue      BYTE        1    T       -99
                                 long_name       CHAR        17   T       MISSING(SST, -99)
                                 history         CHAR        22   T       From coads_climatology
  
 
! Type will be int
set list/outtype=float
save/x=300/y=0:5/clobber/file=mytype.nc/outtype=int sst4, sst3
use mytype.nc; sh dat/att mytype.nc; can data mytype
     currently SET data sets:
    2> ./mytype.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(COADSX140_140)        DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        13   F       COADSX140_140
  
(COADSY46_48)          DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 orig_file_axname
                                                 CHAR        11   F       COADSY46_48
  
(TIME)                 DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          CHAR        1    T
                                 axis            CHAR        1    T       T
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 SST4                  INT       missing_value   INT         1    T       -99
                                 _FillValue      INT         1    T       -99
                                 long_name       CHAR        17   T       MISSING(SST, -99)
                                 history         CHAR        22   T       From coads_climatology
  
 SST3                  INT       missing_value   INT         1    T       -999
                                 _FillValue      INT         1    T       -999
                                 long_name       CHAR        18   T       MISSING(SST, -999)
                                 history         CHAR        22   T       From coads_climatology
  
 
! Go back to default setting.
can list/outtype
*** Running ferret script: bn_ribbon_plot.jnl
! bn_ribbon_plot.jnl
! Test color-line-by variable style of plots
 
show alias ribbon
   Alias       Command
   -----       -------
   RIBBON      PLOT/RIBBON
 
! ribbon plot is 3-variable RIBBON/VS plot
! RIBBON/VS/LEV= xpts, ypts, var
! or 2-variable line plot in any direction.
! RIBBON/LEV= var1, var2
 
! File variables
use TAO_SST_clim
set view ul; RIBBON/thick/i=3/lev=10 sst_clim[j=6], sst_clim[j=5]
set view ur; RIBBON/j=3/lev=10/thick sst_clim[l=6], sst_clim[L=9]
set view ll; RIBBON/thick/L=3/lev=10 sst_clim[j=4], sst_clim[j=6]
use gt4d011.cdf
set view lr; RIBBON/l=15/j=40/lev=v/thick/pal=rnb2 temp[i=96], temp[i=103]
can data/all
 
! xpts, ypts all present, compare when var has missing.
 
can view
let/title="Xpts"/units=degrees_east xpts = {\
151.0,153.0,155.0,157.0,159.0,161.0,163.0,165.0,167.0,169.0,171.0,173.0,175.0,\
177.0,179.0,181.0,183.0,185.0,187.0,189.0}
 
let/title="SST"/units="Deg C" ypts {\
29.42,29.43,29.33,29.19,29.22,29.12,29.36,29.22,29.04,28.92,29.00,28.59,28.31,\
28.69,28.20,28.86,27.98,27.80,28.29,27.94}
 
let/title="VAR"/Units="V" var =  {\
14.16,14.31,13.34,11.90,12.19,11.20,13.57,12.25,10.37, 9.22,10.05, 5.91, \
3.13, 6.88, 2.02, 8.63,-0.23,-1.97, 2.94,-0.65}
 
set view ul
RIBBON/vs/line/thick/vlim=26:30 xpts,ypts,var
 
! Gaps in one of the vs variables
set view ur
RIBBON/vs/line/thick/vlim=26:30 xpts,ypts,var
 
let/title="SST"/units="Deg C" ypts2 {\
29.42,29.43,29.33,29.19,29.22,29.12,29.36,29.22,29.04,28.92,29.00,28.59,28.31,\
28.69,28.20,28.86,27.98,27.80,28.29,27.94} - 0.3
 
let/title="VAR"/Units="V" var2 =  {\
14.16,14.31,13.34,,,,13.57,12.25,10.37, 9.22,10.05, 5.91, \
3.13, 6.88, 2.02, 8.63,,-1.97, 2.94,-0.65}
 
! /FAST does not interpolate colors from one point to the next
list xpts, ypts2, var2
             X: 0.5 to 20.5
 Column  1: XPTS is Xpts (degrees_east)
 Column  2: YPTS2 is SST (Deg C)
 Column  3: VAR2 is VAR (V)
            XPTS   YPTS2  VAR2
1    /  1:  151.0  29.12  14.16
2    /  2:  153.0  29.13  14.31
3    /  3:  155.0  29.03  13.34
4    /  4:  157.0  28.89   ....
5    /  5:  159.0  28.92   ....
6    /  6:  161.0  28.82   ....
7    /  7:  163.0  29.06  13.57
8    /  8:  165.0  28.92  12.25
9    /  9:  167.0  28.74  10.37
10   / 10:  169.0  28.62   9.22
11   / 11:  171.0  28.70  10.05
12   / 12:  173.0  28.29   5.91
13   / 13:  175.0  28.01   3.13
14   / 14:  177.0  28.39   6.88
15   / 15:  179.0  27.90   2.02
16   / 16:  181.0  28.56   8.63
17   / 17:  183.0  27.68   ....
18   / 18:  185.0  27.50  -1.97
19   / 19:  187.0  27.99   2.94
20   / 20:  189.0  27.64  -0.65
RIBBON/vs/line/nokey/over/thick=3/fast xpts,ypts2,var2
 
let yp3 = if var2 then ypts2 - 0.3
PLOT/over/nolab/vs/line/color=black/sym=20 xpts, yp3
 
 
! Testing other palettes
 
let/title="Xpts"/units=degrees_east xpts = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,\
15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35}
 
let/title="Ypts"/units=degrees_north  ypts = { 9.04, 8.67, 8.96, 9.29, 9.18, 9.42,\
 9.43, 9.33, 9.19, 9.22, 9.12, 9.36, 9.22, 9.04, 8.92, 9.00, 8.59,\
 8.31, 8.69, 8.20, 8.86, 7.98, 7.80, 8.29, 7.94, 8.05, 7.85, 7.55,\
 7.56, 6.82, 7.04, 6.66, 6.56, 7.36, 6.52}
 
let/title="SST"/Units="Deg C" var =  {\
 1.5,  1.5,  1.5,  1.5,  1.5,\
 2.5,  2.5,  2.5,  2.5,  2.5,\
 3.5,  3.5,  3.5,  3.5,  3.5,\
 4.5,  4.5,  4.5,  4.5,  4.5,\
 5.5,  5.5,  5.5,  5.5,  5.5,\
 6.5,  6.5,  6.5,  6.5,  6.5,\
 7.5,  7.5,  7.5,  7.5,  7.5}
set view ll
RIBBON/vs/line/lev=(1,9,1)/pal=ten_by_levels xpts,ypts,var
 
 
let/title="Xpts"/units=degrees_east xpts = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,\
15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35}
 
let/title="Ypts"/units=degrees_north  ypts = { 9.04, 8.67, 8.96, 9.29, 9.18, 9.42,\
 9.43, 9.33, 9.19, 9.22, 9.12, 9.36, 9.22, 9.04, 8.92, 9.00, 8.59,\
 8.31, 8.69, 8.20, 8.86, 7.98, 7.80, 8.29, 7.94, 8.05, 7.85, 7.55,\
 7.56, 6.82, 7.04, 6.66, 6.56, 7.36, 6.52}
 
let/title="SST"/Units="Deg C" var =  {\
 1.5,  1.5,  1.5,  1.5,  1.5,\
 2.5,  2.5,  2.5,  2.5,  2.5,\
 3.5,  3.5,  3.5,  3.5,  3.5,\
 4.5,  4.5,  4.5,  4.5,  4.5,\
 5.5,  5.5,  5.5,  5.5,  5.5,\
 6.5,  6.5,  6.5,  6.5,  6.5,\
 7.5,  7.5,  7.5,  7.5,  7.5}
 
set view lr
RIBBON/vs/line/thick/lev=(1,8,1)/pal=ten_by_levels xpts,ypts,var
 
PLOT/vs/over/sym=20 xpts,ypts
 
 
can view
 
! Do an overlay on a map.
! To use RIBBON/SET, finish with PPL RIBBON/OVER
 
use coads_climatology
let mask = if sst then 0 else 1
shade/NOLAB/L=1/x=-50:100/y=-60:50/pal=grayscale mask
 
RIBBON/vs/over/nolab/thick=3/sym=20/key/set xpts, ypts, var
ppl shakey,1,0
ppl ribbon/over
*** Running ferret script: bn_descr_4digit.jnl
 ! bn_descr_4digit.jnl
 ! See ticket 1969: step files have 3- or 4-digit extensions
 ! coads_clim.999, coads_clim.1000, coads_clim.1001
 
use coads_clim_4digit.des
sh dat
     currently SET data sets:
    1> ./data/coads_clim_4digit.des  (default)
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:4       1:4       ...       1:6
 
list/x=180/y=0 sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             DATA SET : COAD
             FILENAME : coads_clim_4digit.des
             SUBSET   : 6 points (TIME)
             LONGITUDE: 179E
             LATITUDE : 1S
                   179E   
                     2
 16-JAN-1900 / 1:  28.20
 15-FEB-1900 / 2:  28.36
 18-MAR-1900 / 3:  28.35
 17-APR-1900 / 4:  28.22
 17-MAY-1900 / 5:  28.49
 17-JUN-1900 / 6:  28.32
*** Running ferret script: bn_axis_outtype.jnl
! bn_axis_outtype.jnl
!  SET AXIS/OUTTYPE
! 23-Oct-2012
 
can dat/all
use coads_climatology
 
set axis/outtype=float `sst,return=xaxis`
 !-> set axis/outtype=float COADSX
set axis/outtype=float `sst,return=yaxis`
 !-> set axis/outtype=float COADSY
set axis/outtype=float `sst,return=taxis`
 !-> set axis/outtype=float TIME
 
save/x=300/y=0:5/clobber/file=mytype.nc sst
use mytype.nc; sh dat/att mytype.nc; can data mytype
     currently SET data sets:
    2> ./mytype.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(COADSX140_140)        FLOAT     units           CHAR        12   T       degrees_east
                                 point_spacing   CHAR        4    T       even
                                 modulo          FLOAT       1    T       360
                                 axis            CHAR        1    T       X
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        13   F       COADSX140_140
  
(COADSY46_48)          FLOAT     units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 orig_file_axname
                                                 CHAR        11   F       COADSY46_48
  
(TIME1)                FLOAT     units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          FLOAT       1    T       8765.82
                                 axis            CHAR        1    T       T
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 SST                   FLOAT     missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        23   T       SEA SURFACE TEMPERATURE
                                 history         CHAR        22   T       From coads_climatology
                                 units           CHAR        5    T       Deg C
  
 
! SAVE/OUTTYPE sets the type of the variable not the axes
save/x=300/y=0:5/clobber/file=mytype.nc/outtype=double sst
use mytype.nc; sh dat/att mytype.nc; can data mytype
     currently SET data sets:
    2> ./mytype.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(COADSX140_140)        FLOAT     units           CHAR        12   T       degrees_east
                                 point_spacing   CHAR        4    T       even
                                 modulo          FLOAT       1    T       360
                                 axis            CHAR        1    T       X
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        13   F       COADSX140_140
  
(COADSY46_48)          FLOAT     units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 orig_file_axname
                                                 CHAR        11   F       COADSY46_48
  
(TIME1)                FLOAT     units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          FLOAT       1    T       8765.82
                                 axis            CHAR        1    T       T
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 SST                   DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 long_name       CHAR        23   T       SEA SURFACE TEMPERATURE
                                 history         CHAR        22   T       From coads_climatology
                                 units           CHAR        5    T       Deg C
                                 Ferret_Precision_Note
                                                 CHAR        69   F       This variable written using Ferret was converted from FLOAT to DOUBLE
  
 
! Restore the axis type from the file
 
set axis/outtype=input `sst,return=xaxis`
 !-> set axis/outtype=input COADSX
set axis/outtype=input `sst,return=yaxis`
 !-> set axis/outtype=input COADSY
set axis/outtype=input `sst,return=taxis`
 !-> set axis/outtype=input TIME
 
save/x=300/y=0:5/clobber/file=mytype.nc sst
use mytype.nc; sh dat/att mytype.nc; can data mytype
     currently SET data sets:
    2> ./mytype.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(COADSX140_140)        DOUBLE    units           CHAR        12   T       degrees_east
                                 point_spacing   CHAR        4    T       even
                                 modulo          DOUBLE      1    T       360
                                 axis            CHAR        1    T       X
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        13   F       COADSX140_140
  
(COADSY46_48)          DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 orig_file_axname
                                                 CHAR        11   F       COADSY46_48
  
(TIME)                 DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          DOUBLE      1    T       8765.82
                                 axis            CHAR        1    T       T
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 SST                   FLOAT     missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        23   T       SEA SURFACE TEMPERATURE
                                 history         CHAR        22   T       From coads_climatology
                                 units           CHAR        5    T       Deg C
                                 Ferret_Precision_Note
                                                 CHAR        69   F       This variable written using Ferret was converted from FLOAT to DOUBLE
  
 
! User-defined axes are output as double by default.
 
define axis/t=1-jan-1990:1-feb-1990:2/units=hours myhours
let tt = t[gt=myhours] - `t[gt=myhours,L=1]`
 !-> DEFINE VARIABLE tt = t[gt=myhours] - 779832
 
save/clobber/file=mytype.nc tt
use mytype.nc; sh dat/att mytype.nc; can data mytype
     currently SET data sets:
    2> ./mytype.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(MYHOURS)              DOUBLE    units           CHAR        22   T       hours since 1901-01-15
                                 axis            CHAR        1    T       T
                                 calendar        CHAR        9    T       GREGORIAN
                                 time_origin     CHAR        11   T       15-JAN-1901
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        7    F       MYHOURS
  
 TT                    DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 long_name       CHAR        22   T       T[GT=MYHOURS] - 779832
  
 
set axis/outtype=int myhours
set var/bad=-9999 tt
 
save/clobber/file=mytype.nc/outtype=int tt
use mytype.nc; sh dat/att mytype.nc; can data mytype
     currently SET data sets:
    2> ./mytype.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(MYHOURS)              INT       units           CHAR        22   T       hours since 1901-01-15
                                 axis            CHAR        1    T       T
                                 calendar        CHAR        9    T       GREGORIAN
                                 time_origin     CHAR        11   T       15-JAN-1901
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        7    F       MYHOURS
  
 TT                    INT       missing_value   INT         1    T       -9999
                                 _FillValue      INT         1    T       -9999
                                 long_name       CHAR        22   T       T[GT=MYHOURS] - 779832
  
 
! Restore the type of non-file axis, to double
 
set axis/outtype=input myhours
save/clobber/file=mytype.nc tt
use mytype.nc; sh dat/att mytype.nc; can data mytype
     currently SET data sets:
    2> ./mytype.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(MYHOURS)              DOUBLE    units           CHAR        22   T       hours since 1901-01-15
                                 axis            CHAR        1    T       T
                                 calendar        CHAR        9    T       GREGORIAN
                                 time_origin     CHAR        11   T       15-JAN-1901
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        7    F       MYHOURS
  
 TT                    DOUBLE    missing_value   DOUBLE      1    T       -9999
                                 _FillValue      DOUBLE      1    T       -9999
                                 long_name       CHAR        22   T       T[GT=MYHOURS] - 779832
  
 
 
! not all axes can be correctly represented in all data types
! Intentional errors:
set mode ignore
 
define axis/t=1-jan-1990:1-feb-1992:2/units=seconds myseconds
let tt = t[gt=myseconds] - `t[gt=myseconds,L=1]`
 !-> DEFINE VARIABLE tt = t[gt=myseconds] - 2807395200
 
set axis/outtype=int myseconds
save/L=32875000:32875201/clobber/file=mytype.nc tt
 
 
use proleptic_gregorian.nc
set axis/outtype=byte `my_data,return=taxis`
 !-> set axis/outtype=byte TDAYS
save/clobber/file=mytype.nc my_data
 
set axis/outtype=int `my_data,return=taxis`
 !-> set axis/outtype=int TDAYS
save/clobber/file=mytype.nc my_data
 
cancel mode ignore
 
*** Running ferret script: bn_axis_nonmonotonic.jnl
! bn_axis_nonmonotonic.jnl
! bn_define_axis doesnt test the case where the varible is not monotonic
! ACM 11/2012  With Ferret v6.83+ the message tells us the index value
 
! Intentional error
 
set mode ignore
let tvar = {85, 86, 86, 87, 88, 89, 90, 91, 92, 92, 92, 91, 92, 94, 95, 98}
define axis/t/units=days tax = tvar
 
cancel mode ignore
*** Running ferret script: bn_vec_mod.jnl
! bn_vec_mod.jnl
! /MODULO qualifier for the vector command.
! 12/12/2012 ACM
!
! (Note for a test of POLY/MODULO see
! /home/users/ansley/ans_ferret/users/brockmann/polymod.jnl)
 
use tripolar_subset.nc
 
! Define a V component for vectors
 
let fakev = 0.8*u - 0.1*geolat_c
set view ul
vec u,fakev,geolon_c,geolat_c
set view ll
vec/MOD/HLIM=0:360 u,fakev,geolon_c,geolat_c
set view lr
vec/MOD/HLIM=-180:180 u,fakev,geolon_c,geolat_c
 
can view
*** Running ferret script: bn685_bug_fixes.jnl
! bn685_bug_fixes.jnl
! test various fixes that went into version 6.85
! 1/2013 ACM
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err684_label_quotes
! err684_label_quotes.jnl
! See ticket 1298.
 
! A long-standing bug, error message if a label
! enclosed in single quotes is sent to pplus
! The single quotes triggers an attempt to translate
! a pplus symbol.
 
plot/set/i=1:12 1./i
  ppl xlab "'My X label'"
  ppl ylab "'My Y Label'"
  ppl title "'A title w/ single quotes'. Need not be in pairs: Ka'imimoana"
ppl plot
 
 
! Here is the example from the ticket
 
! This is ok
say "'hello'"
'hello'
 
! this returned an error
label 4.5 .5 0 0 .3 "'hello'"
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err684_context_shape
! when limits are omitted with a compressing transformation the grave
! accent R=SHAPE erroneously includes the corresponding axis in the shape
 
! The problem was when INTERP_CONTEXT calls COMPLETE_MISSING_LIMITS.
! That routine fills in both the SS and the WW limits as the full axis span.
! in a full-fledged evaluation occurred the ss limits would be set to
! -999:-999 at the time that the transform was stripped from the stack
 
! The fix is to simulate this action inside of INTERP_CONTEXT
 
use coads_climatology
say `sst[l=1:12@ave],ret=shape`
 !-> MESSAGE/CONTINUE XY
XY
say `sst[l=@ave],ret=shape`
 !-> MESSAGE/CONTINUE XY
XY
 
let a = sst[l=1:12@ave]
let b = sst[l=@ave]
say `a,ret=shape`
 !-> MESSAGE/CONTINUE XY
XY
say `b,ret=shape`
 !-> MESSAGE/CONTINUE XY
XY
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err684_tax_fcns
!err684_tax_fcns.jnl
! See ticket 2043, bug in workaround for single-precision arguments
!                  no longer needed in double-precision Ferret
! The output at 13-oct and 18-oct was incorrect
 
 define axis/t/units=days/t0=1-jan-1950 tday = { \
 20724.935546875, 20729.921875, 20734.951171875,\
20739.96484375, 20744.939453125, 20749.8984375, 20754.92578125}
 
 let var = t[gt=tday]
 
 
 list/L=3:7 tax_datestring(var, var, "second")
             VARIABLE : TAX_DATESTRING(VAR, VAR, "second")
             SUBSET   : 5 points (TIME)
 08-OCT-2006 22 / 3:"08-OCT-2006 22:49:41"
 13-OCT-2006 23 / 4:"13-OCT-2006 23:09:22"
 18-OCT-2006 22 / 5:"18-OCT-2006 22:32:48"
 23-OCT-2006 21 / 6:"23-OCT-2006 21:33:45"
 28-OCT-2006 22 / 7:"28-OCT-2006 22:13:07"
 
 list/L=3:7 tax_day(var, var)
             VARIABLE : TAX_DAY(VAR, VAR)
             SUBSET   : 5 points (TIME)
 08-OCT-2006 22 / 3:   8.00
 13-OCT-2006 23 / 4:  13.00
 18-OCT-2006 22 / 5:  18.00
 23-OCT-2006 21 / 6:  23.00
 28-OCT-2006 22 / 7:  28.00
 
 list/L=3:7 tax_dayfrac(var, var)
             VARIABLE : TAX_DAYFRAC(VAR, VAR)
             SUBSET   : 5 points (TIME)
 08-OCT-2006 22 / 3:  0.9512
 13-OCT-2006 23 / 4:  0.9648
 18-OCT-2006 22 / 5:  0.9394
 23-OCT-2006 21 / 6:  0.8984
 28-OCT-2006 22 / 7:  0.9258
 
 list/L=3:7 tax_jday(var, var)
             VARIABLE : TAX_JDAY(VAR, VAR)
             SUBSET   : 5 points (TIME)
 08-OCT-2006 22 / 3:  281.0
 13-OCT-2006 23 / 4:  286.0
 18-OCT-2006 22 / 5:  291.0
 23-OCT-2006 21 / 6:  296.0
 28-OCT-2006 22 / 7:  301.0
 
 list/L=3:7 tax_jday1900(var, var)
             VARIABLE : TAX_JDAY1900(VAR, VAR)
             SUBSET   : 5 points (TIME)
 08-OCT-2006 22 / 3:  38996.
 13-OCT-2006 23 / 4:  39001.
 18-OCT-2006 22 / 5:  39006.
 23-OCT-2006 21 / 6:  39011.
 28-OCT-2006 22 / 7:  39016.
 
 list/L=3:7 tax_month(var, var)
             VARIABLE : TAX_MONTH(VAR, VAR)
             SUBSET   : 5 points (TIME)
 08-OCT-2006 22 / 3:  10.00
 13-OCT-2006 23 / 4:  10.00
 18-OCT-2006 22 / 5:  10.00
 23-OCT-2006 21 / 6:  10.00
 28-OCT-2006 22 / 7:  10.00
 
 list/L=3:7 tax_yearfrac(var, var)
             VARIABLE : TAX_YEARFRAC(VAR, VAR)
             SUBSET   : 5 points (TIME)
 08-OCT-2006 22 / 3:  0.7725
 13-OCT-2006 23 / 4:  0.7862
 18-OCT-2006 22 / 5:  0.7998
 23-OCT-2006 21 / 6:  0.8134
 28-OCT-2006 22 / 7:  0.8272
 
 list/L=3:7 tax_year(var, var)
             VARIABLE : TAX_YEAR(VAR, VAR)
             SUBSET   : 5 points (TIME)
 08-OCT-2006 22 / 3:  2006.
 13-OCT-2006 23 / 4:  2006.
 18-OCT-2006 22 / 5:  2006.
 23-OCT-2006 21 / 6:  2006.
 28-OCT-2006 22 / 7:  2006.
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err684_save_subset
! err684_bug_save_subset
! see ticke 2064, precision in internal comparison of coordinate data
 
! previously gave a message about inconsistent coords
 
use bug_save_subset.nc
save/clobber/file=aa.nc/i=5:15 sh
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err684_save_subset
! err684_bug_save_subset
! see ticke 2064, precision in internal comparison of coordinate data
 
! previously gave a message about inconsistent coords
 
use bug_save_subset.nc
save/clobber/file=aa.nc/i=5:15 sh
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err684_line_plot_zero
! err684_line_plot_zero.jnl
! plot all-zero variable gave blank plot.
! For a correct plot, yaxis_min and yaxis_max should be -1.0 and 1.0 not 0.0, 0.0
 
plot {0,0,0}
sh sym yaxis*
YAXIS_MIN = "-1.00000000"
YAXIS_MAX = "1.00000000"
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err684_delimited_precision
! err684_delimited_precision.jnl
! 5/2013 Fixing bug 2066
! Reading numeric data with /FORM=DELIM converted to single precision
 
! Data has numeric, longitude, and latitude values needing double precision.
! The seconds portion of time is also now read with double precision
sp cat data/delim_prec.dat
  734654.0000  330.1234500E  42.00001000N  00:00:1.00000001
  734654.0104  330.1234600E  42.00004000N  00:00:1.00000003
  734654.0208  330.1234700E  42.00006000N  00:00:1.00000007
  734654.0313  330.1234800E  42.00007000N  00:00:1.000000095
 
! Delimited read, automatically detect data types
set data/ez/format=delim/del=" " delim_prec.dat
list/i=1:5/prec=10 v1,v2,v3,v4
             DATA SET: ./data/delim_prec.dat
             X: 0.5 to 4.5
 Column  1: V1
 Column  2: V2 is V2 (degrees_east)(Longitude)
 Column  3: V3 is V3 (degrees_north)(Latitude)
 Column  4: V4 is V4 (hours)(Time of day)
                  V1       V2           V3             V4
1   / 1:  734654.0000  330.1234500  42.00001000  2.777777806E-04
2   / 2:  734654.0104  330.1234600  42.00004000  2.777777861E-04
3   / 3:  734654.0208  330.1234700  42.00006000  2.777777972E-04
4   / 4:  734654.0313  330.1234800  42.00007000  2.777778042E-04
 
! Delimited read, specify data types
can dat/all
set data/ez/format=delim/del=" "/var="day,lon,lat,tim"/type="numeric,longitude,latitude,time" delim_prec.dat
list/prec=10 day, lon, lat, tim
             DATA SET: ./data/delim_prec.dat
             X: 0.5 to 4.5
 Column  1: DAY is day
 Column  2: LON is lon (degrees_east)(Longitude)
 Column  3: LAT is lat (degrees_north)(Latitude)
 Column  4: TIM is tim (hours)(Time of day)
                 DAY       LON          LAT            TIM
1   / 1:  734654.0000  330.1234500  42.00001000  2.777777806E-04
2   / 2:  734654.0104  330.1234600  42.00004000  2.777777861E-04
3   / 3:  734654.0208  330.1234700  42.00006000  2.777777972E-04
4   / 4:  734654.0313  330.1234800  42.00007000  2.777778042E-04
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err6842_context_shape
! err6842_context_shape.jnl
! 5/2013 acm
! Continuing the fixes for #1801 (see ticket 2051, and
! see err68_context_shape.jnl
 
! Compound expressions did not always return the correct
! result,depending on the order of the sub-expressions.
 
use coads_climatology
 
! All the returns in this script should say XYT
 
! Here the second used to just say XY
 
let a = sst - sst[t=1:12@ave]
let b = sst - sst[t=@ave]
say `a,ret=shape`
 !-> MESSAGE/CONTINUE XYT
XYT
say `b,ret=shape`
 !-> MESSAGE/CONTINUE XYT
XYT
 
let a = sst[t=1:12@ave] + sst
let b = sst[t=@ave] + sst
say `a,ret=shape`
 !-> MESSAGE/CONTINUE XYT
XYT
say `b,ret=shape`
 !-> MESSAGE/CONTINUE XYT
XYT
 
! The second used to just say XY
! and the third said XY
 
let a = sst - sst[t=1:12@ave] + sst[x=1:100@ave]
let b = sst - sst[t=@ave] + sst[x=@ave]
let c = sst - sst[x=@ave] + sst[t=@ave]
say `a,ret=shape`
 !-> MESSAGE/CONTINUE XYT
XYT
say `b,ret=shape`
 !-> MESSAGE/CONTINUE XYT
XYT
say `c,ret=shape`
 !-> MESSAGE/CONTINUE XYT
XYT
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err684_evnt_z
! err684_evnt_z.jnl
! see ticket 2054
 
! Result of @EVNT is correct in x direction
 
let my_var1 = { 0, 0, 1, 2, 3, 4 }
let my_event1 = my_var1[x=@evnt:0.1]
list my_var1, my_event1! Right answer
             X: 0.5 to 6.5
 Column  1: MY_VAR1 is { 0, 0, 1, 2, 3, 4 }
 Column  2: MY_EVENT1 is MY_VAR1[X=@EVNT:0.1]
        MY_VAR1  MY_EVENT1
1   / 1:   0.000   0.000
2   / 2:   0.000   0.000
3   / 3:   1.000   1.000
4   / 4:   2.000   1.000
5   / 5:   3.000   1.000
6   / 6:   4.000   1.000
 
! Should be same in the Z direction:
 
let my_var = zsequence( my_var1)
let my_event = my_var[z=@evnt:0.1]
list my_var, my_event
             Z: 0.5 to 6.5
 Column  1: MY_VAR is ZSEQUENCE( MY_VAR1)
 Column  2: MY_EVENT is MY_VAR[Z=@EVNT:0.1]
        MY_VAR  MY_EVENT
1   / 1:  0.000   0.000
2   / 2:  0.000   0.000
3   / 3:  1.000   1.000
4   / 4:  2.000   1.000
5   / 5:  3.000   1.000
6   / 6:  4.000   1.000
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err684_save_expression
! err684_save_expression.jnl
! Bug 2076. If we write out an expression that has not been defined
! as a user-variable, the variable didn't have missing_value and _FillValue
! attributes and was written as single-precision float.
 
! Define a variable - result is correct
use coads_climatology
let a = sst[x=@ave,y=@ave]-sst[x=@ave,y=@ave,t=@ave]
save/clob/file=a.nc a
sp ncdump a.nc
netcdf a {
dimensions:
	TIME = UNLIMITED ; // (3 currently)
variables:
	double TIME(TIME) ;
		TIME:units = "hour since 0000-01-01 00:00:00" ;
		TIME:time_origin = "01-JAN-0000 00:00:00" ;
		TIME:modulo = " " ;
		TIME:axis = "T" ;
		TIME:standard_name = "time" ;
	double A(TIME) ;
		A:missing_value = -1.e+34 ;
		A:_FillValue = -1.e+34 ;
		A:long_name = "SST[X=@AVE,Y=@AVE]-SST[X=@AVE,Y=@AVE,T=@AVE]" ;
		A:long_name_mod = "X=20E:20E(380), Y=90S:90N, T=01-JAN 00:45:01-APR 08:12" ;
		A:history = "From coads_climatology" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
data:

 TIME = 366, 1096.485, 1826.97 ;

 A = -0.0994369294620867, -0.0415768591395924, 0.141480238198152 ;
}
 
save/clob/file=aa.nc sst[x=@ave,y=@ave]-sst[x=@ave,y=@ave,t=@ave]
sp ncdump aa.nc
netcdf aa {
dimensions:
	TIME = UNLIMITED ; // (3 currently)
variables:
	double TIME(TIME) ;
		TIME:units = "hour since 0000-01-01 00:00:00" ;
		TIME:time_origin = "01-JAN-0000 00:00:00" ;
		TIME:modulo = " " ;
		TIME:axis = "T" ;
		TIME:standard_name = "time" ;
	double E410(TIME) ;
		E410:missing_value = -1.e+34 ;
		E410:_FillValue = -1.e+34 ;
		E410:long_name = "SST[X=@AVE,Y=@AVE]-SST[X=@AVE,Y=@AVE,T=@AVE]" ;
		E410:long_name_mod = "X=20E:20E(380), Y=90S:90N, T=01-JAN 00:45:01-APR 08:12" ;
		E410:history = "From coads_climatology" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
data:

 TIME = 366, 1096.485, 1826.97 ;

 E410 = -0.0994369294620867, -0.0415768591395924, 0.141480238198152 ;
}
 
! Double check the missing-value matches what is written.
 
save/clob/file=aa.nc/y=-81:-75 sst[x=@ave]-sst[x=@ave,t=@ave]
use aa.nc
list e410
             VARIABLE : SST[X=@AVE]-SST[X=@AVE,T=@AVE]
                        X=20E:20E(380), T=01-JAN 00:45:01-APR 08:12
             FILENAME : aa.nc
             SUBSET   : 4 by 3 points (LATITUDE-TIME)
                    81S    79S    77S    75S   
                     1      2      3      4
 16-JAN      / 1:   ....   ....  0.278  0.379
 15-FEB      / 2:   ....   .... -0.005 -0.122
 17-MAR      / 3:   ....   .... -1.028 -0.484
 
can dat 2
 
! Can we ask to save as another data type?
! Note can't set the bad-flag of an expresion so
! asking for type of INT cannot match missing to
! data type so will fail.
 
save/clob/file=aa.nc/outtype=float sst[x=@ave,y=@ave]-sst[x=@ave,y=@ave,t=@ave]
sp ncdump aa.nc
netcdf aa {
dimensions:
	TIME = UNLIMITED ; // (3 currently)
variables:
	double TIME(TIME) ;
		TIME:units = "hour since 0000-01-01 00:00:00" ;
		TIME:time_origin = "01-JAN-0000 00:00:00" ;
		TIME:modulo = " " ;
		TIME:axis = "T" ;
		TIME:standard_name = "time" ;
	float E410(TIME) ;
		E410:missing_value = -1.e+34f ;
		E410:_FillValue = -1.e+34f ;
		E410:long_name = "SST[X=@AVE,Y=@AVE]-SST[X=@AVE,Y=@AVE,T=@AVE]" ;
		E410:long_name_mod = "X=20E:20E(380), Y=90S:90N, T=01-JAN 00:45:01-APR 08:12" ;
		E410:history = "From coads_climatology" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
data:

 TIME = 366, 1096.485, 1826.97 ;

 E410 = -0.09943693, -0.04157686, 0.1414802 ;
}
 
save/clob/file=aa.nc/outtype=float/y=-81:-75 sst[x=@ave]-sst[x=@ave,t=@ave]
use aa.nc
list e410
             VARIABLE : SST[X=@AVE]-SST[X=@AVE,T=@AVE]
                        X=20E:20E(380), T=01-JAN 00:45:01-APR 08:12
             FILENAME : aa.nc
             SUBSET   : 4 by 3 points (LATITUDE-TIME)
                    81S    79S    77S    75S   
                     1      2      3      4
 16-JAN      / 1:   ....   ....  0.278  0.379
 15-FEB      / 2:   ....   .... -0.005 -0.122
 17-MAR      / 3:   ....   .... -1.028 -0.484
 
can dat 2
 
! Note can't set the bad-flag of an expresion so
! asking for type of INT cannot match missing to
! data type so will return an error.
 
set mode ignore
save/clob/file=aa.nc/outtype=int sst[x=@ave,y=@ave]-sst[x=@ave,y=@ave,t=@ave]
 
set mode/last ignore
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err684_degC_axlab
! err684_degC_axlab.jnl
! ACM 6/2013
! See ticket 2080. Units of degree_C interpreted as if degree_north.
 
ppl clsplt
set win/asp=1
can mode logo
set mode meta degC_axlab.plt
 
let/units="degree_C"/title=temperature temp = {1,2,3,2,0}
let/units="m"/title=depth depth = {1,5,1,5,0}
plot/vs temp, depth
 
set mode/last meta
set mode/last logo
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err684_null_stringwrite
! err684_null_stringwrite.jnl
! 18-Jun-2013 ACM
!
! Bug 2081
! write a null string variable (0-length string) to NetCDF
 
! This is ok
let avar = {"a", "", "c"}
save/file=a.nc/clobber avar
 
! Write just a null value resulted in a NetCDF library error
 
set mode ignore
let anull = avar[i=2]
 
save/clobber/file=a.nc anull
set mode/last ignore
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err684_FillValue_xml
! err684_FillValue_xml.jnl
! ACM 6/2013
!
! See the dataset at http://ferret.pmel.noaa.gov/pmel/thredds/dodsC/woa09_1deg_monthly
! where the "number of" variables have  _FillValues attributes = -2147483647
! This value was being written to the xml headers as a float, without enough precision.
! See las ticket #761, fixes in show_data_set_vars_xml.F
 
! should be    <value>-2147483647</value>
! instead of:  <value>-2.147484E+09</value>
 
use fill_value_int.nc
sh dat/var/xml
<datasets>
<dataset name="./data/fill_value_int.nc" default="true">
<title>INT variable with _FillValue -2147483647</title>
<var name="A_dd">
<attribute name="units" type="char">
   <value><![CDATA[1]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[Number of O2 Utilization Observations]]></value>
</attribute>
<attribute name="_FillValue" type="float">
   <value>     -2147483647</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[LONG]]></value>
</attribute>
<grid name="GEW1">
<axes>
<xaxis>LON</xaxis>
</axes>
</grid>
</var>
</dataset>
</datasets>
<axes>
<axis name="LON">
<attribute name="direction" type="char">
   <value><![CDATA[I]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[degrees_east]]></value>
</attribute>
<attribute name="length" type="short">
   <value>2</value>
</attribute>
<attribute name="start" type="double">
   <value>300.5</value>
</attribute>
<attribute name="end" type="double">
   <value>301.5</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value><![CDATA[yes]]></value>
</attribute>
<attribute name="modulo_length" type="short">
   <value>360</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[longitude]]></value>
</attribute>
<attribute name="axis" type="char">
   <value><![CDATA[X]]></value>
</attribute>
<attribute name="standard_name" type="char">
   <value><![CDATA[longitude]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[lon]]></value>
</attribute>
</axis>
</axes>
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err684_axticlab
! err684_axticlab
! 7/10/2013 *acm
!
! ticket 1990: axis tic labels for higher precison data
! had just 2 digits, and didnt capture the data range.
 
set mode meta axticlabel.plt
 
let/title="tic labels on dependent axis" var = {\
1.715,1.7136,1.711,1.7083,1.7056,1.703,1.7003,1.6976,1.695,1.6923,\
1.6897,1.687,1.6843,1.6817,1.679,1.6765,1.676,1.676}
 
plot/line/sym/title="Vert axis labels should be 1.675 thru 1.715" var
cancel mode meta
 
! rename the metafile. Else we get weird contents in axticlabel.plt
! once the whole benchmark suite has finished. (why?)
set mode meta metafile.plt
cancel mode meta
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err684_dotstart
! err684_dotstart.jnl
! 12-Jul-2013 ACM
!
! Bug 2084. Avoid a STOP if the expression starts with a .
!           Issue a normal error message if its an invalid string.
 
set mode ignore
 
! This previously kicked out with  STOP ALG_BREAK_UP
! Now will issue an error
list .hello
 
! Related syntax: var.att. Generate errors since no dataset is open
list a.units
list ..history
 
! Just a dot is interpretd as a number.
list .
 
set mode/last ignore
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err684_vfine_to_coarse
 ! err684_vfine_to_coarse
 ! see ticket 2070.
 
def ax/x/edge axi = {0,31,61,92}
def ax/x/edge axi_coarse = {0, 92}
let vdat = {3.034547, 3.078104, 3.059311}
let v = vdat[gx=axi@asn]
let v_coarse = v[gx=axi_coarse@max]
 
list v_coarse
             VARIABLE : V[GX=AXI_COARSE@MAX]
             X        : 46
          3.078
list v eq v_coarse[gx=v@ave]
             VARIABLE : V EQ V_COARSE[GX=V@AVE]
             SUBSET   : 3 points (X)
 15.5 / 1:  0.000
 46   / 2:  1.000
 76.5 / 3:  0.000
 
 
! Y direction
can var/all
 
def ax/y/edge axi = {0,31,61,92}
def ax/y/edge axi_coarse = {0, 92}
let vdat = ySEQUENCE({3.034547, 3.078104, 3.059311})
let v = vdat[gy=axi@asn]
let v_coarse = v[gy=axi_coarse@max]
 
list v_coarse
             VARIABLE : V[GY=AXI_COARSE@MAX]
             Y        : 46
          3.078
list v eq v_coarse[gy=v@ave]
             VARIABLE : V EQ V_COARSE[GY=V@AVE]
             SUBSET   : 3 points (Y)
 15.5 / 1:  0.000
 46   / 2:  1.000
 76.5 / 3:  0.000
 
 
! Z direction
can var/all
 
def ax/z/edge axi = {0,31,61,92}
def ax/z/edge axi_coarse = {0, 92}
let vdat = zSEQUENCE({3.034547, 3.078104, 3.059311})
let v = vdat[gz=axi@asn]
let v_coarse = v[gz=axi_coarse@max]
 
list v_coarse
             VARIABLE : V[GZ=AXI_COARSE@MAX]
             Z        : 46
          3.078
list v eq v_coarse[gz=v@ave]
             VARIABLE : V EQ V_COARSE[GZ=V@AVE]
             SUBSET   : 3 points (Z)
 15.5 / 1:  0.000
 46   / 2:  1.000
 76.5 / 3:  0.000
 
 
! T direction
can var/all
 
def ax/t/edge axi = {0,31,61,92}
def ax/t/edge axi_coarse = {0, 92}
let vdat = TSEQUENCE({3.034547, 3.078104, 3.059311})
let v = vdat[gt=axi@asn]
let v_coarse = v[gt=axi_coarse@max]
 
list v_coarse
             VARIABLE : V[GT=AXI_COARSE@MAX]
             T        : 46
          3.078
list v eq v_coarse[gt=v@ave]
             VARIABLE : V EQ V_COARSE[GT=V@AVE]
             SUBSET   : 3 points (T)
 15.5 / 1:  0.000
 46   / 2:  1.000
 76.5 / 3:  0.000
 
 
! E direction
can var/all
 
def ax/e/edge axi = {0,31,61,92}
def ax/e/edge axi_coarse = {0, 92}
let vdat = ESEQUENCE({3.034547, 3.078104, 3.059311})
let v = vdat[ge=axi@asn]
let v_coarse = v[ge=axi_coarse@max]
 
list v_coarse
             VARIABLE : V[GE=AXI_COARSE@MAX]
             E        : 46
          3.078
list v eq v_coarse[ge=v@ave]
             VARIABLE : V EQ V_COARSE[GE=V@AVE]
             SUBSET   : 3 points (E)
 15.5 / 1:  0.000
 46   / 2:  1.000
 76.5 / 3:  0.000
 
 
 
! F direction
can var/all
 
def ax/f/edge axi = {0,31,61,92}
def ax/f/edge axi_coarse = {0, 92}
let vdat = FSEQUENCE({3.034547, 3.078104, 3.059311})
let v = vdat[gf=axi@asn]
let v_coarse = v[gf=axi_coarse@max]
 
list v_coarse
             VARIABLE : V[GF=AXI_COARSE@MAX]
             F        : 46
          3.078
list v eq v_coarse[gf=v@ave]
             VARIABLE : V EQ V_COARSE[GF=V@AVE]
             SUBSET   : 3 points (F)
 15.5 / 1:  0.000
 46   / 2:  1.000
 76.5 / 3:  0.000
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err684_repeated_coordindates
! err685_repeated_coordindates.jnl
!  The NOTE about repeated axis coordaintes reported the wrong index location.
 
use latestOb.nc
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err684_packed_output
! err684_packed_output.jnl
! See ticket 2089
! By default keep the output type, means we need to
! re-pack packed data.
 
use err684_packed_output.nc
list/i=1:3 sst
             VARIABLE : Daily Sea Surface Temperature (degC)
             FILENAME : err684_packed_output.nc
             SUBSET   : 3 by 4 points (LONGITUDE-LATITUDE)
             TIME     : 01-OCT-2012 00:00
              80.12E 80.38E 80.62E 
                1      2      3
 15.88N / 4:   ....   ....  29.03
 15.62N / 3:   ....  29.18  29.09
 15.38N / 2:  29.36  29.21  29.10
 15.12N / 1:  29.40  29.27  29.13
 
! data is SHORT, is not scaled
 
save/clobber/file=sst_new.nc sst
 
can data/all
use sst_new.nc
list/i=1:3 sst
             VARIABLE : Daily Sea Surface Temperature (degC)
             FILENAME : sst_new.nc
             SUBSET   : 3 by 4 points (LONGITUDE-LATITUDE)
             TIME     : 01-OCT-2012 00:00
              80.12E 80.38E 80.62E 
                1      2      3
 15.88N / 4:   ....   ....  29.03
 15.62N / 3:   ....  29.18  29.09
 15.38N / 2:  29.36  29.21  29.10
 15.12N / 1:  29.40  29.27  29.13
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err684_string_dim_name
! err685_string_dim_name.jnl
! Ticket 2091. If the string variable shares its dimension name,
! want to just mark it as a file variable not a coord variable.
 
! Previously issued warnings about string coordinate variable.
use trajectory_trajectory_name.nc
 
! Previously trajectory was not listed among the file variables.
list ..varnames
             VARIABLE : ..VARNAMES
             FILENAME : trajectory_trajectory_name.nc
             SUBSET   : 6 points (X)
 1   / 1:"trajectory"
 2   / 2:"rowSize"   
 3   / 3:"longitude" 
 4   / 4:"latitude"  
 5   / 5:"time"      
 6   / 6:"temp"      
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err684_define_grid
! err684_define_grid.jnl
! 25-Oct-2013 ACM
!
! Bug 2096, defining grid with some user-defined axes. Previously
! this resulted in err msg with inappropriate orientation for Z axis
 
define axis/z=0:100:2/depth/unit=meters zax
define axis/x=-178:-157:1/units=degrees_east lon_ax
define axis/y=54:66:0.5/units=degrees_north lat_ax
 
define grid/x=lon_ax/y=lat_ax/z=zax three_d_grd
 
*** Running ferret script: bn_dsg_e_x.jnl
! bn_dsg_e.jnl
! Note: This test is for non-dsg-enabled Ferret.  DSG_enabled ferret
! sees the file diffrently...
!
!  Discrete Sampling Geometries files
!  Create grids such that the instance dimension
!  is on the E axis, so that the variable which
!  has the cf_role attribute has an E grid.
!  The obs axis is in the X direction.
 
use dsg.nc
sh dat
     currently SET data sets:
    1> ./data/dsg.nc  (default)
       DSG Feature type Profile
 name     title                             I         J         K         L         M         N
 ROWSIZE  number of obs for this profile   ...       ...       ...       ...       1:3       ...
 PROFILE  profile ID: Cruise and Station   ...       ...       ...       ...       1:3       ...
 TIME     time                             ...       ...       ...       ...       1:3       ...
 LATITUDE station latitude                 ...       ...       ...       ...       1:3       ...
 LONGITUDE
          station longitude                ...       ...       ...       ...       1:3       ...
 POT_TEMP_DEGC
          pot_temp_degc                    ...       ...     tot 34      ...       1:3       ...
 SAL      sal                              ...       ...     tot 34      ...       1:3       ...
 DEPTH    DEPTH_M                          ...       ...     tot 34      ...       1:3       ...
 
sh att profile
     attributes for dataset: ./data/dsg.nc
 profile.missing_value = -1.E+34
 profile._FillValue = -1.E+34
 profile.long_name = profile ID: Cruise and Station 
 profile.cf_role = profile_id 
 profile.history = From FINAL_verification_data_all_PacOOS_NHL_OCNMS_CCCC_03072013.txt 
sh grid rowsize
    GRID GEN1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 normal    T
 FEATURES  E (instance)         3 r   1                    3                   full
 normal    F
 
Dataset coordinates:
  longitude range: 124.50148W(-124.50148) to 124.30118W(-124.30118)
  latitude range: 41.89711N to 41.90191N
  depth range: 2.12 to 33.2111
  time range: 12-AUG-2009 00:00 to 13-AUG-2009 00:00
 
sh grid sal
    GRID (G###)
 DSG Feature type Profile
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 FEATURE_Z DEPTH (m)           34 r-  2.12                 33.211              Variable lengths
 normal    T
 FEATURES  E (instance)         3 r   1                    3                   full
 normal    F
 
Dataset coordinates:
  longitude range: 124.50148W(-124.50148) to 124.30118W(-124.30118)
  latitude range: 41.89711N to 41.90191N
  depth range: 2.12 to 33.2111
  time range: 12-AUG-2009 00:00 to 13-AUG-2009 00:00
 
 
! This file from the datset "West Coast Carbon cruises" in our
! example erdadp, has the cf_role attribute on a coordinate variable.
!  prof, time, latitude, longitude, and rowsize are on the E axis
!  press_db and pco2 are on the X asis
 
use WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc
 
sh dat 2
     currently SET data sets:
    2> ./data/WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc  (default)
       DSG Feature type Profile
 name     title                             I         J         K         L         M         N
 PROF     Prof                             ...       ...       ...       ...       1:21      ...
 PROFILE  profile ID: Cruise and Station   ...       ...       ...       ...       1:21      ...
 TIME     Time                             ...       ...       ...       ...       1:21      ...
 LATITUDE Latitude                         ...       ...       ...       ...       1:21      ...
 LONGITUDE
          Longitude                        ...       ...       ...       ...       1:21      ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:21      ...
 PRESS_DB PRESS_DB                         ...       ...     tot 373     ...       1:21      ...
 PCO2     PCO2                             ...       ...     tot 373     ...       1:21      ...
 
sh att (profile)
     attributes for dataset: ./data/WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc
 (profile)._FillValue = -1.E+34
 (profile).actual_range = 70, 90
 (profile).cf_role = profile_id 
 (profile).history = From allDataFrom2007-2011-2012WestCoastCarbonCruises-revised3-6-13-1.txt 
 (profile).long_name = profile ID: Cruise and Station 
 (profile).missing_value = -1.E+34
 (profile).orig_file_axname = profile 
sh grid rowsize
    GRID GSS1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 normal    T
 FEATURES1 E (instance)        21 r   1                    21                  full
 normal    F
 
Dataset coordinates:
  longitude range: 122.5W(-122.5) to 117.75W(-117.75)
  latitude range: 31.95N to 36.8N
  depth range: 2.85 to 2800.18994
  time range: 25-AUG-2011 11:46 to 30-AUG-2011 18:06
 
sh grid pco2
    GRID (G###)
 DSG Feature type Profile
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 FEATURE_Z1 Z                 373 r-  2.85                 2800.2              Variable lengths
 normal    T
 FEATURES1 E (instance)        21 r   1                    21                  full
 normal    F
 
Dataset coordinates:
  longitude range: 122.5W(-122.5) to 117.75W(-117.75)
  latitude range: 31.95N to 36.8N
  depth range: 2.85 to 2800.18994
  time range: 25-AUG-2011 11:46 to 30-AUG-2011 18:06
 
*** Running ferret script: bn_nco_append.jnl
! bn_nco_append.jnl
! 5/2013 add a test appending files with ncks
 
 ! These functions use Unix NCO utilities, found at http://nco.sourceforge.net/
 ! If NCO is not installed, it is fine to comment out this script when running
 ! the Ferret benchmark suite.
 
! Prior to v6.85 Ferret's NCO function always included -O for Override.
! Appending failed. In v6.85+, if -A is included then dont send -O to ncks.
use z1
use z2
sh dat
     currently SET data sets:
    1> ./z1.nc
 name     title                             I         J         K         L
 DDAT_ORIG
          DDAT[GZ=ZAXIS_ORIG@ASN]          ...       ...       1:5       ...
 
    2> ./z2.nc  (default)
 name     title                             I         J         K         L
 CYCLE_ORIG
          CYCLE[GZ=ZAXIS_ORIG@ASN]         ...       ...       1:5       ...
 
 
! Write a file to be appended to and append variable in z1.nc to the file.
 
save/clobber/file=append_to_this.nc cycle_orig
load nco("ncks", "-A -h z1.nc append_to_this.nc")
sp ncdump -h append_to_this.nc
netcdf append_to_this {
dimensions:
	ZAXIS_ORIG = 5 ;
variables:
	double ZAXIS_ORIG(ZAXIS_ORIG) ;
		ZAXIS_ORIG:point_spacing = "even" ;
		ZAXIS_ORIG:axis = "Z" ;
		ZAXIS_ORIG:standard_name = "altitude" ;
	double CYCLE_ORIG(ZAXIS_ORIG) ;
		CYCLE_ORIG:missing_value = -1.e+34 ;
		CYCLE_ORIG:_FillValue = -1.e+34 ;
		CYCLE_ORIG:long_name = "CYCLE[GZ=ZAXIS_ORIG@ASN]" ;
		CYCLE_ORIG:history = "From z2" ;
	double DDAT_ORIG(ZAXIS_ORIG) ;
		DDAT_ORIG:missing_value = -1.e+34 ;
		DDAT_ORIG:_FillValue = -1.e+34 ;
		DDAT_ORIG:long_name = "DDAT[GZ=ZAXIS_ORIG@ASN]" ;

// global attributes:
		:history = "WKD MON DD HH:MM:SS YYYY: ncks -h -A -h z1.nc append_to_this.nc\n",
			"FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
		:history_of_appended_files = "WKD MON DD HH:MM:SS YYYY: Appended file z1.nc had following \"history\" attribute:\n",
			"FERRET V7.6  DD-MON-YY\n",
			"" ;
		:NCO = "netCDF Operators version 4.7.5 (Homepage = http://nco.sf.net, Code = http://github.com/nco/nco)" ;
}
*** Running ferret script: bn_nobounds.jnl
! bn_nobounds.jnl
! The SAVE/NOBOUNDS qualifier causes bounds never to be written
! even if the data is irregular, and even if the axis came into
! Ferret with bounds.
 
define axis/x/units=meters xirreg = {0,1,2,4,8}
let avar = x[gx=xirreg]
save/clobber/file=a.nc avar
sp ncdump a.nc
netcdf a {
dimensions:
	XIRREG = 5 ;
	bnds = 2 ;
variables:
	double XIRREG(XIRREG) ;
		XIRREG:units = "meters" ;
		XIRREG:point_spacing = "uneven" ;
		XIRREG:axis = "X" ;
		XIRREG:bounds = "XIRREG_bnds" ;
	double XIRREG_bnds(XIRREG, bnds) ;
	double AVAR(XIRREG) ;
		AVAR:missing_value = -1.e+34 ;
		AVAR:_FillValue = -1.e+34 ;
		AVAR:long_name = "X[GX=XIRREG]" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
data:

 XIRREG = 0, 1, 2, 4, 8 ;

 XIRREG_bnds =
  -0.5, 0.5,
  0.5, 1.5,
  1.5, 3,
  3, 6,
  6, 10 ;

 AVAR = 0, 1, 2, 4, 8 ;
}
save/nobounds/clobber/file=a.nc avar
sp ncdump a.nc
netcdf a {
dimensions:
	XIRREG = 5 ;
variables:
	double XIRREG(XIRREG) ;
		XIRREG:units = "meters" ;
		XIRREG:point_spacing = "uneven" ;
		XIRREG:axis = "X" ;
	double AVAR(XIRREG) ;
		AVAR:missing_value = -1.e+34 ;
		AVAR:_FillValue = -1.e+34 ;
		AVAR:long_name = "X[GX=XIRREG]" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
data:

 XIRREG = 0, 1, 2, 4, 8 ;

 AVAR = 0, 1, 2, 4, 8 ;
}
 
! The dataset has a bounds attribute on the time axis
! (the bounds themselves get corrected by Ferret on opening the file)
use gappy_bounds.nc
sh dat
     currently SET data sets:
    1> ./data/gappy_bounds.nc  (default)
 name     title                             I         J         K         L
 A        SST[X=150:180@AVE,Y=-10:0@AVE]   ...       ...       ...       1:6
 
 
! See the bounds attribute on the t axis
sh dat/att
     currently SET data sets:
    1> ./data/gappy_bounds.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        24   T       FERRET V5.60   24-May-04
  
(TGAP)                 DOUBLE    units           CHAR        30   T       DAYS since 1990-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-1990 00:00:00
                                 axis            CHAR        1    T       T
                                 bounds          CHAR        9    T       TGAP_bnds
                                 orig_file_axname
                                                 CHAR        4    F       TGAP
  
 TGAP_bnds             DOUBLE
  
 A                     FLOAT     missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        30   T       SST[X=150:180@AVE,Y=-10:0@AVE]
                                 history         CHAR        10   T       From coads
  
 
! On a SAVE/NOBOUNDS, do not write the bounds
! and do not write a bounds attribute on the axis.
save/clobber/file=a.nc/nobounds a
sp ncdump -h a.nc
netcdf a {
dimensions:
	TGAP = UNLIMITED ; // (6 currently)
variables:
	double TGAP(TGAP) ;
		TGAP:units = "days since 1990-01-01 00:00:00" ;
		TGAP:time_origin = "01-JAN-1990 00:00:00" ;
		TGAP:axis = "T" ;
		TGAP:standard_name = "time" ;
	float A(TGAP) ;
		A:missing_value = -1.e+34f ;
		A:_FillValue = -1.e+34f ;
		A:long_name = "SST[X=150:180@AVE,Y=-10:0@AVE]" ;
		A:history = "From coads" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
! On a SAVE either with /BOUNDS or no bounds qualifier,
! bounds are written for this irregular time axis.
save/clobber/file=a.nc/bounds a
 
sp ncdump -h a.nc
netcdf a {
dimensions:
	TGAP = UNLIMITED ; // (6 currently)
	bnds = 2 ;
variables:
	double TGAP(TGAP) ;
		TGAP:units = "days since 1990-01-01 00:00:00" ;
		TGAP:time_origin = "01-JAN-1990 00:00:00" ;
		TGAP:axis = "T" ;
		TGAP:bounds = "TGAP_bnds" ;
		TGAP:standard_name = "time" ;
	double TGAP_bnds(TGAP, bnds) ;
	float A(TGAP) ;
		A:missing_value = -1.e+34f ;
		A:_FillValue = -1.e+34f ;
		A:long_name = "SST[X=150:180@AVE,Y=-10:0@AVE]" ;
		A:history = "From coads" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
*** Running ferret script: bn_write_integer_att.jnl
! bn_write_integer_att.jnl
!  ACM 6/2013
!
! This file has an integer attribute
!    MHCHLA:numberOfObservations = 15736939 ;
! With double-precision Ferret, we need to call CD_WRITE_ATTVAL_DP
! in cdf_list.F, so that the value, read in as a double, is written
! out correctly (else get a netcdf data type matching error).
 
use write_int_att.nc
sh att mhchla
     attributes for dataset: ./data/write_int_att.nc
 MHCHLA.missing_value = -9999999
 MHCHLA._FillValue = -9999999
 MHCHLA.actual_range = 0.00049, 91.76669
 MHCHLA.coordsys = geographic 
 MHCHLA.fraction_digits = 2
 MHCHLA.long_name = Chlorophyll-a, Aqua MODIS, NPP, 0.05 degrees, Global, Science Quality 
 MHCHLA.numberOfObservations = 1.573694E+07
 MHCHLA.percentCoverage = 0.4216215
 MHCHLA.standard_name = concentration_of_chlorophyll_in_sea_water 
 MHCHLA.units = mg m-3 
 MHCHLA.history = From http://oceanwatch.pfeg.noaa.gov/thredds/dodsC/satellite/MH/chla/mday 
set att/output=all mhchla
save/file=a.nc/clobber mhchla
 
sp ncdump a.nc | grep numberOfObservations
		MHCHLA:numberOfObservations = 15736939 ;
 
 
*** Running ferret script: bn_descriptor_mc.jnl
! bn_descriptor_mc.jnl
! 7/2013 ACM
! See ticket 2087
!
! Allow extension ".mc" to indicate a descriptor file, as discussed in
! http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2013/msg00355.html
!
use des.mc
list/x=180/y=0 sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : des.mc
             SUBSET   : 6 points (TIME)
             LONGITUDE: 179E
             LATITUDE : 1S
                   179E   
                    80
 16-JAN-0000 / 1:  28.20
 15-FEB-0000 / 2:  28.36
 17-MAR-0000 / 3:  28.35
 16-APR-0000 / 4:  28.22
 16-MAY-0000 / 5:  28.49
 16-JUN-0000 / 6:  28.32
 
! Also implement /FORMAT=desriptor for both USE and SET DATA
 
use/format=desc des.my_descriptor
list /x=300/y=10 sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : des.my_descriptor
             SUBSET   : 4 points (TIME)
             LONGITUDE: 61W
             LATITUDE : 9N
                    61W   
                   140
 17-MAR-0000 / 1:  26.58
 16-APR-0000 / 2:  27.17
 16-MAY-0000 / 3:  27.22
 16-JUN-0000 / 4:  27.66
*** Running ferret script: bn_plot_color_only.jnl
! bn_plot_color_only.jnl
! 9/20/2013 ACM
! ticket 2094
!  PLOT/COLOR with no argument skips the black pen and starts with the next one.
 
let pi=atan(1.)*4.
let a = (-1)*pi*4 + i[i=1:500]*(8*pi/500)
let b = sin(a)/a
 
 
set view upper
plot/color b, b[i=@shf:20]
 
! With user-defined colors
ppl color 2, 0, 50, 100
ppl color 3, 100, 50, 0
set view lower
plot/color/thick=3/dash=(0.05,0.1,0.2,0.1) b, b[i=@shf:20]
 
! With extra user-defined colors
can view
set mode linec:12
can win/all; set win/new
ppl color,7,100,65,51   ! orange
ppl color,8,0,55,0      ! dark green
ppl color,9,60,0,100    ! purple
ppl color,10,100,70,100 ! magenta
ppl color,11,80,70,60   ! tan
ppl color,12,100,88,0   ! yellow
 
plot/thick/color/line/i=1:100 \
 cos(i/20), cos(i/24), cos(i/28), cos(i/32), \
 cos(i/36), cos(i/40), cos(i/44), cos(i/48), \
 cos(i/52), cos(i/56), cos(i/60), cos(i/64)
 
cancel mode linecolors
can win/all; set win/new
 
! If lines are plotted using /OVER, Ferret keeps track of the number of lines
! and continues with the next set of colors. When /startcolor is given, the
! count is incremented so that subsequent plots continue with the color
! sequence.
 
! colors 1, 2, 3, 4
set view upper
plot/thick/i=1:50/vlim=-1.1:1.1 sin(i/6)
plot/thick/i=1:50/over sin(i/7)
plot/thick/i=1:50/over 0.6*sin(i/8)
plot/thick/i=1:50/over 0.6*sin(i/9)
 
! colors 2, 3, 4, 5
set view lower
plot/thick/i=1:50/vlim=-1.1:1.1/COLOR sin(i/6)
plot/thick/i=1:50/over sin(i/7)
plot/thick/i=1:50/over 0.6*sin(i/8)
plot/thick/i=1:50/over 0.6*sin(i/9)
 
! intentional errors
! /COLOR (w/o argument) not allowed on PLOT/OVER.
 
can view
set mode ignore
 
plot/i=1:100 sin(i/6)
plot/i=1:100/over/COLOR 0.6*sin(i/7)
 
! PLOT/COLOR not allowed on PLOT/RIBBON.
 
can view
plot/i=1:100/ribbon/COLOR sin(i/6),0.6*sin(i/7)
 
set mode/last ignore
 
 
*** Running ferret script: bn_vtree.jnl
! bn_tree.jnl
 
! 11/2013 -- demonstrate SHOW VARIABLE/TREE and RETRUN=STATUS
! 12/14 update to test regridding output using bn_vtree_regrid.jnl
! 11/15 - DEFINE DATA/AGG has become /T instead of /E
 
CANCEL DATA/ALL
! pure abstract variable -- no dataset
let a = 1
show var/tree a
   A = 1
 
let b = 1
let c = SIN(b)
show var/tree c
   C = SIN(B)
     B = 1
 
! create dummy datasets so we'll have named file variables to play with
let fv1 = 1
let fvx = x[i=1:3]
let fvz = Z[k=1:3]
SAVE/CLOBBER/QUIET/FILE=my_file_vars.nc fv1, fvx, fvz
SAVE/CLOBBER/QUIET/FILE=other_file_vars.nc fv1
SAVE/CLOBBER/QUIET/FILE=another_file_vars.nc fv1
CAN VAR/ALL
use  my_file_vars, other_file_vars, another_file_vars
set data 1
 
! ================
 
! more pure abstract variables
let a = 1
let b = 1
let c = SIN(b)
go bn_vtree.sub c
/TREE=ALL
   in default dataset my_file_vars
   C = SIN(B)
     B = 1
/TREE=USER
   in default dataset my_file_vars
   C = SIN(B)
     B = 1
/TREE=FILE
c is ready and AVAILABLE
************************
 
! file variables
go bn_vtree.sub fv1
/TREE=ALL
   in default dataset my_file_vars
   FV1
/TREE=USER
/TREE=FILE
   FV1[d=my_file_vars]
fv1 is ready and AVAILABLE
************************
show var/tree/d=other_file_vars fv1
 
! expressions
let a = fv1 + fvx
go bn_vtree.sub a
/TREE=ALL
   in default dataset my_file_vars
   A = FV1 + FVX
     FV1
     FVX
/TREE=USER
   in default dataset my_file_vars
   A = FV1 + FVX
/TREE=FILE
   FV1[d=my_file_vars]
   FVX[d=my_file_vars]
a is ready and AVAILABLE
************************
 
let a = fv1[d=1] - fv1[d=2]
vtree=file a
   FV1[d=my_file_vars]
   FV1[d=other_file_vars]
vtree=all a
   in default dataset my_file_vars
   A = FV1[D=1] - FV1[D=2]
     FV1
     FV1[d=other_file_vars]
vtree=all /d=1 a
   in default dataset my_file_vars
   A = FV1[D=1] - FV1[D=2]
     FV1
     FV1[d=other_file_vars]
vtree=all /d=2 a
   in default dataset other_file_vars
   A = FV1[D=1] - FV1[D=2]
     FV1[d=my_file_vars]
     FV1
********************************
 
! unrecognized variable names
go bn_vtree.sub noexist
/TREE=ALL
   in default dataset my_file_vars
   NOEXIST ??			<== UNKNOWN VARIABLE ******
/TREE=USER
   in default dataset my_file_vars
   NOEXIST ??			<== UNKNOWN VARIABLE ******
/TREE=FILE
   *unknown variable: NOEXIST
the problem is UNKNOWN VARIABLE: NOEXIST
************************
 
! unrecognized dataset
go bn_vtree.sub v[d=noexist]
/TREE=ALL
   in default dataset my_file_vars
   V[D=NOEXIST] ??			<== UNKNOWN DATASET ******
/TREE=USER
   in default dataset my_file_vars
   V[D=NOEXIST] ??			<== UNKNOWN DATASET ******
/TREE=FILE
   *unknown dataset: V[D=NOEXIST]
the problem is UNKNOWN DATASET: V[D=NOEXIST]
************************
 
! unrecognized dataset and variable
go bn_vtree.sub novar[d=nodset]
/TREE=ALL
   in default dataset my_file_vars
   NOVAR[D=NODSET] ??			<== UNKNOWN DATASET ******
/TREE=USER
   in default dataset my_file_vars
   NOVAR[D=NODSET] ??			<== UNKNOWN DATASET ******
/TREE=FILE
   *unknown dataset: NOVAR[D=NODSET]
the problem is UNKNOWN DATASET: NOVAR[D=NODSET]
************************
 
let b = noexist
go bn_vtree.sub b
/TREE=ALL
   in default dataset my_file_vars
   B = NOEXIST
     NOEXIST ??			<== UNKNOWN VARIABLE ******
/TREE=USER
   in default dataset my_file_vars
   B = NOEXIST
     NOEXIST ??			<== UNKNOWN VARIABLE ******
/TREE=FILE
   *unknown variable: NOEXIST
the problem is UNKNOWN VARIABLE: NOEXIST
************************
 
! grid-changing functions
go bn_vtree.sub RESHAPE(fvx,fvz)
/TREE=ALL
   in default dataset my_file_vars
   FVX
   FVZ
/TREE=USER
/TREE=FILE
   FVX[d=my_file_vars]
   FVZ[d=my_file_vars]
RESHAPE(fvx,fvz) is ready and AVAILABLE
************************
 
! file variable aux var
LET Zpts = Z[Z=0:500:100]
define axis/z/units=meters zax = zpts
LET fv1z = fv1[gz(fvz)=zpts] + fvx
go bn_vtree.sub fv1z
/TREE=ALL
   in default dataset my_file_vars
   FV1Z = FV1[GZ(FVZ)=ZPTS] + FVX
     FV1
       regrid to ZPTS = Z[Z=0:500:100]
       FVZ
     FVX
/TREE=USER
   in default dataset my_file_vars
   FV1Z = FV1[GZ(FVZ)=ZPTS] + FVX
       regrid to ZPTS = Z[Z=0:500:100]
/TREE=FILE
   FV1[d=my_file_vars]
   FVZ[d=my_file_vars]
   FVX[d=my_file_vars]
fv1z is ready and AVAILABLE
************************
 
! user-defined aux vars
let depth = z[g=fvz]
LET fv1z = fv1[gz(depth)=zpts] + fvx
go bn_vtree.sub fv1z
/TREE=ALL
   in default dataset my_file_vars
   FV1Z = FV1[GZ(DEPTH)=ZPTS] + FVX
     FV1
       regrid to ZPTS = Z[Z=0:500:100]
       DEPTH = Z[G=FVZ]
     FVX
/TREE=USER
   in default dataset my_file_vars
   FV1Z = FV1[GZ(DEPTH)=ZPTS] + FVX
       regrid to ZPTS = Z[Z=0:500:100]
       DEPTH = Z[G=FVZ]
/TREE=FILE
   FV1[d=my_file_vars]
   FVX[d=my_file_vars]
fv1z is ready and AVAILABLE
************************
 
let depth = z[g=fvz]+ 0*fvz[k=1]
LET fv1z = fv1[gz(depth)=zpts] + fvx
go bn_vtree.sub fv1z
/TREE=ALL
   in default dataset my_file_vars
   FV1Z = FV1[GZ(DEPTH)=ZPTS] + FVX
     FV1
       regrid to ZPTS = Z[Z=0:500:100]
       DEPTH = Z[G=FVZ]+ 0*FVZ[K=1]
         FVZ
     FVX
/TREE=USER
   in default dataset my_file_vars
   FV1Z = FV1[GZ(DEPTH)=ZPTS] + FVX
       regrid to ZPTS = Z[Z=0:500:100]
       DEPTH = Z[G=FVZ]+ 0*FVZ[K=1]
/TREE=FILE
   FV1[d=my_file_vars]
   FVZ[d=my_file_vars]
   FVX[d=my_file_vars]
fv1z is ready and AVAILABLE
************************
 
! unknown aux var
LET fv1z = fv1[gz(noexist)=zpts] + fvx
go bn_vtree.sub fv1z
/TREE=ALL
   in default dataset my_file_vars
   FV1Z = FV1[GZ(NOEXIST)=ZPTS] + FVX
       NOEXIST   (unknown auxiliary variable)
     FVX
/TREE=USER
   in default dataset my_file_vars
   FV1Z = FV1[GZ(NOEXIST)=ZPTS] + FVX
       NOEXIST   (unknown auxiliary variable)
/TREE=FILE
   *unknown auxiliary variable: NOEXIST
   FVX[d=my_file_vars]
the problem is UNKNOWN AUXILIARY VARIABLE: NOEXIST
************************
 
! unknown variable with known aux var
LET fv1z = noexist[gz(depth)=zpts] + fvx
go bn_vtree.sub fv1z
/TREE=ALL
   in default dataset my_file_vars
   FV1Z = NOEXIST[GZ(DEPTH)=ZPTS] + FVX
     NOEXIST[GZ(DEPTH)=ZPTS] ??			<== UNKNOWN VARIABLE ******
       regrid to ZPTS = Z[Z=0:500:100]
       DEPTH = Z[G=FVZ]+ 0*FVZ[K=1]
         FVZ
     FVX
/TREE=USER
   in default dataset my_file_vars
   FV1Z = NOEXIST[GZ(DEPTH)=ZPTS] + FVX
     NOEXIST[GZ(DEPTH)=ZPTS] ??			<== UNKNOWN VARIABLE ******
       regrid to ZPTS = Z[Z=0:500:100]
       DEPTH = Z[G=FVZ]+ 0*FVZ[K=1]
/TREE=FILE
   *unknown variable: NOEXIST[GZ(DEPTH)=ZPTS]
   FVZ[d=my_file_vars]
   FVX[d=my_file_vars]
the problem is UNKNOWN VARIABLE: NOEXIST[GZ(DEPTH)=ZPTS]
************************
 
! unknown variable with unknown aux var
LET fv1z = noexist[gz(unknown_aux)=zpts] + fvx
go bn_vtree.sub fv1z
/TREE=ALL
   in default dataset my_file_vars
   FV1Z = NOEXIST[GZ(UNKNOWN_AUX)=ZPTS] + FVX
     NOEXIST[GZ(UNKNOWN_AUX)=ZPTS] ??			<== UNKNOWN VARIABLE ******
       regrid to ZPTS = Z[Z=0:500:100]
       UNKNOWN_AUX   (unknown auxiliary variable)
     FVX
/TREE=USER
   in default dataset my_file_vars
   FV1Z = NOEXIST[GZ(UNKNOWN_AUX)=ZPTS] + FVX
     NOEXIST[GZ(UNKNOWN_AUX)=ZPTS] ??			<== UNKNOWN VARIABLE ******
       regrid to ZPTS = Z[Z=0:500:100]
       UNKNOWN_AUX   (unknown auxiliary variable)
/TREE=FILE
   *unknown variable: NOEXIST[GZ(UNKNOWN_AUX)=ZPTS]
   *unknown auxiliary variable: UNKNOWN_AUX
   FVX[d=my_file_vars]
the problem is UNKNOWN VARIABLE: NOEXIST[GZ(UNKNOWN_AUX)=ZPTS]
************************
 
! aggregate (ensemble) dataset of file variables
ENSEMBLE my_agg = my_file_vars, other_file_vars, another_file_vars
go bn_vtree.sub fv1
/TREE=ALL
   in default dataset my_agg
   FV1   (aggregate variable)
     FV1[d=my_file_vars]
     FV1[d=other_file_vars]
     FV1[d=another_file_vars]
/TREE=USER
   in default dataset my_agg
   FV1   (aggregate variable)
/TREE=FILE
 
   FV1[d=my_file_vars]
   FV1[d=other_file_vars]
   FV1[d=another_file_vars]
fv1 is ready and AVAILABLE
************************
 
! aggregation in which some members are uvars
let/d=other_file_vars   fvx = fv1 + x[gx=fvx[d=1],i=1:3]
let/d=another_file_vars fvx = 2*fv1 + x[gx=fvx[d=1],i=1:3]
ENSEMBLE my_uvar_agg = my_file_vars, other_file_vars, another_file_vars
go bn_vtree.sub fvx
/TREE=ALL
   in default dataset my_uvar_agg
   FVX   (aggregate variable)
     FVX[d=my_file_vars]
     FVX[d=other_file_vars] = FV1 + X[GX=FVX[D=1],I=1:3]
       FV1[d=other_file_vars]
     FVX[d=another_file_vars] = 2*FV1 + X[GX=FVX[D=1],I=1:3]
       FV1[d=another_file_vars]
/TREE=USER
   in default dataset my_uvar_agg
   FVX   (aggregate variable)
     FVX[d=other_file_vars] = FV1 + X[GX=FVX[D=1],I=1:3]
     FVX[d=another_file_vars] = 2*FV1 + X[GX=FVX[D=1],I=1:3]
/TREE=FILE
 
   FVX[d=my_file_vars]
   FV1[d=other_file_vars]
   FV1[d=another_file_vars]
fvx is ready and AVAILABLE
************************
 
! recursions
! ... a circular parent dependency is a recursion; sibling dependency is not
let p0 = s1 + p1
let p1 = s2 + p2
let p2 = s3 + p3
let p3 = p1 + S3
go bn_vtree.sub p0    ! recursion
/TREE=ALL
   in default dataset my_uvar_agg
   P0 = S1 + P1
     S1 ??			<== UNKNOWN VARIABLE ******
     P1 = S2 + P2
       S2 ??			<== UNKNOWN VARIABLE ******
       P2 = S3 + P3
         S3 ??			<== UNKNOWN VARIABLE ******
         P3 = P1 + S3
           P1 =   *** WARNING: RECURSIVE DEFINITION.  See above
           S3 ??			<== UNKNOWN VARIABLE ******
/TREE=USER
   in default dataset my_uvar_agg
   P0 = S1 + P1
     S1 ??			<== UNKNOWN VARIABLE ******
     P1 = S2 + P2
       S2 ??			<== UNKNOWN VARIABLE ******
       P2 = S3 + P3
         S3 ??			<== UNKNOWN VARIABLE ******
         P3 = P1 + S3
           P1 =   *** WARNING: RECURSIVE DEFINITION.  See above
           S3 ??			<== UNKNOWN VARIABLE ******
/TREE=FILE
   *unknown variable: S1
   *unknown variable: S2
   *unknown variable: S3
   *unknown variable: S3
the problem is ILLEGAL RECURSIVE VARIABLES: P1
************************
let p3 = s1 + S3
go bn_vtree.sub p0    ! ok
/TREE=ALL
   in default dataset my_uvar_agg
   P0 = S1 + P1
     S1 ??			<== UNKNOWN VARIABLE ******
     P1 = S2 + P2
       S2 ??			<== UNKNOWN VARIABLE ******
       P2 = S3 + P3
         S3 ??			<== UNKNOWN VARIABLE ******
         P3 = S1 + S3
           S1 ??			<== UNKNOWN VARIABLE ******
           S3 ??			<== UNKNOWN VARIABLE ******
/TREE=USER
   in default dataset my_uvar_agg
   P0 = S1 + P1
     S1 ??			<== UNKNOWN VARIABLE ******
     P1 = S2 + P2
       S2 ??			<== UNKNOWN VARIABLE ******
       P2 = S3 + P3
         S3 ??			<== UNKNOWN VARIABLE ******
         P3 = S1 + S3
           S1 ??			<== UNKNOWN VARIABLE ******
           S3 ??			<== UNKNOWN VARIABLE ******
/TREE=FILE
   *unknown variable: S1
   *unknown variable: S2
   *unknown variable: S3
   *unknown variable: S1
   *unknown variable: S3
the problem is UNKNOWN VARIABLE: S1
************************
 
! suppressing duplicated siblings (twins)
let fv = fv1 + fv1 + fv1
let uv = fvx + fvx + fvx
show var/tree/d=my_file_vars    fv
   in default dataset my_file_vars
   FV = FV1 + FV1 + FV1
show var/tree/d=my_uvar_agg     fv
   in default dataset my_uvar_agg
   FV = FV1 + FV1 + FV1
     FV1   (aggregate variable)
show var/tree/d=other_file_vars uv
   in default dataset other_file_vars
   UV = FVX + FVX + FVX
     FVX = FV1 + X[GX=FVX[D=1],I=1:3]
show var/tree/d=my_uvar_agg     uv
   in default dataset my_uvar_agg
   UV = FVX + FVX + FVX
     FVX   (aggregate variable)
       FVX[d=other_file_vars] = FV1 + X[GX=FVX[D=1],I=1:3]
       FVX[d=another_file_vars] = 2*FV1 + X[GX=FVX[D=1],I=1:3]
***************************
 
! suppressing duplicates elsewhere in the family tree ("defined above")
let b = c
let c = 1
let v1 = a  + b + b^2
let v2 = v1 + b + a + a        ! a appears after v1
let v3 = a + v1 + b + a + a    ! a appears before v1
go bn_vtree.sub v2
/TREE=ALL
   in default dataset my_uvar_agg
   V2 = V1 + B + A + A
     V1 = A  + B + B^2
       A = FV1[D=1] - FV1[D=2]
         FV1[d=my_file_vars]
         FV1[d=other_file_vars]
       B = C
         C = 1
     B =  (defined above)
     A =  (defined above)
/TREE=USER
   in default dataset my_uvar_agg
   V2 = V1 + B + A + A
     V1 = A  + B + B^2
       A = FV1[D=1] - FV1[D=2]
       B = C
         C = 1
     B =  (defined above)
     A =  (defined above)
/TREE=FILE
   FV1[d=my_file_vars]
   FV1[d=other_file_vars]
v2 is ready and AVAILABLE
************************
go bn_vtree.sub v3
/TREE=ALL
   in default dataset my_uvar_agg
   V3 = A + V1 + B + A + A
     A = FV1[D=1] - FV1[D=2]
       FV1[d=my_file_vars]
       FV1[d=other_file_vars]
     V1 = A  + B + B^2
       A =  (defined above)
       B = C
         C = 1
     B =  (defined above)
/TREE=USER
   in default dataset my_uvar_agg
   V3 = A + V1 + B + A + A
     A = FV1[D=1] - FV1[D=2]
     V1 = A  + B + B^2
       A =  (defined above)
       B = C
         C = 1
     B =  (defined above)
/TREE=FILE
   FV1[d=my_file_vars]
   FV1[d=other_file_vars]
v3 is ready and AVAILABLE
************************
 
! collections of trees handled as a group
! display from large tree size to small, suppressing definitions already displayed
cancel var/all
let a = f
let b = fv1[d=my_file_vars]
let c = 1
let d = b + c
let e = 1
go bn_vtree.sub "a, b, c, noexist, d, e, fvx[d=my_file_vars]"
/TREE=ALL
   in default dataset my_uvar_agg
   D = B + C
     B = FV1[D=MY_FILE_VARS]
       FV1[d=my_file_vars]
     C = 1
   A = F
     F ??			<== UNKNOWN VARIABLE ******
   NOEXIST ??			<== UNKNOWN VARIABLE ******
   E = 1
   FVX[d=my_file_vars]
/TREE=USER
   in default dataset my_uvar_agg
   D = B + C
     B = FV1[D=MY_FILE_VARS]
     C = 1
   A = F
     F ??			<== UNKNOWN VARIABLE ******
   NOEXIST ??			<== UNKNOWN VARIABLE ******
   E = 1
/TREE=FILE
   *unknown variable: F
   FV1[d=my_file_vars]
   *unknown variable: NOEXIST
   FVX[d=my_file_vars]
the problem is UNKNOWN VARIABLE: F
************************
 
! reporting other errors in definitions
  set mode ignore
 
  ! unidentified grid
  let a = i[i=1:5]
  let b = a[g=noexist]
  go bn_vtree.sub b
/TREE=ALL
   in default dataset my_uvar_agg
   B = A[G=NOEXIST]
     A = I[I=1:5]
       regrid to NOEXIST ??		<== UNKNOWN GRID ******
/TREE=USER
   in default dataset my_uvar_agg
   B = A[G=NOEXIST]
     A = I[I=1:5]
       regrid to NOEXIST ??		<== UNKNOWN GRID ******
/TREE=FILE
   *unknown grid: NOEXIST
the problem is UNKNOWN GRID: NOEXIST
************************
  list b
 
  ! syntax error - format of longitude
  let c = a[x=45s]
  go bn_vtree.sub c
/TREE=ALL
   in default dataset my_uvar_agg
   C = A[X=45S]
     A[X=45S]   *** WARNING: ERROR IN DEFINITION
/TREE=USER
   in default dataset my_uvar_agg
   C = A[X=45S]
     A[X=45S]   *** WARNING: ERROR IN DEFINITION
/TREE=FILE
      *WARNING: syntax error: A[X=45S]
the problem is ERROR IN EXPRESSION: A[X=45S]
************************
  list c
 
  ! syntax error - extra comma
  let d = a[i=1,,j=2]
  go bn_vtree.sub d
/TREE=ALL
   in default dataset my_uvar_agg
   D = A[I=1,,J=2]
     A[I=1,,J=2]   *** WARNING: ERROR IN DEFINITION
/TREE=USER
   in default dataset my_uvar_agg
   D = A[I=1,,J=2]
     A[I=1,,J=2]   *** WARNING: ERROR IN DEFINITION
/TREE=FILE
      *WARNING: syntax error: A[I=1,,J=2]
the problem is ERROR IN EXPRESSION: A[I=1,,J=2]
************************
  list d
 
  ! syntax error - unknown pseudovariable
  let e = a[p=1]
  go bn_vtree.sub e
/TREE=ALL
   in default dataset my_uvar_agg
   E = A[P=1]
     A[P=1]   *** WARNING: ERROR IN DEFINITION
/TREE=USER
   in default dataset my_uvar_agg
   E = A[P=1]
     A[P=1]   *** WARNING: ERROR IN DEFINITION
/TREE=FILE
      *WARNING: syntax error: A[P=1]
the problem is ERROR IN EXPRESSION: A[P=1]
************************
  list e
 
  ! out of limit region -- not detectable as error, because grids are never determined
  let f = a[i=10]
  go bn_vtree.sub f
/TREE=ALL
   in default dataset my_uvar_agg
   F = A[I=10]
     A = I[I=1:5]
/TREE=USER
   in default dataset my_uvar_agg
   F = A[I=10]
     A = I[I=1:5]
/TREE=FILE
f is ready and AVAILABLE
************************
  list f
 
  set mode/last ignore
 
! dependency through attribute sharing (not yet implemented)
let a = fvz.long_name[d=1]
show var/tree a
   in default dataset my_uvar_agg
   A = FVZ.LONG_NAME[D=1]
let a = ..history[d=1]
show var/tree a
   in default dataset my_uvar_agg
   A = ..HISTORY[D=1]
 
! *****
! 12/14 addition to test regridding dependencies
go bn_vtree_regrid
! bn_vtree_regrid.jnl
! exercise 12/14 enhancements to display regrid target on a separate line
! updated 1/26/15 to exercise multiple regrid target outputs
! updated 2/23/15 to report target of regrid even when aux regridding occurs
! 5/2017 note that the fix for #2533 causes some duplicate  UNKNOWN GRID lines
 
! case 1: target grid known,   regridded variable known
let myvar = 1           ! var to be regridded is known
let gvar = x[x=1:5]    ! target regridding var is known
let a = myvar[g=gvar] + unvar + kvar
let kvar = 1  ! known var
! unvar is always unknown
sho var/tree a
   in default dataset my_uvar_agg
   A = MYVAR[G=GVAR] + UNVAR + KVAR
     MYVAR = 1
       regrid to GVAR = X[X=1:5]
     UNVAR ??			<== UNKNOWN VARIABLE ******
     KVAR = 1
 
! case 2: target grid known,   regridded variable unknown
canc var/all
! myvar unknown
let gvar = x[x=1:5]    ! target regridding var is known
let a = myvar[g=gvar] + unvar + kvar
let kvar = 1  ! known var
! unvar is always unknown
sho var/tree a
   in default dataset my_uvar_agg
   A = MYVAR[G=GVAR] + UNVAR + KVAR
     MYVAR[G=GVAR] ??			<== UNKNOWN VARIABLE ******
       regrid to GVAR = X[X=1:5]
     UNVAR ??			<== UNKNOWN VARIABLE ******
     KVAR = 1
 
! case 3: target grid unknown, regridded variable known
canc var/all
let myvar = 1           ! var to be regridded is known
! gvar unknown
let a = myvar[g=gvar] + unvar + kvar
let kvar = 1  ! known var
! unvar is always unknown
sho var/tree a
   in default dataset my_uvar_agg
   A = MYVAR[G=GVAR] + UNVAR + KVAR
     MYVAR = 1
       regrid to GVAR ??		<== UNKNOWN GRID ******
     UNVAR ??			<== UNKNOWN VARIABLE ******
     KVAR = 1
 
! case 4: target grid unknown, regridded variable unknown
canc var/all
! myvar unknown
! gvar  unknown
let a = myvar[g=gvar] + unvar + kvar
let kvar = 1  ! known var
! unvar is always unknown
sho var/tree a
   in default dataset my_uvar_agg
   A = MYVAR[G=GVAR] + UNVAR + KVAR
     MYVAR[G=GVAR] ??			<== UNKNOWN VARIABLE ******
       regrid to GVAR ??		<== UNKNOWN GRID ******
     UNVAR ??			<== UNKNOWN VARIABLE ******
     KVAR = 1
 
! **************************************
! same tests but now with a dataset named with the target grid
use coads_climatology
use levitus_climatology   ! default to d=2
 
! case 1: target grid known,   regridded variable known
canc var/all
let myvar = 1           ! var to be regridded is known
let a = myvar[g=sst[d=1]] + unvar + kvar
let kvar = 1  ! known var
! unvar is always unknown
sho var/tree=all a
   in default dataset levitus_climatology
   A = MYVAR[G=SST[D=1]] + UNVAR + KVAR
     MYVAR = 1
       regrid to SST[D=1] ??		<== UNKNOWN GRID ******
     UNVAR ??			<== UNKNOWN VARIABLE ******
     KVAR = 1
 
! case 2: target grid known,   regridded variable unknown
canc var/all
! myvar unknown
let a = myvar[g=sst[d=1]] + unvar + kvar
let kvar = 1  ! known var
! unvar is always unknown
sho var/tree=all a
   in default dataset levitus_climatology
   A = MYVAR[G=SST[D=1]] + UNVAR + KVAR
     MYVAR[G=SST[D=1]] ??			<== UNKNOWN VARIABLE ******
       regrid to SST[D=1] ??		<== UNKNOWN GRID ******
     UNVAR ??			<== UNKNOWN VARIABLE ******
     KVAR = 1
 
! case 3a: target grid unknown, regridded variable known
canc var/all
let myvar = 1           ! var to be regridded is known
! gvar unknown
let a = myvar[g=gvar[d=1]] + unvar + kvar
let kvar = 1  ! known var
! unvar is always unknown
sho var/tree=all a
   in default dataset levitus_climatology
   A = MYVAR[G=GVAR[D=1]] + UNVAR + KVAR
     MYVAR = 1
       regrid to GVAR[D=1] ??		<== UNKNOWN GRID ******
     UNVAR ??			<== UNKNOWN VARIABLE ******
     KVAR = 1
 
! case 3b: target grid unknown cuz of dataset, regridded variable known
canc var/all
let myvar = 1           ! var to be regridded is known
! gvar unknown
let a = myvar[g=sst[d=bad_dset]] + unvar + kvar
let kvar = 1  ! known var
! unvar is always unknown
sho var/tree=all a
   in default dataset levitus_climatology
   A = MYVAR[G=SST[D=BAD_DSET]] + UNVAR + KVAR
     MYVAR[G=SST[D=BAD_DSET]] ??			<== UNKNOWN DATASET ******
     UNVAR ??			<== UNKNOWN VARIABLE ******
     KVAR = 1
 
! case 4: target grid unknown, regridded variable unknown
canc var/all
! myvar unknown
! gvar  unknown
let a = myvar[g=gvar[d=1]] + unvar + kvar
let kvar = 1  ! known var
! unvar is always unknown
sho var/tree=all a
   in default dataset levitus_climatology
   A = MYVAR[G=GVAR[D=1]] + UNVAR + KVAR
     MYVAR[G=GVAR[D=1]] ??			<== UNKNOWN VARIABLE ******
       regrid to GVAR[D=1] ??		<== UNKNOWN GRID ******
     UNVAR ??			<== UNKNOWN VARIABLE ******
     KVAR = 1
 
! *******************
! file variable listing, only
canc var/all
let myvar = 1
let fvar = airt[d=1]
let kvar = 1  ! known var
* /TREE=FILE with know regrid target
let a = myvar[g=sst[d=1]] + fvar + kvar
sho var/tree=file a
   *unknown grid: SST[D=1]
   *unknown variable: AIRT[D=1]
 
* /TREE=FILE with unknow regrid target
let a = myvar[g=unknown] + fvar + kvar
sho var/tree=file a
   *unknown grid: UNKNOWN
   *unknown variable: AIRT[D=1]
 
! ********************
! regridding to multiple targets
 
define axis/x=140e:160e:1 x1
define axis/y=20s:20n:1   y1
LET myvar = X[gx=x1] + Y[gy=y1]
 
define axis/y=5s:5n:.5 yp5
 
go bn_vtree.sub myvar[g=temp]
/TREE=ALL
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to TEMP
/TREE=USER
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
/TREE=FILE
   regrid to TEMP[d=levitus_climatology]
myvar[g=temp] is ready and AVAILABLE
************************
 
! second target *is* a named variable
go bn_vtree.sub myvar[g=temp,gy=sst[d=1]]
/TREE=ALL
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to TEMP
     regrid to SST[D=1] ??		<== UNKNOWN GRID ******
/TREE=USER
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to SST[D=1] ??		<== UNKNOWN GRID ******
/TREE=FILE
   regrid to TEMP[d=levitus_climatology]
   *unknown grid: SST[D=1]
the problem is UNKNOWN GRID: SST[D=1]
************************
go bn_vtree.sub myvar[gx=temp,gy=sst[d=1]]
/TREE=ALL
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to TEMP
     regrid to SST[D=1] ??		<== UNKNOWN GRID ******
/TREE=USER
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to SST[D=1] ??		<== UNKNOWN GRID ******
/TREE=FILE
   regrid to TEMP[d=levitus_climatology]
   *unknown grid: SST[D=1]
the problem is UNKNOWN GRID: SST[D=1]
************************
go bn_vtree.sub myvar[gy=sst[d=1],gx=temp]  ! reverse order, only
/TREE=ALL
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to SST[D=1] ??		<== UNKNOWN GRID ******
     regrid to TEMP
/TREE=USER
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to SST[D=1] ??		<== UNKNOWN GRID ******
/TREE=FILE
   *unknown grid: SST[D=1]
   regrid to TEMP[d=levitus_climatology]
the problem is UNKNOWN GRID: SST[D=1]
************************
 
! second target is not a named variable
go bn_vtree.sub myvar[g=temp,gy=yp5]
/TREE=ALL
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to TEMP
/TREE=USER
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
/TREE=FILE
   regrid to TEMP[d=levitus_climatology]
myvar[g=temp,gy=yp5] is ready and AVAILABLE
************************
go bn_vtree.sub myvar[gx=temp,gy=yp5]
/TREE=ALL
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to TEMP
/TREE=USER
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
/TREE=FILE
   regrid to TEMP[d=levitus_climatology]
myvar[gx=temp,gy=yp5] is ready and AVAILABLE
************************
go bn_vtree.sub myvar[g=temp,y=5s:5n:.5]
/TREE=ALL
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to TEMP
/TREE=USER
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
/TREE=FILE
   regrid to TEMP[d=levitus_climatology]
myvar[g=temp,y=5s:5n:.5] is ready and AVAILABLE
************************
go bn_vtree.sub myvar[g=sst[d=1],y=5s:5n:.5]
/TREE=ALL
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to SST[D=1] ??		<== UNKNOWN GRID ******
/TREE=USER
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to SST[D=1] ??		<== UNKNOWN GRID ******
/TREE=FILE
   *unknown grid: SST[D=1]
the problem is UNKNOWN GRID: SST[D=1]
************************
 
! multiple targets, including unknown variables
go bn_vtree.sub myvar[g=temp,gy=mybad]
/TREE=ALL
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to TEMP
     regrid to MYBAD ??		<== UNKNOWN GRID ******
/TREE=USER
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to MYBAD ??		<== UNKNOWN GRID ******
/TREE=FILE
   regrid to TEMP[d=levitus_climatology]
   *unknown grid: MYBAD
the problem is UNKNOWN GRID: MYBAD
************************
go bn_vtree.sub myvar[g=mybad,gy=temp]
/TREE=ALL
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to MYBAD ??		<== UNKNOWN GRID ******
     regrid to TEMP
/TREE=USER
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to MYBAD ??		<== UNKNOWN GRID ******
/TREE=FILE
   *unknown grid: MYBAD
   regrid to TEMP[d=levitus_climatology]
the problem is UNKNOWN GRID: MYBAD
************************
go bn_vtree.sub myvar[gy=temp,g=mybad[d=1]]
/TREE=ALL
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to TEMP
     regrid to MYBAD[D=1] ??		<== UNKNOWN GRID ******
/TREE=USER
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to MYBAD[D=1] ??		<== UNKNOWN GRID ******
/TREE=FILE
   regrid to TEMP[d=levitus_climatology]
   *unknown grid: MYBAD[D=1]
the problem is UNKNOWN GRID: MYBAD[D=1]
************************
go bn_vtree.sub myvar[g=temp,gx=mybad[d=1],gy=mybad2]! distinct unknown targets
/TREE=ALL
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to TEMP
     regrid to MYBAD[D=1] ??		<== UNKNOWN GRID ******
     regrid to MYBAD2 ??		<== UNKNOWN GRID ******
/TREE=USER
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to MYBAD[D=1] ??		<== UNKNOWN GRID ******
     regrid to MYBAD2 ??		<== UNKNOWN GRID ******
/TREE=FILE
   regrid to TEMP[d=levitus_climatology]
   *unknown grid: MYBAD[D=1]
   *unknown grid: MYBAD2
the problem is UNKNOWN GRID: MYBAD[D=1]
************************
go bn_vtree.sub myvar[gx=temp,gy=temp,g=mybad[d=1]]  ! dup known targets
/TREE=ALL
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to TEMP
     regrid to TEMP
     regrid to MYBAD[D=1] ??		<== UNKNOWN GRID ******
/TREE=USER
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to MYBAD[D=1] ??		<== UNKNOWN GRID ******
/TREE=FILE
   regrid to TEMP[d=levitus_climatology]
   *unknown grid: MYBAD[D=1]
the problem is UNKNOWN GRID: MYBAD[D=1]
************************
go bn_vtree.sub myvar[g=temp,gx=mybad,gy=mybad]      ! dup unknown suppressed
/TREE=ALL
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to TEMP
     regrid to MYBAD ??		<== UNKNOWN GRID ******
     regrid to MYBAD ??		<== UNKNOWN GRID ******
/TREE=USER
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to MYBAD ??		<== UNKNOWN GRID ******
     regrid to MYBAD ??		<== UNKNOWN GRID ******
/TREE=FILE
   regrid to TEMP[d=levitus_climatology]
   *unknown grid: MYBAD
   *unknown grid: MYBAD
the problem is UNKNOWN GRID: MYBAD
************************
go bn_vtree.sub myvar[g=temp,gx=mybad[d=2],gy=mybad] ! dup unknown missed
/TREE=ALL
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to TEMP
     regrid to MYBAD[D=2] ??		<== UNKNOWN GRID ******
     regrid to MYBAD ??		<== UNKNOWN GRID ******
/TREE=USER
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to MYBAD[D=2] ??		<== UNKNOWN GRID ******
     regrid to MYBAD ??		<== UNKNOWN GRID ******
/TREE=FILE
   regrid to TEMP[d=levitus_climatology]
   *unknown grid: MYBAD[D=2]
   *unknown grid: MYBAD
the problem is UNKNOWN GRID: MYBAD[D=2]
************************
go bn_vtree.sub myvar[g=temp,gx=mybad,gy='MYBAD']    ! dup unknown missed
/TREE=ALL
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to TEMP
     regrid to MYBAD ??		<== UNKNOWN GRID ******
     regrid to 'MYBAD' ??		<== UNKNOWN GRID ******
/TREE=USER
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to MYBAD ??		<== UNKNOWN GRID ******
     regrid to 'MYBAD' ??		<== UNKNOWN GRID ******
/TREE=FILE
   regrid to TEMP[d=levitus_climatology]
   *unknown grid: MYBAD
   *unknown grid: 'MYBAD'
the problem is UNKNOWN GRID: MYBAD
************************
go bn_vtree.sub myvar[g=myvar,gy=mybad]
/TREE=ALL
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to MYBAD ??		<== UNKNOWN GRID ******
/TREE=USER
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to MYBAD ??		<== UNKNOWN GRID ******
/TREE=FILE
   *unknown grid: MYBAD
the problem is UNKNOWN GRID: MYBAD
************************
go bn_vtree.sub myvar[gy=yp5,g=mybad]
/TREE=ALL
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to MYBAD ??		<== UNKNOWN GRID ******
/TREE=USER
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to MYBAD ??		<== UNKNOWN GRID ******
/TREE=FILE
   *unknown grid: MYBAD
the problem is UNKNOWN GRID: MYBAD
************************
go bn_vtree.sub myvar[g=mybad,y=5s:5n:.5]
/TREE=ALL
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to MYBAD ??		<== UNKNOWN GRID ******
/TREE=USER
   in default dataset levitus_climatology
   MYVAR = X[GX=X1] + Y[GY=Y1]
     regrid to MYBAD ??		<== UNKNOWN GRID ******
/TREE=FILE
   *unknown grid: MYBAD
the problem is UNKNOWN GRID: MYBAD
************************
 
! 2/15 additions -- auxiliary variable regridding
USE levitus_climatology
LET myzvar = Z[Z=100:500:100]
DEFINE AXIS/z/units=meters zax = myzvar
SET REGION/i=101:102/j=41:42
 
LET/D=levitus_climatology depth = z[g=temp]+ 0*temp[k=1]
 
! valid aux var and target variable
LET tempz = temp[gz(depth)=myzvar]
vtree=all tempz
   in default dataset levitus_climatology
   TEMPZ = TEMP[GZ(DEPTH)=MYZVAR]
     TEMP
       regrid to MYZVAR = Z[Z=100:500:100]
       DEPTH = Z[G=TEMP]+ 0*TEMP[K=1]
         TEMP
 
! valid aux var.  Target is axis name
LET tempz1 = temp[gz(depth)=zax]
vtree=all tempz1
   in default dataset levitus_climatology
   TEMPZ1 = TEMP[GZ(DEPTH)=ZAX]
     TEMP
       DEPTH = Z[G=TEMP]+ 0*TEMP[K=1]
         TEMP
 
! valid aux var.  Target is unknown
LET tempz2 = temp[gz(depth)=unknown_target]
vtree=all tempz2
   in default dataset levitus_climatology
   TEMPZ2 = TEMP[GZ(DEPTH)=UNKNOWN_TARGET]
     TEMP
       regrid to UNKNOWN_TARGET ??		<== UNKNOWN GRID ******
       DEPTH = Z[G=TEMP]+ 0*TEMP[K=1]
         TEMP
 
! --- unknown aux var, valid target ---
! When an unknown auxiliary variable error occurs it suppresses
! the reporting of both the variable being regridded and the regrid target
! The underlying issue is that GET_VAR_CONTEXT (called from is_dependencies.F)
! can return only a single error status
! If it contains ferr_unknown_auxvar, then the success or failure of other
! parts of the context processing are unknown.
! One could kludge the code to find a way around this, but the violence
! required is not justified in order to fix this small loss in error reporting.
LET tempz3 = temp[gz(unknown_aux)=myzvar]
vtree=all tempz3
   in default dataset levitus_climatology
   TEMPZ3 = TEMP[GZ(UNKNOWN_AUX)=MYZVAR]
       UNKNOWN_AUX   (unknown auxiliary variable)
 
! a syntax error leads to a similar behavior
LET tempz3a = temp[gz(unknown_aux)=myzvar,SYNTAX_ERROR]
vtree=all tempz3a
   in default dataset levitus_climatology
   TEMPZ3A = TEMP[GZ(UNKNOWN_AUX)=MYZVAR,SYNTAX_ERROR]
     TEMP[GZ(UNKNOWN_AUX)=MYZVAR,SYNTAX_ERROR]   *** WARNING: ERROR IN DEFINITION
 
! similar behavior here:  the unknown_target does not get reported
LET tempz4 = temp[gz(unknown_aux)=unknown_target]
vtree=all tempz4
   in default dataset levitus_climatology
   TEMPZ4 = TEMP[GZ(UNKNOWN_AUX)=UNKNOWN_TARGET]
       UNKNOWN_AUX   (unknown auxiliary variable)
 
 
*** Running ferret script: bn686_bug_fixes.jnl
! bn686_bug_fixes
! test various fixes that went into version 6.86
! 11/2013 ACM
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err685_ribbon_by_val
! err685_ribbon_by_val.jnl
! 11/21/2013
! See ticket 2111: Palette that is by_lev or by_value
! in combination with a /missing=  caused errors
 
us coads_climatology
let ypts = y[gy=sst]
let xpts = sst[L=1,x=150]
let fpts = sst[L=1,x=150]
plot/vs/line/thick/ribbon/MISS=black/PAL=ocean_temp xpts, ypts, fpts
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err685_ppl_palette
! err685_ppl_palette.jnl
! Further fix for ticket 2049. If the palette or pattern file
! name given in PPL SHASET SPECTRUM=  or  PPL PATSET PATTERN=
! started with a space, the command failed.
 
pal  rnb2
use levitus_climatology; shade/k=1 temp
 
pal  bluescale.spk
use levitus_climatology; shade/k=1 temp
 
pattern    4patterns
use coads_climatology
shade/pal=black/lev=(10,30,5,-3)/key/L=1 sst
 
pal   default
pattern   solid
 
fill sst[l=@ave]
pattern   tiny_squares.pat
fill/lev=(15,21,2)/over/nolab/pal=black sst[l=@ave]
 
! restore defaults
palette default
pattern solid
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err685_show_grid_e
! err685_show_grid_e.jnl
! See ticket 2122
! SHOW GRID/E and SHOW GRID/F failed
 
def ax /e=1:12:1 ense
def ax /f=1:10:1 verf
def ax /t=1980:2013:1 yrt
def grid /e=ense/t=yrt/f=verf gensy
sh grid gensy
    GRID GENSY
 name       axis              # pts   start                end
 normal    X
 normal    Y
 normal    Z
 YRT       T                   34 r   1980                 2013
 ENSE      E                   12 r   1                    12
 VERF      F                   10 r   1                    10
sh grid /e gensy
    GRID GENSY
 name       axis              # pts   start                end
 normal    X
 normal    Y
 normal    Z
 YRT       T                   34 r   1980                 2013
 ENSE      E                   12 r   1                    12
 VERF      F                   10 r   1                    10
 
       M     E                       EBOX          EBOXLO
       1>  1                         1          0.5
       2>  2                         1          1.5
       3>  3                         1          2.5
       4>  4                         1          3.5
       5>  5                         1          4.5
       6>  6                         1          5.5
       7>  7                         1          6.5
       8>  8                         1          7.5
       9>  9                         1          8.5
      10>  10                        1          9.5
      11>  11                        1          10.5
      12>  12                        1          11.5
sh grid /f gensy
    GRID GENSY
 name       axis              # pts   start                end
 normal    X
 normal    Y
 normal    Z
 YRT       T                   34 r   1980                 2013
 ENSE      E                   12 r   1                    12
 VERF      F                   10 r   1                    10
 
       N     F                       FBOX          FBOXLO
       1>  1                         1          0.5
       2>  2                         1          1.5
       3>  3                         1          2.5
       4>  4                         1          3.5
       5>  5                         1          4.5
       6>  6                         1          5.5
       7>  7                         1          6.5
       8>  8                         1          7.5
       9>  9                         1          8.5
      10>  10                        1          9.5
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err685_lowercaseAxis
! err685_lowercaseAxis.jnl
! Ticket  2126
! If the axis name is lower case in the file, and we do SET AXIS commands
! to reset units etc, the axis is "lost" to commands like SHOW AXIS
 
use lowercaseTime.nc
sh dat
     currently SET data sets:
    1> ./data/lowercaseTime.nc  (default)
 name     title                             I         J         K         L
 AA                                        ...       ...       ...       1:15
 BB                                        ...       ...       ...       1:8
 
! This axis has uppercase in the file
set axis/t0=1-jan-2001/units=days uppercasetime
 
! All this was correct
show axis uppercasetime
 name       axis              # pts   start                end
 UPPERCASETIME TIME             8 r   02-JAN-2001 00:00    09-JAN-2001 00:00
T0 = 1-JAN-2001
   Axis span (to cell edges) = 8
show grid bb
    GRID GHC2
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 UPPERCASETIME TIME             8 r   02-JAN-2001 00:00    09-JAN-2001 00:00   full
 
! This variable has axis time, lowercase in the file
sh grid aa
    GRID GHC1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TIME      T                   15 r   1                    15                  full
set axis/t0=1-jan-2001/units=days time
 
! showed no output
show axis time
 name       axis              # pts   start                end
 TIME      TIME                15 r   02-JAN-2001 00:00    16-JAN-2001 00:00
T0 = 1-JAN-2001
   Axis span (to cell edges) = 15
 
! The axis did get changed but is inconsistently listed in the
! internal arrays that store axis info.
 
list/L=1:5 aa
             VARIABLE : AA
             FILENAME : lowercaseTime.nc
             SUBSET   : 5 points (TIME)
 02-JAN-2001 00 / 1:  1.000
 03-JAN-2001 00 / 2:  2.000
 04-JAN-2001 00 / 3:  3.000
 05-JAN-2001 00 / 4:  4.000
 06-JAN-2001 00 / 5:  5.000
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err685_redefine_uvar_att
! err685_redefine_uvar_att.jnl
! ticket 2127 Redefine an attribute for a
!   user variable, with bounds-checking on,
!   returned a runtime error.
 
let a = 1
define att/type=string  a.ival = 99
define att/type=STRING  a.ival = 99
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err685_use_no_extension
! Ticket 2128: if no extension, we should try .cdf, .nc, .des
!  but .des was not being tried.
 
! The directory contains files with all three extensions
sp ls data/duplicate.*
data/duplicate.cdf
data/duplicate.des
data/duplicate.nc
 
! The one that's used is .nc
use duplicate
sh dat
     currently SET data sets:
    1> ./data/duplicate.nc  (default)
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:1       1:10      ...       1:3
 
 
set mode ignore
! Specify a nonexistent file with an extension
use nosuchfile.nc
 
! Specify a nonexistent file, no extension
use nosuchfile
 
! There is a file called snoopy.dat but not .cdf, .nc, or .des
! Check for correct error messages.
use snoopy
 
use snoopy.dat
 
set mode/last ignore
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err685_samplexy
! err685_samplexy.jnl
! Fix for ticket 2137. out-of-bounds error
! sending sub-range of variable into samplexy
 
! running this, with bounds-checking on, resulted in a bounds error.
use coads_climatology
let lon = {300,301,302}
let lat = {11,12,13}
list  samplexy(sst[x=290:310,y=0:20], lon, lat)
             VARIABLE : SAMPLEXY(SST[X=290:310,Y=0:20], LON, LAT)
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 by 3 points (X-TIME)
                     1      2      3    
                     1      2      3
 16-JAN      / 1:  26.84  26.77  26.66
 15-FEB      / 2:  26.60  26.52  26.35
 17-MAR      / 3:  26.68  26.61  26.49
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err685_shade_set
! err685_shade_set.jnl
!
! test fix for bug 883
! Inside a SHADE/SET, and several other plot commands,
! if we do an operation that evalueates an expression, the
! plot is then blank.
 
can dat/all
 
can view
use climatological_axes
def axis/t=1-jan-2000:31-jan-2010:1/units=days timax
let tseries = t[gt=timax]
! evaluate info about an expression, with a different grid than the
! epression being SHADED, inside a SHADE/SET
shade/set tseries*z[gz=1:5:1]
say `tseries[GT=month_irreg@mod],r=tunit`
 !-> MESSAGE/CONTINUE DAYS
DAYS
ppl shade !GAVE A BLANK PLOT
 
shade/set tseries*z[gz=1:5:1]
ppl shade !but this works
 
shade/set tseries*z[gz=1:5:1]
say `tseries,r=tunit`
 !-> MESSAGE/CONTINUE DAYS
DAYS
ppl shade !and this works
 
let a = tseries*z[gz=1:5:1]
shade/set a
say `tseries[GT=month_irreg@mod],r=tunit`
 !-> MESSAGE/CONTINUE DAYS
DAYS
ppl shade !and this works
 
shade/title="`tseries[GT=month_irreg],r=tunit`" tseries*z[gz=1:5:1]
 !-> shade/title="DAYS" tseries*z[gz=1:5:1]
 
can var/all; can mem
can axis timax
set mode/last logo
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err686_individual_levels
! err686_individual_levels.jnl
! Ticket 2142
! The bug appeared just in a beta release of v686. The behavior needs a test.
 
use coads_climatology
 
cancel symbol lev*
shade/l=1/lev=(10)(20)(30)(40) sst
 
! The levels should be min,max,del = 10,40,10
sh sym lev*
LEV_TEXT = "(10)(20)(30)(40)"
LEV_MIN = "10"
LEV_MAX = "40"
LEV_NUM = "3"
LEV_DEL = "10"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "10,20,30,40"
 
cancel symbol lev*
contour/l=1/lev=(10)(15)(20)(25)(30) sst
sh sym lev*
LEV_TEXT = "(10)(15)(20)(25)(30)"
LEV_MIN = "10"
LEV_MAX = "30"
LEV_NUM = "4"
LEV_DEL = "5"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "10,15,20,25,30"
 
*** Running ferret script: bn_long_symnames.jnl
! bn_long_symnames.jnl
! *ACM* 11/22/2013
! Allow longer names for Ferret symbols
 
! Define a couple of symbols longer than previous limit of 30
define symbol ferret_temperature_equilibrator_min = -2
define symbol ferret_temperature_equilibrator_max = 35
 
! SHOW
show symbol ferret_temperature_*
FERRET_TEMPERATURE_EQUILIBRATOR_MIN = "-2"
FERRET_TEMPERATURE_EQUILIBRATOR_MAX = "35"
 
! CANCEL
can sym ferret_temperature_equilibrator_max
show symbol ferret_temperature_*
FERRET_TEMPERATURE_EQUILIBRATOR_MIN = "-2"
 
! DEFINE and redefine
define symbol ferret_temperature_equilibrator_min = 0
define symbol ferret_temperature_equilibrator_max = 35
 
can sym *max
 
show symbol ferret_temperature_*
FERRET_TEMPERATURE_EQUILIBRATOR_MIN = "0"
 
 
! bn_symbols had a line to
! demonstrate the 30 character cap on symbol length
! Lets demonstrate the 120 character cap on symbol length
define symbol q23456789012345678901234567890q23456789012345678901234567890q23456789012345678901234567890q23456789012345678901234567890 = 5
define symbol q23456789012345678901234567890q23456789012345678901234567890q23456789012345678901234567890q23456789012345678901234567xxxaaaa = 6
show symbol q*
Q23456789012345678901234567890Q23456789012345678901234567890Q23456789012345678901234567890Q23456789012345678901234567890 = "5"
Q23456789012345678901234567890Q23456789012345678901234567890Q23456789012345678901234567890Q23456789012345678901234567XXX = "6"
*** Running ferret script: bn_strdim.jnl
! bn_strdim.jnl
! Keep the string dimension name and size from the intput file
! on writing the string variable.
 
use strdimfile.nc
 
! Previously Ferret created the string dimension name and length
! Now it keeps the file's name and length.
 
save/file=a.nc/clobber labels
sp ncdump -h a.nc
netcdf a {
dimensions:
	ENSEMBLE = 3 ;
	maxStrlen64 = 64 ;
variables:
	double ENSEMBLE(ENSEMBLE) ;
		ENSEMBLE:long_name = "Ensemble of Realizations" ;
		ENSEMBLE:axis = "E" ;
		ENSEMBLE:point_spacing = "even" ;
	char LABELS(ENSEMBLE, maxStrlen64) ;
		LABELS:long_name = "Realizations" ;
		LABELS:history = "From http://dunkel.pmel.noaa.gov:8930/thredds/dodsC/data/atmos3.ncml" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
! The behavior is unchanged for user-defined variables
! Dimension name is created from STRING and the length
! length is the max length of strings in the variable.
 
let/title="mystrings" strvar = {"alpha", "beta", "gamma"}
save/file=a.nc/clobber strvar
sp ncdump -h a.nc
netcdf a {
dimensions:
	XAX1_3 = 3 ;
	STRING1_5 = 5 ;
variables:
	double XAX1_3(XAX1_3) ;
		XAX1_3:point_spacing = "even" ;
		XAX1_3:axis = "X" ;
	char STRVAR(XAX1_3, STRING1_5) ;
		STRVAR:long_name = "mystrings" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
*** Running ferret script: bn_single_colorlev.jnl
! bn_single_colorlev.jnl
! Ticket 2123, mis-labeled color bars when
! single level is specified with a range of values
 
use coads_climatology
 
! Previously this labeled both top and bottom with 20
shade/lev=(20,25,5)/L=1 sst
 
! These cases were correct, and the reason for the above behavior
shade/lev=(5)/L=1 INT(sst)
shade/lev=(25)/L=1 INT(sst)
 
! Label upper and lower end of the color bar with the range
fill/lev=(20,30,10)/L=1 sst
 
*** Running ferret script: bn69_bug_fixes.jnl
! bn69_bug_fixes
! test various fixes that went into version 6.9
! 02/2014 ACM
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err686_long_list_varnames
! err686_long_list_varnames.jnl
!
! bug 2114
! Reading a file with 54 variables. The names of variables get long,
! and the list gets truncated by the SET DATA command.
!
 
columns/skip=1/var="\
sta,\
type,\
month,\
day,\
year,\
hour,\
minute,\
longitude,\
latitude,\
bottomD,\
sampledepth,\
dep,\
temp,\
sal,\
xCO2_water_sst_wet_ppm,\
xCO2_water_equi_temp_wet_ppm,\
xCO2_water_sst_dry_ppm,\
xCO2_water_equi_temp_dry_ppm,\
fCO2_water_sst_100humidity_uatm,\
fCO2_water_corr_25_uatm,\
fCO2_water_corr_to_20,\
fCO2_water_equi_uatm,\
pCO2_water_sst_100humidity_uatm,\
pCO2_water_equi_temp,\
pCO2_theta_SW_corrected_to_sst,\
Temperature_equi,\
Pressure_atm,\
Pressure_equi,\
wind_direc_deg,\
wind_speed,\
ship_speed,\
ship_direc,\
Humidity,\
woa_sss,\
woa_land_marker,\
pressure_ncep_slp,\
speed_calc_knots,\
etopo2_depth,\
fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm,\
fCO2_insitu_from_xCO2_water_sst_dry_ppm,\
fCO2_from_pCO2_water_water_equi_temp,\
fCO2_from_pCO2_water_sst_100humidity_uatm,\
fCO2_insitu_from_fCO2_water_equi_uatm,\
fCO2_insitu_from_fCO2_water_sst_100humidty_uatm,\
fCO2_from_pCO2_water_water_equi_temp_ncep,\
fCO2_from_pCO2_water_sst_100humidity_uatm_ncep,\
fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_woa,\
fCO2_insitu_from_xCO2_water_sst_dry_ppm_woa,\
fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep,\
fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep,\
fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep_woa,\
fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep_woa,\
fCO2_rec,\
fco2_source" \
longvarnames.tsv
 
! The list was cut off after woa_land_marker.
! Try to load a variable later than that in the list.
 
list etopo2_depth
             VARIABLE : etopo2_depth
             FILENAME : longvarnames.tsv
             SUBSET   : 10 points (X)
 1    /  1: -97.00
 2    /  2: -97.00
 3    /  3: -97.00
 4    /  4: -97.00
 5    /  5: -97.00
 6    /  6: -97.00
 7    /  7: -97.00
 8    /  8: -99.00
 9    /  9: -99.00
 10   / 10: -99.00
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err686_faxis_label
! err686_faxis_label.jnl
! 3/11/2014 ACM
! ticket 2149
! If the time axis has a calendar label, region label for F axis
! shouldn't automatically get it.
 
! Define a variable with a Julian calendar axis, and an abstract F axis
 
define axis/t=1-jan-2000:1-jan-2010:1/units=days/calendar=julian jtime
define axis/f=1:10:1 faxis
 
use err64_small_latlon.nc
let bath_tf = bathy  +  _N[gf=faxis] + 0*t[gt=jtime]
shade/n=3/L=6 bath_tf
 
! This label should be just F : 3
sh sym lab($labnum_f)
 !-> sh sym lab2
LAB2 = "F : 3"
 
! Might an F axis have a calendar?
define axis/f=1-jan-2000:12-jan-2000:1/units=days/calendar=julian naxis
let bath_tf = bathy  +  _N[gf=naxis] + 0*t[gt=jtime]
shade/n=3/L=6 bath_tf
 
! If so its label will show Julian too.
sh sym lab($labnum_f)
 !-> sh sym lab2
LAB2 = "FORECAST : 03-JAN-2000 00:00 JULIAN"
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err686_dup_axnames
! err686_dup_axnames
! Ticket 1750
!
! Make some datasets. Same axis length and name,
! different coordinates.
 
def ax/x=1:4:1 xaxis_test
let a = x[gx=xaxis_test]
save/clob/file=a.nc a
def ax/x=11:14:1 xaxis_test
let b = x[gx=xaxis_test]
save/clob/file=b.nc b
can var/all; can dat/all
 
! Check axis coords.
use a; use b
sh dat
     currently SET data sets:
    1> ./a.nc
 name     title                             I         J         K         L
 A        X[GX=XAXIS_TEST]                 1:4       ...       ...       ...
 
    2> ./b.nc  (default)
 name     title                             I         J         K         L
 B        X[GX=XAXIS_TEST]                 1:4       ...       ...       ...
 
sh grid a[d=1]
    GRID GSI1
 name       axis              # pts   start                end                 subset
 XAXIS_TEST1 X                  4 r   1                    4                   full
 normal    Y
 normal    Z
 normal    T
sh grid b[d=2]
    GRID GRR1
 name       axis              # pts   start                end                 subset
 XAXIS_TEST X                   4 r   11                   14                  full
 normal    Y
 normal    Z
 normal    T
 
! Write b with its Ferret internal axis name XAXIS_TEST1
save/clob/file=c.nc a[d=1],b
sp ncdump -h c.nc
netcdf c {
dimensions:
	XAXIS_TEST1 = 4 ;
	XAXIS_TEST = 4 ;
variables:
	double XAXIS_TEST1(XAXIS_TEST1) ;
		XAXIS_TEST1:point_spacing = "even" ;
		XAXIS_TEST1:axis = "X" ;
	double A(XAXIS_TEST1) ;
		A:missing_value = -1.e+34 ;
		A:_FillValue = -1.e+34 ;
		A:long_name = "X[GX=XAXIS_TEST]" ;
		A:history = "From a" ;
	double XAXIS_TEST(XAXIS_TEST) ;
		XAXIS_TEST:point_spacing = "even" ;
		XAXIS_TEST:axis = "X" ;
	double B(XAXIS_TEST) ;
		B:missing_value = -1.e+34 ;
		B:_FillValue = -1.e+34 ;
		B:long_name = "X[GX=XAXIS_TEST]" ;
		B:history = "From b" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
! Yet more combinations
save/clob/file=c.nc b, a[d=1]
sp ncdump -h c.nc
netcdf c {
dimensions:
	XAXIS_TEST = 4 ;
	XAXIS_TEST1 = 4 ;
variables:
	double XAXIS_TEST(XAXIS_TEST) ;
		XAXIS_TEST:point_spacing = "even" ;
		XAXIS_TEST:axis = "X" ;
	double B(XAXIS_TEST) ;
		B:missing_value = -1.e+34 ;
		B:_FillValue = -1.e+34 ;
		B:long_name = "X[GX=XAXIS_TEST]" ;
		B:history = "From b" ;
	double XAXIS_TEST1(XAXIS_TEST1) ;
		XAXIS_TEST1:point_spacing = "even" ;
		XAXIS_TEST1:axis = "X" ;
	double A(XAXIS_TEST1) ;
		A:missing_value = -1.e+34 ;
		A:_FillValue = -1.e+34 ;
		A:long_name = "X[GX=XAXIS_TEST]" ;
		A:history = "From a" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
! We can use /KEEP_AXISNAMES, changes XAXIS_TEST1 to XAXIS_TEST
save/clobber/file=c.nc b
sp ncdump -h c.nc
netcdf c {
dimensions:
	XAXIS_TEST = 4 ;
variables:
	double XAXIS_TEST(XAXIS_TEST) ;
		XAXIS_TEST:point_spacing = "even" ;
		XAXIS_TEST:axis = "X" ;
	double B(XAXIS_TEST) ;
		B:missing_value = -1.e+34 ;
		B:_FillValue = -1.e+34 ;
		B:long_name = "X[GX=XAXIS_TEST]" ;
		B:history = "From b" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
! Subsets also use XAXIS_TEST1
save/clobber/file=c.nc/i=2:4 b
sp ncdump -h c.nc
netcdf c {
dimensions:
	XAXIS_TEST2_4 = 3 ;
variables:
	double XAXIS_TEST2_4(XAXIS_TEST2_4) ;
		XAXIS_TEST2_4:point_spacing = "even" ;
		XAXIS_TEST2_4:axis = "X" ;
	double B(XAXIS_TEST2_4) ;
		B:missing_value = -1.e+34 ;
		B:_FillValue = -1.e+34 ;
		B:long_name = "X[GX=XAXIS_TEST]" ;
		B:history = "From b" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
! Unless we use /KEEP_AXISNAMES - which removes renaming
! due to subsetting and also due to internal names
save/clobber/file=c.nc/i=2:4/keep b
sp ncdump -h c.nc
netcdf c {
dimensions:
	XAXIS_TEST = 3 ;
variables:
	double XAXIS_TEST(XAXIS_TEST) ;
		XAXIS_TEST:point_spacing = "even" ;
		XAXIS_TEST:axis = "X" ;
	double B(XAXIS_TEST) ;
		B:missing_value = -1.e+34 ;
		B:_FillValue = -1.e+34 ;
		B:long_name = "X[GX=XAXIS_TEST]" ;
		B:history = "From b" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
! If we try /KEEP_AXISNAMES but there is a conflict, it's an err
set mode ignore
save/clobber/keep/file=nc b,a[d=1]
 
set mode/last ignore
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err686_cancel_invalid_var
! err686_cancel_invalid_var
! ticket 2159
! (Note that the shade of a one-cell or less region is
!  allowed fully as of Ferret v7.1.  See ticket 2494)
 
! The cancel variable ran into an incorrect setting
! for variable-in-memory
 
set mode ignore
let b = 1
shade b
 
set mode/last ignore
cancel var b
 
! Shade plot of a less-than-one cell region. Its where the bug came from.
use coads_climatology
shade/x=161.1:161.3/y=0.2:0.4/L=1 sst
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err686_redef_ascii_att
! err686_redef_ascii_att.jnl
! Bug 2161
! DEFINE ATT to redefine title or units for variable
! in ascii dataset caused crash
 
columns/delim=" " EZ.DAT
sh att v1
     attributes for dataset: ./data/EZ.DAT
 V1.long_name = V1 
 V1.missing_value = -1.E+34
 
! A new attribuge causes no problems
define att/output v1.comment = "First var from EZ.DAT"
sh att v1
     attributes for dataset: ./data/EZ.DAT
 V1.long_name = V1 
 V1.missing_value = -1.E+34
 V1.comment = First var from EZ.DAT 
 
! Initial definition of units is ok.
! Re-defining the title or units causes crash
define att/output v1.long_name = "vee one"
 
! Initial definition of units is ok.
! Re-defining units causes crash
define att/output v1.units="km"
define att/output v1.units="meters"
 
sh att v1
     attributes for dataset: ./data/EZ.DAT
 V1.long_name = vee one 
 V1.missing_value = -1.E+34
 V1.comment = First var from EZ.DAT 
 V1.units = meters 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err686_sho_nonexist_att
! err686_sho_nonexist_att.jnl
! See ticket 2133
 
!  Too many error messages were issued on this error
set mode ignore
 
use levitus_climatology
show att temp.noexist[d=levitus_climatology]
 
set mode/last ignore
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err686_set_var_name
! err686_set_var_name.jnl
! ticket 2152
! rename user var or file var. Err message was
! wrong if the name already exists.
 
SET MODE IGNORE
 
let a = 1
let b = 2
! Intentional error, new name is already a defined variable
set var/name=b a
! This rename is ok
set var/name=c a
sh var
 Created by DEFINE VARIABLE:
 >>> Definitions that replace any file variable of same name:
     B = 2
     C = 1
 
use gt4d011.cdf
! again, with user-variables and an open dataset the message is as above
 
let a = 1
let b = 2
set var/name=b a
 
! Intentional error, new name already in file
 
 
! Intentional error, new name already in file
set var/name=temp salt
show dat
     currently SET data sets:
    1> ./data/gt4d011.cdf  (default)
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                     91:108    35:56      1:10      1:25
 SALT     (SALINITY(ppt) - 35) /1000      91:108    35:55      1:10      1:25
 U        ZONAL VELOCITY                  91:108    35:55      1:10      1:25
 V        MERIDIONAL VELOCITY             91:108    35:55      1:10      1:25
 W        VERTICAL VELOCITY               91:108    36:55      1:10      1:25
 TAUX     ZONAL WIND STRESS               91:108    35:55      ...       1:25
 TAUY     MERIDIONAL WIND STRESS          91:108    35:55      ...       1:25
 PSI      STREAM FUNCTION                 91:108    35:56      ...       1:25
 
! This rename is ok
set var/name=salinity salt
show dat
     currently SET data sets:
    1> ./data/gt4d011.cdf  (default)
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                     91:108    35:56      1:10      1:25
 SALINITY (SALINITY(ppt) - 35) /1000      91:108    35:55      1:10      1:25
 U        ZONAL VELOCITY                  91:108    35:55      1:10      1:25
 V        MERIDIONAL VELOCITY             91:108    35:55      1:10      1:25
 W        VERTICAL VELOCITY               91:108    36:55      1:10      1:25
 TAUX     ZONAL WIND STRESS               91:108    35:55      ...       1:25
 TAUY     MERIDIONAL WIND STRESS          91:108    35:55      ...       1:25
 PSI      STREAM FUNCTION                 91:108    35:56      ...       1:25
 
 
! Test LET/D variables:
let/d=1 myvar = taux - tauy
! This is an error, new name already in file
set var/name=psi myvar
! This is ok, new let/d name associated with the file
set var/name=diff myvar
show dat
     currently SET data sets:
    1> ./data/gt4d011.cdf  (default)
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                     91:108    35:56      1:10      1:25
 SALINITY (SALINITY(ppt) - 35) /1000      91:108    35:55      1:10      1:25
 U        ZONAL VELOCITY                  91:108    35:55      1:10      1:25
 V        MERIDIONAL VELOCITY             91:108    35:55      1:10      1:25
 W        VERTICAL VELOCITY               91:108    36:55      1:10      1:25
 TAUX     ZONAL WIND STRESS               91:108    35:55      ...       1:25
 TAUY     MERIDIONAL WIND STRESS          91:108    35:55      ...       1:25
 PSI      STREAM FUNCTION                 91:108    35:56      ...       1:25
 ------------------------------
 DIFF[D=gt4d011] = TAUX - TAUY
 
 
! another error, new name is a user-var
set var/name=diff w
 
SET MODE/LAST ignore
*** Running ferret script: bn_bad_axis_bounds.jnl
! bn_bad_axis_bounds
! Ticket 2146 If there are invalid axis bounds
! make them into a dependent variable.
 
use badbounds.nc
show data
     currently SET data sets:
    1> ./data/badbounds.nc  (default)
 name     title                             I         J         K         L
 MONTH_IRREG_BNDS
                                           1:2       ...       ...       1:12
       (invalid axis bounds)
 TEMP2    TEMP[GT=MONTH_IRREG@ASN]         1:1       1:1       1:1       1:12
 
*** Running ferret script: bn_enter_exit_GO.jnl
! GO bn_enter_exit_GO
! Lines to allow trace of GO scripts:
!
! ! Enter_GO and ! Exit_GO lines written to the journal file
! or output file only if SET REDIRECT is turned on
 
! Check that we have the ! Enter_GO and ! Exit_GO lines
 
set redirect/tee/journal
go bn_shortgo
! Enter_GO bn_shortgo
! bn_shortgo.jnl
! short script for bn_enter_exit_GO
 
plot/i=1:15/color=red/thick i
! Exit_GO
 
! Inside an IF
let a = 1
if `a gt 0` THEN GO bn_shortgo2
 !-> if 1 THEN GO bn_shortgo2
! Enter_GO bn_shortgo2
! bn_shortgo2.jnl
! short script extracted from bn_negative_t for bn_enter_exit_GO
 
DEFINE AXIS/T=-10:10:2 tax
LET tvar = t[gt=tax]
GO bn_short.sub tvar ave
! Enter_GO bn_short.sub tvar ave
! bn_short.sub
! short script extracted from bn_negative_t.sub for bn_enter_exit_GO
 
LIST/nohead/norow $1[t=-5:9@$2]	! neg/pos t endpoints
 !-> LIST/nohead/norow tvar[t=-5:9@ave]
   2.000
 
! Exit_GO                    
! Exit_GO               
 
! Inside a REPEAT
define symbol ok = 0
repeat/L=1:3 (if ($ok) then go bn_shortgo; def sym ok = `($ok)+1`)
 !-> repeat/L=1:3 (if ($ok) then go bn_shortgo; def sym ok = `($ok)+1`)
!-> REPEAT: L=1
 !-> if 0 then go bn_shortgo
 !-> def sym ok = 1
!-> REPEAT: L=2
 !-> if 1 then go bn_shortgo
! Enter_GO bn_shortgo
! bn_shortgo.jnl
! short script for bn_enter_exit_GO
 
plot/i=1:15/color=red/thick i
! Exit_GO                    
 !-> def sym ok = 2
!-> REPEAT: L=3
 !-> if 2 then go bn_shortgo
! Enter_GO bn_shortgo
! bn_shortgo.jnl
! short script for bn_enter_exit_GO
 
plot/i=1:15/color=red/thick i
! Exit_GO                    
 !-> def sym ok = 3
 
cancel redirect
*** Running ferret script: bn_stddev.jnl
! bn_std.jnl
! New StdDev transform
 
use coads_climatology
list/x=100/y=10 sst[t=@STD]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             LONGITUDE: 99E
             LATITUDE : 9N
             TIME     : 01-JAN 00:45 to 01-APR 08:12 (standard deviation)
          0.6651
list/x=100/L=1 sst[y=@STD]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             LONGITUDE: 99E
             LATITUDE : 90S to 90N (standard deviation)
             TIME     : 16-JAN 06:00
          10.12
list/y=10/L=1 sst[x=@STD]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             LONGITUDE: 20E to 20E(380) (standard deviation)
             LATITUDE : 9N
             TIME     : 16-JAN 06:00
          0.7078
 
use gt4d011.cdf
list/y=3/l=1/x=233 u[z=@STD]
             VARIABLE : ZONAL VELOCITY (cm/sec)
             FILENAME : gt4d011.cdf
             LONGITUDE: 127W
             LATITUDE : 3N
             DEPTH (m): 0 to 100 (standard deviation)
             TIME     : 17-AUG-1982 12:00
          3.366
list/y=3/l=1 temp[x=@std]
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 10 points (DEPTH (m))
             LONGITUDE: 140W to 122W (standard deviation)
             LATITUDE : 2.833N
             TIME     : 17-AUG-1982 12:00
 5     /  1:  0.2463
 15    /  2:  0.2536
 25    /  3:  0.2661
 35    /  4:  0.2647
 45    /  5:  0.2006
 55    /  6:  0.0981
 65    /  7:  0.2053
 75    /  8:  0.3932
 85    /  9:  0.5569
 95    / 10:  0.7732
list/y=3/l=1 temp[z=@std,x=@std]
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             LONGITUDE: 140W to 122W (XZ stddev)
             LATITUDE : 2.833N
             DEPTH (m): 0 to 100 (XZ stddev)
             TIME     : 17-AUG-1982 12:00
          0.9487
*** Running ferret script: bn_set_axis_name.jnl
! bn_set_axis_name.jnl
! ticket 2160 Implementing new qualifier SET AXIS/NAME
! 3/2014
!
!
! Prepare a dataset with a time axis
 
define axis/t=1-may-2010:5-may-2010:1/units=days daysaxis
let a = t[gt=daysaxis]
save/clobber/file=a.nc a
 
cancel variable a
cancel axis daysaxis
 
!  We define some axis, then open a dataset with an axis of that name.
 
define axis/t=1-jan-2000:31-jan-2000:1/units=days daysaxis
 
use a.nc
 
! The axis in the dataset has been renamed.
say `a,return=taxis`
 !-> MESSAGE/CONTINUE DAYSAXIS1
DAYSAXIS1
 
! So, rename our user-defined axis
set axis/name=days2000 daysaxis
 
! and now rename the one from the dataset back to its original name
set axis/name=daysaxis `a,return=taxis`
 !-> set axis/name=daysaxis DAYSAXIS1
sh grid a
    GRID GSI1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 DAYSAXIS  TIME                 5 r   01-MAY-2010 00:00    05-MAY-2010 00:00   full
 
cancel data/all
 
! If an axis is used in several datsets, renaming it of course
! changes the name for all grids.
! The attribute structure gets updated as well.
 
! Make several datasets with the same x axis.
define axis/x=1:13:1/units=meters x13axis
let a = x[gx=x13axis]
let b = 3*x[gx=x13axis]
let c = 5*x[gx=x13axis]
save/clobber/file=a.nc a
save/clobber/file=b.nc b
save/clobber/file=c.nc c
 
can var/all
can axis x13axis
 
! Open them in Ferret; all grids are the same.
use a.nc, b.nc, c.nc
say `a[d=1],return=xaxis`
 !-> MESSAGE/CONTINUE X13AXIS
X13AXIS
say `b[d=2],return=xaxis`
 !-> MESSAGE/CONTINUE X13AXIS
X13AXIS
say `c[d=3],return=xaxis`
 !-> MESSAGE/CONTINUE X13AXIS
X13AXIS
 
! Rename the axis
set axis/name=x_in_meters x13axis
say `a[d=1],return=xaxis`
 !-> MESSAGE/CONTINUE X_IN_METERS
X_IN_METERS
say `b[d=2],return=xaxis`
 !-> MESSAGE/CONTINUE X_IN_METERS
X_IN_METERS
say `c[d=3],return=xaxis`
 !-> MESSAGE/CONTINUE X_IN_METERS
X_IN_METERS
 
! For SHOW DAT/ATT we get info from the attribute structure.
! It has the udated name.
sh dat/att
     currently SET data sets:
    1> ./a.nc
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(x_in_meters)          DOUBLE    units           CHAR        6    T       meters
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 orig_file_axname
                                                 CHAR        7    F       X13AXIS
  
 A                     DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 long_name       CHAR        13   T       X[GX=X13AXIS]
  
    2> ./b.nc
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(x_in_meters)          DOUBLE    units           CHAR        6    T       meters
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 orig_file_axname
                                                 CHAR        7    F       X13AXIS
  
 B                     DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 long_name       CHAR        15   T       3*X[GX=X13AXIS]
  
    3> ./c.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(x_in_meters)          DOUBLE    units           CHAR        6    T       meters
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 orig_file_axname
                                                 CHAR        7    F       X13AXIS
  
 C                     DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 long_name       CHAR        15   T       5*X[GX=X13AXIS]
  
 
! Intentional errors
set mode ignore
 
! Name already in use
set axis/name=days2000 x_in_meters
 
! Missing or illegal name
set axis/name x_in_meters
set axis/name=45 x_in_meters
set axis/name=.fr x_in_meters
 
set mode/last ignore
*** Running ferret script: bn691_bug_fixes.jnl
! bn691_bug_fixes
! test various fixes that went into version 6.91
! 04/2014 ACM
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_arg_type_error
! err69_arg_type_error
! See ticket 2169
!
set mode ignore
sh func  tax_datestring
TAX_DATESTRING(A,B,C)
    Returns date string for time axis coordinate values
    A: time steps to convert
    B: variable with reference time axis
    C: output precision, e,g. "day" or "minute" (STRING)
sh func /detail tax_datestring
TAX_DATESTRING(A,B,C)
    Returns date string for time axis coordinate values
        Axes of result:
          X: inherited from argument(s)
          Y: inherited from argument(s)
          Z: inherited from argument(s)
          T: inherited from argument(s)
          E: inherited from argument(s)
          F: inherited from argument(s)
    A: time steps to convert (FLOAT)
        Influence on output axes:
          X: passed to result grid
          Y: passed to result grid
          Z: passed to result grid
          T: passed to result grid
          E: passed to result grid
          F: passed to result grid
    B: variable with reference time axis (FLOAT)
        Influence on output axes:
          X: no influence (indicate argument limits with "[]")
          Y: no influence (indicate argument limits with "[]")
          Z: no influence (indicate argument limits with "[]")
          T: no influence (indicate argument limits with "[]")
          E: no influence (indicate argument limits with "[]")
          F: no influence (indicate argument limits with "[]")
    C: output precision, e,g. "day" or "minute" (STRING)
        Influence on output axes:
          X: no influence (indicate argument limits with "[]")
          Y: no influence (indicate argument limits with "[]")
          Z: no influence (indicate argument limits with "[]")
          T: no influence (indicate argument limits with "[]")
          E: no influence (indicate argument limits with "[]")
          F: no influence (indicate argument limits with "[]")
 
define axis/t=1-jan-2000:31-jan-2000:1/units=days my_tax
let tt = t[gt=my_tax]
 
! Intentional errors
list tax_datestring (tt[L=3], tt, 5)
list tax_datestring (tt[L=3], tt, "minutes")
             VARIABLE : TAX_DATESTRING (TT[L=3], TT, "minutes")
             TIME     : 03-JAN-2000 00:00
        "03-JAN-2000 00:00"
list tax_datestring (tt[L=3], "my_tax", "minutes")
 
set mode /last ignore
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_bad_bounds
! err69_bad_bounds.jnl
! See ticket 2170
 
set mode ignore
 
! time axis has a point_spacing=even attribute
! and an invalid set of bounds.
! caused Ferret to mis-read the time axis
use badbounds_even.nc
list var, tbox[gt=var]
             DATA SET: ./data/badbounds_even.nc
             TIME: 03-JAN-2000 12:00 to 02-FEB-2000 12:00
 Column  1: VAR is T (My Variable)
 Column  2: TBOX is TBOX (axis TAX_BB_PTSPAC)
                      VAR   TBOX
06-JAN-2000 00 / 1:  1.000  5.000
11-JAN-2000 00 / 2:  2.000  5.000
16-JAN-2000 00 / 3:  3.000  5.000
21-JAN-2000 00 / 4:  4.000  5.000
26-JAN-2000 00 / 5:  5.000  5.000
31-JAN-2000 00 / 6:  6.000  5.000
 
! Same time axis but with a different error in the bounds
! also has a point-spacing=even attribute
! caused Ferret to mis-read the time axis
use badbounds_non_enclose
list var, tbox[gt=var]
             DATA SET: ./data/badbounds_non_enclose.nc
             TIME: 03-JAN-2000 12:00 to 02-FEB-2000 12:00
 Column  1: VAR is T (My Variable)
 Column  2: TBOX is TBOX (axis TAX_BB_EVEN_NOENC)
                      VAR   TBOX
06-JAN-2000 00 / 1:  1.000  5.000
11-JAN-2000 00 / 2:  2.000  5.000
16-JAN-2000 00 / 3:  3.000  5.000
21-JAN-2000 00 / 4:  4.000  5.000
26-JAN-2000 00 / 5:  5.000  5.000
31-JAN-2000 00 / 6:  6.000  5.000
 
! Same definition except that the coordinates are irregularly
! spaced, no point-spacing attribute.
use badbounds_uneven
list var, tbox[gt=var]
             DATA SET: ./data/badbounds_uneven.nc
             TIME: 02-JAN-2000 12:00 to 02-FEB-2000 12:00
 Column  1: VAR is T (My Variable)
 Column  2: TBOX is TBOX (axis TAX_BB_IRR)
                      VAR   TBOX
06-JAN-2000 00 / 1:  1.000  7.000
13-JAN-2000 00 / 2:  2.000  5.000
16-JAN-2000 00 / 3:  3.000  4.000
21-JAN-2000 00 / 4:  4.000  5.000
26-JAN-2000 00 / 5:  5.000  5.000
31-JAN-2000 00 / 6:  6.000  5.000
 
sh axis TAX_BB*
 name       axis              # pts   start                end
 TAX_BB_IRR TIME                6 i   06-JAN-2000 00:00    31-JAN-2000 00:00
T0 = 01-JAN-2000 00:00:00
   Axis span (to cell edges) = 31
 TAX_BB_EVEN_NOENC TIME         6 r   06-JAN-2000 00:00    31-JAN-2000 00:00
T0 = 01-JAN-2000 00:00:00
   Axis span (to cell edges) = 30
 TAX_BB_PTSPAC TIME             6 r   06-JAN-2000 00:00    31-JAN-2000 00:00
T0 = 01-JAN-2000 00:00:00
   Axis span (to cell edges) = 30
 
set mode/last ignore
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_const_array
! err69_const_array.jnl
! 5/8/2014  ACM
! See ticket 2174
! expressions are not allowed in constant-array definitions.
 
set mode ignore
 
! The code to read constant-array definitions into memory was simply doing
! a read on each comma-separated portion of the command-line defining it.
! Need to first determine if the buffer represents a simple constant.
 
! These already returned an error as cos(1) can't be read with a Fortran read.
list {cos(1), sin(0)}
 
! Previously the first was read as {0,180} and the second as {0.1,0.2,1}, and
! the third as {30,2000} !
! They should be reported as syntax errors
 
list {0-180, 180}
list {0.1, 0.2, 1./5.}
list {5*3+1, 2+3}
 
! These are ok, and always have been
list/prec=8 {-0.001, 1.23e-2, -45.e3}
             VARIABLE : {-0.001, 1.23E-2, -45.E3}
             SUBSET   : 3 points (X)
 1   / 1:     -0.001
 2   / 2:      0.012
 3   / 3: -45000.000
 
set mode/last ignore
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_multi_label_ascii
! err69_multi_label_ascii.jnl
! 5/2014  ACM
! ticket 2176
! Multi-line labels and ascii fonts.
 
plot/vs/nolab {0,1},{0,1}
 
 
label .05 .96 0 0 .12 "@CR@P4Single Line examples. Ascii font with and without escape for new color:"
label .05 .9 0 0 .16 "@ASNo_escapes@c002good_1@c003friend_2"
label .05 .83 0 0 .16 "@ASEscape_new_colors@c002red_1@c003green_2"
 
 
label .05 .65 0 0 .12 "@CR@P4Multi Line ascii examples:"
 
label .05 .56 0 0 .12 "@CR@P4without escape"
label .05 .5 0 0 .16 "@ASNo_escapes<NL>@c002good_1<NL>@c003friend_2"
 
label .55 .56 0 0 .12 "@CR@P4with escape:"
label .55 .5 0 0 .16 "@ASEscape_new_colors<NL>@c002red_1<NL>@c003green_2"
 
! escape just the special characters.
label .05 .26 0 0 .12 "@CR@P4Settings around underscores:"
label .05 .2 0 0 .16 "hello@AS_@SRthere<NL>@c002good@AS_@SR1<NL>@c003friend@AS_@SR2"
 
! escape new pen setting, not the font
label .55 .26 0 0 .12 "@CR@P4Escape just the color changes:"
label .55 .2 0 0 .16 "@ASEscape_color_not_font<NL>@P2@SRred_1<NL>@P3@SRgreen_2"
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_ens_badvalue
! err69_ens_badvalue.jnl
!
! Datasets have _FillValue but not missing_value attributes.
! In this case the missing data info was not correctly handled
! when defining an ensemble.
 
use maize_1.nc, maize_2.nc, maize_3.nc
 
! Note the _FillValue,  flag
sho att maize_yield
     attributes for dataset: ./data/maize_3.nc
 MAIZE_YIELD._FillValue = 9.96921E+36
 MAIZE_YIELD.long_name =  Maize harvest 
 MAIZE_YIELD.units = kgC.m-2.yr-1 
 MAIZE_YIELD.history = From new_ORCH_CORD_MIR_B1_maize 
ensemble ens = 1,2,3
 
! MAIZE_YIELD[M=@NGD] should have values of 0, 2, and 3.
list/y=29.25  MAIZE_YIELD[d=1], MAIZE_YIELD[d=2], MAIZE_YIELD[d=3],  MAIZE_YIELD[m=@ngd]
             LONGITUDE: 8W(-8) to 6W(-6)
             LATITUDE: 29.25N
             E (realization): 0.5 to 3.5 (number of valid)
 Column  1: MAIZE_YIELD[D=maize_1] is  Maize harvest (kgC.m-2.yr-1)
 Column  2: MAIZE_YIELD[D=maize_2] is  Maize harvest (kgC.m-2.yr-1)
 Column  3: MAIZE_YIELD[D=maize_3] is  Maize harvest (kgC.m-2.yr-1)
 Column  4: MAIZE_YIELD[D=ens] is  Maize harvest (# of points)
        MAIZE_YIELD  MAIZE_YI MAIZE_Y MAIZE_YIELD
7.75W  / 1:     ....  0.05247  0.1022   2.000
7.25W  / 2:  0.01818  0.03588  0.0049   3.000
6.75W  / 3: -0.00002  0.02030 -0.0139   3.000
6.25W  / 4:     ....     ....    ....   0.000
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_ribbon_by_levels
! err69_ribbon_by_levels.jnl
! ACM 5/19/2014
! See ticket 2179
! colors were not repeating after the first 10.
 
 
let/title=xpts xpts = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,\
16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35}
 
let/title=ypts ypts = { 9.04,8.67,8.96,9.29,9.18,9.42,9.43,\
9.33,9.19,9.22,9.12,9.36,9.22,9.04,8.92,9.00,8.59,8.31,8.69,\
8.20,8.86,7.98,7.80,8.29,7.94,8.05,7.85,7.55,7.56,6.82,7.04,\
6.66,6.56,7.36,6.52}
 
let/title=colors  var =  {\
1.5,1.6,1.8,2.5,2.6,3.7,3.8,14.9,14.1,5.3,16.1,16.2,17.3,\
17.4,8.4,8.2,9.5,9.1,10.1,10.2,12.2,12.6,1.7,1.1,5.2,5.3,\
5.4,13.6,13.7,14.8,14.2,14.9,14.7,14.6,14.5}
 
RIBBON/vs/line/thick/lev=(1,20,1)/fast/pal=ten_by_levels xpts,ypts,var
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_ribbon_histogram
! err69_ribbon_histogram.jnl
! ACM 5/24/2014
! Histogram levels with ribbon line plots
 
 
let/title=xpts xpts = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,\
16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35}
 
let/title=ypts ypts = { 9.04,8.67,8.96,9.29,9.18,9.42,9.43,\
9.33,9.19,9.22,9.12,9.36,9.22,9.04,8.92,9.00,8.59,8.31,8.69,\
8.20,8.86,7.98,7.80,8.29,7.94,8.05,7.85,7.55,7.56,6.82,7.04,\
6.66,6.56,7.36,6.52}
 
let/title=colors  var =  {\
1.5,1.6,1.8,2.5,2.6,3.7,3.8,1.9,1.1,1.3,1.1,1.2,2.3,\
2.4,2.4,2.2,2.5,9.1,10.1,10.2,12.2,12.6,1.7,1.1,5.2,5.3,\
5.4,13.6,13.7,14.8,14.2,14.9,14.7,14.6,14.5}
 
! linear levels, then histogram levels
can view; set v left
ribbon/vs/line/thick/lev=10  xpts,ypts,var
set v right
ribbon/vs/line/thick/lev=10h xpts,ypts,var
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_repl_scinot
! err69_repl_scinot.jnl
! ticket 2175
! The returned number had a bunch of trailing spaces
 
let a = 1.e-10
say (`a`)
 !-> MESSAGE/CONTINUE (0.0000000001)
(0.0000000001)
 
let a = -1.e-10
say (`a`)
 !-> MESSAGE/CONTINUE (-0.0000000001)
(-0.0000000001)
 
let a = -1.23e-10
say (`a`)
 !-> MESSAGE/CONTINUE (-0.000000000123)
(-0.000000000123)
 
let a = -1.23e-2
say (`a`)
 !-> MESSAGE/CONTINUE (-0.0123)
(-0.0123)
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err691_bnds_case
! err691_bnds_case
! 6/30/14
! Ticket 2182 bounds variable incorrectly created with upper-cased axis name
 
def ax/t tax = {1,2,4,8}
let tval = t[gt=tax]
can mode upcase_output
save/clob/file=tval.nc tval
 
set mode/last upcase_output
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_plot_vs_labs
! err69_plot_vs_labs.jnl
! ticket 2187: the axis labels on the dependent axis
! for PLOT/VS is wrong.  LABX and LABY contain the labels used.
 
use coads_climatology
 
let a = sst[L=1]
let b = a[x=180e:100w@ave]
let c = a[x=150w:90w@ave]
let d = a[x=150w:90w@ave]
set v left;  plot/vs b,c; sh sym labx,laby
LABX = "A[X=180E:100W@AVE]"
LABY = "A[X=150W:90W@AVE]"
set v right; plot/vs c,b; sh sym labx,laby
LABX = "A[X=150W:90W@AVE]"
LABY = "A[X=180E:100W@AVE]"
 
can view
plot/vs/ribbon c,b,d; sh sym labx,laby
LABX = "A[X=150W:90W@AVE]"
LABY = "A[X=180E:100W@AVE]"
 
set v left;  plot/trans/vs b,c; sh sym labx,laby
LABX = "A[X=150W:90W@AVE]"
LABY = "A[X=180E:100W@AVE]"
set v right; plot/trans/vs c,b; sh sym labx,laby
LABX = "A[X=180E:100W@AVE]"
LABY = "A[X=150W:90W@AVE]"
 
can view
plot/vs/trans/ribbon c,b,d; sh sym labx,laby
LABX = "A[X=180E:100W@AVE]"
LABY = "A[X=150W:90W@AVE]"
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_levels_v
! err69_levels_v.jnl
! Ferret ticket 2186, and LAS ticket 1598
! the data has values in the range 300 to 500,
! and several values over 100000.  The variance-
! based levels returned useless levels. Changes
! made to throw out data outside 3 std when
! computing the mean and std dev for color levels.
! Note: fixes to LEV=V 2/2016
 
use "lev_v_bug.nc"
shade/lev=v var2d
 
! previously the computed levels spanned -8000 to 16000.
sh sym *lev*
LEV_ALL = "290,300,310,320,330,332,334,336,338,340,342,344,346,348,350,352,354,356,358,360,362,364,366,368,370,372,374,376,378,380,382,384,386,388,390,392,394,396,398,400,410,420,430,440,450,1.149E+05"
LEV_TEXT = "V"
LEV_OPNLEVS = "(290,330,10)(332,402,2)(400,450,10)(inf)"
LEV_MIN = "290"
LEV_MAX = "open-ended"
LEV_NUM = "45"
LEV_DEL = "irregular"
LEV_CENTERED_LABELS = "off"
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_letd_dsetnum
! err69_letd_dsetnum.jnl
!  Ticket 2189. Previously the grave-accent expression didn't get
!  translated, and the let command failed.
 
use coads_climatology
let/d=`sst,r=dsetnum` a = 1
 !-> DEFINE VARIABLE/DATA=1 a = 1
sh dat
     currently SET data sets:
    1> ./data/coads_climatology.cdf  (default)
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:3
 ------------------------------
 A[D=coads_climatology] = 1
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_long_string_to_xml
! err69_long_string_to_xml.jnl
! ticket 2190  8-8-2014
! previously the string was cut off at 512 characters. For this example
! it was in the middle of the code AAAAAAAAAAAA
!
 
list/clobber/file="out.xml"/nohead/norow 1
LET longstring = "Where expocode is 33GG20090204, 33GG20090227, 33GG20090407, 33GG20090419, 33GG20090513, 33GG20090611, 33GG20090701, 33GG20090727, 33GG20090830, 33GG20090915, 33GG20080403, 33GG20080419, 33GG20080512, 33GG20080920, 33GG20081014, 33GG20081028, 33GG20081114, 33GG20091019, 33GG20091101, 332220110627, 332220110716, 332220110802, 332220110820, 332220120220, 332220120327, 332220120717, 332220120905, 33GC20040510, 33GC20040511, 33GC20040512, 33GC20040521, 33GC20040602, 33GC20040603, 33GC20040605, 33GC20040611, AAAAAAAAAAAA, 33GC20040616, 33GC20040617, 33GC20040618, 33GC20040701, 33GC20040721, 33GC20040727, 33GC20040728, 33GC20040729, 33GC20040730, 33GC20040816, 33GC20040908, 33GC20040924, 33GC20041006, 33GC20041028, 33GC20041029, 33GC20041104, 33GC20041108, 33GC20041206, 33GC20041209, 33GC20050119, 33GC20050130, 33GC20050131, 33GC20050217, 33GC20050315, 33GC20050316, 33GC20050317, 33GC20050318, 33GC20050406, 33GC20050407, 33GC20050419, 33GC20050420, 33GC20050510, 33GC20050511, 33GC20050518, 33GC20050519, 33GC20050617, 33GC20050629, 33GC20050630, 33GC20050712, 33GC20050713, 33GC20050714"
LET status = list_value_xml ("mytag", longstring, 1, "out.xml")
LOAD status
 
sp cat out.xml
   1.000
<mytag><![CDATA[Where expocode is 33GG20090204, 33GG20090227, 33GG20090407, 33GG20090419, 33GG20090513, 33GG20090611, 33GG20090701, 33GG20090727, 33GG20090830, 33GG20090915, 33GG20080403, 33GG20080419, 33GG20080512, 33GG20080920, 33GG20081014, 33GG20081028, 33GG20081114, 33GG20091019, 33GG20091101, 332220110627, 332220110716, 332220110802, 332220110820, 332220120220, 332220120327, 332220120717, 332220120905, 33GC20040510, 33GC20040511, 33GC20040512, 33GC20040521, 33GC20040602, 33GC20040603, 33GC20040605, 33GC20040611, AAAAAAAAAAAA, 33GC20040616, 33GC20040617, 33GC20040618, 33GC20040701, 33GC20040721, 33GC20040727, 33GC20040728, 33GC20040729, 33GC20040730, 33GC20040816, 33GC20040908, 33GC20040924, 33GC20041006, 33GC20041028, 33GC20041029, 33GC20041104, 33GC20041108, 33GC20041206, 33GC20041209, 33GC20050119, 33GC20050130, 33GC20050131, 33GC20050217, 33GC20050315, 33GC20050316, 33GC20050317, 33GC20050318, 33GC20050406, 33GC20050407, 33GC20050419, 33GC20050420, 33GC20050510, 33GC20050511, 33GC20050518, 33GC20050519, 33GC20050617, 33GC20050629, 33GC20050630, 33GC20050712, 33GC20050713, 33GC20050714]]></mytag>
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_fill_trans
! err69_fill_trans.jnl
! ticket 2196. Visible only if bounds-checking is turned on.
! 9/22/2014
 
DEFINE AXIS/x=1:15:1 xaxis
let var =  {1,2,3,,,,,,,4,,5,6,7,8}
LET myvar = var[gx=xaxis@asn]
 
list myvar
             VARIABLE : VAR[GX=XAXIS@ASN]
             SUBSET   : 15 points (X)
 1    /  1:  1.000
 2    /  2:  2.000
 3    /  3:  3.000
 4    /  4:   ....
 5    /  5:   ....
 6    /  6:   ....
 7    /  7:   ....
 8    /  8:   ....
 9    /  9:   ....
 10   / 10:  4.000
 11   / 11:   ....
 12   / 12:  5.000
 13   / 13:  6.000
 14   / 14:  7.000
 15   / 15:  8.000
list myvar[x=6@fnr:2]
             VARIABLE : VAR[GX=XAXIS@ASN]
             X        : 6 (nearest-filled by 2 pts)
        ....
 
! This caused attempt to load variable at index i = -4
list myvar[x=6@fnr:10]
             VARIABLE : VAR[GX=XAXIS@ASN]
             X        : 6 (nearest-filled by 10 pts)
          3.000
 
! Likewise the way @FAV is computed, this caused Ferret
! to try to get data at i=-3
list myvar[x=6@fav:18]
             VARIABLE : VAR[GX=XAXIS@ASN]
             X        : 6 (ave-filled by 18 pts)
          4.500
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_load_big_grid
! err69_load_big_grid
! ticket 1758
! error about "a negative number of words requested... grid too large"
! in fact all large grids misreports size.  Now computations are done
! in real numbers and in block not word sizes.
 
set mode ignore
 
def axis/x=1:360:1 xaxis
def axis/y=1:180:1 yaxis
def axis/z=1:20:1 zaxis
 
! this gave the error about "a negative number of words requested... grid too large"
define axis/t=1-jan-2000:1-jan-2005:1/units=days  longtime
let bigvar = x[gx=xaxis]+y[gy=yaxis] + z[gz=zaxis] + t[gt=longtime]
sh grid bigvar
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXIS     X                  360 r   1                    360                 full
 YAXIS     Y                  180 r   1                    180                 full
 ZAXIS     Z                   20 r   1                    20                  full
 LONGTIME  TIME              1828 r   01-JAN-2000 00:00    01-JAN-2005 00:00   full
load bigvar
    To fulfill this request would exceed the current SET MEMORY/MAX= limit of 250Mb
    At the moment that the memory limit was reached
    memory was committed as follows:
        - to objects used in computation: 1297828 (4%)
    The size of the requested object was: 18.95 Gb (7581%)
 
! also was an incorrect size.
define axis/t=1-jan-2000:1-jan-2010:1/units=days  longtime
sh grid bigvar
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXIS     X                  360 r   1                    360                 full
 YAXIS     Y                  180 r   1                    180                 full
 ZAXIS     Z                   20 r   1                    20                  full
 LONGTIME  TIME              3654 r   01-JAN-2000 00:00    01-JAN-2010 00:00   full
load bigvar
    To fulfill this request would exceed the current SET MEMORY/MAX= limit of 250Mb
    At the moment that the memory limit was reached
    memory was committed as follows:
        - to objects used in computation: 1299654 (4%)
    The size of the requested object was: 37.88 Gb (15154%)
 
cancel mode ignore
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_write_attribute
! err69_write_attribute.jnl
! Bug 1863
 
use gt4d011.cdf
sh grid temp
    GRID PS3DT2
 name       axis              # pts   start                end                 subset
 PSXT      LONGITUDE          160mr   130.5E               70.5W               full
 PSYT      LATITUDE           100 i   28.836S              48.568N             full
 PSZT      DEPTH (m)           27 i-  5                    3824                full
 TIME1     TIME                25 r   17-AUG-1982 12:00    10-JAN-1983 12:00   full
let a = temp[x=@ave,y=@ave,L=1]
 
! The attribute we ask not to write is not written for this variable
can att/output (`a,r=zaxis`).point_spacing
 !-> can att/output (PSZT).point_spacing
save/q/clob/file="a.nc"/bounds a
sp ncdump -h a.nc | grep -i "`a,r=zaxis`"
 !-> sp ncdump -h a.nc | grep -i "PSZT"
	PSZT1_10 = 10 ;
	double PSZT1_10(PSZT1_10) ;
		PSZT1_10:units = "meters" ;
		PSZT1_10:positive = "down" ;
		PSZT1_10:standard_name = "depth" ;
		PSZT1_10:bounds = "PSZT1_10_bnds" ;
	double PSZT1_10_bnds(PSZT1_10, bnds) ;
	double A(TIME1, PSZT1_10) ;
 
! But it was being written for this one. It should not.
let b =  temp[x=@ave,y=@ave,L=1,d=1]
save/q/clob/file="a.nc"/bounds b
sp ncdump -h a.nc | grep -i "`b,r=zaxis`"
 !-> sp ncdump -h a.nc | grep -i "PSZT"
	PSZT1_10 = 10 ;
	double PSZT1_10(PSZT1_10) ;
		PSZT1_10:units = "meters" ;
		PSZT1_10:positive = "down" ;
		PSZT1_10:standard_name = "depth" ;
		PSZT1_10:bounds = "PSZT1_10_bnds" ;
	double PSZT1_10_bnds(PSZT1_10, bnds) ;
	double B(TIME1, PSZT1_10) ;
 
! A variable that depends on more than one dataset.
use coads_climatology
let c = temp[x=@ave,y=@ave,L=1,d=1] + sst[x=@ave,y=@ave,t=@ave,d=2]
save/q/clob/file="a.nc"/bounds c
sp ncdump -h a.nc | grep -i  "`c,r=zaxis`"
 !-> sp ncdump -h a.nc | grep -i  "PSZT"
	PSZT1_10 = 10 ;
	double PSZT1_10(PSZT1_10) ;
		PSZT1_10:units = "meters" ;
		PSZT1_10:positive = "down" ;
		PSZT1_10:standard_name = "depth" ;
		PSZT1_10:bounds = "PSZT1_10_bnds" ;
	double PSZT1_10_bnds(PSZT1_10, bnds) ;
	double C(PSZT1_10) ;
 
can data/all
can var/all
 
! When there are two datasets with the same axis name but different depths,
! the second axis name is changed internally.
 
DEFINE AXIS/z/depth zzdep = {0,10,20,30,50,75,100,150,200,300,400,600,800,1000,1200,1500,2000,3000,4000,5000}
 
LET temp = z[gz=zzdep]
save/clobber/file=aa.nc temp
save/clobber/keep/file=bb.nc temp[k=1:15]
can var/all
can axis zzdep
 
use aa
use bb
set data 1
 
show att (`temp,r=zaxis`)
 !-> show att (ZZDEP)
     attributes for dataset: ./aa.nc
 (ZZDEP).point_spacing = uneven 
 (ZZDEP).axis = Z 
 (ZZDEP).bounds = ZZDEP_bnds 
 (ZZDEP).positive = down 
 (ZZDEP).standard_name = depth 
 (ZZDEP).orig_file_axname = ZZDEP 
 
let a = temp[d=1,x=@ave,y=@ave]
can att/output (`a,r=zaxis`).point_spacing
 !-> can att/output (ZZDEP).point_spacing
save/clobber/file=a.nc a
sp ncdump -h a.nc | grep -i `a,r=zaxis`
 !-> sp ncdump -h a.nc | grep -i ZZDEP
	ZZDEP = 20 ;
	double ZZDEP(ZZDEP) ;
		ZZDEP:axis = "Z" ;
		ZZDEP:bounds = "ZZDEP_bnds" ;
		ZZDEP:positive = "down" ;
		ZZDEP:standard_name = "depth" ;
	double ZZDEP_bnds(ZZDEP, bnds) ;
	double A(ZZDEP) ;
 
set data 2
let a = temp[d=2,x=@ave,y=@ave]
can att/output (`a,r=zaxis`).point_spacing
 !-> can att/output (ZZDEP1).point_spacing
save/clobber/file=a.nc a
sp ncdump -h a.nc | grep -i `a,r=zaxis`
 !-> sp ncdump -h a.nc | grep -i ZZDEP1
	ZZDEP1 = 15 ;
	double ZZDEP1(ZZDEP1) ;
		ZZDEP1:axis = "Z" ;
		ZZDEP1:bounds = "ZZDEP1_bnds" ;
		ZZDEP1:positive = "down" ;
		ZZDEP1:standard_name = "depth" ;
	double ZZDEP1_bnds(ZZDEP1, bnds) ;
	double A(ZZDEP1) ;
 
let a = temp[d=2,gz=temp[d=1]]
 
can att/output (`a,r=zaxis`).point_spacing
 !-> can att/output (ZZDEP).point_spacing
 
save/clobber/file=a.nc a
sp ncdump -h a.nc | grep -i `a,r=zaxis`
 !-> sp ncdump -h a.nc | grep -i ZZDEP
	ZZDEP = 20 ;
	double ZZDEP(ZZDEP) ;
		ZZDEP:axis = "Z" ;
		ZZDEP:bounds = "ZZDEP_bnds" ;
		ZZDEP:positive = "down" ;
		ZZDEP:standard_name = "depth" ;
	double ZZDEP_bnds(ZZDEP, bnds) ;
	double A(ZZDEP) ;
 
sp rm aa.nc bb.nc
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_isready_status_errmsgs
! err69_isready_status_errmsgs
! ticket 2197
!  RETURN=isready or RETURN=status caused error reporting
!  to go silent.
 
set mode ignore
list a
say `a,return=isready`
 !-> MESSAGE/CONTINUE 0
0
say `c,return=status`
 !-> MESSAGE/CONTINUE UNKNOWN VARIABLE: C
UNKNOWN VARIABLE: C
list a
list b
shade a
 
set mode/last ignore
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_isready_status_errmsgs
! err69_isready_status_errmsgs
! ticket 2197
!  RETURN=isready or RETURN=status caused error reporting
!  to go silent.
 
set mode ignore
list a
say `a,return=isready`
 !-> MESSAGE/CONTINUE 0
0
say `c,return=status`
 !-> MESSAGE/CONTINUE UNKNOWN VARIABLE: C
UNKNOWN VARIABLE: C
list a
list b
shade a
 
set mode/last ignore
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_countervar_context
! err69_countervar_context.jnl
! ACM 10/3/2014
! Ticket 2200.  Context from SET REGION should not
! apply in named-repeat loop.  The loop would run,
! but returned values of 0.
 
let a = b
set region/i=20:30
repeat/name=b/range=1:3 (say `a`)
!-> REPEAT: B:1
 !-> MESSAGE/CONTINUE 1
1
!-> REPEAT: B:2
 !-> MESSAGE/CONTINUE 2
2
!-> REPEAT: B:3
 !-> MESSAGE/CONTINUE 3
3
 
can region
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_label_backspace
! err69_label_backspace
! Ticket 2203:  \\ before a character backspaces before
! making the character. This broke in the 64-bit versions.
 
plot/vs/nolab {0,1},{0,1}
label .5 .5 0 0 1 "El Nin\\^@MA45@SRo\!"
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_isready_and_regridding
! err69_isready_and_regridding.jnl
! Ticket 2204: A `var,return=isready` sends Ferret into a hanged
! state after other contexts have been defined
 
can dat/all
 
! create & load a file with a Gregorian time axis
def ax/t/unit=days/t0=1-jan-1979 tax_g = {15,45,75,105,135}
let a = t[gt=tax_g]
save/clob/file=a.nc a
can var a
can ax tax_g
use a.nc
 
! create a variable on a Julian time axis
def ax/edge/t=1-feb-1980:1-feb-2003/np=276/cal=julian/unit="hour"/t0=1-jan-1900 tax_j
let b = t[gt=tax_j]
 
! put the Gregorian data on the Julian axis
let a2 = a
let a2_on_b = a2[gt=b]
 
! create a climatological axis (Julian)
def ax/t/unit=days/t0=1-jan-0001/modulo=365.25/cal=julian tax_jc = {15.5,45.125,74.75,105.25,135.75,166.25,196.75,227.75,258.25,288.75,319.25,349.75}
 
let b_one = missing(1+0*b,1)      !set everything to 1
let nyr = b_one[gl=tax_jc@modsum] !# years that include each month
 
! Execute some commands which put things into context storage
 
say `a2_on_b,r=title`
 !-> MESSAGE/CONTINUE A2[GT=B]
A2[GT=B]
say `nyr[l=1]`
 !-> MESSAGE/CONTINUE 23
23
 
! This got us into a weird hanged state
IF `a2_on_b,r=isready` THEN
 !-> IF 1         THEN
ENDIF
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_vtree_and_uvar_regrid
! err69_vtree_and_uvar_regrid.jnl
! Ticket 2206: This lead to a crash.
! 10/9/2014
 
let a = t[gt=1:2:1]
let b2 = a
let c = b2[gt=a]
GO bn_vtree.sub c
/TREE=ALL
   C = B2[GT=A]
     B2 = A
       regrid to A = T[GT=1:2:1]
       A = T[GT=1:2:1]
/TREE=USER
   C = B2[GT=A]
     B2 = A
       regrid to A = T[GT=1:2:1]
       A = T[GT=1:2:1]
/TREE=FILE
c is ready and AVAILABLE
************************
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_vtree_cancel_axis
! err69_vtree_cancel_axis
! Ticket 2201: After a return=isready,
! cannot cancel the axis used by the var
! 10-Oct-2014
 
define axis/x=0:360:1 xax1
define axis/x=0:360:10 xax2
 
let a = x[gx=xax1]
say `a,return=title`
 !-> MESSAGE/CONTINUE X[GX=XAX1]
X[GX=XAX1]
 
let b = a[gx=xax2]
say `b,return=isready`
 !-> MESSAGE/CONTINUE 1
1
 
cancel var a b
cancel axis xax1
cancel axis xax2
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err69_isready_bugs
! err69_isready_bugs.jnl
! Tickets 2201 and 2215
! updated error script 12/14 *sh* - to ensure that bench log file
! has verification of this problem and its fix, as well as the bench error file
 
! ticket 2201: isready operation meant we couldn't cancel the second axis
 
def ax/x=0:360:1 xax_isready_1
def ax/x=0:360:10 xax_isready_2
let a = x[gx=xax_isready_1]
say `a,r=title`
 !-> MESSAGE/CONTINUE X[GX=XAX_ISREADY_1]
X[GX=XAX_ISREADY_1]
let b = a[gx=xax_isready_2]
load b
say `b,r=isready`
 !-> MESSAGE/CONTINUE 1
1
 
 
can var a
can axis xax_isready_1
can var b
can axis xax_isready_2
 
! 12/14 additions:
show grid/dynamic             ! look for "err: grid over-allocated" messages
No dynamic grids
    no implicit grids
No dynamic axes
    no implicit axes
show axis xax_isready_1, xax_isready_2   ! did they both get canceled?
 name       axis              # pts   start                end
 
! Ticket 2215, only with an unreleased Ferret; the first fix to 2201.
 
let a = x[gx=1:3:1]
let b = a - a[gx=a]
let c = 1
let/unit="m" f = b*c
say `f,r=isready`
 !-> MESSAGE/CONTINUE 1
1
 
say `f,r=unit`
 !-> MESSAGE/CONTINUE m
m
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err691_substring_arg
! err693_substring_arg
! ACM 12/10/2014
! ticket 2210. Argument checking was not done for the SUBSTRING function
 
set mode ignore
list substring("hello",1,-2)
list substring("hello",1,-3)
 
set mode/last ignore
*** Running ferret script: bn_append_dsg.jnl
! bn_append_dsg.jnl
!From SOCAT 3: appending to a dsg file where the new variable is on the obs
! dimension. THe file has no coordinate variable, and we want to keep it that way.
! Ferret needs to detect the dimension-only axis and keep it as-is. Do not upcase,
! do not write a coordinate variable.
!
! Contains the metadata variables, global attributes, and incoming variables.
! Where we recompute some of the incoming variables and append them to the file,
! the values in the file are replaced.
!
!  Argument is a file name; the single-cruise dsg file from the data entry
!
! We append more variables to the file, using the same obs dimension.
! NOTE With the fix for ticket 2241, we need to add CANCEL MODE UPCASE.
 
! 2/13/2019, updates for DSG-enabled Ferret
!   Changing the data in test_save_dsg.nc, to make the lon360 computation more obvious
!   List the data at the end of this script Note in DSG-enabled Ferret this works
!   when the new data is a LET/D variable on the dataset's obs grid or feature-grid.
 
 
sp rm test_save_dsg.nc
sp cp data/test_save_dsg_in.nc test_save_dsg.nc
 
use test_save_dsg.nc
 
cancel mode upcase
 
! Lon in 0-360
let/D=1/like=longitude lon360 = IF longitude LT 0 THEN longitude+360 else longitude
cancel attribute/output lon360.axis
cancel attribute/output lon360.actual_range
define attribute/output lon360.history = "added to test_save_dsg.nc"
 
save/quiet/append/file=test_save_dsg.nc lon360
 
! The longitude and lon360 variables should have the same lowercase (obs) dimension.
 
sp ncdump -h test_save_dsg.nc
netcdf test_save_dsg {
dimensions:
	trajectory = 1 ;
	string_length = 12 ;
	obs = 25 ;
	char_length = 1 ;
variables:
	char expocode(trajectory, string_length) ;
		expocode:cf_role = "trajectory_id" ;
	char cruiseName(trajectory, string_length) ;
	char vesselName(trajectory, string_length) ;
	char scienceGroup(trajectory, string_length) ;
	char origDataRef(trajectory, string_length) ;
	char socatDOI(trajectory, string_length) ;
	char socatDOIHRef(trajectory, string_length) ;
	double rowSize(trajectory) ;
		rowSize:sample_dimension = "obs" ;
		rowSize:long_name = "Number of Observations" ;
	double longitude(obs) ;
		longitude:missing_value = -1.e+34 ;
		longitude:_FillValue = -1.e+34 ;
		longitude:units = "degrees_east" ;
		longitude:long_name = "longitude" ;
		longitude:standard_name = "longitude" ;
		longitude:axis = "X" ;
	double latitude(obs) ;
		latitude:missing_value = -1.e+34 ;
		latitude:_FillValue = -1.e+34 ;
		latitude:units = "degrees_north" ;
		latitude:long_name = "latitude" ;
		latitude:standard_name = "latitude" ;
		latitude:axis = "Y" ;
	double time(obs) ;
		time:units = "seconds since 1970-01-01 00:00:00" ;
		time:axis = "T" ;
		time:time_origin = "1-JAN-1970" ;
		time:standard_name = "time" ;
	double var(obs) ;
		var:missing_value = -1.e+34 ;
		var:_FillValue = -1.e+34 ;
		var:long_name = "Variable" ;
		var:units = "Deg C" ;
	double lon360(obs) ;
		lon360:missing_value = -1.e+34 ;
		lon360:_FillValue = -1.e+34 ;
		lon360:units = "degrees_east" ;
		lon360:long_name = "longitude" ;
		lon360:standard_name = "longitude" ;
		lon360:history = "added to test_save_dsg.nc" ;

// global attributes:
		:History = "CruiseDsgNcFile 1.0 with axis and actual_range attributes" ;
		:featureType = "Trajectory" ;
		:Conventions = "CF-1.6" ;
		:geospatial_lon_min = 7.7 ;
		:geospatial_lon_max = 7.4 ;
		:geospatial_lat_min = 2.59 ;
		:geospatial_lat_max = 2.66 ;
		:time_coverage_start = "2010-01-01T00:00:00Z" ;
		:time_converage_end = "2010-01-13T00:00:00Z" ;
		:history = "FERRET V7.441 (DSG: beta/debug) 13-Feb-19FERRET V7.6  DD-MON-YY" ;
}
 
! List it, in dsg-listing format.  Compare longitude and lon360
can var/all
can data/all
use test_save_dsg.nc
list lon360
   DATA SET: ./test_save_dsg.nc
 EXPOCODE   is Trajectory-id
 LON360     is longitude (degrees_east)
    FEATURE  EXPOCODE    LONGITUDE  LATITUDE            TIME      LON360
 
     1     31B520060606     170.5W    1.241N   01-MAR-2010 00:00   189.5
     1     31B520060606     171.5W    1.241N   01-MAR-2010 12:00   188.5
     1     31B520060606    170.45W    3.241N   02-MAR-2010 00:00   189.6
     1     31B520060606     175.4W    4.246N   02-MAR-2010 12:00   184.6
     1     31B520060606     177.4W    4.248N   03-MAR-2010 00:00   182.6
     1     31B520060606    170.35W    2.241N   03-MAR-2010 12:00   189.7
     1     31B520060606    174.35E    2.241N   04-MAR-2010 00:00   174.3
     1     31B520060606       170W    2.241N   04-MAR-2010 12:00   190.0
     1     31B520060606    172.15W     2.24N   05-MAR-2010 00:00   187.8
     1     31B520060606    171.35W     3.24N   05-MAR-2010 12:00   188.7
     1     31B520060606     174.5W    3.241N   06-MAR-2010 00:00   185.5
     1     31B520060606    170.65W    3.241N   06-MAR-2010 12:00   189.3
     1     31B520060606     173.1W     4.25N   07-MAR-2010 00:00   186.9
     1     31B520060606     173.9W    4.251N   07-MAR-2010 12:00   186.1
     1     31B520060606    174.75W    5.249N   08-MAR-2010 00:00   185.2
     1     31B520060606    175.55W    5.247N   08-MAR-2010 12:00   184.4
     1     31B520060606     176.4W    5.245N   09-MAR-2010 00:00   183.6
     1     31B520060606     175.4W    7.243N   09-MAR-2010 12:00   184.6
     1     31B520060606     174.4W    7.238N   10-MAR-2010 00:00   185.6
     1     31B520060606    173.35W    1.241N   10-MAR-2010 12:00   186.7
     1     31B520060606    172.35W    1.241N   11-MAR-2010 00:00   187.7
     1     31B520060606     171.3W    5.253N   11-MAR-2010 12:00   188.7
     1     31B520060606    178.85E    5.251N   12-MAR-2010 00:00   178.8
     1     31B520060606    177.95E    7.236N   12-MAR-2010 12:00   177.9
     1     31B520060606       179E    7.234N   13-MAR-2010 00:00   179.0
 
set mode/last upcase
 
*** Running ferret script: bn_global_atts.jnl
! bn_global_atts
! NOTE With the fix for ticket 2241, we need to add CANCEL MODE UPCASE.
! Note With auto-detection of DSG files, this is detected as an invalid DSG.
! Ignore it's dsg-ness.
 
cancel mode upcase
 
sp cp data/global.nc  global_copy.nc
use/feature=none global_copy.nc
! Lon in 0-360
let/title="longitude"/units="degrees_east" lon360 = IF longitude LT 0 THEN longitude+360 else longitude
define attribute/output lon360.ioos_category = "Location"
define attribute/output lon360.standard_name = "Longitude"
define attribute/output lon360.history = "added to test_save_dsg.nc"
save/quiet/append/file=global_copy.nc lon360
sp ncdump -h data/global.nc
netcdf global {
dimensions:
	trajectory = 1 ;
	string_length = 33 ;
	obs = 25 ;
	char_length = 1 ;
variables:
	char expocode(trajectory, string_length) ;
		expocode:cf_role = "trajectory_id" ;
	char cruiseName(trajectory, string_length) ;
	char vesselName(trajectory, string_length) ;
	char scienceGroup(trajectory, string_length) ;
	char origDataRef(trajectory, string_length) ;
	char socatDOI(trajectory, string_length) ;
	char socatDOIHRef(trajectory, string_length) ;
	double rowSize(trajectory) ;
		rowSize:sample_dimension = "obs" ;
		rowSize:long_name = "Number of Observations" ;
	double longitude(obs) ;
		longitude:missing_value = -1.e+34 ;
		longitude:_FillValue = -1.e+34 ;
		longitude:units = "degrees_east" ;
		longitude:long_name = "longitude" ;
		longitude:standard_name = "longitude" ;
		longitude:axis = "X" ;
		longitude:actual_range = -92.766, -92.7472 ;
		longitude:ioos_category = "Location" ;

// global attributes:
		:history = "CruiseDsgNcFile 1.0 .10/2017 add axis and actual_range attributes" ;
		:featureType = "Trajectory" ;
		:Conventions = "Some other conventions" ;
		:geospatial_lon_min = -92.77 ;
		:geospatial_lon_max = -92.74 ;
		:geospatial_lat_min = 20.04 ;
		:geospatial_lat_max = 29.07 ;
		:time_coverage_start = "2006-06-10T23:48:00Z" ;
		:time_converage_end = "2006-06-11T00:12:00Z" ;
}
sp ncdump -h global_copy.nc
netcdf global_copy {
dimensions:
	trajectory = 1 ;
	string_length = 33 ;
	obs = 25 ;
	char_length = 1 ;
variables:
	char expocode(trajectory, string_length) ;
		expocode:cf_role = "trajectory_id" ;
	char cruiseName(trajectory, string_length) ;
	char vesselName(trajectory, string_length) ;
	char scienceGroup(trajectory, string_length) ;
	char origDataRef(trajectory, string_length) ;
	char socatDOI(trajectory, string_length) ;
	char socatDOIHRef(trajectory, string_length) ;
	double rowSize(trajectory) ;
		rowSize:sample_dimension = "obs" ;
		rowSize:long_name = "Number of Observations" ;
	double longitude(obs) ;
		longitude:missing_value = -1.e+34 ;
		longitude:_FillValue = -1.e+34 ;
		longitude:units = "degrees_east" ;
		longitude:long_name = "longitude" ;
		longitude:standard_name = "longitude" ;
		longitude:axis = "X" ;
		longitude:actual_range = -92.766, -92.7472 ;
		longitude:ioos_category = "Location" ;
	double lon360(obs) ;
		lon360:missing_value = -1.e+34 ;
		lon360:_FillValue = -1.e+34 ;
		lon360:long_name = "longitude" ;
		lon360:units = "degrees_east" ;
		lon360:ioos_category = "Location" ;
		lon360:standard_name = "Longitude" ;
		lon360:history = "added to test_save_dsg.nc" ;

// global attributes:
		:history = "CruiseDsgNcFile 1.0 .10/2017 add axis and actual_range attributesFERRET V7.6  DD-MON-YY" ;
		:featureType = "Trajectory" ;
		:Conventions = "Some other conventionsCF-1.6" ;
		:geospatial_lon_min = -92.77 ;
		:geospatial_lon_max = -92.74 ;
		:geospatial_lat_min = 20.04 ;
		:geospatial_lat_max = 29.07 ;
		:time_coverage_start = "2006-06-10T23:48:00Z" ;
		:time_converage_end = "2006-06-11T00:12:00Z" ;
}
 
! This dataset has global attributes history and Conventions that include
! a Ferret version and CF version that Ferret will replace.
 
sp ncgen -o anew_global.nc data/anew_global.cdl
use anew_global.nc
sh att .
     attributes for dataset: ./anew_global.nc
 ..history = Subset of etopo20,
 FERRET V6.71    9-May-14 
 ..Conventions = Existing conventions note, CF-1.0 
let var = 8
save/append/file=anew_global.nc  var
can dat/all; use anew_global.nc
sh att .
     attributes for dataset: ./anew_global.nc
 ..history = Subset of etopo20,
 FERRET V7.6  DD-MON-YY 
 ..Conventions = Existing conventions note, , CF-1.6 
 
 
set mode/last upcase
 
*** Running ferret script: bn_conventions_history.jnl
! bn_conventions_history.jnl
! ticket 2169:
! Write conventions CF-1.6
! When appending to the Conventions and history
! attribute, add the new stuff with a comma and newline.
 
sp cp data/conventions_history_in.nc conventions_history.nc
use conventions_history
!
!  The existing global attributes
sh att .
     attributes for dataset: ./conventions_history.nc
 ..history = The history of the file 
 ..Conventions = Conventions for variables named V2 
!
! Write to the file
let v3 = v1+v2
save/append/file=conventions_history.nc v3
can dat/all; use conventions_history
!
! The new attibutes
sh att .
     attributes for dataset: ./conventions_history.nc
 ..history = The history of the fileFERRET V7.6  DD-MON-YY 
 ..Conventions = Conventions for variables named V2CF-1.6 
*** Running ferret script: bn_center_key_labels.jnl
! bn_center_key_labels
!  6/2014
!
! Arguments to /KEY qualifier on color plots
! /CENTERLABEL  for label between lines on colorbar
! /HORIZONTAL   for horizontal key
 
use levitus_climatology.cdf
shade/lev=10/key=cent,horiz temp
fill/lev=10v/key=cent temp
 
! Ribbon plots and all three keywords: centerlab, horizontal, continuous
let/title=xpts xpts = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,\
16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35}
let/title=ypts ypts = { 9.04,8.67,8.96,9.29,9.18,9.42,9.43,\
9.33,9.19,9.22,9.12,9.36,9.22,9.04,8.92,9.00,8.59,8.31,8.69,\
8.20,8.86,7.98,7.80,8.29,7.94,8.05,7.85,7.55,7.56,6.82,7.04,\
6.66,6.56,7.36,6.52}
let/title=colors  var =  {\
1.5,1.6,1.8,2.5,2.6,3.7,3.8,14.9,14.1,5.3,16.1,16.2,17.3,\
17.4,8.4,8.2,9.5,9.1,10.1,10.2,12.2,12.6,1.7,1.1,5.2,5.3,\
5.4,13.6,13.7,14.8,14.2,14.9,14.7,14.6,14.5}
RIBBON/vs/line/thick/lev=(1,20,1)/fast/pal=ten_by_levels/key=center,horiz,cont xpts,ypts,var
 
! Automatically restore non-continuous key, non-center, vertical
RIBBON/vs/line/thick/lev=(1,20,1)/fast/pal=ten_by_levels/key xpts,ypts,var
 
! Polygons: the polymark script needs multiple key qualifiers to be in quotes.
use coads_climatology
def axis/x=0:360:5 xq
def axis/y=-90:90:4 yq
let fsst =  sst[l=1,gx=xq,gy=yq]
 
let lon = xsequence(x[gx=xq] + 0*y[gy=yq])
let lat = xsequence(0*x[gx=xq] + y[gy=yq])
shade/nokey/pal=white/nolab/axes=0,0,0,0 fsst  ! set up
 
go polymark poly/key="horiz,center"/title="polygons"/lev=(-inf)(4,26,1)(inf), lon, lat, xsequence(fsst), square, 0.4
 
can data coads_climatology
 
! Automatically restore regular handling of levels
shade temp
 
*** Running ferret script: bn_wgt_transform.jnl
! bn_wgt_transform.jnl  test new @WGT transform,
! returns weights used in the equiv. average or integral transform
! ACM 7/2014
 
! Define an XYT grid
 
def axis/x=2:360:2/units=degrees_east x2
def axis/y=-89:89:2/units=degrees_north y2
let var = x[gx=x2] + y[gy=y2] + t[gt=month_irreg]
let weights= var[x=@wgt,y=@wgt,t=@wgt]
 
! Varies in y with latitude correction
shade/l=1 weights
 
! Sum of xy transform is the surface area of the earth, meters
let weights= var[x=@wgt,y=@wgt]
list/l=1 weights[i=@sum,j=@sum]
             VARIABLE : VAR[X=@WGT,Y=@WGT]
             LONGITUDE: 1E to 1E(361) (XY summed)
             LATITUDE : 90S to 90N (XY summed)
             TIME     : 16-JAN 12:00
          5.101E+14
 
! Varies in T because of irregular t axis
shade/x=1 weights
 
 
! The result t=@WGT returned in seconds
let mywt = var[t=@wgt]
 
let secperday = 24*3600
list/x=1/y=1 mywt, mywt/secperday
             TIME: 01-JAN 00:00 to 31-DEC 05:49
             LONGITUDE: 2E
             LATITUDE: 1N
 Column  1: MYWT is VAR[T=@WGT]
 Column  2: EX#2 is MYWT/SECPERDAY
                         MYWT   EX#2
16-JAN 12      /  1:  2678400.  31.00
15-FEB 02      /  2:  2440152.  28.24
15-MAR 17      /  3:  2678400.  31.00
15-APR 05      /  4:  2592000.  30.00
15-MAY 17      /  5:  2678400.  31.00
15-JUN 05      /  6:  2592000.  30.00
15-JUL 17      /  7:  2678400.  31.00
15-AUG 17      /  8:  2678400.  31.00
15-SEP 05      /  9:  2592000.  30.00
15-OCT 17      / 10:  2678400.  31.00
15-NOV 05      / 11:  2592000.  30.00
15-DEC 17      / 12:  2678400.  31.00
 
! Test reusing results. (ticket 2183)
use gt4d011.cdf
! The last value is a partial grid cell
list/y=1.5/x=130w/z=8:43.5/t=1-sep-1982 temp[z=@wgt]
             VARIABLE : TEMPERATURE (deg. C)
                        weights for avg,int on Z
             FILENAME : gt4d011.cdf
             SUBSET   : 5 points (DEPTH (m))
             LONGITUDE: 130.5W
             LATITUDE : 1.5N
             TIME     : 29-AUG-1982 16:00
             130.5W 
             100
 5     / 1:   2.00
 15    / 2:  10.00
 25    / 3:  10.00
 35    / 4:  10.00
 45    / 5:   3.50
 
! Now load the result over a larger region
list/y=1.5/x=130w/z=0:82/t=1-sep-1982 temp[z=@wgt]
             VARIABLE : TEMPERATURE (deg. C)
                        weights for avg,int on Z
             FILENAME : gt4d011.cdf
             SUBSET   : 9 points (DEPTH (m))
             LONGITUDE: 130.5W
             LATITUDE : 1.5N
             TIME     : 29-AUG-1982 16:00
             130.5W 
             100
 5     / 1:  10.00
 15    / 2:  10.00
 25    / 3:  10.00
 35    / 4:  10.00
 45    / 5:  10.00
 55    / 6:  10.00
 65    / 7:  10.00
 75    / 8:  10.00
 85    / 9:   2.00
 
! This finds the previous result in memory - needs to
! reuse the correct one.
 
list/y=1.5/x=130w/z=8:43.5/t=1-sep-1982 temp[z=@wgt]
             VARIABLE : TEMPERATURE (deg. C)
                        weights for avg,int on Z
             FILENAME : gt4d011.cdf
             SUBSET   : 5 points (DEPTH (m))
             LONGITUDE: 130.5W
             LATITUDE : 1.5N
             TIME     : 29-AUG-1982 16:00
             130.5W 
             100
 5     / 1:   2.00
 15    / 2:  10.00
 25    / 3:  10.00
 35    / 4:  10.00
 45    / 5:   3.50
*** Running ferret script: bn_show_outfile.jnl
! bn_show_outfile
! Adding tests for SHOW/OUTFILE=
! Previously only tests when SHOW/XML/OUTFILE=
!  Bugs in SHOW/OUTFILE reported in ticket 2194
!  8/18/2014
 
! test various combinations of /append and /clobber
 
!can mode verify
 
! show axis/outfile
 
 
sho ax/clobber/outfile=a.txt month_irreg
sho ax/clobber/outfile=a.txt month_irreg
 
SAY ---------------- Just axis month_irreg
---------------- Just axis month_irreg
sp cat a.txt
 name       axis              # pts   start                end
 MONTH_IRREG TIME              12mi   16-JAN 12:00         15-DEC 17:49
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 
show axis/append/outfile=a.txt PS*
 
SAY ---------------- appending all axes starting with PS
---------------- appending all axes starting with PS
sp cat a.txt
 name       axis              # pts   start                end
 MONTH_IRREG TIME              12mi   16-JAN 12:00         15-DEC 17:49
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 name       axis              # pts   start                end
 
! show grid/outfile
 
use coads_climatology
show grid/clobber/outfile=a.txt sst
 
SAY ---------------- Just the grid of sst
---------------- Just the grid of sst
sp cat a.txt
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
 
! show var/outfile
 
use coads_climatology
let two = 2
let myvar = sst*2
show var/clobber/outfile=a.txt myvar, two
 
SAY ---------------- show var output from two user vars
---------------- show var output from two user vars
sp cat a.txt
 MYVAR = SST*2
 TWO = 2
cancel var/all
 
! show data/outfile
 
show data/append/outfile=a.txt
 
SAY ---------------- appending show data
---------------- appending show data
sp cat a.txt
 MYVAR = SST*2
 TWO = 2
     currently SET data sets:
    1> ./data/coads_climatology.cdf  (default)
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:3
 
 
! combinations of /append and /clobber
 
show data/clobber/outfile=a.txt
show data/clobber/outfile=a.txt
 
SAY ---------------- Just show data, two show data/clobber commands in a row
---------------- Just show data, two show data/clobber commands in a row
sp cat a.txt
     currently SET data sets:
    1> ./data/coads_climatology.cdf  (default)
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:3
 
 
show grid/clobber/outfile=a.txt sst
 
SAY ---------------- Just grid of sst
---------------- Just grid of sst
sp cat a.txt
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
 
use coads_climatology
use levitus_climatology
 
show data/clobber/outfile=a.txt 1
 
SAY ---------------- Just dataset 1
---------------- Just dataset 1
sp cat a.txt
     currently SET data sets:
    1> ./data/coads_climatology.cdf
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:3
 
 
show data/append/outfile=a.txt levitus_climatology
 
SAY ---------------- appending datset 2 by name
---------------- appending datset 2 by name
sp cat a.txt
     currently SET data sets:
    1> ./data/coads_climatology.cdf
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:3
 
     currently SET data sets:
    2> ./data/levitus_climatology.cdf  (default)
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                      1:160     1:90      1:1       ...
 
show grid/clobber/outfile=a.txt PS3*
 
SAY ---------------- only showing all grids starting with PS3
---------------- only showing all grids starting with PS3
sp cat a.txt
 
SAY ---------------- tests sending output of vtree to a file
---------------- tests sending output of vtree to a file
GO bn_vtree_outfile
! bn_tree_outfile.jnl
 
! 8/2014 -- demonstrate SHOW VARIABLE/TREE/OUTFILE
! 11/15 -- default for DEFINE DATA/AGG has become /T instead of /E
 
CANCEL DATA/ALL
! pure abstract variable -- no dataset
let a = 1
 
!
show var/tree/outfile=a.txt/clobber a
show var/tree/outfile=a.txt/clobber a
sp cat a.txt
   A = 1
 
let b = 1
let c = SIN(b)
show var/tree/outfile=a.txt/clobber c
sp cat a.txt
   C = SIN(B)
     B = 1
 
! create dummy datasets so we'll have named file variables to play with
let fv1 = 1
let fvx = x[i=1:3]
let fvz = Z[k=1:3]
SAVE/CLOBBER/QUIET/FILE=my_file_vars.nc fv1, fvx, fvz
SAVE/CLOBBER/QUIET/FILE=other_file_vars.nc fv1
SAVE/CLOBBER/QUIET/FILE=another_file_vars.nc fv1
CAN VAR/ALL
use  my_file_vars, other_file_vars, another_file_vars
set data 1
 
! ================
 
! more pure abstract variables
let a = 1
let b = 1
let c = SIN(b)
go bn_vtree_outfile.sub c
/TREE=ALL
/TREE=USER
/TREE=FILE
c is ready and AVAILABLE
************************
   in default dataset my_file_vars
   C = SIN(B)
     B = 1
   in default dataset my_file_vars
   C = SIN(B)
     B = 1
/TREE=ALL
/TREE=USER
/TREE=FILE
fv1 is ready and AVAILABLE
************************
   in default dataset my_file_vars
   FV1
   FV1[d=my_file_vars]
/TREE=ALL
/TREE=USER
/TREE=FILE
a is ready and AVAILABLE
************************
   in default dataset my_file_vars
   A = FV1 + FVX
     FV1
     FVX
   in default dataset my_file_vars
   A = FV1 + FVX
   FV1[d=my_file_vars]
   FVX[d=my_file_vars]
   FV1[d=my_file_vars]
   FV1[d=other_file_vars]
   in default dataset my_file_vars
   A = FV1[D=1] - FV1[D=2]
     FV1
     FV1[d=other_file_vars]
   in default dataset my_file_vars
   A = FV1[D=1] - FV1[D=2]
     FV1
     FV1[d=other_file_vars]
   in default dataset other_file_vars
   A = FV1[D=1] - FV1[D=2]
     FV1[d=my_file_vars]
     FV1
********************************
/TREE=ALL
/TREE=USER
/TREE=FILE
the problem is UNKNOWN VARIABLE: NOEXIST
************************
   in default dataset my_file_vars
   NOEXIST ??			<== UNKNOWN VARIABLE ******
   in default dataset my_file_vars
   NOEXIST ??			<== UNKNOWN VARIABLE ******
   *unknown variable: NOEXIST
/TREE=ALL
/TREE=USER
/TREE=FILE
the problem is UNKNOWN DATASET: V[D=NOEXIST]
************************
   in default dataset my_file_vars
   V[D=NOEXIST] ??			<== UNKNOWN DATASET ******
   in default dataset my_file_vars
   V[D=NOEXIST] ??			<== UNKNOWN DATASET ******
   *unknown dataset: V[D=NOEXIST]
/TREE=ALL
/TREE=USER
/TREE=FILE
the problem is UNKNOWN DATASET: NOVAR[D=NODSET]
************************
   in default dataset my_file_vars
   NOVAR[D=NODSET] ??			<== UNKNOWN DATASET ******
   in default dataset my_file_vars
   NOVAR[D=NODSET] ??			<== UNKNOWN DATASET ******
   *unknown dataset: NOVAR[D=NODSET]
/TREE=ALL
/TREE=USER
/TREE=FILE
the problem is UNKNOWN VARIABLE: NOEXIST
************************
   in default dataset my_file_vars
   B = NOEXIST
     NOEXIST ??			<== UNKNOWN VARIABLE ******
   in default dataset my_file_vars
   B = NOEXIST
     NOEXIST ??			<== UNKNOWN VARIABLE ******
   *unknown variable: NOEXIST
/TREE=ALL
/TREE=USER
/TREE=FILE
RESHAPE(fvx,fvz) is ready and AVAILABLE
************************
   in default dataset my_file_vars
   FVX
   FVZ
   FVX[d=my_file_vars]
   FVZ[d=my_file_vars]
/TREE=ALL
/TREE=USER
/TREE=FILE
fv1z is ready and AVAILABLE
************************
   in default dataset my_file_vars
   FV1Z = FV1[GZ(FVZ)=ZPTS] + FVX
     FV1
       regrid to ZPTS = Z[Z=0:500:100]
       FVZ
     FVX
   in default dataset my_file_vars
   FV1Z = FV1[GZ(FVZ)=ZPTS] + FVX
       regrid to ZPTS = Z[Z=0:500:100]
   FV1[d=my_file_vars]
   FVZ[d=my_file_vars]
   FVX[d=my_file_vars]
/TREE=ALL
/TREE=USER
/TREE=FILE
fv1z is ready and AVAILABLE
************************
   in default dataset my_file_vars
   FV1Z = FV1[GZ(DEPTH)=ZPTS] + FVX
     FV1
       regrid to ZPTS = Z[Z=0:500:100]
       DEPTH = Z[G=FVZ]
     FVX
   in default dataset my_file_vars
   FV1Z = FV1[GZ(DEPTH)=ZPTS] + FVX
       regrid to ZPTS = Z[Z=0:500:100]
       DEPTH = Z[G=FVZ]
   FV1[d=my_file_vars]
   FVX[d=my_file_vars]
/TREE=ALL
/TREE=USER
/TREE=FILE
fv1z is ready and AVAILABLE
************************
   in default dataset my_file_vars
   FV1Z = FV1[GZ(DEPTH)=ZPTS] + FVX
     FV1
       regrid to ZPTS = Z[Z=0:500:100]
       DEPTH = Z[G=FVZ]+ 0*FVZ[K=1]
         FVZ
     FVX
   in default dataset my_file_vars
   FV1Z = FV1[GZ(DEPTH)=ZPTS] + FVX
       regrid to ZPTS = Z[Z=0:500:100]
       DEPTH = Z[G=FVZ]+ 0*FVZ[K=1]
   FV1[d=my_file_vars]
   FVZ[d=my_file_vars]
   FVX[d=my_file_vars]
/TREE=ALL
/TREE=USER
/TREE=FILE
the problem is UNKNOWN AUXILIARY VARIABLE: NOEXIST
************************
   in default dataset my_file_vars
   FV1Z = FV1[GZ(NOEXIST)=ZPTS] + FVX
       NOEXIST   (unknown auxiliary variable)
     FVX
   in default dataset my_file_vars
   FV1Z = FV1[GZ(NOEXIST)=ZPTS] + FVX
       NOEXIST   (unknown auxiliary variable)
   *unknown auxiliary variable: NOEXIST
   FVX[d=my_file_vars]
/TREE=ALL
/TREE=USER
/TREE=FILE
the problem is UNKNOWN VARIABLE: NOEXIST[GZ(DEPTH)=ZPTS]
************************
   in default dataset my_file_vars
   FV1Z = NOEXIST[GZ(DEPTH)=ZPTS] + FVX
     NOEXIST[GZ(DEPTH)=ZPTS] ??			<== UNKNOWN VARIABLE ******
       regrid to ZPTS = Z[Z=0:500:100]
       DEPTH = Z[G=FVZ]+ 0*FVZ[K=1]
         FVZ
     FVX
   in default dataset my_file_vars
   FV1Z = NOEXIST[GZ(DEPTH)=ZPTS] + FVX
     NOEXIST[GZ(DEPTH)=ZPTS] ??			<== UNKNOWN VARIABLE ******
       regrid to ZPTS = Z[Z=0:500:100]
       DEPTH = Z[G=FVZ]+ 0*FVZ[K=1]
   *unknown variable: NOEXIST[GZ(DEPTH)=ZPTS]
   FVZ[d=my_file_vars]
   FVX[d=my_file_vars]
/TREE=ALL
/TREE=USER
/TREE=FILE
the problem is UNKNOWN VARIABLE: NOEXIST[GZ(UNKNOWN_AUX)=ZPTS]
************************
   in default dataset my_file_vars
   FV1Z = NOEXIST[GZ(UNKNOWN_AUX)=ZPTS] + FVX
     NOEXIST[GZ(UNKNOWN_AUX)=ZPTS] ??			<== UNKNOWN VARIABLE ******
       regrid to ZPTS = Z[Z=0:500:100]
       UNKNOWN_AUX   (unknown auxiliary variable)
     FVX
   in default dataset my_file_vars
   FV1Z = NOEXIST[GZ(UNKNOWN_AUX)=ZPTS] + FVX
     NOEXIST[GZ(UNKNOWN_AUX)=ZPTS] ??			<== UNKNOWN VARIABLE ******
       regrid to ZPTS = Z[Z=0:500:100]
       UNKNOWN_AUX   (unknown auxiliary variable)
   *unknown variable: NOEXIST[GZ(UNKNOWN_AUX)=ZPTS]
   *unknown auxiliary variable: UNKNOWN_AUX
   FVX[d=my_file_vars]
/TREE=ALL
/TREE=USER
/TREE=FILE
fv1 is ready and AVAILABLE
************************
   in default dataset my_agg
   FV1   (aggregate variable)
     FV1[d=my_file_vars]
     FV1[d=other_file_vars]
     FV1[d=another_file_vars]
   in default dataset my_agg
   FV1   (aggregate variable)
 
   FV1[d=my_file_vars]
   FV1[d=other_file_vars]
   FV1[d=another_file_vars]
/TREE=ALL
/TREE=USER
/TREE=FILE
fvx is ready and AVAILABLE
************************
   in default dataset my_uvar_agg
   FVX   (aggregate variable)
     FVX[d=my_file_vars]
     FVX[d=other_file_vars] = FV1 + X[GX=FVX[D=1],I=1:3]
       FV1[d=other_file_vars]
     FVX[d=another_file_vars] = 2*FV1 + X[GX=FVX[D=1],I=1:3]
       FV1[d=another_file_vars]
   in default dataset my_uvar_agg
   FVX   (aggregate variable)
     FVX[d=other_file_vars] = FV1 + X[GX=FVX[D=1],I=1:3]
     FVX[d=another_file_vars] = 2*FV1 + X[GX=FVX[D=1],I=1:3]
 
   FVX[d=my_file_vars]
   FV1[d=other_file_vars]
   FV1[d=another_file_vars]
/TREE=ALL
/TREE=USER
/TREE=FILE
the problem is ILLEGAL RECURSIVE VARIABLES: P1
************************
   in default dataset my_uvar_agg
   P0 = S1 + P1
     S1 ??			<== UNKNOWN VARIABLE ******
     P1 = S2 + P2
       S2 ??			<== UNKNOWN VARIABLE ******
       P2 = S3 + P3
         S3 ??			<== UNKNOWN VARIABLE ******
         P3 = P1 + S3
           P1 =   *** WARNING: RECURSIVE DEFINITION.  See above
           S3 ??			<== UNKNOWN VARIABLE ******
   in default dataset my_uvar_agg
   P0 = S1 + P1
     S1 ??			<== UNKNOWN VARIABLE ******
     P1 = S2 + P2
       S2 ??			<== UNKNOWN VARIABLE ******
       P2 = S3 + P3
         S3 ??			<== UNKNOWN VARIABLE ******
         P3 = P1 + S3
           P1 =   *** WARNING: RECURSIVE DEFINITION.  See above
           S3 ??			<== UNKNOWN VARIABLE ******
   *unknown variable: S1
   *unknown variable: S2
   *unknown variable: S3
   *unknown variable: S3
/TREE=ALL
/TREE=USER
/TREE=FILE
the problem is UNKNOWN VARIABLE: S1
************************
   in default dataset my_uvar_agg
   P0 = S1 + P1
     S1 ??			<== UNKNOWN VARIABLE ******
     P1 = S2 + P2
       S2 ??			<== UNKNOWN VARIABLE ******
       P2 = S3 + P3
         S3 ??			<== UNKNOWN VARIABLE ******
         P3 = S1 + S3
           S1 ??			<== UNKNOWN VARIABLE ******
           S3 ??			<== UNKNOWN VARIABLE ******
   in default dataset my_uvar_agg
   P0 = S1 + P1
     S1 ??			<== UNKNOWN VARIABLE ******
     P1 = S2 + P2
       S2 ??			<== UNKNOWN VARIABLE ******
       P2 = S3 + P3
         S3 ??			<== UNKNOWN VARIABLE ******
         P3 = S1 + S3
           S1 ??			<== UNKNOWN VARIABLE ******
           S3 ??			<== UNKNOWN VARIABLE ******
   *unknown variable: S1
   *unknown variable: S2
   *unknown variable: S3
   *unknown variable: S1
   *unknown variable: S3
   in default dataset my_file_vars
   FV = FV1 + FV1 + FV1
   in default dataset my_uvar_agg
   FV = FV1 + FV1 + FV1
     FV1   (aggregate variable)
   in default dataset other_file_vars
   UV = FVX + FVX + FVX
     FVX = FV1 + X[GX=FVX[D=1],I=1:3]
   in default dataset my_uvar_agg
   UV = FVX + FVX + FVX
     FVX   (aggregate variable)
       FVX[d=other_file_vars] = FV1 + X[GX=FVX[D=1],I=1:3]
       FVX[d=another_file_vars] = 2*FV1 + X[GX=FVX[D=1],I=1:3]
***************************
/TREE=ALL
/TREE=USER
/TREE=FILE
v2 is ready and AVAILABLE
************************
   in default dataset my_uvar_agg
   V2 = V1 + B + A + A
     V1 = A  + B + B^2
       A = FV1[D=1] - FV1[D=2]
         FV1[d=my_file_vars]
         FV1[d=other_file_vars]
       B = C
         C = 1
     B =  (defined above)
     A =  (defined above)
   in default dataset my_uvar_agg
   V2 = V1 + B + A + A
     V1 = A  + B + B^2
       A = FV1[D=1] - FV1[D=2]
       B = C
         C = 1
     B =  (defined above)
     A =  (defined above)
   FV1[d=my_file_vars]
   FV1[d=other_file_vars]
/TREE=ALL
/TREE=USER
/TREE=FILE
v3 is ready and AVAILABLE
************************
   in default dataset my_uvar_agg
   V3 = A + V1 + B + A + A
     A = FV1[D=1] - FV1[D=2]
       FV1[d=my_file_vars]
       FV1[d=other_file_vars]
     V1 = A  + B + B^2
       A =  (defined above)
       B = C
         C = 1
     B =  (defined above)
   in default dataset my_uvar_agg
   V3 = A + V1 + B + A + A
     A = FV1[D=1] - FV1[D=2]
     V1 = A  + B + B^2
       A =  (defined above)
       B = C
         C = 1
     B =  (defined above)
   FV1[d=my_file_vars]
   FV1[d=other_file_vars]
/TREE=ALL
/TREE=USER
/TREE=FILE
the problem is UNKNOWN VARIABLE: F
************************
   in default dataset my_uvar_agg
   D = B + C
     B = FV1[D=MY_FILE_VARS]
       FV1[d=my_file_vars]
     C = 1
   A = F
     F ??			<== UNKNOWN VARIABLE ******
   NOEXIST ??			<== UNKNOWN VARIABLE ******
   E = 1
   FVX[d=my_file_vars]
   in default dataset my_uvar_agg
   D = B + C
     B = FV1[D=MY_FILE_VARS]
     C = 1
   A = F
     F ??			<== UNKNOWN VARIABLE ******
   NOEXIST ??			<== UNKNOWN VARIABLE ******
   E = 1
   *unknown variable: F
   FV1[d=my_file_vars]
   *unknown variable: NOEXIST
   FVX[d=my_file_vars]
/TREE=ALL
/TREE=USER
/TREE=FILE
the problem is UNKNOWN GRID: NOEXIST
************************
   in default dataset my_uvar_agg
   B = A[G=NOEXIST]
     A = I[I=1:5]
       regrid to NOEXIST ??		<== UNKNOWN GRID ******
   in default dataset my_uvar_agg
   B = A[G=NOEXIST]
     A = I[I=1:5]
       regrid to NOEXIST ??		<== UNKNOWN GRID ******
   *unknown grid: NOEXIST
/TREE=ALL
/TREE=USER
/TREE=FILE
the problem is ERROR IN EXPRESSION: A[X=45S]
************************
   in default dataset my_uvar_agg
   C = A[X=45S]
     A[X=45S]   *** WARNING: ERROR IN DEFINITION
   in default dataset my_uvar_agg
   C = A[X=45S]
     A[X=45S]   *** WARNING: ERROR IN DEFINITION
      *WARNING: syntax error: A[X=45S]
/TREE=ALL
/TREE=USER
/TREE=FILE
the problem is ERROR IN EXPRESSION: A[I=1,,J=2]
************************
   in default dataset my_uvar_agg
   D = A[I=1,,J=2]
     A[I=1,,J=2]   *** WARNING: ERROR IN DEFINITION
   in default dataset my_uvar_agg
   D = A[I=1,,J=2]
     A[I=1,,J=2]   *** WARNING: ERROR IN DEFINITION
      *WARNING: syntax error: A[I=1,,J=2]
/TREE=ALL
/TREE=USER
/TREE=FILE
the problem is ERROR IN EXPRESSION: A[P=1]
************************
   in default dataset my_uvar_agg
   E = A[P=1]
     A[P=1]   *** WARNING: ERROR IN DEFINITION
   in default dataset my_uvar_agg
   E = A[P=1]
     A[P=1]   *** WARNING: ERROR IN DEFINITION
      *WARNING: syntax error: A[P=1]
/TREE=ALL
/TREE=USER
/TREE=FILE
f is ready and AVAILABLE
************************
   in default dataset my_uvar_agg
   F = A[I=10]
     A = I[I=1:5]
   in default dataset my_uvar_agg
   F = A[I=10]
     A = I[I=1:5]
   in default dataset my_uvar_agg
   A = FVZ.LONG_NAME[D=1]
   in default dataset my_uvar_agg
   A = ..HISTORY[D=1]
 
 
*** Running ferret script: bn_date1900_array.jnl
! bn_date1900_array.jnl
! Let date1900 accept an array of date strings, returning a list
! of coordinate values, days since 1-jan-1900.
 
 
sh func/details date1900
DATE1900(formatted date)
    Convert date strings into Julian days since 1-Jan-1900 (integer days using Gregorian calendar)
        Axes of result:
          X: inherited from argument(s)
          Y: inherited from argument(s)
          Z: inherited from argument(s)
          T: inherited from argument(s)
          E: inherited from argument(s)
          F: inherited from argument(s)
    formatted date: dd-MMM-yy or dd-MMM-yyyy  (e.g. "20-Dec-00") (STRING)
        Influence on output axes:
          X: passed to result grid
          Y: passed to result grid
          Z: passed to result grid
          T: passed to result grid
          E: passed to result grid
          F: passed to result grid
 
! Function always worked just on one date string.
list date1900("01-jan-2001")
             VARIABLE : DATE1900("01-jan-2001")
          36890.
 
 
! Now the argument can be an array
let datestrings = {"01-jan-2001", "02-jan-2001", "30-Jul-2002"}
list date1900(datestrings)
             VARIABLE : DATE1900(DATESTRINGS)
             SUBSET   : 3 points (X)
 1   / 1:  36890.
 2   / 2:  36891.
 3   / 3:  37465.
 
def axis/t/units=days/t0=1-jan-1900 taxis = date1900(datestrings)
list t[gt=taxis]
             VARIABLE : T
                        axis TAXIS
             SUBSET   : 3 points (TIME)
 01-JAN-2001 00 / 1:  36890.
 02-JAN-2001 00 / 2:  36891.
 30-JUL-2002 00 / 3:  37465.
 
*** Running ferret script: bn_spawn_size.jnl
! bn_spawn_size.jnl
! Added 9/9/2014
! Fix for ticket 981
! Return the size of the result of a spawn, not
! the nominal abstract axis length.
 
! 1/2017 *acm* change this script so the results are always consistent,
! not depending on the contents of the directory which may change.
 
! Make some files to operate on
let a = x + 1
save/clobber/i=1:5/file=bn_spawn_size1.cdf a
save/clobber/i=1:5/file=bn_spawn_size2.cdf a
save/clobber/i=1:5/file=bn_spawn_size3.cdf a
save/clobber/i=1:5/file=bn_spawn_size4.cdf a
save/clobber/i=1:5/file=bn_spawn_size5.cdf a
 
list/clobber/i=1:7/file=bn_spawn_size02.dat a
list/clobber/i=1:7/file=bn_spawn_size04.dat a
list/clobber/i=1:7/file=bn_spawn_size06.dat a
list/clobber/i=1:7/file=bn_spawn_size08.dat a
list/clobber/i=1:7/file=bn_spawn_size10.dat a
list/clobber/i=1:7/file=bn_spawn_size12.dat a
list/clobber/i=1:7/file=bn_spawn_size14.dat a
 
! Previously these return=isize results returned 2000
 
let files = {spawn:"ls *bn_spawn_size*4.*"}
list files
             VARIABLE : {SPAWN:"ls *bn_spawn_size*4.*"}
             SUBSET   : 3 points (X)
 1   / 1:"bn_spawn_size04.dat"
 2   / 2:"bn_spawn_size14.dat"
 3   / 3:"bn_spawn_size4.cdf" 
say `files,return=isize`
 !-> MESSAGE/CONTINUE 3
3
 
! Evaluate size without loading the variable first
let datfiles = {spawn:"ls bn_spawn_size1*.dat"}
say `datfiles,return=isize`
 !-> MESSAGE/CONTINUE 3
3
 
! expression syntax
say `{spawn:"ls bn_spawn_size*.dat"},return=isize`
 !-> MESSAGE/CONTINUE 7
7
list {spawn:"ls bn_spawn_size*.dat"}
             VARIABLE : {SPAWN:"ls bn_spawn_size*.dat"}
             SUBSET   : 7 points (X)
 1   / 1:"bn_spawn_size02.dat"
 2   / 2:"bn_spawn_size04.dat"
 3   / 3:"bn_spawn_size06.dat"
 4   / 4:"bn_spawn_size08.dat"
 5   / 5:"bn_spawn_size10.dat"
 6   / 6:"bn_spawn_size12.dat"
 7   / 7:"bn_spawn_size14.dat"
 
! Test variables based on a function operating on output of a spawn.
! These already worked correctly, has a grid-changing function.
 
LET filesets = XCAT({spawn:"ls bn_spawn_size*.cdf"}, {spawn:"ls bn_spawn_size*.dat"})
say `filesets, return=isize`
 !-> MESSAGE/CONTINUE 12
12
 
let files = {spawn:"ls bn_spawn_size*.dat"}
let name_len = STRINDEX(files, "ze0")
say `name_len, return=isize`
 !-> MESSAGE/CONTINUE 7
7
 
! clean up
sp rm bn_spawn_size*.dat bn_spawn_size*.cdf
 
*** Running ferret script: bn_polygon_log.jnl
! bn_polygon_log.jnl
! polygon plots on a log axis need tests
 
let xsqr = YSEQUENCE({0,.1,.1,0})
let ysqr = YSEQUENCE({0,0,.1,.1})
let xpts = cos(x/10) + 2
let ypts = x/10+1
 
! Polygon plot
 
set view ul
polygon/title="NOT LOG"/i=1:100 xpts+xsqr, ypts+ysqr, x*x/10
 
! Poly/vlog and /hlog
! (known bug: Whats up with the colorbar labels?)
set view ur; poly/title=VLOG/i=1:100/vlog xpts+xsqr,ypts+ysqr,x*x/10
set view ll; poly/title=HLOG/i=1:100/hlog xpts+xsqr,ypts+ysqr,x*x/10
set view lr;poly/title=BOTH/i=1:100/vlog/hlog xpts+xsqr,ypts+ysqr,x*x/10
 
! These are errors - log of negative values on axis
 
set mode ignore
 
let ybad = x/10 - 1
let xbad = cos(x/10) + 0.8
 
can view
polygon/i=1:100/nolab xbad+xsqr,ybad+ysqr,x*x/10
 
poly/i=1:100/vlog xbad+xsqr,ybad+ysqr,x*x/10
poly/i=1:100/hlog xbad+xsqr,ybad+ysqr,x*x/10
 
set mode/last ignore
*** Running ferret script: bn694_bug_fixes.jnl
! bn694_bug_fixes
! test various fixes that went into version 6.94
! 11/2014 ACM
! 12/2014 *sh* added IF-THEN flow fixes, including review of past tickets
! 1/2015 *sh* added test for undetected bad dataset name in regrid target
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_upcase_quoted_name
! err693_upcase_quoted_name.jnl
! ticket 2050. Names are saved in uppercase
! form unless there are duplicates other than case.
! Then searching for the name in quotes looked
! only with a case-sensitive search.
 
let abc = 12
cancel mode upcase
 
save/file=aa.nc/clobber abc
can dat/all; can var/all
 
use aa.nc
! previously this failed to find the name.
list 'abc'
             VARIABLE : 12
             FILENAME : aa.nc
          12.00
 
set mode/last upcase
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_isready_hang
! err693_isready_hang.jnl
! ACM 12/10/2014
! ticket 2219.  The last of these commands caused Ferret to hang.
 
use gt4d011
def ax/t/t0="`u,r=t0`"/unit="`u,r=tunit`" time = t[gt=u]
 !-> def ax/t/t0="14-JAN-1980 14:00:00"/unit="hour" time = t[gt=u]
let a = u
IF `a,r=isready` THEN; let/title="`a,r=title`" a1 = a; ENDIF
 !-> IF 1         THEN
 !-> DEFINE VARIABLE/title="U" a1 = a
IF `a,r=isready` THEN; let/title="`a,r=title`" a2 = a; ENDIF
 !-> IF 1         THEN
 !-> DEFINE VARIABLE/title="U" a2 = a
IF `a,r=isready` THEN; let/title="`a,r=title`" a3 = a; ENDIF
 !-> IF 1         THEN
 !-> DEFINE VARIABLE/title="U" a3 = a
IF `a,r=isready` THEN; let/title="`a,r=title`" a4 = a; ENDIF
 !-> IF 1         THEN
 !-> DEFINE VARIABLE/title="U" a4 = a
IF `a,r=isready` THEN; let/title="`a,r=title`" a5 = a; ENDIF
 !-> IF 1         THEN
 !-> DEFINE VARIABLE/title="U" a5 = a
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_isready_dyn_grid_crash   ! 12/23/2014
let/unit="m" b = x[gx=1:5:1]
say "`b,r=unit`"     ! this causes dynamic grid of b to be created
 !-> MESSAGE/CONTINUE "m"
m
let c = x[gx=1:5:2]
let b2 = b+0*c[gx=b] ! dynamic grid of b exists, but not grid of c
VTREE b2
   B2 = B+0*C[GX=B]
     B = X[GX=1:5:1]
     C = X[GX=1:5:2]
       regrid to B = X[GX=1:5:1]
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_attr_in_gcfcn
! err693_attr_in_gcfcn.jnl
! ACM 12/10/2014
! bug 2220 varname.attname as an argument to grid-changing functions.
! All except the last of these caused various ungraceful stops.
 
let/units="m" a = 1
list is_element_of_str(a.units,{"m","a"})
             VARIABLE : IS_ELEMENT_OF_STR(A.UNITS,{"m","a"})
             X        : 1
          1.000
 
let/units="m" a = 1
let b = a.units
list is_element_of_str(b,{"m","a"})
             VARIABLE : IS_ELEMENT_OF_STR(B,{"m","a"})
             X        : 1
          1.000
 
 
use levitus_climatology
 
list is_element_of_str_n (temp.long_name, {"Temperature", "temp"})
             VARIABLE : IS_ELEMENT_OF_STR_N (TEMP.LONG_NAME, {"Temperature", "temp"})
             FILENAME : levitus_climatology.cdf
             X        : 1
          2.000
 
let a = temp.units
list is_element_of_str (a, {"Kelvin", "Celsius", "DEG C"})
             VARIABLE : IS_ELEMENT_OF_STR (A, {"Kelvin", "Celsius", "DEG C"})
             FILENAME : levitus_climatology.cdf
             X        : 1
          1.000
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_inconsistent_quote
! inconsistent interpretation of surrounding double quotes
! the original source of the problem is in PARSE_COMMAND
! arg_start and arg_end are set to skip surrounding quotation marks.
! But since this behavior permeates so many routines it is best to repair
! the problem in ALL_1_ARG
 
 
let foobar = 1
LIST "foobar", "foobar" ! this is correct - list as strings
 Column  1: str is "foobar"
 Column  2: str is "foobar"
              str     str
I / *:    "foobar" "foobar"
LIST "foobar"           ! error: lists the value instead
             VARIABLE : "foobar"
        "foobar"
 
! IF-THEN flow tests
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_if_then_flow_2214
! bug 2214
! If we put the "say hi" in parentheses, this seems to work.
! But parentheses haven't previously been required, so there are a lot of
! scripts that don't have them.
 
* 12/14 note (sh) - Ferret handles this situation correctly because
* PARSE_COMMAND acts on the semi-colons in the full command line *before*
* it acts on the "IF".  Thus the thress semicolon-connected commands
* follow the same logical path through Ferret as if they were separated
* onto three lines
 
IF 0 THEN; rep/i=1:1 say ERROR; ENDIF
 
IF 1 THEN; rep/i=1:1 say CORRECT; ENDIF
!-> REPEAT: I=1
CORRECT
 
(IF 0 THEN; rep/i=1:1 say ERROR; ENDIF)
 
(IF 1 THEN; rep/i=1:1 say CORRECT; ENDIF)
!-> REPEAT: I=1
CORRECT
 
!yes? quit
!yes? quit
!yes? ^Z
!Suspended
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_if_then_flow_2211
! bug #2211
 
 
IF 0 THEN
ELSE
   exit/script
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_if_then_flow_1860
! from bug 1860
! continue line found within grave accents
 
CANCEL MODE VERIFY
This works:
CORRECT IF THIS DISPLAYS
This works:
CORRECT IF THIS DISPLAYS
This works:
CORRECT IF THIS DISPLAYS
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_if_then_flow_1446
! testing ticket 1446
 
! the presence of a tab preceding the "!" comment caused a parsing error
 
! the behavior of this even in v69+ today is problematic in that
! it echos an ENDIF statement that should be a plain old skip
 
IF 0 THEN
ENDIF
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_if_then_flow_1681
! testing ticker 1681
 
!The third block of the following script issues an error:
!ERROR: invalid command: ENDIF can only be used in an IF clause
!
!Looks like a parsing bug -- it seems the ENDIF inside the REPEAT is being
!applied to the outermost IF. Note that the error goes away if we change
!the outer 0 to a 1.
 
 
say "test1"
test1
if 0 then
endif
 
say "test2"
test2
if 0 then
endif
 
say "test3"
test3
if 0 then
endif
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_if_then_flow_1706
! testing ticket 1706
!
def sym a say hi\\; say hi
 
IF 0 THEN
ENDIF
 
! some versions (not v550 but yes v63 but not v6301) fail to say "here"
IF 1 THEN
   say here
here
ENDIF
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_if_then_flow_1368   ! Jan 28, 2010, Ferret version 5.812
! testing ticket 1368 - first found in Ferret v5.812 (Jan 28, 2010)
 
! this is still a bug in V69+
! the initial IF command is not being closed by the first ENDIF
! it is skipping down to the elif command
 
define symbol xend 180
let key_flag = 0
 
! test 1 - line 1 false condition should suppress both outputs
IF `($xend) GT 360` THEN
 !-> IF 0 THEN
ENDIF
 
 
! test 2 - line 1 false condition should cause else clause - "point G"
let dxymin = 0.20
if `dxymin lt 0.12` then
 !-> if 0 then
elif `dxymin lt 0.25` then
 !-> elif 1 then
  SAY "CORRECT.  this message should display"
CORRECT.  this message should display
endif
 
! test 3 - this is from bug #918 -- looks like the same bug as #1368
IF 0 THEN
ENDIF
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_ribbon_start_missing
! err693_ribbon_start_missing
! 1/6/2015 ACM
!
! Bug 2226: If data starts with a missing-value and we're using (-inf) then
! the ribbon plot started with the lowest color instead of plotting as for missing
! Only the cases starting with missing data were incorrect previous to fixing this bug.
 
DEFINE SYMBOL ribbon_command = PLOT/VS/RIBBON/LINE/SYM/FAST/LEVELS=(-inf)(160,560,20)(INF)/THICK=3
 
let/units=degrees_east xvar = {-177,-174,-186}
let/units=degrees_north yvar = {-43, -45, -42}
let vvar = {,271, 319}
! This previously started with purple, not a gray missing-value point
($ribbon_command)/title="(-inf) in levels" xvar,yvar,vvar
 !-> PLOT/VS/RIBBON/LINE/SYM/FAST/LEVELS=(-inf)(160,560,20)(INF)/THICK=3/title="(-inf) in levels" xvar,yvar,vvar
 
let/units=degrees_east xvar = {-177,-174,-186,-184,-196}
let/units=degrees_north yvar = {-43, -45, -42, -45, -42}
let vvar = {,,,271,319}
($ribbon_command)/title="start with several missing" xvar,yvar,vvar
 !-> PLOT/VS/RIBBON/LINE/SYM/FAST/LEVELS=(-inf)(160,560,20)(INF)/THICK=3/title="start with several missing" xvar,yvar,vvar
 
let/units=degrees_east xvar = {-177,-174,-186,-184,-196}
let/units=degrees_north yvar = {-43, -45, -42, -45, -42}
let vvar = {,,271,319,1000}
($ribbon_command)/title="end large positive value" xvar,yvar,vvar
 !-> PLOT/VS/RIBBON/LINE/SYM/FAST/LEVELS=(-inf)(160,560,20)(INF)/THICK=3/title="end large positive value" xvar,yvar,vvar
 
let/units=degrees_east xvar = {-177,-174,-186,-184,-196}
let/units=degrees_north yvar = {-43, -45, -42, -45, -42}
let vvar = {,271,319,1000,}
($ribbon_command)/title="end with large positive and missing" xvar,yvar,vvar
 !-> PLOT/VS/RIBBON/LINE/SYM/FAST/LEVELS=(-inf)(160,560,20)(INF)/THICK=3/title="end with large positive and missing" xvar,yvar,vvar
 
let/units=degrees_east xvar = {-177,-174,-186,-184,-196}
let/units=degrees_north yvar = {-43, -45, -42, -45, -42}
let vvar = {1.e7,,,271,319}
($ribbon_command)/title="start with large positive" xvar,yvar,vvar
 !-> PLOT/VS/RIBBON/LINE/SYM/FAST/LEVELS=(-inf)(160,560,20)(INF)/THICK=3/title="start with large positive" xvar,yvar,vvar
 
let/units=degrees_east xvar = {-177,-174,-186,-184,-196}
let/units=degrees_north yvar = {-43, -45, -42, -45, -42}
let vvar = {,1.e7,,271,319}
($ribbon_command)/title="start with missing then large positive" xvar,yvar,vvar
 !-> PLOT/VS/RIBBON/LINE/SYM/FAST/LEVELS=(-inf)(160,560,20)(INF)/THICK=3/title="start with missing then large positive" xvar,yvar,vvar
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err691_pt_in_poly
! err691_pt_in_poly
! ticket 1961: modulo longitude for pt_in_poly
! and sending subset of the xy field
 
use coads_climatology
 
let xpts = {64,81,81,82,88,88,79,79,76,73,68,64}
let ypts = {31,30,29,29,27,24,20,19,20,25,27,31}
 
let pts = pt_in_poly(sst[L=5,x=60:90,y=15:35], xpts, ypts)
shade/lev=(-2,2,1)/pal=ten_by_levels pts
plot/vs/over/line/nolab xpts, ypts
list minmax(pts)
             VARIABLE : MINMAX(PTS)
             FILENAME : coads_climatology.cdf
             SUBSET   : 2 points (X)
 1   / 1: -1.000
 2   / 2:  1.000
 
! Put the xpts on different modulo branches
! Previously  the list commands would have listed -1,-1
 
let xpts0 = {64,81,81,82,88,88,79,79,76,73,68,64}
let/title=lon/units=degrees_east xpts = xpts0 + 360
 
shade/title="Plus 360"/lev=(-2,2,1)/pal=ten_by_levels pts
plot/vs/over/line/nolab xpts, ypts
list minmax(pts)
             VARIABLE : MINMAX(PTS)
             FILENAME : coads_climatology.cdf
             SUBSET   : 2 points (X)
 1   / 1: -1.000
 2   / 2:  1.000
 
let/title=lon/units=degrees_east xpts = xpts0 - 360
 
shade/title="Minus 360"/lev=(-2,2,1)/pal=ten_by_levels pts
plot/vs/over/line/nolab xpts, ypts
list minmax(pts)
             VARIABLE : MINMAX(PTS)
             FILENAME : coads_climatology.cdf
             SUBSET   : 2 points (X)
 1   / 1: -1.000
 2   / 2:  1.000
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_undetected_regrid_dset
! err693_undetected_regrid_dset.jnl    - Jan 2015
 
! in GET_CONTEXT_MODS no check is made whether dataset name/number is
! valid following   "gdset = FIND_DSET_NUMBER( name(dstart:dend) )"
 
use coads_climatology
use levitus_climatology   ! default to d=2
 
canc var/all
let myvar = temp
let a = myvar[g=temp[d=bad_d]]    ! THIS SHOULD BE DETECTED AS AN ERROR
 
set mode ignore
stat/l=1/x=180/y=0 a    ! this *SHOULD* trigger an error.  Yes.  Detect it.
set mode/last ignore
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_line_over_axis
! Ticket 2232: line plots overlaid the plot axes
show mode meta
      MODE            STATE        ARGUMENT
      METAFILE      CANCELED       .gif
! line plot with /VS draw on top of the axes
let xval = {0.0, 0.2, 1.0, 0.8, 0}
let yval = {0.0, 1.1, 1.1, 0.0, 0}
plot/vs/line/thick=3/color=lightblue xval, yval
 
! any line overlay may draw on the axes
let xval = {0.0, 0.0, 0.8, 0.2, 0}
let yval = {0.1, 1.2, 1.2, 0.1, 0.1}
plot/ribbon/vs/line/thick=3/over/nolab/pal=green_light xval, yval, yval
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_save_packed
! err693_save_packed.jnl
! ticket 2240: bug writing multiple vars with one SAVE when scaled
!
! Previously saw a netcdf error because first variable was mis-scaled on writing.
 
use err693_save_packed.nc
save/clobber/file=a.nc QA_OF_SEAICE_CONC_CDR, GODDARD_MERGED_SEAICE_CONC
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_subspan_trans
! err693_subspan_trans
! bug 2241  3/9/2015
 
use coads_climatology
let a = sst[x=120:284,y=-2:2@ave,t=@ave]
save/clob/file=a.nc a
can var a
use a
set reg/x=25:385
let b = a[x=@min]
 
set mode diag
say `a[x=@min]`
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSI1            COADSX51_1NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      0     83  J: -999 -999  K: -999 -999  L:   -999   -999
 strip --> A[X=25E:25E(385)@MIN,D=2]
 strip modulo-void-filling A on X axis:        0       83 dset:   2
 strip moduloing A on X axis:        0       82 dset:   2
 reading A        M:  5 dset:   2 I:      1     82  J: -999 -999  K: -999 -999  L:   -999   -999
 doing moduloing A on X axis:        1       82 dset:   2
 doing modulo-void-filling A on X axis:        0       82 dset:   2
 doing --> A[X=25E:25E(385)@MIN,D=2]
 -DELETE A        M:  2 dset:   2 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 !-> MESSAGE/CONTINUE 25.27740573883057
25.27740573883057
 
! This previously resulted in an error.
say `b`
 dealloc  dynamic grid GSI1            COADSX51_1NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid B        C:  7 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GSI1            COADSX51_1NORMAL    NORMAL    NORMAL
 allocate dynamic grid GSI1            COADSX51_1NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   2 I:      0     83  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    B        C:  6 dset:   2 I:      0     83  J: -999 -999  K: -999 -999  L:   -999   -999
 found   A        M:  7 dset:   2 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE B        M: 11 dset:   2 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 !-> MESSAGE/CONTINUE 25.27740573883057
25.27740573883057
 
can mode diag
 
! What if the region for @MIN is in the saved portion?
say `a[x=150:200@min]`
 !-> MESSAGE/CONTINUE 26.96305592854818
26.96305592854818
let b = a[x=150:200@min]
say `b`
 !-> MESSAGE/CONTINUE 26.96305592854818
26.96305592854818
 
! What if the region for @MIN extends beyond the saved portion?
say `a[x=200:300@min]`
 !-> MESSAGE/CONTINUE 25.27740573883057
25.27740573883057
let b = a[x=200:300@min]
say `b`
 !-> MESSAGE/CONTINUE 25.27740573883057
25.27740573883057
 
! What if the region for @MIN is outside the saved portion?
say `a[x=300:385@min]`
 !-> MESSAGE/CONTINUE bad
bad
let b = a[x=300:385@min]
say `b`
 !-> MESSAGE/CONTINUE bad
bad
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_repeat_err
!   err693_repeat_err.jnl
! test fix for ticket 2244: Error handling in REPEAT
 
! The second of these should result in an error - in debug mode
! it instead was hitting an out-of-range subscript error.
 
repeat/range=1:2/name=column repeat/range=1:2/name=row say `column`,`row`
!-> REPEAT: COLUMN:1
!-> REPEAT: ROW:1
 !-> MESSAGE/CONTINUE 1,1
1,1
!-> REPEAT: ROW:2
 !-> MESSAGE/CONTINUE 1,2
1,2
!-> REPEAT: COLUMN:2
!-> REPEAT: ROW:1
 !-> MESSAGE/CONTINUE 2,1
2,1
!-> REPEAT: ROW:2
 !-> MESSAGE/CONTINUE 2,2
2,2
 
set mode ignore
repeat/range=1:2/name=column repeat/range=1:2/name=row
!-> REPEAT: COLUMN:1
!-> REPEAT: COLUMN:2
set mode/last ignore
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_edit_useratt
! err693_edit_useratt.jnl
! ticket 2249: set attribute properties for user-defined variable
 
use err491_attval.cdf
list/x=135.402W:135.321W/y=58.609 elev
             VARIABLE : Surface elevation (meter)
             DATA SET : K-Bay OAR3d model (200m)
             FILENAME : err491_attval.cdf
             SUBSET   : 7 points (LONGITUDE)
             LATITUDE : 58.609N
             T (day)  : 1.78368
                 58.609N
                   3
 135.402W / 45:   ....
 135.389W / 46:   ....
 135.375W / 47:   ....
 135.362W / 48:  2.952
 135.348W / 49:  2.953
 135.335W / 50:  2.949
 135.321W / 51:  2.953
 
 
! Rename the file variable, define a variable using its name
set var/name=elev_in elev
let  elev = missing(elev_in, -1.e34)
 
! Inherit attributes from the file variable.
! cancel writing the scale attributes
set att/like=elev_in elev
can att/output elev.scale_factor
can att/output elev.add_offset
 
! set the bad-flag (can't do this before the SET ATT/LIKE
set var/bad=-1.e34 elev
 
! save
save/clobber/file=a.nc elev
can var/all
use a.nc
list/x=135.402W:135.321W/y=58.609 elev
             VARIABLE : Surface elevation (meter)
             FILENAME : a.nc
             SUBSET   : 7 points (LONGITUDE)
             LATITUDE : 58.609N
             T (day)  : 1.78368
                 58.609N
                   3
 135.402W / 45:   ....
 135.389W / 46:   ....
 135.375W / 47:   ....
 135.362W / 48:  2.952
 135.348W / 49:  2.953
 135.335W / 50:  2.949
 135.321W / 51:  2.953
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_redef_rec_axis
! err693_redef_rec_axis.jnl
! ticket 2271. Redefining the record axis meant
! that SHOW AXIS/FULL couldnt get the time axis info
 
define axis/x=1:5:1 xax
define axis/y=2:10:2 yax
define axis/t=1:7:1 tredef
let var = x[gx=xax] + y[gy=yax] + t[gt=tredef]
save/clobber/file=a.nc var
 
can var/all
can axis xax
can axis yax
can axis tredef
 
use a.nc
define axis/t=1:7:1/units=days/t0=1-jan-2000 tredef
 
! Previously the output had  time range: ???
show data/full
     currently SET data sets:
    1> ./a.nc  (default)
 
 name     title                             I         J         K         L
 VAR      X[GX=XAX] + Y[GY=YAX] + T[GT=TR  1:5       1:5       ...       1:7
               on grid GSI1 with -1.E+34 for missing data
             X=0.5:5.5  Y=1:11  
 
  time range: 02-JAN-2000 00:00 to 08-JAN-2000 00:00
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_frame_types
! bn_frame_types.jnl
! Ticket 2275
! The default file type for FRAME was still HDF
 
set mode ignore
 
use coads_climatology
shade/l=1 sst
 
! This issued an error and quit
frame/format=hdf/file=a.hdf
 
! so did this
frame/file=a.png
 
! this is (always) ok
frame/file=a.gif
frame/format=gif file=a.plot
 
sp rm a.gif
 
set mode/last ignore
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_shape
! err693_shape.jnl
! bug 2273 shape of variable with various subexpressions
 
use coads_climatology
let a = sst[x=@ave]
let a_clim = a[gt=MONTH_IRREG@mod]
let a_anom = a - a_clim[gt=a@nrst]
 
! Should all be YT
say `a,r=shape`  `a_clim[gt=a@nrst],r=shape` `a_anom,r=shape`
 !-> MESSAGE/CONTINUE YT  YT YT
YT  YT YT
 
! Also works for size returns
 
! Should be 180, 1, 1
say `sst,r=isize`  `a,r=isize` `a_anom,r=isize`
 !-> MESSAGE/CONTINUE 180  1 1
180  1 1
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_ef_axis_precision
 ! NOAA/PMEL TMAP
 ! FERRET v6.94
 ! Linux 2.6.32-504.12.2.el6.x86_64 64-bit - 03/20/15
 ! 11-May-15 16:51
 
define axis/f faxis = {0.001, 0.123, 0.234, 0.498}
define axis/e eaxis = {1001.1009, 1234.005, 2112.321, 2520.45}
let efvar = _M[ge=eaxis] + _n[gf=faxis]
set view upper; plot/n=3 efvar
set view lower; plot/m=2 efvar
list/n=3 efvar
             VARIABLE : _M[GE=EAXIS] + _N[GF=FAXIS]
             SUBSET   : 4 points (E)
             F        : 0.234
 1001.1 / 1:  4.000
 1234   / 2:  5.000
 2112.3 / 3:  6.000
 2520.4 / 4:  7.000
list/m=2 efvar
             VARIABLE : _M[GE=EAXIS] + _N[GF=FAXIS]
             SUBSET   : 4 points (F)
             E        : 1234.005
 0    / 1:  3.000
 0.12 / 2:  4.000
 0.23 / 3:  5.000
 0.5  / 4:  6.000
q
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_string_results
! err693_string_results.jnl
! Ticket 2234, the LIST B returned the numeric pointer to the string.
! *acm* 5/14/2015
 
let b = IF a then "yes" else "no"
let a = 1/0
list b
             VARIABLE : IF A THEN "yes" ELSE "no"
        "no"
 
! The LOAD C makes the data type of D correct
let d = if c then "ok" else "not ok"
let c = 1/0
load C
list d
             VARIABLE : IF C THEN "ok" ELSE "not ok"
        "not ok"
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_lev_nv_over
! err693_lev_nv_over.jnl
! The polygon command with /LEV=20V caused a crash; levels settings incorrect.
 
! draw any underlay to set up for polymark script
use coads_climatology
shade/x=120:250/Y=25s:65n/L=1/pal=white/nokey sst
 
LET xpts = 180 + 50*COS(2*3.14*I[I=1:50]/60)
LET ypts = 15  + 20*SIN(2*3.14*I[I=1:50]/60)
 
! Variable is a constant w/ negative value
LET sst = -5 + 0*ypts
 
! The poly/over command caused a Fortran runtime error in tm_fmt_sngl
GO polymark polygon/over/lev=20v/key/title="SST"  xpts,ypts,sst,square, 0.5
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_fcn_of_attvar
! err693_fcn_of_attvar.jnl
! Ticket 2291 Function of attribute-expression
! returned just the first result
 
use coads_climatology
list sst.dimnames
             VARIABLE : SST.DIMNAMES
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (X)
 1   / 1:"COADSX"
 2   / 2:"COADSY"
 3   / 3:"TIME1" 
list dncase(sst.dimnames)
             VARIABLE : DNCASE(SST.DIMNAMES)
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (X)
 1   / 1:"coadsx"
 2   / 2:"coadsy"
 3   / 3:"time1" 
list strlen( sst.dimnames)
             VARIABLE : STRLEN( SST.DIMNAMES)
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (X)
 1   / 1:  6.000
 2   / 2:  6.000
 3   / 3:  5.000
list substring(sst.dimnames,2,3)
             VARIABLE : SUBSTRING(SST.DIMNAMES,2,3)
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (X)
 1   / 1:"OAD"
 2   / 2:"OAD"
 3   / 3:"IME"
list dncase(substring(sst.dimnames,2,3))
             VARIABLE : DNCASE(SUBSTRING(SST.DIMNAMES,2,3))
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (X)
 1   / 1:"oad"
 2   / 2:"oad"
 3   / 3:"ime"
list ysequence(dncase(sst.dimnames))
             VARIABLE : YSEQUENCE(DNCASE(SST.DIMNAMES))
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (Y)
 1   / 1:"coadsx"
 2   / 2:"coadsy"
 3   / 3:"time1" 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_isize_and_gcfcn
! err693_isize_and_gcfcn.jnl
! ticket 2213
! SET REGION interacting with ABSTRACT AXES
! When the variable using XSEQUENCE was defined, suddenly the
! region was being applied (inconsistently).
 
can mode verify
8
    GRID XABSTRACT
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              8 pts
 normal    Y
 normal    Z
 normal    T
8
8 a
8
8 b
8
8 c
8
8 d
8
8 e
8
8 f
8
8 g
8
8 h
8
    GRID XABSTRACT
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              full
 normal    Y
 normal    Z
 normal    T
8
8 a
8
8 b
8
8 c
8
8 d
8
8 e
8
8 f
8
8 g
8
8 h
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_ribbon_scale
! err693_ribbon_scale.jnl
! ticket 2295: the vertical scale is mis-computed
! 5/29/2015
 
let var = {-81,-81,-81}
let color = {2,2,2}
plot/ribbon/key var,color
 
! should be -82 to -80
sh sym yaxis*
YAXIS_REVERSED = "0"
YAXIS_MIN = "-72.9000000"
YAXIS_MAX = "-89.1000000"
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_parse_curly
! err693_parse_curly.jnl
! the sub-routine defines a string variable containing commands for overlays in
! different directions. the bug was that the parser doesn't handle quoted strings
! inside { } if those strings include curly braces.
! The argument chooses one of the strings with commands and plots the overlay
 
use gt4d011
 
shade/i=100/l=1/pal=grayscale temp
go err693_parse_curly.sub yz
! err693_parse_curly.sub
! Define a variable with commands for overlays in different directions
! the bug was that the parser doesn't handle quoted strings inside { } if those
! strings include curly braces.
! Choose one of the strings and plot the overlay
 
! list of valid shapes
 
let prd_shapes = {"xy", "xz", "yz"}
 
! List of associated overlays
! This is the part that's not working; due to bug #2296 we can't write {"...{}..."}.
 
let prd_overlays = {\
   "go land 6; go draw_line 180 -90 180 90 1; go draw_box 210 270 -5 5 6/dash=(.04,.06,.04,.06)",\
   "plot/vs/ov/nolab/line=6/dash=(.02,.12,.02,.12) {-1e3,1e3,,-1e3,1e3,,-1e3,1e3,,-136,-136,,-126,-126}, {85,85,,50,50,,20,20,,-1e4,1e4,,-1e4,1e4}",\
   "plot/vs/ov/nolab/line=6/dash=(.02,.12,.02,.12) 1e3*{-1,1,,-1,1,,-1,1},{85,85,,50,50,,20,20}"}
 
! Then later when we're generating figures, we'll be
! passing one of these shapes into a script like this:
 
let p1s_shape = "$1%xy%"
 !-> DEFINE VARIABLE p1s_shape = "yz"
 
! For the specified shape, find the associated overlay command
! (default is no overlay).
let p1s_ov = ""
IF `prd_shapes,r=isready` THEN
 !-> IF 1         THEN
      )
 !-> rep/name=s/range=1:3 (let p1s_this_shape = prd_shapes[i=`s`];      IF `p1s_this_shape EQ p1s_shape` THEN;         let p1s_ov = prd_overlays[i=`s`];         exit/loop;      ENDIF;      )
!-> REPEAT: S:1
 !-> DEFINE VARIABLE p1s_this_shape = prd_shapes[i=1]
 !-> IF 0 THEN
!-> REPEAT: S:2
 !-> DEFINE VARIABLE p1s_this_shape = prd_shapes[i=2]
 !-> IF 0 THEN
!-> REPEAT: S:3
 !-> DEFINE VARIABLE p1s_this_shape = prd_shapes[i=3]
 !-> IF 1 THEN
 !-> DEFINE VARIABLE p1s_ov = prd_overlays[i=3]
   can var p1s_this_shape
ENDIF
 
! generate a figure, with the appropriate overlay
define symbol overcommands = `p1s_ov`
 !-> define symbol overcommands = plot/vs/ov/nolab/line=6/dash=(.02,.12,.02,.12) 1e3*{-1,1,,-1,1,,-1,1},{85,85,,50,50,,20,20}
($overcommands)
 !-> plot/vs/ov/nolab/line=6/dash=(.02,.12,.02,.12) 1e3*{-1,1,,-1,1,,-1,1},{85,85,,50,50,,20,20}
 
 shade/j=40/l=1/pal=grayscale temp
go err693_parse_curly.sub xz
! err693_parse_curly.sub
! Define a variable with commands for overlays in different directions
! the bug was that the parser doesn't handle quoted strings inside { } if those
! strings include curly braces.
! Choose one of the strings and plot the overlay
 
! list of valid shapes
 
let prd_shapes = {"xy", "xz", "yz"}
 
! List of associated overlays
! This is the part that's not working; due to bug #2296 we can't write {"...{}..."}.
 
let prd_overlays = {\
   "go land 6; go draw_line 180 -90 180 90 1; go draw_box 210 270 -5 5 6/dash=(.04,.06,.04,.06)",\
   "plot/vs/ov/nolab/line=6/dash=(.02,.12,.02,.12) {-1e3,1e3,,-1e3,1e3,,-1e3,1e3,,-136,-136,,-126,-126}, {85,85,,50,50,,20,20,,-1e4,1e4,,-1e4,1e4}",\
   "plot/vs/ov/nolab/line=6/dash=(.02,.12,.02,.12) 1e3*{-1,1,,-1,1,,-1,1},{85,85,,50,50,,20,20}"}
 
! Then later when we're generating figures, we'll be
! passing one of these shapes into a script like this:
 
let p1s_shape = "$1%xy%"
 !-> DEFINE VARIABLE p1s_shape = "xz"
 
! For the specified shape, find the associated overlay command
! (default is no overlay).
let p1s_ov = ""
IF `prd_shapes,r=isready` THEN
 !-> IF 1         THEN
      )
 !-> rep/name=s/range=1:3 (let p1s_this_shape = prd_shapes[i=`s`];      IF `p1s_this_shape EQ p1s_shape` THEN;         let p1s_ov = prd_overlays[i=`s`];         exit/loop;      ENDIF;      )
!-> REPEAT: S:1
 !-> DEFINE VARIABLE p1s_this_shape = prd_shapes[i=1]
 !-> IF 0 THEN
!-> REPEAT: S:2
 !-> DEFINE VARIABLE p1s_this_shape = prd_shapes[i=2]
 !-> IF 1 THEN
 !-> DEFINE VARIABLE p1s_ov = prd_overlays[i=2]
   can var p1s_this_shape
ENDIF
 
! generate a figure, with the appropriate overlay
define symbol overcommands = `p1s_ov`
 !-> define symbol overcommands = plot/vs/ov/nolab/line=6/dash=(.02,.12,.02,.12) {-1e3,1e3,,-1e3,1e3,,-1e3,1e3,,-136,-136,,-126,-126}, {85,85,,50,50,,20,20,,-1e4,1e4,,-1e4,1e4}
($overcommands)
 !-> plot/vs/ov/nolab/line=6/dash=(.02,.12,.02,.12) {-1e3,1e3,,-1e3,1e3,,-1e3,1e3,,-136,-136,,-126,-126}, {85,85,,50,50,,20,20,,-1e4,1e4,,-1e4,1e4}
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_list_missing
! err693_list_missing.jnl
 
let a= {1,2,3}
let b = 1./0
 
! Ths listing of b is .... was squashed onto the ends of values of a.
! 1   / 1:  1.000..
! 2   / 2:  2.000..
 
list a,b
             X: 0.5 to 3.5
 Column  1: A is {1,2,3}
 Column  2: B is 1./0
             A    B
1   / 1:  1.000 ....
2   / 2:  2.000 ....
3   / 3:  3.000 ....
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_shf_subscr
! err693_shf_subscr.jnl
! ticket 2231  Subscripts used to compute @SHF-1 at the low end of the axis
 
 
def ax/edge/z=0:40:10 zax_t
def ax/edge/z=5:45:10 zax_w
let zw = z[gz=zax_w]
let zdiff = zw - missing(zw[z=@shf:-1],0)
let zdiff_t = zdiff[gz=zax_t@asn]
 
! a range of K shows the values correctly
list zdiff_t
             VARIABLE : ZDIFF[GZ=ZAX_T@ASN]
             SUBSET   : 4 points (Z)
 5    / 1:  10.00
 15   / 2:  10.00
 25   / 3:  10.00
 35   / 4:  10.00
 
! but just K=1 returned a K=0 error
can mem
list/k=1 zdiff_t
             VARIABLE : ZDIFF[GZ=ZAX_T@ASN]
             Z        : 5
          10.00
 
! Shift of +1
can mem
let zdiff = zw - missing(zw[z=@shf:1],0)
list/k=4 zdiff_t
             VARIABLE : ZDIFF[GZ=ZAX_T@ASN]
             Z        : 35
          40.00
list/k=3:4 zdiff_t
             VARIABLE : ZDIFF[GZ=ZAX_T@ASN]
             SUBSET   : 2 points (Z)
 25   / 3: -10.00
 35   / 4:  40.00
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_shift_w_region
! err693_shift_w_region
! Ticket 2300.  In fact with bounds checking on, the list a[i=@shf] would have
! caused a Fortran runtime error with out-of-bounds subscripts. The fix for
! ticket 2301 fixes this as well.
 
set region/x=10:20
let a = {1,2,3}
list a
             VARIABLE : {1,2,3}
             SUBSET   : 3 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
list a[i=@shf]
             VARIABLE : {1,2,3}
                        shifted by 1 pts on X
             SUBSET   : 3 points (X)
 1   / 1:  2.000
 2   / 2:  3.000
 3   / 3:   ....
cancel region
list a[i=@shf]
             VARIABLE : {1,2,3}
                        shifted by 1 pts on X
             SUBSET   : 3 points (X)
 1   / 1:  2.000
 2   / 2:  3.000
 3   / 3:   ....
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_scalar_grids
! err693_scalar_grids.jnl
! See ticket 1602
 
!  multiplication by scalar variable "let one = 1" added
!  abstract axes to the expression in all directions not
!  already reperesented in the grid.
 
 
! The T averaging is ignored; no T direction in the grid.
use levitus_climatology
let a = temp[x=140,y=0,z=0]
list a[t=1-jan-0001:1-jan-0020@ave]
             VARIABLE : TEMP[X=140,Y=0,Z=0]
             FILENAME : levitus_climatology.cdf
             LONGITUDE: 139.5E
             LATITUDE : 0.5S
             DEPTH (m): 0
          29.31
 
! Multiply by a variable which is a constant (prev. this
! resulted in an illegal use of transform error.)
let one = 1
let b = one*a
list b[t=1-jan-0001:1-jan-0020@ave]
             VARIABLE : ONE*A
             FILENAME : levitus_climatology.cdf
             LONGITUDE: 139.5E
             LATITUDE : 0.5S
             DEPTH (m): 0
          29.31
 
! Test with a constant-array variable.
let two = {2}
let c = two*a
list c[t=1-jan-0001:1-jan-0020@ave]
             VARIABLE : TWO*A
             FILENAME : levitus_climatology.cdf
             X        : 1
             LATITUDE : 0.5S
             DEPTH (m): 0
          58.61
 
 
! check interactions with GC functions (prev. this
! resulted in an illegal use of transform error.)
LET v = X[x=1:4:1] + Y[Y=.1:.4:.1]
LET a = XSEQUENCE( v[I=2:3,J=2:3] ) + Z[Z=.01:.02:.01]
LIST a[t=1-jan-0001:1-jan-0020@ave]
             VARIABLE : XSEQUENCE( V[I=2:3,J=2:3] ) + Z[Z=.01:.02:.01]
             SUBSET   : 4 by 2 points (X-Z)
               1      2      3      4    
               1      2      3      4
 0.01  / 1:  2.210  3.210  2.310  3.310
 0.02  / 2:  2.220  3.220  2.320  3.320
list b
             VARIABLE : ONE*A
             SUBSET   : 4 by 2 points (X-Z)
               1      2      3      4    
               1      2      3      4
 0.01  / 1:  2.210  3.210  2.310  3.310
 0.02  / 2:  2.220  3.220  2.320  3.320
 
list b[x=@ave,k=@ave]
             VARIABLE : ONE*A
             X        : 0.5 to 4.5 (XZ ave)
             Z        : 0.005 to 0.025 (XZ ave)
          2.765
 
 
*** Running ferret script: bn_permute_ascii.jnl
! bn_permute_ascii.jnl
! test permutations when reading ascii data, in E and F directions
! 11/18/2014
! see ticket 2217: was not working for grids in E and F
 
 
! First with T axis
 
! unpermuted
def axis/t=1:12:1 t12
define axis/x=1:4:1 x4ax
def grid/x=x4ax/t=t12 txgrid
 FILE/SKIP=4/VAR="Tm"/COL=12/order=tx/GRID=txgrid fxdata.dat
sh dat
     currently SET data sets:
    1> ./data/fxdata.dat  (default)
 name     title                             I         J         K         L
 TM       Tm                               1:4       ...       ...       1:12
 
list tm
             VARIABLE : Tm
             FILENAME : fxdata.dat
             SUBSET   : 4 by 12 points (X-T)
               1      2      3      4    
               1      2      3      4
 1    /  1:  -6.85  -6.75  -6.65  -6.55
 2    /  2: -11.71 -11.72 -11.73 -11.74
 3    /  3: -19.12 -19.22 -19.32 -19.42
 4    /  4: -24.81 -24.82 -24.83 -24.84
 5    /  5: -27.19 -27.29 -27.39 -27.49
 6    /  6: -28.51 -28.52 -28.53 -28.54
 7    /  7: -30.27 -30.37 -30.47 -30.57
 8    /  8: -31.34 -31.54 -31.64 -31.74
 9    /  9: -29.34 -29.44 -29.54 -29.64
 10   / 10: -23.29 -23.39 -23.49 -23.59
 11   / 11: -14.91 -14.92 -14.93 -14.94
 12   / 12:  -8.09  -8.19  -8.29  -8.39
 
! permuted
def axis/t=1:12:1 t12
define axis/x=1:4:1 x4ax
def grid/x=x4ax/t=t12 txgrid
FILE/SKIP=4/VAR="Tm"/COL=12/order=tx/GRID=txgrid fxdata.dat
sh dat
     currently SET data sets:
    1> ./data/fxdata.dat  (default)
 name     title                             I         J         K         L
 TM       Tm                               1:4       ...       ...       1:12
 
list tm
             VARIABLE : Tm
             FILENAME : fxdata.dat
             SUBSET   : 4 by 12 points (X-T)
               1      2      3      4    
               1      2      3      4
 1    /  1:  -6.85  -6.75  -6.65  -6.55
 2    /  2: -11.71 -11.72 -11.73 -11.74
 3    /  3: -19.12 -19.22 -19.32 -19.42
 4    /  4: -24.81 -24.82 -24.83 -24.84
 5    /  5: -27.19 -27.29 -27.39 -27.49
 6    /  6: -28.51 -28.52 -28.53 -28.54
 7    /  7: -30.27 -30.37 -30.47 -30.57
 8    /  8: -31.34 -31.54 -31.64 -31.74
 9    /  9: -29.34 -29.44 -29.54 -29.64
 10   / 10: -23.29 -23.39 -23.49 -23.59
 11   / 11: -14.91 -14.92 -14.93 -14.94
 12   / 12:  -8.09  -8.19  -8.29  -8.39
 
! Then same with F axis
can data/all
 
def axis/f=1:12:1 f12
define axis/x=1:4:1 x4ax
def grid/x=x4ax/f=f12 fxgrid
 FILE/SKIP=4/VAR="Tm"/COL=12/order=fx/GRID=fxgrid fxdata.dat
sh dat
     currently SET data sets:
    1> ./data/fxdata.dat  (default)
 name     title                             I         J         K         L         M         N
 TM       Tm                               1:4       ...       ...       ...       ...       1:12
 
list tm
             VARIABLE : Tm
             FILENAME : fxdata.dat
             SUBSET   : 4 by 12 points (X-F)
               1      2      3      4    
               1      2      3      4
 1    /  1:  -6.85  -6.75  -6.65  -6.55
 2    /  2: -11.71 -11.72 -11.73 -11.74
 3    /  3: -19.12 -19.22 -19.32 -19.42
 4    /  4: -24.81 -24.82 -24.83 -24.84
 5    /  5: -27.19 -27.29 -27.39 -27.49
 6    /  6: -28.51 -28.52 -28.53 -28.54
 7    /  7: -30.27 -30.37 -30.47 -30.57
 8    /  8: -31.34 -31.54 -31.64 -31.74
 9    /  9: -29.34 -29.44 -29.54 -29.64
 10   / 10: -23.29 -23.39 -23.49 -23.59
 11   / 11: -14.91 -14.92 -14.93 -14.94
 12   / 12:  -8.09  -8.19  -8.29  -8.39
 
! Read same data in y-z-t
can data/all
 
def axis/t=1:6:1 t6ax
define axis/z=1:4:1 z4ax
define axis/y=1:2:1 y2ax
def grid/y=y2ax/z=z4ax/t=t6ax grid3d
FILE/SKIP=4/VAR="Tm"/COL=12/GRID=grid3d fxdata.dat
sh dat
     currently SET data sets:
    1> ./data/fxdata.dat  (default)
 name     title                             I         J         K         L
 TM       Tm                               ...       1:2       1:4       1:6
 
list tm
             VARIABLE : Tm
             FILENAME : fxdata.dat
             SUBSET   : 2 by 4 by 6 points (Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  -6.85 -11.71
 2   / 2: -19.12 -24.81
 3   / 3: -27.19 -28.51
 4   / 4: -30.27 -31.34
 ---- L:2 T:   2
 1   / 1: -29.34 -23.29
 2   / 2: -14.91  -8.09
 3   / 3:  -6.75 -11.72
 4   / 4: -19.22 -24.82
 ---- L:3 T:   3
 1   / 1: -27.29 -28.52
 2   / 2: -30.37 -31.54
 3   / 3: -29.44 -23.39
 4   / 4: -14.92  -8.19
 ---- L:4 T:   4
 1   / 1:  -6.65 -11.73
 2   / 2: -19.32 -24.83
 3   / 3: -27.39 -28.53
 4   / 4: -30.47 -31.64
 ---- L:5 T:   5
 1   / 1: -29.54 -23.49
 2   / 2: -14.93  -8.29
 3   / 3:  -6.55 -11.74
 4   / 4: -19.42 -24.84
 ---- L:6 T:   6
 1   / 1: -27.49 -28.54
 2   / 2: -30.57 -31.74
 3   / 3: -29.64 -23.59
 4   / 4: -14.94  -8.39
 
! And permuted
 
can data/all
 
def axis/t=1:6:1 t6ax
define axis/z=1:4:1 z4ax
define axis/y=1:2:1 y2ax
def grid/y=y2ax/z=z4ax/t=t6ax grid3d
FILE/SKIP=4/VAR="Tm"/COL=12/order=tyz/GRID=grid3d fxdata.dat
sh dat
     currently SET data sets:
    1> ./data/fxdata.dat  (default)
 name     title                             I         J         K         L
 TM       Tm                               ...       1:2       1:4       1:6
 
list tm
             VARIABLE : Tm
             FILENAME : fxdata.dat
             SUBSET   : 2 by 4 by 6 points (Y-Z-T)
             1      2    
             1      2
 ---- L:1 T:   1
 1   / 1:  -6.85 -30.27
 2   / 2:  -6.75 -30.37
 3   / 3:  -6.65 -30.47
 4   / 4:  -6.55 -30.57
 ---- L:2 T:   2
 1   / 1: -11.71 -31.34
 2   / 2: -11.72 -31.54
 3   / 3: -11.73 -31.64
 4   / 4: -11.74 -31.74
 ---- L:3 T:   3
 1   / 1: -19.12 -29.34
 2   / 2: -19.22 -29.44
 3   / 3: -19.32 -29.54
 4   / 4: -19.42 -29.64
 ---- L:4 T:   4
 1   / 1: -24.81 -23.29
 2   / 2: -24.82 -23.39
 3   / 3: -24.83 -23.49
 4   / 4: -24.84 -23.59
 ---- L:5 T:   5
 1   / 1: -27.19 -14.91
 2   / 2: -27.29 -14.92
 3   / 3: -27.39 -14.93
 4   / 4: -27.49 -14.94
 ---- L:6 T:   6
 1   / 1: -28.51  -8.09
 2   / 2: -28.52  -8.19
 3   / 3: -28.53  -8.29
 4   / 4: -28.54  -8.39
 
! Now with Y-Z-E
 
can data/all
 
def axis/e=1:6:1 e6ax
define axis/z=1:4:1 z4ax
define axis/y=1:2:1 y2ax
def grid/y=y2ax/z=z4ax/e=e6ax grid3d
FILE/SKIP=4/VAR="Tm"/COL=12/GRID=grid3d fxdata.dat
sh dat
     currently SET data sets:
    1> ./data/fxdata.dat  (default)
 name     title                             I         J         K         L         M         N
 TM       Tm                               ...       1:2       1:4       ...       1:6       ...
 
list tm
             VARIABLE : Tm
             FILENAME : fxdata.dat
             SUBSET   : 2 by 4 by 6 points (Y-Z-E)
             1      2    
             1      2
 ---- M:1 E:   1
 1   / 1:  -6.85 -11.71
 2   / 2: -19.12 -24.81
 3   / 3: -27.19 -28.51
 4   / 4: -30.27 -31.34
 ---- M:2 E:   2
 1   / 1: -29.34 -23.29
 2   / 2: -14.91  -8.09
 3   / 3:  -6.75 -11.72
 4   / 4: -19.22 -24.82
 ---- M:3 E:   3
 1   / 1: -27.29 -28.52
 2   / 2: -30.37 -31.54
 3   / 3: -29.44 -23.39
 4   / 4: -14.92  -8.19
 ---- M:4 E:   4
 1   / 1:  -6.65 -11.73
 2   / 2: -19.32 -24.83
 3   / 3: -27.39 -28.53
 4   / 4: -30.47 -31.64
 ---- M:5 E:   5
 1   / 1: -29.54 -23.49
 2   / 2: -14.93  -8.29
 3   / 3:  -6.55 -11.74
 4   / 4: -19.42 -24.84
 ---- M:6 E:   6
 1   / 1: -27.49 -28.54
 2   / 2: -30.57 -31.74
 3   / 3: -29.64 -23.59
 4   / 4: -14.94  -8.39
 
can data/all
 
def axis/e=1:6:1 e6ax
define axis/z=1:4:1 z4ax
define axis/y=1:2:1 y2ax
def grid/y=y2ax/z=z4ax/e=e6ax grid3d
FILE/SKIP=4/VAR="Tm"/COL=12/order=eyz/GRID=grid3d fxdata.dat
sh dat
     currently SET data sets:
    1> ./data/fxdata.dat  (default)
 name     title                             I         J         K         L         M         N
 TM       Tm                               ...       1:2       1:4       ...       1:6       ...
 
list tm
             VARIABLE : Tm
             FILENAME : fxdata.dat
             SUBSET   : 2 by 4 by 6 points (Y-Z-E)
             1      2    
             1      2
 ---- M:1 E:   1
 1   / 1:  -6.85 -30.27
 2   / 2:  -6.75 -30.37
 3   / 3:  -6.65 -30.47
 4   / 4:  -6.55 -30.57
 ---- M:2 E:   2
 1   / 1: -11.71 -31.34
 2   / 2: -11.72 -31.54
 3   / 3: -11.73 -31.64
 4   / 4: -11.74 -31.74
 ---- M:3 E:   3
 1   / 1: -19.12 -29.34
 2   / 2: -19.22 -29.44
 3   / 3: -19.32 -29.54
 4   / 4: -19.42 -29.64
 ---- M:4 E:   4
 1   / 1: -24.81 -23.29
 2   / 2: -24.82 -23.39
 3   / 3: -24.83 -23.49
 4   / 4: -24.84 -23.59
 ---- M:5 E:   5
 1   / 1: -27.19 -14.91
 2   / 2: -27.29 -14.92
 3   / 3: -27.39 -14.93
 4   / 4: -27.49 -14.94
 ---- M:6 E:   6
 1   / 1: -28.51  -8.09
 2   / 2: -28.52  -8.19
 3   / 3: -28.53  -8.29
 4   / 4: -28.54  -8.39
 
*** Running ferret script: bn_lon_lat_time_string.jnl
! bn_lon_lat_time_string.jnl
! Test function written for LAS, to create profile labels from
! a list of lnogitudes, latitudes, times, and a prefix string.
 
show function lon_lat_time_string
LON_LAT_TIME_STRING(longitude,latitude,time,time_axis,string to prepend)
    Generate strings from longitude,latitude,time
    longitude: Station longitude
    latitude: Station latitude
    time: numeric times
    time_axis: Varible with a time axis to use to convert time to time strings
    string to prepend: A label to start the strings (STRING)
 
! Longitudes are translated to 0:360 range
let lon = {-172.44, 210.01, -19.5}
 
! latitudes are labeled N or S
let lat = {3.12, 4.9, -15.03}
 
! Time steps are interpreted in terms of a time axis
let time = {1,2,3}
define axis/t=1-jan-2001:31-jan-2001:1/units=days/t0=1-jan-2001 taxis
let tt = t[gt=taxis]
 
list lon_lat_time_string(lon, lat, time, tt, "my_string")
             VARIABLE : LON_LAT_TIME_STRING(LON, LAT, TIME, TT, "my_string")
             SUBSET   : 3 points (X)
 1   / 1:"my_string_187.6E_3.12N_02-JAN-2001" 
 2   / 2:"my_string_210E_4.9N_03-JAN-2001"    
 3   / 3:"my_string_340.5E_15.03S_04-JAN-2001"
 
*** Running ferret script: bn_save_justdim.jnl
! bn_save_justdim.jnl
! When a dataset has axes that are dimensions but not 1-D coordinate variables,
! no longer save the coordinate axis that Ferret creates from the dimension.
!
! Allows for a dimension and a 2-D variable to have the same name.
!  see ticket 2227
! 1/21/2015 ACM
 
use twodtime.nc
sh dat
     currently SET data sets:
    1> ./data/twodtime.nc  (default)
 name     title                             I         J         K         L         M         N
 TIME     GRIB forecast or observation ti  ...       ...       ...       1:8       ...       1:3
 
 
! previously this gave a name-in-use error
save/file=a.nc/clobber time
 
!  The file has 2D TIME variable, and TIME as a dimension.
sp ncdump a.nc >> all_ncdump.out
 
! Now, keep case and axis name as on input
CANCEL MODE upcase
 
save/clobber/keep/file=a.nc time
sp ncdump a.nc >> all_ncdump.out
 
SET MODE/LAST upcase_output
*** Running ferret script: bn_time2d.jnl
! bn_time2d.jnl
! 1/30/2015 ACM
 
! initial changes to handle 2d time variable: forecast and time
! plot both axes as formatted time axes.
 
use twodtime.nc
sh dat
     currently SET data sets:
    1> ./data/twodtime.nc  (default)
 name     title                             I         J         K         L         M         N
 TIME     GRIB forecast or observation ti  ...       ...       ...       1:8       ...       1:3
 
sh att time
     attributes for dataset: ./data/twodtime.nc
 time.units = calendar Month since 2014-11-01T00:00:00Z 
 time.long_name = GRIB forecast or observation time 
 time.calendar = proleptic_gregorian 
 time.bounds = time_bounds 
 time.history = From http://tds.climatedatacloud.com/thredds/dodsC/ensembles/nmme_gfdl/TwoD 
 
!  The file has the t axis as just a dimension. Define another
!  axis with time units
 
def axis/t=1:8:1/units=month/t0=1-nov-2014 taxis
let time2d = time[gt=taxis@asn]
set att/like=time time2d
 
shade time2d
shade/trans time2d
*** Running ferret script: bn_legend_labels.jnl
! bn_legend_labels.jnl
! The legend labels on a multi-line plot describe the
!  variable and context but are not controlable by the user.
!
! /KEY=title tells Ferret to label the legend with the variable
! title.
! *acm* 2/4/2015 Ticket 2231
 
! just to be sure
cancel mode logo
cancel sym lab*
 
 
use coads_climatology
let/title=January sst1 = sst[l=1]
let/title=February sst2 = sst[l=2]
let/title=March sst3 = sst[l=3]
 
! Draw a plot and show the labels on the legend.
plot/x=300/y=20:65 sst1,sst2,sst3
sh sym lab*
LABX = "LATITUDE"
LAB1 = "LONGITUDE : 61W"
LABNUM_X = "1"
LAB2 = "DATA SET: coads_climatology"
LABNUM_DSET = "2"
LABY = ""
LAB3 = "SST1[T=16-JAN 06:00]"
LABKEY = "SST3[T=17-MAR 02:58]"
LAB4 = "SST2[T=15-FEB 16:29]"
LAB5 = "SST3[T=17-MAR 02:58]"
 
cancel sym lab*
 
! Draw a plot with legend labeled with the variable titles.
plot/x=300/y=20:65/key=title  sst1,sst2,sst3
sh sym lab*
LABX = "LATITUDE"
LAB1 = "LONGITUDE : 61W"
LABNUM_X = "1"
LAB2 = "DATA SET: coads_climatology"
LABNUM_DSET = "2"
LABY = ""
LAB3 = "January"
LABKEY = "March"
LAB4 = "February"
LAB5 = "March"
 
set mode/last logo
*** Running ferret script: bn_DQ.jnl
! bn_DQ.jnl  *sh* 2/2015
! test the use of _DQ_ and _SQ_ in lieu of " and '
 
let foobar = 1
let foobar_ = 1
 
LIST foobar, foobar_
 Column  1: FOOBAR is 1
 Column  2: FOOBAR_ is 1
         FOOBAR  FOOBAR_
I / *:     1.000   1.000
 
LIST    "foobar"    ! bug fix: pre-V694 used to list the value of foobar
             VARIABLE : "foobar"
        "foobar"
let a = "foobar"
list a
             VARIABLE : "foobar"
        "foobar"
 
list    _DQ_foobar_DQ_
             VARIABLE : _DQ_foobar_DQ_
        "foobar"
let a = _DQ_foobar_DQ_
list a
             VARIABLE : _DQ_foobar_DQ_
        "foobar"
 
! ======
list    "_DQ_foobar_DQ_"
             VARIABLE : "_DQ_foobar_DQ_"
        "_DQ_foobar_DQ_"
let a = "_DQ_foobar_DQ_"
list a
             VARIABLE : "_DQ_foobar_DQ_"
        "_DQ_foobar_DQ_"
 
list    _DQ_"foobar"_DQ_
             VARIABLE : _DQ_"foobar"_DQ_
        ""foobar""
let a = _DQ_"foobar"_DQ_
list a
             VARIABLE : _DQ_"foobar"_DQ_
        ""foobar""
 
! ======
list    'FOOBAR'
             VARIABLE : 1
          1.000
let a = 'FOOBAR'
list a
             VARIABLE : 'FOOBAR'
          1.000
 
list    _SQ_FOOBAR_SQ_
             VARIABLE : 1
          1.000
let a = _SQ_FOOBAR_SQ_
list a
             VARIABLE : _SQ_FOOBAR_SQ_
          1.000
 
! ======
list       "'foobar'"
             VARIABLE : "'foobar'"
        "'foobar'"
let a =    "'foobar'"
list a
             VARIABLE : "'foobar'"
        "'foobar'"
 
list    _DQ_'foobar'_DQ_
             VARIABLE : _DQ_'foobar'_DQ_
        "'foobar'"
let a = _DQ_'foobar'_DQ_
list a
             VARIABLE : _DQ_'foobar'_DQ_
        "'foobar'"
 
! ======
list       "_SQ_foobar_SQ_"
             VARIABLE : "_SQ_foobar_SQ_"
        "_SQ_foobar_SQ_"
let a =    "_SQ_foobar_SQ_"
list a
             VARIABLE : "_SQ_foobar_SQ_"
        "_SQ_foobar_SQ_"
 
list    _DQ__SQ_foobar_SQ__DQ_
             VARIABLE : _DQ__SQ_foobar_SQ__DQ_
        "_SQ_foobar_SQ_"
let a = _DQ__SQ_foobar_SQ__DQ_
list a
             VARIABLE : _DQ__SQ_foobar_SQ__DQ_
        "_SQ_foobar_SQ_"
 
! ======
list    'FOOBAR'    +    'FOOBAR'
             VARIABLE : 'FOOBAR'    +    'FOOBAR'
          2.000
let a = 'FOOBAR'    +    'FOOBAR'
list a
             VARIABLE : 'FOOBAR'    +    'FOOBAR'
          2.000
 
list    _SQ_FOOBAR_SQ_ + _SQ_FOOBAR_SQ_  ! should behave like the preceding
             VARIABLE : _SQ_FOOBAR_SQ_ + _SQ_FOOBAR_SQ_
          2.000
let a = _SQ_FOOBAR_SQ_ + _SQ_FOOBAR_SQ_
list a
             VARIABLE : _SQ_FOOBAR_SQ_ + _SQ_FOOBAR_SQ_
          2.000
 
! ====== demonstrate hiding all sorts of characters
let a = _DQ_'"+-/;_SQ_foobar"'_DQ_
list a
             VARIABLE : _DQ_'"+-/;_SQ_foobar"'_DQ_
        "'"+-/;_SQ_foobar"'"
 
! ======
say     "hello"
hello
say  _DQ_hello_DQ_
hello
 
! ======
list    {"foobar","foobar"}
             VARIABLE : {"foobar","foobar"}
             SUBSET   : 2 points (X)
 1   / 1:"foobar"
 2   / 2:"foobar"
let a = {"foobar","foobar"}
list a
             VARIABLE : {"foobar","foobar"}
             SUBSET   : 2 points (X)
 1   / 1:"foobar"
 2   / 2:"foobar"
 
list    {_DQ_foobar_DQ_,_DQ_foobar_DQ_}
             VARIABLE : {_DQ_foobar_DQ_,_DQ_foobar_DQ_}
             SUBSET   : 2 points (X)
 1   / 1:"foobar"
 2   / 2:"foobar"
let a = {_DQ_foobar_DQ_,_DQ_foobar_DQ_}
list a
             VARIABLE : {_DQ_foobar_DQ_,_DQ_foobar_DQ_}
             SUBSET   : 2 points (X)
 1   / 1:"foobar"
 2   / 2:"foobar"
 
list    {_DQ_"foobar"_DQ_,_DQ_"foobar"_DQ_} ! DQ used to protect '"'
             VARIABLE : {_DQ_"foobar"_DQ_,_DQ_"foobar"_DQ_}
             SUBSET   : 2 points (X)
 1   / 1:""foobar""
 2   / 2:""foobar""
let a = {_DQ_"foobar"_DQ_,_DQ_"foobar"_DQ_}
list a
             VARIABLE : {_DQ_"foobar"_DQ_,_DQ_"foobar"_DQ_}
             SUBSET   : 2 points (X)
 1   / 1:""foobar""
 2   / 2:""foobar""
 
! ======
list    {SPAWN:"ls data/weird_name1.cdf","foobar"}
             VARIABLE : {SPAWN:"ls data/weird_name1.cdf","foobar"}
             SUBSET   : 2 points (X)
 1   / 1:"data/weird_name1.cdf"
 2   / 2:"foobar"              
let a = {SPAWN:"ls data/weird_name1.cdf","foobar"}
list a
             VARIABLE : {SPAWN:"ls data/weird_name1.cdf","foobar"}
             SUBSET   : 2 points (X)
 1   / 1:"data/weird_name1.cdf"
 2   / 2:"foobar"              
 
list    {SPAWN:_DQ_ls data/weird_name1.cdf_DQ_,_DQ_foobar_DQ_}
             VARIABLE : {SPAWN:_DQ_ls data/weird_name1.cdf_DQ_,_DQ_foobar_DQ_}
             SUBSET   : 2 points (X)
 1   / 1:"data/weird_name1.cdf"
 2   / 2:"foobar"              
let a = {SPAWN:_DQ_ls data/weird_name1.cdf_DQ_,_DQ_foobar_DQ_}
list a
             VARIABLE : {SPAWN:_DQ_ls data/weird_name1.cdf_DQ_,_DQ_foobar_DQ_}
             SUBSET   : 2 points (X)
 1   / 1:"data/weird_name1.cdf"
 2   / 2:"foobar"              
 
list    {SPAWN:_DQ_ls "data/weird_name1.cdf"_DQ_,_DQ_foobar_DQ_} ! DQ protects '"'
             VARIABLE : {SPAWN:_DQ_ls "data/weird_name1.cdf"_DQ_,_DQ_foobar_DQ_}
             SUBSET   : 2 points (X)
 1   / 1:"data/weird_name1.cdf"
 2   / 2:"foobar"              
let a = {SPAWN:_DQ_ls "data/weird_name1.cdf"_DQ_,_DQ_foobar_DQ_}
list a
             VARIABLE : {SPAWN:_DQ_ls "data/weird_name1.cdf"_DQ_,_DQ_foobar_DQ_}
             SUBSET   : 2 points (X)
 1   / 1:"data/weird_name1.cdf"
 2   / 2:"foobar"              
 
! ======
! in repl_exprns:
say `"=" EQ "="`
 !-> MESSAGE/CONTINUE 1
1
say `_DQ_=_DQ_ EQ _DQ_=_DQ_`
 !-> MESSAGE/CONTINUE 1
1
say `_DQ_"="_DQ_ EQ _DQ_"="_DQ_`            ! DQ used to protect '"'
 !-> MESSAGE/CONTINUE 1
1
 
! in xeq_if:
IF 1 THEN SAY "I is too big" ENDIF
I is too big
IF 1 THEN SAY _DQ_I is too big_DQ_ ENDIF
I is too big
IF 1 THEN SAY _DQ_"I is too big"_DQ_ ENDIF  ! DQ used to protect '"'
"I is too big"
 
! ======
DEFINE SYMBOL a    "foobar"
say ($a)
 !-> MESSAGE/CONTINUE foobar
foobar
DEFINE SYMBOL a _DQ_foobar_DQ_
say ($a)
 !-> MESSAGE/CONTINUE foobar
foobar
 
! ======
! Note this result changes 6/30/2017, due to change in merge_grid for ticket
! 2313, in grid-merging the grid of a constant is now a normal grid. Previously
! it was the abstract grid.
DEFINE SYMBOL a    "(`foobar,return=xaxis`)"
 !-> DEFINE SYMBOL a    "(NORMAL)"
say ($a)
 !-> MESSAGE/CONTINUE (NORMAL)
(NORMAL)
DEFINE SYMBOL a _DQ_(`foobar,return=xaxis`)_DQ_
 !-> DEFINE SYMBOL a _DQ_(NORMAL)_DQ_
say ($a)
 !-> MESSAGE/CONTINUE (NORMAL)
(NORMAL)
 
! ======
GO bn_DQ.sub _DQ_+-/_SQ_\!foo"bar;_SQ_"_DQ_    "_DQ_+-/_SQ_\!foobar;_SQ_"
! bn_DQ.sub   arg_with_DQ    arg_with_quotes
 
SAY _DQ_ "-quotations   ok as in $1%any_arg_with_quotes%_DQ_
 !-> MESSAGE/CONTINUE _DQ_ "-quotations   ok as in +-/_SQ_!foo"bar;_SQ_"_DQ_
 "-quotations   ok as in +-/_SQ_!foo"bar;_SQ_"
SAY    "_DQ_ delimiters ok as in $2%any_arg_with_DQ%"
 !-> MESSAGE/CONTINUE    "_DQ_ delimiters ok as in _DQ_+-/_SQ_!foobar;_SQ_"
_DQ_ delimiters ok as in _DQ_+-/_SQ_!foobar;_SQ_
 
 
! ======  string arguments to functions
list STRCAT(   "HELL"   ,   "O"   )
             VARIABLE : STRCAT(   "HELL"   ,   "O"   )
        "HELLO"
list STRCAT(_DQ_HELL_DQ_,_DQ_O_DQ_)
             VARIABLE : STRCAT(_DQ_HELL_DQ_,_DQ_O_DQ_)
        "HELLO"
 
! ======
let/title=   "title of A"    a = 1
list a
             VARIABLE : title of A
          1.000
let/title=_DQ_title of A_DQ_ a = 1
list a
             VARIABLE : title of A
          1.000
let/title=_DQ_"title of A"_DQ_ a = 1        ! DQ used to protect '"'
list a
             VARIABLE : "title of A"
          1.000
 
! ======
use weird_name1.cdf
list    'v2-and-minus'[i=4:6]
             VARIABLE : SIN(2+I/10)
             FILENAME : weird_name1.cdf
             SUBSET   : 3 points (X)
 4   / 4:  0.6755
 5   / 5:  0.5985
 6   / 6:  0.5155
list _SQ_v2-and-minus_SQ_[i=4:6]
             VARIABLE : SIN(2+I/10)
             FILENAME : weird_name1.cdf
             SUBSET   : 3 points (X)
 4   / 4:  0.6755
 5   / 5:  0.5985
 6   / 6:  0.5155
list    'v2-and-minus'[i=4:6]
             VARIABLE : SIN(2+I/10)
             FILENAME : weird_name1.cdf
             SUBSET   : 3 points (X)
 4   / 4:  0.6755
 5   / 5:  0.5985
 6   / 6:  0.5155
list _SQ_v2-and-minus_SQ_[i=4:6]
             VARIABLE : SIN(2+I/10)
             FILENAME : weird_name1.cdf
             SUBSET   : 3 points (X)
 4   / 4:  0.6755
 5   / 5:  0.5985
 6   / 6:  0.5155
list    'v2-and-minus'[i=4:6]    / 'X'[i=4:6]
             VARIABLE : 'v2-and-minus'[I=4:6]    / 'X'[I=4:6]
             FILENAME : weird_name1.cdf
             SUBSET   : 3 points (X)
 4   / 4: -0.8741
 5   / 5: -0.8482
 6   / 6: -0.8166
list _SQ_v2-and-minus_SQ_[i=4:6] / _SQ_X_SQ_[i=4:6]
             VARIABLE : _SQ_v2-and-minus_SQ_[I=4:6] / _SQ_X_SQ_[I=4:6]
             FILENAME : weird_name1.cdf
             SUBSET   : 3 points (X)
 4   / 4: -0.8741
 5   / 5: -0.8482
 6   / 6: -0.8166
 
! ======
SET REGION/T=   "1-jan-2001":"15-jan-2001"
SHOW REGION
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        T=-63145526400:-63146736000
        E/M is unspecified
        F/N is unspecified
SET REGION/T=_DQ_1-jan-2001_DQ_:_DQ_15-jan-2001_DQ_
SHOW REGION
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        T=-63145526400:-63146736000
        E/M is unspecified
        F/N is unspecified
! ==> THE clean_draconian FILTER REMOVES THE FOLLOWING DATE-TIME LINES FROM LOG
SET REGION/T=   "1-jan-2001:12:00":"15-jan-2001 12:00"
SHOW REGION
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        T=-63145569600:-63146779200
        E/M is unspecified
        F/N is unspecified
SET REGION/T=_DQ_1-jan-2001:12:00_DQ_:_DQ_15-jan-2001 12:00_DQ_
SHOW REGION
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        T=-63145569600:-63146779200
        E/M is unspecified
        F/N is unspecified
 
! ======
DEFINE ATTRIBUTE foobar.some_text =    "some text about foobar"
SHOW ATTRIBUTE/ALL foobar
     attributes for user-defined variables
 foobar.long_name = 1 
 foobar.missing_value = -1.E+34
 foobar.some_text = some text about foobar 
DEFINE ATTRIBUTE foobar.some_text = _DQ_some text about foobar_DQ_
SHOW ATTRIBUTE/ALL foobar
     attributes for user-defined variables
 foobar.long_name = 1 
 foobar.missing_value = -1.E+34
 foobar.some_text = some text about foobar 
DEFINE ATTR foobar.some_text = _DQ_"quoted attribute"_DQ_ ! DQ protects '"'
SHOW ATTRIBUTE/ALL foobar
     attributes for user-defined variables
 foobar.long_name = 1 
 foobar.missing_value = -1.E+34
 foobar.some_text = "quoted attribute" 
 
! ======
SPAWN    "ls data/weird_name1.*"
data/weird_name1.cdf
SPAWN _DQ_ls data/weird_name1.*_DQ_
data/weird_name1.cdf
 
! ======
LET a = {"first.nc", SPAWN:   "ls data/weird_name1.*"   ,"last.nc"}
LIST a
             VARIABLE : {"first.nc", SPAWN:   "ls data/weird_name1.*"   ,"last.nc"}
             SUBSET   : 3 points (X)
 1   / 1:"first.nc"            
 2   / 2:"data/weird_name1.cdf"
 3   / 3:"last.nc"             
LET a = {"first.nc", SPAWN:_DQ_ls data/weird_name1.*_DQ_,"last.nc"}
LIST a
             VARIABLE : {"first.nc", SPAWN:_DQ_ls data/weird_name1.*_DQ_,"last.nc"}
             SUBSET   : 3 points (X)
 1   / 1:"first.nc"            
 2   / 2:"data/weird_name1.cdf"
 3   / 3:"last.nc"             
 
! =========================
! !!!!!!  TEMPORARY LINE
! !!!!!!  see bug report err693_xeq_show.jnl
show data   ! to side step dset=-1 left behind by SHOW ATTRIBUTE previously
     currently SET data sets:
    1> ./data/weird_name1.cdf  (default)
 name     title                             I         J         K         L
 v1       lower case v1                    1:20      ...       ...       ...
 v2-and-minus
          SIN(2+I/10)                      1:20      ...       ...       ...
 V1       Upper case V1                    1:20      ...       ...       ...
 I        SIN(4+I/10)                      1:20      ...       ...       ...
 X        SIN(5+I/10)                      1:20      ...       ...       ...
 
! !!!!!!
! =========================
                                                                                ! ======
define grid/x=_DQ_v1_DQ_ gg
show grid gg
    GRID GG
 name       axis              # pts   start                end
 XAX1_20   X                   20 r   1                    20
 normal    Y
 normal    Z
 normal    T
 
! ======
LET/TITLE= _DQ_'A title w/ "sq"'. Ship_Ka'imimoana_DQ_ A = 1 ! ' char for emacs
LIST A
             VARIABLE : 'A title w/ "sq"'. Ship_Ka'imimoana
          1.000
 
! ======
contour/LEVELS=    "(-10,10,2)DARK(-10,10,8)"    \
               10*SIN(X[x=1:5:.1])*COS(Y[Y=1:5:.1])
contour/LEVELS= _DQ_(-10,10,2)DARK(-10,10,8)_DQ_ \
               10*SIN(X[x=1:5:.1])*COS(Y[Y=1:5:.1])
 
! ====== parse, parsex routines
!plot/set x[i=1:3]^2
!ppl title    "'A title w/ single quotes'. Ship Ka'imimoana"
!ppl plot
!label 2,5,0 "'A title w/ single quotes'. Ship Ka'imimoana"
 
plot/set x[i=1:3]^2
ppl title _DQ_'A title w/ "single quotes"'. Ship_Ka'imimoana_DQ_ ! ' for emacs
ppl plot
label 2,5,0 _DQ_'A title w/ "single quotes"'. Ship_Ka'imimoana_DQ_ ! ' emacs
ppl %label 2,4,0 _DQ_'A title w/ "single quotes"'. Ship_Ka'imimoana_DQ_ ! ' emacs
 
! ======  EQUAL_PEMUTE
list/order=_DQ_yx_DQ_ 10*i[i=1:3] + j[j=1:2]
             VARIABLE : 10*I[I=1:3] + J[J=1:2]
             SUBSET   : 2 by 3 points (Y-X)
             1      2    
             1      2
 1   / 1:  11.00  12.00
 2   / 2:  21.00  22.00
 3   / 3:  31.00  32.00
 
! ======  EQUAL_COLOR
plot/color=_DQ_red_DQ_ i[i=1:100]^2
 
! ======  EQUAL_RANGE
plot/vlim=-2:2/hlim="1-jan-1980":"15-feb-1980" \
    SIN(t[t=1-jan-1980:1-feb-1980:1]/5)
plot/vlim=-2:2/hlim=_DQ_1-jan-1980_DQ_:_DQ_15-feb-1980_DQ_ \
    SIN(t[t=1-jan-1980:1-feb-1980:1]/5)
! ==> THE clean_draconian FILTER REMOVES THE FOLLOWING DATE-TIME LINES FROM LOG
plot/vlim=-2:2/hlim="1-jan-1980":"15-feb-1980:12:00" \
    SIN(t[t=1-jan-1980:1-feb-1980:1]/5)
plot/vlim=-2:2/hlim=_DQ_1-jan-1980_DQ_:_DQ_15-feb-1980:12:00_DQ_ \
    SIN(t[t=1-jan-1980:1-feb-1980:1]/5)
 
! the following usages for _DQ_ and _SQ_ are NOT supported:
! 1. internal PLOT+ syntax
!    e.g. PPL XFOR (i5, ''LONW'')
 
! 2. quote used as a delimiter for symbol substitution
!    e.g. ($mysymbol"0|red>1|green>2")     ! several single char als.  e.g. "%"
 
! in xeq_set:  double quotes around SET MODE argument -- _DQ_ not supported
 
! in put_label: special hack for "'date'" -- _SQ_ not supported
 
! it isn't clear that there is really a requirement for the _SQ_ syntax at all
! since we are adding this feature to meet our own needs in LAS, we won't
! make the extra effort to hit all of the obscure cases.  As a result, the
! occurrences of IF string .EQ. "'" in these routines will be ignored
!   - break_varname
!   - break_varattname
!   - inherit_attrs
 
! in xeq_define.F:  DEFINE AXIS/NAME='my-name' is of unclear purpose
*** Running ferret script: bn695_bug_fixes.jnl
! bn695_bug_fixes
! test various fixes that went into version 6.95
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err694_shf_missing
! err694_shf_missing.jnl
! Test the fix for ticket 2314
 
! This had been getting a missing-result; now is correct
use gt4d011.cdf
list/i=100/j=50/k=1/l=24 temp[l=@shf]
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             LONGITUDE: 130.5W
             LATITUDE : 1.5N
             DEPTH (m): 5
             TIME     : 04-JAN-1983 10:00 (shifted by 1 pts)
          32.10
 
! Check shift that takes us beyond the end of a modulo axis (at x=20)
can dat/all; use coads_climatology
list/x=10:30/y=-60/l=1  sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 10 points (LONGITUDE)
             LATITUDE : 61S
             TIME     : 16-JAN 06:00
               61S   
               15
 11E   / -4:  0.447
 13E   / -3:  0.179
 15E   / -2:  0.521
 17E   / -1:  0.229
 19E   /  0:  0.727
 21E   /  1:  0.844
 23E   /  2:  0.440
 25E   /  3:  0.620
 27E   /  4:  0.873
 29E   /  5:  1.062
list/x=10:30/y=-60/l=1  sst[i=@shf:3]
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
                        shifted by 3 pts on X
             FILENAME : coads_climatology.cdf
             SUBSET   : 10 points (LONGITUDE)
             LATITUDE : 61S
             TIME     : 16-JAN 06:00
               61S   
               15
 11E   / -4:  0.229
 13E   / -3:  0.727
 15E   / -2:  0.844
 17E   / -1:  0.440
 19E   /  0:  0.620
 21E   /  1:  0.873
 23E   /  2:  1.062
 25E   /  3:  1.261
 27E   /  4:  1.395
 29E   /  5:  1.010
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err694_longname_showdat
! err694_longname_showdat.jnl
! ticket 2317
!
! Make a file whose name starts the same as file with long name.
sp rm WestCoastCarbon_9d9c_f562_77b5_5.nc
sp ln -s data/WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc WestCoastCarbon_9d9c_f562_77b5_5.nc
 
use WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc
 
! Long name was not matched by SHOW DAT filename
! this previously returned an unknown dataset error
sh dat WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d
     currently SET data sets:
    1> ./data/WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc  (default)
       DSG Feature type Profile
 name     title                             I         J         K         L         M         N
 PROF     Prof                             ...       ...       ...       ...       1:21      ...
 PROFILE  profile ID: Cruise and Station   ...       ...       ...       ...       1:21      ...
 TIME     Time                             ...       ...       ...       ...       1:21      ...
 LATITUDE Latitude                         ...       ...       ...       ...       1:21      ...
 LONGITUDE
          Longitude                        ...       ...       ...       ...       1:21      ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:21      ...
 PRESS_DB PRESS_DB                         ...       ...     tot 373     ...       1:21      ...
 PCO2     PCO2                             ...       ...     tot 373     ...       1:21      ...
 
 
! If a file matched to 1st 32 characters, the shorter-named
! datset was mistakenly returned.
 
use WestCoastCarbon_9d9c_f562_77b5_5
sh dat WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d
     currently SET data sets:
    1> ./data/WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc
       DSG Feature type Profile
 name     title                             I         J         K         L         M         N
 PROF     Prof                             ...       ...       ...       ...       1:21      ...
 PROFILE  profile ID: Cruise and Station   ...       ...       ...       ...       1:21      ...
 TIME     Time                             ...       ...       ...       ...       1:21      ...
 LATITUDE Latitude                         ...       ...       ...       ...       1:21      ...
 LONGITUDE
          Longitude                        ...       ...       ...       ...       1:21      ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:21      ...
 PRESS_DB PRESS_DB                         ...       ...     tot 373     ...       1:21      ...
 PCO2     PCO2                             ...       ...     tot 373     ...       1:21      ...
 
 
sp rm WestCoastCarbon_9d9c_f562_77b5_5.nc
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err693_std4d
! err693_std4d
! Check fix to ticket 2319: std transform in multi-dimensions
 
 
let a = x[gx=1:3:1] * y[gy=1:3:1]
let astd = a[x=@std,y=@std]
let avar = a[x=@var,y=@var]
let a2 = a^2
let avar_calc = a2[x=@ave,y=@ave] - a[x=@ave,y=@ave]^2
let astd_x = a[x=@std]
let astd_x_y = astd_x[y=@std]
 
! STD and VAR in x and y together; vs astd_x_y separately
list astd^2, avar, avar_calc, astd_x_y^2
             X: 0.5 to 3.5
             Y: 0.5 to 3.5
 Column  1: EX#1 is ASTD^2
 Column  2: AVAR is A[X=@VAR,Y=@VAR]
 Column  3: AVAR_CALC is A2[X=@AVE,Y=@AVE] - A[X=@AVE,Y=@AVE]^2
 Column  4: EX#4 is ASTD_X_Y^2
           EX#1   AVAR  AVAR_CA   EX#4
I / *:     5.778  5.778   5.778  0.4444
 
 
! Now in the E and F directions
 
let a = _e[ge=1:3:1] * _f[gf=1:3:1]
let astd = a[e=@std,f=@std]
let avar = a[e=@var,f=@var]
let a2 = a^2
let avar_calc = a2[e=@ave,f=@ave] - a[e=@ave,f=@ave]^2
let astd_e = a[e=@std]
let astd_e_f = astd_e[f=@std]
 
list astd^2, avar, avar_calc, astd_e_f^2
             E: 0.5 to 3.5
             F: 0.5 to 3.5
 Column  1: EX#1 is ASTD^2
 Column  2: AVAR is A[E=@VAR,F=@VAR]
 Column  3: AVAR_CALC is A2[E=@AVE,F=@AVE] - A[E=@AVE,F=@AVE]^2
 Column  4: EX#4 is ASTD_E_F^2
           EX#1   AVAR  AVAR_CA   EX#4
I / *:     5.778  5.778   5.778  0.4444
 
*** Running ferret script: bn_f_tax_fcns.jnl
! bn_f_from_tax_fcns.jnl
! test tax_* functions returning results from a
! time-formatted axis in the F direction
!
! 2/2015 ACM
 
define axis/f=1-jan-2011:31-jan-2011:1/units=hours fax
 
 
 
let ff = _f[gf=fax]
! Test RETURN=F0
say `ff,return=F0`
 !-> MESSAGE/CONTINUE 15-JAN-1901
15-JAN-1901
 
list/N=20:30 tax_datestring(_F[g=ff],ff,"minute")
             VARIABLE : TAX_DATESTRING(_F[G=FF],FF,"minute")
             SUBSET   : 11 points (FORECAST)
 01-JAN-2011 19:00 / 20:"01-JAN-2011 19:00"
 01-JAN-2011 20:00 / 21:"01-JAN-2011 20:00"
 01-JAN-2011 21:00 / 22:"01-JAN-2011 21:00"
 01-JAN-2011 22:00 / 23:"01-JAN-2011 22:00"
 01-JAN-2011 23:00 / 24:"01-JAN-2011 23:00"
 02-JAN-2011 00:00 / 25:"02-JAN-2011 00:00"
 02-JAN-2011 01:00 / 26:"02-JAN-2011 01:00"
 02-JAN-2011 02:00 / 27:"02-JAN-2011 02:00"
 02-JAN-2011 03:00 / 28:"02-JAN-2011 03:00"
 02-JAN-2011 04:00 / 29:"02-JAN-2011 04:00"
 02-JAN-2011 05:00 / 30:"02-JAN-2011 05:00"
list/N=20:30 tax_datestring(_F[g=ff],ff,"hour")
             VARIABLE : TAX_DATESTRING(_F[G=FF],FF,"hour")
             SUBSET   : 11 points (FORECAST)
 01-JAN-2011 19:00 / 20:"01-JAN-2011 19"
 01-JAN-2011 20:00 / 21:"01-JAN-2011 20"
 01-JAN-2011 21:00 / 22:"01-JAN-2011 21"
 01-JAN-2011 22:00 / 23:"01-JAN-2011 22"
 01-JAN-2011 23:00 / 24:"01-JAN-2011 23"
 02-JAN-2011 00:00 / 25:"02-JAN-2011 00"
 02-JAN-2011 01:00 / 26:"02-JAN-2011 01"
 02-JAN-2011 02:00 / 27:"02-JAN-2011 02"
 02-JAN-2011 03:00 / 28:"02-JAN-2011 03"
 02-JAN-2011 04:00 / 29:"02-JAN-2011 04"
 02-JAN-2011 05:00 / 30:"02-JAN-2011 05"
list/N=20:30 tax_datestring(_F[g=ff],ff,"day")
             VARIABLE : TAX_DATESTRING(_F[G=FF],FF,"day")
             SUBSET   : 11 points (FORECAST)
 01-JAN-2011 19:00 / 20:"01-JAN-2011"
 01-JAN-2011 20:00 / 21:"01-JAN-2011"
 01-JAN-2011 21:00 / 22:"01-JAN-2011"
 01-JAN-2011 22:00 / 23:"01-JAN-2011"
 01-JAN-2011 23:00 / 24:"01-JAN-2011"
 02-JAN-2011 00:00 / 25:"02-JAN-2011"
 02-JAN-2011 01:00 / 26:"02-JAN-2011"
 02-JAN-2011 02:00 / 27:"02-JAN-2011"
 02-JAN-2011 03:00 / 28:"02-JAN-2011"
 02-JAN-2011 04:00 / 29:"02-JAN-2011"
 02-JAN-2011 05:00 / 30:"02-JAN-2011"
list/N=20:30 tax_dayfrac(_F[g=ff],ff)
             VARIABLE : TAX_DAYFRAC(_F[G=FF],FF)
             SUBSET   : 11 points (FORECAST)
 01-JAN-2011 19:00 / 20:  0.7917
 01-JAN-2011 20:00 / 21:  0.8333
 01-JAN-2011 21:00 / 22:  0.8750
 01-JAN-2011 22:00 / 23:  0.9167
 01-JAN-2011 23:00 / 24:  0.9583
 02-JAN-2011 00:00 / 25:  0.0000
 02-JAN-2011 01:00 / 26:  0.0417
 02-JAN-2011 02:00 / 27:  0.0833
 02-JAN-2011 03:00 / 28:  0.1250
 02-JAN-2011 04:00 / 29:  0.1667
 02-JAN-2011 05:00 / 30:  0.2083
list/N=20:30 tax_day(_F[g=ff],ff)
             VARIABLE : TAX_DAY(_F[G=FF],FF)
             SUBSET   : 11 points (FORECAST)
 01-JAN-2011 19:00 / 20:  1.000
 01-JAN-2011 20:00 / 21:  1.000
 01-JAN-2011 21:00 / 22:  1.000
 01-JAN-2011 22:00 / 23:  1.000
 01-JAN-2011 23:00 / 24:  1.000
 02-JAN-2011 00:00 / 25:  2.000
 02-JAN-2011 01:00 / 26:  2.000
 02-JAN-2011 02:00 / 27:  2.000
 02-JAN-2011 03:00 / 28:  2.000
 02-JAN-2011 04:00 / 29:  2.000
 02-JAN-2011 05:00 / 30:  2.000
list/N=20:30 tax_jday(_F[g=ff],ff)
             VARIABLE : TAX_JDAY(_F[G=FF],FF)
             SUBSET   : 11 points (FORECAST)
 01-JAN-2011 19:00 / 20:  1.000
 01-JAN-2011 20:00 / 21:  1.000
 01-JAN-2011 21:00 / 22:  1.000
 01-JAN-2011 22:00 / 23:  1.000
 01-JAN-2011 23:00 / 24:  1.000
 02-JAN-2011 00:00 / 25:  2.000
 02-JAN-2011 01:00 / 26:  2.000
 02-JAN-2011 02:00 / 27:  2.000
 02-JAN-2011 03:00 / 28:  2.000
 02-JAN-2011 04:00 / 29:  2.000
 02-JAN-2011 05:00 / 30:  2.000
list/N=20:30 tax_month(_F[g=ff],ff)
             VARIABLE : TAX_MONTH(_F[G=FF],FF)
             SUBSET   : 11 points (FORECAST)
 01-JAN-2011 19:00 / 20:  1.000
 01-JAN-2011 20:00 / 21:  1.000
 01-JAN-2011 21:00 / 22:  1.000
 01-JAN-2011 22:00 / 23:  1.000
 01-JAN-2011 23:00 / 24:  1.000
 02-JAN-2011 00:00 / 25:  1.000
 02-JAN-2011 01:00 / 26:  1.000
 02-JAN-2011 02:00 / 27:  1.000
 02-JAN-2011 03:00 / 28:  1.000
 02-JAN-2011 04:00 / 29:  1.000
 02-JAN-2011 05:00 / 30:  1.000
list/N=20:30 tax_yearfrac(_F[g=ff],ff)
             VARIABLE : TAX_YEARFRAC(_F[G=FF],FF)
             SUBSET   : 11 points (FORECAST)
 01-JAN-2011 19:00 / 20:  0.004909
 01-JAN-2011 20:00 / 21:  0.005023
 01-JAN-2011 21:00 / 22:  0.005137
 01-JAN-2011 22:00 / 23:  0.005251
 01-JAN-2011 23:00 / 24:  0.005365
 02-JAN-2011 00:00 / 25:  0.005479
 02-JAN-2011 01:00 / 26:  0.005594
 02-JAN-2011 02:00 / 27:  0.005708
 02-JAN-2011 03:00 / 28:  0.005822
 02-JAN-2011 04:00 / 29:  0.005936
 02-JAN-2011 05:00 / 30:  0.006050
list/N=20:30 tax_year(_F[g=ff],ff)
             VARIABLE : TAX_YEAR(_F[G=FF],FF)
             SUBSET   : 11 points (FORECAST)
 01-JAN-2011 19:00 / 20:  2011.
 01-JAN-2011 20:00 / 21:  2011.
 01-JAN-2011 21:00 / 22:  2011.
 01-JAN-2011 22:00 / 23:  2011.
 01-JAN-2011 23:00 / 24:  2011.
 02-JAN-2011 00:00 / 25:  2011.
 02-JAN-2011 01:00 / 26:  2011.
 02-JAN-2011 02:00 / 27:  2011.
 02-JAN-2011 03:00 / 28:  2011.
 02-JAN-2011 04:00 / 29:  2011.
 02-JAN-2011 05:00 / 30:  2011.
list/N=20:30 tax_jday1900(_F[g=ff],ff)
             VARIABLE : TAX_JDAY1900(_F[G=FF],FF)
             SUBSET   : 11 points (FORECAST)
 01-JAN-2011 19:00 / 20:  40542.
 01-JAN-2011 20:00 / 21:  40542.
 01-JAN-2011 21:00 / 22:  40542.
 01-JAN-2011 22:00 / 23:  40542.
 01-JAN-2011 23:00 / 24:  40542.
 02-JAN-2011 00:00 / 25:  40543.
 02-JAN-2011 01:00 / 26:  40543.
 02-JAN-2011 02:00 / 27:  40543.
 02-JAN-2011 03:00 / 28:  40543.
 02-JAN-2011 04:00 / 29:  40543.
 02-JAN-2011 05:00 / 30:  40543.
list tax_units(ff)
             VARIABLE : TAX_UNITS(FF)
          3600.
 
! commands from tax_tstep, changing time origin
 
DEFINE AXIS/F="1-JAN-2000:00:00:01":"1-JAN-2000:00:15:00":2/UNITS=seconds fsec
LIST/N=440:451 _F[GF=fsec]
             VARIABLE : _F
                        axis FSEC
             SUBSET   : 12 points (FORECAST)
 01-JAN-2000 00:14:39 / 440:  3.123E+09
 01-JAN-2000 00:14:41 / 441:  3.123E+09
 01-JAN-2000 00:14:43 / 442:  3.123E+09
 01-JAN-2000 00:14:45 / 443:  3.123E+09
 01-JAN-2000 00:14:47 / 444:  3.123E+09
 01-JAN-2000 00:14:49 / 445:  3.123E+09
 01-JAN-2000 00:14:51 / 446:  3.123E+09
 01-JAN-2000 00:14:53 / 447:  3.123E+09
 01-JAN-2000 00:14:55 / 448:  3.123E+09
 01-JAN-2000 00:14:57 / 449:  3.123E+09
 01-JAN-2000 00:14:59 / 450:  3.123E+09
 01-JAN-2000 00:15:01 / 451:  3.123E+09
LET bsin = SIN(_F[GF=fsec]/40000)
SAVE/FILE=a.nc/clobber bsin
CAN VAR/all
USE a.nc
 
SET LIST/PREC=7
! Reset the date to dec 1999
! Function lets us leave off the leading 0.
LIST/N=1:15  TAX_TSTEP(bsin, "1-dec-1999:00:00:00" )
             VARIABLE : TAX_TSTEP(BSIN, "1-dec-1999:00:00:00" )
             FILENAME : a.nc
             SUBSET   : 15 points (FORECAST)
 01-JAN-2000 00:00:01 /  1:  2678401.
 01-JAN-2000 00:00:03 /  2:  2678403.
 01-JAN-2000 00:00:05 /  3:  2678405.
 01-JAN-2000 00:00:07 /  4:  2678407.
 01-JAN-2000 00:00:09 /  5:  2678409.
 01-JAN-2000 00:00:11 /  6:  2678411.
 01-JAN-2000 00:00:13 /  7:  2678413.
 01-JAN-2000 00:00:15 /  8:  2678415.
 01-JAN-2000 00:00:17 /  9:  2678417.
 01-JAN-2000 00:00:19 / 10:  2678419.
 01-JAN-2000 00:00:21 / 11:  2678421.
 01-JAN-2000 00:00:23 / 12:  2678423.
 01-JAN-2000 00:00:25 / 13:  2678425.
 01-JAN-2000 00:00:27 / 14:  2678427.
 01-JAN-2000 00:00:29 / 15:  2678429.
 
! argument can be upper or lowercase
! Should list values 1, 3, 5...
LIST/N=1:15  TAX_TSTEP(bsin, "1-JAN-2000:00:00:00" )
             VARIABLE : TAX_TSTEP(BSIN, "1-JAN-2000:00:00:00" )
             FILENAME : a.nc
             SUBSET   : 15 points (FORECAST)
 01-JAN-2000 00:00:01 /  1:   1.00000
 01-JAN-2000 00:00:03 /  2:   3.00000
 01-JAN-2000 00:00:05 /  3:   5.00000
 01-JAN-2000 00:00:07 /  4:   7.00000
 01-JAN-2000 00:00:09 /  5:   9.00000
 01-JAN-2000 00:00:11 /  6:  11.00000
 01-JAN-2000 00:00:13 /  7:  13.00000
 01-JAN-2000 00:00:15 /  8:  15.00000
 01-JAN-2000 00:00:17 /  9:  17.00000
 01-JAN-2000 00:00:19 / 10:  19.00000
 01-JAN-2000 00:00:21 / 11:  21.00000
 01-JAN-2000 00:00:23 / 12:  23.00000
 01-JAN-2000 00:00:25 / 13:  25.00000
 01-JAN-2000 00:00:27 / 14:  27.00000
 01-JAN-2000 00:00:29 / 15:  29.00000
 
! Test  with TAX_DATESTRING
 
DEFINE AXIS/F="1-JAN-1902:00:00:00":"1-JAN-1902:00:30:00":5/UNITS=seconds fsec
LIST/N=200:205 _F[GF=fsec]
             VARIABLE : _F
                        axis FSEC
             SUBSET   : 6 points (FORECAST)
 01-JAN-1902 00:16:35 / 200:  30327395.
 01-JAN-1902 00:16:40 / 201:  30327400.
 01-JAN-1902 00:16:45 / 202:  30327405.
 01-JAN-1902 00:16:50 / 203:  30327410.
 01-JAN-1902 00:16:55 / 204:  30327415.
 01-JAN-1902 00:17:00 / 205:  30327420.
 
LET ff = _F[GF=fsec]
LET reset_date = TAX_DATESTRING(`_F[GF=fsec,n=1]`, ff, "sec")
 !-> DEFINE VARIABLE reset_date = TAX_DATESTRING(30326400, ff, "sec")
LIST/N=1:15 TAX_TSTEP(ff, "`reset_date`")
 !-> LIST/N=1:15 TAX_TSTEP(ff, "01-JAN-1902 00:00:00.0")
             VARIABLE : TAX_TSTEP(FF, "01-JAN-1902 00:00:00.0")
             SUBSET   : 15 points (FORECAST)
 01-JAN-1902 00:00:00 /  1:   0.00000
 01-JAN-1902 00:00:05 /  2:   5.00000
 01-JAN-1902 00:00:10 /  3:  10.00000
 01-JAN-1902 00:00:15 /  4:  15.00000
 01-JAN-1902 00:00:20 /  5:  20.00000
 01-JAN-1902 00:00:25 /  6:  25.00000
 01-JAN-1902 00:00:30 /  7:  30.00000
 01-JAN-1902 00:00:35 /  8:  35.00000
 01-JAN-1902 00:00:40 /  9:  40.00000
 01-JAN-1902 00:00:45 / 10:  45.00000
 01-JAN-1902 00:00:50 / 11:  50.00000
 01-JAN-1902 00:00:55 / 12:  55.00000
 01-JAN-1902 00:01:00 / 13:  60.00000
 01-JAN-1902 00:01:05 / 14:  65.00000
 01-JAN-1902 00:01:10 / 15:  70.00000
*** Running ferret script: bn_fmrc.jnl
! bn_fmrc.jnl
! initial test of DEFINE DATA/F
 
! *sh* 11/15 MUCH MORE DETAILED BENCHMARK NEEDED!
 
use "run1.nc"
use "run2.nc"
use "run3.nc"
use "run4.nc"
 
define data/hide/F/agg fourfiles = 1,2,3,4
 
sh grid sst
    GRID (G###)
 name       axis              # pts   start                end                 subset
 LON       LONGITUDE           10mr   109W                 91W                 full
 LAT       LATITUDE             9 r   13N                  29N                 full
 normal    Z
 TF_LAG_T  MODEL ELAPSED TIME (12 r   0.5                  11.5                full
 normal    E
 RUN       FORECAST             4 r   01-JAN-2010 12:00    07-JAN-2010 12:00   full
list/i=1/j=1/L=1:6/n=1:4 sst
             VARIABLE : SST_IN (Deg C)
             DATA SET : Forecast series of 4 datasets patterned on run1
             FILENAME : fourfiles
             SUBSET   : 6 by 4 points (MODEL ELAPSED TIME (day)-FORECAST)
             LONGITUDE: 109W
             LATITUDE : 13N
             Verification time increases across row.  Initialization time increases down page. 
                        0.5    1.5    2.5    3.5    4.5    5.5  
                        1      2      3      4      5      6
 01-JAN-2010 12 / 1:   27.4   27.4   27.6   28.1   28.9   28.8
 03-JAN-2010 12 / 2:   54.8   54.9   55.2   56.3   57.7   57.6
 05-JAN-2010 12 / 3:   82.1   82.3   82.7   84.4   86.6   86.3
 07-JAN-2010 12 / 4:  109.5  109.8  110.3  112.5  115.5  115.1
 
show att sst
     attributes for dataset: fourfiles
 SST.long_name = SST_IN 
 SST.units = Deg C 
 SST.missing_value = -1.E+34
 SST.coordinates = RUN TF_TIMES LAT LON 
 SST._ftime2d = TF_TIMES 
 SST._cal_t_ax = TF_CAL_T 
 SST._lag_f_ax = TF_LAG_F 
 SST._cal_f_ax = TF_CAL_F 
 SST._lag_t_ax = TF_LAG_T 
 
! Attribute _ftime2dRef pointe to the 2D time variable
list/L=1:6/n=1:4 `sst._ftime2d`
 !-> list/L=1:6/n=1:4 TF_TIMES
             VARIABLE : Forecast time step matrix (day since 01-JAN-2010 00:00:00)
             DATA SET : Forecast series of 4 datasets patterned on run1
             FILENAME : fourfiles
             SUBSET   : 6 by 4 points (MODEL ELAPSED TIME (day)-FORECAST)
             Verification time increases across row.  Initialization time increases down page. 
                        0.5    1.5    2.5    3.5    4.5    5.5  
                        1      2      3      4      5      6
 01-JAN-2010 12 / 1:  1.000  2.000  3.000  4.000  5.000  6.000
 02-JAN-2010 12 / 2:  2.000  3.000  4.000  5.000  6.000  7.000
 03-JAN-2010 12 / 3:  3.000  4.000  5.000  6.000  7.000  8.000
 04-JAN-2010 12 / 4:  4.000  5.000  6.000  7.000  8.000  9.000
 
*** Running ferret script: bn_return_defined.jnl
! bn_return_defined.jnl
! 5/3/2015 *acm*
! `return=defined` returns 1 if the user variable is defined
! see ticket 2293
 
let a = b
say `a,r=defined` `b,r=defined`
 !-> MESSAGE/CONTINUE 1 0
1 0
 
! abbreviate to 3 letters
use levitus_climatology
let temp2 = 2*temp
say `temp2,return=def`
 !-> MESSAGE/CONTINUE 1
1
 
! returns false for file variables
say `temp,return=defined`
 !-> MESSAGE/CONTINUE 0
0
*** Running ferret script: bn_can_var_noerr.jnl
! bn_can_var_noerr.jnl
! CANCEL VARIABLE/NOERROR
 
 
let a = 1
 
! intentional error
set mode ignore
cancel var b,a
show var
 Created by DEFINE VARIABLE:
 >>> Definitions that replace any file variable of same name:
     A = 1
 
cancel mode ignore
 
! specify /noerr and we can issue the command
 
cancel var/noerror a,b
show var
 Created by DEFINE VARIABLE:
 
! no effect on CAN VAR/ALL or CAN VAR template_name
 
let a1 = 1
let a7 = 7
let c = 12
 
cancel var/noerror name*
show var
 Created by DEFINE VARIABLE:
 >>> Definitions that replace any file variable of same name:
     C = 12
     A7 = 7
     A1 = 1
 
cancel var/noerror a*
show var
 Created by DEFINE VARIABLE:
 >>> Definitions that replace any file variable of same name:
     C = 12
 
cancel var/noerror/all
show var
 Created by DEFINE VARIABLE:
*** Running ferret script: bn_annotate.jnl
! bn_annotate.jnl
! The command ANNOTATE /USER/NORM/NOUSER/XPOS/YPOS/HALIGN/VALIGN/ANGLE/SIZE
! locates user-defined labels on a plot.
!   /USER and /NOUSER behave as the LABEL command does
!   /NORM locates labels relative to the plot axis, treating them as a unit "square".
!   /VALIGN moves the label up or down relative to the direction of the label
!   /HALIGN is -1, 1, or 0 as always, or larger values to move the label horizontally
!         relative to the direction of the label. Allows us to move, say, one character in
!         or out from the axis corner.
 
can mode logo
 
! ANNOTATE /USER
set v ul
plot/vs/sym=28/hl=-5:5/vl=-10:10 {-1,1},{-1,1}
 
annotate/nouser/xpos=`($ppl$xlen)/2`/ypos=($ppl$ylen)/halign=0/valign=-8/siz=.25 "ANNOTATE/USER labels"
 !-> annotate/nouser/xpos=2.506/ypos=3.42300/halign=0/valign=-8/siz=.25 "ANNOTATE/USER labels"
annotate/user/xpos=-1/ypos=-1/halign=0/valign=0/angle=-90/siz=0.2 "X"
annotate/user/xpos=0/ypos=0/halign=0/valign=0/angle=0/siz=0.2 "X"
annotate/user/xpos=1/ypos=1/halign=0/valign=0/angle=45/siz=0.2 "X"
 
plot/ov/vs/line=1/nolab {-1,1,1,-1,-1},{4,4,6,6,4}
annotate/user/xpos=0/ypos=5/halign=0/valign=0/angle=0/siz=0.2 "BOX"
 
plot/ov/vs/line=1/nolab .5*{-1,1,1,-1,-1},{-2,-2,-8,-8,-2}
	annotate/user/xpos=0/ypos=-5/halign=0/valign=0/angle=90/siz=0.2 "BOX"
 
plot/ov/vs/sym=2/size=2/nolab 3,0
annotate/user/xpos=3/ypos=0/halign=0/valign=1/angle=45/siz=0.2 "TOP"
annotate/user/xpos=3/ypos=0/halign=0/valign=-1/angle=45/siz=0.2 "BOTTOM"
 
plot/ov/vs/sym=2/size=2/nolab -3,0
annotate/user/xpos=-3/ypos=0/halign=-1/valign=-1/angle=45/siz=0.2 "M"
annotate/user/xpos=-3/ypos=0/halign=-1/valign=1/angle=45/siz=0.2 "M"
annotate/user/xpos=-3/ypos=0/halign=1/valign=-1/angle=45/siz=0.2 "M"
annotate/user/xpos=-3/ypos=0/halign=1/valign=1/angle=45/siz=0.2 "M"
annotate/user/xpos=-3/ypos=0/halign=-3/valign=-3/angle=45/siz=0.2 "M"
annotate/user/xpos=-3/ypos=0/halign=-3/valign=3/angle=45/siz=0.2 "M"
annotate/user/xpos=-3/ypos=0/halign=3/valign=-3/angle=45/siz=0.2 "M"
annotate/user/xpos=-3/ypos=0/halign=3/valign=3/angle=45/siz=0.2 "M"
annotate/user/xpos=-3/ypos=0/halign=-.99/valign=5/angle=45/siz=0.2 "M"
annotate/user/xpos=-3/ypos=0/halign=.99/valign=5/angle=45/siz=0.2 "M"
annotate/user/xpos=-3/ypos=0/halign=-.99/valign=-5/angle=45/siz=0.2 "M"
annotate/user/xpos=-3/ypos=0/halign=.99/valign=-5/angle=45/siz=0.2 "M"
 
 
 
! ANNOTATE/NORM
set v ur
plot/i=1:5/vlim=1:5/hlim=1:5/color=white/nolab i
annotate/nouser/xpos=`($ppl$xlen)/2`/ypos=($ppl$ylen)/halign=0/valign=-8/siz=.25 "ANNOTATE/NORM labels"
 !-> annotate/nouser/xpos=2.506/ypos=3.42300/halign=0/valign=-8/siz=.25 "ANNOTATE/NORM labels"
 
annotate/norm/xpos=.5/ypos=1.1/halign=0/angle=0/size=0.14 "FLOATING TITLE"
annotate/norm/xpos=.5/ypos=-.2/halign=0/angle=0/size=0.14 "SUBMERGED TITLE"
annotate/norm/xpos=0/ypos=1/halign=-1/angle=0/size=0.14 "LEFT/TOP"
annotate/norm/xpos=.5/ypos=1/halign=0/angle=0/size=0.14 "CTR/TOP"
annotate/norm/xpos=1/ypos=1/halign=1/angle=0/size=0.14 "RIGHT/TOP"
annotate/norm/xpos=1/ypos=.5/halign=0/angle=-90/size=0.14 "RIGHT EDGE"
annotate/norm/xpos=0/ypos=.5/halign=0/angle=90/size=0.14 "LEFT EDGE"
annotate/norm/xpos=.5/ypos=.5/halign=0/valign=0/angle=0/size=0.14 "DEAD CENTER"
annotate/norm/xpos=.5/ypos=0/halign=0/valign=1/angle=0/size=0.14 "HANGING FROM BOTTOM"
annotate/norm/xpos=0/ypos=0/halign=-2/valign=-2/angle=0/siz=0.1 "BOTTOM LEFT INSET"
annotate/norm/xpos=0/ypos=1/halign=-2/valign=2/angle=0/siz=0.1 "TOP LEFT INSET"
annotate/norm/xpos=1/ypos=0/halign=2/valign=-2/angle=0/siz=0.1 "BOTTOM RIGHT INSET"
annotate/norm/xpos=1/ypos=1/halign=2/valign=2/angle=0/siz=0.1 "TOP RIGHT INSET"
 
! ANNOTATE/NOUSER
set v ll
plot/i=1:5/vlim=1:5/hlim=1:5/color=white/nolab i
 
annotate/nouser/xpos=`($ppl$xlen)/2`/ypos=($ppl$ylen)/halign=0/valign=-8/siz=.25 "ANNOTATE/NOUSER labels"
 !-> annotate/nouser/xpos=2.506/ypos=3.42300/halign=0/valign=-8/siz=.25 "ANNOTATE/NOUSER labels"
 
! nouser
annotate/nouser/xpos=0/ypos=0/halign=-1/angle=0/size=0.15 "At Origin"
annotate/nouser/xpos=0/ypos=0/halign=-3/valign=-3/angle=0/size=0.15 "With/HALIGN=-3/VALIGN=-3"
 
annotate/nouser/xpos=($ppl$xlen)/ypos=($ppl$ylen)/halign=1/valign=-1/angle=0/siz=0.15 "Right-align at upper right corner"
 !-> annotate/nouser/xpos=5.01200/ypos=3.42300/halign=1/valign=-1/angle=0/siz=0.15 "Right-align at upper right corner"
annotate/nouser/xpos=($ppl$xlen)/ypos=($ppl$ylen)/halign=4/valign=3/angle=0/siz=0.15 "With/HALIGN=3/VALIGN=4"
 !-> annotate/nouser/xpos=5.01200/ypos=3.42300/halign=4/valign=3/angle=0/siz=0.15 "With/HALIGN=3/VALIGN=4"
 
plot/vs/line/over/color=lightblue/nolab {3,3},{1,6}
plot/vs/line/over/color=lightblue/nolab {1,5}, {3,3}
 
annotate/nouser/xpos=`($ppl$xlen)/2`/ypos=`($ppl$ylen)/2`/halign=0/valign=0/angle=0/siz=0.15 \
"Arguments locate the first<nl>line of multi-line labels "
 !-> annotate/nouser/xpos=2.506/ypos=1.7115/halign=0/valign=0/angle=0/siz=0.15 "Arguments locate the first<nl>line of multi-line labels "
 
! angles
set v lr
 
plot/i=1:5/vlim=1:5/hlim=1:5/color=white/nolab i
! nouser
annotate/nouser/xpos=`($ppl$xlen)/2`/ypos=($ppl$ylen)/halign=0/valign=-8/siz=.25 "ANNOTATE/NOUSER labels<nl>Use VALIGN=0"
 !-> annotate/nouser/xpos=2.506/ypos=3.42300/halign=0/valign=-8/siz=.25 "ANNOTATE/NOUSER labels<nl>Use VALIGN=0"
annotate/nouser/xpos=0/ypos=0/halign=0/valign=0/angle=45/size=0.15 "Center At Origin"
annotate/nouser/xpos=0/ypos=($ppl$ylen)/halign=-1/valign=0/angle=-45/siz=0.15 "left-align"
 !-> annotate/nouser/xpos=0/ypos=3.42300/halign=-1/valign=0/angle=-45/siz=0.15 "left-align"
annotate/nouser/xpos=($ppl$xlen)/ypos=0/halign=1/valign=0/angle=-45/siz=0.15 "right-align"
 !-> annotate/nouser/xpos=5.01200/ypos=0/halign=1/valign=0/angle=-45/siz=0.15 "right-align"
 
! Test defaults
! Default is like PPL user-labels
! /USER/SIZ=0.12/ANGLE=0/HALIGN=0/VALIGN=-1
 
shade/x=1:2/y=1:2/pal=grayscale i+j
annotate/xpos=1.5/ypos=1.8 "Anno Label"
label 1.5,1.6,,,, PPL label
 
 
! DEFINE ANNOTATION inside a grapchics call with /SET
can view
use gt4d011.cdf
shade/set temp[k=1,l=1]
  DEFINE ANNOTATION/user/xpos=224/ypos=-3/halign=0/valign=0/angle=0/siz=.3 "X"
ppl shade
 
shade/set/j=40/L=1 temp
  DEFINE ANNOTATION/user/xpos=224/ypos=80/halign=0/valign=0/angle=0/siz=.3 "X"
ppl shade
 
can data/all
 
plot/set/i=1:5 i
! nouser
define annotation/nouser/xpos=0/ypos=0/halign=0/angle=0/size=0.15 "Center At Origin"
define annotation/nouser/xpos=0/ypos=($ppl$ylen)/halign=-1/angle=0/siz=0.15 "left-align at upper left corner"
 !-> define annotation/nouser/xpos=0/ypos=6.00000/halign=-1/angle=0/siz=0.15 "left-align at upper left corner"
define annotation/nouser/xpos=($ppl$xlen)/ypos=0/halign=1/angle=0/siz=0.15 "right-align at lower right corner"
 !-> define annotation/nouser/xpos=8.00000/ypos=0/halign=1/angle=0/siz=0.15 "right-align at lower right corner"
! user
define annotation/user/xpos=3/ypos=2/halign=0/angle=0/siz=0.15 "user units centered at 3,2"
define annotation/user/xpos=3/ypos=3/halign=-1/angle=0/siz=0.15 "user units left at 3,3"
define annotation/user/xpos=3/ypos=4/halign=1/angle=0/siz=0.15 "user units right at 3,4"
ppl plot
 
! angles
 
plot/set/i=1:5 i
define annotation/nouser/xpos=0/ypos=0/halign=0/angle=45/size=0.15 "Center At Origin"
define annotation/nouser/xpos=0/ypos=($ppl$ylen)/halign=-1/angle=-45/siz=0.15 "left-align at upper left corner"
 !-> define annotation/nouser/xpos=0/ypos=6.00000/halign=-1/angle=-45/siz=0.15 "left-align at upper left corner"
define annotation/nouser/xpos=($ppl$xlen)/ypos=0/halign=1/angle=-45/siz=0.15 "right-align at lower right corner"
 !-> define annotation/nouser/xpos=8.00000/ypos=0/halign=1/angle=-45/siz=0.15 "right-align at lower right corner"
! user
define annotation/user/xpos=3/ypos=2/halign=0/angle=45/siz=0.15 "user units centered at 3,2"
define annotation/user/xpos=3/ypos=3/halign=-1/angle=45/siz=0.15 "user units left at 3,3"
define annotation/user/xpos=3/ypos=4/halign=1/angle=45/siz=0.15 "user units right at 3,4"
ppl plot
 
! DEFINE ANNO/NORM
plot/i=1:5/nolab/set i
def anno/norm/xp=.5/yp=1.1/hal=0/ang=0/size=.3 "FLOATING TITLE"
def anno/norm/xp=.5/yp=-.2/hal=0/ang=0/size=.3 "SUBMERGED TITLE"
def anno/norm/xp=0/yp=1/hal=-1/ang=0/size=.3 "LEFT/TOP"
def anno/norm/xp=.5/yp=1/hal=0/ang=0/size=.3 "CTR/TOP"
def anno/norm/xp=1/yp=1/hal=1/ang=0/size=.3 "RIGHT/TOP"
def anno/norm/xp=1/yp=.5/hal=0/ang=-90/size=.3 "RIGHT EDGE"
def anno/norm/xp=0/yp=.5/hal=0/ang=90/size=.3 "LEFT EDGE"
def anno/norm/xp=.5/yp=.5/hal=0/val=0/ang=0/size=.3 "DEAD CENTER"
def anno/norm/xp=.5/yp=0/hal=0/val=1/ang=0/size=.3 "HANGING FROM BOTTOM"
def anno/norm/xp=0/yp=0/hal=-2/val=-2/ang=0/size=.2 "BOTTOM LEFT INSET"
def anno/norm/xp=0/yp=1/hal=-2/val=2/ang=0/size=.2 "TOP LEFT INSET"
def anno/norm/xp=1/yp=0/hal=2/val=-2/ang=0/size=.2 "BOTTOM RIGHT INSET"
def anno/norm/xp=1/yp=1/hal=2/val=2/ang=0/size=.2 "TOP RIGHT INSET"
ppl plot
 
plot/set/vs/sym=28/hl=-5:5/vl=-10:10 {-1,1},{-1,1}
 
define annotation/user/xpos=-1/ypos=-1/halign=0/valign=0/angle=-90/siz=.5 "X"
define annotation/user/xpos=0/ypos=0/halign=0/valign=0/angle=0/siz=.5 "X"
define annotation/user/xpos=1/ypos=1/halign=0/valign=0/angle=45/siz=.5 "X"
define annotation/user/xpos=0/ypos=5/halign=0/valign=0/angle=0/siz=.5 "BOX"
define annotation/user/xpos=0/ypos=-5/halign=0/valign=0/angle=90/siz=.5 "BOX"
define annotation/user/xpos=3/ypos=0/halign=0/valign=1/angle=45/siz=.5 "TOP"
define annotation/user/xpos=3/ypos=0/halign=0/valign=-1/angle=45/siz=.5 "BOTTOM"
define annotation/user/xpos=-3/ypos=0/halign=-1/valign=-1/angle=45/siz=.5 "M"
define annotation/user/xpos=-3/ypos=0/halign=-1/valign=1/angle=45/siz=.5 "M"
define annotation/user/xpos=-3/ypos=0/halign=1/valign=-1/angle=45/siz=.5 "M"
define annotation/user/xpos=-3/ypos=0/halign=1/valign=1/angle=45/siz=.5 "M"
define annotation/user/xpos=-3/ypos=0/halign=-3/valign=-3/angle=45/siz=.5 "M"
define annotation/user/xpos=-3/ypos=0/halign=-3/valign=3/angle=45/siz=.5 "M"
define annotation/user/xpos=-3/ypos=0/halign=3/valign=-3/angle=45/siz=.5 "M"
define annotation/user/xpos=-3/ypos=0/halign=3/valign=3/angle=45/siz=.5 "M"
define annotation/user/xpos=-3/ypos=0/halign=-.99/valign=5/angle=45/siz=.5 "M"
define annotation/user/xpos=-3/ypos=0/halign=.99/valign=5/angle=45/siz=.5 "M"
define annotation/user/xpos=-3/ypos=0/halign=-.99/valign=-5/angle=45/siz=.5 "M"
define annotation/user/xpos=-3/ypos=0/halign=.99/valign=-5/angle=45/siz=.5 "M"
ppl list labels
                                                                                
 @AS{-1,1}                                                                      
 @AS{-1,1}                                                                      

          XPOS       YPOS     HGT   ROT   UNITS
 LAB 1  0.000E+00  6.600E+00 0.120    0  SYSTEM  @ASX : 0.5 to 2.5
 LINE PT:    0.000E+00 0.000E+00  NO LINE     LEFT   JUSTIFY LABEL
 LAB 2 -1.312E+00 -1.000E+00 0.500  -90  USER    X
 LINE PT:    0.000E+00 0.000E+00  NO LINE     CENTER JUSTIFY LABEL
 LAB 3  0.000E+00 -8.333E-01 0.500    0  USER    X
 LINE PT:    0.000E+00 0.000E+00  NO LINE     CENTER JUSTIFY LABEL
 LAB 4  1.221E+00  4.107E-01 0.500   45  USER    X
 LINE PT:    0.000E+00 0.000E+00  NO LINE     CENTER JUSTIFY LABEL
 LAB 5  0.000E+00  4.167E+00 0.500    0  USER    BOX
 LINE PT:    0.000E+00 0.000E+00  NO LINE     CENTER JUSTIFY LABEL
 LAB 6  3.125E-01 -5.000E+00 0.500   90  USER    BOX
 LINE PT:    0.000E+00 0.000E+00  NO LINE     CENTER JUSTIFY LABEL
 LAB 7  3.442E+00 -1.179E+00 0.500   45  USER    TOP
 LINE PT:    0.000E+00 0.000E+00  NO LINE     CENTER JUSTIFY LABEL
 LAB 8  3.000E+00  0.000E+00 0.500   45  USER    BOTTOM
 LINE PT:    0.000E+00 0.000E+00  NO LINE     CENTER JUSTIFY LABEL
 LAB 9 -3.000E+00  0.000E+00 0.500   45  USER    M
 LINE PT:    0.000E+00 0.000E+00  NO LINE     LEFT   JUSTIFY LABEL
 LAB10 -2.558E+00 -1.179E+00 0.500   45  USER    M
 LINE PT:    0.000E+00 0.000E+00  NO LINE     LEFT   JUSTIFY LABEL
 LAB11 -3.000E+00  0.000E+00 0.500   45  USER    M
 LINE PT:    0.000E+00 0.000E+00  NO LINE     RIGHT  JUSTIFY LABEL
 LAB12 -2.558E+00 -1.179E+00 0.500   45  USER    M
 LINE PT:    0.000E+00 0.000E+00  NO LINE     RIGHT  JUSTIFY LABEL
 LAB13 -3.000E+00  2.357E+00 0.500   45  USER    M
 LINE PT:    0.000E+00 0.000E+00  NO LINE     LEFT   JUSTIFY LABEL
 LAB14 -1.674E+00 -1.179E+00 0.500   45  USER    M
 LINE PT:    0.000E+00 0.000E+00  NO LINE     LEFT   JUSTIFY LABEL
 LAB15 -3.884E+00  5.515E-08 0.500   45  USER    M
 LINE PT:    0.000E+00 0.000E+00  NO LINE     RIGHT  JUSTIFY LABEL
 LAB16 -2.558E+00 -3.536E+00 0.500   45  USER    M
 LINE PT:    0.000E+00 0.000E+00  NO LINE     RIGHT  JUSTIFY LABEL
 LAB17 -1.455E+00 -2.952E+00 0.500   45  USER    M
 LINE PT:    0.000E+00 0.000E+00  NO LINE     CENTER JUSTIFY LABEL
 LAB18 -1.893E+00 -4.119E+00 0.500   45  USER    M
 LINE PT:    0.000E+00 0.000E+00  NO LINE     CENTER JUSTIFY LABEL
 LAB19 -3.665E+00  2.940E+00 0.500   45  USER    M
 LINE PT:    0.000E+00 0.000E+00  NO LINE     CENTER JUSTIFY LABEL
 LAB20 -4.103E+00  1.774E+00 0.500   45  USER    M
 LINE PT:    0.000E+00 0.000E+00  NO LINE     CENTER JUSTIFY LABEL
ppl plot
plot/ov/vs/line=1/nolab {-1,1,1,-1,-1},{4,4,6,6,4}
plot/ov/vs/line=1/nolab .5*{-1,1,1,-1,-1},{-2,-2,-8,-8,-2}
plot/ov/vs/sym=2/size=2/nolab 3,0
plot/ov/vs/sym=2/size=2/nolab -3,0
 
! intentional errors
set mode ignore
can v
shade/i=1:2/j=1:2/nokey i+j
 
 
! errors in arguments
annotate/nouser/xpos=a2/ypos=0/halign=1/valign=0/angle=-45/siz=0.15 "My Lab"
annotate/nouser/xpos=0/ypos=b/halign=1/valign=0/angle=-45/siz=0.15 "My Lab"
annotate/nouser/xpos=0/ypos=0/halign=c/valign=0/angle=-45/siz=0.15 "My Lab"
annotate/nouser/xpos=0/ypos=0/halign=1/valign=d/angle=ee/siz=0.15 "My Lab"
annotate/nouser/xpos=0/ypos=0/halign=1/valign=0/angle=-45/siz=f "My Lab"
 
! missing a location
annotate/nouser/ypos=0 "My Lab"
annotate/nouser/xpos=0/halign=1/valign=0/angle=-45/siz=0.15 "My Lab"
 
! /USER and /NOUSER
annotate/nouser/user/ypos=0/halign=1/valign=0/angle=-45/siz=0.15 "My Lab"
 
! define annotation
 
shad/set/i=1:2/j=1:2 i+j; def anno/nou/xpos=a2/ypos=0/hal=1/val=0/ang=-45/siz=0.15 "My Lab"; ppl plot
shad/set/i=1:2/j=1:2 i+j; def anno/nou/xpos=0,3/ypos=b/hal=1/val=0/ang=-45/siz=0.15 "My Lab"; ppl plot
shad/set/i=1:2/j=1:2 i+j; def anno/nou/xpos=0/ypos=0/hal=c/val=0/ang=-45/siz=0.15 "My Lab"; ppl plot
shad/set/i=1:2/j=1:2 i+j; def anno/nou/xpos=0/ypos=0/hal=1/val=d/ang=ee/siz=0.15 "My Lab"; ppl plot
shad/set/i=1:2/j=1:2 i+j; def anno/nou/xpos=0/ypos=0/hal=1/val=0/ang=-45/siz=f "My Lab"; ppl plot
shad/set/i=1:2/j=1:2 i+j; def anno/nou/xpos=0/ypos=0/hal=1/val=0/ang=-45/siz=0.15 "My Lab"; ppl plot
 
shad/set/i=1:2/j=1:2 i+j; def anno/nou/ypos=0 "My Lab"; ppl plot
shad/set/i=1:2/j=1:2 i+j; def anno/nou/xpos=0/hal=1/val=0 "My Lab"; ppl plot
shad/set/i=1:2/j=1:2 i+j; def anno/nou/user/xpos=0/ypos=0 "My Lab"; ppl plot
*** Running ferret script: bn_auxiliary.jnl
! bn_auxiliary.jnl:  exercise auxiliary coordinate regridding
 
! notes about the 6/2015 version:
! -- tests 1D regridding, only, as of 6/2015
! -- includestests the deprecated "LAYERZ" and "__LayerzRef_" automation syntax
!    ... to be replaced by a different automation syntax in the future
 
! *sh* 6/2015
 
! initialize the test environment
USE levitus_3d_subset
SPAWN rm layerz_test_data.txt
LET Zpts = Z[Z=100:500:100]
DEFINE AXIS/z/units=meters zax = zpts
 
! conjure a 4D auxiliary variable that contains the same values
! as the native Z coordinates
! regridding using this auxiliary variable should give the same results as
! conventional regridding -- usefuly to validate the results
LET/D=levitus_3d_subset depth = z[g=temp]+ 0*temp[k=1]
 
!************
! exercise the syntax of setting layerz associations
! do same tests on EZ, uvar, and netCDF variable
 
! EZ file variable
LIST/NOHEAD/FILE=layerz_test_data.txt 1
FILE/VAR=v layerz_test_data.txt
! set the layerz link to point to a variable named "depth"
SET VAR/layerz=depth v
SHOW VAR/LAYERZ v
  DEPTH holds the designated vertical (layerz) coordinates of v
SHOW ATT v
! modify the layerz link
SET VAR/layerz=newdepth v
SHOW VAR/LAYERZ v
  NEWDEPTH holds the designated vertical (layerz) coordinates of v
SHOW ATT v
     attributes for dataset: ./layerz_test_data.txt
 v.long_name = v 
 v.missing_value = -1.E+34
 v.__LayerzRef_ = NEWDEPTH 
cancel var/layerz v
SHOW VAR/LAYERZ v
  No variable holds vertical (layerz) coordinates of v
SHOW ATT v
     attributes for dataset: ./layerz_test_data.txt
 v.long_name = v 
 v.missing_value = -1.E+34
CANCEL DATA layerz_test_data.txt
 
! user variable
! set the layerz link
LET a = temp
SET VAR/layerz=depth a
SHOW VAR/LAYERZ a
  DEPTH holds the designated vertical (layerz) coordinates of a
SHOW ATT a
     attributes for user-defined variables
 a.long_name = TEMP 
 a.missing_value = -1.E+34
 a.__LayerzRef_ = DEPTH 
! modify the layerz link
SET VAR/layerz=newdepth a
SHOW VAR/LAYERZ a
  NEWDEPTH holds the designated vertical (layerz) coordinates of a
SHOW ATT a
     attributes for user-defined variables
 a.long_name = TEMP 
 a.missing_value = -1.E+34
 a.__LayerzRef_ = NEWDEPTH 
cancel var/layerz a
SHOW VAR/LAYERZ a
  No variable holds vertical (layerz) coordinates of a
SHOW ATT a
     attributes for user-defined variables
 a.long_name = TEMP 
 a.missing_value = -1.E+34
 
! netCDF file variable
! set the layerz link
SET VAR/layerz=depth temp[d=levitus_3d_subset]
SHOW VAR/LAYERZ/d=levitus_3d_subset temp
  DEPTH holds the designated vertical (layerz) coordinates of TEMP
SHOW ATT temp.__LayerzRef_[d=levitus_3d_subset]
     attributes for dataset: ./data/levitus_3d_subset.nc
 TEMP.__LayerzRef_ = DEPTH 
! modify the layerz link
SET VAR/layerz=newdepth temp[d=levitus_3d_subset]
SHOW VAR/LAYERZ/d=levitus_3d_subset temp
  NEWDEPTH holds the designated vertical (layerz) coordinates of TEMP
SHOW ATT temp.__LayerzRef_[d=levitus_3d_subset]
     attributes for dataset: ./data/levitus_3d_subset.nc
 TEMP.__LayerzRef_ = NEWDEPTH 
cancel var/layerz temp[d=levitus_3d_subset]
SHOW VAR/LAYERZ/d=levitus_3d_subset temp
  No variable holds vertical (layerz) coordinates of TEMP
SHOW ATT temp[d=levitus_3d_subset]   ! __LayerzRef_ has been deleted
     attributes for dataset: ./data/levitus_3d_subset.nc
 TEMP.missing_value = -1.E+10
 TEMP._FillValue = -1.E+10
 TEMP.long_name = TEMPERATURE 
 TEMP.history = From /home/users/tmap/ferret/linux/fer_dsets/data/levitus_climatology.cdf 
 TEMP.units = DEG C 
 
! deliberate error
SET MODE ignore; SET VAR/layerz=depth noexist; SET MODE/last ignore
 
!************
! exercise the layerz calculations in various situations
! compare the manually specified syntax with the automated results
 
! make "depth" the layerz coordinate variable for "temp"
SET VAR/layerz=depth temp[d=levitus_3d_subset]
 
! values of the unadulterated variable
list/PREC=7 temp[z=0:500]
             VARIABLE : TEMPERATURE (DEG C)
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 11 points (LONGITUDE-LATITUDE-DEPTH (m))
               120.5E    121.5E  
                 1         2
 ---- K:1 Z:   0
 48.5S / 2:  7.725000  7.917999
 49.5S / 1:  6.827000  7.007000
 ---- K:2 Z:   10
 48.5S / 2:  7.726000  7.917999
 49.5S / 1:  6.843000  7.021999
 ---- K:3 Z:   20
 48.5S / 2:  7.715000  7.907000
 49.5S / 1:  6.840000  7.018999
 ---- K:4 Z:   30
 48.5S / 2:  7.594000  7.789000
 49.5S / 1:  6.740999  6.923000
 ---- K:5 Z:   50
 48.5S / 2:  7.410999  7.584000
 49.5S / 1:  6.624001  6.785000
 ---- K:6 Z:   75
 48.5S / 2:  7.572001  7.666000
 49.5S / 1:  6.750999  6.848000
 ---- K:7 Z:   100
 48.5S / 2:  7.334999  7.436001
 49.5S / 1:  6.462000  6.572001
 ---- K:8 Z:   150
 48.5S / 2:  7.372000  7.464001
 49.5S / 1:  6.466000  6.573999
 ---- K:9 Z:   200
 48.5S / 2:  6.961000  7.073000
 49.5S / 1:  6.025999  6.150000
 ---- K:10 Z:   300
 48.5S / 2:  6.457001  6.636999
 49.5S / 1:  5.445000  5.665000
 ---- K:11 Z:   400
 48.5S / 2:  6.181999  6.377001
 49.5S / 1:  5.187000  5.410000
SHOW GRID
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid GAO1
    GRID GAO1
 name       axis              # pts   start                end                 subset
 XAXLEVITR101_102 LONGITUDE     2mr   120.5E               121.5E              full
 YAXLEVITR41_42 LATITUDE        2 r   49.5S                48.5S               full
 ZAXLEVITR DEPTH (m)           20 i-  0                    5000                11 pts
 normal    T
 
! use aux var regridding.  Target coordinate points match the source points
! identically at 0, 100, 200, ... 500
! values should match the unadulterated variable at these points
! this command will be issued in diagnostic mode to highlight that the
! K range over which temp is read is the minimum needed to compute the result
SET MODE diagnostic
LET tempz = temp[gz(depth)=zpts]
LIST/PREC=7 tempz
 dealloc  dynamic grid GAO1            XAXLEVITR1YAXLEVITR4ZAXLEVITR NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid TEMPZ    C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid DEPTH    C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GAO1            XAXLEVITR1YAXLEVITR4ZAXLEVITR NORMAL
 getgrid ZPTS     C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    (AX###)   NORMAL
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    (AX###)   NORMAL
 allocate dynamic grid (G###)          NORMAL    NORMAL    (AX###)   NORMAL
 allocate dynamic grid (G###)          XAXLEVITR1YAXLEVITR4(AX###)   NORMAL
 dealloc  dynamic grid (G###)          XAXLEVITR1YAXLEVITR4(AX###)   NORMAL
 allocate dynamic grid (G###)          XAXLEVITR1YAXLEVITR4(AX###)   NORMAL
 allocate dynamic grid (G###)          XAXLEVITR1YAXLEVITR4(AX###)   NORMAL
 eval    EX#1     C:  4 dset:   1 I:      1      2  J:    1    2  K:    1    5  L:   -999   -999
 eval    TEMPZ    C:  6 dset:   1 I:      1      2  J:    1    2  K:    1    5  L:   -999   -999
 allocate dynamic grid (G###)          XAXLEVITR1YAXLEVITR4(AX###)   NORMAL
 strip regrid on Z: TEMP --> (G###)           @LIN
 eval    DEPTH    C:  9 dset:   1 I:      1      2  J:    1    2  K:    1   20  L:   -999   -999
 pseudo  Z        M:  1 dset:   1 I:   -999   -999  J: -999 -999  K:    1   20  L:   -999   -999
 constan cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 found   TEMP     M:  2 dset:   1 I:      1      2  J:    1    2  K:    1   11  L:   -999   -999
 -DELETE cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE tpry     M:  4 dset:   0 I:      1      2  J:    1    2  K:    1    1  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE Z        M:  1 dset:   1 I:   -999   -999  J: -999 -999  K:    1   20  L:   -999   -999
 reading TEMP     M:  1 dset:   1 I:      1      2  J:    1    2  K:    7   12  L:   -999   -999
 auxgrd  TEMP     M:  4 dset:   1 I:      1      2  J:    1    2  K:    1    5  L:   -999   -999
 dealloc  dynamic grid (G###)          XAXLEVITR1YAXLEVITR4(AX###)   NORMAL
             VARIABLE : TEMP[GZ(DEPTH)=ZPTS]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 5 points (LONGITUDE-LATITUDE-Z)
               120.5E    121.5E  
                 1         2
 ---- K:1 Z:   100
 48.5S / 2:  7.334999  7.436001
 49.5S / 1:  6.462000  6.572001
 ---- K:2 Z:   200
 48.5S / 2:  6.961000  7.073000
 49.5S / 1:  6.025999  6.150000
 ---- K:3 Z:   300
 48.5S / 2:  6.457001  6.636999
 49.5S / 1:  5.445000  5.665000
 ---- K:4 Z:   400
 48.5S / 2:  6.181999  6.377001
 49.5S / 1:  5.187000  5.410000
 ---- K:5 Z:   500
 48.5S / 2:  5.835500  6.045001
 49.5S / 1:  4.879000  5.102500
SHOW GRID tempz
 dealloc  dynamic grid (G###)          XAXLEVITR1YAXLEVITR4(AX###)   NORMAL
 dealloc  dynamic grid (G###)          XAXLEVITR1YAXLEVITR4(AX###)   NORMAL
 -DELETE TEMP     M:  4 dset:   1 I:      1      2  J:    1    2  K:    1    5  L:   -999   -999
 -DELETE TEMPZ    M:  5 dset:   1 I:      1      2  J:    1    2  K:    1    5  L:   -999   -999
 dealloc  dynamic grid GAO1            XAXLEVITR1YAXLEVITR4ZAXLEVITR NORMAL
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    (AX###)   NORMAL
 getgrid EX#1     C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid TEMPZ    C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid DEPTH    C: 11 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GAO1            XAXLEVITR1YAXLEVITR4ZAXLEVITR NORMAL
 getgrid ZPTS     C: 11 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    (AX###)   NORMAL
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    (AX###)   NORMAL
 allocate dynamic grid (G###)          NORMAL    NORMAL    (AX###)   NORMAL
 allocate dynamic grid (G###)          XAXLEVITR1YAXLEVITR4(AX###)   NORMAL
 dealloc  dynamic grid (G###)          XAXLEVITR1YAXLEVITR4(AX###)   NORMAL
 allocate dynamic grid (G###)          XAXLEVITR1YAXLEVITR4(AX###)   NORMAL
 allocate dynamic grid (G###)          XAXLEVITR1YAXLEVITR4(AX###)   NORMAL
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXLEVITR101_102 LONGITUDE     2mr   120.5E               121.5E              full
 YAXLEVITR41_42 LATITUDE        2 r   49.5S                48.5S               full
 (AX###)   Z                    5 r   100                  500                 full
 normal    T
 dealloc  dynamic grid GAO1            XAXLEVITR1YAXLEVITR4ZAXLEVITR NORMAL
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    (AX###)   NORMAL
 dealloc  dynamic grid (G###)          XAXLEVITR1YAXLEVITR4(AX###)   NORMAL
 dealloc  dynamic grid (G###)          XAXLEVITR1YAXLEVITR4(AX###)   NORMAL
!LET tempz = temp[gz=zpts,layerz]  ! same regrid using semi-automated notation
!LIST/PREC=7 tempz
!SHOW GRID tempz
SET MODE/last diagnostic
 
! list a little with no imtermediate variable, so Z labeling is visible
LIST/PREC=7 temp[gz(depth)=zpts,k=1]
             VARIABLE : TEMPERATURE (DEG C)
                        regrid: 100 delta on Z@LIN using DEPTH field
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             Z        : 100
               120.5E    121.5E  
                 1         2
 48.5S / 2:  7.334999  7.436001
 49.5S / 1:  6.462000  6.572001
!LIST/PREC=7 temp[gz=zpts,k=1,layerz] ! same using semi-automated notation
 
! same calculation, but with a named Z axis
LET tempzax = temp[gz(depth)=zax]
LIST tempzax
             VARIABLE : TEMP[GZ(DEPTH)=ZAX]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 5 points (LONGITUDE-LATITUDE-Z (METERS))
             120.5E 121.5E 
               1      2
 ---- K:1 Z:   100
 48.5S / 2:  7.335  7.436
 49.5S / 1:  6.462  6.572
 ---- K:2 Z:   200
 48.5S / 2:  6.961  7.073
 49.5S / 1:  6.026  6.150
 ---- K:3 Z:   300
 48.5S / 2:  6.457  6.637
 49.5S / 1:  5.445  5.665
 ---- K:4 Z:   400
 48.5S / 2:  6.182  6.377
 49.5S / 1:  5.187  5.410
 ---- K:5 Z:   500
 48.5S / 2:  5.835  6.045
 49.5S / 1:  4.879  5.102
SHOW GRID tempzax
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXLEVITR101_102 LONGITUDE     2mr   120.5E               121.5E              full
 YAXLEVITR41_42 LATITUDE        2 r   49.5S                48.5S               full
 ZAX       Z (METERS)           5 r   100                  500                 full
 normal    T
!LET tempzax = temp[gz=zax,layerz]  ! same regrid using semi-automated notation
!LIST tempzax
!SHOW GRID tempzax
 
! regrid to a different set of Z points
LET tempz_alt = temp[gz(depth)=2:10:2]
LIST/PREC=7 tempz_alt
             VARIABLE : TEMP[GZ(DEPTH)=2:10:2]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 5 points (LONGITUDE-LATITUDE-Z)
               120.5E    121.5E  
                 1         2
 ---- K:1 Z:   2
 48.5S / 2:  7.725200  7.917999
 49.5S / 1:  6.830200  7.010000
 ---- K:2 Z:   4
 48.5S / 2:  7.725400  7.917999
 49.5S / 1:  6.833400  7.013000
 ---- K:3 Z:   6
 48.5S / 2:  7.725600  7.917999
 49.5S / 1:  6.836600  7.016000
 ---- K:4 Z:   8
 48.5S / 2:  7.725800  7.917999
 49.5S / 1:  6.839800  7.018999
 ---- K:5 Z:   10
 48.5S / 2:  7.726000  7.917999
 49.5S / 1:  6.843000  7.021999
SHOW GRID tempz_alt
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXLEVITR101_102 LONGITUDE     2mr   120.5E               121.5E              full
 YAXLEVITR41_42 LATITUDE        2 r   49.5S                48.5S               full
 (AX###)   Z                    5 r   2                    10                  5 pts
 normal    T
 
!! do same regrid using the shorhand semi-automated notation
!LIST/PREC=7 temp[z=2:10:2,layerz]   ! lo:hi:delta notation
!SHOW GRID
 
! test the shorthand notation var[gz(depth)=100] as an implicit aux var
! regrid via linear interpolation
! the value should match the preceding output at Z=6
LET tempz_1pt = temp[gz(depth)=6]
LIST/PREC=7 tempz_1pt
             VARIABLE : TEMP[GZ(DEPTH)=6]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             Z        : 6
               120.5E    121.5E  
                 1         2
 48.5S / 2:  7.725600  7.917999
 49.5S / 1:  6.836600  7.016000
SHOW GRID/z tempz_1pt
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXLEVITR101_102 LONGITUDE     2mr   120.5E               121.5E              full
 YAXLEVITR41_42 LATITUDE        2 r   49.5S                48.5S               full
 (AX###)   Z                    1 r   6                    6                   1 pt
 normal    T
 
       K     Z                       ZBOX          ZBOXLO
       1>  6                         0.00006    5.99997
 
! do same regrid using the shorhand semi-automated notation
LIST/PREC=7 temp[z=6,layerz]     ! =1pt notation   WILL BE CHANGED!
             VARIABLE : TEMPERATURE (DEG C)
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             DEPTH (m): 6 (interpolated using DEPTH)
               120.5E    121.5E  
                 1         2
 48.5S / 2:  7.725600  7.917999
 49.5S / 1:  6.836600  7.016000
SHOW GRID
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid GAO1
    GRID GAO1
 name       axis              # pts   start                end                 subset
 XAXLEVITR101_102 LONGITUDE     2mr   120.5E               121.5E              full
 YAXLEVITR41_42 LATITUDE        2 r   49.5S                48.5S               full
 ZAXLEVITR DEPTH (m)           20 i-  0                    5000                1 pt
 normal    T
 
! auxiliary points in reverse order
! to get results that we can check for correctness, we will reverse the Z-order
! of the temperature field as well as the depth field.
LET rvtemp0 = ZREVERSE(temp)
LET rvtemp  = rvtemp0[gz=temp@asn]
LET rvdepth0 = ZREVERSE(depth)
LET/D=levitus_3d_subset rvdepth  = rvdepth0[gz=temp@asn]
! **** NOTE: THERE'S A SUBTLE MISBEHAVIOR IN AUX REGRID SHOWN IN THIS COMMENTED
! OUT LINE BUT WILL RARELY OCCUR AND EASILY WORKED AROUND
!LET rvtempzax = rvtemp[gz(rvdepth)=zax]  ! zlims aren't filled in if not given
LET rvtempzax = rvtemp[gz(rvdepth)=zax,z=100:500]
LIST/PREC=7 rvtempzax - tempz
             VARIABLE : RVTEMPZAX - TEMPZ
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 5 points (LONGITUDE-LATITUDE-Z)
               120.5E     121.5E   
                 1          2
 ---- K:1 Z:   100
 48.5S / 2:  0.0000000  0.0000000
 49.5S / 1:  0.0000000  0.0000000
 ---- K:2 Z:   200
 48.5S / 2:  0.0000000  0.0000000
 49.5S / 1:  0.0000000  0.0000000
 ---- K:3 Z:   300
 48.5S / 2:  0.0000000  0.0000000
 49.5S / 1:  0.0000000  0.0000000
 ---- K:4 Z:   400
 48.5S / 2:  0.0000000  0.0000000
 49.5S / 1:  0.0000000  0.0000000
 ---- K:5 Z:   500
 48.5S / 2:  0.0000000  0.0000000
 49.5S / 1:  0.0000000  0.0000000
SHOW GRID rvtempzax
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXLEVITR101_102 LONGITUDE     2mr   120.5E               121.5E              full
 YAXLEVITR41_42 LATITUDE        2 r   49.5S                48.5S               full
 ZAX       Z (METERS)           5 r   100                  500                 (axis from grid-changing func)
 normal    T
 
! deliberate execution errors:
LET disordered_depth1 = IF K EQ 3 THEN DEPTH[K=1] ELSE DEPTH
LET disordered_tempz1 = temp[gz(disordered_depth1)=zax]
LET disordered_depth2 = IF K EQ 3 THEN DEPTH[K=5] ELSE DEPTH
LET disordered_tempz2 = temp[gz(disordered_depth2)=zax]
SET MODE ignore
LIST disordered_tempz1
             VARIABLE : TEMP[GZ(DISORDERED_DEPTH1)=ZAX]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 5 points (LONGITUDE-LATITUDE-Z (METERS))
             120.5E 121.5E 
               1      2
 ---- K:1 Z:   100
 48.5S / 2:  7.335  7.436
 49.5S / 1:  6.462  6.572
 ---- K:2 Z:   200
 48.5S / 2:  6.961  7.073
 49.5S / 1:  6.026  6.150
 ---- K:3 Z:   300
 48.5S / 2:  6.457  6.637
 49.5S / 1:  5.445  5.665
 ---- K:4 Z:   400
 48.5S / 2:  6.182  6.377
 49.5S / 1:  5.187  5.410
 ---- K:5 Z:   500
 48.5S / 2:  5.835  6.045
 49.5S / 1:  4.879  5.102
LIST disordered_tempz2
             VARIABLE : TEMP[GZ(DISORDERED_DEPTH2)=ZAX]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 5 points (LONGITUDE-LATITUDE-Z (METERS))
             120.5E 121.5E 
               1      2
 ---- K:1 Z:   100
 48.5S / 2:  7.335  7.436
 49.5S / 1:  6.462  6.572
 ---- K:2 Z:   200
 48.5S / 2:  6.961  7.073
 49.5S / 1:  6.026  6.150
 ---- K:3 Z:   300
 48.5S / 2:  6.457  6.637
 49.5S / 1:  5.445  5.665
 ---- K:4 Z:   400
 48.5S / 2:  6.182  6.377
 49.5S / 1:  5.187  5.410
 ---- K:5 Z:   500
 48.5S / 2:  5.835  6.045
 49.5S / 1:  4.879  5.102
SET MODE/last ignore
 
! test VTREE with a complex auxiliary variable definitions
VTREE
   in default dataset levitus_3d_subset
   RVTEMPZAX = RVTEMP[GZ(RVDEPTH)=ZAX,Z=100:500]
     RVTEMP = RVTEMP0[GZ=TEMP@ASN]
       RVDEPTH = RVDEPTH0[GZ=TEMP@ASN]
         RVDEPTH0 = ZREVERSE(DEPTH)
           DEPTH = Z[G=TEMP]+ 0*TEMP[K=1]
   DISORDERED_TEMPZ2 = TEMP[GZ(DISORDERED_DEPTH2)=ZAX]
       DISORDERED_DEPTH2 = IF K EQ 3 THEN DEPTH[K=5] ELSE DEPTH
         DEPTH = Z[G=TEMP]+ 0*TEMP[K=1]
   DISORDERED_TEMPZ1 = TEMP[GZ(DISORDERED_DEPTH1)=ZAX]
       DISORDERED_DEPTH1 = IF K EQ 3 THEN DEPTH[K=1] ELSE DEPTH
         DEPTH = Z[G=TEMP]+ 0*TEMP[K=1]
   TEMPZ = TEMP[GZ(DEPTH)=ZPTS]
       regrid to ZPTS = Z[Z=100:500:100]
       DEPTH = Z[G=TEMP]+ 0*TEMP[K=1]
   TEMPZAX = TEMP[GZ(DEPTH)=ZAX]
       DEPTH = Z[G=TEMP]+ 0*TEMP[K=1]
   TEMPZ_1PT = TEMP[GZ(DEPTH)=6]
   TEMPZ_ALT = TEMP[GZ(DEPTH)=2:10:2]
   A = TEMP
 
! 6-dimensional regridding
 
! 6d temperature and 3d depth field (depth unchanging in time, ensemble and forecast)
LET temp6d = temp/100 + 1*L[L=1:2] + 10*_M[M=1:2] + 100*_N[N=1:2]
!list/k=7:12/PREC=7 temp6d
LET tempz6d = temp6d[gz(depth)=zpts]
!LIST/PREC=7 tempz6d
! compare pre- and post- regrid at a fixed depth
stat/z=100 temp6d-tempz6d
 
             TEMP6D-TEMPZ6D
             LONGITUDE: 120E to 122E
             LATITUDE: 50S to 48S
             DEPTH (m): 100
             T: 0.5 to 2.5
             E: 0.5 to 2.5
             F: 0.5 to 2.5
             DATA SET: ./data/levitus_3d_subset.nc
 
 Total # of data points: 32 (2*2*1*2*2*2)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
stat/z=400 temp6d-tempz6d
 
             TEMP6D-TEMPZ6D
             LONGITUDE: 120E to 122E
             LATITUDE: 50S to 48S
             DEPTH (m): 400
             T: 0.5 to 2.5
             E: 0.5 to 2.5
             F: 0.5 to 2.5
             DATA SET: ./data/levitus_3d_subset.nc
 
 Total # of data points: 32 (2*2*1*2*2*2)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
! 6d temperature and 6d depth field
! hold temperature constant over time, have depths change
! note that for N=2 depths of less than 100 are no longer in the data hence missing values at Z=100
LET temp6d_const = temp + 0*L[L=1:2] + 0*_M[M=1:2] + 0*_N[N=1:2]     ! constant in T,E,F
LET depth6d = depth + 10*(L[L=1:2]-1) + 50*(_M[M=1:2]-1) + 100*(_N[N=1:2]-1)
LET tempz6d_tDep = temp6d_const[gz(depth6d)=zpts]
LIST/PREC=7 tempz6d_tDep
             VARIABLE : TEMP6D_CONST[GZ(DEPTH6D)=ZPTS]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 5 by 2 by 2 by 2 points (LONGITUDE-LATITUDE-Z-T-E-F)
               120.5E    121.5E  
                 1         2
 ---- N:1 F:   1
 ---- M:1 E:   1
 ---- L:1 T:   1
 ---- K:1 Z:   100
 48.5S / 2:  7.334999  7.436001
 49.5S / 1:  6.462000  6.572001
 ---- K:2 Z:   200
 48.5S / 2:  6.961000  7.073000
 49.5S / 1:  6.025999  6.150000
 ---- K:3 Z:   300
 48.5S / 2:  6.457001  6.636999
 49.5S / 1:  5.445000  5.665000
 ---- K:4 Z:   400
 48.5S / 2:  6.181999  6.377001
 49.5S / 1:  5.187000  5.410000
 ---- K:5 Z:   500
 48.5S / 2:  5.835500  6.045001
 49.5S / 1:  4.879000  5.102500
 ---- L:2 T:   2
 ---- K:1 Z:   100
 48.5S / 2:  7.429800  7.528001
 49.5S / 1:  6.577600  6.682400
 ---- K:2 Z:   200
 48.5S / 2:  7.043200  7.151200
 49.5S / 1:  6.113999  6.234800
 ---- K:3 Z:   300
 48.5S / 2:  6.507401  6.680599
 49.5S / 1:  5.503100  5.713500
 ---- K:4 Z:   400
 48.5S / 2:  6.209499  6.403001
 49.5S / 1:  5.212800  5.435500
 ---- K:5 Z:   500
 48.5S / 2:  5.870150  6.078201
 49.5S / 1:  4.909800  5.133250
 ---- M:2 E:   2
 ---- L:1 T:   1
 ---- K:1 Z:   100
 48.5S / 2:  7.410999  7.584000
 49.5S / 1:  6.624001  6.785000
 ---- K:2 Z:   200
 48.5S / 2:  7.372000  7.464001
 49.5S / 1:  6.466000  6.573999
 ---- K:3 Z:   300
 48.5S / 2:  6.709001  6.855000
 49.5S / 1:  5.735499  5.907500
 ---- K:4 Z:   400
 48.5S / 2:  6.319500  6.507000
 49.5S / 1:  5.316000  5.537500
 ---- K:5 Z:   500
 48.5S / 2:  6.008749  6.211001
 49.5S / 1:  5.033000  5.256250
 ---- L:2 T:   2
 ---- K:1 Z:   100
 48.5S / 2:  7.502500  7.686500
 49.5S / 1:  6.682500  6.854000
 ---- K:2 Z:   200
 48.5S / 2:  7.364600  7.458401
 49.5S / 1:  6.465200  6.573600
 ---- K:3 Z:   300
 48.5S / 2:  6.759401  6.898600
 49.5S / 1:  5.793599  5.956000
 ---- K:4 Z:   400
 48.5S / 2:  6.347000  6.533000
 49.5S / 1:  5.341800  5.563000
 ---- K:5 Z:   500
 48.5S / 2:  6.043399  6.244201
 49.5S / 1:  5.063800  5.287000
 ---- N:2 F:   2
 ---- M:1 E:   1
 ---- L:1 T:   1
 ---- K:1 Z:   100
 48.5S / 2:  7.725000  7.917999
 49.5S / 1:  6.827000  7.007000
 ---- K:2 Z:   200
 48.5S / 2:  7.334999  7.436001
 49.5S / 1:  6.462000  6.572001
 ---- K:3 Z:   300
 48.5S / 2:  6.961000  7.073000
 49.5S / 1:  6.025999  6.150000
 ---- K:4 Z:   400
 48.5S / 2:  6.457001  6.636999
 49.5S / 1:  5.445000  5.665000
 ---- K:5 Z:   500
 48.5S / 2:  6.181999  6.377001
 49.5S / 1:  5.187000  5.410000
 ---- L:2 T:   2
 ---- K:1 Z:   100
 48.5S / 2:      ....      ....
 49.5S / 1:      ....      ....
 ---- K:2 Z:   200
 48.5S / 2:  7.429800  7.528001
 49.5S / 1:  6.577600  6.682400
 ---- K:3 Z:   300
 48.5S / 2:  7.043200  7.151200
 49.5S / 1:  6.113999  6.234800
 ---- K:4 Z:   400
 48.5S / 2:  6.507401  6.680599
 49.5S / 1:  5.503100  5.713500
 ---- K:5 Z:   500
 48.5S / 2:  6.209499  6.403001
 49.5S / 1:  5.212800  5.435500
 ---- M:2 E:   2
 ---- L:1 T:   1
 ---- K:1 Z:   100
 48.5S / 2:      ....      ....
 49.5S / 1:      ....      ....
 ---- K:2 Z:   200
 48.5S / 2:  7.410999  7.584000
 49.5S / 1:  6.624001  6.785000
 ---- K:3 Z:   300
 48.5S / 2:  7.372000  7.464001
 49.5S / 1:  6.466000  6.573999
 ---- K:4 Z:   400
 48.5S / 2:  6.709001  6.855000
 49.5S / 1:  5.735499  5.907500
 ---- K:5 Z:   500
 48.5S / 2:  6.319500  6.507000
 49.5S / 1:  5.316000  5.537500
 ---- L:2 T:   2
 ---- K:1 Z:   100
 48.5S / 2:      ....      ....
 49.5S / 1:      ....      ....
 ---- K:2 Z:   200
 48.5S / 2:  7.502500  7.686500
 49.5S / 1:  6.682500  6.854000
 ---- K:3 Z:   300
 48.5S / 2:  7.364600  7.458401
 49.5S / 1:  6.465200  6.573600
 ---- K:4 Z:   400
 48.5S / 2:  6.759401  6.898600
 49.5S / 1:  5.793599  5.956000
 ---- K:5 Z:   500
 48.5S / 2:  6.347000  6.533000
 49.5S / 1:  5.341800  5.563000
LIST/PREC=7/k=7:8 temp6d_const, depth6d  ! reference values at Z=100, 200, 300 for visual comparison
             DATA SET: ./data/levitus_3d_subset.nc
             LONGITUDE: 120E to 122E
             LATITUDE: 50S to 48S
             DEPTH (m): 87.5 to 175
             T: 0.5 to 2.5
             E: 0.5 to 2.5
             F: 0.5 to 2.5
 Column  1: TEMP6D_CONST is TEMP + 0*L[L=1:2] + 0*_M[M=1:2] + 0*_N[N=1:2]
 Column  2: DEPTH6D is DEPTH + 10*(L[L=1:2]-1) + 50*(_M[M=1:2]-1) + 100*(_N[N=1:2]-1)
         TEMP6D_CONS   DEPTH6D
 ---- N:1 F:   1
 ---- M:1 E:   1
 ---- L:1 T:   1
 ---- K:7 Z:   100
 ---- J:1 Y:   49.5S
120.5E / 1:  6.462000  100.0000
121.5E / 2:  6.572001  100.0000
 ---- J:2 Y:   48.5S
120.5E / 1:  7.334999  100.0000
121.5E / 2:  7.436001  100.0000
 ---- K:8 Z:   150
 ---- J:1 Y:   49.5S
120.5E / 1:  6.466000  150.0000
121.5E / 2:  6.573999  150.0000
 ---- J:2 Y:   48.5S
120.5E / 1:  7.372000  150.0000
121.5E / 2:  7.464001  150.0000
 ---- L:2 T:   2
 ---- K:7 Z:   100
 ---- J:1 Y:   49.5S
120.5E / 1:  6.462000  110.0000
121.5E / 2:  6.572001  110.0000
 ---- J:2 Y:   48.5S
120.5E / 1:  7.334999  110.0000
121.5E / 2:  7.436001  110.0000
 ---- K:8 Z:   150
 ---- J:1 Y:   49.5S
120.5E / 1:  6.466000  160.0000
121.5E / 2:  6.573999  160.0000
 ---- J:2 Y:   48.5S
120.5E / 1:  7.372000  160.0000
121.5E / 2:  7.464001  160.0000
 ---- M:2 E:   2
 ---- L:1 T:   1
 ---- K:7 Z:   100
 ---- J:1 Y:   49.5S
120.5E / 1:  6.462000  150.0000
121.5E / 2:  6.572001  150.0000
 ---- J:2 Y:   48.5S
120.5E / 1:  7.334999  150.0000
121.5E / 2:  7.436001  150.0000
 ---- K:8 Z:   150
 ---- J:1 Y:   49.5S
120.5E / 1:  6.466000  200.0000
121.5E / 2:  6.573999  200.0000
 ---- J:2 Y:   48.5S
120.5E / 1:  7.372000  200.0000
121.5E / 2:  7.464001  200.0000
 ---- L:2 T:   2
 ---- K:7 Z:   100
 ---- J:1 Y:   49.5S
120.5E / 1:  6.462000  160.0000
121.5E / 2:  6.572001  160.0000
 ---- J:2 Y:   48.5S
120.5E / 1:  7.334999  160.0000
121.5E / 2:  7.436001  160.0000
 ---- K:8 Z:   150
 ---- J:1 Y:   49.5S
120.5E / 1:  6.466000  210.0000
121.5E / 2:  6.573999  210.0000
 ---- J:2 Y:   48.5S
120.5E / 1:  7.372000  210.0000
121.5E / 2:  7.464001  210.0000
 ---- N:2 F:   2
 ---- M:1 E:   1
 ---- L:1 T:   1
 ---- K:7 Z:   100
 ---- J:1 Y:   49.5S
120.5E / 1:  6.462000  200.0000
121.5E / 2:  6.572001  200.0000
 ---- J:2 Y:   48.5S
120.5E / 1:  7.334999  200.0000
121.5E / 2:  7.436001  200.0000
 ---- K:8 Z:   150
 ---- J:1 Y:   49.5S
120.5E / 1:  6.466000  250.0000
121.5E / 2:  6.573999  250.0000
 ---- J:2 Y:   48.5S
120.5E / 1:  7.372000  250.0000
121.5E / 2:  7.464001  250.0000
 ---- L:2 T:   2
 ---- K:7 Z:   100
 ---- J:1 Y:   49.5S
120.5E / 1:  6.462000  210.0000
121.5E / 2:  6.572001  210.0000
 ---- J:2 Y:   48.5S
120.5E / 1:  7.334999  210.0000
121.5E / 2:  7.436001  210.0000
 ---- K:8 Z:   150
 ---- J:1 Y:   49.5S
120.5E / 1:  6.466000  260.0000
121.5E / 2:  6.573999  260.0000
 ---- J:2 Y:   48.5S
120.5E / 1:  7.372000  260.0000
121.5E / 2:  7.464001  260.0000
 ---- M:2 E:   2
 ---- L:1 T:   1
 ---- K:7 Z:   100
 ---- J:1 Y:   49.5S
120.5E / 1:  6.462000  250.0000
121.5E / 2:  6.572001  250.0000
 ---- J:2 Y:   48.5S
120.5E / 1:  7.334999  250.0000
121.5E / 2:  7.436001  250.0000
 ---- K:8 Z:   150
 ---- J:1 Y:   49.5S
120.5E / 1:  6.466000  300.0000
121.5E / 2:  6.573999  300.0000
 ---- J:2 Y:   48.5S
120.5E / 1:  7.372000  300.0000
121.5E / 2:  7.464001  300.0000
 ---- L:2 T:   2
 ---- K:7 Z:   100
 ---- J:1 Y:   49.5S
120.5E / 1:  6.462000  260.0000
121.5E / 2:  6.572001  260.0000
 ---- J:2 Y:   48.5S
120.5E / 1:  7.334999  260.0000
121.5E / 2:  7.436001  260.0000
 ---- K:8 Z:   150
 ---- J:1 Y:   49.5S
120.5E / 1:  6.466000  310.0000
121.5E / 2:  6.573999  310.0000
 ---- J:2 Y:   48.5S
120.5E / 1:  7.372000  310.0000
121.5E / 2:  7.464001  310.0000
! ... some spot checks
LIST/PREC=7/l=1/m=1/n=1 tempz6d_tDep[Z=100] - temp6d_const[k=7]
             VARIABLE : TEMPZ6D_TDEP[Z=100] - TEMP6D_CONST[K=7]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             Z        : 100
             T        : 1
             E        : 1
             F        : 1
               120.5E     121.5E   
                 1          2
 48.5S / 2:  0.0000000  0.0000000
 49.5S / 1:  0.0000000  0.0000000
LIST/PREC=7/l=1/m=2/n=1 tempz6d_tDep[Z=200] - temp6d_const[k=8]
             VARIABLE : TEMPZ6D_TDEP[Z=200] - TEMP6D_CONST[K=8]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             Z        : 200
             T        : 1
             E        : 2
             F        : 1
               120.5E     121.5E   
                 1          2
 48.5S / 2:  0.0000000  0.0000000
 49.5S / 1:  0.0000000  0.0000000
LIST/PREC=7/l=1/m=2/n=2 tempz6d_tDep[Z=300] - temp6d_const[k=8]
             VARIABLE : TEMPZ6D_TDEP[Z=300] - TEMP6D_CONST[K=8]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             Z        : 300
             T        : 1
             E        : 2
             F        : 2
               120.5E     121.5E   
                 1          2
 48.5S / 2:  0.0000000  0.0000000
 49.5S / 1:  0.0000000  0.0000000
 
! ** deliberate error **
! 6d temperature and 3d depth field (depth unchanging in time, ensemble and forecast)
! Ferret does not permit auxiliary variable to have an axis not found on the source variable
! (to avoid having to consider auxiliary variables during grid-getting ... possible to do)
SET MODE IGNORE
LET tempz6d_unmatch = temp[gz(depth6d)=zpts]
LIST/PREC=7 tempz6d_unmatch
SET MODE/LAST IGNORE
 
! ********************************
! test the @plave regridding -- ave defined from area under piecewise curve
 
! first compare to our simplest of linear interpolation regrids, tempz
! note that results will differ due to non-linearity
! at Z=500 on the output they become identical because the Z=500 grid box
! extends 450:550 with source points at Z=400 and Z=600 -- pure linear
! LET tempz = temp[gz(depth)=zpts]
LET tempzave = temp[gz(depth)=zpts@plave]
LIST tempzave - tempz
             VARIABLE : TEMPZAVE - TEMPZ
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 5 points (LONGITUDE-LATITUDE-Z)
              120.5E   121.5E  
                1        2
 ---- K:1 Z:   100
 48.5S / 2:  0.07800  0.08300
 49.5S / 1:  0.09350  0.09612
 ---- K:2 Z:   200
 48.5S / 2:  0.03975  0.04325
 49.5S / 1:  0.03738  0.04537
 ---- K:3 Z:   300
 48.5S / 2:  0.02862  0.02200
 49.5S / 1:  0.04037  0.02875
 ---- K:4 Z:   400
 48.5S / 2: -0.00894 -0.00900
 49.5S / 1: -0.00625 -0.00656
 ---- K:5 Z:   500
 48.5S / 2:  0.00000  0.00000
 49.5S / 1:  0.00000  0.00000
 
! list a little.  Note the regridding transform label
LIST/PREC=7 temp[gz(depth)=zpts@plave,k=1]
             VARIABLE : TEMPERATURE (DEG C)
                        regrid: 100 delta on Z@PLAVE using DEPTH field
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             Z        : 50 to 150
               120.5E    121.5E  
                 1         2
 48.5S / 2:  7.413000  7.519001
 49.5S / 1:  6.555500  6.668125
 
! Levitus has points at 50, 75, 100, 150, 200
! define target axis with edges at 50:75 (k=1),  75:100 (k=2)
!                                 100:125(k=3), 125:150 (k=4), 150:175(k=5)
define axis/edges/z=50:175:25/units=m zpt2     ! point at 125 is mid-way
 
! raw source data -- artifically designed for easy mental calcs
LET myvals = temp*0+100*(i-100)+10*(j-40)+k
list/PREC=7 myvals[z=50:300]
             VARIABLE : TEMP*0+100*(I-100)+10*(J-40)+K
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 6 points (LONGITUDE-LATITUDE-DEPTH (m))
               120.5E    121.5E  
                 1         2
 ---- K:5 Z:   50
 48.5S / 2: -10275.00 -10175.00
 49.5S / 1: -10285.00 -10185.00
 ---- K:6 Z:   75
 48.5S / 2: -10274.00 -10174.00
 49.5S / 1: -10284.00 -10184.00
 ---- K:7 Z:   100
 48.5S / 2: -10273.00 -10173.00
 49.5S / 1: -10283.00 -10183.00
 ---- K:8 Z:   150
 48.5S / 2: -10272.00 -10172.00
 49.5S / 1: -10282.00 -10182.00
 ---- K:9 Z:   200
 48.5S / 2: -10271.00 -10171.00
 49.5S / 1: -10281.00 -10181.00
 ---- K:10 Z:   300
 48.5S / 2: -10270.00 -10170.00
 49.5S / 1: -10280.00 -10180.00
 
! linear interpolation regridding
LET mzlin2 = myvals[gz(depth)=zpt2]
LIST/PREC=7 mzlin2
             VARIABLE : MYVALS[GZ(DEPTH)=ZPT2]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 5 points (LONGITUDE-LATITUDE-Z (M))
               120.5E    121.5E  
                 1         2
 ---- K:1 Z:   62.5
 48.5S / 2: -10274.50 -10174.50
 49.5S / 1: -10284.50 -10184.50
 ---- K:2 Z:   87.5
 48.5S / 2: -10273.50 -10173.50
 49.5S / 1: -10283.50 -10183.50
 ---- K:3 Z:   112.5
 48.5S / 2: -10272.75 -10172.75
 49.5S / 1: -10282.75 -10182.75
 ---- K:4 Z:   137.5
 48.5S / 2: -10272.25 -10172.25
 49.5S / 1: -10282.25 -10182.25
 ---- K:5 Z:   162.5
 48.5S / 2: -10271.75 -10171.75
 49.5S / 1: -10281.75 -10181.75
 
! average-regridding
LET mzave2 = myvals[gz(depth)=zpt2@plave]
 
! cases:
! 1) both edges lie on source points
LIST/PREC=7 mzave2[k=2]   ! vals at 75, 100 ==> 75:100
             VARIABLE : MYVALS[GZ(DEPTH)=ZPT2@PLAVE]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             Z (M)    : 87.5
               120.5E    121.5E  
                 1         2
 48.5S / 2: -10273.50 -10173.50
 49.5S / 1: -10283.50 -10183.50
 
! 2) lower edge only lies on source point
LIST/PREC=7 mzave2[k=3]   ! vals at 100, 150 ==> 100:125
             VARIABLE : MYVALS[GZ(DEPTH)=ZPT2@PLAVE]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             Z (M)    : 112.5
               120.5E    121.5E  
                 1         2
 48.5S / 2: -10272.75 -10172.75
 49.5S / 1: -10282.75 -10182.75
 
! 3) upper edge only lies on source point
LIST/PREC=7 mzave2[k=4]   ! vals at 100, 150 ==> 125:150
             VARIABLE : MYVALS[GZ(DEPTH)=ZPT2@PLAVE]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             Z (M)    : 137.5
               120.5E    121.5E  
                 1         2
 48.5S / 2: -10272.25 -10172.25
 49.5S / 1: -10282.25 -10182.25
 
! 4) full range
! myvals2 is linear in k, so @plave and @lin get identical results
LIST/PREC=7 mzave2
             VARIABLE : MYVALS[GZ(DEPTH)=ZPT2@PLAVE]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 5 points (LONGITUDE-LATITUDE-Z (M))
               120.5E    121.5E  
                 1         2
 ---- K:1 Z:   62.5
 48.5S / 2: -10274.50 -10174.50
 49.5S / 1: -10284.50 -10184.50
 ---- K:2 Z:   87.5
 48.5S / 2: -10273.50 -10173.50
 49.5S / 1: -10283.50 -10183.50
 ---- K:3 Z:   112.5
 48.5S / 2: -10272.75 -10172.75
 49.5S / 1: -10282.75 -10182.75
 ---- K:4 Z:   137.5
 48.5S / 2: -10272.25 -10172.25
 49.5S / 1: -10282.25 -10182.25
 ---- K:5 Z:   162.5
 48.5S / 2: -10271.75 -10171.75
 49.5S / 1: -10281.75 -10181.75
LIST/PREC=7 mzave2 - mzlin2
             VARIABLE : MZAVE2 - MZLIN2
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 5 points (LONGITUDE-LATITUDE-Z (M))
               120.5E     121.5E   
                 1          2
 ---- K:1 Z:   62.5
 48.5S / 2:  0.0000000  0.0000000
 49.5S / 1:  0.0000000  0.0000000
 ---- K:2 Z:   87.5
 48.5S / 2:  0.0000000  0.0000000
 49.5S / 1:  0.0000000  0.0000000
 ---- K:3 Z:   112.5
 48.5S / 2:  0.0000000  0.0000000
 49.5S / 1:  0.0000000  0.0000000
 ---- K:4 Z:   137.5
 48.5S / 2:  0.0000000  0.0000000
 49.5S / 1:  0.0000000  0.0000000
 ---- K:5 Z:   162.5
 48.5S / 2:  0.0000000  0.0000000
 49.5S / 1:  0.0000000  0.0000000
 
! 5) divide a single source range into multiple destination cells
! a range of 50 divided into 5 cells will have means of x.1,x.3,x.5, x.7, x.9
define axis/edges/z=150:200:10/units=m zpt3
LET mzave3 = myvals[gz(depth)=zpt3@plave]
LIST/PREC=7 mzave3
             VARIABLE : MYVALS[GZ(DEPTH)=ZPT3@PLAVE]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 5 points (LONGITUDE-LATITUDE-Z (M))
               120.5E    121.5E  
                 1         2
 ---- K:1 Z:   155
 48.5S / 2: -10271.90 -10171.90
 49.5S / 1: -10281.90 -10181.90
 ---- K:2 Z:   165
 48.5S / 2: -10271.70 -10171.70
 49.5S / 1: -10281.70 -10181.70
 ---- K:3 Z:   175
 48.5S / 2: -10271.50 -10171.50
 49.5S / 1: -10281.50 -10181.50
 ---- K:4 Z:   185
 48.5S / 2: -10271.30 -10171.30
 49.5S / 1: -10281.30 -10181.30
 ---- K:5 Z:   195
 48.5S / 2: -10271.10 -10171.10
 49.5S / 1: -10281.10 -10181.10
 
! 6) derive a single destination cell from many source points
! by manual calculation the correct answers will be n.333333
define axis/edges/z=50:200:150/units=m zpt4
LET mzave4 = myvals[gz(depth)=zpt4@plave]
LIST/PREC=7 mzave4
             VARIABLE : MYVALS[GZ(DEPTH)=ZPT4@PLAVE]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             Z (M)    : 125
               120.5E    121.5E  
                 1         2
 48.5S / 2: -10272.67 -10172.67
 49.5S / 1: -10282.67 -10182.67
 
! 7) derive a single destination cell from many source points
! by manual calculation the correct answers will be n.8125
define axis/edges/z=50:250:200/units=m zpt5
LET mzave5 = myvals[gz(depth)=zpt5@plave]
LIST/PREC=7 mzave5
             VARIABLE : MYVALS[GZ(DEPTH)=ZPT5@PLAVE]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             Z (M)    : 150
               120.5E    121.5E  
                 1         2
 48.5S / 2: -10272.19 -10172.19
 49.5S / 1: -10282.19 -10182.19
 
! 8) test the short-hand notation var[gz(depth)=0:100@ave] as an implicit
! aux var regrid via piecewice linear averaging
! To confirm correct results we create a piecewize linear function that
! has constant slope.  Averaging such a function over a symmetric region
! around a point on the source data should return the value at the point
LET myvals_z = TEMP*0+100*(I-100)+10*(J-40)+Z
list/PREC=7 myvals_z[z=200]
             VARIABLE : TEMP*0+100*(I-100)+10*(J-40)+Z
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             DEPTH (m): 200
               120.5E    121.5E  
                 1         2
 48.5S / 2: -10080.00  -9980.00
 49.5S / 1: -10090.00  -9990.00
list/PREC=7 myvals_z[gz(depth)=190:210@ave]
             VARIABLE : TEMP*0+100*(I-100)+10*(J-40)+Z
                        regrid: on Z@PLAVE using DEPTH field
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             Z        : 190 to 210
               120.5E    121.5E  
                 1         2
 48.5S / 2: -10080.00  -9980.00
 49.5S / 1: -10090.00  -9990.00
list/PREC=7 myvals_z[gz(depth)=150:250@ave]
             VARIABLE : TEMP*0+100*(I-100)+10*(J-40)+Z
                        regrid: on Z@PLAVE using DEPTH field
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             Z        : 150 to 250
               120.5E    121.5E  
                 1         2
 48.5S / 2: -10080.00  -9980.00
 49.5S / 1: -10090.00  -9990.00
 
! 8a) do same regrid using the shorhand semi-automated notation
SET VAR/LAYERZ=depth myvals_z
list/PREC=7 myvals_z[z=190:210@ave,layerz]  ! lo:hi@ave notation WILL BE CHANGED
             VARIABLE : TEMP*0+100*(I-100)+10*(J-40)+Z
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             DEPTH (m): 190 to 210 (pc wise lin avgd using DEPTH)
               120.5E    121.5E  
                 1         2
 48.5S / 2: -10080.00  -9980.00
 49.5S / 1: -10090.00  -9990.00
list/PREC=7 myvals_z[z=150:250@ave,layerz]  ! WILL BE CHANGED
             VARIABLE : TEMP*0+100*(I-100)+10*(J-40)+Z
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 points (LONGITUDE-LATITUDE)
             DEPTH (m): 150 to 250 (pc wise lin avgd using DEPTH)
               120.5E    121.5E  
                 1         2
 48.5S / 2: -10080.00  -9980.00
 49.5S / 1: -10090.00  -9990.00
 
! test missing values in the depth array
! cases:
! 1) missing values at start of aux array
define axis/z=25:200:25/units=m zpt6
LET depmis = IF (I NE 102 OR k GT 6) THEN depth
LET mzmis = myvals[gz(depmis)=zpt6]
LIST/PREC=7 mzmis
             VARIABLE : MYVALS[GZ(DEPMIS)=ZPT6]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 8 points (LONGITUDE-LATITUDE-Z (M))
               120.5E    121.5E  
                 1         2
 ---- K:1 Z:   25
 48.5S / 2: -10276.50 -10176.50
 49.5S / 1: -10286.50 -10186.50
 ---- K:2 Z:   50
 48.5S / 2: -10275.00 -10175.00
 49.5S / 1: -10285.00 -10185.00
 ---- K:3 Z:   75
 48.5S / 2: -10274.00 -10174.00
 49.5S / 1: -10284.00 -10184.00
 ---- K:4 Z:   100
 48.5S / 2: -10273.00 -10173.00
 49.5S / 1: -10283.00 -10183.00
 ---- K:5 Z:   125
 48.5S / 2: -10272.50 -10172.50
 49.5S / 1: -10282.50 -10182.50
 ---- K:6 Z:   150
 48.5S / 2: -10272.00 -10172.00
 49.5S / 1: -10282.00 -10182.00
 ---- K:7 Z:   175
 48.5S / 2: -10271.50 -10171.50
 49.5S / 1: -10281.50 -10181.50
 ---- K:8 Z:   200
 48.5S / 2: -10271.00 -10171.00
 49.5S / 1: -10281.00 -10181.00
LET mzavemis = myvals[gz(depmis)=zpt6@plave]
LIST/PREC=7 mzavemis
             VARIABLE : MYVALS[GZ(DEPMIS)=ZPT6@PLAVE]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 8 points (LONGITUDE-LATITUDE-Z (M))
               120.5E    121.5E  
                 1         2
 ---- K:1 Z:   25
 48.5S / 2: -10276.56 -10176.56
 49.5S / 1: -10286.56 -10186.56
 ---- K:2 Z:   50
 48.5S / 2: -10275.03 -10175.03
 49.5S / 1: -10285.03 -10185.03
 ---- K:3 Z:   75
 48.5S / 2: -10274.00 -10174.00
 49.5S / 1: -10284.00 -10184.00
 ---- K:4 Z:   100
 48.5S / 2: -10273.06 -10173.06
 49.5S / 1: -10283.06 -10183.06
 ---- K:5 Z:   125
 48.5S / 2: -10272.50 -10172.50
 49.5S / 1: -10282.50 -10182.50
 ---- K:6 Z:   150
 48.5S / 2: -10272.00 -10172.00
 49.5S / 1: -10282.00 -10182.00
 ---- K:7 Z:   175
 48.5S / 2: -10271.50 -10171.50
 49.5S / 1: -10281.50 -10181.50
 ---- K:8 Z:   200
 48.5S / 2: -10271.03 -10171.03
 49.5S / 1: -10281.03 -10181.03
 
! 2) missing values at end of aux array
LET depmis = IF (I NE 102 OR k LT 9) THEN depth
LET mzmis = myvals[gz(depmis)=zpt6]
LIST/PREC=7 mzmis
             VARIABLE : MYVALS[GZ(DEPMIS)=ZPT6]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 8 points (LONGITUDE-LATITUDE-Z (M))
               120.5E    121.5E  
                 1         2
 ---- K:1 Z:   25
 48.5S / 2: -10276.50 -10176.50
 49.5S / 1: -10286.50 -10186.50
 ---- K:2 Z:   50
 48.5S / 2: -10275.00 -10175.00
 49.5S / 1: -10285.00 -10185.00
 ---- K:3 Z:   75
 48.5S / 2: -10274.00 -10174.00
 49.5S / 1: -10284.00 -10184.00
 ---- K:4 Z:   100
 48.5S / 2: -10273.00 -10173.00
 49.5S / 1: -10283.00 -10183.00
 ---- K:5 Z:   125
 48.5S / 2: -10272.50 -10172.50
 49.5S / 1: -10282.50 -10182.50
 ---- K:6 Z:   150
 48.5S / 2: -10272.00 -10172.00
 49.5S / 1: -10282.00 -10182.00
 ---- K:7 Z:   175
 48.5S / 2: -10271.50 -10171.50
 49.5S / 1: -10281.50 -10181.50
 ---- K:8 Z:   200
 48.5S / 2: -10271.00 -10171.00
 49.5S / 1: -10281.00 -10181.00
LET mzavemis = myvals[gz(depmis)=zpt6@plave]
LIST/PREC=7 mzavemis
             VARIABLE : MYVALS[GZ(DEPMIS)=ZPT6@PLAVE]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 8 points (LONGITUDE-LATITUDE-Z (M))
               120.5E    121.5E  
                 1         2
 ---- K:1 Z:   25
 48.5S / 2: -10276.56 -10176.56
 49.5S / 1: -10286.56 -10186.56
 ---- K:2 Z:   50
 48.5S / 2: -10275.03 -10175.03
 49.5S / 1: -10285.03 -10185.03
 ---- K:3 Z:   75
 48.5S / 2: -10274.00 -10174.00
 49.5S / 1: -10284.00 -10184.00
 ---- K:4 Z:   100
 48.5S / 2: -10273.06 -10173.06
 49.5S / 1: -10283.06 -10183.06
 ---- K:5 Z:   125
 48.5S / 2: -10272.50 -10172.50
 49.5S / 1: -10282.50 -10182.50
 ---- K:6 Z:   150
 48.5S / 2: -10272.00 -10172.00
 49.5S / 1: -10282.00 -10182.00
 ---- K:7 Z:   175
 48.5S / 2: -10271.50 -10171.50
 49.5S / 1: -10281.50 -10181.50
 ---- K:8 Z:   200
 48.5S / 2: -10271.03 -10171.03
 49.5S / 1: -10281.03 -10181.03
 
! 3) missing values in midst of aux array -- stops processing beyond
LET depmis = IF (I NE 102 OR k EQ 7 OR K EQ 8) THEN depth
LET mzmis = myvals[gz(depmis)=zpt6]
LIST/PREC=7 mzmis
             VARIABLE : MYVALS[GZ(DEPMIS)=ZPT6]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 8 points (LONGITUDE-LATITUDE-Z (M))
               120.5E    121.5E  
                 1         2
 ---- K:1 Z:   25
 48.5S / 2: -10276.50 -10176.50
 49.5S / 1: -10286.50 -10186.50
 ---- K:2 Z:   50
 48.5S / 2: -10275.00 -10175.00
 49.5S / 1: -10285.00 -10185.00
 ---- K:3 Z:   75
 48.5S / 2: -10274.00 -10174.00
 49.5S / 1: -10284.00 -10184.00
 ---- K:4 Z:   100
 48.5S / 2: -10273.00 -10173.00
 49.5S / 1: -10283.00 -10183.00
 ---- K:5 Z:   125
 48.5S / 2: -10272.50 -10172.50
 49.5S / 1: -10282.50 -10182.50
 ---- K:6 Z:   150
 48.5S / 2: -10272.00 -10172.00
 49.5S / 1: -10282.00 -10182.00
 ---- K:7 Z:   175
 48.5S / 2: -10271.50 -10171.50
 49.5S / 1: -10281.50 -10181.50
 ---- K:8 Z:   200
 48.5S / 2: -10271.00 -10171.00
 49.5S / 1: -10281.00 -10181.00
LET mzavemis = myvals[gz(depmis)=zpt6@plave]
LIST/PREC=7 mzavemis
             VARIABLE : MYVALS[GZ(DEPMIS)=ZPT6@PLAVE]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 8 points (LONGITUDE-LATITUDE-Z (M))
               120.5E    121.5E  
                 1         2
 ---- K:1 Z:   25
 48.5S / 2: -10276.56 -10176.56
 49.5S / 1: -10286.56 -10186.56
 ---- K:2 Z:   50
 48.5S / 2: -10275.03 -10175.03
 49.5S / 1: -10285.03 -10185.03
 ---- K:3 Z:   75
 48.5S / 2: -10274.00 -10174.00
 49.5S / 1: -10284.00 -10184.00
 ---- K:4 Z:   100
 48.5S / 2: -10273.06 -10173.06
 49.5S / 1: -10283.06 -10183.06
 ---- K:5 Z:   125
 48.5S / 2: -10272.50 -10172.50
 49.5S / 1: -10282.50 -10182.50
 ---- K:6 Z:   150
 48.5S / 2: -10272.00 -10172.00
 49.5S / 1: -10282.00 -10182.00
 ---- K:7 Z:   175
 48.5S / 2: -10271.50 -10171.50
 49.5S / 1: -10281.50 -10181.50
 ---- K:8 Z:   200
 48.5S / 2: -10271.03 -10171.03
 49.5S / 1: -10281.03 -10181.03
 
! 4) singleton non-missing values in a line of the aux array
LET depmis = IF (I NE 102 OR K EQ 8) THEN depth
LET mzmis = myvals[gz(depmis)=zpt6]
LIST/PREC=7 mzmis
             VARIABLE : MYVALS[GZ(DEPMIS)=ZPT6]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 8 points (LONGITUDE-LATITUDE-Z (M))
               120.5E    121.5E  
                 1         2
 ---- K:1 Z:   25
 48.5S / 2: -10276.50 -10176.50
 49.5S / 1: -10286.50 -10186.50
 ---- K:2 Z:   50
 48.5S / 2: -10275.00 -10175.00
 49.5S / 1: -10285.00 -10185.00
 ---- K:3 Z:   75
 48.5S / 2: -10274.00 -10174.00
 49.5S / 1: -10284.00 -10184.00
 ---- K:4 Z:   100
 48.5S / 2: -10273.00 -10173.00
 49.5S / 1: -10283.00 -10183.00
 ---- K:5 Z:   125
 48.5S / 2: -10272.50 -10172.50
 49.5S / 1: -10282.50 -10182.50
 ---- K:6 Z:   150
 48.5S / 2: -10272.00 -10172.00
 49.5S / 1: -10282.00 -10182.00
 ---- K:7 Z:   175
 48.5S / 2: -10271.50 -10171.50
 49.5S / 1: -10281.50 -10181.50
 ---- K:8 Z:   200
 48.5S / 2: -10271.00 -10171.00
 49.5S / 1: -10281.00 -10181.00
LET mzavemis = myvals[gz(depmis)=zpt6@plave]
LIST/PREC=7 mzavemis
             VARIABLE : MYVALS[GZ(DEPMIS)=ZPT6@PLAVE]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 8 points (LONGITUDE-LATITUDE-Z (M))
               120.5E    121.5E  
                 1         2
 ---- K:1 Z:   25
 48.5S / 2: -10276.56 -10176.56
 49.5S / 1: -10286.56 -10186.56
 ---- K:2 Z:   50
 48.5S / 2: -10275.03 -10175.03
 49.5S / 1: -10285.03 -10185.03
 ---- K:3 Z:   75
 48.5S / 2: -10274.00 -10174.00
 49.5S / 1: -10284.00 -10184.00
 ---- K:4 Z:   100
 48.5S / 2: -10273.06 -10173.06
 49.5S / 1: -10283.06 -10183.06
 ---- K:5 Z:   125
 48.5S / 2: -10272.50 -10172.50
 49.5S / 1: -10282.50 -10182.50
 ---- K:6 Z:   150
 48.5S / 2: -10272.00 -10172.00
 49.5S / 1: -10282.00 -10182.00
 ---- K:7 Z:   175
 48.5S / 2: -10271.50 -10171.50
 49.5S / 1: -10281.50 -10181.50
 ---- K:8 Z:   200
 48.5S / 2: -10271.03 -10171.03
 49.5S / 1: -10281.03 -10181.03
 
! 5) there are only missing values in a line of the aux array
LET depmis = IF (I NE 102) THEN depth
LET mzmis = myvals[gz(depmis)=zpt6]
LIST/PREC=7 mzmis
             VARIABLE : MYVALS[GZ(DEPMIS)=ZPT6]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 8 points (LONGITUDE-LATITUDE-Z (M))
               120.5E    121.5E  
                 1         2
 ---- K:1 Z:   25
 48.5S / 2: -10276.50 -10176.50
 49.5S / 1: -10286.50 -10186.50
 ---- K:2 Z:   50
 48.5S / 2: -10275.00 -10175.00
 49.5S / 1: -10285.00 -10185.00
 ---- K:3 Z:   75
 48.5S / 2: -10274.00 -10174.00
 49.5S / 1: -10284.00 -10184.00
 ---- K:4 Z:   100
 48.5S / 2: -10273.00 -10173.00
 49.5S / 1: -10283.00 -10183.00
 ---- K:5 Z:   125
 48.5S / 2: -10272.50 -10172.50
 49.5S / 1: -10282.50 -10182.50
 ---- K:6 Z:   150
 48.5S / 2: -10272.00 -10172.00
 49.5S / 1: -10282.00 -10182.00
 ---- K:7 Z:   175
 48.5S / 2: -10271.50 -10171.50
 49.5S / 1: -10281.50 -10181.50
 ---- K:8 Z:   200
 48.5S / 2: -10271.00 -10171.00
 49.5S / 1: -10281.00 -10181.00
LET mzavemis = myvals[gz(depmis)=zpt6@plave]
LIST/PREC=7 mzavemis
             VARIABLE : MYVALS[GZ(DEPMIS)=ZPT6@PLAVE]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 8 points (LONGITUDE-LATITUDE-Z (M))
               120.5E    121.5E  
                 1         2
 ---- K:1 Z:   25
 48.5S / 2: -10276.56 -10176.56
 49.5S / 1: -10286.56 -10186.56
 ---- K:2 Z:   50
 48.5S / 2: -10275.03 -10175.03
 49.5S / 1: -10285.03 -10185.03
 ---- K:3 Z:   75
 48.5S / 2: -10274.00 -10174.00
 49.5S / 1: -10284.00 -10184.00
 ---- K:4 Z:   100
 48.5S / 2: -10273.06 -10173.06
 49.5S / 1: -10283.06 -10183.06
 ---- K:5 Z:   125
 48.5S / 2: -10272.50 -10172.50
 49.5S / 1: -10282.50 -10182.50
 ---- K:6 Z:   150
 48.5S / 2: -10272.00 -10172.00
 49.5S / 1: -10282.00 -10182.00
 ---- K:7 Z:   175
 48.5S / 2: -10271.50 -10171.50
 49.5S / 1: -10281.50 -10181.50
 ---- K:8 Z:   200
 48.5S / 2: -10271.03 -10171.03
 49.5S / 1: -10281.03 -10181.03
 
! 6) two separated singletons -- only the first should be found
LET depmis = IF (I NE 102 OR K EQ 6 OR K EQ 8) THEN depth
LET mzmis = myvals[gz(depmis)=zpt6]
LIST/PREC=7 mzmis
             VARIABLE : MYVALS[GZ(DEPMIS)=ZPT6]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 8 points (LONGITUDE-LATITUDE-Z (M))
               120.5E    121.5E  
                 1         2
 ---- K:1 Z:   25
 48.5S / 2: -10276.50 -10176.50
 49.5S / 1: -10286.50 -10186.50
 ---- K:2 Z:   50
 48.5S / 2: -10275.00 -10175.00
 49.5S / 1: -10285.00 -10185.00
 ---- K:3 Z:   75
 48.5S / 2: -10274.00 -10174.00
 49.5S / 1: -10284.00 -10184.00
 ---- K:4 Z:   100
 48.5S / 2: -10273.00 -10173.00
 49.5S / 1: -10283.00 -10183.00
 ---- K:5 Z:   125
 48.5S / 2: -10272.50 -10172.50
 49.5S / 1: -10282.50 -10182.50
 ---- K:6 Z:   150
 48.5S / 2: -10272.00 -10172.00
 49.5S / 1: -10282.00 -10182.00
 ---- K:7 Z:   175
 48.5S / 2: -10271.50 -10171.50
 49.5S / 1: -10281.50 -10181.50
 ---- K:8 Z:   200
 48.5S / 2: -10271.00 -10171.00
 49.5S / 1: -10281.00 -10181.00
LET mzavemis = myvals[gz(depmis)=zpt6@plave]
LIST/PREC=7 mzavemis
             VARIABLE : MYVALS[GZ(DEPMIS)=ZPT6@PLAVE]
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 8 points (LONGITUDE-LATITUDE-Z (M))
               120.5E    121.5E  
                 1         2
 ---- K:1 Z:   25
 48.5S / 2: -10276.56 -10176.56
 49.5S / 1: -10286.56 -10186.56
 ---- K:2 Z:   50
 48.5S / 2: -10275.03 -10175.03
 49.5S / 1: -10285.03 -10185.03
 ---- K:3 Z:   75
 48.5S / 2: -10274.00 -10174.00
 49.5S / 1: -10284.00 -10184.00
 ---- K:4 Z:   100
 48.5S / 2: -10273.06 -10173.06
 49.5S / 1: -10283.06 -10183.06
 ---- K:5 Z:   125
 48.5S / 2: -10272.50 -10172.50
 49.5S / 1: -10282.50 -10182.50
 ---- K:6 Z:   150
 48.5S / 2: -10272.00 -10172.00
 49.5S / 1: -10282.00 -10182.00
 ---- K:7 Z:   175
 48.5S / 2: -10271.50 -10171.50
 49.5S / 1: -10281.50 -10181.50
 ---- K:8 Z:   200
 48.5S / 2: -10271.03 -10171.03
 49.5S / 1: -10281.03 -10181.03
list depmis[z=25:200]      ! to illustrate why the result is as it is
             VARIABLE : IF (I NE 102 OR K EQ 6 OR K EQ 8) THEN DEPTH
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 6 points (LONGITUDE-LATITUDE-DEPTH (m))
             120.5E 121.5E 
               1      2
 ---- K:4 Z:   30
 48.5S / 2:   30.0   30.0
 49.5S / 1:   30.0   30.0
 ---- K:5 Z:   50
 48.5S / 2:   50.0   50.0
 49.5S / 1:   50.0   50.0
 ---- K:6 Z:   75
 48.5S / 2:   75.0   75.0
 49.5S / 1:   75.0   75.0
 ---- K:7 Z:   100
 48.5S / 2:  100.0  100.0
 49.5S / 1:  100.0  100.0
 ---- K:8 Z:   150
 48.5S / 2:  150.0  150.0
 49.5S / 1:  150.0  150.0
 ---- K:9 Z:   200
 48.5S / 2:  200.0  200.0
 49.5S / 1:  200.0  200.0
 
! ********
! reversed-auxiliary variable used in regridding
! (see definitions made earlier)
! Note that the regridded result only matches the original data in regions
! where the underlying piecewise function remains strictly linear with
! unchanging slope/intercept.  Since the Z=500 point has cell limits 450:550
! and the underlying Levitus Z points (used in the definition of "depth") are
! at 400 and 600, we get the identical result from @PLAVE and @LIN
LET rvtempzaxave = rvtemp[gz(rvdepth)=zax@plave,z=100:500]
LIST/PREC=7 rvtempzaxave - tempz
             VARIABLE : RVTEMPZAXAVE - TEMPZ
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 by 2 by 5 points (LONGITUDE-LATITUDE-Z)
                120.5E      121.5E   
                  1           2
 ---- K:1 Z:   100
 48.5S / 2:  0.07800055  0.08299971
 49.5S / 1:  0.09349990  0.09612441
 ---- K:2 Z:   200
 48.5S / 2:  0.03974986  0.04325008
 49.5S / 1:  0.03737521  0.04537499
 ---- K:3 Z:   300
 48.5S / 2:  0.02862477  0.02200031
 49.5S / 1:  0.04037499  0.02874994
 ---- K:4 Z:   400
 48.5S / 2: -0.00893724 -0.00900024
 49.5S / 1: -0.00625008 -0.00656247
 ---- K:5 Z:   500
 48.5S / 2:  0.00000000  0.00000000
 49.5S / 1:  0.00000000  0.00000000
SHOW GRID/z rvtempzaxave
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXLEVITR101_102 LONGITUDE     2mr   120.5E               121.5E              full
 YAXLEVITR41_42 LATITUDE        2 r   49.5S                48.5S               full
 ZAX       Z (METERS)           5 r   100                  500                 (axis from grid-changing func)
 normal    T
 
       K     Z                       ZBOX          ZBOXLO
       1>  100                       100        50
       2>  200                       100        150
       3>  300                       100        250
       4>  400                       100        350
       5>  500                       100        450
 
! 5/15 -- added tests for non-monotonic auxiliary variable
!test_non_monotonic_aux_z.jnl
 
cancel region
define axis/x=161e:165e:1 xax
define axis/z=100:600:100 zax
 
let temp = 0.0001*Z[gz=zax]^2 + 0*x[gx=xax]
list temp
             VARIABLE : 0.0001*Z[GZ=ZAX]^2 + 0*X[GX=XAX]
             SUBSET   : 5 by 6 points (LONGITUDE-Z)
             161E   162E   163E   164E   165E   
               1      2      3      4      5
 100   / 1:   1.00   1.00   1.00   1.00   1.00
 200   / 2:   4.00   4.00   4.00   4.00   4.00
 300   / 3:   9.00   9.00   9.00   9.00   9.00
 400   / 4:  16.00  16.00  16.00  16.00  16.00
 500   / 5:  25.00  25.00  25.00  25.00  25.00
 600   / 6:  36.00  36.00  36.00  36.00  36.00
 
! disordered points at beginning, middle and end, missing at beginning
let density0 = 0*i[gx=xax]*k[gz=zax] + z/10
let density1 = if i eq 2 and k eq 4 then 20  else density0
let density2 = if i eq 3 and k eq 1 then 20  else density1
let density3 = if i eq 3 and k eq 2 then 10  else density2
let density4 = if i eq 4 and k eq 6 then 30  else density3
let density  = if i eq 5 and k le 2 then 1/0 else density4  ! missing at k=1:3
list density
             VARIABLE : IF I EQ 5 AND K LE 2 THEN 1/0 ELSE DENSITY4
             SUBSET   : 5 by 6 points (LONGITUDE-Z)
             161E   162E   163E   164E   165E   
               1      2      3      4      5
 100   / 1:  10.00  10.00  20.00  10.00   ....
 200   / 2:  20.00  20.00  10.00  20.00   ....
 300   / 3:  30.00  30.00  30.00  30.00  30.00
 400   / 4:  40.00  20.00  40.00  40.00  40.00
 500   / 5:  50.00  50.00  50.00  50.00  50.00
 600   / 6:  60.00  60.00  60.00  30.00  60.00
 
! Z=200-300 on the density axis are double valued at I=2
list temp[gz(density)=5:65:2.5]
             VARIABLE : 0.0001*Z[GZ=ZAX]^2 + 0*X[GX=XAX]
                        regrid: 2.5 delta on Z@LIN using DENSITY field
             SUBSET   : 5 by 25 points (LONGITUDE-Z)
             161E   162E   163E   164E   165E   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 7.5  /  2:   ....   ....   ....   ....   ....
 10   /  3:   1.00   1.00   4.00   1.00   ....
 12.5 /  4:   1.75   1.75   ....   1.75   ....
 15   /  5:   2.50   2.50   ....   2.50   ....
 17.5 /  6:   3.25   3.25   ....   3.25   ....
 20   /  7:   4.00   ....   ....   4.00   ....
 22.5 /  8:   5.25   ....   7.12   5.25   ....
 25   /  9:   6.50   ....   7.75   6.50   ....
 27.5 / 10:   7.75   ....   8.38   7.75   ....
 30   / 11:   9.00   ....   9.00   ....   9.00
 32.5 / 12:  10.75  19.75  10.75   ....  10.75
 35   / 13:  12.50  20.50  12.50   ....  12.50
 37.5 / 14:  14.25  21.25  14.25   ....  14.25
 40   / 15:  16.00  22.00  16.00   ....  16.00
 42.5 / 16:  18.25  22.75  18.25   ....  18.25
 45   / 17:  20.50  23.50  20.50   ....  20.50
 47.5 / 18:  22.75  24.25  22.75   ....  22.75
 50   / 19:  25.00  25.00  25.00  25.00  25.00
 52.5 / 20:  27.75  27.75  27.75   ....  27.75
 55   / 21:  30.50  30.50  30.50   ....  30.50
 57.5 / 22:  33.25  33.25  33.25   ....  33.25
 60   / 23:  36.00  36.00  36.00   ....  36.00
 62.5 / 24:   ....   ....   ....   ....   ....
 65   / 25:   ....   ....   ....   ....   ....
 
 
!************************************
! reverse-ordering of same field
let btemp = 0.0001*(700-Z[gz=zax])^2  + 0*x[gx=xax]
list btemp
             VARIABLE : 0.0001*(700-Z[GZ=ZAX])^2  + 0*X[GX=XAX]
             SUBSET   : 5 by 6 points (LONGITUDE-Z)
             161E   162E   163E   164E   165E   
               1      2      3      4      5
 100   / 1:  36.00  36.00  36.00  36.00  36.00
 200   / 2:  25.00  25.00  25.00  25.00  25.00
 300   / 3:  16.00  16.00  16.00  16.00  16.00
 400   / 4:   9.00   9.00   9.00   9.00   9.00
 500   / 5:   4.00   4.00   4.00   4.00   4.00
 600   / 6:   1.00   1.00   1.00   1.00   1.00
 
let bdensity0 = 0*i[gx=xax]*k[gz=zax] + (700-z)/10
let bdensity1 = if i eq 2 and (7-k) eq 4 then 20  else bdensity0
let bdensity2 = if i eq 3 and (7-k) eq 1 then 20  else bdensity1
let bdensity3 = if i eq 3 and (7-k) eq 2 then 10  else bdensity2
let bdensity4 = if i eq 4 and (7-k) eq 6 then 30  else bdensity3
let bdensity  = if i eq 5 and (7-k) le 2 then 1/0 else bdensity4 !missing k=1:3
 
SAY "************ TBD: STILL NEED TO MAKE SURE UNITS ARE WORKING ********"
************ TBD: STILL NEED TO MAKE SURE UNITS ARE WORKING ********
SET VAR/units="kg/m^3" density
 
list bdensity
             VARIABLE : IF I EQ 5 AND (7-K) LE 2 THEN 1/0 ELSE BDENSITY4
             SUBSET   : 5 by 6 points (LONGITUDE-Z)
             161E   162E   163E   164E   165E   
               1      2      3      4      5
 100   / 1:  60.00  60.00  60.00  30.00  60.00
 200   / 2:  50.00  50.00  50.00  50.00  50.00
 300   / 3:  40.00  20.00  40.00  40.00  40.00
 400   / 4:  30.00  30.00  30.00  30.00  30.00
 500   / 5:  20.00  20.00  10.00  20.00   ....
 600   / 6:  10.00  10.00  20.00  10.00   ....
 
list btemp[gz(bdensity)=5:65:2.5]
             VARIABLE : 0.0001*(700-Z[GZ=ZAX])^2  + 0*X[GX=XAX]
                        regrid: 2.5 delta on Z@LIN using BDENSITY field
             SUBSET   : 5 by 25 points (LONGITUDE-Z)
             161E   162E   163E   164E   165E   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 7.5  /  2:   ....   ....   ....   ....   ....
 10   /  3:   1.00   1.00   4.00   1.00   ....
 12.5 /  4:   1.75   1.75   ....   1.75   ....
 15   /  5:   2.50   2.50   ....   2.50   ....
 17.5 /  6:   3.25   3.25   ....   3.25   ....
 20   /  7:   4.00   ....   ....   4.00   ....
 22.5 /  8:   5.25   ....   7.12   5.25   ....
 25   /  9:   6.50   ....   7.75   6.50   ....
 27.5 / 10:   7.75   ....   8.38   7.75   ....
 30   / 11:   9.00   ....   9.00   ....   9.00
 32.5 / 12:  10.75  19.75  10.75   ....  10.75
 35   / 13:  12.50  20.50  12.50   ....  12.50
 37.5 / 14:  14.25  21.25  14.25   ....  14.25
 40   / 15:  16.00  22.00  16.00   ....  16.00
 42.5 / 16:  18.25  22.75  18.25   ....  18.25
 45   / 17:  20.50  23.50  20.50   ....  20.50
 47.5 / 18:  22.75  24.25  22.75   ....  22.75
 50   / 19:  25.00  25.00  25.00  25.00  25.00
 52.5 / 20:  27.75  27.75  27.75   ....  27.75
 55   / 21:  30.50  30.50  30.50   ....  30.50
 57.5 / 22:  33.25  33.25  33.25   ....  33.25
 60   / 23:  36.00  36.00  36.00   ....  36.00
 62.5 / 24:   ....   ....   ....   ....   ....
 65   / 25:   ....   ....   ....   ....   ....
 
!************************************
! similar analysis using @plave over wider cells
! compare to reverse-ordered data
list  temp[gz(density)=5:65:15@plave]
             VARIABLE : 0.0001*Z[GZ=ZAX]^2 + 0*X[GX=XAX]
                        regrid: 15 kg/m^3 on Z@PLAVE using DENSITY field
             SUBSET   : 5 by 5 points (LONGITUDE-Z (kg/m^3))
            161E   162E   163E   164E   165E   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
list btemp[gz(bdensity)=5:65:15@plave]
             VARIABLE : 0.0001*(700-Z[GZ=ZAX])^2  + 0*X[GX=XAX]
                        regrid: 15 delta on Z@PLAVE using BDENSITY field
             SUBSET   : 5 by 5 points (LONGITUDE-Z)
            161E   162E   163E   164E   165E   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 
! 6/15
! test 1D auxiliary axis regirdding on all axes
 
! p for passive axis
! a for active axis
 
define axis/x=161:165:1 xp
define axis/y=161:165:1 yp
define axis/z=161:165:1 zp
define axis/t=161:165:1 tp
define axis/e=161:165:1 ep
define axis/f=161:165:1 fp
 
define axis/x=100:700:100 xa
define axis/y=100:700:100 ya
define axis/z=100:700:100 za
define axis/t=100:700:100 ta
define axis/e=100:700:100 ea
define axis/f=100:700:100 fa
 
 
GO bn_auxiliary.sub Z,X,F

*****************************
**********  Z,X,F ***********
*****************************

! show the underlying fields
list/order=($pax1)($aax)($REG1) temp
 !-> list/order=XZ/j=1 /l=1/m=1/n=1 temp
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0.0001*     _Z[GZ=ZA] ^2 +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
             SUBSET   : 5 by 7 points (X-Z)
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:   1.00   1.00   1.00   1.00   1.00
 200   / 2:   4.00   4.00   4.00   4.00   4.00
 300   / 3:   9.00   9.00   9.00   9.00   9.00
 400   / 4:  16.00  16.00  16.00  16.00  16.00
 500   / 5:  25.00  25.00  25.00  25.00  25.00
 600   / 6:  36.00  36.00  36.00  36.00  36.00
 700   / 7:  49.00  49.00  49.00  49.00  49.00
list/order=($pax1)($aax)($REG1) btemp
 !-> list/order=XZ/j=1 /l=1/m=1/n=1 btemp
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0.0001*(800-_Z[GZ=ZA])^2 + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
             SUBSET   : 5 by 7 points (X-Z)
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  49.00  49.00  49.00  49.00  49.00
 200   / 2:  36.00  36.00  36.00  36.00  36.00
 300   / 3:  25.00  25.00  25.00  25.00  25.00
 400   / 4:  16.00  16.00  16.00  16.00  16.00
 500   / 5:   9.00   9.00   9.00   9.00   9.00
 600   / 6:   4.00   4.00   4.00   4.00   4.00
 700   / 7:   1.00   1.00   1.00   1.00   1.00
list/order=($pax1)($aax)($REG1) density
 !-> list/order=XZ/j=1 /l=1/m=1/n=1 density
             VARIABLE : IF (_I EQ 5 OR _N EQ 5) AND _K LE 2 THEN 1/0 ELSE DENSITY4
             SUBSET   : 5 by 7 points (X-Z)
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  10.00  10.00  20.00  10.00   ....
 200   / 2:  20.00  20.00  10.00  20.00   ....
 300   / 3:  30.00  30.00  30.00  30.00  30.00
 400   / 4:  40.00  20.00  40.00  40.00  40.00
 500   / 5:  50.00  50.00  50.00  50.00  50.00
 600   / 6:  60.00  60.00  60.00  30.00  60.00
 700   / 7:  70.00  70.00  70.00  70.00  70.00
list/order=($pax1)($aax)($REG1) bdensity
 !-> list/order=XZ/j=1 /l=1/m=1/n=1 bdensity
             VARIABLE : IF (_I EQ 5 OR _N EQ 5) AND (8-_K) LE 2 THEN 1/0 ELSE BDENSITY4
             SUBSET   : 5 by 7 points (X-Z)
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  70.00  70.00  70.00  70.00  70.00
 200   / 2:  60.00  60.00  60.00  30.00  60.00
 300   / 3:  50.00  50.00  50.00  50.00  50.00
 400   / 4:  40.00  20.00  40.00  40.00  40.00
 500   / 5:  30.00  30.00  30.00  30.00  30.00
 600   / 6:  20.00  20.00  10.00  20.00   ....
 700   / 7:  10.00  10.00  20.00  10.00   ....
 
! show the regridded fields
! using interpolation
list/order=($pax1)($aax)($REG1) temp[($gax)(density)=5:80:5]  ! passive ax 1
 !-> list/order=XZ/j=1 /l=1/m=1/n=1 temp[gZ(density)=5:80:5]
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0.0001*     _Z[GZ=ZA] ^2 +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 5 delta on Z@LIN using DENSITY field
             SUBSET   : 5 by 16 points (X-Z)
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
list/order=($pax2)($aax)($REG2) temp[($gax)(density)=5:80:5]  ! passive ax 2
 !-> list/order=FZ/i=1/j=1 /l=1/m=1 temp[gZ(density)=5:80:5]
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0.0001*     _Z[GZ=ZA] ^2 +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 5 delta on Z@LIN using DENSITY field
             SUBSET   : 5 by 16 points (F-Z)
             X        : 161
             Y        : 161
             T        : 161
             E        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
list/order=($pax1)($aax)($REG1) btemp[($gax)(bdensity)=5:80:5]  ! backwards pasv ax 1
 !-> list/order=XZ/j=1 /l=1/m=1/n=1 btemp[gZ(bdensity)=5:80:5]
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0.0001*(800-_Z[GZ=ZA])^2 + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 5 delta on Z@LIN using BDENSITY field
             SUBSET   : 5 by 16 points (X-Z)
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
list/order=($pax2)($aax)($REG2) btemp[($gax)(bdensity)=5:80:5]  ! backwards pasv ax 2
 !-> list/order=FZ/i=1/j=1 /l=1/m=1 btemp[gZ(bdensity)=5:80:5]
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0.0001*(800-_Z[GZ=ZA])^2 + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 5 delta on Z@LIN using BDENSITY field
             SUBSET   : 5 by 16 points (F-Z)
             X        : 161
             Y        : 161
             T        : 161
             E        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
! 6/2015 - test degenerate single point target axis
list/order=($pax1)($aax)($REG1) temp[($gax)(density)=35]
 !-> list/order=XZ/j=1 /l=1/m=1/n=1 temp[gZ(density)=35]
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0.0001*     _Z[GZ=ZA] ^2 +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: on Z@LIN using DENSITY field
             SUBSET   : 5 points (X)
             Z        : 35
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          12.50  20.50  12.50  12.50  12.50
list/order=($pax1)($aax)($REG1) btemp[($gax)(bdensity)=35]
 !-> list/order=XZ/j=1 /l=1/m=1/n=1 btemp[gZ(bdensity)=35]
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0.0001*(800-_Z[GZ=ZA])^2 + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: on Z@LIN using BDENSITY field
             SUBSET   : 5 points (X)
             Z        : 35
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          12.50  20.50  12.50  12.50  12.50
 
 
! using piecewise linear averaging
list/order=($pax1)($aax)($REG1) temp[($gax)(density)=5:80:15@plave]
 !-> list/order=XZ/j=1 /l=1/m=1/n=1 temp[gZ(density)=5:80:15@plave]
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0.0001*     _Z[GZ=ZA] ^2 +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 15 delta on Z@PLAVE using DENSITY field
             SUBSET   : 5 by 6 points (X-Z)
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
list/order=($pax2)($aax)($REG2) temp[($gax)(density)=5:80:15@plave]
 !-> list/order=FZ/i=1/j=1 /l=1/m=1 temp[gZ(density)=5:80:15@plave]
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0.0001*     _Z[GZ=ZA] ^2 +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 15 delta on Z@PLAVE using DENSITY field
             SUBSET   : 5 by 6 points (F-Z)
             X        : 161
             Y        : 161
             T        : 161
             E        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
list/order=($pax1)($aax)($REG1) btemp[($gax)(bdensity)=5:80:15@plave]
 !-> list/order=XZ/j=1 /l=1/m=1/n=1 btemp[gZ(bdensity)=5:80:15@plave]
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0.0001*(800-_Z[GZ=ZA])^2 + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 15 delta on Z@PLAVE using BDENSITY field
             SUBSET   : 5 by 6 points (X-Z)
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
list/order=($pax2)($aax)($REG2) btemp[($gax)(bdensity)=5:80:15@plave]
 !-> list/order=FZ/i=1/j=1 /l=1/m=1 btemp[gZ(bdensity)=5:80:15@plave]
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0.0001*(800-_Z[GZ=ZA])^2 + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 15 delta on Z@PLAVE using BDENSITY field
             SUBSET   : 5 by 6 points (F-Z)
             X        : 161
             Y        : 161
             T        : 161
             E        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
! 6/2015 - test degenerate single point target axis
list/order=($pax1)($aax)($REG1) temp[($gax)(density)=35:55@plave]
 !-> list/order=XZ/j=1 /l=1/m=1/n=1 temp[gZ(density)=35:55@plave]
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0.0001*     _Z[GZ=ZA] ^2 +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: on Z@PLAVE using DENSITY field
             SUBSET   : 5 points (X)
             Z        : 35 to 55
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          20.75  24.00  20.75   ....  20.75
list/order=($pax1)($aax)($REG1) btemp[($gax)(bdensity)=35:55@plave]
 !-> list/order=XZ/j=1 /l=1/m=1/n=1 btemp[gZ(bdensity)=35:55@plave]
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0.0001*(800-_Z[GZ=ZA])^2 + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: on Z@PLAVE using BDENSITY field
             SUBSET   : 5 points (X)
             Z        : 35 to 55
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          20.75  24.00  20.75   ....  20.75
 
!*********************************************************************************
!*********************************************************************************
EXIT/SCRIPT
GO bn_auxiliary.sub Z,Y,E

*****************************
**********  Z,Y,E ***********
*****************************

! show the underlying fields
list/order=($pax1)($aax)($REG1) temp
 !-> list/order=YZ/i=1  /l=1/m=1/n=1 temp
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0.0001*     _Z[GZ=ZA] ^2 +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
             SUBSET   : 5 by 7 points (Y-Z)
             X        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:   1.00   1.00   1.00   1.00   1.00
 200   / 2:   4.00   4.00   4.00   4.00   4.00
 300   / 3:   9.00   9.00   9.00   9.00   9.00
 400   / 4:  16.00  16.00  16.00  16.00  16.00
 500   / 5:  25.00  25.00  25.00  25.00  25.00
 600   / 6:  36.00  36.00  36.00  36.00  36.00
 700   / 7:  49.00  49.00  49.00  49.00  49.00
list/order=($pax1)($aax)($REG1) btemp
 !-> list/order=YZ/i=1  /l=1/m=1/n=1 btemp
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0.0001*(800-_Z[GZ=ZA])^2 + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
             SUBSET   : 5 by 7 points (Y-Z)
             X        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  49.00  49.00  49.00  49.00  49.00
 200   / 2:  36.00  36.00  36.00  36.00  36.00
 300   / 3:  25.00  25.00  25.00  25.00  25.00
 400   / 4:  16.00  16.00  16.00  16.00  16.00
 500   / 5:   9.00   9.00   9.00   9.00   9.00
 600   / 6:   4.00   4.00   4.00   4.00   4.00
 700   / 7:   1.00   1.00   1.00   1.00   1.00
list/order=($pax1)($aax)($REG1) density
 !-> list/order=YZ/i=1  /l=1/m=1/n=1 density
             VARIABLE : IF (_J EQ 5 OR _M EQ 5) AND _K LE 2 THEN 1/0 ELSE DENSITY4
             SUBSET   : 5 by 7 points (Y-Z)
             X        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  10.00  10.00  20.00  10.00   ....
 200   / 2:  20.00  20.00  10.00  20.00   ....
 300   / 3:  30.00  30.00  30.00  30.00  30.00
 400   / 4:  40.00  20.00  40.00  40.00  40.00
 500   / 5:  50.00  50.00  50.00  50.00  50.00
 600   / 6:  60.00  60.00  60.00  30.00  60.00
 700   / 7:  70.00  70.00  70.00  70.00  70.00
list/order=($pax1)($aax)($REG1) bdensity
 !-> list/order=YZ/i=1  /l=1/m=1/n=1 bdensity
             VARIABLE : IF (_J EQ 5 OR _M EQ 5) AND (8-_K) LE 2 THEN 1/0 ELSE BDENSITY4
             SUBSET   : 5 by 7 points (Y-Z)
             X        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  70.00  70.00  70.00  70.00  70.00
 200   / 2:  60.00  60.00  60.00  30.00  60.00
 300   / 3:  50.00  50.00  50.00  50.00  50.00
 400   / 4:  40.00  20.00  40.00  40.00  40.00
 500   / 5:  30.00  30.00  30.00  30.00  30.00
 600   / 6:  20.00  20.00  10.00  20.00   ....
 700   / 7:  10.00  10.00  20.00  10.00   ....
 
! show the regridded fields
! using interpolation
list/order=($pax1)($aax)($REG1) temp[($gax)(density)=5:80:5]  ! passive ax 1
 !-> list/order=YZ/i=1  /l=1/m=1/n=1 temp[gZ(density)=5:80:5]
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0.0001*     _Z[GZ=ZA] ^2 +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 5 delta on Z@LIN using DENSITY field
             SUBSET   : 5 by 16 points (Y-Z)
             X        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
list/order=($pax2)($aax)($REG2) temp[($gax)(density)=5:80:5]  ! passive ax 2
 !-> list/order=EZ/i=1/j=1 /l=1 /n=1 temp[gZ(density)=5:80:5]
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0.0001*     _Z[GZ=ZA] ^2 +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 5 delta on Z@LIN using DENSITY field
             SUBSET   : 5 by 16 points (E-Z)
             X        : 161
             Y        : 161
             T        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
list/order=($pax1)($aax)($REG1) btemp[($gax)(bdensity)=5:80:5]  ! backwards pasv ax 1
 !-> list/order=YZ/i=1  /l=1/m=1/n=1 btemp[gZ(bdensity)=5:80:5]
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0.0001*(800-_Z[GZ=ZA])^2 + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 5 delta on Z@LIN using BDENSITY field
             SUBSET   : 5 by 16 points (Y-Z)
             X        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
list/order=($pax2)($aax)($REG2) btemp[($gax)(bdensity)=5:80:5]  ! backwards pasv ax 2
 !-> list/order=EZ/i=1/j=1 /l=1 /n=1 btemp[gZ(bdensity)=5:80:5]
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0.0001*(800-_Z[GZ=ZA])^2 + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 5 delta on Z@LIN using BDENSITY field
             SUBSET   : 5 by 16 points (E-Z)
             X        : 161
             Y        : 161
             T        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
! 6/2015 - test degenerate single point target axis
list/order=($pax1)($aax)($REG1) temp[($gax)(density)=35]
 !-> list/order=YZ/i=1  /l=1/m=1/n=1 temp[gZ(density)=35]
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0.0001*     _Z[GZ=ZA] ^2 +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: on Z@LIN using DENSITY field
             SUBSET   : 5 points (Y)
             Z        : 35
             X        : 161
             T        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          12.50  20.50  12.50  12.50  12.50
list/order=($pax1)($aax)($REG1) btemp[($gax)(bdensity)=35]
 !-> list/order=YZ/i=1  /l=1/m=1/n=1 btemp[gZ(bdensity)=35]
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0.0001*(800-_Z[GZ=ZA])^2 + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: on Z@LIN using BDENSITY field
             SUBSET   : 5 points (Y)
             Z        : 35
             X        : 161
             T        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          12.50  20.50  12.50  12.50  12.50
 
 
! using piecewise linear averaging
list/order=($pax1)($aax)($REG1) temp[($gax)(density)=5:80:15@plave]
 !-> list/order=YZ/i=1  /l=1/m=1/n=1 temp[gZ(density)=5:80:15@plave]
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0.0001*     _Z[GZ=ZA] ^2 +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 15 delta on Z@PLAVE using DENSITY field
             SUBSET   : 5 by 6 points (Y-Z)
             X        : 161
             T        : 161
             E        : 161
             F        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
list/order=($pax2)($aax)($REG2) temp[($gax)(density)=5:80:15@plave]
 !-> list/order=EZ/i=1/j=1 /l=1 /n=1 temp[gZ(density)=5:80:15@plave]
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0.0001*     _Z[GZ=ZA] ^2 +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 15 delta on Z@PLAVE using DENSITY field
             SUBSET   : 5 by 6 points (E-Z)
             X        : 161
             Y        : 161
             T        : 161
             F        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
list/order=($pax1)($aax)($REG1) btemp[($gax)(bdensity)=5:80:15@plave]
 !-> list/order=YZ/i=1  /l=1/m=1/n=1 btemp[gZ(bdensity)=5:80:15@plave]
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0.0001*(800-_Z[GZ=ZA])^2 + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 15 delta on Z@PLAVE using BDENSITY field
             SUBSET   : 5 by 6 points (Y-Z)
             X        : 161
             T        : 161
             E        : 161
             F        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
list/order=($pax2)($aax)($REG2) btemp[($gax)(bdensity)=5:80:15@plave]
 !-> list/order=EZ/i=1/j=1 /l=1 /n=1 btemp[gZ(bdensity)=5:80:15@plave]
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0.0001*(800-_Z[GZ=ZA])^2 + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 15 delta on Z@PLAVE using BDENSITY field
             SUBSET   : 5 by 6 points (E-Z)
             X        : 161
             Y        : 161
             T        : 161
             F        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
! 6/2015 - test degenerate single point target axis
list/order=($pax1)($aax)($REG1) temp[($gax)(density)=35:55@plave]
 !-> list/order=YZ/i=1  /l=1/m=1/n=1 temp[gZ(density)=35:55@plave]
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0.0001*     _Z[GZ=ZA] ^2 +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: on Z@PLAVE using DENSITY field
             SUBSET   : 5 points (Y)
             Z        : 35 to 55
             X        : 161
             T        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          20.75  24.00  20.75   ....  20.75
list/order=($pax1)($aax)($REG1) btemp[($gax)(bdensity)=35:55@plave]
 !-> list/order=YZ/i=1  /l=1/m=1/n=1 btemp[gZ(bdensity)=35:55@plave]
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0.0001*(800-_Z[GZ=ZA])^2 + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: on Z@PLAVE using BDENSITY field
             SUBSET   : 5 points (Y)
             Z        : 35 to 55
             X        : 161
             T        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          20.75  24.00  20.75   ....  20.75
 
!*********************************************************************************
!*********************************************************************************
EXIT/SCRIPT
CANC MODE VERIFY

*****************************
**********  X,Z,F ***********
*****************************

             VARIABLE : 0.0001*     _X[GX=XA] ^2 +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
             SUBSET   : 5 by 7 points (Z-X)
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:   1.00   1.00   1.00   1.00   1.00
 200   / 2:   4.00   4.00   4.00   4.00   4.00
 300   / 3:   9.00   9.00   9.00   9.00   9.00
 400   / 4:  16.00  16.00  16.00  16.00  16.00
 500   / 5:  25.00  25.00  25.00  25.00  25.00
 600   / 6:  36.00  36.00  36.00  36.00  36.00
 700   / 7:  49.00  49.00  49.00  49.00  49.00
             VARIABLE : 0.0001*(800-_X[GX=XA])^2 + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
             SUBSET   : 5 by 7 points (Z-X)
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  49.00  49.00  49.00  49.00  49.00
 200   / 2:  36.00  36.00  36.00  36.00  36.00
 300   / 3:  25.00  25.00  25.00  25.00  25.00
 400   / 4:  16.00  16.00  16.00  16.00  16.00
 500   / 5:   9.00   9.00   9.00   9.00   9.00
 600   / 6:   4.00   4.00   4.00   4.00   4.00
 700   / 7:   1.00   1.00   1.00   1.00   1.00
             VARIABLE : IF (_K EQ 5 OR _N EQ 5) AND _I LE 2 THEN 1/0 ELSE DENSITY4
             SUBSET   : 5 by 7 points (Z-X)
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  10.00  10.00  20.00  10.00   ....
 200   / 2:  20.00  20.00  10.00  20.00   ....
 300   / 3:  30.00  30.00  30.00  30.00  30.00
 400   / 4:  40.00  20.00  40.00  40.00  40.00
 500   / 5:  50.00  50.00  50.00  50.00  50.00
 600   / 6:  60.00  60.00  60.00  30.00  60.00
 700   / 7:  70.00  70.00  70.00  70.00  70.00
             VARIABLE : IF (_K EQ 5 OR _N EQ 5) AND (8-_I) LE 2 THEN 1/0 ELSE BDENSITY4
             SUBSET   : 5 by 7 points (Z-X)
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  70.00  70.00  70.00  70.00  70.00
 200   / 2:  60.00  60.00  60.00  30.00  60.00
 300   / 3:  50.00  50.00  50.00  50.00  50.00
 400   / 4:  40.00  20.00  40.00  40.00  40.00
 500   / 5:  30.00  30.00  30.00  30.00  30.00
 600   / 6:  20.00  20.00  10.00  20.00   ....
 700   / 7:  10.00  10.00  20.00  10.00   ....
             VARIABLE : 0.0001*     _X[GX=XA] ^2 +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 5 delta on X@LIN using DENSITY field
             SUBSET   : 5 by 16 points (Z-X)
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0.0001*     _X[GX=XA] ^2 +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 5 delta on X@LIN using DENSITY field
             SUBSET   : 5 by 16 points (F-X)
             Y        : 161
             Z        : 161
             T        : 161
             E        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0.0001*(800-_X[GX=XA])^2 + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 5 delta on X@LIN using BDENSITY field
             SUBSET   : 5 by 16 points (Z-X)
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0.0001*(800-_X[GX=XA])^2 + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 5 delta on X@LIN using BDENSITY field
             SUBSET   : 5 by 16 points (F-X)
             Y        : 161
             Z        : 161
             T        : 161
             E        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0.0001*     _X[GX=XA] ^2 +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: on X@LIN using DENSITY field
             SUBSET   : 5 points (Z)
             X        : 35
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          12.50  20.50  12.50  12.50  12.50
             VARIABLE : 0.0001*(800-_X[GX=XA])^2 + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: on X@LIN using BDENSITY field
             SUBSET   : 5 points (Z)
             X        : 35
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          12.50  20.50  12.50  12.50  12.50
             VARIABLE : 0.0001*     _X[GX=XA] ^2 +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 15 delta on X@PLAVE using DENSITY field
             SUBSET   : 5 by 6 points (Z-X)
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0.0001*     _X[GX=XA] ^2 +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 15 delta on X@PLAVE using DENSITY field
             SUBSET   : 5 by 6 points (F-X)
             Y        : 161
             Z        : 161
             T        : 161
             E        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0.0001*(800-_X[GX=XA])^2 + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 15 delta on X@PLAVE using BDENSITY field
             SUBSET   : 5 by 6 points (Z-X)
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0.0001*(800-_X[GX=XA])^2 + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 15 delta on X@PLAVE using BDENSITY field
             SUBSET   : 5 by 6 points (F-X)
             Y        : 161
             Z        : 161
             T        : 161
             E        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0.0001*     _X[GX=XA] ^2 +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: on X@PLAVE using DENSITY field
             SUBSET   : 5 points (Z)
             X        : 35 to 55
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          20.75  24.00  20.75   ....  20.75
             VARIABLE : 0.0001*(800-_X[GX=XA])^2 + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: on X@PLAVE using BDENSITY field
             SUBSET   : 5 points (Z)
             X        : 35 to 55
             Y        : 161
             T        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          20.75  24.00  20.75   ....  20.75

*****************************
**********  Y,X,E ***********
*****************************

             VARIABLE : 0*_X[GX=XP] +  0.0001*     _Y[GY=YA] ^2 +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
             SUBSET   : 5 by 7 points (X-Y)
             Z        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:   1.00   1.00   1.00   1.00   1.00
 200   / 2:   4.00   4.00   4.00   4.00   4.00
 300   / 3:   9.00   9.00   9.00   9.00   9.00
 400   / 4:  16.00  16.00  16.00  16.00  16.00
 500   / 5:  25.00  25.00  25.00  25.00  25.00
 600   / 6:  36.00  36.00  36.00  36.00  36.00
 700   / 7:  49.00  49.00  49.00  49.00  49.00
             VARIABLE : 0*_X[GX=XP] + 0.0001*(800-_Y[GY=YA])^2 + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
             SUBSET   : 5 by 7 points (X-Y)
             Z        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  49.00  49.00  49.00  49.00  49.00
 200   / 2:  36.00  36.00  36.00  36.00  36.00
 300   / 3:  25.00  25.00  25.00  25.00  25.00
 400   / 4:  16.00  16.00  16.00  16.00  16.00
 500   / 5:   9.00   9.00   9.00   9.00   9.00
 600   / 6:   4.00   4.00   4.00   4.00   4.00
 700   / 7:   1.00   1.00   1.00   1.00   1.00
             VARIABLE : IF (_I EQ 5 OR _M EQ 5) AND _J LE 2 THEN 1/0 ELSE DENSITY4
             SUBSET   : 5 by 7 points (X-Y)
             Z        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  10.00  10.00  20.00  10.00   ....
 200   / 2:  20.00  20.00  10.00  20.00   ....
 300   / 3:  30.00  30.00  30.00  30.00  30.00
 400   / 4:  40.00  20.00  40.00  40.00  40.00
 500   / 5:  50.00  50.00  50.00  50.00  50.00
 600   / 6:  60.00  60.00  60.00  30.00  60.00
 700   / 7:  70.00  70.00  70.00  70.00  70.00
             VARIABLE : IF (_I EQ 5 OR _M EQ 5) AND (8-_J) LE 2 THEN 1/0 ELSE BDENSITY4
             SUBSET   : 5 by 7 points (X-Y)
             Z        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  70.00  70.00  70.00  70.00  70.00
 200   / 2:  60.00  60.00  60.00  30.00  60.00
 300   / 3:  50.00  50.00  50.00  50.00  50.00
 400   / 4:  40.00  20.00  40.00  40.00  40.00
 500   / 5:  30.00  30.00  30.00  30.00  30.00
 600   / 6:  20.00  20.00  10.00  20.00   ....
 700   / 7:  10.00  10.00  20.00  10.00   ....
             VARIABLE : 0*_X[GX=XP] +  0.0001*     _Y[GY=YA] ^2 +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 5 delta on Y@LIN using DENSITY field
             SUBSET   : 5 by 16 points (X-Y)
             Z        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] +  0.0001*     _Y[GY=YA] ^2 +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 5 delta on Y@LIN using DENSITY field
             SUBSET   : 5 by 16 points (E-Y)
             X        : 161
             Z        : 161
             T        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] + 0.0001*(800-_Y[GY=YA])^2 + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 5 delta on Y@LIN using BDENSITY field
             SUBSET   : 5 by 16 points (X-Y)
             Z        : 161
             T        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] + 0.0001*(800-_Y[GY=YA])^2 + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 5 delta on Y@LIN using BDENSITY field
             SUBSET   : 5 by 16 points (E-Y)
             X        : 161
             Z        : 161
             T        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] +  0.0001*     _Y[GY=YA] ^2 +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: on Y@LIN using DENSITY field
             SUBSET   : 5 points (X)
             Y        : 35
             Z        : 161
             T        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          12.50  20.50  12.50  12.50  12.50
             VARIABLE : 0*_X[GX=XP] + 0.0001*(800-_Y[GY=YA])^2 + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: on Y@LIN using BDENSITY field
             SUBSET   : 5 points (X)
             Y        : 35
             Z        : 161
             T        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          12.50  20.50  12.50  12.50  12.50
             VARIABLE : 0*_X[GX=XP] +  0.0001*     _Y[GY=YA] ^2 +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 15 delta on Y@PLAVE using DENSITY field
             SUBSET   : 5 by 6 points (X-Y)
             Z        : 161
             T        : 161
             E        : 161
             F        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] +  0.0001*     _Y[GY=YA] ^2 +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 15 delta on Y@PLAVE using DENSITY field
             SUBSET   : 5 by 6 points (E-Y)
             X        : 161
             Z        : 161
             T        : 161
             F        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] + 0.0001*(800-_Y[GY=YA])^2 + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 15 delta on Y@PLAVE using BDENSITY field
             SUBSET   : 5 by 6 points (X-Y)
             Z        : 161
             T        : 161
             E        : 161
             F        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] + 0.0001*(800-_Y[GY=YA])^2 + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 15 delta on Y@PLAVE using BDENSITY field
             SUBSET   : 5 by 6 points (E-Y)
             X        : 161
             Z        : 161
             T        : 161
             F        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] +  0.0001*     _Y[GY=YA] ^2 +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: on Y@PLAVE using DENSITY field
             SUBSET   : 5 points (X)
             Y        : 35 to 55
             Z        : 161
             T        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          20.75  24.00  20.75   ....  20.75
             VARIABLE : 0*_X[GX=XP] + 0.0001*(800-_Y[GY=YA])^2 + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: on Y@PLAVE using BDENSITY field
             SUBSET   : 5 points (X)
             Y        : 35 to 55
             Z        : 161
             T        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          20.75  24.00  20.75   ....  20.75

*****************************
**********  T,Y,F ***********
*****************************

             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0.0001*     _T[GT=TA] ^2 +  0*_E[GE=EP] +  0*_F[GF=FP]
             SUBSET   : 5 by 7 points (Y-T)
             X        : 161
             Z        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:   1.00   1.00   1.00   1.00   1.00
 200   / 2:   4.00   4.00   4.00   4.00   4.00
 300   / 3:   9.00   9.00   9.00   9.00   9.00
 400   / 4:  16.00  16.00  16.00  16.00  16.00
 500   / 5:  25.00  25.00  25.00  25.00  25.00
 600   / 6:  36.00  36.00  36.00  36.00  36.00
 700   / 7:  49.00  49.00  49.00  49.00  49.00
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0.0001*(800-_T[GT=TA])^2 + 0*_E[GE=EP] + 0*_F[GF=FP]
             SUBSET   : 5 by 7 points (Y-T)
             X        : 161
             Z        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  49.00  49.00  49.00  49.00  49.00
 200   / 2:  36.00  36.00  36.00  36.00  36.00
 300   / 3:  25.00  25.00  25.00  25.00  25.00
 400   / 4:  16.00  16.00  16.00  16.00  16.00
 500   / 5:   9.00   9.00   9.00   9.00   9.00
 600   / 6:   4.00   4.00   4.00   4.00   4.00
 700   / 7:   1.00   1.00   1.00   1.00   1.00
             VARIABLE : IF (_J EQ 5 OR _N EQ 5) AND _L LE 2 THEN 1/0 ELSE DENSITY4
             SUBSET   : 5 by 7 points (Y-T)
             X        : 161
             Z        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  10.00  10.00  20.00  10.00   ....
 200   / 2:  20.00  20.00  10.00  20.00   ....
 300   / 3:  30.00  30.00  30.00  30.00  30.00
 400   / 4:  40.00  20.00  40.00  40.00  40.00
 500   / 5:  50.00  50.00  50.00  50.00  50.00
 600   / 6:  60.00  60.00  60.00  30.00  60.00
 700   / 7:  70.00  70.00  70.00  70.00  70.00
             VARIABLE : IF (_J EQ 5 OR _N EQ 5) AND (8-_L) LE 2 THEN 1/0 ELSE BDENSITY4
             SUBSET   : 5 by 7 points (Y-T)
             X        : 161
             Z        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  70.00  70.00  70.00  70.00  70.00
 200   / 2:  60.00  60.00  60.00  30.00  60.00
 300   / 3:  50.00  50.00  50.00  50.00  50.00
 400   / 4:  40.00  20.00  40.00  40.00  40.00
 500   / 5:  30.00  30.00  30.00  30.00  30.00
 600   / 6:  20.00  20.00  10.00  20.00   ....
 700   / 7:  10.00  10.00  20.00  10.00   ....
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0.0001*     _T[GT=TA] ^2 +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 5 delta on T@LIN using DENSITY field
             SUBSET   : 5 by 16 points (Y-T)
             X        : 161
             Z        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0.0001*     _T[GT=TA] ^2 +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 5 delta on T@LIN using DENSITY field
             SUBSET   : 5 by 16 points (F-T)
             X        : 161
             Y        : 161
             Z        : 161
             E        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0.0001*(800-_T[GT=TA])^2 + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 5 delta on T@LIN using BDENSITY field
             SUBSET   : 5 by 16 points (Y-T)
             X        : 161
             Z        : 161
             E        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0.0001*(800-_T[GT=TA])^2 + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 5 delta on T@LIN using BDENSITY field
             SUBSET   : 5 by 16 points (F-T)
             X        : 161
             Y        : 161
             Z        : 161
             E        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0.0001*     _T[GT=TA] ^2 +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: on T@LIN using DENSITY field
             SUBSET   : 5 points (Y)
             T        : 35
             X        : 161
             Z        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          12.50  20.50  12.50  12.50  12.50
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0.0001*(800-_T[GT=TA])^2 + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: on T@LIN using BDENSITY field
             SUBSET   : 5 points (Y)
             T        : 35
             X        : 161
             Z        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          12.50  20.50  12.50  12.50  12.50
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0.0001*     _T[GT=TA] ^2 +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 15 delta on T@PLAVE using DENSITY field
             SUBSET   : 5 by 6 points (Y-T)
             X        : 161
             Z        : 161
             E        : 161
             F        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0.0001*     _T[GT=TA] ^2 +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: 15 delta on T@PLAVE using DENSITY field
             SUBSET   : 5 by 6 points (F-T)
             X        : 161
             Y        : 161
             Z        : 161
             E        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0.0001*(800-_T[GT=TA])^2 + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 15 delta on T@PLAVE using BDENSITY field
             SUBSET   : 5 by 6 points (Y-T)
             X        : 161
             Z        : 161
             E        : 161
             F        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0.0001*(800-_T[GT=TA])^2 + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: 15 delta on T@PLAVE using BDENSITY field
             SUBSET   : 5 by 6 points (F-T)
             X        : 161
             Y        : 161
             Z        : 161
             E        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0.0001*     _T[GT=TA] ^2 +  0*_E[GE=EP] +  0*_F[GF=FP]
                        regrid: on T@PLAVE using DENSITY field
             SUBSET   : 5 points (Y)
             T        : 35 to 55
             X        : 161
             Z        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          20.75  24.00  20.75   ....  20.75
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0.0001*(800-_T[GT=TA])^2 + 0*_E[GE=EP] + 0*_F[GF=FP]
                        regrid: on T@PLAVE using BDENSITY field
             SUBSET   : 5 points (Y)
             T        : 35 to 55
             X        : 161
             Z        : 161
             E        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          20.75  24.00  20.75   ....  20.75

*****************************
**********  E,Z,F ***********
*****************************

             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0.0001*     _E[GE=EA] ^2 +  0*_F[GF=FP]
             SUBSET   : 5 by 7 points (Z-E)
             X        : 161
             Y        : 161
             T        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:   1.00   1.00   1.00   1.00   1.00
 200   / 2:   4.00   4.00   4.00   4.00   4.00
 300   / 3:   9.00   9.00   9.00   9.00   9.00
 400   / 4:  16.00  16.00  16.00  16.00  16.00
 500   / 5:  25.00  25.00  25.00  25.00  25.00
 600   / 6:  36.00  36.00  36.00  36.00  36.00
 700   / 7:  49.00  49.00  49.00  49.00  49.00
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0.0001*(800-_E[GE=EA])^2 + 0*_F[GF=FP]
             SUBSET   : 5 by 7 points (Z-E)
             X        : 161
             Y        : 161
             T        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  49.00  49.00  49.00  49.00  49.00
 200   / 2:  36.00  36.00  36.00  36.00  36.00
 300   / 3:  25.00  25.00  25.00  25.00  25.00
 400   / 4:  16.00  16.00  16.00  16.00  16.00
 500   / 5:   9.00   9.00   9.00   9.00   9.00
 600   / 6:   4.00   4.00   4.00   4.00   4.00
 700   / 7:   1.00   1.00   1.00   1.00   1.00
             VARIABLE : IF (_K EQ 5 OR _N EQ 5) AND _M LE 2 THEN 1/0 ELSE DENSITY4
             SUBSET   : 5 by 7 points (Z-E)
             X        : 161
             Y        : 161
             T        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  10.00  10.00  20.00  10.00   ....
 200   / 2:  20.00  20.00  10.00  20.00   ....
 300   / 3:  30.00  30.00  30.00  30.00  30.00
 400   / 4:  40.00  20.00  40.00  40.00  40.00
 500   / 5:  50.00  50.00  50.00  50.00  50.00
 600   / 6:  60.00  60.00  60.00  30.00  60.00
 700   / 7:  70.00  70.00  70.00  70.00  70.00
             VARIABLE : IF (_K EQ 5 OR _N EQ 5) AND (8-_M) LE 2 THEN 1/0 ELSE BDENSITY4
             SUBSET   : 5 by 7 points (Z-E)
             X        : 161
             Y        : 161
             T        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  70.00  70.00  70.00  70.00  70.00
 200   / 2:  60.00  60.00  60.00  30.00  60.00
 300   / 3:  50.00  50.00  50.00  50.00  50.00
 400   / 4:  40.00  20.00  40.00  40.00  40.00
 500   / 5:  30.00  30.00  30.00  30.00  30.00
 600   / 6:  20.00  20.00  10.00  20.00   ....
 700   / 7:  10.00  10.00  20.00  10.00   ....
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0.0001*     _E[GE=EA] ^2 +  0*_F[GF=FP]
                        regrid: 5 delta on E@LIN using DENSITY field
             SUBSET   : 5 by 16 points (Z-E)
             X        : 161
             Y        : 161
             T        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0.0001*     _E[GE=EA] ^2 +  0*_F[GF=FP]
                        regrid: 5 delta on E@LIN using DENSITY field
             SUBSET   : 5 by 16 points (F-E)
             X        : 161
             Y        : 161
             Z        : 161
             T        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0.0001*(800-_E[GE=EA])^2 + 0*_F[GF=FP]
                        regrid: 5 delta on E@LIN using BDENSITY field
             SUBSET   : 5 by 16 points (Z-E)
             X        : 161
             Y        : 161
             T        : 161
             F        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0.0001*(800-_E[GE=EA])^2 + 0*_F[GF=FP]
                        regrid: 5 delta on E@LIN using BDENSITY field
             SUBSET   : 5 by 16 points (F-E)
             X        : 161
             Y        : 161
             Z        : 161
             T        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0.0001*     _E[GE=EA] ^2 +  0*_F[GF=FP]
                        regrid: on E@LIN using DENSITY field
             SUBSET   : 5 points (Z)
             E        : 35
             X        : 161
             Y        : 161
             T        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          12.50  20.50  12.50  12.50  12.50
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0.0001*(800-_E[GE=EA])^2 + 0*_F[GF=FP]
                        regrid: on E@LIN using BDENSITY field
             SUBSET   : 5 points (Z)
             E        : 35
             X        : 161
             Y        : 161
             T        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          12.50  20.50  12.50  12.50  12.50
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0.0001*     _E[GE=EA] ^2 +  0*_F[GF=FP]
                        regrid: 15 delta on E@PLAVE using DENSITY field
             SUBSET   : 5 by 6 points (Z-E)
             X        : 161
             Y        : 161
             T        : 161
             F        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0.0001*     _E[GE=EA] ^2 +  0*_F[GF=FP]
                        regrid: 15 delta on E@PLAVE using DENSITY field
             SUBSET   : 5 by 6 points (F-E)
             X        : 161
             Y        : 161
             Z        : 161
             T        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0.0001*(800-_E[GE=EA])^2 + 0*_F[GF=FP]
                        regrid: 15 delta on E@PLAVE using BDENSITY field
             SUBSET   : 5 by 6 points (Z-E)
             X        : 161
             Y        : 161
             T        : 161
             F        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0.0001*(800-_E[GE=EA])^2 + 0*_F[GF=FP]
                        regrid: 15 delta on E@PLAVE using BDENSITY field
             SUBSET   : 5 by 6 points (F-E)
             X        : 161
             Y        : 161
             Z        : 161
             T        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0.0001*     _E[GE=EA] ^2 +  0*_F[GF=FP]
                        regrid: on E@PLAVE using DENSITY field
             SUBSET   : 5 points (Z)
             E        : 35 to 55
             X        : 161
             Y        : 161
             T        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          20.75  24.00  20.75   ....  20.75
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0.0001*(800-_E[GE=EA])^2 + 0*_F[GF=FP]
                        regrid: on E@PLAVE using BDENSITY field
             SUBSET   : 5 points (Z)
             E        : 35 to 55
             X        : 161
             Y        : 161
             T        : 161
             F        : 161
           161    162    163    164    165   
            1      2      3      4      5
          20.75  24.00  20.75   ....  20.75

*****************************
**********  F,X,T ***********
*****************************

             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0.0001*     _F[GF=FA] ^2
             SUBSET   : 5 by 7 points (X-F)
             Y        : 161
             Z        : 161
             T        : 161
             E        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:   1.00   1.00   1.00   1.00   1.00
 200   / 2:   4.00   4.00   4.00   4.00   4.00
 300   / 3:   9.00   9.00   9.00   9.00   9.00
 400   / 4:  16.00  16.00  16.00  16.00  16.00
 500   / 5:  25.00  25.00  25.00  25.00  25.00
 600   / 6:  36.00  36.00  36.00  36.00  36.00
 700   / 7:  49.00  49.00  49.00  49.00  49.00
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0.0001*(800-_F[GF=FA])^2
             SUBSET   : 5 by 7 points (X-F)
             Y        : 161
             Z        : 161
             T        : 161
             E        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  49.00  49.00  49.00  49.00  49.00
 200   / 2:  36.00  36.00  36.00  36.00  36.00
 300   / 3:  25.00  25.00  25.00  25.00  25.00
 400   / 4:  16.00  16.00  16.00  16.00  16.00
 500   / 5:   9.00   9.00   9.00   9.00   9.00
 600   / 6:   4.00   4.00   4.00   4.00   4.00
 700   / 7:   1.00   1.00   1.00   1.00   1.00
             VARIABLE : IF (_I EQ 5 OR _L EQ 5) AND _N LE 2 THEN 1/0 ELSE DENSITY4
             SUBSET   : 5 by 7 points (X-F)
             Y        : 161
             Z        : 161
             T        : 161
             E        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  10.00  10.00  20.00  10.00   ....
 200   / 2:  20.00  20.00  10.00  20.00   ....
 300   / 3:  30.00  30.00  30.00  30.00  30.00
 400   / 4:  40.00  20.00  40.00  40.00  40.00
 500   / 5:  50.00  50.00  50.00  50.00  50.00
 600   / 6:  60.00  60.00  60.00  30.00  60.00
 700   / 7:  70.00  70.00  70.00  70.00  70.00
             VARIABLE : IF (_I EQ 5 OR _L EQ 5) AND (8-_N) LE 2 THEN 1/0 ELSE BDENSITY4
             SUBSET   : 5 by 7 points (X-F)
             Y        : 161
             Z        : 161
             T        : 161
             E        : 161
              161    162    163    164    165   
               1      2      3      4      5
 100   / 1:  70.00  70.00  70.00  70.00  70.00
 200   / 2:  60.00  60.00  60.00  30.00  60.00
 300   / 3:  50.00  50.00  50.00  50.00  50.00
 400   / 4:  40.00  20.00  40.00  40.00  40.00
 500   / 5:  30.00  30.00  30.00  30.00  30.00
 600   / 6:  20.00  20.00  10.00  20.00   ....
 700   / 7:  10.00  10.00  20.00  10.00   ....
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0.0001*     _F[GF=FA] ^2
                        regrid: 5 delta on F@LIN using DENSITY field
             SUBSET   : 5 by 16 points (X-F)
             Y        : 161
             Z        : 161
             T        : 161
             E        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0.0001*     _F[GF=FA] ^2
                        regrid: 5 delta on F@LIN using DENSITY field
             SUBSET   : 5 by 16 points (T-F)
             X        : 161
             Y        : 161
             Z        : 161
             E        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0.0001*(800-_F[GF=FA])^2
                        regrid: 5 delta on F@LIN using BDENSITY field
             SUBSET   : 5 by 16 points (X-F)
             Y        : 161
             Z        : 161
             T        : 161
             E        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0.0001*(800-_F[GF=FA])^2
                        regrid: 5 delta on F@LIN using BDENSITY field
             SUBSET   : 5 by 16 points (T-F)
             X        : 161
             Y        : 161
             Z        : 161
             E        : 161
              161    162    163    164    165   
               1      2      3      4      5
 5    /  1:   ....   ....   ....   ....   ....
 10   /  2:   1.00   1.00   4.00   1.00   ....
 15   /  3:   2.50   2.50   ....   2.50   ....
 20   /  4:   4.00   ....   ....   4.00   ....
 25   /  5:   6.50   ....   7.75   6.50   ....
 30   /  6:   9.00   ....   9.00   ....   9.00
 35   /  7:  12.50  20.50  12.50   ....  12.50
 40   /  8:  16.00  22.00  16.00   ....  16.00
 45   /  9:  20.50  23.50  20.50   ....  20.50
 50   / 10:  25.00  25.00  25.00   ....  25.00
 55   / 11:  30.50  30.50  30.50  44.12  30.50
 60   / 12:  36.00  36.00  36.00  45.75  36.00
 65   / 13:  42.50  42.50  42.50  47.38  42.50
 70   / 14:  49.00  49.00  49.00  49.00  49.00
 75   / 15:   ....   ....   ....   ....   ....
 80   / 16:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0.0001*     _F[GF=FA] ^2
                        regrid: on F@LIN using DENSITY field
             SUBSET   : 5 points (X)
             F        : 35
             Y        : 161
             Z        : 161
             T        : 161
             E        : 161
           161    162    163    164    165   
            1      2      3      4      5
          12.50  20.50  12.50  12.50  12.50
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0.0001*(800-_F[GF=FA])^2
                        regrid: on F@LIN using BDENSITY field
             SUBSET   : 5 points (X)
             F        : 35
             Y        : 161
             Z        : 161
             T        : 161
             E        : 161
           161    162    163    164    165   
            1      2      3      4      5
          12.50  20.50  12.50  12.50  12.50
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0.0001*     _F[GF=FA] ^2
                        regrid: 15 delta on F@PLAVE using DENSITY field
             SUBSET   : 5 by 6 points (X-F)
             Y        : 161
             Z        : 161
             T        : 161
             E        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0.0001*     _F[GF=FA] ^2
                        regrid: 15 delta on F@PLAVE using DENSITY field
             SUBSET   : 5 by 6 points (T-F)
             X        : 161
             Y        : 161
             Z        : 161
             E        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0.0001*(800-_F[GF=FA])^2
                        regrid: 15 delta on F@PLAVE using BDENSITY field
             SUBSET   : 5 by 6 points (X-F)
             Y        : 161
             Z        : 161
             T        : 161
             E        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0.0001*(800-_F[GF=FA])^2
                        regrid: 15 delta on F@PLAVE using BDENSITY field
             SUBSET   : 5 by 6 points (T-F)
             X        : 161
             Y        : 161
             Z        : 161
             E        : 161
             161    162    163    164    165   
              1      2      3      4      5
 5    / 1:   ....   ....   ....   ....   ....
 20   / 2:   4.38   ....   ....   4.38   ....
 35   / 3:  12.58   ....  12.64   ....   ....
 50   / 4:  25.38  26.50  25.38   ....  25.38
 65   / 5:   ....   ....   ....   ....   ....
 80   / 6:   ....   ....   ....   ....   ....
             VARIABLE : 0*_X[GX=XP] +  0*_Y[GY=YP] +  0*_Z[GZ=ZP] +  0*_T[GT=TP] +  0*_E[GE=EP] +  0.0001*     _F[GF=FA] ^2
                        regrid: on F@PLAVE using DENSITY field
             SUBSET   : 5 points (X)
             F        : 35 to 55
             Y        : 161
             Z        : 161
             T        : 161
             E        : 161
           161    162    163    164    165   
            1      2      3      4      5
          20.75  24.00  20.75   ....  20.75
             VARIABLE : 0*_X[GX=XP] + 0*_Y[GY=YP] + 0*_Z[GZ=ZP] + 0*_T[GT=TP] + 0*_E[GE=EP] + 0.0001*(800-_F[GF=FA])^2
                        regrid: on F@PLAVE using BDENSITY field
             SUBSET   : 5 points (X)
             F        : 35 to 55
             Y        : 161
             Z        : 161
             T        : 161
             E        : 161
           161    162    163    164    165   
            1      2      3      4      5
          20.75  24.00  20.75   ....  20.75
*** Running ferret script: bn_plot_ribbon_gaploc.jnl
! bn_plot_ribbon_gaploc.jnl
! 7/20/2015 *acm*  new PLOT/VS/RIBBON/GAPLOC
!
! If a trajectory leaves the selected region and then travels
! back into the region we want to pick up the pen along that
! edge, not connect the points.
 
! Note Ribbon plots define a lot of color/line combos, so
! lots of ribbon overlays on a page need either SHASET RESET or
! use of fewer than the default number of levels.
 
let xpts = {1,2,3,4,5}
let ypts = {1,1,1,1,1}
let color = {1,2,3,4,5}
let gvar = {0,0,1,0,0}
plot/vs/ribbon/thick/line/lev=10/sym=21/siz=.3 xpts, 10*ypts, color
plot/ov/ribbon/nolab/vs/thick/line/lev=10/sym=21/siz=.3/gapl xpts, 10.2*ypts, color, gvar
plot/ov/ribbon/nolab/fast/vs/thick/line/lev=10/sym=21/siz=.3 xpts, 9.9*ypts, color
plot/ov/ribbon/nolab/fast/vs/thick/line/lev=10/sym=21/siz=.3/gap xpts, 9.7*ypts, color, gvar
 
! DSGTBD
! The original  file came from SOCAT; it has all depths missing.
! Also, the masking-style expression used to define gaploc below does not
! work at least for this trajectory set as of 10/2/2017.
 
! This file is a version dsg attributes pulled out.
 
use 39839D6273F1749BABAD6C1441B2BBDD_netcdf_notdsg.nc
 
! The line is connected across what should be a gap
set view left
plot/vs/hlim=63.5:68/ribbon/line/thick=3/key longitude, latitude, fco2_recommended
 
! The gaploc variable is 1 at the location marking the start of gaps.
let gaploc = if sample_number[I=@DDF] NE 1 THEN 1 ELSE 0
 
! Or, because DDF on an axis with units will get those units applied, use a shift:
let gap = sample_number - sample_number[i=@shf:-1]
let gaploc = if gap ne 1 then 1 else 0
 
set view right
plot/vs/hlim=63.5:68/ribbon/line/thick=3/key/gap longitude, latitude, fco2_recommended, gaploc
 
! Intentional errors. Qualifier needs 4 arguments. It does not (currently) apply to
! other styles of line plots.
set mode ignore
plot/vs/thick/line/sym=21/siz=.3/ribbon/gap xpts, 10*ypts, color
plot/vs/thick/line/sym=21/siz=0.3/gap xpts, 10*ypts, 10.1*ypts, 9.93*ypts, gvar
plot/ov/nolab/vs/thick/line/sym=21/siz=.3/gapl xpts, color, gvar
set mode/last ignore
*** Running ferret script: bn_time_short_axes.jnl
! bn_time_short_axes.jnl
! testing time axis style with HH:MM on the time axis labels.
 
use timesec
 
plot/t="21-aug-2015:00:00":"21-aug-2015:04:30" airt
plot/axes=0,1,1,0/t="21-aug-2015:01:15":"21-aug-2015:03:30" airt
plot/t="21-aug-2015:01:15":"21-aug-2015:12:00" airt
 
 
plot/trans/t="21-aug-2015:00:00":"21-aug-2015:04:30" airt
plot/trans/t="21-aug-2015:01:15":"21-aug-2015:03:30" airt
plot/trans/t="21-aug-2015:01:15":"21-aug-2015:12:00" airt
 
! 2D plots
 
define axis/x=0:360:1/units=degrees_east lonax
let var2d = airt + 0.1*x[gx=lonax]
 
shade/t="21-aug-2015:00:00":"21-aug-2015:04:30" var2d
fill/t="21-aug-2015:01:15":"21-aug-2015:03:30" var2d
shade/t="21-aug-2015:01:15":"21-aug-2015:12:00" var2d
 
 
shade/trans/t="21-aug-2015:00:00":"21-aug-2015:04:30" var2d
fill/trans/t="21-aug-2015:01:15":"21-aug-2015:03:30" var2d
shade/trans/t="21-aug-2015:01:15":"21-aug-2015:12:00" var2d
*** Running ferret script: bn_floatstr_extended.jnl
! bn_floatstr_extended.jnl
! test use of Integer and zero-filled formats in FLOATSTR function (Ferret v6.95)
! 9/28/2015
 
 
LET string = FLOATSTR({3.14159,2.71828},"(i3)")
LIST string
             VARIABLE : FLOATSTR({3.14159,2.71828},"(i3)")
             SUBSET   : 2 points (X)
 1   / 1:"  3"
 2   / 2:"  2"
 
LET string = FLOATSTR({3.14159,2.71828},"(i3.3)")
LIST string
             VARIABLE : FLOATSTR({3.14159,2.71828},"(i3.3)")
             SUBSET   : 2 points (X)
 1   / 1:"003"
 2   / 2:"002"
 
LET string = FLOATSTR({3.14159,2.71828},"(i03)")
LIST string
             VARIABLE : FLOATSTR({3.14159,2.71828},"(i03)")
             SUBSET   : 2 points (X)
 1   / 1:"003"
 2   / 2:"002"
 
! Missing data returned as the null string
LET string = FLOATSTR({3.14159,2.71828,},"(i3)")
LIST string
             VARIABLE : FLOATSTR({3.14159,2.71828,},"(i3)")
             SUBSET   : 3 points (X)
 1   / 1:"  3"
 2   / 2:"  2"
 3   / 3:""   
 
! Test some large and small values
LET var = {3.14159,2.71828,}
LIST FLOATSTR(36*var,"(i5)")
             VARIABLE : FLOATSTR(36*VAR,"(i5)")
             SUBSET   : 3 points (X)
 1   / 1:"  113"
 2   / 2:"   97"
 3   / 3:""     
LIST FLOATSTR(36*var,"(i4.3)")
             VARIABLE : FLOATSTR(36*VAR,"(i4.3)")
             SUBSET   : 3 points (X)
 1   / 1:" 113"
 2   / 2:" 097"
 3   / 3:""    
LIST FLOATSTR(1.e14*var,"(i12)")
             VARIABLE : FLOATSTR(1.E14*VAR,"(i12)")
             SUBSET   : 3 points (X)
 1   / 1:" -2147483648"
 2   / 2:" -2147483648"
 3   / 3:""            
LIST FLOATSTR(1.e-14*var,"(i5)")
             VARIABLE : FLOATSTR(1.E-14*VAR,"(i5)")
             SUBSET   : 3 points (X)
 1   / 1:"    0"
 2   / 2:"    0"
 3   / 3:""     
 
! Result shape is inherited from the input variable
USE gt4d011.cdf
LIST/I=100/J=36:38/T=1-dec-1982:1-jan-1983 FLOATSTR(10000*tauy, "(i4)")
             VARIABLE : FLOATSTR(10000*TAUY, "(i4)")
             FILENAME : gt4d011.cdf
             SUBSET   : 3 by 6 points (LATITUDE-TIME)
             LONGITUDE: 130W
                       3S    2.67S 2.33S 
                        36    37    38
 28-NOV-1982 22 / 18:"-271""-240""-208"
 05-DEC-1982 00 / 19:"-283""-251""-220"
 11-DEC-1982 02 / 20:"-294""-263""-231"
 17-DEC-1982 04 / 21:"-356""-323""-290"
 23-DEC-1982 06 / 22:"-469""-433""-397"
 29-DEC-1982 08 / 23:"-583""-543""-503"
 
USE coads_climatology
 
! i4.4 is the same as i04
 
LET var =  FLOATSTR(sst,"(i4.4)")
LET var =  FLOATSTR(sst,"(i04)")
 
LIST/X=165W:135W/Y=-50/L=1 var
             VARIABLE : FLOATSTR(SST,"(i04)")
             FILENAME : coads_climatology.cdf
             SUBSET   : 16 points (LONGITUDE)
             LATITUDE : 51S
             TIME     : 16-JAN 06:00
                51S   
                 20
 165W   /  88:"0010"
 163W   /  89:"0011"
 161W   /  90:"0011"
 159W   /  91:"0011"
 157W   /  92:"0010"
 155W   /  93:"0010"
 153W   /  94:"0010"
 151W   /  95:"0010"
 149W   /  96:"0010"
 147W   /  97:"0011"
 145W   /  98:"0010"
 143W   /  99:"0010"
 141W   / 100:""    
 139W   / 101:""    
 137W   / 102:""    
 135W   / 103:""    
 
! Negative numbers cannot be listed with (i5.5) but can with (I05)
LET var1 =  FLOATSTR(sst-10,"(i5.5)")
LET var2 =  FLOATSTR(sst-10,"(i05)")
 
LIST/X=165W/L=1 var1[j=1:40:2], var2[j=1:40:2]
             DATA SET: ./data/coads_climatology.cdf
             LATITUDE: 91S to 11S
             LONGITUDE: 165W
             TIME: 16-JAN 06:00
 Column  1: VAR1[G=4 deg on Y] is FLOATSTR(SST-10,"(i5.5)") (regrid: 4 deg on Y)
 Column  2: VAR2[G=4 deg on Y] is FLOATSTR(SST-10,"(i05)") (regrid: 4 deg on Y)
              VAR1    VAR2
89S   /  1: ""      ""     
85S   /  2: ""      ""     
81S   /  3: ""      ""     
77S   /  4: "*****" "00-10"
73S   /  5: "*****" "00-11"
69S   /  6: "*****" "000-9"
65S   /  7: "*****" "00-10"
61S   /  8: "*****" "000-7"
57S   /  9: "*****" "000-3"
53S   / 10: "*****" "000-1"
49S   / 11: "00002" "00002"
45S   / 12: "00004" "00004"
41S   / 13: "00006" "00006"
37S   / 14: "00008" "00008"
33S   / 15: "00010" "00010"
29S   / 16: "00012" "00012"
25S   / 17: "00015" "00015"
21S   / 18: "00017" "00017"
17S   / 19: "00018" "00018"
13S   / 20: "00019" "00019"
 
 
! F0 format for zero-filled F format
 
let a = {1.1, 3.7}
list  floatstr(a, "(f04.1)")
             VARIABLE : FLOATSTR(A, "(f04.1)")
             SUBSET   : 2 points (X)
 1   / 1:"01.1"
 2   / 2:"03.7"
 
let a = {1.1, 13.7}
list floatstr(a, "(f06.1)")
             VARIABLE : FLOATSTR(A, "(f06.1)")
             SUBSET   : 2 points (X)
 1   / 1:"0001.1"
 2   / 2:"0013.7"
 
let a = {-1.1, 13.7}
list  floatstr(a, "(f04.1)")
             VARIABLE : FLOATSTR(A, "(f04.1)")
             SUBSET   : 2 points (X)
 1   / 1:"-1.1"
 2   / 2:"13.7"
 
! testing negative numbers and null/missing results
LET var1 =  FLOATSTR(sst-20,"(f5.1)")
LET var2 =  FLOATSTR(sst-20,"(f05.1)")
LIST/X=165W/L=1 var1[j=1:40:2], var2[j=1:40:2]
             DATA SET: ./data/coads_climatology.cdf
             LATITUDE: 91S to 11S
             LONGITUDE: 165W
             TIME: 16-JAN 06:00
 Column  1: VAR1[G=4 deg on Y] is FLOATSTR(SST-20,"(f5.1)") (regrid: 4 deg on Y)
 Column  2: VAR2[G=4 deg on Y] is FLOATSTR(SST-20,"(f05.1)") (regrid: 4 deg on Y)
              VAR1    VAR2
89S   /  1: ""      ""     
85S   /  2: ""      ""     
81S   /  3: ""      ""     
77S   /  4: "-20.4" "-20.4"
73S   /  5: "-21.0" "-21.0"
69S   /  6: "-19.8" "-19.8"
65S   /  7: "-20.0" "-20.0"
61S   /  8: "-17.3" "-17.3"
57S   /  9: "-13.9" "-13.9"
53S   / 10: "-11.2" "-11.2"
49S   / 11: " -7.5" "0-7.5"
45S   / 12: " -5.7" "0-5.7"
41S   / 13: " -3.5" "0-3.5"
37S   / 14: " -1.3" "0-1.3"
33S   / 15: "  0.9" "000.9"
29S   / 16: "  3.0" "003.0"
25S   / 17: "  5.1" "005.1"
21S   / 18: "  7.5" "007.5"
17S   / 19: "  8.1" "008.1"
13S   / 20: "  9.7" "009.7"
 
! Now test (F0.0) and (I0) formats which return the
! shortest possible value without the fractional part.
! Per marco.van-hulten@lsce.ipsl.fr - this is legal in
! gfortran, so allow it.
 
LET var1 =  FLOATSTR(sst-20,"(f0.0)")
LET var2 =  FLOATSTR(sst-20,"(I0)")
LIST/X=165W/L=1 var1[j=1:40:2], var2[j=1:40:2]
             DATA SET: ./data/coads_climatology.cdf
             LATITUDE: 91S to 11S
             LONGITUDE: 165W
             TIME: 16-JAN 06:00
 Column  1: VAR1[G=4 deg on Y] is FLOATSTR(SST-20,"(f0.0)") (regrid: 4 deg on Y)
 Column  2: VAR2[G=4 deg on Y] is FLOATSTR(SST-20,"(I0)") (regrid: 4 deg on Y)
             VAR1   VAR2
89S   /  1: ""     ""   
85S   /  2: ""     ""   
81S   /  3: ""     ""   
77S   /  4: "-20." "-20"
73S   /  5: "-21." "-21"
69S   /  6: "-20." "-19"
65S   /  7: "-20." "-20"
61S   /  8: "-17." "-17"
57S   /  9: "-14." "-13"
53S   / 10: "-11." "-11"
49S   / 11: "-7."  "-7" 
45S   / 12: "-6."  "-5" 
41S   / 13: "-4."  "-3" 
37S   / 14: "-1."  "-1" 
33S   / 15: "1."   "0"  
29S   / 16: "3."   "2"  
25S   / 17: "5."   "5"  
21S   / 18: "8."   "7"  
17S   / 19: "8."   "8"  
13S   / 20: "10."  "9"  
*** Running ferret script: bn696_bug_fixes.jnl
! bn696_bug_fixes
! test various fixes that went into version 6.96
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err695_bounds_match_axis
! err695_bounds_match_axis.jnl
! ticket 2321.
!
! The coordinates match the upper bound of each cell
! to machine accuracy. The internal rep of the value
! has pt > bound_hi however.  The logic in tm_check_bnds
! handes this.
 
use shorttemp.nc
 
! Previously showed tbox=0 for every second pt.
sh grid/l=1:4444 temp
    GRID GSL1
 name       axis              # pts   start                end                 subset
 LON       LONGITUDE            1 r   97.45W               97.45W              full
 LAT       LATITUDE             1 r   36.65N               36.65N              full
 PFULL1_1  Z (hpa)              1 r-  3.3236               3.3236              full
 TIME      TIME                 4 i   19-JUN-1997 00:00    19-JUN-1997 01:30   full
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  19-JUN-1997 00:00:00      0.02083    18-JUN-1997 23:30:00        0.02083333
       2>  19-JUN-1997 00:30:00      0.02083    19-JUN-1997 00:00:00        0.04166667
       3>  19-JUN-1997 01:00:00      0.02083    19-JUN-1997 00:30:00        0.0625
       4>  19-JUN-1997 01:30:00      0.02083    19-JUN-1997 01:00:00        0.08333333
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err695_show_dat_nodata
! err695_show_dat_nodata.jnl
! ticket 2322
!
! SHOW DATA noexist should include the dataset name or number
! in the error message.
 
USE coads_climatology
 
SHOW DATA 1
     currently SET data sets:
    1> ./data/coads_climatology.cdf  (default)
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:3
 
SHOW DATA coads_climatology
     currently SET data sets:
    1> ./data/coads_climatology.cdf  (default)
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:3
 
 
! intentional errors
SET MODE ignore
SHOW DATA noexist
SHOW DATA 2
SHOW DATA/ATT noexist
 
SET MODE/LAST ignore
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err695_grave_prec
! err695_grave_prec
! Bug 2323. Large numbers had incorrect results on grave-accent
! evaluations, returning only 8 digits of precision
 
list/nohead/p=16 1234567890123456, `1234567890123456`
 !-> list/nohead/PREC=16 1234567890123456, 1234567890123456
I / *:     1234567890123456.  1234567890123456.
list/nohead/p=16 -1234567890123.456, `-1234567890123.456`
 !-> list/nohead/PREC=16 -1234567890123.456, -1234567890123.456
I / *:    -1234567890123.456 -1234567890123.456
 
! this was ok
list/nohead/p=16 1.234567890123456, `1.1234567890123456`
 !-> list/nohead/PREC=16 1.234567890123456, 1.123456789012346
I / *:     1.234567890123456  1.123456789012346
 
! check output when asking for lower precision
list/nohead/p=9 1234567890123456, `1234567890123456`
 !-> list/nohead/PREC=9 1234567890123456, 1234567890123456
I / *:     1.23456789E+15  1.23456789E+15
list/nohead/p=6 1234567890123456, `1234567890123456`
 !-> list/nohead/PREC=6 1234567890123456, 1234567890123456
I / *:     1.23457E+15  1.23457E+15
 
let var = 1.23456e+34
say `var`
 !-> MESSAGE/CONTINUE 1.23456E+34
1.23456E+34
 
say `var,prec=4`
 !-> MESSAGE/CONTINUE 1.235E+34
1.235E+34
*** Running ferret script: bn_bin_regrid.jnl
! bin regridding tests
 
go bn_bin_regrid.sub X
! Tests of @BIN and @NBIN regridding transforms
 
DEFINE AXIS/$1=1:5:1 dcoarse
 !-> DEFINE AXIS/X=1:5:1 dcoarse
 
! Data on an irregular grid
LET sbin = {1.1, 1.2, 3.5, 4.7, 5}
DEFINE AXIS/$1 irr = sbin
 !-> DEFINE AXIS/X irr = sbin
LET var = _$1[G$1=irr]
 !-> DEFINE VARIABLE var = _X[GX=irr]
 
LET dest =  _$1[G$1=dcoarse]
 !-> DEFINE VARIABLE dest =  _X[GX=dcoarse]
! Compare @AVE and @BIN regridding
LIST dest, var[G$1=dcoarse@ave], var[G$1=dcoarse@BIN], var[G$1=dcoarse@NBIN]
 !-> LIST dest, var[GX=dcoarse@ave], var[GX=dcoarse@BIN], var[GX=dcoarse@NBIN]
             X: 0.5 to 5.5
 Column  1: DEST is _X[GX=DCOARSE]
 Column  2: VAR[G=1 delta on X@AVE] is _X[GX=IRR] (regrid: 1 delta on X@AVE)
 Column  3: VAR[G=1 delta on X@BIN] is _X[GX=IRR] (regrid: 1 delta on X@BIN)
 Column  4: VAR[G=1 delta on X@NBIN] is _X[GX=IRR] (regrid: 1 delta on X@NBIN)
          DEST    VAR    VAR    VAR
1   / 1:  1.000  1.178  1.150  2.000
2   / 2:  2.000  1.545   ....  0.000
3   / 3:  3.000  3.500   ....  0.000
4   / 4:  4.000  3.980  3.500  1.000
5   / 5:  5.000  4.838  4.850  2.000
 
 
! Data on an irregular grid with missing values
LET sbin = {1.1, 2.2, , , 5}
LET var = RESHAPE(sbin, _$1[g$1=irr])
 !-> DEFINE VARIABLE var = RESHAPE(sbin, _X[gX=irr])
LET dest =  _$1[G$1=dcoarse]
 !-> DEFINE VARIABLE dest =  _X[GX=dcoarse]
LIST dest, var[G$1=dcoarse@ave], var[G$1=dcoarse@BIN], var[G$1=dcoarse@NBIN]
 !-> LIST dest, var[GX=dcoarse@ave], var[GX=dcoarse@BIN], var[GX=dcoarse@NBIN]
             X: 0.5 to 5.5
 Column  1: DEST is _X[GX=DCOARSE]
 Column  2: VAR[G=1 delta on X@AVE] is RESHAPE(SBIN, _X[GX=IRR]) (regrid: 1 delta on X@AVE)
 Column  3: VAR[G=1 delta on X@BIN] is RESHAPE(SBIN, _X[GX=IRR]) (regrid: 1 delta on X@BIN)
 Column  4: VAR[G=1 delta on X@NBIN] is RESHAPE(SBIN, _X[GX=IRR]) (regrid: 1 delta on X@NBIN)
          DEST    VAR    VAR    VAR
1   / 1:  1.000  1.956  1.650  2.000
2   / 2:  2.000  2.200   ....  0.000
3   / 3:  3.000   ....   ....  0.000
4   / 4:  4.000   ....   ....  0.000
5   / 5:  5.000  5.000  5.000  1.000
 
LIST dest, var[G$1=dcoarse]
 !-> LIST dest, var[GX=dcoarse]
             X: 0.5 to 5.5
 Column  1: DEST is _X[GX=DCOARSE]
 Column  2: VAR[G=1 delta on X] is RESHAPE(SBIN, _X[GX=IRR]) (regrid: 1 delta on X)
          DEST    VAR
1   / 1:  1.000   ....
2   / 2:  2.000   ....
3   / 3:  3.000   ....
4   / 4:  4.000   ....
5   / 5:  5.000  5.000
 
go bn_bin_regrid.sub Y
! Tests of @BIN and @NBIN regridding transforms
 
DEFINE AXIS/$1=1:5:1 dcoarse
 !-> DEFINE AXIS/Y=1:5:1 dcoarse
 
! Data on an irregular grid
LET sbin = {1.1, 1.2, 3.5, 4.7, 5}
DEFINE AXIS/$1 irr = sbin
 !-> DEFINE AXIS/Y irr = sbin
LET var = _$1[G$1=irr]
 !-> DEFINE VARIABLE var = _Y[GY=irr]
 
LET dest =  _$1[G$1=dcoarse]
 !-> DEFINE VARIABLE dest =  _Y[GY=dcoarse]
! Compare @AVE and @BIN regridding
LIST dest, var[G$1=dcoarse@ave], var[G$1=dcoarse@BIN], var[G$1=dcoarse@NBIN]
 !-> LIST dest, var[GY=dcoarse@ave], var[GY=dcoarse@BIN], var[GY=dcoarse@NBIN]
             Y: 0.5 to 5.5
 Column  1: DEST is _Y[GY=DCOARSE]
 Column  2: VAR[G=1 delta on Y@AVE] is _Y[GY=IRR] (regrid: 1 delta on Y@AVE)
 Column  3: VAR[G=1 delta on Y@BIN] is _Y[GY=IRR] (regrid: 1 delta on Y@BIN)
 Column  4: VAR[G=1 delta on Y@NBIN] is _Y[GY=IRR] (regrid: 1 delta on Y@NBIN)
          DEST    VAR    VAR    VAR
1   / 1:  1.000  1.178  1.150  2.000
2   / 2:  2.000  1.545   ....  0.000
3   / 3:  3.000  3.500   ....  0.000
4   / 4:  4.000  3.980  3.500  1.000
5   / 5:  5.000  4.838  4.850  2.000
 
 
! Data on an irregular grid with missing values
LET sbin = {1.1, 2.2, , , 5}
LET var = RESHAPE(sbin, _$1[g$1=irr])
 !-> DEFINE VARIABLE var = RESHAPE(sbin, _Y[gY=irr])
LET dest =  _$1[G$1=dcoarse]
 !-> DEFINE VARIABLE dest =  _Y[GY=dcoarse]
LIST dest, var[G$1=dcoarse@ave], var[G$1=dcoarse@BIN], var[G$1=dcoarse@NBIN]
 !-> LIST dest, var[GY=dcoarse@ave], var[GY=dcoarse@BIN], var[GY=dcoarse@NBIN]
             Y: 0.5 to 5.5
 Column  1: DEST is _Y[GY=DCOARSE]
 Column  2: VAR[G=1 delta on Y@AVE] is RESHAPE(SBIN, _Y[GY=IRR]) (regrid: 1 delta on Y@AVE)
 Column  3: VAR[G=1 delta on Y@BIN] is RESHAPE(SBIN, _Y[GY=IRR]) (regrid: 1 delta on Y@BIN)
 Column  4: VAR[G=1 delta on Y@NBIN] is RESHAPE(SBIN, _Y[GY=IRR]) (regrid: 1 delta on Y@NBIN)
          DEST    VAR    VAR    VAR
1   / 1:  1.000  1.956  1.650  2.000
2   / 2:  2.000  2.200   ....  0.000
3   / 3:  3.000   ....   ....  0.000
4   / 4:  4.000   ....   ....  0.000
5   / 5:  5.000  5.000  5.000  1.000
 
LIST dest, var[G$1=dcoarse]
 !-> LIST dest, var[GY=dcoarse]
             Y: 0.5 to 5.5
 Column  1: DEST is _Y[GY=DCOARSE]
 Column  2: VAR[G=1 delta on Y] is RESHAPE(SBIN, _Y[GY=IRR]) (regrid: 1 delta on Y)
          DEST    VAR
1   / 1:  1.000   ....
2   / 2:  2.000   ....
3   / 3:  3.000   ....
4   / 4:  4.000   ....
5   / 5:  5.000  5.000
 
go bn_bin_regrid.sub Z
! Tests of @BIN and @NBIN regridding transforms
 
DEFINE AXIS/$1=1:5:1 dcoarse
 !-> DEFINE AXIS/Z=1:5:1 dcoarse
 
! Data on an irregular grid
LET sbin = {1.1, 1.2, 3.5, 4.7, 5}
DEFINE AXIS/$1 irr = sbin
 !-> DEFINE AXIS/Z irr = sbin
LET var = _$1[G$1=irr]
 !-> DEFINE VARIABLE var = _Z[GZ=irr]
 
LET dest =  _$1[G$1=dcoarse]
 !-> DEFINE VARIABLE dest =  _Z[GZ=dcoarse]
! Compare @AVE and @BIN regridding
LIST dest, var[G$1=dcoarse@ave], var[G$1=dcoarse@BIN], var[G$1=dcoarse@NBIN]
 !-> LIST dest, var[GZ=dcoarse@ave], var[GZ=dcoarse@BIN], var[GZ=dcoarse@NBIN]
             Z: 0.5 to 5.5
 Column  1: DEST is _Z[GZ=DCOARSE]
 Column  2: VAR[G=1 delta on Z@AVE] is _Z[GZ=IRR] (regrid: 1 delta on Z@AVE)
 Column  3: VAR[G=1 delta on Z@BIN] is _Z[GZ=IRR] (regrid: 1 delta on Z@BIN)
 Column  4: VAR[G=1 delta on Z@NBIN] is _Z[GZ=IRR] (regrid: 1 delta on Z@NBIN)
          DEST    VAR    VAR    VAR
1   / 1:  1.000  1.178  1.150  2.000
2   / 2:  2.000  1.545   ....  0.000
3   / 3:  3.000  3.500   ....  0.000
4   / 4:  4.000  3.980  3.500  1.000
5   / 5:  5.000  4.838  4.850  2.000
 
 
! Data on an irregular grid with missing values
LET sbin = {1.1, 2.2, , , 5}
LET var = RESHAPE(sbin, _$1[g$1=irr])
 !-> DEFINE VARIABLE var = RESHAPE(sbin, _Z[gZ=irr])
LET dest =  _$1[G$1=dcoarse]
 !-> DEFINE VARIABLE dest =  _Z[GZ=dcoarse]
LIST dest, var[G$1=dcoarse@ave], var[G$1=dcoarse@BIN], var[G$1=dcoarse@NBIN]
 !-> LIST dest, var[GZ=dcoarse@ave], var[GZ=dcoarse@BIN], var[GZ=dcoarse@NBIN]
             Z: 0.5 to 5.5
 Column  1: DEST is _Z[GZ=DCOARSE]
 Column  2: VAR[G=1 delta on Z@AVE] is RESHAPE(SBIN, _Z[GZ=IRR]) (regrid: 1 delta on Z@AVE)
 Column  3: VAR[G=1 delta on Z@BIN] is RESHAPE(SBIN, _Z[GZ=IRR]) (regrid: 1 delta on Z@BIN)
 Column  4: VAR[G=1 delta on Z@NBIN] is RESHAPE(SBIN, _Z[GZ=IRR]) (regrid: 1 delta on Z@NBIN)
          DEST    VAR    VAR    VAR
1   / 1:  1.000  1.956  1.650  2.000
2   / 2:  2.000  2.200   ....  0.000
3   / 3:  3.000   ....   ....  0.000
4   / 4:  4.000   ....   ....  0.000
5   / 5:  5.000  5.000  5.000  1.000
 
LIST dest, var[G$1=dcoarse]
 !-> LIST dest, var[GZ=dcoarse]
             Z: 0.5 to 5.5
 Column  1: DEST is _Z[GZ=DCOARSE]
 Column  2: VAR[G=1 delta on Z] is RESHAPE(SBIN, _Z[GZ=IRR]) (regrid: 1 delta on Z)
          DEST    VAR
1   / 1:  1.000   ....
2   / 2:  2.000   ....
3   / 3:  3.000   ....
4   / 4:  4.000   ....
5   / 5:  5.000  5.000
 
go bn_bin_regrid.sub T
! Tests of @BIN and @NBIN regridding transforms
 
DEFINE AXIS/$1=1:5:1 dcoarse
 !-> DEFINE AXIS/T=1:5:1 dcoarse
 
! Data on an irregular grid
LET sbin = {1.1, 1.2, 3.5, 4.7, 5}
DEFINE AXIS/$1 irr = sbin
 !-> DEFINE AXIS/T irr = sbin
LET var = _$1[G$1=irr]
 !-> DEFINE VARIABLE var = _T[GT=irr]
 
LET dest =  _$1[G$1=dcoarse]
 !-> DEFINE VARIABLE dest =  _T[GT=dcoarse]
! Compare @AVE and @BIN regridding
LIST dest, var[G$1=dcoarse@ave], var[G$1=dcoarse@BIN], var[G$1=dcoarse@NBIN]
 !-> LIST dest, var[GT=dcoarse@ave], var[GT=dcoarse@BIN], var[GT=dcoarse@NBIN]
             T: 0.5 to 5.5
 Column  1: DEST is _T[GT=DCOARSE]
 Column  2: VAR[G=1 delta on T@AVE] is _T[GT=IRR] (regrid: 1 delta on T@AVE)
 Column  3: VAR[G=1 delta on T@BIN] is _T[GT=IRR] (regrid: 1 delta on T@BIN)
 Column  4: VAR[G=1 delta on T@NBIN] is _T[GT=IRR] (regrid: 1 delta on T@NBIN)
          DEST    VAR    VAR    VAR
1   / 1:  1.000  1.178  1.150  2.000
2   / 2:  2.000  1.545   ....  0.000
3   / 3:  3.000  3.500   ....  0.000
4   / 4:  4.000  3.980  3.500  1.000
5   / 5:  5.000  4.838  4.850  2.000
 
 
! Data on an irregular grid with missing values
LET sbin = {1.1, 2.2, , , 5}
LET var = RESHAPE(sbin, _$1[g$1=irr])
 !-> DEFINE VARIABLE var = RESHAPE(sbin, _T[gT=irr])
LET dest =  _$1[G$1=dcoarse]
 !-> DEFINE VARIABLE dest =  _T[GT=dcoarse]
LIST dest, var[G$1=dcoarse@ave], var[G$1=dcoarse@BIN], var[G$1=dcoarse@NBIN]
 !-> LIST dest, var[GT=dcoarse@ave], var[GT=dcoarse@BIN], var[GT=dcoarse@NBIN]
             T: 0.5 to 5.5
 Column  1: DEST is _T[GT=DCOARSE]
 Column  2: VAR[G=1 delta on T@AVE] is RESHAPE(SBIN, _T[GT=IRR]) (regrid: 1 delta on T@AVE)
 Column  3: VAR[G=1 delta on T@BIN] is RESHAPE(SBIN, _T[GT=IRR]) (regrid: 1 delta on T@BIN)
 Column  4: VAR[G=1 delta on T@NBIN] is RESHAPE(SBIN, _T[GT=IRR]) (regrid: 1 delta on T@NBIN)
          DEST    VAR    VAR    VAR
1   / 1:  1.000  1.956  1.650  2.000
2   / 2:  2.000  2.200   ....  0.000
3   / 3:  3.000   ....   ....  0.000
4   / 4:  4.000   ....   ....  0.000
5   / 5:  5.000  5.000  5.000  1.000
 
LIST dest, var[G$1=dcoarse]
 !-> LIST dest, var[GT=dcoarse]
             T: 0.5 to 5.5
 Column  1: DEST is _T[GT=DCOARSE]
 Column  2: VAR[G=1 delta on T] is RESHAPE(SBIN, _T[GT=IRR]) (regrid: 1 delta on T)
          DEST    VAR
1   / 1:  1.000   ....
2   / 2:  2.000   ....
3   / 3:  3.000   ....
4   / 4:  4.000   ....
5   / 5:  5.000  5.000
 
go bn_bin_regrid.sub E
! Tests of @BIN and @NBIN regridding transforms
 
DEFINE AXIS/$1=1:5:1 dcoarse
 !-> DEFINE AXIS/E=1:5:1 dcoarse
 
! Data on an irregular grid
LET sbin = {1.1, 1.2, 3.5, 4.7, 5}
DEFINE AXIS/$1 irr = sbin
 !-> DEFINE AXIS/E irr = sbin
LET var = _$1[G$1=irr]
 !-> DEFINE VARIABLE var = _E[GE=irr]
 
LET dest =  _$1[G$1=dcoarse]
 !-> DEFINE VARIABLE dest =  _E[GE=dcoarse]
! Compare @AVE and @BIN regridding
LIST dest, var[G$1=dcoarse@ave], var[G$1=dcoarse@BIN], var[G$1=dcoarse@NBIN]
 !-> LIST dest, var[GE=dcoarse@ave], var[GE=dcoarse@BIN], var[GE=dcoarse@NBIN]
             E: 0.5 to 5.5
 Column  1: DEST is _E[GE=DCOARSE]
 Column  2: VAR[G=1 delta on E@AVE] is _E[GE=IRR] (regrid: 1 delta on E@AVE)
 Column  3: VAR[G=1 delta on E@BIN] is _E[GE=IRR] (regrid: 1 delta on E@BIN)
 Column  4: VAR[G=1 delta on E@NBIN] is _E[GE=IRR] (regrid: 1 delta on E@NBIN)
          DEST    VAR    VAR    VAR
1   / 1:  1.000  1.178  1.150  2.000
2   / 2:  2.000  1.545   ....  0.000
3   / 3:  3.000  3.500   ....  0.000
4   / 4:  4.000  3.980  3.500  1.000
5   / 5:  5.000  4.838  4.850  2.000
 
 
! Data on an irregular grid with missing values
LET sbin = {1.1, 2.2, , , 5}
LET var = RESHAPE(sbin, _$1[g$1=irr])
 !-> DEFINE VARIABLE var = RESHAPE(sbin, _E[gE=irr])
LET dest =  _$1[G$1=dcoarse]
 !-> DEFINE VARIABLE dest =  _E[GE=dcoarse]
LIST dest, var[G$1=dcoarse@ave], var[G$1=dcoarse@BIN], var[G$1=dcoarse@NBIN]
 !-> LIST dest, var[GE=dcoarse@ave], var[GE=dcoarse@BIN], var[GE=dcoarse@NBIN]
             E: 0.5 to 5.5
 Column  1: DEST is _E[GE=DCOARSE]
 Column  2: VAR[G=1 delta on E@AVE] is RESHAPE(SBIN, _E[GE=IRR]) (regrid: 1 delta on E@AVE)
 Column  3: VAR[G=1 delta on E@BIN] is RESHAPE(SBIN, _E[GE=IRR]) (regrid: 1 delta on E@BIN)
 Column  4: VAR[G=1 delta on E@NBIN] is RESHAPE(SBIN, _E[GE=IRR]) (regrid: 1 delta on E@NBIN)
          DEST    VAR    VAR    VAR
1   / 1:  1.000  1.956  1.650  2.000
2   / 2:  2.000  2.200   ....  0.000
3   / 3:  3.000   ....   ....  0.000
4   / 4:  4.000   ....   ....  0.000
5   / 5:  5.000  5.000  5.000  1.000
 
LIST dest, var[G$1=dcoarse]
 !-> LIST dest, var[GE=dcoarse]
             E: 0.5 to 5.5
 Column  1: DEST is _E[GE=DCOARSE]
 Column  2: VAR[G=1 delta on E] is RESHAPE(SBIN, _E[GE=IRR]) (regrid: 1 delta on E)
          DEST    VAR
1   / 1:  1.000   ....
2   / 2:  2.000   ....
3   / 3:  3.000   ....
4   / 4:  4.000   ....
5   / 5:  5.000  5.000
 
go bn_bin_regrid.sub F
! Tests of @BIN and @NBIN regridding transforms
 
DEFINE AXIS/$1=1:5:1 dcoarse
 !-> DEFINE AXIS/F=1:5:1 dcoarse
 
! Data on an irregular grid
LET sbin = {1.1, 1.2, 3.5, 4.7, 5}
DEFINE AXIS/$1 irr = sbin
 !-> DEFINE AXIS/F irr = sbin
LET var = _$1[G$1=irr]
 !-> DEFINE VARIABLE var = _F[GF=irr]
 
LET dest =  _$1[G$1=dcoarse]
 !-> DEFINE VARIABLE dest =  _F[GF=dcoarse]
! Compare @AVE and @BIN regridding
LIST dest, var[G$1=dcoarse@ave], var[G$1=dcoarse@BIN], var[G$1=dcoarse@NBIN]
 !-> LIST dest, var[GF=dcoarse@ave], var[GF=dcoarse@BIN], var[GF=dcoarse@NBIN]
             F: 0.5 to 5.5
 Column  1: DEST is _F[GF=DCOARSE]
 Column  2: VAR[G=1 delta on F@AVE] is _F[GF=IRR] (regrid: 1 delta on F@AVE)
 Column  3: VAR[G=1 delta on F@BIN] is _F[GF=IRR] (regrid: 1 delta on F@BIN)
 Column  4: VAR[G=1 delta on F@NBIN] is _F[GF=IRR] (regrid: 1 delta on F@NBIN)
          DEST    VAR    VAR    VAR
1   / 1:  1.000  1.178  1.150  2.000
2   / 2:  2.000  1.545   ....  0.000
3   / 3:  3.000  3.500   ....  0.000
4   / 4:  4.000  3.980  3.500  1.000
5   / 5:  5.000  4.838  4.850  2.000
 
 
! Data on an irregular grid with missing values
LET sbin = {1.1, 2.2, , , 5}
LET var = RESHAPE(sbin, _$1[g$1=irr])
 !-> DEFINE VARIABLE var = RESHAPE(sbin, _F[gF=irr])
LET dest =  _$1[G$1=dcoarse]
 !-> DEFINE VARIABLE dest =  _F[GF=dcoarse]
LIST dest, var[G$1=dcoarse@ave], var[G$1=dcoarse@BIN], var[G$1=dcoarse@NBIN]
 !-> LIST dest, var[GF=dcoarse@ave], var[GF=dcoarse@BIN], var[GF=dcoarse@NBIN]
             F: 0.5 to 5.5
 Column  1: DEST is _F[GF=DCOARSE]
 Column  2: VAR[G=1 delta on F@AVE] is RESHAPE(SBIN, _F[GF=IRR]) (regrid: 1 delta on F@AVE)
 Column  3: VAR[G=1 delta on F@BIN] is RESHAPE(SBIN, _F[GF=IRR]) (regrid: 1 delta on F@BIN)
 Column  4: VAR[G=1 delta on F@NBIN] is RESHAPE(SBIN, _F[GF=IRR]) (regrid: 1 delta on F@NBIN)
          DEST    VAR    VAR    VAR
1   / 1:  1.000  1.956  1.650  2.000
2   / 2:  2.000  2.200   ....  0.000
3   / 3:  3.000   ....   ....  0.000
4   / 4:  4.000   ....   ....  0.000
5   / 5:  5.000  5.000  5.000  1.000
 
LIST dest, var[G$1=dcoarse]
 !-> LIST dest, var[GF=dcoarse]
             F: 0.5 to 5.5
 Column  1: DEST is _F[GF=DCOARSE]
 Column  2: VAR[G=1 delta on F] is RESHAPE(SBIN, _F[GF=IRR]) (regrid: 1 delta on F)
          DEST    VAR
1   / 1:  1.000   ....
2   / 2:  2.000   ....
3   / 3:  3.000   ....
4   / 4:  4.000   ....
5   / 5:  5.000  5.000
 
*** Running ferret script: bn697_bug_fixes_noremote.jnl
! bn697_bug_fixes_noremote
! test various fixes that went into version 6.97
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err696_only_inf_lev
! Bug 2326: levels with only a value and (inf) or (-inf)
! should show values less-equal or greater-equal to that level.
 
use coads_climatology; set reg/l=1
 
! The plots should be the same left to right; just a triangle key
! on the right
set view ul; shade/lev=(20)(50) sst
set view ur; shade/lev=(20)(inf) sst
set view ll; shade/lev=(-50)(20) sst
set view lr; shade/lev=(-inf)(20) sst
 
! Horizontal keys
can view
set view ul; fill/lev=(20)(50) sst
set view ur; fill/lev=(20)(inf) sst
set view ll; fill/lev=(-50)(20) sst
set view lr; fill/lev=(-inf)(20) sst
 
! silly degenerate case, two-sided inf's
can view
set view ul; shade/lev=(-inf)(22)(inf) sst
set view ur; shade/key=horiz/lev=(-inf)(22)(inf) sst
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err696_plot_ax_ppl
! err696_plot_ax_ppl.jnl
! ticket 2327
!
! restore settings properly after a PLOT/axes=
! if there is a ppl axis-setting command before next plot
 
plot/vs/noax 0,0
 set view upper
ppl axlabp 0 -1
plot/nolab/vs 0,0
 
 set view lower
ppl axlabp 0 -1
plot/nolab/vs 0,0
 
can view
vector/i=1:40/j=1:30/nolab/noax  j-20+(i-i),i-20+(j-j)
 
set view upper
ppl axlabp 0 -1
vector/i=1:40/j=1:30/nolab j-20+(i-i),i-20+(j-j)
 
 set view lower
ppl axlabp 0 -1
vector/i=1:40/j=1:30/nolab j-20+(i-i),i-20+(j-j)
 
can view
let var2d = i+j
 
shade/i=1:40/j=1:30/nolab/noax var2d
 set view upper
ppl axlabp 0 -1
shade/i=1:40/j=1:30/nolab var2d
 
 set view lower
ppl axlabp 0 -1
shade/i=1:40/j=1:30/nolab var2d
 
can view
 
contour/i=1:40/j=1:30/nolab/noax var2d
 set view upper
ppl axlabp 0 -1
contour/i=1:40/j=1:30/nolab var2d
 
 set view lower
ppl axlabp 0 -1
contour/i=1:40/j=1:30/nolab var2d
 
can view
 
let xsqr = YSEQUENCE({0,.1,.1,0})
let ysqr = YSEQUENCE({0,0,.1,.1})
let ypts = x/10
let xpts = cos(x/10)
 
polygon/trans/i=1:100/nolab/noax xpts+xsqr, ypts+ysqr, x*x/10
 
 set view upper
ppl axlabp 0 -1
polygon/trans/i=1:100/nolab  xpts+xsqr, ypts+ysqr, x*x/10
 
 set view lower
ppl axlabp 0 -1
polygon/trans/i=1:100/nolab  xpts+xsqr, ypts+ysqr, x*x/10
can view
 
! restore axis settings after a plot/set with/axes=
 
set view upper
plot/i=1:100/axes=1,0,0,1/set/title="labels" i*cos(i/8)
ppl xlab "a label"
ppl labset, , , 0.08
ppl ylab "a multi line y label<NL>here"
ppl plot
 
set view lower
plot/i=1:199 i*cos(i/10)
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err696_ft_calendars
! err696_ft_calendars.jnl
! see ticket 2332: check for matching calendars when
! there are T and F axes in a file.
 
! If the T or F calnedar is specified, use it for both axes
! e.g. reference time has a calendar, forecast time does not list a calendar.
 
use ft_cal_one.nc
sh dat
     currently SET data sets:
    1> ./data/ft_cal_one.nc  (default)
 name     title                             I         J         K         L         M         N
 TIMEVAR  GRIB forecast or observation ti  ...       ...       ...       1:2       ...       1:3
 
 
! Intentional error: two time axes with different calendars
set mode ignore
use ft_cal_mixed.nc
 
can mode ignore
 
can data/all
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err696_centerlab_restore
! err696_centerlab_restore
! Ticket 2331.
! When a plot is made with
!   shade/SET/key=centerlab; ppl shade
! Then the nextsubsequent plot still had the centered key labeling.
 
 
use coads_climatology
set view left
shade/SET/l=1/key=centerlab sst
ppl shade
 
set view right
shade/l=1 sst
 
! ...although the next one does restore the default.
shade/l=1 sst
 
! Horizontal plots with the same behavior.
cancel view
set view upper
shade/SET/l=1/key=centerlab,horiz sst
ppl shade
 
set view lower
shade/l=1/key=horiz sst
 
! FILL plots
cancel view
set view left
fill/SET/l=1/key=centerlab sst
ppl shade
 
! This plot still had the labels centered
set view right
fill/l=1 sst
 
! Ribbon plots
cancel view
set view left; plot/ribbon/vs/line/thick/key=cent/SET {1,2,3,4}, {1,2,3,4}, {1,2,3,4}
ppl ribbon
set view right; plot/ribbon/vs/line/thick  {1,2,3,4}, {1,2,3,4}, {1,2,3,4}
 
! Polygon plots
cancel view
let xsqr = YSEQUENCE({0,.1,.1,0})
let ysqr = YSEQUENCE({0,0,.1,.1})
 
let ypts = x/10
let xpts = cos(x/10)
 
set view upper
polygon/trans/i=1:20/nolab/key=horiz,center/SET xpts+xsqr, ypts+ysqr, x*x/10
ppl polygon
set view lower
polygon/trans/i=1:20/nolab/key=horiz  xpts+xsqr, ypts+ysqr, x*x/10
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err696_time_overlay
! err696_time_overlay
! bug 2334, first plot/over takes too long and the line is incorrect.
 
def ax/t="1-jan-0001":"1-jan-0009":1/unit="year"/t0="1-jan-0001"/cal=noleap tax_nlp
def ax/t="1-jan-0001":"1-jan-0009":1/unit="year"/t0="1-jan-0001"/cal=julian tax_jul
sp date
WKD MON DD HH:MM:SS ZZZ YYYY
set view upper
plot t[gt=tax_nlp]
plot/ov/vs/line/dash {1,1}, 1e6*{-1,1}
sp date
WKD MON DD HH:MM:SS ZZZ YYYY
 
sp date
WKD MON DD HH:MM:SS ZZZ YYYY
set view lower
plot t[gt=tax_jul]
plot/ov/vs/line/dash {2,2}, 1e6*{-1,1}
sp date
WKD MON DD HH:MM:SS ZZZ YYYY
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err696_save_noupcase
! err696_save_noupcase
! Ticket 2336: When UPCASE canceled an extra upcase axis
!  was written to a file - only when user-defined axis.
!
! Note as part of this fix, if MODE UPCASE is canceled,
! then it also works as if SAVE/KEEP_AXISNAMES was given.
! If keeping the original names then also don't write the
! Ferret-added additions, e.g. TIME1 if there was already
! a time axis; or a subset addition.
 
 
! Tell Ferret to write everything in the original case
cancel mode upcase
 
! Define some axes and variables
define axis/t=1-jan-2001:31-dec-2001:1/unit=days tday
define axis/x=10:150:10/units=degrees_east xax
 
let tt = t[gt=tday]
let var  = 0*tt + x[gx=xax]
 
save/clobber/file=myfile.nc tt, var
 
! An extra TDAY axis was written out
sp ncdump -h myfile.nc
netcdf myfile {
dimensions:
	tday = UNLIMITED ; // (365 currently)
	xax = 15 ;
variables:
	double tday(tday) ;
		tday:units = "days since 1901-01-15" ;
		tday:axis = "T" ;
		tday:calendar = "GREGORIAN" ;
		tday:time_origin = "15-JAN-1901" ;
		tday:standard_name = "time" ;
	double tt(tday) ;
		tt:missing_value = -1.e+34 ;
		tt:_FillValue = -1.e+34 ;
		tt:long_name = "T[GT=TDAY]" ;
	double xax(xax) ;
		xax:units = "degrees_east" ;
		xax:point_spacing = "even" ;
		xax:axis = "X" ;
		xax:modulo = 360. ;
		xax:standard_name = "longitude" ;
	double var(tday, xax) ;
		var:missing_value = -1.e+34 ;
		var:_FillValue = -1.e+34 ;
		var:long_name = "0*TT + X[GX=XAX]" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
set mode/last upcase
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err696_argument_blanks
! err696_argument_blanks.jnl
! Ticket 2343: quoted argument with a blank at the end.
 
 
! argument with a blank at the end
go err696_argument_blanks_sub "hello "
! for bug2343
 
say ($1)there($2%.%)
 !-> MESSAGE/CONTINUE hello there.
hello there.
 
! Preserve multiple blanks at the end
go err696_argument_blanks_sub "hello     "
! for bug2343
 
say ($1)there($2%.%)
 !-> MESSAGE/CONTINUE hello     there.
hello     there.
 
! 2 arguments; one with a blank at the end, next with a blank at the start.
! Note the blanks at the start of Arg 1 are not preserved.  The command is
! translated to  MESSAGE/CONTINUE   Hi Hi there my friend
! and the blanks after MESSAGE/CONTINUE are just treated as a delimiter.
 
go err696_argument_blanks_sub "  Hi Hi "  " my friend"
! for bug2343
 
say ($1)there($2%.%)
 !-> MESSAGE/CONTINUE   Hi Hi there my friend
Hi Hi there my friend
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err696_annotate_numeric
! err696_annotate_numeric
! 1/7/2016
! ticket 2350: a purely numeric string
! didn't appear on the plot.
 
use coads_climatology
shade/l=1/nokey/pal=white sst
 
! text including non-numeric has worked fine
annotate/user/xpos=180/ypos=30 "30 with text"
 
! numeric only, with and witbhout quotes
 
annotate/user/xpos=180/ypos=20/halign=-1 "20"
annotate/user/xpos=180/ypos=10/halign=-1 10
 
! tests with /NOUSER
annotate/nouser/xpos=1/ypos=2.5 40
 
! strings or purely numeric, without quotes works ok
annotate/nouser/xpos=1/ypos=2.0 1.3+7.89
annotate/nouser/xpos=1/ypos=1.5 `1.3+7.89-154,prec=6`
 !-> annotate/nouser/xpos=1/ypos=1.5 -144.81
 
! commas, just write the whole thing
annotate/nouser/xpos=1/ypos=1.0 "40,30,20"
 
annotate/nouser/xpos=1/ypos=0.5 1,2,3,4,5
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err696_e_component_mem_crptn
! canceling of an E aggregation dataset is leaving
! corrupted variables in memory as seen by the variable names "%%"
 
use ens1, ens2, ens3, ens4
define data/agg/E fourfiles = ens1, ens3, ens2, ens4
 
show data/brief
     currently SET data sets:
    1> ./data/ens1.nc
    2> ./data/ens2.nc
    3> ./data/ens3.nc
    4> ./data/ens4.nc
    5> fourfiles  (default)  Ensemble aggregation
 
list/i=3 sst[T=@ave]
             VARIABLE : SST_IN (Deg C)
             DATA SET : Ensemble series of 4 datasets patterned on ens1
             FILENAME : fourfiles
             SUBSET   : 9 by 4 points (LATITUDE-E (realization))
             LONGITUDE: 105W
             TIME     : 01-JAN 00:45 to 31-DEC 06:34 (averaged)
            13N    15N    17N    19N    21N    23N    25N    27N    29N   
             1      2      3      4      5      6      7      8      9
 1   / 1:   28.5   28.4   27.9   27.5   26.7   25.6   ....   ....   ....
 2   / 2:   85.5   85.3   83.7   82.4   80.2   76.7   ....   ....   ....
 3   / 3:   57.0   56.9   55.8   54.9   53.5   51.1   ....   ....   ....
 4   / 4:  114.1  113.8  111.6  109.8  106.9  102.2   ....   ....   ....
 
show mem/all
    SET MEMORY/MAX: 250 Mb   (31.25 megawords)
    Peak demand: 4.32 Kb
    Current cache: 4.03 Kb
all data in memory:
 SST[D=fourfiles]                  YE    mr:15 size:0.58 Kb
         3/106W                1/12N              ... / ...             ... /01-JAN 00:45        1/0.5              ... / ...
         3/104W                9/30N              ... / ...             ... /31-DEC 06:34        4/4.5              ... / ...
                                                              AVE
 SST[D=fourfiles]                  YTE   mr:12 size:3.46 Kb
         3/106W                1/12N              ... / ...                1/01-JAN 00:45        1/0.5              ... / ...
         3/104W                9/30N              ... / ...               12/31-DEC 06:34        4/4.5              ... / ...
 
cancel data fourfiles
show mem/all
    SET MEMORY/MAX: 250 Mb   (31.25 megawords)
    Peak demand: 4.32 Kb
    Current cache: 0 Kb
all data in memory:
 
exit
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err696_mem_err_report
! err696_mem_err_report.jnl
! 1/21/2016 *acm*
! V702: *sh* 2/17 - This script depends upon the specific formatting
! of the error string, when memory is exceeded
! Tweaked it to match the new formatting
 
! Ticket 2354: The error message shows the wrong number for memory needed.
!
! Try to load some data larger than the default amount of memory
 
let memsize = ($ferret_memory)
 !-> DEFINE VARIABLE memsize = 31.25
set mem/siz=2
 
 
def axis/x=1:360:1 xaxis
def axis/y=1:180:1 yaxis
def axis/z=1:20:1 zaxis
define axis/t=1-jan-2000:1-jan-2005:1/units=days  longtime
 
let bigvar = x[gx=xaxis]+y[gy=yaxis] + z[gz=zaxis] + t[gt=longtime]
sh grid bigvar
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXIS     X                  360 r   1                    360                 full
 YAXIS     Y                  180 r   1                    180                 full
 ZAXIS     Z                   20 r   1                    20                  full
 LONGTIME  TIME              1828 r   01-JAN-2000 00:00    01-JAN-2005 00:00   full
 
 
set mode ignore
load/l=1:5 bigvar
    To fulfill this request would exceed the current SET MEMORY/MAX= limit of 16Mb
    At the moment that the memory limit was reached
    memory was committed as follows:
        - to objects used in computation: 1296005 (65%)
    The size of the requested object was: 51.84 Mb (324%)
 
! Previously the number Mwords shown was too low
show sym fer_last_error
FER_LAST_ERROR = "**ERROR: request exceeds memory setting"
cancel mode ignore
 
! V702:  we no longer have to parse the error string.
! Instead look at PEAK_MEMORY
 
SET MEMORY/SIZE=15
load/l=1:5 bigvar
SHOW SYMBOL ($PEAK_MEMORY)
 !-> SHOW SYMBOL 7776005
 
! restore default
set mem/siz=`memsize`
 !-> set mem/siz=31.25
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err696_multiple_slashes_noremote
! err696_multiple_slashes_noremote.jnl
! 1/25/2016 *acm*
!
! For ticket 2356
! Change parsing to allow multiple slashes in a row.
! simplifies DEFINE SYMBOL QUALIFIERS= kinds of definitions
 
def sym qual /x=1:2
 
set reg/($qual)
 !-> set reg//x=1:2
show region
default region:
        X=1:2
        Y/J is unspecified
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
cancel region
 
 
! Several qualifiers on a command
set reg//x=1:2///y=4:7
show region
default region:
        X=1:2
        Y=4:7
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
cancel region
 
! Qualifiers with a command argument
use coads_climatology
def sym plotqual = /pal=grayscale/line//key=cont
def sym regqual = /x=300:360///y=-20:20/L=3
 
fill/($regqual)($plotqual) sst
 !-> CONTOUR/FILL//x=300:360///y=-20:20/L=3/pal=grayscale/line//key=cont sst
 
! Other syntax examples taken from bn_syntax but with extra slashes
 
! Repeat loop
cancel region
cancel data/all
show region;repeat//l=1:2 (show data;sh reg);can reg;show reg
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
!-> REPEAT: L=1
     currently SET data sets:
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        L=1
        E/M is unspecified
        F/N is unspecified
!-> REPEAT: L=2
     currently SET data sets:
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        L=2
        E/M is unspecified
        F/N is unspecified
default region:
        X/I is unspecified
        Y/J is unspecified
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
 
! continuation lines
define axis \ ! comment on the command
//x=1:10:1 \  ! comment on the qualifier
xax\          ! comment on the argument
              ! this line is significant -- completes the command
show axis xax; cancel axis xax  ! clean up
 name       axis              # pts   start                end
 XAX       X                   10 r   1                    10
   Axis span (to cell edges) = 10
 
! Allow extra slashes at the end of the command line
set reg/x=1:2/; sho reg
default region:
        X=1:2
        Y/J is unspecified
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
set reg/x=1:4//; sho reg
default region:
        X=1:4
        Y/J is unspecified
        Z/K is unspecified
        T/L is unspecified
        E/M is unspecified
        F/N is unspecified
 
can reg
repeat/l=1:2 (set reg/x=1:4//)
!-> REPEAT: L=1
!-> REPEAT: L=2
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err696_2d_time_overlay
! err696_2d_time_overlay.jnl
! ticket 2360: 2-D time overlay plots have never worked.
 
! two different time axes
 
def ax/edge/t=1-jan-1979:1-jan-2016:1/unit=year/t0=1-jan-1979 tax1
def ax/edge/t=1-jan-1988:1-jan-2010:1/unit=year/t0=1-jan-1988 tax2
let t1 = t[gt=tax1]
let t2 = t[gt=tax2]
let yr1 = tax_year(t1,t1)
let yr2 = tax_year(t2,t2)
let f1 = yr1 + 0*z[gz=1:5:1]
let f2 = yr2 + 0*z[gz=2:3:1]
 
can view
 
! a 1-D overlay works correctly
set view ul
plot/step=con yr1
plot/step=con/ov yr2
 
set view ll
 
! 2-D overlay was mis-located
shade/lev=12 f1
shade/ov/pal=grayscale/lev f2
 
ppl shaset reset
set view ur
 
! Check a vertical time axis
let fx1 = yr1 + 0*x[gx=1:5:1]
let fx2 = yr2 + 0*x[gx=2:3:1]
shade/lev=12/title="X-T plot, vertical time axis" fx1
shade/ov/pal=grayscale/lev fx2
 
 
! Different time units
set view lr
def ax/edge/t=1-jan-1988:04-feb-2010:60/unit=day/t0=1-jan-1988 tax2
 
shade/lev=12/title="Underlay units year, Overlay units days" f1
shade/ov/pal=grayscale/lev f2
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err696_singlevec_over
! err696_singlevec_over.jnl
! Ticket 2365: overlay a single vector. If
! /nolab is added it disappears.
 
use gtbc011
vector/k=1/l=1   u,v
let xa = 200
let ya = 10
let ya=10
define axis/unit=degrees_east/x/from_data xax=xa
define axis/unit=degrees_north/y/from_data yax=ya
define grid/x=xax/y=yax xyg
let u1 = 10 + 0*(x[gx=xyg]+y[gy=xyg] )
let v1 = 10 + 0*(x[gx=xyg]+y[gy=xyg] )
! Now I can plot the vector
vec/over/len=10 u1,v1
 
! PPL_XSKIP is 1, the single vector
show sym ppl_vec*skip
PPL_VEC_XSKIP = "1"
PPL_VEC_YSKIP = "1"
 
! Try it with /nolab added
vector/k=1/l=1   u,v
 vec/over/len=10/nolab u1,v1
 
! PPL_XSKIP should still be 1
! (with the bug, it was 4 from the vector underlay plot)
show sym ppl_vec*skip
PPL_VEC_XSKIP = "1"
PPL_VEC_YSKIP = "1"
 
! As an aside, now return PPL_VECLEN for VECTOR/NOLABEL plots.
! previously this wasnt done.
 
use gtbc011
vector/k=3/l=1/nolab  u,v
show symbol ppl_veclen
PPL_VECLEN = "  27.2"
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err696_return_type
! err696_return_type
! See ticket #2367
! incorrect return type when a user var
! uses an expression involving alternative string versions of
! a numeric exernal function
 
! this works, explicitly calling xcat_str
let c = xcat_str({"e","f"},{"g","h"})
let d = c
list d
             VARIABLE : C
             SUBSET   : 4 points (X)
 1   / 1:"e"
 2   / 2:"f"
 3   / 3:"g"
 4   / 4:"h"
 
! returned pointers not strings
let a = xcat({"a","b"},{"c","d"})
let b = a
list b
             VARIABLE : A
             SUBSET   : 4 points (X)
 1   / 1:"a"
 2   / 2:"b"
 3   / 3:"c"
 4   / 4:"d"
 
! Make more levels of variables, mixing xcat_str and xcat.
 
let p = xcat_str({"1","2"},{"3","4"})
let q = p
 
let r = xcat({"5","6"},{"7","8"})
let s = r
 
! previously returned a string/numeric data type mix-up err.
let allcat = xcat(q,s)
list allcat
             VARIABLE : XCAT(Q,S)
             SUBSET   : 8 points (X)
 1   / 1:"1"
 2   / 2:"2"
 3   / 3:"3"
 4   / 4:"4"
 5   / 5:"5"
 6   / 6:"6"
 7   / 7:"7"
 8   / 8:"8"
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err696_hovmuller_mod_fill
! err696_hovmuller_mod_fill.jnl
! 3/7/2016 ACM
! Ticket 2374
! A single color extending across the plot was missing
 
use coads_slice.nc
fill/lin/t=1-jan-0000:31-dec-0001/hlim=1-jan-0000:1-jan-0001/x=180/lev=8 sst
 
 
!GO bn_reset!
!GO err696_axname_noupcase
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err696_repeat_escapes.jnl
! err696_repeat_escapes.jnl
! Ticket 2376 - parsing error with escaped grave-accent syntax
 
let a = "seq 1 3"
sp echo \``a`\`
 !-> sp echo `seq 1 3`
1 2 3
 
! the escapes were removed on parsing the initial
! command rather than keeping them until individual
! commands parsed within the loop
repeat/i=1:2 (sp echo \``a`\`)
!-> REPEAT: I=1
 !-> sp echo `seq 1 3`
1 2 3
!-> REPEAT: I=2
 !-> sp echo `seq 1 3`
1 2 3
 
! nested repeats
repeat/k=1:3 (rep/i=1:2 (sp echo \``a`\`))
!-> REPEAT: K=1
!-> REPEAT: I=1
 !-> sp echo `seq 1 3`
1 2 3
!-> REPEAT: I=2
 !-> sp echo `seq 1 3`
1 2 3
!-> REPEAT: K=2
!-> REPEAT: I=1
 !-> sp echo `seq 1 3`
1 2 3
!-> REPEAT: I=2
 !-> sp echo `seq 1 3`
1 2 3
!-> REPEAT: K=3
!-> REPEAT: I=1
 !-> sp echo `seq 1 3`
1 2 3
!-> REPEAT: I=2
 !-> sp echo `seq 1 3`
1 2 3
 
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err696_red_keylab.jnl
! err696_red_keylab.jnl
! Ticket 2375: outline and labels of color key were
! drawn in red on an overlay.
 
use levitus_climatology
contour/lev=(0) temp
 
! Always label the color key in pen0
fill/over/nolab/key/lev=v,2min temp
 
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err696_poly_over_label
! err696_poly_over_label
! Tiket 2396: incorrect label in the lower
! left on a POLY/OVER with just 2 arguments.
 
use levitus_3d_subset.nc
let allmissing = 0/0 + temp
shade/nolabel/j=1 allmissing
 
! Previously this plot had an incorrect label of ALLMISSING
polygon/palette=gray/ov {120.2,121,121,120.2},{4000,4000,1000,1000}
ppl list labels  ! showed allmissing for lab2 now says cnst
                                                                                
                                                                                
                                                                                

          XPOS       YPOS     HGT   ROT   UNITS
 LAB 1  4.000E+00  3.000E+00 0.200    0  SYSTEM  @ASNo Valid Data
 LINE PT:    0.000E+00 0.000E+00  NO LINE     CENTER JUSTIFY LABEL
 LAB 2 -4.700E-01 -5.500E-01 0.080    0  SYSTEM  @AScnst
 LINE PT:    0.000E+00 0.000E+00  NO LINE     LEFT   JUSTIFY LABEL
 
shade/nolabel/j=1 allmissing
polygon/palette=gray/ov {120.2,121,121,120.2},{4000,4000,1000,1000}, 2
 
ppl list labels  ! shows cnst for lab2
                                                                                
                                                                                
                                                                                

          XPOS       YPOS     HGT   ROT   UNITS
 LAB 1  4.000E+00  3.000E+00 0.200    0  SYSTEM  @ASNo Valid Data
 LINE PT:    0.000E+00 0.000E+00  NO LINE     CENTER JUSTIFY LABEL
 LAB 2 -4.700E-01 -5.500E-01 0.080    0  SYSTEM  @AScnst
 LINE PT:    0.000E+00 0.000E+00  NO LINE     LEFT   JUSTIFY LABEL
 
shade/nolabel/j=1 allmissing
let cvar = 2
polygon/palette=gray/ov {120.2,121,121,120.2},{4000,4000,1000,1000}, cvar
ppl list labels  ! shows cvar for lab2
                                                                                
                                                                                
                                                                                

          XPOS       YPOS     HGT   ROT   UNITS
 LAB 1  4.000E+00  3.000E+00 0.200    0  SYSTEM  @ASNo Valid Data
 LINE PT:    0.000E+00 0.000E+00  NO LINE     CENTER JUSTIFY LABEL
 LAB 2 -4.700E-01 -5.500E-01 0.080    0  SYSTEM  @ASCVAR
 LINE PT:    0.000E+00 0.000E+00  NO LINE     LEFT   JUSTIFY LABEL
 
! color var for 2 rectangles with multiple values
shade/nolabel/j=1 allmissing
let cvar = {2,3}
polygon/ov {120.2,121,121,120.2,,120.2,121,121,120.2},{4000,4000,1000,1000,,800,800,200,200}, cvar
ppl list labels  ! shows cvar for lab2
                                                                                
                                                                                
                                                                                

          XPOS       YPOS     HGT   ROT   UNITS
 LAB 1  4.000E+00  3.000E+00 0.200    0  SYSTEM  @ASNo Valid Data
 LINE PT:    0.000E+00 0.000E+00  NO LINE     CENTER JUSTIFY LABEL
 LAB 2 -4.700E-01 -5.500E-01 0.080    0  SYSTEM  @ASCVAR
 LINE PT:    0.000E+00 0.000E+00  NO LINE     LEFT   JUSTIFY LABEL
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err696_def_ax_f
! err696_def_ax_f.jnl
! See ticket 2380
! *acm* 4/2016
 
! Defining F axis using /F=LO:HI are ok
define axis/f=1-jan-1980:3-jan-1980:1/t0=1-jan-1980/unit=days f_ax
list _f[gf=f_ax]
             VARIABLE : _F
                        axis F_AX
             SUBSET   : 3 points (FORECAST)
 01-JAN-1980 00 / 1:  0.000
 02-JAN-1980 00 / 2:  1.000
 03-JAN-1980 00 / 3:  2.000
define axis/f=1-jan-1980:3-jan-1980/np=3/t0=1-jan-1980/unit=days f_ax
list _f[gf=f_ax]
             VARIABLE : _F
                        axis F_AX
             SUBSET   : 3 points (FORECAST)
 01-JAN-1980 00 / 1:  0.000
 02-JAN-1980 00 / 2:  1.000
 03-JAN-1980 00 / 3:  2.000
 
! But just /F  with a /T0 was putting the axis in the T direction
! Previously listing _F resulted in an error
define axis/f/t0=1-jan-1980/unit=days f_ax = {1,2,3}
list _f[gf=f_ax]
             VARIABLE : _F
                        axis F_AX
             SUBSET   : 3 points (FORECAST)
 02-JAN-1980 00 / 1:  1.000
 03-JAN-1980 00 / 2:  2.000
 04-JAN-1980 00 / 3:  3.000
 
! This came from code allowing the DEFINE to leave off the /F or /T
! If there's a T0, its an F axis. Still allow this; it becomes a T axis.
define axis/t0=1-jan-1980/unit=days aax = {1,2,3}
list _t[gt=aax]
             VARIABLE : T
                        axis AAX
             SUBSET   : 3 points (TIME)
 02-JAN-1980 00 / 1:  1.000
 03-JAN-1980 00 / 2:  2.000
 04-JAN-1980 00 / 3:  3.000
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err696_mode_cal_f
! err696_mode_cal_f.jnl
! ticket 2399 MODE CALENDAR and F calendar axes
! The calendar setting should apply to T and F axes
 
show mode calendar
      MODE            STATE        ARGUMENT
      CALENDAR         SET         minutes
 
def ax/edges/t=1-jan-2016:1-mar-2016:1/unit=day/t0=1-jan-2016 t_axis
def ax/edges/f=1-jan-2016:1-mar-2016:1/unit=day/t0=1-jan-2016 f_axis
let a = _t[gt=t_axis] * {1,2,3}
let b = _f[gf=f_axis] * {1,2,3}
can view
set view upper; plot/l=1 a; sh sym lab($labnum_t)
 !-> sh sym lab1
LAB1 = "TIME : 01-JAN-2016 12:00"
set view lower; plot/n=1 b; sh sym lab($labnum_f)
 !-> sh sym lab1
LAB1 = "FORECAST : 01-JAN-2016 12:00"
 
set mode calendar:days
can view
set view upper; plot/l=1 a; sh sym lab($labnum_t)
 !-> sh sym lab1
LAB1 = "TIME : 01-JAN-2016"
set view lower; plot/n=1 b; sh sym lab($labnum_f)
 !-> sh sym lab1
LAB1 = "FORECAST : 01-JAN-2016"
 
set mode/last calendar
cancel mode calendar
can view
set view upper; plot/l=1 a; sh sym lab($labnum_t)
 !-> sh sym lab1
LAB1 = "T (DAY) : 0.5"
set view lower; plot/n=1 b; sh sym lab($labnum_f)
 !-> sh sym lab1
LAB1 = "F (DAY) : 0.5"
 
set mode/last calendar
show mode calendar
      MODE            STATE        ARGUMENT
      CALENDAR         SET         minutes
 
! If they are not calendar axes, it's all fine, just not
! labeled with dates
 
def ax/edges/t=1:40:1/unit=day t_axis
def ax/edges/f=1:40:1/unit=day f_axis
 
let a = _t[gt=t_axis] * {1,2,3}
let b = _f[gf=f_axis] * {1,2,3}
can view
set view upper; plot/l=1 a; sh sym lab($labnum_t)
 !-> sh sym lab1
LAB1 = "T (DAY) : 1.5"
set view lower; plot/n=1 b; sh sym lab($labnum_f)
 !-> sh sym lab1
LAB1 = "F (DAY) : 1.5"
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err696_def_ax_edges
! err696_def_ax_edges
! See ticket 2400
! Incorrect coordinates when using /EDGES
! Also incorrectly marked axes as irregular
 
let edges = x[gx=0:360:20]
 
! Previuosly these axes were marked as irregular, but with correct coordinates
def ax/edge/x xax = edges[i=1:17]; sh axis xax
 name       axis              # pts   start                end
 XAX       X                   16 r   10                   310
   Axis span (to cell edges) = 320
def ax/edge/x xax = x[gx=0:360:20]; sh axis xax
 name       axis              # pts   start                end
 XAX       X                   18 r   10                   350
   Axis span (to cell edges) = 360
 
! This axis incorrectly showed coordinates starting at x=20.
! It was found to be regular but start pt incorrect
def ax/edge/x xax = x[gx=20:320:20]; sh axis xax; list x[gx=xax]
 name       axis              # pts   start                end
 XAX       X                   15 r   30                   310
   Axis span (to cell edges) = 300
             VARIABLE : X
                        axis XAX
             SUBSET   : 15 points (X)
 30    /  1:   30.0
 50    /  2:   50.0
 70    /  3:   70.0
 90    /  4:   90.0
 110   /  5:  110.0
 130   /  6:  130.0
 150   /  7:  150.0
 170   /  8:  170.0
 190   /  9:  190.0
 210   / 10:  210.0
 230   / 11:  230.0
 250   / 12:  250.0
 270   / 13:  270.0
 290   / 14:  290.0
 310   / 15:  310.0
 
! This was previously irregular, with correct coordinates
def ax/edge/x xax = x[gx=20:320:20]; sh axis xax; list x[gx=xax]
 name       axis              # pts   start                end
 XAX       X                   15 r   30                   310
   Axis span (to cell edges) = 300
             VARIABLE : X
                        axis XAX
             SUBSET   : 15 points (X)
 30    /  1:   30.0
 50    /  2:   50.0
 70    /  3:   70.0
 90    /  4:   90.0
 110   /  5:  110.0
 130   /  6:  130.0
 150   /  7:  150.0
 170   /  8:  170.0
 190   /  9:  190.0
 210   / 10:  210.0
 230   / 11:  230.0
 250   / 12:  250.0
 270   / 13:  270.0
 290   / 14:  290.0
 310   / 15:  310.0
 
! Actually irregular edge locations
let edges = {0,10,20,30,60,90,150,200,280,360}
def ax/edge/x xax = edges; sh axis xax; list x[gx=xax]
 name       axis              # pts   start                end
 XAX       X                    9 i   5                    320
   Axis span (to cell edges) = 360
             VARIABLE : X
                        axis XAX
             SUBSET   : 9 points (X)
 5     / 1:    5.0
 15    / 2:   15.0
 25    / 3:   25.0
 45    / 4:   45.0
 75    / 5:   75.0
 120   / 6:  120.0
 175   / 7:  175.0
 240   / 8:  240.0
 320   / 9:  320.0
 
def ax/edge/x xax = edges[i=1:8]; sh axis xax; list x[gx=xax]
 name       axis              # pts   start                end
 XAX       X                    7 i   5                    175
   Axis span (to cell edges) = 200
             VARIABLE : X
                        axis XAX
             SUBSET   : 7 points (X)
 5     / 1:    5.0
 15    / 2:   15.0
 25    / 3:   25.0
 45    / 4:   45.0
 75    / 5:   75.0
 120   / 6:  120.0
 175   / 7:  175.0
 
! This one is regular
def ax/edge/x xax = edges[i=1:4]; sh axis xax; list x[gx=xax]
 name       axis              # pts   start                end
 XAX       X                    3 r   5                    25
   Axis span (to cell edges) = 30
             VARIABLE : X
                        axis XAX
             SUBSET   : 3 points (X)
 5    / 1:   5.00
 15   / 2:  15.00
 25   / 3:  25.00
 
 
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err696_write_no_dim
! err696_write_no_dim.jnl
! ticket 2241: save a subset of a variable whose grid
! contains dimensions that are not coordinate variables
 
use nodim
sh dat
     currently SET data sets:
    1> ./data/nodim.nc  (default)
 name     title                             I         J         K         L         M         N
 EXPOCODE expocode                         ...       ...       ...       ...       1:1       ...
 NUM_OBS  Number of observations           ...       ...       ...       ...       1:1       ...
 TEMP     sea surface temperature          1:51      ...       ...       ...       ...       ...
 
 
! previously this gave an error
save/clobber/file=a.nc/i=30:35  expocode, num_obs, temp
 
! file has a coordinate variable with the subset in the OBS dimension
sp ncdump -c a.nc
netcdf a {
dimensions:
	TRAJECTORY = 1 ;
	string_length = 64 ;
	OBS30_35 = 6 ;
variables:
	char EXPOCODE(TRAJECTORY, string_length) ;
		EXPOCODE:long_name = "expocode" ;
		EXPOCODE:history = "From nodim" ;
	int NUM_OBS(TRAJECTORY) ;
		NUM_OBS:missing_value = -99 ;
		NUM_OBS:_FillValue = -99 ;
		NUM_OBS:long_name = "Number of observations" ;
		NUM_OBS:history = "From /home/data/socat/socatV3/11SS/11SS20140225.nc" ;
	double OBS30_35(OBS30_35) ;
		OBS30_35:point_spacing = "even" ;
		OBS30_35:axis = "X" ;
	double TEMP(OBS30_35) ;
		TEMP:missing_value = -1.e+34 ;
		TEMP:_FillValue = -1.e+34 ;
		TEMP:units = "degrees C" ;
		TEMP:long_name = "sea surface temperature" ;
		TEMP:history = "From /home/data/socat/socatV3/11SS/11SS20140225.nc" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
data:

 OBS30_35 = 30, 31, 32, 33, 34, 35 ;
}
 
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err696_mod_sub_fln
! err696_mod_sub_fln.jnl
! Ticket 2366, @FLN on a modulo subspan axis
! smears results across what should not be filled in.
 
def ax/x=0:180:10/unit=degree_e xax
let xx = x[gx=xax]
 
let b = IF xx GE 50 OR xx EQ 20 THEN xx
save/clob/file=a.nc b
can var/all
 
use a
 
! Do not get data from across the modulo void point at 90W
list/x=-180:720 b, b[x=@fln]
             DATA SET: ./a.nc
             LONGITUDE: 180E(-180) to 0E(720)
 Column  1: B is IF XX GE 50 OR XX EQ 20 THEN XX
 Column  2: B[X=@FLN:1] is IF XX GE 50 OR XX EQ 20 THEN XX (linear-filled by 1 pts on X)
                  B     B
180E    / -1:  180.0  180.0
90W     /  0:   ....   ....
0E      /  1:   ....   ....
10E     /  2:   ....   ....
20E     /  3:   20.0   20.0
30E     /  4:   ....   30.0
40E     /  5:   ....   40.0
50E     /  6:   50.0   50.0
60E     /  7:   60.0   60.0
70E     /  8:   70.0   70.0
80E     /  9:   80.0   80.0
90E     / 10:   90.0   90.0
100E    / 11:  100.0  100.0
110E    / 12:  110.0  110.0
120E    / 13:  120.0  120.0
130E    / 14:  130.0  130.0
140E    / 15:  140.0  140.0
150E    / 16:  150.0  150.0
160E    / 17:  160.0  160.0
170E    / 18:  170.0  170.0
180E    / 19:  180.0  180.0
90W     / 20:   ....   ....
0E(360) / 21:   ....   ....
10E     / 22:   ....   ....
20E     / 23:   20.0   20.0
30E     / 24:   ....   30.0
40E     / 25:   ....   40.0
50E     / 26:   50.0   50.0
60E     / 27:   60.0   60.0
70E     / 28:   70.0   70.0
80E     / 29:   80.0   80.0
90E     / 30:   90.0   90.0
100E    / 31:  100.0  100.0
110E    / 32:  110.0  110.0
120E    / 33:  120.0  120.0
130E    / 34:  130.0  130.0
140E    / 35:  140.0  140.0
150E    / 36:  150.0  150.0
160E    / 37:  160.0  160.0
170E    / 38:  170.0  170.0
180E    / 39:  180.0  180.0
90W     / 40:   ....   ....
0E(720) / 41:   ....   ....
 
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err696_subspan_transforms
! err696_subspan_transforms.jnl
! See ticket 2364.  Results previously
! put results at the modulo void point.
 
def ax/x=0:180:20/unit=degrees_e xaxis
let a = x[gx=xaxis]
save/clob/file=a.nc a
can var a; can ax xaxis; use a.nc
 list/x=0:720 a, a[x=@ddc]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is X[GX=XAXIS]
 Column  2: A[X=@DDC] is X[GX=XAXIS] (centered derivative on X)
                  A       A
0E      /  1:    0.0       ....
20E     /  2:   20.0  8.993E-06
40E     /  3:   40.0  8.993E-06
60E     /  4:   60.0  8.993E-06
80E     /  5:   80.0  8.993E-06
100E    /  6:  100.0  8.993E-06
120E    /  7:  120.0  8.993E-06
140E    /  8:  140.0  8.993E-06
160E    /  9:  160.0  8.993E-06
180E    / 10:  180.0       ....
90W     / 11:   ....       ....
0E(360) / 12:    0.0       ....
20E     / 13:   20.0  8.993E-06
40E     / 14:   40.0  8.993E-06
60E     / 15:   60.0  8.993E-06
80E     / 16:   80.0  8.993E-06
100E    / 17:  100.0  8.993E-06
120E    / 18:  120.0  8.993E-06
140E    / 19:  140.0  8.993E-06
160E    / 20:  160.0  8.993E-06
180E    / 21:  180.0       ....
90W     / 22:   ....       ....
0E(720) / 23:    0.0       ....
 list/x=0:720 a, a[x=@ddf]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is X[GX=XAXIS]
 Column  2: A[X=@DDF] is X[GX=XAXIS] (forward derivative on X)
                  A       A
0E      /  1:    0.0  8.993E-06
20E     /  2:   20.0  8.993E-06
40E     /  3:   40.0  8.993E-06
60E     /  4:   60.0  8.993E-06
80E     /  5:   80.0  8.993E-06
100E    /  6:  100.0  8.993E-06
120E    /  7:  120.0  8.993E-06
140E    /  8:  140.0  8.993E-06
160E    /  9:  160.0  8.993E-06
180E    / 10:  180.0       ....
90W     / 11:   ....       ....
0E(360) / 12:    0.0  8.993E-06
20E     / 13:   20.0  8.993E-06
40E     / 14:   40.0  8.993E-06
60E     / 15:   60.0  8.993E-06
80E     / 16:   80.0  8.993E-06
100E    / 17:  100.0  8.993E-06
120E    / 18:  120.0  8.993E-06
140E    / 19:  140.0  8.993E-06
160E    / 20:  160.0  8.993E-06
180E    / 21:  180.0       ....
90W     / 22:   ....       ....
0E(720) / 23:    0.0  8.993E-06
 list/x=0:720 a, a[x=@ddb]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is X[GX=XAXIS]
 Column  2: A[X=@DDB] is X[GX=XAXIS] (backwards derivative on X)
                  A       A
0E      /  1:    0.0       ....
20E     /  2:   20.0  8.993E-06
40E     /  3:   40.0  8.993E-06
60E     /  4:   60.0  8.993E-06
80E     /  5:   80.0  8.993E-06
100E    /  6:  100.0  8.993E-06
120E    /  7:  120.0  8.993E-06
140E    /  8:  140.0  8.993E-06
160E    /  9:  160.0  8.993E-06
180E    / 10:  180.0  8.993E-06
90W     / 11:   ....       ....
0E(360) / 12:    0.0       ....
20E     / 13:   20.0  8.993E-06
40E     / 14:   40.0  8.993E-06
60E     / 15:   60.0  8.993E-06
80E     / 16:   80.0  8.993E-06
100E    / 17:  100.0  8.993E-06
120E    / 18:  120.0  8.993E-06
140E    / 19:  140.0  8.993E-06
160E    / 20:  160.0  8.993E-06
180E    / 21:  180.0  8.993E-06
90W     / 22:   ....       ....
0E(720) / 23:    0.0       ....
 list/x=0:720 a, a[x=@shf]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is X[GX=XAXIS]
 Column  2: A[X=@SHF:1] is X[GX=XAXIS] (shifted by 1 pts on X)
                  A     A
0E      /  1:    0.0   20.0
20E     /  2:   20.0   40.0
40E     /  3:   40.0   60.0
60E     /  4:   60.0   80.0
80E     /  5:   80.0  100.0
100E    /  6:  100.0  120.0
120E    /  7:  120.0  140.0
140E    /  8:  140.0  160.0
160E    /  9:  160.0  180.0
180E    / 10:  180.0   ....
90W     / 11:   ....   ....
0E(360) / 12:    0.0   20.0
20E     / 13:   20.0   40.0
40E     / 14:   40.0   60.0
60E     / 15:   60.0   80.0
80E     / 16:   80.0  100.0
100E    / 17:  100.0  120.0
120E    / 18:  120.0  140.0
140E    / 19:  140.0  160.0
160E    / 20:  160.0  180.0
180E    / 21:  180.0   ....
90W     / 22:   ....   ....
0E(720) / 23:    0.0   20.0
 list/x=0:720 a, a[x=@sbx]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is X[GX=XAXIS]
 Column  2: A[X=@SBX:3] is X[GX=XAXIS] (box smoothed by 3 pts on X)
                  A     A
0E      /  1:    0.0   ....
20E     /  2:   20.0   20.0
40E     /  3:   40.0   40.0
60E     /  4:   60.0   60.0
80E     /  5:   80.0   80.0
100E    /  6:  100.0  100.0
120E    /  7:  120.0  120.0
140E    /  8:  140.0  140.0
160E    /  9:  160.0  160.0
180E    / 10:  180.0   ....
90W     / 11:   ....   ....
0E(360) / 12:    0.0   ....
20E     / 13:   20.0   20.0
40E     / 14:   40.0   40.0
60E     / 15:   60.0   60.0
80E     / 16:   80.0   80.0
100E    / 17:  100.0  100.0
120E    / 18:  120.0  120.0
140E    / 19:  140.0  140.0
160E    / 20:  160.0  160.0
180E    / 21:  180.0   ....
90W     / 22:   ....   ....
0E(720) / 23:    0.0   ....
 list/x=0:720 a, a[x=@sbn]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is X[GX=XAXIS]
 Column  2: A[X=@SBN:3] is X[GX=XAXIS] (binomial smoothed by 3 pts on X)
                  A     A
0E      /  1:    0.0   ....
20E     /  2:   20.0   20.0
40E     /  3:   40.0   40.0
60E     /  4:   60.0   60.0
80E     /  5:   80.0   80.0
100E    /  6:  100.0  100.0
120E    /  7:  120.0  120.0
140E    /  8:  140.0  140.0
160E    /  9:  160.0  160.0
180E    / 10:  180.0   ....
90W     / 11:   ....   ....
0E(360) / 12:    0.0   ....
20E     / 13:   20.0   20.0
40E     / 14:   40.0   40.0
60E     / 15:   60.0   60.0
80E     / 16:   80.0   80.0
100E    / 17:  100.0  100.0
120E    / 18:  120.0  120.0
140E    / 19:  140.0  140.0
160E    / 20:  160.0  160.0
180E    / 21:  180.0   ....
90W     / 22:   ....   ....
0E(720) / 23:    0.0   ....
 list/x=0:720 a, a[x=@swl]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is X[GX=XAXIS]
 Column  2: A[X=@SWL:3] is X[GX=XAXIS] (Welch smoothed by 3 pts on X)
                  A     A
0E      /  1:    0.0   ....
20E     /  2:   20.0   20.0
40E     /  3:   40.0   40.0
60E     /  4:   60.0   60.0
80E     /  5:   80.0   80.0
100E    /  6:  100.0  100.0
120E    /  7:  120.0  120.0
140E    /  8:  140.0  140.0
160E    /  9:  160.0  160.0
180E    / 10:  180.0   ....
90W     / 11:   ....   ....
0E(360) / 12:    0.0   ....
20E     / 13:   20.0   20.0
40E     / 14:   40.0   40.0
60E     / 15:   60.0   60.0
80E     / 16:   80.0   80.0
100E    / 17:  100.0  100.0
120E    / 18:  120.0  120.0
140E    / 19:  140.0  140.0
160E    / 20:  160.0  160.0
180E    / 21:  180.0   ....
90W     / 22:   ....   ....
0E(720) / 23:    0.0   ....
 list/x=0:720 a, a[x=@shn]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is X[GX=XAXIS]
 Column  2: A[X=@SHN:3] is X[GX=XAXIS] (Hanning smoothed by 3 pts on X)
                  A     A
0E      /  1:    0.0   ....
20E     /  2:   20.0   20.0
40E     /  3:   40.0   40.0
60E     /  4:   60.0   60.0
80E     /  5:   80.0   80.0
100E    /  6:  100.0  100.0
120E    /  7:  120.0  120.0
140E    /  8:  140.0  140.0
160E    /  9:  160.0  160.0
180E    / 10:  180.0   ....
90W     / 11:   ....   ....
0E(360) / 12:    0.0   ....
20E     / 13:   20.0   20.0
40E     / 14:   40.0   40.0
60E     / 15:   60.0   60.0
80E     / 16:   80.0   80.0
100E    / 17:  100.0  100.0
120E    / 18:  120.0  120.0
140E    / 19:  140.0  140.0
160E    / 20:  160.0  160.0
180E    / 21:  180.0   ....
90W     / 22:   ....   ....
0E(720) / 23:    0.0   ....
 list/x=0:720 a, a[x=@spz]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is X[GX=XAXIS]
 Column  2: A[X=@SPZ:3] is X[GX=XAXIS] (Parzen smoothed by 3 pts on X)
                  A     A
0E      /  1:    0.0   ....
20E     /  2:   20.0   20.0
40E     /  3:   40.0   40.0
60E     /  4:   60.0   60.0
80E     /  5:   80.0   80.0
100E    /  6:  100.0  100.0
120E    /  7:  120.0  120.0
140E    /  8:  140.0  140.0
160E    /  9:  160.0  160.0
180E    / 10:  180.0   ....
90W     / 11:   ....   ....
0E(360) / 12:    0.0   ....
20E     / 13:   20.0   20.0
40E     / 14:   40.0   40.0
60E     / 15:   60.0   60.0
80E     / 16:   80.0   80.0
100E    / 17:  100.0  100.0
120E    / 18:  120.0  120.0
140E    / 19:  140.0  140.0
160E    / 20:  160.0  160.0
180E    / 21:  180.0   ....
90W     / 22:   ....   ....
0E(720) / 23:    0.0   ....
 list/x=0:720 a, a[x=@med]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is X[GX=XAXIS]
 Column  2: A[X=@MED:3] is X[GX=XAXIS] (median smoothed by 3 pts on X)
                  A     A
0E      /  1:    0.0   20.0
20E     /  2:   20.0   20.0
40E     /  3:   40.0   40.0
60E     /  4:   60.0   60.0
80E     /  5:   80.0   80.0
100E    /  6:  100.0  100.0
120E    /  7:  120.0  120.0
140E    /  8:  140.0  140.0
160E    /  9:  160.0  160.0
180E    / 10:  180.0  180.0
90W     / 11:   ....   ....
0E(360) / 12:    0.0   20.0
20E     / 13:   20.0   20.0
40E     / 14:   40.0   40.0
60E     / 15:   60.0   60.0
80E     / 16:   80.0   80.0
100E    / 17:  100.0  100.0
120E    / 18:  120.0  120.0
140E    / 19:  140.0  140.0
160E    / 20:  160.0  160.0
180E    / 21:  180.0  180.0
90W     / 22:   ....   ....
0E(720) / 23:    0.0   20.0
 list/x=0:720 a, a[x=@smx]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is X[GX=XAXIS]
 Column  2: A[X=@SMX:3] is X[GX=XAXIS] (maximum smoothed by 3 pts on X)
                  A     A
0E      /  1:    0.0   20.0
20E     /  2:   20.0   40.0
40E     /  3:   40.0   60.0
60E     /  4:   60.0   80.0
80E     /  5:   80.0  100.0
100E    /  6:  100.0  120.0
120E    /  7:  120.0  140.0
140E    /  8:  140.0  160.0
160E    /  9:  160.0  180.0
180E    / 10:  180.0  180.0
90W     / 11:   ....   ....
0E(360) / 12:    0.0   20.0
20E     / 13:   20.0   40.0
40E     / 14:   40.0   60.0
60E     / 15:   60.0   80.0
80E     / 16:   80.0  100.0
100E    / 17:  100.0  120.0
120E    / 18:  120.0  140.0
140E    / 19:  140.0  160.0
160E    / 20:  160.0  180.0
180E    / 21:  180.0  180.0
90W     / 22:   ....   ....
0E(720) / 23:    0.0   20.0
 list/x=0:720 a, a[x=@smn]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is X[GX=XAXIS]
 Column  2: A[X=@SMN:3] is X[GX=XAXIS] (minimum smoothed by 3 pts on X)
                  A     A
0E      /  1:    0.0    0.0
20E     /  2:   20.0    0.0
40E     /  3:   40.0   20.0
60E     /  4:   60.0   40.0
80E     /  5:   80.0   60.0
100E    /  6:  100.0   80.0
120E    /  7:  120.0  100.0
140E    /  8:  140.0  120.0
160E    /  9:  160.0  140.0
180E    / 10:  180.0  160.0
90W     / 11:   ....   ....
0E(360) / 12:    0.0    0.0
20E     / 13:   20.0    0.0
40E     / 14:   40.0   20.0
60E     / 15:   60.0   40.0
80E     / 16:   80.0   60.0
100E    / 17:  100.0   80.0
120E    / 18:  120.0  100.0
140E    / 19:  140.0  120.0
160E    / 20:  160.0  140.0
180E    / 21:  180.0  160.0
90W     / 22:   ....   ....
0E(720) / 23:    0.0    0.0
 list/x=0:720 a, a[x=@wgt]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is X[GX=XAXIS]
 Column  2: A[X=@WGT] is X[GX=XAXIS] (weights for avg,int on X)
                  A      A
0E      /  1:    0.0  2223898.
20E     /  2:   20.0  2223898.
40E     /  3:   40.0  2223898.
60E     /  4:   60.0  2223898.
80E     /  5:   80.0  2223898.
100E    /  6:  100.0  2223898.
120E    /  7:  120.0  2223898.
140E    /  8:  140.0  2223898.
160E    /  9:  160.0  2223898.
180E    / 10:  180.0  2223898.
90W     / 11:   ....      ....
0E(360) / 12:    0.0  2223898.
20E     / 13:   20.0  2223898.
40E     / 14:   40.0  2223898.
60E     / 15:   60.0  2223898.
80E     / 16:   80.0  2223898.
100E    / 17:  100.0  2223898.
120E    / 18:  120.0  2223898.
140E    / 19:  140.0  2223898.
160E    / 20:  160.0  2223898.
180E    / 21:  180.0  2223898.
90W     / 22:   ....      ....
0E(720) / 23:    0.0  2223898.
 list/x=0:720 a, a[x=@spx]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is X[GX=XAXIS]
 Column  2: A[X=@SPX:3] is X[GX=XAXIS] (box smooth w/missing by 3 pts on X)
                  A     A
0E      /  1:    0.0   ....
20E     /  2:   20.0   20.0
40E     /  3:   40.0   40.0
60E     /  4:   60.0   60.0
80E     /  5:   80.0   80.0
100E    /  6:  100.0  100.0
120E    /  7:  120.0  120.0
140E    /  8:  140.0  140.0
160E    /  9:  160.0  160.0
180E    / 10:  180.0  170.0
90W     / 11:   ....   ....
0E(360) / 12:    0.0   ....
20E     / 13:   20.0   20.0
40E     / 14:   40.0   40.0
60E     / 15:   60.0   60.0
80E     / 16:   80.0   80.0
100E    / 17:  100.0  100.0
120E    / 18:  120.0  120.0
140E    / 19:  140.0  140.0
160E    / 20:  160.0  160.0
180E    / 21:  180.0  170.0
90W     / 22:   ....   ....
0E(720) / 23:    0.0   ....
 
! Note that Running Sum and Indefinite Integral, Event mask
! now restart in each branch.
 list/x=0:720 a, a[x=@rsu]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is X[GX=XAXIS]
 Column  2: A[X=@RSU] is X[GX=XAXIS] (running sum on X)
                  A     A
0E      /  1:    0.0    0.0
20E     /  2:   20.0   20.0
40E     /  3:   40.0   60.0
60E     /  4:   60.0  120.0
80E     /  5:   80.0  200.0
100E    /  6:  100.0  300.0
120E    /  7:  120.0  420.0
140E    /  8:  140.0  560.0
160E    /  9:  160.0  720.0
180E    / 10:  180.0  900.0
90W     / 11:   ....   ....
0E(360) / 12:    0.0    0.0
20E     / 13:   20.0   20.0
40E     / 14:   40.0   60.0
60E     / 15:   60.0  120.0
80E     / 16:   80.0  200.0
100E    / 17:  100.0  300.0
120E    / 18:  120.0  420.0
140E    / 19:  140.0  560.0
160E    / 20:  160.0  720.0
180E    / 21:  180.0  900.0
90W     / 22:   ....   ....
0E(720) / 23:    0.0    0.0
 list/x=0:720 a, a[x=@iin]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is X[GX=XAXIS]
 Column  2: A[X=@IIN] is X[GX=XAXIS] (indef. integ. on X)
                  A       A
0E      /  1:    0.0  0.000E+00
20E     /  2:   20.0  4.448E+07
40E     /  3:   40.0  1.334E+08
60E     /  4:   60.0  2.669E+08
80E     /  5:   80.0  4.448E+08
100E    /  6:  100.0  6.672E+08
120E    /  7:  120.0  9.340E+08
140E    /  8:  140.0  1.245E+09
160E    /  9:  160.0  1.601E+09
180E    / 10:  180.0  2.002E+09
90W     / 11:   ....       ....
0E(360) / 12:    0.0  0.000E+00
20E     / 13:   20.0  4.448E+07
40E     / 14:   40.0  1.334E+08
60E     / 15:   60.0  2.669E+08
80E     / 16:   80.0  4.448E+08
100E    / 17:  100.0  6.672E+08
120E    / 18:  120.0  9.340E+08
140E    / 19:  140.0  1.245E+09
160E    / 20:  160.0  1.601E+09
180E    / 21:  180.0  2.002E+09
90W     / 22:   ....       ....
0E(720) / 23:    0.0  0.000E+00
 list/x=0:720 a, a[x=@evnt:80]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is X[GX=XAXIS]
 Column  2: A[X=@EVN:80] is X[GX=XAXIS] (event mask at 80 on X)
                  A     A
0E      /  1:    0.0  0.000
20E     /  2:   20.0  0.000
40E     /  3:   40.0  0.000
60E     /  4:   60.0  0.000
80E     /  5:   80.0  1.000
100E    /  6:  100.0  1.000
120E    /  7:  120.0  1.000
140E    /  8:  140.0  1.000
160E    /  9:  160.0  1.000
180E    / 10:  180.0  1.000
90W     / 11:   ....   ....
0E(360) / 12:    0.0  0.000
20E     / 13:   20.0  0.000
40E     / 14:   40.0  0.000
60E     / 15:   60.0  0.000
80E     / 16:   80.0  1.000
100E    / 17:  100.0  1.000
120E    / 18:  120.0  1.000
140E    / 19:  140.0  1.000
160E    / 20:  160.0  1.000
180E    / 21:  180.0  1.000
90W     / 22:   ....   ....
0E(720) / 23:    0.0  0.000
 
 
! Transforms that deal with gaps
can dat/all
def ax/x=0:180:10/unit=degrees_e xaxis
let a = if x[gx=xaxis] gt 40 and x[gx=xaxis] le 150 then x[gx=xaxis]
save/clob/file=a.nc a
can var a; can ax xaxis; use a.nc
 list/x=0:720 a, a[x=@fav]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is IF X[GX=XAXIS] GT 40 AND X[GX=XAXIS] LE 150 THEN X[GX=XAXIS]
 Column  2: A[X=@FAV:3] is IF X[GX=XAXIS] GT 40 AND X[GX=XAXIS] LE 150 THEN X[GX=XAXIS] (ave-filled by 3 pts on X)
                  A     A
0E      /  1:   ....   ....
10E     /  2:   ....   ....
20E     /  3:   ....   ....
30E     /  4:   ....   ....
40E     /  5:   ....   50.0
50E     /  6:   50.0   50.0
60E     /  7:   60.0   60.0
70E     /  8:   70.0   70.0
80E     /  9:   80.0   80.0
90E     / 10:   90.0   90.0
100E    / 11:  100.0  100.0
110E    / 12:  110.0  110.0
120E    / 13:  120.0  120.0
130E    / 14:  130.0  130.0
140E    / 15:  140.0  140.0
150E    / 16:  150.0  150.0
160E    / 17:   ....  150.0
170E    / 18:   ....   ....
180E    / 19:   ....   ....
90W     / 20:   ....   ....
0E(360) / 21:   ....   ....
10E     / 22:   ....   ....
20E     / 23:   ....   ....
30E     / 24:   ....   ....
40E     / 25:   ....   50.0
50E     / 26:   50.0   50.0
60E     / 27:   60.0   60.0
70E     / 28:   70.0   70.0
80E     / 29:   80.0   80.0
90E     / 30:   90.0   90.0
100E    / 31:  100.0  100.0
110E    / 32:  110.0  110.0
120E    / 33:  120.0  120.0
130E    / 34:  130.0  130.0
140E    / 35:  140.0  140.0
150E    / 36:  150.0  150.0
160E    / 37:   ....  150.0
170E    / 38:   ....   ....
180E    / 39:   ....   ....
90W     / 40:   ....   ....
0E(720) / 41:   ....   ....
 list/x=0:720 a, a[x=@fnr]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is IF X[GX=XAXIS] GT 40 AND X[GX=XAXIS] LE 150 THEN X[GX=XAXIS]
 Column  2: A[X=@FNR:1] is IF X[GX=XAXIS] GT 40 AND X[GX=XAXIS] LE 150 THEN X[GX=XAXIS] (nearest-filled by 1 pts on X)
                  A     A
0E      /  1:   ....   50.0
10E     /  2:   ....   50.0
20E     /  3:   ....   50.0
30E     /  4:   ....   50.0
40E     /  5:   ....   50.0
50E     /  6:   50.0   50.0
60E     /  7:   60.0   60.0
70E     /  8:   70.0   70.0
80E     /  9:   80.0   80.0
90E     / 10:   90.0   90.0
100E    / 11:  100.0  100.0
110E    / 12:  110.0  110.0
120E    / 13:  120.0  120.0
130E    / 14:  130.0  130.0
140E    / 15:  140.0  140.0
150E    / 16:  150.0  150.0
160E    / 17:   ....  150.0
170E    / 18:   ....  150.0
180E    / 19:   ....  150.0
90W     / 20:   ....   ....
0E(360) / 21:   ....   50.0
10E     / 22:   ....   50.0
20E     / 23:   ....   50.0
30E     / 24:   ....   50.0
40E     / 25:   ....   50.0
50E     / 26:   50.0   50.0
60E     / 27:   60.0   60.0
70E     / 28:   70.0   70.0
80E     / 29:   80.0   80.0
90E     / 30:   90.0   90.0
100E    / 31:  100.0  100.0
110E    / 32:  110.0  110.0
120E    / 33:  120.0  120.0
130E    / 34:  130.0  130.0
140E    / 35:  140.0  140.0
150E    / 36:  150.0  150.0
160E    / 37:   ....  150.0
170E    / 38:   ....  150.0
180E    / 39:   ....  150.0
90W     / 40:   ....   ....
0E(720) / 41:   ....   50.0
 list/x=0:720 a, a[x=@cia]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is IF X[GX=XAXIS] GT 40 AND X[GX=XAXIS] LE 150 THEN X[GX=XAXIS]
 Column  2: A[X=@CIA:1] is IF X[GX=XAXIS] GT 40 AND X[GX=XAXIS] LE 150 THEN X[GX=XAXIS] (closest index above on X)
                  A     A
0E      /  1:   ....  5.000
10E     /  2:   ....  4.000
20E     /  3:   ....  3.000
30E     /  4:   ....  2.000
40E     /  5:   ....  1.000
50E     /  6:   50.0  0.000
60E     /  7:   60.0  0.000
70E     /  8:   70.0  0.000
80E     /  9:   80.0  0.000
90E     / 10:   90.0  0.000
100E    / 11:  100.0  0.000
110E    / 12:  110.0  0.000
120E    / 13:  120.0  0.000
130E    / 14:  130.0  0.000
140E    / 15:  140.0  0.000
150E    / 16:  150.0  0.000
160E    / 17:   ....   ....
170E    / 18:   ....   ....
180E    / 19:   ....   ....
90W     / 20:   ....   ....
0E(360) / 21:   ....  5.000
10E     / 22:   ....  4.000
20E     / 23:   ....  3.000
30E     / 24:   ....  2.000
40E     / 25:   ....  1.000
50E     / 26:   50.0  0.000
60E     / 27:   60.0  0.000
70E     / 28:   70.0  0.000
80E     / 29:   80.0  0.000
90E     / 30:   90.0  0.000
100E    / 31:  100.0  0.000
110E    / 32:  110.0  0.000
120E    / 33:  120.0  0.000
130E    / 34:  130.0  0.000
140E    / 35:  140.0  0.000
150E    / 36:  150.0  0.000
160E    / 37:   ....   ....
170E    / 38:   ....   ....
180E    / 39:   ....   ....
90W     / 40:   ....   ....
0E(720) / 41:   ....  5.000
 list/x=0:720 a, a[x=@cib]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is IF X[GX=XAXIS] GT 40 AND X[GX=XAXIS] LE 150 THEN X[GX=XAXIS]
 Column  2: A[X=@CIB:1] is IF X[GX=XAXIS] GT 40 AND X[GX=XAXIS] LE 150 THEN X[GX=XAXIS] (closest index below on X)
                  A     A
0E      /  1:   ....   ....
10E     /  2:   ....   ....
20E     /  3:   ....   ....
30E     /  4:   ....   ....
40E     /  5:   ....   ....
50E     /  6:   50.0  0.000
60E     /  7:   60.0  0.000
70E     /  8:   70.0  0.000
80E     /  9:   80.0  0.000
90E     / 10:   90.0  0.000
100E    / 11:  100.0  0.000
110E    / 12:  110.0  0.000
120E    / 13:  120.0  0.000
130E    / 14:  130.0  0.000
140E    / 15:  140.0  0.000
150E    / 16:  150.0  0.000
160E    / 17:   ....  1.000
170E    / 18:   ....  2.000
180E    / 19:   ....  3.000
90W     / 20:   ....   ....
0E(360) / 21:   ....   ....
10E     / 22:   ....   ....
20E     / 23:   ....   ....
30E     / 24:   ....   ....
40E     / 25:   ....   ....
50E     / 26:   50.0  0.000
60E     / 27:   60.0  0.000
70E     / 28:   70.0  0.000
80E     / 29:   80.0  0.000
90E     / 30:   90.0  0.000
100E    / 31:  100.0  0.000
110E    / 32:  110.0  0.000
120E    / 33:  120.0  0.000
130E    / 34:  130.0  0.000
140E    / 35:  140.0  0.000
150E    / 36:  150.0  0.000
160E    / 37:   ....  1.000
170E    / 38:   ....  2.000
180E    / 39:   ....  3.000
90W     / 40:   ....   ....
0E(720) / 41:   ....   ....
 list/x=0:720 a, a[x=@cda]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is IF X[GX=XAXIS] GT 40 AND X[GX=XAXIS] LE 150 THEN X[GX=XAXIS]
 Column  2: A[X=@CDA:1] is IF X[GX=XAXIS] GT 40 AND X[GX=XAXIS] LE 150 THEN X[GX=XAXIS] (closest dist above on X)
                  A     A
0E      /  1:   ....  50.00
10E     /  2:   ....  40.00
20E     /  3:   ....  30.00
30E     /  4:   ....  20.00
40E     /  5:   ....  10.00
50E     /  6:   50.0   0.00
60E     /  7:   60.0   0.00
70E     /  8:   70.0   0.00
80E     /  9:   80.0   0.00
90E     / 10:   90.0   0.00
100E    / 11:  100.0   0.00
110E    / 12:  110.0   0.00
120E    / 13:  120.0   0.00
130E    / 14:  130.0   0.00
140E    / 15:  140.0   0.00
150E    / 16:  150.0   0.00
160E    / 17:   ....   ....
170E    / 18:   ....   ....
180E    / 19:   ....   ....
90W     / 20:   ....   ....
0E(360) / 21:   ....  50.00
10E     / 22:   ....  40.00
20E     / 23:   ....  30.00
30E     / 24:   ....  20.00
40E     / 25:   ....  10.00
50E     / 26:   50.0   0.00
60E     / 27:   60.0   0.00
70E     / 28:   70.0   0.00
80E     / 29:   80.0   0.00
90E     / 30:   90.0   0.00
100E    / 31:  100.0   0.00
110E    / 32:  110.0   0.00
120E    / 33:  120.0   0.00
130E    / 34:  130.0   0.00
140E    / 35:  140.0   0.00
150E    / 36:  150.0   0.00
160E    / 37:   ....   ....
170E    / 38:   ....   ....
180E    / 39:   ....   ....
90W     / 40:   ....   ....
0E(720) / 41:   ....  50.00
 list/x=0:720 a, a[x=@cdb]
             DATA SET: ./a.nc
             LONGITUDE: 0E to 0E(720)
 Column  1: A is IF X[GX=XAXIS] GT 40 AND X[GX=XAXIS] LE 150 THEN X[GX=XAXIS]
 Column  2: A[X=@CDB:1] is IF X[GX=XAXIS] GT 40 AND X[GX=XAXIS] LE 150 THEN X[GX=XAXIS] (closest dist below on X)
                  A     A
0E      /  1:   ....   ....
10E     /  2:   ....   ....
20E     /  3:   ....   ....
30E     /  4:   ....   ....
40E     /  5:   ....   ....
50E     /  6:   50.0   0.00
60E     /  7:   60.0   0.00
70E     /  8:   70.0   0.00
80E     /  9:   80.0   0.00
90E     / 10:   90.0   0.00
100E    / 11:  100.0   0.00
110E    / 12:  110.0   0.00
120E    / 13:  120.0   0.00
130E    / 14:  130.0   0.00
140E    / 15:  140.0   0.00
150E    / 16:  150.0   0.00
160E    / 17:   ....  10.00
170E    / 18:   ....  20.00
180E    / 19:   ....  30.00
90W     / 20:   ....   ....
0E(360) / 21:   ....   ....
10E     / 22:   ....   ....
20E     / 23:   ....   ....
30E     / 24:   ....   ....
40E     / 25:   ....   ....
50E     / 26:   50.0   0.00
60E     / 27:   60.0   0.00
70E     / 28:   70.0   0.00
80E     / 29:   80.0   0.00
90E     / 30:   90.0   0.00
100E    / 31:  100.0   0.00
110E    / 32:  110.0   0.00
120E    / 33:  120.0   0.00
130E    / 34:  130.0   0.00
140E    / 35:  140.0   0.00
150E    / 36:  150.0   0.00
160E    / 37:   ....  10.00
170E    / 38:   ....  20.00
180E    / 39:   ....  30.00
90W     / 40:   ....   ....
0E(720) / 41:   ....   ....
 
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err696_subspan_mod_in_expr
! err696_subspan_mod_in_expr.jnl
! ticket 1845: a subspan modulo due to context info buried
! in a multi-layer expression isn't applied when setting
! the time axis limits for the plot.
! *acm* 5/2016
 
use bug1845.nc
set v upper
shade/x=137:146 salinity[l=1] -  salinity[l=2]
sh sym xaxis_m*
XAXIS_MIN = "137.000000"
XAXIS_MAX = "145.345261"
 
 
! When the region information is embedded a couple levels down inside
! the expressions - in the square brackets, and then an expression involving
! subtraction - the region isn't treated correctly, and the upper limit is
! the modulo void point.
 
! Previously XAXIS_MAX was 496.4, the x axis too long, and most of the plot was blank
 
set v lower
shade salinity[x=137:146,T="28-Mar-2011 00:00"] - salinity[x=137:146,T="28-Mar-2011 03:00"]
sh sym xaxis_m*
XAXIS_MIN = "136.443619"
XAXIS_MAX = "145.345261"
 
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err696_shade_subspan_clim
! err696_shade_subspan_clim
! See ticket 2404
 
def ax/edges/t/unit="day"/t0=1-jan-0001/cal=gregorian/modulo=365.25 \
tax = {31, 59.2425, 90.2425, 120.2425, 151.2425, 181.2425, 212.2425}
let a = t[gt=tax]
save/clob/file=a.nc a
can var a
can axis tax
use a.nc
can view
 
! The top-left SHADE plot looks fine.
set view ul; shade a*x[gx=0:10:1]
sh sym yaxis*
YAXIS_REVERSED = "0"
YAXIS_MIN = "31.0000000"
YAXIS_MAX = "243.000000"
 
! But the top-right SHADE plot was all messed up; it shifts the data
! later by a full month, and stretches the last (shifted) cell all
! the way to the upper limit of the plot domain
 
set view ur; shade/t=1-jan-0001:1-jan-0002 a*x[gx=0:10:1]
sh sym yaxis*
YAXIS_REVERSED = "0"
YAXIS_MIN = "31.0000000"
YAXIS_MAX = "243.000000"
 
! In the bottom-right line plot, the actual plotted data look ok.
! But the plot limits extend all the way from 1-JUL-0000 to 1-MAR-0002,
! rather than being shrink-wrapped around the data.
 
set view lr; plot/step=con/t=1-jan-0001:1-jan-0002 a
 
sh sym xaxis*
XAXIS_REVERSED = "0"
XAXIS_MIN = "31.0000000"
XAXIS_MAX = "243.000000"
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
! go err696_subspan_mod_strides  ! do this test in bn_gif
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err696_def_att
! err696_def_att.jnl
! tickets 2415, 2416
! data type for defined axes
 
use coads_climatology
 
! previously the values were corrupted when defining numeric
! attributes on a coordinate variable
define att/output (`sst,return=xaxis`).new2 = {1,3,6}
 !-> define att/output (COADSX).new2 = {1,3,6}
save/clobber/file=a.nc sst
sp ncdump a.nc | grep -i coadsx
	COADSX = 180 ;
	double COADSX(COADSX) ;
		COADSX:units = "degrees_east" ;
		COADSX:modulo = " " ;
		COADSX:point_spacing = "even" ;
		COADSX:new2 = 1.f, 3.f, 6.f ;
		COADSX:axis = "X" ;
		COADSX:standard_name = "longitude" ;
	float SST(TIME, COADSY, COADSX) ;
 COADSX = 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 
 
can dat/all
use coads_climatology
 
! previously could only specify /TYPE=float or /TYPE=string
 
! default types from the expression
define att/output sst.newch = "A string"
define att/output sst.newch = 158.12
 
define att/output/type=byt sst.abyte = 5
define att/output/type=int sst.aint = {-5,-12,-1556,0,1}
define att/output/type=string sst.str_from_num = 978.43
define att/output/type=double sst.dbint = 123.45678901
 
save/clobber/file=a.nc sst
sp ncdump a.nc | grep -i sst
	float SST(TIME, COADSY, COADSX) ;
		SST:missing_value = -1.e+34f ;
		SST:_FillValue = -1.e+34f ;
		SST:long_name = "SEA SURFACE TEMPERATURE" ;
		SST:history = "From coads_climatology" ;
		SST:units = "Deg C" ;
		SST:newch = 158.12f ;
		SST:abyte = 5b ;
		SST:aint = -5, -12, -1556, 0, 1 ;
		SST:str_from_num = "978.43" ;
		SST:dbint = 123.45678901 ;
 SST =
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err696_return_prec
! err696_return_prec.jnl
! ACM 5/16 See ticket 2389.
! For grave-accent returns, adjust the formatting so that `var,p=2` really
! means 2 digits, and returning an exponential rather than a long integer
! with lots of zero's.
 
! Both of these as exponentials. Prev. the second switched to an integer.
say `1.55551e8,p=2`
 !-> MESSAGE/CONTINUE 1.6E+08
1.6E+08
say `1.55551e7,p=2`
 !-> MESSAGE/CONTINUE 1.6E+07
1.6E+07
 
! Return only as many digits as requested
 
say `1.555555551e-9,p=1`
 !-> MESSAGE/CONTINUE 2.E-09
2.E-09
say `1.555555551e-9,p=2`
 !-> MESSAGE/CONTINUE 1.6E-09
1.6E-09
say `1.555555551e-9,p=3`
 !-> MESSAGE/CONTINUE 1.56E-09
1.56E-09
 
say `1.555555551e-9,p=5`
 !-> MESSAGE/CONTINUE 1.5556E-09
1.5556E-09
say `1.555555551e-9,p=7`
 !-> MESSAGE/CONTINUE 1.555556E-09
1.555556E-09
say `1.555555551e-9,p=10`
 !-> MESSAGE/CONTINUE 1.555555551E-09
1.555555551E-09
 
! For large numbers, return an fixed-point value only when the number
! of digits is at least the magnitude of the value
 
say `1.55551e8,p=2`
 !-> MESSAGE/CONTINUE 1.6E+08
1.6E+08
say `1.55551e8,p=3`
 !-> MESSAGE/CONTINUE 1.56E+08
1.56E+08
say `1.55551e8,p=5`
 !-> MESSAGE/CONTINUE 1.5555E+08
1.5555E+08
say `1.55551e8,p=9`
 !-> MESSAGE/CONTINUE 155551000
155551000
say `1.55551e8,p=10`
 !-> MESSAGE/CONTINUE 155551000
155551000
 
! Previously these returned fixed-point numbers with trailing zero's
! after the decimal point. These are removed.
say `1.55555551e8,p=14`
 !-> MESSAGE/CONTINUE 155555551
155555551
say `1.555555001e8,p=14`
 !-> MESSAGE/CONTINUE 155555500.1
155555500.1
 
 
 
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err686_show_xml_letd
! ! bn_show_xml_letd
! Testing SHOW DATA/VAR/XML with a let/D variable
! Ticket 2441
 
use coads_climatology.cdf
use gtbc011.cdf
let/d=1 u2 = u[d=2]
let/d=1 v2 = v[d=2]
let/d=1 w2 = w[d=2]
let/d=1 salt2 = salt[d=2]
sh dat 1
     currently SET data sets:
    1> ./data/coads_climatology.cdf
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:3
 ------------------------------
 SALT2[D=coads_climatology] = SALT[D=2]
 W2[D=coads_climatology] = W[D=2]
 V2[D=coads_climatology] = V[D=2]
 U2[D=coads_climatology] = U[D=2]
 
 
sh dat/var/xml/outfile=out.xml/clobber 1
 
! Showed w2 twice but missed u2.
sp grep "var name" out.xml
<var name="SST">
<var name="salt2">
<var name="w2">
<var name="v2">
<var name="u2">
*** Running ferret script: bn_aggregate_t_noremote.jnl
! bn_aggregate_t_noremote.jnl
! 9/12/2015 *sh* tweak to put all test files into "tmp" subdirectory
! 1/2016 *sh* added implicit naming of aggregation from script filename
! 2/2016      and auto-sorting of member files
! 1/2017 *acm* changes in output due to backing off auto-detection of truemonth axes, tkt 2497
 
spawn "mkdir -p tmp"     ! tmp directory t store files
 
! *** create test files for T aggregation ***
 
! --- files with regularly-spaced time points ---
define axis/t=1-jan-1980:1-jan-1990:1/unit=days tday
let myvar = SIN(T[gt=tday]/10) + L[gt=tday]/10
 
! also define a time intependent field to be saved as the second variable
! but only in the first data set
let mymap = I[x=0E:0E:5]+ 10*J[Y=80s:80n:5]
 
save/clobber/file="tmp/tagg_reg_1.nc" myvar[l=1:10], mymap
save/clobber/file="tmp/tagg_reg_2.nc" myvar[l=11:20]
save/clobber/file="tmp/tagg_reg_3.nc" myvar[l=21:30]
save/clobber/file="tmp/tagg_reg_4.nc" myvar[l=31:40]
save/clobber/file="tmp/tagg_reg_5.nc" myvar[l=41:50]
save/clobber/file="tmp/tagg_reg_6.nc" myvar[l=51:60]
save/clobber/file="tmp/tagg_reg_7.nc" myvar[l=61:70]
save/clobber/file="tmp/tagg_reg_8.nc" myvar[l=71:80]
save/clobber/file="tmp/tagg_reg_9.nc" myvar[l=81:90]
save/clobber/file="tmp/tagg_reg_10.nc" myvar[l=91:100]
 
! Add some global attributes which will propagate through aggregations:
!  TSERIES inherits global atts from the 1st member
!  ENSEMBLE aggregations promote global attrs to a variable on the E axis
 
let investigator = "Ferret developers"
let description = "Example for time-aggregation working with global attributes"
save/asglobal/append/file="tmp/tagg_reg_1.nc" investigator, description
 
! save a duplicate of the first file
save/clobber/file="tmp/tagg_reg_1_duplicate.nc" myvar[l=1:10], mymap
 
! save a file with no time-dependent variables
save/clobber/file="tmp/tagg_reg_no_T.nc"  mymap
 
! make a single file that is "too long": 15 time steps instead of 10
! so that when used in a time series it creates reverse-ordered points
define axis/t=1-jan-1980:1-jan-1990:1/unit=days tday
let myvar = SIN(T[gt=tday]/10) + L[gt=tday]/10
save/clobber/file="tmp/tagg_reg_2_overlarge.nc" myvar[l=11:25]
cancel axis tday
 
! --- files with irregularly-spaced time points ---
define axis/T0=1-jan-1980/unit=days tday_ir = L[l=1:200]^1.01
 
let myvar = SIN(T[gt=tday_ir]/10) + L[gt=tday_ir]/10
!plot myvar[l=1:100]
 
save/clobber/file="tmp/tagg_irreg_1.nc" myvar[l=1:10]
save/clobber/file="tmp/tagg_irreg_2.nc" myvar[l=11:20]
save/clobber/file="tmp/tagg_irreg_3.nc" myvar[l=21:30]
save/clobber/file="tmp/tagg_irreg_4.nc" myvar[l=31:40]
save/clobber/file="tmp/tagg_irreg_5.nc" myvar[l=41:50]
save/clobber/file="tmp/tagg_irreg_6.nc" myvar[l=51:60]
save/clobber/file="tmp/tagg_irreg_7.nc" myvar[l=61:70]
save/clobber/file="tmp/tagg_irreg_8.nc" myvar[l=71:80]
save/clobber/file="tmp/tagg_irreg_9.nc" myvar[l=81:90]
save/clobber/file="tmp/tagg_irreg_10.nc" myvar[l=91:100]
 
let investigator = "Ferret developers"
let description = "Example for time-aggregation working with global attributes"
 
save/asglobal/append/file="tmp/tagg_irreg_1.nc" investigator
save/asglobal/append/file="tmp/tagg_irreg_1.nc" description
 
! create a regular time axis (lacking cell bounds) in the midst of the sequence
define axis/T0=1-jan-1980/unit=days tday_ir = L[l=11:20]
save/clobber/file="tmp/tagg_irreg_2_reg.nc" myvar
cancel axis tday_ir
 
 
! --- files in which the T0 origin varies ---
! create a sequence of files with differing T0 dates, but the very same
! timestep values (1, 2, 3, 4)
 
let tt = t[gt=tday_tvar]
 
repeat/i=1:5 (\
define symbol file `i`;\
define symbol start_day `(i-1)*4+1`;\
define axis/T0=($start_day)-jan-1980/unit=days tday_Tvar = L[l=1:4];\
let myvar0 = TAX_JDAY(L[l=1:4], tt);\
let myvar = myvar0[gt=tday_Tvar@asn];\
save/clobber/file="tmp/tagg_T0varying_($file).nc" myvar[l=1:4])
 !-> repeat/i=1:5 (define symbol file `i`;define symbol start_day `(i-1)*4+1`;define axis/T0=($start_day)-jan-1980/unit=days tday_Tvar = L[l=1:4];let myvar0 = TAX_JDAY(L[l=1:4], tt);let myvar = myvar0[gt=tday_Tvar@asn];save/clobber/file="tmp/tagg_T0varying_($file).nc" myvar[l=1:4])
!-> REPEAT: I=1
 !-> define symbol file 1
 !-> define symbol start_day 1
 !-> define axis/T0=1-jan-1980/unit=days tday_Tvar = L[l=1:4]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/tagg_T0varying_1.nc" myvar[l=1:4]
!-> REPEAT: I=2
 !-> define symbol file 2
 !-> define symbol start_day 5
 !-> define axis/T0=5-jan-1980/unit=days tday_Tvar = L[l=1:4]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/tagg_T0varying_2.nc" myvar[l=1:4]
!-> REPEAT: I=3
 !-> define symbol file 3
 !-> define symbol start_day 9
 !-> define axis/T0=9-jan-1980/unit=days tday_Tvar = L[l=1:4]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/tagg_T0varying_3.nc" myvar[l=1:4]
!-> REPEAT: I=4
 !-> define symbol file 4
 !-> define symbol start_day 13
 !-> define axis/T0=13-jan-1980/unit=days tday_Tvar = L[l=1:4]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/tagg_T0varying_4.nc" myvar[l=1:4]
!-> REPEAT: I=5
 !-> define symbol file 5
 !-> define symbol start_day 17
 !-> define axis/T0=17-jan-1980/unit=days tday_Tvar = L[l=1:4]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/tagg_T0varying_5.nc" myvar[l=1:4]
 
! --- files with T0 varying and date gaps between files ---
let myvar = L[gt=tday_Tvar]
 
repeat/i=1:10 (\
define symbol file `i`;\
define symbol year `i+1980`;\
define axis/T0=1-jan-($year)/unit=days tday_Tvar = L[l=1:10];\
save/clobber/file="tmp/tagg_disjoint_T0varying_($file).nc" myvar[l=1:10])
 !-> repeat/i=1:10 (define symbol file `i`;define symbol year `i+1980`;define axis/T0=1-jan-($year)/unit=days tday_Tvar = L[l=1:10];save/clobber/file="tmp/tagg_disjoint_T0varying_($file).nc" myvar[l=1:10])
!-> REPEAT: I=1
 !-> define symbol file 1
 !-> define symbol year 1981
 !-> define axis/T0=1-jan-1981/unit=days tday_Tvar = L[l=1:10]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/tagg_disjoint_T0varying_1.nc" myvar[l=1:10]
!-> REPEAT: I=2
 !-> define symbol file 2
 !-> define symbol year 1982
 !-> define axis/T0=1-jan-1982/unit=days tday_Tvar = L[l=1:10]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/tagg_disjoint_T0varying_2.nc" myvar[l=1:10]
!-> REPEAT: I=3
 !-> define symbol file 3
 !-> define symbol year 1983
 !-> define axis/T0=1-jan-1983/unit=days tday_Tvar = L[l=1:10]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/tagg_disjoint_T0varying_3.nc" myvar[l=1:10]
!-> REPEAT: I=4
 !-> define symbol file 4
 !-> define symbol year 1984
 !-> define axis/T0=1-jan-1984/unit=days tday_Tvar = L[l=1:10]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/tagg_disjoint_T0varying_4.nc" myvar[l=1:10]
!-> REPEAT: I=5
 !-> define symbol file 5
 !-> define symbol year 1985
 !-> define axis/T0=1-jan-1985/unit=days tday_Tvar = L[l=1:10]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/tagg_disjoint_T0varying_5.nc" myvar[l=1:10]
!-> REPEAT: I=6
 !-> define symbol file 6
 !-> define symbol year 1986
 !-> define axis/T0=1-jan-1986/unit=days tday_Tvar = L[l=1:10]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/tagg_disjoint_T0varying_6.nc" myvar[l=1:10]
!-> REPEAT: I=7
 !-> define symbol file 7
 !-> define symbol year 1987
 !-> define axis/T0=1-jan-1987/unit=days tday_Tvar = L[l=1:10]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/tagg_disjoint_T0varying_7.nc" myvar[l=1:10]
!-> REPEAT: I=8
 !-> define symbol file 8
 !-> define symbol year 1988
 !-> define axis/T0=1-jan-1988/unit=days tday_Tvar = L[l=1:10]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/tagg_disjoint_T0varying_8.nc" myvar[l=1:10]
!-> REPEAT: I=9
 !-> define symbol file 9
 !-> define symbol year 1989
 !-> define axis/T0=1-jan-1989/unit=days tday_Tvar = L[l=1:10]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/tagg_disjoint_T0varying_9.nc" myvar[l=1:10]
!-> REPEAT: I=10
 !-> define symbol file 10
 !-> define symbol year 1990
 !-> define axis/T0=1-jan-1990/unit=days tday_Tvar = L[l=1:10]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/tagg_disjoint_T0varying_10.nc" myvar[l=1:10]
 
! alter first and third files to have only single time step
define axis/T0=1-jan-1981/unit=days tday_Tvar = L[l=1:10]
save/clobber/file="tmp/tagg_disjoint_T0varying_1.nc" myvar[l=1:1]
define axis/T0=1-jan-1983/unit=days tday_Tvar = L[l=1:10]
save/clobber/file="tmp/tagg_disjoint_T0varying_3.nc" myvar[l=1:1]
 
! make an alternative file 4 that has a different name for the time axis
define axis/T0=1-jan-1984/unit=days tday_WRONG = L[l=1:10]
let myvar = L[gt=tday_WRONG]
save/clobber/file="tmp/tagg_disjoint_T0varying_4_wrong.nc" myvar[l=1:1]
cancel axis tday_Tvar
cancel axis tday_WRONG
 
! --- files each containing only a single time step ---
define axis/t=1-jan-1980:1-jan-1990:1/unit=days tday
 
let myvar = SIN(T[gt=tday]/10) + L[gt=tday]/10
 
! also define a time intependent field to be saved as the second variable
! but only in the first data set
let mymap = I[x=0E:0E:5]+ 10*J[Y=80s:80n:5]
 
!save/rigid/keep_axisname/file=...
 
save/clobber/file="tmp/tagg_single_1.nc" myvar[l=1], mymap
save/clobber/file="tmp/tagg_single_2.nc" myvar[l=2]
save/clobber/file="tmp/tagg_single_3.nc" myvar[l=3]
save/clobber/file="tmp/tagg_single_4.nc" myvar[l=4]
save/clobber/file="tmp/tagg_single_5.nc" myvar[l=5]
save/clobber/file="tmp/tagg_single_6.nc" myvar[l=6]
 
cancel axis tday
 
cancel var/all
 
 
! *****************************************
! *** test the aggregation capabilities ***
! --- regularly-spaced axes ---
! if the first file of the aggregation is already open
! it must not get disturbed by setting up the aggregation
use tmp/tagg_reg_1.nc
 
! single dataset aggregation
tseries myagg1 =  tmp/tagg_reg_1.nc
show data myagg1
     currently SET data sets:
    2> myagg1  (default)
 name     title                             I         J         K         L
 MYVAR    SIN(T[GT=TDAY]/10) + L[GT=TDAY]  ...       ...       ...       1:10
 MYMAP    I[X=0E:0E:5]+ 10*J[Y=80S:80N:5]  1:73      1:33      ...       ...
 
show grid myvar
    GRID GTR3
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TDAY1     TIME                10 r   01-JAN-1980 00:00    10-JAN-1980 00:00   full
 
! double file aggregation
define data/agg/t myagg2 = tmp/tagg_reg_1.nc, tmp/tagg_reg_2.nc
show grid myvar
    GRID GTR5
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TDAY2     TIME                20 r   01-JAN-1980 00:00    20-JAN-1980 00:00   full
stat myvar
 
             SIN(T[GT=TDAY]/10) + L[GT=TDAY]/10
             X:  N/A
             Y:  N/A
             Z:  N/A
             TIME: 31-DEC-1979 12:00 to 20-JAN-1980 12:00
             E:  N/A
             F:  N/A
             DATA SET: myagg2
 
 Total # of data points: 20 (1*1*1*20*1*1)
 # flagged as bad  data: 0
 Minimum value: 0.11794
 Maximum value: 2.9403
 Mean    value: 1.7434 (unweighted average)
 Standard deviation: 0.90253
 
! show that aggregate name is case-sensitive
define data/agg/t myAgg2 = tmp/tagg_reg_1.nc, tmp/tagg_reg_2.nc
show data myAgg2
     currently SET data sets:
    3> myagg2
 name     title                             I         J         K         L
 MYVAR    SIN(T[GT=TDAY]/10) + L[GT=TDAY]  ...       ...       ...       1:20
 MYMAP    I[X=0E:0E:5]+ 10*J[Y=80S:80N:5]  1:73      1:33      ...       ...
 
 
! *sh* 1/28/2016 addition
! same aggregation inheriting its name from the parent script
define data/agg/t tmp/tagg_reg_1.nc, tmp/tagg_reg_2.nc
show data/brief
     currently SET data sets:
    1> tmp/tagg_reg_1.nc
    2> myagg1
    3> myagg2
    4> myAgg2
    5> ./v6jnls/bn_aggregate_t_noremote.jnl  (default)
 
! define a long aggregation
define data/agg/t myagg8 = tmp/tagg_reg_1.nc, tmp/tagg_reg_2.nc,tmp/tagg_reg_3.nc, tmp/tagg_reg_4.nc,tmp/tagg_reg_5.nc, tmp/tagg_reg_6.nc,tmp/tagg_reg_7.nc, tmp/tagg_reg_8.nc
show data/full  ! all 4 datasets
     currently SET data sets:
    1> tmp/tagg_reg_1.nc
 
 name     title                             I         J         K         L
 MYVAR    SIN(T[GT=TDAY]/10) + L[GT=TDAY]  ...       ...       ...       1:10
               on grid GTR1 with -1.E+34 for missing data
             
 MYMAP    I[X=0E:0E:5]+ 10*J[Y=80S:80N:5]  1:73      1:33      ...       ...
               on grid GTR2 with -1.E+34 for missing data
             X=2.5W(-2.5):2.5E(362.5)  Y=82.5S:82.5N  
 
  time range: 01-JAN-1980 00:00 to 10-JAN-1980 00:00
 
    2> myagg1
 
     T-aggregation of 1 netCDF files
 name     title                             I         J         K         L
 MYVAR    SIN(T[GT=TDAY]/10) + L[GT=TDAY]  ...       ...       ...       1:10
               on grid GTR3 with -1.E+34 for missing data
             
 MYMAP    I[X=0E:0E:5]+ 10*J[Y=80S:80N:5]  1:73      1:33      ...       ...
               on grid GTR4 with -1.E+34 for missing data
             X=2.5W(-2.5):2.5E(362.5)  Y=82.5S:82.5N  
 
  time range: 01-JAN-1980 00:00 to 10-JAN-1980 00:00
 
          time-dependent data files:
01-JAN-1980 00:00 -> 10-JAN-1980 00:00    tmp/tagg_reg_1.nc
 
    3> myagg2
 
     T-aggregation of 2 netCDF files
 name     title                             I         J         K         L
 MYVAR    SIN(T[GT=TDAY]/10) + L[GT=TDAY]  ...       ...       ...       1:20
               on grid GTR5 with -1.E+34 for missing data
             
 MYMAP    I[X=0E:0E:5]+ 10*J[Y=80S:80N:5]  1:73      1:33      ...       ...
               on grid GTR6 with -1.E+34 for missing data
             X=2.5W(-2.5):2.5E(362.5)  Y=82.5S:82.5N  
 
  time range: 01-JAN-1980 00:00 to 20-JAN-1980 00:00
 
          time-dependent data files:
01-JAN-1980 00:00 -> 10-JAN-1980 00:00    tmp/tagg_reg_1.nc
11-JAN-1980 00:00 -> 20-JAN-1980 00:00    tmp/tagg_reg_2.nc
 
    4> myAgg2
 
     T-aggregation of 2 netCDF files
 name     title                             I         J         K         L
 MYVAR    SIN(T[GT=TDAY]/10) + L[GT=TDAY]  ...       ...       ...       1:20
               on grid GTR7 with -1.E+34 for missing data
             
 MYMAP    I[X=0E:0E:5]+ 10*J[Y=80S:80N:5]  1:73      1:33      ...       ...
               on grid GTR8 with -1.E+34 for missing data
             X=2.5W(-2.5):2.5E(362.5)  Y=82.5S:82.5N  
 
  time range: 01-JAN-1980 00:00 to 20-JAN-1980 00:00
 
          time-dependent data files:
01-JAN-1980 00:00 -> 10-JAN-1980 00:00    tmp/tagg_reg_1.nc
11-JAN-1980 00:00 -> 20-JAN-1980 00:00    tmp/tagg_reg_2.nc
 
    5> ./v6jnls/bn_aggregate_t_noremote.jnl
 
     T-aggregation of 2 netCDF files
 name     title                             I         J         K         L
 MYVAR    SIN(T[GT=TDAY]/10) + L[GT=TDAY]  ...       ...       ...       1:20
               on grid GTR9 with -1.E+34 for missing data
             
 MYMAP    I[X=0E:0E:5]+ 10*J[Y=80S:80N:5]  1:73      1:33      ...       ...
               on grid GTR10 with -1.E+34 for missing data
             X=2.5W(-2.5):2.5E(362.5)  Y=82.5S:82.5N  
 
  time range: 01-JAN-1980 00:00 to 20-JAN-1980 00:00
 
          time-dependent data files:
01-JAN-1980 00:00 -> 10-JAN-1980 00:00    tmp/tagg_reg_1.nc
11-JAN-1980 00:00 -> 20-JAN-1980 00:00    tmp/tagg_reg_2.nc
 
    6> myagg8  (default)
 
     T-aggregation of 8 netCDF files
 name     title                             I         J         K         L
 MYVAR    SIN(T[GT=TDAY]/10) + L[GT=TDAY]  ...       ...       ...       1:80
               on grid GTR11 with -1.E+34 for missing data
             
 MYMAP    I[X=0E:0E:5]+ 10*J[Y=80S:80N:5]  1:73      1:33      ...       ...
               on grid GTR12 with -1.E+34 for missing data
             X=2.5W(-2.5):2.5E(362.5)  Y=82.5S:82.5N  
 
  time range: 01-JAN-1980 00:00 to 20-MAR-1980 00:00
 
          time-dependent data files:
01-JAN-1980 00:00 -> 10-JAN-1980 00:00    tmp/tagg_reg_1.nc
11-JAN-1980 00:00 -> 20-JAN-1980 00:00    tmp/tagg_reg_2.nc
21-JAN-1980 00:00 -> 30-JAN-1980 00:00    tmp/tagg_reg_3.nc
31-JAN-1980 00:00 -> 09-FEB-1980 00:00    tmp/tagg_reg_4.nc
10-FEB-1980 00:00 -> 19-FEB-1980 00:00    tmp/tagg_reg_5.nc
20-FEB-1980 00:00 -> 29-FEB-1980 00:00    tmp/tagg_reg_6.nc
01-MAR-1980 00:00 -> 10-MAR-1980 00:00    tmp/tagg_reg_7.nc
11-MAR-1980 00:00 -> 20-MAR-1980 00:00    tmp/tagg_reg_8.nc
 
show grid myvar
    GRID GTR11
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TDAY3     TIME                80 r   01-JAN-1980 00:00    20-MAR-1980 00:00   full
plot/line/sym myvar
 
! read a time-independent field from the first file of the aggregation
stat mymap
 
             I[X=0E:0E:5]+ 10*J[Y=80S:80N:5]
             LONGITUDE: 2.5W(-2.5) to 2.5E(362.5)
             LATITUDE: 82.5S to 82.5N
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: myagg8
 
 Total # of data points: 2409 (73*33*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 11
 Maximum value: 403
 Mean    value: 207 (unweighted average)
 Standard deviation: 97.543
 
! 2/2016 -- reorder deliberately out of order regular files
define data/agg/t myagg8_disordered1 = tmp/tagg_reg_2.nc, tmp/tagg_reg_1.nc,tmp/tagg_reg_3.nc, tmp/tagg_reg_4.nc,tmp/tagg_reg_5.nc, tmp/tagg_reg_6.nc,tmp/tagg_reg_7.nc, tmp/tagg_reg_8.nc
define data/agg/t myagg8_disordered2 = tmp/tagg_reg_1.nc, tmp/tagg_reg_2.nc,tmp/tagg_reg_3.nc, tmp/tagg_reg_4.nc,tmp/tagg_reg_5.nc, tmp/tagg_reg_6.nc,tmp/tagg_reg_8.nc, tmp/tagg_reg_7.nc
show data/files/brief myagg8_disordered1
     currently SET data sets:
    7> myagg8_disordered1
tmp/tagg_reg_1.nc
tmp/tagg_reg_2.nc
tmp/tagg_reg_3.nc
tmp/tagg_reg_4.nc
tmp/tagg_reg_5.nc
tmp/tagg_reg_6.nc
tmp/tagg_reg_7.nc
tmp/tagg_reg_8.nc
 
show data/files/brief myagg8_disordered2
     currently SET data sets:
    8> myagg8_disordered2  (default)
tmp/tagg_reg_1.nc
tmp/tagg_reg_2.nc
tmp/tagg_reg_3.nc
tmp/tagg_reg_4.nc
tmp/tagg_reg_5.nc
tmp/tagg_reg_6.nc
tmp/tagg_reg_7.nc
tmp/tagg_reg_8.nc
 
stat/brief T[g=myvar[d=myagg8]] - T[g=myvar[d=myagg8_disordered1]]
 
 Total # of data points: 80 (1*1*1*80*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
stat/brief TBOXLO[g=myvar[d=myagg8]] - TBOXLO[g=myvar[d=myagg8_disordered1]]
 
 Total # of data points: 80 (1*1*1*80*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
stat/brief TBOXHI[g=myvar[d=myagg8]] - TBOXHI[g=myvar[d=myagg8_disordered1]]
 
 Total # of data points: 80 (1*1*1*80*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
cancel data/all
 
! deliberate errors
set mode ignore
! try to define the same aggregation again
define data/agg/t myagg2 = tmp/tagg_reg_1.nc, tmp/tagg_reg_2.nc
 
! try to aggregate with the same file duplicated
define data/agg/t myagg2 = tmp/tagg_reg_1.nc, tmp/tagg_reg_2.nc, tmp/tagg_reg_2.nc
 
! try to aggregate a missing file as first file
define data/agg/t myaggbad = tmp/tagg_no_exist.nc, tmp/tagg_reg_2.nc
 
! try to aggregate a missing file as subsequent file
define data/agg/t myaggbad = tmp/tagg_reg_1.nc, tmp/tagg_no_exist.nc
 
! try to define an aggregation where there is no time axis in the first file
tseries myTindepagg = tmp/tagg_reg_no_T.nc
 
! erroneous file 2 with 15 time steps, goes beyond start of file 3
define data/agg/t myagg3 = tmp/tagg_reg_1.nc, tmp/tagg_reg_2_overlarge.nc,tmp/tagg_reg_3.nc
 
! Try to use dataset names not file names. This is not allowed for Tseries aggregations.
use tmp/tagg_reg_1.nc, tmp/tagg_reg_2.nc
define data/agg/t myagg2num = 1,2
 
set mode/last ignore
canc data/all
 
! --- irregularly-spaced axes ---
! aggregation of 2 irregular datasets
 define data/agg/t myagg2 = tmp/tagg_irreg_1.nc, tmp/tagg_irreg_2.nc
 
! aggregate a longer collection where all are irregular
define data/agg/t myagg8 = tmp/tagg_irreg_1.nc, tmp/tagg_irreg_2.nc,tmp/tagg_irreg_3.nc, tmp/tagg_irreg_4.nc,tmp/tagg_irreg_5.nc, tmp/tagg_irreg_6.nc,tmp/tagg_irreg_7.nc, tmp/tagg_irreg_8.nc
  show data/full
     currently SET data sets:
    1> myagg2
 
     T-aggregation of 2 netCDF files
 name     title                             I         J         K         L
 MYVAR    SIN(T[GT=TDAY_IR]/10) + L[GT=TD  ...       ...       ...       1:20
               on grid GAY1 with -1.E+34 for missing data
             
 
  time range: 02-JAN-1980 00:00 to 21-JAN-1980 14:35
 
          time-dependent data files:
02-JAN-1980 00:00 -> 11-JAN-1980 05:35    tmp/tagg_irreg_1.nc
12-JAN-1980 06:24 -> 21-JAN-1980 14:35    tmp/tagg_irreg_2.nc
 
    2> myagg8  (default)
 
     T-aggregation of 8 netCDF files
 name     title                             I         J         K         L
 MYVAR    SIN(T[GT=TDAY_IR]/10) + L[GT=TD  ...       ...       ...       1:80
               on grid GAY2 with -1.E+34 for missing data
             
 
  time range: 02-JAN-1980 00:00 to 24-MAR-1980 14:00
 
          time-dependent data files:
02-JAN-1980 00:00 -> 11-JAN-1980 05:35    tmp/tagg_irreg_1.nc
12-JAN-1980 06:24 -> 21-JAN-1980 14:35    tmp/tagg_irreg_2.nc
22-JAN-1980 15:34 -> 01-FEB-1980 00:54    tmp/tagg_irreg_3.nc
02-FEB-1980 01:59 -> 11-FEB-1980 12:04    tmp/tagg_irreg_4.nc
12-FEB-1980 13:13 -> 21-FEB-1980 23:52    tmp/tagg_irreg_5.nc
23-FEB-1980 01:05 -> 03-MAR-1980 12:10    tmp/tagg_irreg_6.nc
04-MAR-1980 13:26 -> 14-MAR-1980 00:54    tmp/tagg_irreg_7.nc
15-MAR-1980 02:12 -> 24-MAR-1980 14:00    tmp/tagg_irreg_8.nc
 
  show data myagg2
     currently SET data sets:
    1> myagg2
 name     title                             I         J         K         L
 MYVAR    SIN(T[GT=TDAY_IR]/10) + L[GT=TD  ...       ...       ...       1:20
 
  show grid/t myvar[d=1]
    GRID GAY1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TDAY_IR1  TIME                20 i   02-JAN-1980 00:00    21-JAN-1980 14:35   full
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  02-JAN-1980 00:00:00      1.013911   01-JAN-1980 11:49:59        1
       2>  03-JAN-1980 00:20:01      1.01657    02-JAN-1980 12:10:00        2.013911
       3>  04-JAN-1980 00:47:43      1.020963   03-JAN-1980 12:33:52        3.03314
       4>  05-JAN-1980 01:20:24      1.023991   04-JAN-1980 13:04:03        4.055838
       5>  06-JAN-1980 01:56:49      1.026318   05-JAN-1980 13:38:36        5.081123
       6>  07-JAN-1980 02:36:12      1.028212   06-JAN-1980 14:16:30        6.108474
       7>  08-JAN-1980 03:18:04      1.029811   07-JAN-1980 14:57:08        7.137548
       8>  09-JAN-1980 04:02:03      1.031196   08-JAN-1980 15:40:03        8.168097
       9>  10-JAN-1980 04:47:54      1.032416   09-JAN-1980 16:24:59        9.199939
      10>  11-JAN-1980 05:35:25      1.033509   10-JAN-1980 17:11:39        10.23293
      11>  12-JAN-1980 06:24:25      1.034497   11-JAN-1980 17:59:55        11.26696
      12>  13-JAN-1980 07:14:46      1.0354     12-JAN-1980 18:49:35        12.30192
      13>  14-JAN-1980 08:06:22      1.036231   13-JAN-1980 19:40:34        13.33776
      14>  15-JAN-1980 08:59:06      1.037001   14-JAN-1980 20:32:44        14.37439
      15>  16-JAN-1980 09:52:55      1.037717   15-JAN-1980 21:26:01        15.41176
      16>  17-JAN-1980 10:47:44      1.038388   16-JAN-1980 22:20:20        16.44982
      17>  18-JAN-1980 11:43:29      1.039019   17-JAN-1980 23:15:36        17.48853
      18>  19-JAN-1980 12:40:06      1.039613   19-JAN-1980 00:11:48        18.52786
      19>  20-JAN-1980 13:37:34      1.040176   20-JAN-1980 01:08:50        19.56776
      20>  21-JAN-1980 14:35:49      1.04071    21-JAN-1980 02:06:42        20.60821
  show grid myvar[d=2]
    GRID GAY2
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TDAY_IR2  TIME                80 i   02-JAN-1980 00:00    24-MAR-1980 14:00   full
  plot/line/sym myvar[d=2],myvar[d=1]
 
! aggregate collection that mixes regular (file 2) with irregular
define data/agg/t myagg4 = tmp/tagg_irreg_1.nc, tmp/tagg_irreg_2_reg.nc,tmp/tagg_irreg_3.nc, tmp/tagg_irreg_4.nc
  show grid/t myvar[d=myagg4]
    GRID GAY3
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TDAY_IR3  TIME                40 i   02-JAN-1980 00:00    11-FEB-1980 12:04   full
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  02-JAN-1980 00:00:00      1.013911   01-JAN-1980 11:49:59        1
       2>  03-JAN-1980 00:20:01      1.01657    02-JAN-1980 12:10:00        2.013911
       3>  04-JAN-1980 00:47:43      1.020963   03-JAN-1980 12:33:52        3.03314
       4>  05-JAN-1980 01:20:24      1.023991   04-JAN-1980 13:04:03        4.055838
       5>  06-JAN-1980 01:56:49      1.026318   05-JAN-1980 13:38:36        5.081123
       6>  07-JAN-1980 02:36:12      1.028212   06-JAN-1980 14:16:30        6.108474
       7>  08-JAN-1980 03:18:04      1.029811   07-JAN-1980 14:57:08        7.137548
       8>  09-JAN-1980 04:02:03      1.031196   08-JAN-1980 15:40:03        8.168097
       9>  10-JAN-1980 04:47:54      1.032416   09-JAN-1980 16:24:59        9.199939
      10>  11-JAN-1980 05:35:25      0.9000306  10-JAN-1980 17:11:39        10.23293
      11>  12-JAN-1980 00:00:00      0.883535   11-JAN-1980 14:47:42        11
      12>  13-JAN-1980 00:00:00      1          12-JAN-1980 12:00:00        12
      13>  14-JAN-1980 00:00:00      1          13-JAN-1980 12:00:00        13
      14>  15-JAN-1980 00:00:00      1          14-JAN-1980 12:00:00        14
      15>  16-JAN-1980 00:00:00      1          15-JAN-1980 12:00:00        15
      16>  17-JAN-1980 00:00:00      1          16-JAN-1980 12:00:00        16
      17>  18-JAN-1980 00:00:00      1          17-JAN-1980 12:00:00        17
      18>  19-JAN-1980 00:00:00      1          18-JAN-1980 12:00:00        18
      19>  20-JAN-1980 00:00:00      1          19-JAN-1980 12:00:00        19
      20>  21-JAN-1980 00:00:00      1.324591   20-JAN-1980 12:00:00        20
      21>  22-JAN-1980 15:34:49      1.345324   21-JAN-1980 19:47:24        21.64918
      22>  23-JAN-1980 16:34:32      1.041703   23-JAN-1980 04:04:40        22.69065
      23>  24-JAN-1980 17:34:55      1.042167   24-JAN-1980 05:04:43        23.73259
      24>  25-JAN-1980 18:35:58      1.042611   25-JAN-1980 06:05:27        24.77498
      25>  26-JAN-1980 19:37:38      1.043037   26-JAN-1980 07:06:48        25.81781
      26>  27-JAN-1980 20:39:55      1.043446   27-JAN-1980 08:08:47        26.86106
      27>  28-JAN-1980 21:42:46      1.04384    28-JAN-1980 09:11:20        27.9047
      28>  29-JAN-1980 22:46:10      1.04422    29-JAN-1980 10:14:28        28.94874
      29>  30-JAN-1980 23:50:07      1.044587   30-JAN-1980 11:18:09        29.99314
      30>  01-FEB-1980 00:54:35      1.044941   31-JAN-1980 12:22:21        31.03791
      31>  02-FEB-1980 01:59:33      1.045284   01-FEB-1980 13:27:04        32.08303
      32>  03-FEB-1980 03:05:00      1.045616   02-FEB-1980 14:32:16        33.12848
      33>  04-FEB-1980 04:10:55      1.045938   03-FEB-1980 15:37:58        34.17426
      34>  05-FEB-1980 05:17:18      1.04625    04-FEB-1980 16:44:07        35.22035
      35>  06-FEB-1980 06:24:07      1.046554   05-FEB-1980 17:50:43        36.26676
      36>  07-FEB-1980 07:31:22      1.046849   06-FEB-1980 18:57:45        37.31346
      37>  08-FEB-1980 08:39:03      1.047135   07-FEB-1980 20:05:13        38.36045
      38>  09-FEB-1980 09:47:07      1.047415   08-FEB-1980 21:13:05        39.40773
      39>  10-FEB-1980 10:55:36      1.047687   09-FEB-1980 22:21:22        40.45528
      40>  11-FEB-1980 12:04:28      1.047821   10-FEB-1980 23:30:02        41.50311
 
! deliberate error -- aggregated file out of order
set mode ignore
define data/agg/t myagg3 = tmp/tagg_irreg_1.nc, tmp/tagg_irreg_3.nc,tmp/tagg_irreg_2.nc
set mode/last ignore
canc data/all
 
! --- aggregation from T0-varying files ---
! aggregate two
  define data/agg/t myagg2 = tmp/tagg_T0varying_1.nc, tmp/tagg_T0varying_2.nc
 
! aggregate several
define data/agg/t myagg8 = tmp/tagg_T0varying_1.nc, tmp/tagg_T0varying_2.nc,tmp/tagg_T0varying_3.nc, tmp/tagg_T0varying_4.nc,tmp/tagg_T0varying_5.nc
  show data/full
     currently SET data sets:
    1> myagg2
 
     T-aggregation of 2 netCDF files
 name     title                             I         J         K         L
 MYVAR    MYVAR0[GT=TDAY_TVAR@ASN]         ...       ...       ...       1:8
               on grid GES1 with -1.E+34 for missing data
             
 
  time range: 02-JAN-1980 00:00 to 09-JAN-1980 00:00
 
          time-dependent data files:
02-JAN-1980 00:00 -> 05-JAN-1980 00:00    tmp/tagg_T0varying_1.nc
06-JAN-1980 00:00 -> 09-JAN-1980 00:00    tmp/tagg_T0varying_2.nc
 
    2> myagg8  (default)
 
     T-aggregation of 5 netCDF files
 name     title                             I         J         K         L
 MYVAR    MYVAR0[GT=TDAY_TVAR@ASN]         ...       ...       ...       1:20
               on grid GES2 with -1.E+34 for missing data
             
 
  time range: 02-JAN-1980 00:00 to 21-JAN-1980 00:00
 
          time-dependent data files:
02-JAN-1980 00:00 -> 05-JAN-1980 00:00    tmp/tagg_T0varying_1.nc
06-JAN-1980 00:00 -> 09-JAN-1980 00:00    tmp/tagg_T0varying_2.nc
10-JAN-1980 00:00 -> 13-JAN-1980 00:00    tmp/tagg_T0varying_3.nc
14-JAN-1980 00:00 -> 17-JAN-1980 00:00    tmp/tagg_T0varying_4.nc
18-JAN-1980 00:00 -> 21-JAN-1980 00:00    tmp/tagg_T0varying_5.nc
 
  show data myagg2
     currently SET data sets:
    1> myagg2
 name     title                             I         J         K         L
 MYVAR    MYVAR0[GT=TDAY_TVAR@ASN]         ...       ...       ...       1:8
 
  show grid/t myvar[d=1]
    GRID GES1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TDAY_TVAR TIME                 8 r   02-JAN-1980 00:00    09-JAN-1980 00:00   full
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  02-JAN-1980 00:00:00      1          01-JAN-1980 12:00:00        1
       2>  03-JAN-1980 00:00:00      1          02-JAN-1980 12:00:00        2
       3>  04-JAN-1980 00:00:00      1          03-JAN-1980 12:00:00        3
       4>  05-JAN-1980 00:00:00      1          04-JAN-1980 12:00:00        4
       5>  06-JAN-1980 00:00:00      1          05-JAN-1980 12:00:00        5
       6>  07-JAN-1980 00:00:00      1          06-JAN-1980 12:00:00        6
       7>  08-JAN-1980 00:00:00      1          07-JAN-1980 12:00:00        7
       8>  09-JAN-1980 00:00:00      1          08-JAN-1980 12:00:00        8
  show grid myvar[d=2]
    GRID GES2
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TDAY_TVAR1 TIME               20 r   02-JAN-1980 00:00    21-JAN-1980 00:00   full
  plot/line/sym myvar[d=2],myvar[d=1]
 
canc data/all
 
! --- aggregations of disjoint, irregularly-sized, T0-varying files ---
! aggregate two
  define data/agg/t myagg2 = tmp/tagg_disjoint_T0varying_1.nc, tmp/tagg_disjoint_T0varying_2.nc
 
 
! aggregate several
define data/agg/t myagg8 = tmp/tagg_disjoint_T0varying_1.nc, tmp/tagg_disjoint_T0varying_2.nc,tmp/tagg_disjoint_T0varying_3.nc, tmp/tagg_disjoint_T0varying_4.nc,tmp/tagg_disjoint_T0varying_5.nc, tmp/tagg_disjoint_T0varying_6.nc,tmp/tagg_disjoint_T0varying_7.nc, tmp/tagg_disjoint_T0varying_8.nc
  show data/full
     currently SET data sets:
    1> myagg2
 
     T-aggregation of 2 netCDF files
 name     title                             I         J         K         L
 MYVAR    L[GT=TDAY_TVAR]                  ...       ...       ...       1:11
               on grid GMV1 with -1.E+34 for missing data
             
 
  time range: 02-JAN-1981 00:00 to 11-JAN-1982 00:00
 
          time-dependent data files:
02-JAN-1981 00:00 -> 02-JAN-1981 00:00    tmp/tagg_disjoint_T0varying_1.nc
02-JAN-1982 00:00 -> 11-JAN-1982 00:00    tmp/tagg_disjoint_T0varying_2.nc
 
    2> myagg8  (default)
 
     T-aggregation of 8 netCDF files
 name     title                             I         J         K         L
 MYVAR    L[GT=TDAY_TVAR]                  ...       ...       ...       1:62
               on grid GMV2 with -1.E+34 for missing data
             
 
  time range: 02-JAN-1981 00:00 to 11-JAN-1988 00:00
 
          time-dependent data files:
02-JAN-1981 00:00 -> 02-JAN-1981 00:00    tmp/tagg_disjoint_T0varying_1.nc
02-JAN-1982 00:00 -> 11-JAN-1982 00:00    tmp/tagg_disjoint_T0varying_2.nc
02-JAN-1983 00:00 -> 02-JAN-1983 00:00    tmp/tagg_disjoint_T0varying_3.nc
02-JAN-1984 00:00 -> 11-JAN-1984 00:00    tmp/tagg_disjoint_T0varying_4.nc
02-JAN-1985 00:00 -> 11-JAN-1985 00:00    tmp/tagg_disjoint_T0varying_5.nc
02-JAN-1986 00:00 -> 11-JAN-1986 00:00    tmp/tagg_disjoint_T0varying_6.nc
02-JAN-1987 00:00 -> 11-JAN-1987 00:00    tmp/tagg_disjoint_T0varying_7.nc
02-JAN-1988 00:00 -> 11-JAN-1988 00:00    tmp/tagg_disjoint_T0varying_8.nc
 
  show data myagg2
     currently SET data sets:
    1> myagg2
 name     title                             I         J         K         L
 MYVAR    L[GT=TDAY_TVAR]                  ...       ...       ...       1:11
 
  show grid/t myvar[d=1]
    GRID GMV1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TDAY_TVAR TIME                11 i   02-JAN-1981 00:00    11-JAN-1982 00:00   full
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  02-JAN-1981 00:00:00      365        03-JUL-1980 12:00:00        1
       2>  02-JAN-1982 00:00:00      183        03-JUL-1981 12:00:00        366
       3>  03-JAN-1982 00:00:00      1          02-JAN-1982 12:00:00        367
       4>  04-JAN-1982 00:00:00      1          03-JAN-1982 12:00:00        368
       5>  05-JAN-1982 00:00:00      1          04-JAN-1982 12:00:00        369
       6>  06-JAN-1982 00:00:00      1          05-JAN-1982 12:00:00        370
       7>  07-JAN-1982 00:00:00      1          06-JAN-1982 12:00:00        371
       8>  08-JAN-1982 00:00:00      1          07-JAN-1982 12:00:00        372
       9>  09-JAN-1982 00:00:00      1          08-JAN-1982 12:00:00        373
      10>  10-JAN-1982 00:00:00      1          09-JAN-1982 12:00:00        374
      11>  11-JAN-1982 00:00:00      1          10-JAN-1982 12:00:00        375
  show grid myvar[d=2]
    GRID GMV2
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TDAY_TVAR1 TIME               62 i   02-JAN-1981 00:00    11-JAN-1988 00:00   full
  plot/line/sym/vlim=0:11 myvar[d=2],myvar[d=1]
 
! a few tests of using Ferret string variables to get the names of files
define data/agg/t listAgg1 = {"tmp/tagg_reg_1.nc", "tmp/tagg_reg_2.nc"}
show data/files listAgg1
     currently SET data sets:
    3> listAgg1  (default)
 name     title                             I         J         K         L
 MYVAR    SIN(T[GT=TDAY]/10) + L[GT=TDAY]  ...       ...       ...       1:20
 MYMAP    I[X=0E:0E:5]+ 10*J[Y=80S:80N:5]  1:73      1:33      ...       ...
 
          time-dependent data files:
01-JAN-1980 00:00 -> 10-JAN-1980 00:00    tmp/tagg_reg_1.nc
11-JAN-1980 00:00 -> 20-JAN-1980 00:00    tmp/tagg_reg_2.nc
 
 
! define a long aggregation
let file_list = SPAWN("ls -1 tmp/tagg_reg_?.nc")
define data/agg/t listAgg2 = file_list
show data/files listAgg2
     currently SET data sets:
    4> listAgg2  (default)
 name     title                             I         J         K         L
 MYVAR    SIN(T[GT=TDAY]/10) + L[GT=TDAY]  ...       ...       ...       1:90
 MYMAP    I[X=0E:0E:5]+ 10*J[Y=80S:80N:5]  1:73      1:33      ...       ...
 
          time-dependent data files:
01-JAN-1980 00:00 -> 10-JAN-1980 00:00    tmp/tagg_reg_1.nc
11-JAN-1980 00:00 -> 20-JAN-1980 00:00    tmp/tagg_reg_2.nc
21-JAN-1980 00:00 -> 30-JAN-1980 00:00    tmp/tagg_reg_3.nc
31-JAN-1980 00:00 -> 09-FEB-1980 00:00    tmp/tagg_reg_4.nc
10-FEB-1980 00:00 -> 19-FEB-1980 00:00    tmp/tagg_reg_5.nc
20-FEB-1980 00:00 -> 29-FEB-1980 00:00    tmp/tagg_reg_6.nc
01-MAR-1980 00:00 -> 10-MAR-1980 00:00    tmp/tagg_reg_7.nc
11-MAR-1980 00:00 -> 20-MAR-1980 00:00    tmp/tagg_reg_8.nc
21-MAR-1980 00:00 -> 30-MAR-1980 00:00    tmp/tagg_reg_9.nc
 
 
! reorder deliberately out of order file of differing lengths
define data/agg/t myagg8_disordered3 = tmp/tagg_disjoint_T0varying_2.nc, tmp/tagg_disjoint_T0varying_1.nc,tmp/tagg_disjoint_T0varying_5.nc, tmp/tagg_disjoint_T0varying_4.nc,tmp/tagg_disjoint_T0varying_3.nc, tmp/tagg_disjoint_T0varying_8.nc,tmp/tagg_disjoint_T0varying_7.nc, tmp/tagg_disjoint_T0varying_6.nc
show data/files/brief myagg8_disordered3
     currently SET data sets:
    5> myagg8_disordered3  (default)
tmp/tagg_disjoint_T0varying_1.nc
tmp/tagg_disjoint_T0varying_2.nc
tmp/tagg_disjoint_T0varying_3.nc
tmp/tagg_disjoint_T0varying_4.nc
tmp/tagg_disjoint_T0varying_5.nc
tmp/tagg_disjoint_T0varying_6.nc
tmp/tagg_disjoint_T0varying_7.nc
tmp/tagg_disjoint_T0varying_8.nc
 
! ... the same calendar axis, but encoded with the T0 of the first file
show grid/l=1:8 myvar[d=myagg8]
    GRID GMV2
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TDAY_TVAR1 TIME               62 i   02-JAN-1981 00:00    11-JAN-1988 00:00   full
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  02-JAN-1981 00:00:00      365        03-JUL-1980 12:00:00        1
       2>  02-JAN-1982 00:00:00      183        03-JUL-1981 12:00:00        366
       3>  03-JAN-1982 00:00:00      1          02-JAN-1982 12:00:00        367
       4>  04-JAN-1982 00:00:00      1          03-JAN-1982 12:00:00        368
       5>  05-JAN-1982 00:00:00      1          04-JAN-1982 12:00:00        369
       6>  06-JAN-1982 00:00:00      1          05-JAN-1982 12:00:00        370
       7>  07-JAN-1982 00:00:00      1          06-JAN-1982 12:00:00        371
       8>  08-JAN-1982 00:00:00      1          07-JAN-1982 12:00:00        372
show grid/l=1:8 myvar[d=myagg8_disordered3]
    GRID GOS1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TDAY_TVAR2 TIME               62 i   02-JAN-1981 00:00    11-JAN-1988 00:00   full
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  02-JAN-1981 00:00:00      365        03-JUL-1980 12:00:00        -364
       2>  02-JAN-1982 00:00:00      183        03-JUL-1981 12:00:00        1
       3>  03-JAN-1982 00:00:00      1          02-JAN-1982 12:00:00        2
       4>  04-JAN-1982 00:00:00      1          03-JAN-1982 12:00:00        3
       5>  05-JAN-1982 00:00:00      1          04-JAN-1982 12:00:00        4
       6>  06-JAN-1982 00:00:00      1          05-JAN-1982 12:00:00        5
       7>  07-JAN-1982 00:00:00      1          06-JAN-1982 12:00:00        6
       8>  08-JAN-1982 00:00:00      1          07-JAN-1982 12:00:00        7
 
cancel data/all
 
! deliberate errors
set mode ignore
! deliberate error - try to re-use a name already in use
  define data/agg/t myagg2 = tmp/tagg_disjoint_T0varying_1.nc, tmp/tagg_disjoint_T0varying_2.nc
 
! deliberate error - the fourth file (*_4_wrong.nc) changes time axis name
define data/agg/t myagg5_bad = tmp/tagg_disjoint_T0varying_1.nc, tmp/tagg_disjoint_T0varying_2.nc,tmp/tagg_disjoint_T0varying_3.nc, tmp/tagg_disjoint_T0varying_4_wrong.nc,tmp/tagg_disjoint_T0varying_5.nc
set mode/last ignore
 
canc data/all
 
! --- aggregations of single timestep files ---
! define a regular aggregation
define data/agg/t MYsing_reg_agg6 = tmp/tagg_single_1.nc, tmp/tagg_single_2.nc,tmp/tagg_single_3.nc, tmp/tagg_single_4.nc,tmp/tagg_single_5.nc, tmp/tagg_single_6.nc
show data/full  MYsing_reg_agg6
     currently SET data sets:
    1> MYsing_reg_agg6  (default)
 
     T-aggregation of 6 netCDF files
 name     title                             I         J         K         L
 MYVAR    SIN(T[GT=TDAY]/10) + L[GT=TDAY]  ...       ...       ...       1:6
               on grid GNP1 with -1.E+34 for missing data
             
 MYMAP    I[X=0E:0E:5]+ 10*J[Y=80S:80N:5]  1:73      1:33      ...       ...
               on grid GNP2 with -1.E+34 for missing data
             X=2.5W(-2.5):2.5E(362.5)  Y=82.5S:82.5N  
 
  time range: 01-JAN-1980 00:00 to 06-JAN-1980 00:00
 
          time-dependent data files:
01-JAN-1980 00:00 -> 01-JAN-1980 00:00    tmp/tagg_single_1.nc
02-JAN-1980 00:00 -> 02-JAN-1980 00:00    tmp/tagg_single_2.nc
03-JAN-1980 00:00 -> 03-JAN-1980 00:00    tmp/tagg_single_3.nc
04-JAN-1980 00:00 -> 04-JAN-1980 00:00    tmp/tagg_single_4.nc
05-JAN-1980 00:00 -> 05-JAN-1980 00:00    tmp/tagg_single_5.nc
06-JAN-1980 00:00 -> 06-JAN-1980 00:00    tmp/tagg_single_6.nc
 
show grid/t myvar
    GRID GNP1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TDAY1     TIME                 6 r   01-JAN-1980 00:00    06-JAN-1980 00:00   full
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  01-JAN-1980 00:00:00      1          31-DEC-1979 12:00:00        28840
       2>  02-JAN-1980 00:00:00      1          01-JAN-1980 12:00:00        28841
       3>  03-JAN-1980 00:00:00      1          02-JAN-1980 12:00:00        28842
       4>  04-JAN-1980 00:00:00      1          03-JAN-1980 12:00:00        28843
       5>  05-JAN-1980 00:00:00      1          04-JAN-1980 12:00:00        28844
       6>  06-JAN-1980 00:00:00      1          05-JAN-1980 12:00:00        28845
 
! read a time-independent field from the first file of the aggregation
stat mymap
 
             I[X=0E:0E:5]+ 10*J[Y=80S:80N:5]
             LONGITUDE: 2.5W(-2.5) to 2.5E(362.5)
             LATITUDE: 82.5S to 82.5N
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: MYsing_reg_agg6
 
 Total # of data points: 2409 (73*33*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 11
 Maximum value: 403
 Mean    value: 207 (unweighted average)
 Standard deviation: 97.543
 
! define an irregular aggregation
define data/agg/t MYsing_irreg_agg4 = tmp/tagg_single_1.nc, tmp/tagg_single_2.nc,tmp/tagg_single_4.nc, tmp/tagg_single_5.nc
show data/full MYsing_irreg_agg4
     currently SET data sets:
    2> MYsing_irreg_agg4  (default)
 
     T-aggregation of 4 netCDF files
 name     title                             I         J         K         L
 MYVAR    SIN(T[GT=TDAY]/10) + L[GT=TDAY]  ...       ...       ...       1:4
               on grid GNP3 with -1.E+34 for missing data
             
 MYMAP    I[X=0E:0E:5]+ 10*J[Y=80S:80N:5]  1:73      1:33      ...       ...
               on grid GNP4 with -1.E+34 for missing data
             X=2.5W(-2.5):2.5E(362.5)  Y=82.5S:82.5N  
 
  time range: 01-JAN-1980 00:00 to 05-JAN-1980 00:00
 
          time-dependent data files:
01-JAN-1980 00:00 -> 01-JAN-1980 00:00    tmp/tagg_single_1.nc
02-JAN-1980 00:00 -> 02-JAN-1980 00:00    tmp/tagg_single_2.nc
04-JAN-1980 00:00 -> 04-JAN-1980 00:00    tmp/tagg_single_4.nc
05-JAN-1980 00:00 -> 05-JAN-1980 00:00    tmp/tagg_single_5.nc
 
show grid/t myvar
    GRID GNP3
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TDAY2     TIME                 4 i   01-JAN-1980 00:00    05-JAN-1980 00:00   full
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  01-JAN-1980 00:00:00      1          31-DEC-1979 12:00:00        28840
       2>  02-JAN-1980 00:00:00      1.5        01-JAN-1980 12:00:00        28841
       3>  04-JAN-1980 00:00:00      1.5        03-JAN-1980 00:00:00        28843
       4>  05-JAN-1980 00:00:00      1          04-JAN-1980 12:00:00        28844
 
! 2/2016 - reorder deliberately out of order aggregation of irregular times
define data/agg/t MYsing_irreg_agg4_disordered1 = tmp/tagg_single_2.nc, tmp/tagg_single_1.nc,tmp/tagg_single_4.nc, tmp/tagg_single_5.nc
define data/agg/t MYsing_irreg_agg4_disordered2 = tmp/tagg_single_1.nc, tmp/tagg_single_2.nc,tmp/tagg_single_5.nc, tmp/tagg_single_4.nc
show data/files/brief
     currently SET data sets:
    1> MYsing_reg_agg6
tmp/tagg_single_1.nc
tmp/tagg_single_2.nc
tmp/tagg_single_3.nc
tmp/tagg_single_4.nc
tmp/tagg_single_5.nc
tmp/tagg_single_6.nc
 
    2> MYsing_irreg_agg4
tmp/tagg_single_1.nc
tmp/tagg_single_2.nc
tmp/tagg_single_4.nc
tmp/tagg_single_5.nc
 
    3> MYsing_irreg_agg4_disordered1
tmp/tagg_single_1.nc
tmp/tagg_single_2.nc
tmp/tagg_single_4.nc
tmp/tagg_single_5.nc
 
    4> MYsing_irreg_agg4_disordered2  (default)
tmp/tagg_single_1.nc
tmp/tagg_single_2.nc
tmp/tagg_single_4.nc
tmp/tagg_single_5.nc
 
stat/brief T[g=myvar[d=MYsing_irreg_agg4]] - T[g=myvar[d=MYsing_irreg_agg4_disordered1]]
 
 Total # of data points: 4 (1*1*1*4*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
stat/brief TBOXLO[g=myvar[d=MYsing_irreg_agg4]] - TBOXLO[g=myvar[d=MYsing_irreg_agg4_disordered1]]
 
 Total # of data points: 4 (1*1*1*4*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
stat/brief TBOXHI[g=myvar[d=MYsing_irreg_agg4]] - TBOXHI[g=myvar[d=MYsing_irreg_agg4_disordered1]]
 
 Total # of data points: 4 (1*1*1*4*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
canc data/all
 
! "USE file.agg" test
! test the hack to XEQ_SET which permits "SET DATA file.agg" to metamorphose
! into "GO file.agg"
spawn echo "define data/agg/t myagg3 = tmp/tagg_reg_1.nc, tmp/tagg_reg_2.nc,tmp/tagg_reg_3.nc" > tmp/good_agg.agg
spawn echo "garbage command syntax" > tmp/bad_agg.agg
 
! deliberate errorrs
! bad .agg aggregation file
set mode ignore
USE "tmp/bad_agg.agg"
garbage command syntax
 
! irregular aggregation with first file duplicated
define data/agg/t MYsing_irreg_agg4 = tmp/tagg_single_1.nc, tmp/tagg_single_1.nc, tmp/tagg_single_2.nc,tmp/tagg_single_4.nc, tmp/tagg_single_5.nc
 
! irregular aggregation with last file duplicated
define data/agg/t MYsing_irreg_agg4 = tmp/tagg_single_1.nc, tmp/tagg_single_2.nc,tmp/tagg_single_4.nc, tmp/tagg_single_5.nc, tmp/tagg_single_5.nc
 
set/last mode ignore
 
! valid syntax to initialize an aggregation
USE "tmp/good_agg.agg"
define data/agg/t myagg3 = tmp/tagg_reg_1.nc, tmp/tagg_reg_2.nc,tmp/tagg_reg_3.nc
show data/br
     currently SET data sets:
    1> myagg3  (default)
cancel data/all
*** Running ferret script: bn_unquoted_args_noremote.jnl
! bn_unquoted_args_noremote.jnl
! 12/2015 -- a hack change to PPARSE_COMMAND to allow users to omit
! the quotation marks in the argument(s) of SET DATA, GO and DEFINE SYMBOL
 
! 2/2016 *sh* removed the GO/HELP tests
 
spawn "mkdir -p tmp"
 
! ****** SET DATA TESTS *****
! make test files
save/clobber/file="tmp/test1.nc" i[i=1:3] + 1
save/clobber/file="tmp/test2.nc" i[i=1:3] + 2
save/clobber/file="tmp/test3.nc" i[i=1:3] + 3
! generate absolute path
let dir = SPAWN("pwd")
define sym use_abs_path = `DIR+"/tmp/test1.nc"`
 !-> define sym use_abs_path = ....../bench/tmp/test1.nc
say ($use_abs_path)
 !-> MESSAGE/CONTINUE ....../bench/tmp/test1.nc
....../bench/tmp/test1.nc
 
use tmp/test1.nc
show data/brief
     currently SET data sets:
    1> tmp/test1.nc  (default)
canc data/all
 
use "tmp/test1.nc"
show data/brief
     currently SET data sets:
    1> tmp/test1.nc  (default)
canc data/all
 
use "tmp/test1.nc"
show data/brief
     currently SET data sets:
    1> tmp/test1.nc  (default)
canc data/all
 
use tmp/test1.nc
show data/brief
     currently SET data sets:
    1> tmp/test1.nc  (default)
canc data/all
 
use "($use_abs_path)"
 !-> SET DAT/FORM=CDF "....../bench/tmp/test1.nc"
show data/brief
     currently SET data sets:
    1> ....../bench/tmp/test1.nc  (default)
canc data/all
 
use ($use_abs_path)
 !-> SET DAT/FORM=CDF ....../bench/tmp/test1.nc
show data/brief
     currently SET data sets:
    1> ....../bench/tmp/test1.nc  (default)
canc data/all
 
use tmp/test1.nc,tmp/test2.nc,tmp/test3.nc
show data/brief
     currently SET data sets:
    1> tmp/test1.nc
    2> tmp/test2.nc
    3> tmp/test3.nc  (default)
canc data/all
 
use tmp/test1.nc,"tmp/test2.nc", tmp/test3.nc
show data/brief
     currently SET data sets:
    1> tmp/test1.nc
    2> tmp/test2.nc
    3> tmp/test3.nc  (default)
canc data/all
 
! deliberate errors
! erroneous qualifier with no white space detected
set mode ignore
set data/erroneous tmp/test1.nc
 
! erroneous qualifier with white space detected
set data /erroneous tmp/test1.nc
 
! erroneous qualifier with comma treated as an invalid filename
set data /erroneous, tmp/test1.nc
 
can mode ignore
 
canc data/all
 
 
! ****** GO script tests *****
! make a dummy GO file for testing
spawn rm -f tmp/dummy.jnl
spawn echo "say hello" >tmp/dummy.jnl
spawn echo 'say $1"1-n/a"  $2"2-n/a"  $3"3-n/a"  $4"4-n/a" $5"5-n/a" $6"6-n/a" $7"7-n/a" $8"8-n/a"' > tmp/testMe.jnl
 
! generate absolute path
let dir = SPAWN("pwd")
define sym abs_path = `DIR+"/tmp/testMe.jnl"`
 !-> define sym abs_path = ....../bench/tmp/testMe.jnl
say ($abs_path)
 !-> MESSAGE/CONTINUE ....../bench/tmp/testMe.jnl
....../bench/tmp/testMe.jnl
 
go tmp/testMe.jnl
say $1"1-n/a"  $2"2-n/a"  $3"3-n/a"  $4"4-n/a" $5"5-n/a" $6"6-n/a" $7"7-n/a" $8"8-n/a"
 !-> MESSAGE/CONTINUE 1-n/a  2-n/a  3-n/a  4-n/a 5-n/a 6-n/a 7-n/a 8-n/a
1-n/a  2-n/a  3-n/a  4-n/a 5-n/a 6-n/a 7-n/a 8-n/a
 
go "tmp/testMe.jnl"
say $1"1-n/a"  $2"2-n/a"  $3"3-n/a"  $4"4-n/a" $5"5-n/a" $6"6-n/a" $7"7-n/a" $8"8-n/a"
 !-> MESSAGE/CONTINUE 1-n/a  2-n/a  3-n/a  4-n/a 5-n/a 6-n/a 7-n/a 8-n/a
1-n/a  2-n/a  3-n/a  4-n/a 5-n/a 6-n/a 7-n/a 8-n/a
 
go ($abs_path)
 !-> go ....../bench/tmp/testMe.jnl
say $1"1-n/a"  $2"2-n/a"  $3"3-n/a"  $4"4-n/a" $5"5-n/a" $6"6-n/a" $7"7-n/a" $8"8-n/a"
 !-> MESSAGE/CONTINUE 1-n/a  2-n/a  3-n/a  4-n/a 5-n/a 6-n/a 7-n/a 8-n/a
1-n/a  2-n/a  3-n/a  4-n/a 5-n/a 6-n/a 7-n/a 8-n/a
 
go "($abs_path)"
 !-> go "....../bench/tmp/testMe.jnl"
say $1"1-n/a"  $2"2-n/a"  $3"3-n/a"  $4"4-n/a" $5"5-n/a" $6"6-n/a" $7"7-n/a" $8"8-n/a"
 !-> MESSAGE/CONTINUE 1-n/a  2-n/a  3-n/a  4-n/a 5-n/a 6-n/a 7-n/a 8-n/a
1-n/a  2-n/a  3-n/a  4-n/a 5-n/a 6-n/a 7-n/a 8-n/a
 
go tmp/testMe 5 hello "bye" "/quoted_path" /unquoted_path
say $1"1-n/a"  $2"2-n/a"  $3"3-n/a"  $4"4-n/a" $5"5-n/a" $6"6-n/a" $7"7-n/a" $8"8-n/a"
 !-> MESSAGE/CONTINUE 5  hello  bye  /quoted_path /unquoted_path 6-n/a 7-n/a 8-n/a
5  hello  bye  /quoted_path /unquoted_path 6-n/a 7-n/a 8-n/a
 
go "tmp/testMe" 5 hello "bye" "/quoted_path" /unquoted_path
say $1"1-n/a"  $2"2-n/a"  $3"3-n/a"  $4"4-n/a" $5"5-n/a" $6"6-n/a" $7"7-n/a" $8"8-n/a"
 !-> MESSAGE/CONTINUE 5  hello  bye  /quoted_path /unquoted_path 6-n/a 7-n/a 8-n/a
5  hello  bye  /quoted_path /unquoted_path 6-n/a 7-n/a 8-n/a
 
go ($abs_path) 5 hello "bye" "/quoted_path" /unquoted_path
 !-> go ....../bench/tmp/testMe.jnl 5 hello "bye" "/quoted_path" /unquoted_path
say $1"1-n/a"  $2"2-n/a"  $3"3-n/a"  $4"4-n/a" $5"5-n/a" $6"6-n/a" $7"7-n/a" $8"8-n/a"
 !-> MESSAGE/CONTINUE 5  hello  bye  /quoted_path /unquoted_path 6-n/a 7-n/a 8-n/a
5  hello  bye  /quoted_path /unquoted_path 6-n/a 7-n/a 8-n/a
 
go "($abs_path)" 5 hello "bye" "/quoted_path" /unquoted_path
 !-> go "....../bench/tmp/testMe.jnl" 5 hello "bye" "/quoted_path" /unquoted_path
say $1"1-n/a"  $2"2-n/a"  $3"3-n/a"  $4"4-n/a" $5"5-n/a" $6"6-n/a" $7"7-n/a" $8"8-n/a"
 !-> MESSAGE/CONTINUE 5  hello  bye  /quoted_path /unquoted_path 6-n/a 7-n/a 8-n/a
5  hello  bye  /quoted_path /unquoted_path 6-n/a 7-n/a 8-n/a
 
! test GO/HELP
! 2/2016 - commented these tests out, tho they work fine.   GO/HELP
!          apparently runs asynchronously with the bench logging (why?)
!          This results in the placement of the GO/HELP output shifting in
!          the benchmark output log -- a hassle when comparing benchmarks
!go/help tmp/testMe
!go /help tmp/testMe
!go/help "tmp/testMe"
!go/help ($abs_path)
!go/help "($abs_path)"
 
! a few tests the slipped through the first time
GO tmp/testMe POLYGON/KEY/lev=20 xpts,ypts,sst,star
say $1"1-n/a"  $2"2-n/a"  $3"3-n/a"  $4"4-n/a" $5"5-n/a" $6"6-n/a" $7"7-n/a" $8"8-n/a"
 !-> MESSAGE/CONTINUE POLYGON/KEY/lev=20  xpts  ypts  sst star 6-n/a 7-n/a 8-n/a
POLYGON/KEY/lev=20  xpts  ypts  sst star 6-n/a 7-n/a 8-n/a
go "tmp/testMe.jnl" /home/users/tmap/ferret/linux/fer_dsets/data/coads_climatology.cdf
say $1"1-n/a"  $2"2-n/a"  $3"3-n/a"  $4"4-n/a" $5"5-n/a" $6"6-n/a" $7"7-n/a" $8"8-n/a"
 !-> MESSAGE/CONTINUE /home/users/tmap/ferret/linux/fer_dsets/data/coads_climatology.cdf  2-n/a  3-n/a  4-n/a 5-n/a 6-n/a 7-n/a 8-n/a
/home/users/tmap/ferret/linux/fer_dsets/data/coads_climatology.cdf  2-n/a  3-n/a  4-n/a 5-n/a 6-n/a 7-n/a 8-n/a
if 1 then let/quiet mytestvar = whatever
sh var mytestvar
 MYTESTVAR = WHATEVER
 
 
set mode ignore
go/garbage tmp/testMe
go/garbage "tmp/testMe"
go/garbage ($abs_path)
go/garbage "($abs_path)"
set mode/last ignore
 
 
*** Running ferret script: bn_long_lists.jnl
! bn_long_lists.jnl
! See ticket 2337
!
! Increase command-line buffer by a factor of 10, to accomodate long lists
! defined in the variable definition.
! Also allow for more items in the list.
 
! 2/2016, backed off the extra-long buffer, but keep these tests, on shortened variables.
 
! This one gets its Title truncated
 
let file_list = {\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0001.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0002.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0003.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0004.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0005.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0005.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0006.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0007.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0008.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0009.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0010.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0011.t_surf.nc"}
 
let longlist = {1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0}
 
show var
 Created by DEFINE VARIABLE:
 >>> Definitions that replace any file variable of same name:
     LONGLIST = {1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0}
     FILE_LIST = {"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0001.t_surf.nc","/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0002.t_surf.nc","/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0003.t_surf.nc","/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0004.t_surf.nc","/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0005.t_surf.nc","/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0005.t_surf.nc","/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0006.t_surf.nc","/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0007.t_surf.nc","/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0008.t_surf.nc","/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0009.t_surf.nc","/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0010.t_surf.nc","/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0011.t_surf.nc"}
 
! do them in repeat loop
 
repeat/range=1:4:1/name=q (let file_list = {\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0001.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0002.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0003.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0004.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0005.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0005.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0006.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0007.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0008.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0009.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0010.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0011.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0012.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0013.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0014.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0015.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0016.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0017.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0018.t_surf.nc",\
} )
!-> REPEAT: Q:1
!-> REPEAT: Q:2
!-> REPEAT: Q:3
!-> REPEAT: Q:4
 
! Intentional errors:
! Make them longer
 
set mode ignore
 
! Line length still under 2048, but more items than 1000,
! issues a NOTE that they're not all parsed.
 
let a={1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,\
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0}
load a
 
! command line too long
 
let file_list = {\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0001.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0002.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0003.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0004.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0005.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0005.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0006.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0007.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0008.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0009.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0010.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0011.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0012.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0013.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0014.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0015.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0016.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0017.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0018.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0019.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0020.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0021.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0022.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0023.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0024.t_surf.nc",\
"/archive/ccsp/ipcc_ar4/CM2.1U-D4_1860-2000-AllForc_H1/pp/atmos/ts/monthly/100yr/atmos.0025.t_surf.nc",\}
 
set mode/last ignore
*** Running ferret script: bn_show_uvar_grid.jnl
! bn_show_uvar_grid.jnl
! Add notes to the output of SHOW GRID for variables and expressions
! indicate compressed axes, point subsets and subset ranges.
! For grid changing functions just mark axis as such
!
! 12/17/2015 *acm*
! 12/18 2015 *acm* Add constant and constant-array variables,
!                  and modulo axis request on more than full range
 
use coads_climatology
show grid sst[x=240:320,y=0,t=@ave]
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            40 pts
 COADSY    LATITUDE            90 r   89S                  89N                 1 pt
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        compressed
 
! Modulo axes ask for superset
show grid sst[x=0:540,L=1:15]
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            270 pts
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        15 pts
 
! Constant: full abstract grid
show grid 1
    GRID ABSTRACT
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              full
 ABSTRACT  Y             99999999 r   1                    1.E+08              full
 ABSTRACT  Z             99999999 r   1                    1.E+08              full
 ABSTRACT  T             99999999 r   1                    1.E+08              full
 ABSTRACT  E             99999999 r   1                    1.E+08              full
 ABSTRACT  F             99999999 r   1                    1.E+08              full
 
! Constant-array
show grid {1}
    GRID XABSTRACT
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              1 pt
 normal    Y
 normal    Z
 normal    T
let var = {1,2,4,8}  ! Note that show grid {1,2,4,8} fails: bug
show grid var
    GRID XABSTRACT
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              4 pts
 normal    Y
 normal    Z
 normal    T
 
! but don't show any user-var grid info if they just ask for the grid by name
show grid `sst,return=grid`
 !-> show grid GSQ1
    GRID GSQ1
 name       axis              # pts   start                end
 COADSX    LONGITUDE          180mr   21E                  19E(379)
 COADSY    LATITUDE            90 r   89S                  89N
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58
 
! grid of last variable loaded
load sst[x=240,y=@iin,t=@ave]
show grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid GSQ1
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            1 pt
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        compressed
 
! Result grid is full grid
let var = sst[L=@ave] - sst[x=@max] - sst[y=0]
show grid var
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
 
! transform on single-point range is equiv. to single-point subset
 
cancel mode interpolate  ! otherwise single-pt range fails
let var = sst[X=30@max]
show grid var
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            1 pt
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
set mode/last interpolate
let var = sst[X=30:30.1@max]
show grid var
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            1 pt
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
 
! dynamic grid
let var = sst[y=-10:10:.1,l=1,x=160e]
show grid var
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            1 pt
 (AX###)   LATITUDE           201 r   10S                  10N                 201 pts
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        1 pt
 
! striding
show grid sst[i=1:180:3,j=1:90:2]
    GRID (G###)
 name       axis              # pts   start                end                 subset
 (AX###)   LONGITUDE           60 r   21E                  15E(375)            60 pts
 (AX###)   LATITUDE            45 r   89S                  87N                 45 pts
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
 
! regridding
 
use coads_vwnd
define axis/t=1-jan-1980:31-dec-1982:1/units=days dax
let vwnd_days = vwnd[gt=dax,t=1-jun-1982:15-jul-1982]
sh grid vwnd_days
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 DAX       TIME              1096 r   01-JAN-1980 00:00    31-DEC-1982 00:00   45 pts
 
let vwnd_clim = vwnd[gt=month_irreg@mod]
sh grid vwnd_clim[L=4:9]
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 MONTH_IRREG TIME              12mi   16-JAN 12:00         15-DEC 17:49        6 pts
 
can dat/all
use coads_climatology
 
! non-compressing transforms
 
let var = sst[y=@iin]
show grid var
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
 
let var = sst[y=-30:30@iin]
show grid var
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 30 pts
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
 
use levitus_3d_subset
let var = temp[z=@weq:20]
show grid var
    GRID GAO1
 name       axis              # pts   start                end                 subset
 XAXLEVITR101_102 LONGITUDE     2mr   120.5E               121.5E              full
 YAXLEVITR41_42 LATITUDE        2 r   49.5S                48.5S               full
 ZAXLEVITR DEPTH (m)           20 i-  0                    5000                full
 normal    T
 
let var = temp[z=1:120@weq:20]
show grid var
    GRID GAO1
 name       axis              # pts   start                end                 subset
 XAXLEVITR101_102 LONGITUDE     2mr   120.5E               121.5E              full
 YAXLEVITR41_42 LATITUDE        2 r   49.5S                48.5S               full
 ZAXLEVITR DEPTH (m)           20 i-  0                    5000                7 pts
 normal    T
 
 
! grid-changing functions
can dat/all
use levitus_3d_subset
let depth =  Z[G=TEMP]+ 0*TEMP[K=1]
let depth_rev = zreverse(depth)
show grid depth_rev
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXLEVITR101_102 LONGITUDE     2mr   120.5E               121.5E              full
 YAXLEVITR41_42 LATITUDE        2 r   49.5S                48.5S               full
 ABSTRACT  Z             99999999 r   1                    1.E+08              (axis from grid-changing func)
 normal    T
 
DEFINE AXIS/t=1-Jan-1990:31-Dec-1990:24/t0=1-jan-1980 dayt
let tpts = t[gt=dayt]
LET sample_function = sin(0.5*tpts - 6.)/2. - cos(0.3*tpts)
 
show grid ffta(sample_function)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 (AX###)   T (CYC/HOURS)      182 r   1.1447E-04           0.020833            (axis from grid-changing func)
 
show grid ffta(sample_function[t=15-jan-1990:15-jun-1990])
    GRID (G###)
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 (AX###)   T (CYC/HOURS)       76 r   2.7412E-04           0.020833            (axis from grid-changing func)
 
show grid ffta(sample_function + temp[d=levitus_3d_subset,z=0:40])
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXLEVITR101_102 LONGITUDE     2mr   120.5E               121.5E              full
 YAXLEVITR41_42 LATITUDE        2 r   49.5S                48.5S               full
 ZAXLEVITR DEPTH (m)           20 i-  0                    5000                4 pts
 (AX###)   T (CYC/HOURS)      182 r   1.1447E-04           0.020833            (axis from grid-changing func)
 
can dat/all
 
! auxiliary regridding
 
use levitus_3d_subset.nc
LET Zpts = Z[Z=100:500:100]
DEFINE AXIS/z/units=meters zax = zpts
LET/D=levitus_3d_subset depth = z[g=temp]+ 0*temp[k=1]
let  TEMPZ = TEMP[GZ(DEPTH)=ZPTS]
 
sh grid tempz
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXLEVITR101_102 LONGITUDE     2mr   120.5E               121.5E              full
 YAXLEVITR41_42 LATITUDE        2 r   49.5S                48.5S               full
 (AX###)   Z                    5 r   100                  500                 full
 normal    T
sh grid tempz[z=100:400]
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXLEVITR101_102 LONGITUDE     2mr   120.5E               121.5E              full
 YAXLEVITR41_42 LATITUDE        2 r   49.5S                48.5S               full
 (AX###)   Z                    5 r   100                  500                 4 pts
 normal    T
 
! and with a grid-changing function thrown in
 
use levitus_3d_subset.nc
LET Zpts = Z[Z=100:500:100]
DEFINE AXIS/z/units=meters zax = zpts
LET/D=levitus_3d_subset rvdepth  = rvdepth0[gz=temp@asn]
LET/D=levitus_3d_subset depth = z[g=temp]+ 0*temp[k=1]
LET rvtemp0 = ZREVERSE(temp)
LET rvtemp  = rvtemp0[gz=temp@asn]
LET rvdepth0 = ZREVERSE(depth)
LET rvtempzax = rvtemp[gz(rvdepth)=zax,z=100:500]
show grid rvtempzax
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXLEVITR101_102 LONGITUDE     2mr   120.5E               121.5E              full
 YAXLEVITR41_42 LATITUDE        2 r   49.5S                48.5S               full
 ZAX       Z (METERS)           5 r   100                  500                 (axis from grid-changing func)
 normal    T
 
! gc func: limits are hidden so a subset not seen
 
LET rvtempzax = rvtemp[gz(rvdepth)=zax]
show grid rvtempzax[z=100:300]
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXLEVITR101_102 LONGITUDE     2mr   120.5E               121.5E              full
 YAXLEVITR41_42 LATITUDE        2 r   49.5S                48.5S               full
 ZAX       Z (METERS)           5 r   100                  500                 (axis from grid-changing func)
 normal    T
*** Running ferret script: bn_aggregate_f.jnl
! bn_aggregate_f.F
! 12/2015 *sh*
! 1/2016 *sh* added implicit naming of aggregation from script filename
! 6/2018 *acm*Note SHOW DATA output changes slightly
!              Forecast series of... patterned on fcst_1 (not fcst_1.nc)
!              also auto-generated grid names change
 
! exercise FMRC aggregations
 
spawn "mkdir -p tmp"     ! tmp directory t store files
 
! *** create an artificial forecast model run collection ***
 
! a 20x20 lat-long region
DEFINE AXIS/X=140E:160E:1 xax
DEFINE AXIS/Y=20N:40N:1 yax
 
! a 20 year regular monthly axis starting in Jan 1950
DEFINE AXIS/UNITS=DAYS/T0=01-JAN-1900/EDGES/T=01-JAN-1950:31-DEC-1970:`365.2425/12` monthly
 !-> DEFINE AXIS/UNITS=DAYS/T0=01-JAN-1900/EDGES/T=01-JAN-1950:31-DEC-1970:30.436875 monthly
 
! define a moving field with errors increasing from a given forecast date
let vy = 1/500      ! speed that forecast structure deviates from truth
let vx = (1+(T[gt=monthly]-tstart)/2000)* 1/300
let xt = x[gx=xax]-vx*T[gt=monthly]
let yt = y[gy=yax]-vy*T[gt=monthly]
let field = COS((xt-150)/5)*COS((yt-30)/5)
let fcst = field + fcst_error
let static_error = SIN((x[gx=xax]-140)/5)*SIN((y[gy=yax]-20)/5) + RANDU(x[gx=xax]+y[gy=yax])
let structure_drift = (t[gt=monthly]-tstart)/5000 * static_error
let random_error = (t[gt=monthly]-tstart)/2000 * RANDU(t[gt=monthly]+x[gx=xax]+y[gy=yax])
let fcst_error = structure_drift + random_error
let/title="another variable" fcst_2 = fcst + 2
 
! every 3 months another 2-year forecast
repeat/name=fdate/range=1:31:3 (let tstart = t[gt=monthly,l=`fdate`];save/clobber/file="tmp/fcst_`(fdate-1)/3+1`.nc"/l=`fdate`:`fdate+23` fcst,  fcst_2)
!-> REPEAT: FDATE:1
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=1]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/fcst_1.nc"/l=1:24 fcst,  fcst_2
!-> REPEAT: FDATE:4
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=4]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/fcst_2.nc"/l=4:27 fcst,  fcst_2
!-> REPEAT: FDATE:7
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=7]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/fcst_3.nc"/l=7:30 fcst,  fcst_2
!-> REPEAT: FDATE:10
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=10]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/fcst_4.nc"/l=10:33 fcst,  fcst_2
!-> REPEAT: FDATE:13
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=13]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/fcst_5.nc"/l=13:36 fcst,  fcst_2
!-> REPEAT: FDATE:16
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=16]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/fcst_6.nc"/l=16:39 fcst,  fcst_2
!-> REPEAT: FDATE:19
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=19]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/fcst_7.nc"/l=19:42 fcst,  fcst_2
!-> REPEAT: FDATE:22
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=22]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/fcst_8.nc"/l=22:45 fcst,  fcst_2
!-> REPEAT: FDATE:25
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=25]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/fcst_9.nc"/l=25:48 fcst,  fcst_2
!-> REPEAT: FDATE:28
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=28]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/fcst_10.nc"/l=28:51 fcst,  fcst_2
!-> REPEAT: FDATE:31
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=31]
 !-> LIST/FORMAT=CDF/clobber/file="tmp/fcst_11.nc"/l=31:54 fcst,  fcst_2
 
! a couple of long (3-year) forecasts
let tstart = t[gt=monthly,l=1]
save/clobber/file="tmp/long_fcst_1.nc"/l=1:36 fcst,fcst_2   ! replaces file 1
let tstart = t[gt=monthly,l=16]
save/clobber/file="tmp/long_fcst_6.nc"/l=16:52 fcst,fcst_2  ! replaces file 6
 
! files lacking the second variable
let tstart = t[gt=monthly,l=1]
save/clobber/file="tmp/one_var_fcst_1.nc"/l=1:24 fcst   ! alternative of file 1
let tstart = t[gt=monthly,l=16]
save/clobber/file="tmp/one_var_fcst_6.nc"/l=16:39 fcst  ! alternative of file 6
 
! files that violate the sequence
save/clobber/file="tmp/consecutive_month_fcst.nc"/l=5:28 fcst, fcst_2
! shift the time interpretation by 3 days through altered T0
DEFINE AXIS/UNITS=DAYS/T0=04-JAN-1900/EDGES/T=01-JAN-1950:31-DEC-1970:`365.2425/12` monthly
 !-> DEFINE AXIS/UNITS=DAYS/T0=04-JAN-1900/EDGES/T=01-JAN-1950:31-DEC-1970:30.436875 monthly
save/clobber/file="tmp/irregular_start_time_fcst.nc"/l=6:29 fcst, fcst_2
 
cancel variables/all
 
! ***** end of FMRC file creation ****************
 
! define a complete FMRC aggregation
let files = SPAWN("ls -1 tmp/fcst_*.nc")
list files  ! notice that they are not properly ordered
             VARIABLE : SPAWN("ls -1 tmp/fcst_*.nc")
             SUBSET   : 11 points (X)
 1    /  1:"tmp/fcst_10.nc"
 2    /  2:"tmp/fcst_11.nc"
 3    /  3:"tmp/fcst_1.nc" 
 4    /  4:"tmp/fcst_2.nc" 
 5    /  5:"tmp/fcst_3.nc" 
 6    /  6:"tmp/fcst_4.nc" 
 7    /  7:"tmp/fcst_5.nc" 
 8    /  8:"tmp/fcst_6.nc" 
 9    /  9:"tmp/fcst_7.nc" 
 10   / 10:"tmp/fcst_8.nc" 
 11   / 11:"tmp/fcst_9.nc" 
fmrc my_fmrc = files
show data/brief    ! note that member files are hidden
     currently SET data sets:
   12> my_fmrc  (default)  Forecast aggregation
show data/members my_fmrc
     currently SET data sets:
   12> my_fmrc  (default)  Forecast aggregation
 name     title                             I         J         K         L         M         N
 FCST     FIELD + FCST_ERROR               1:21      1:21      ...       1:24      ...       1:11
       (L=1:24)
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:24      ...       1:33
 FCST_2   another variable                 1:21      1:21      ...       1:24      ...       1:11
       (L=1:24)
 
          Member datasets:
      12.1 : tmp/fcst_1.nc
      12.2 : tmp/fcst_2.nc
      12.3 : tmp/fcst_3.nc
      12.4 : tmp/fcst_4.nc
      12.5 : tmp/fcst_5.nc
      12.6 : tmp/fcst_6.nc
      12.7 : tmp/fcst_7.nc
      12.8 : tmp/fcst_8.nc
      12.9 : tmp/fcst_9.nc
      12.10: tmp/fcst_10.nc
      12.11: tmp/fcst_11.nc
show data/attr my_fmrc
     currently SET data sets:
   12> my_fmrc  (default)  Forecast aggregation
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               aggregate name  CHAR        7    F       my_fmrc
                                 _cal_t_ax       CHAR        8    T       TF_CAL_T
                                 _lag_f_ax       CHAR        8    T       TF_LAG_F
                                 _cal_f_ax       CHAR        8    T       TF_CAL_F
                                 _lag_t_ax       CHAR        8    T       TF_LAG_T
  
 FCST                  DOUBLE    long_name       CHAR        18   T       FIELD + FCST_ERROR
                                 missing_value   DOUBLE      1    T       -1.E+34
                                 coordinates     CHAR        20   T       RUN TF_TIMES YAX XAX
                                 _ftime2d        CHAR        8    T       TF_TIMES
                                 _cal_t_ax       CHAR        8    T       TF_CAL_T
                                 _lag_f_ax       CHAR        8    T       TF_LAG_F
                                 _cal_f_ax       CHAR        8    T       TF_CAL_F
                                 _lag_t_ax       CHAR        8    T       TF_LAG_T
  
 TF_TIMES              DOUBLE    long_name       CHAR        25   T       Forecast time step matrix
                                 units           CHAR        22   T       days since 01-JAN-1900
                                 missing_value   DOUBLE      1    T       -1.E+34
                                 _CoordinateAxisType
                                                 CHAR        4    T       Time
                                 calendar        CHAR        9    T       GREGORIAN
  
 FCST_2                DOUBLE    long_name       CHAR        16   T       another variable
                                 missing_value   DOUBLE      1    T       -1.E+34
                                 coordinates     CHAR        20   T       RUN TF_TIMES YAX XAX
                                 _ftime2d        CHAR        8    T       TF_TIMES
                                 _cal_t_ax       CHAR        8    T       TF_CAL_T
                                 _lag_f_ax       CHAR        8    T       TF_LAG_F
                                 _cal_f_ax       CHAR        8    T       TF_CAL_F
                                 _lag_t_ax       CHAR        8    T       TF_LAG_T
  
 
! plot and list the aggregation
GO bn_aggregate_f.sub
! bn_aggregate_f.sub
 
DEFINE SYMBOL TF_CAL_T = `fcst._cal_t_ax`
 !-> DEFINE SYMBOL TF_CAL_T = TF_CAL_T
DEFINE SYMBOL TF_LAG_F = `fcst._lag_f_ax`
 !-> DEFINE SYMBOL TF_LAG_F = TF_LAG_F
DEFINE SYMBOL TF_LAG_T = `fcst._lag_t_ax`
 !-> DEFINE SYMBOL TF_LAG_T = TF_LAG_T
DEFINE SYMBOL TF_CAL_F = `fcst._cal_f_ax`
 !-> DEFINE SYMBOL TF_CAL_F = TF_CAL_F
 
! native compact form
SHADE/I=10/J=10 fcst
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 fcst
             VARIABLE : FIELD + FCST_ERROR
             DATA SET : Forecast series of 11 datasets patterned on fcst_1
             FILENAME : my_fmrc
             SUBSET   : 11 by 20 points (FORECAST-MODEL ELAPSED TIME (days))
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                1950    1950    1950    1950    1951    1951    1951    1951    1952    1952    1952  
                 1       2       3       4       5       6       7       8       9      10      11
 15.2  /  1:  0.3309  0.2996  0.2663  0.2314  0.1954  0.1586  0.1216  0.0847  0.0485  0.0134 -0.0202
 45.7  /  2:  0.3436  0.3049  0.2625  0.2253  0.1889  0.1553  0.1127  0.0790  0.0438  0.0136 -0.0197
 76.1  /  3:  0.3281  0.2846  0.2480  0.2288  0.1760  0.1383  0.1141  0.0766  0.0527  0.0277 -0.0086
 106.5 /  4:  0.3257  0.2698  0.2459  0.1889  0.1534  0.1250  0.0827  0.0564  0.0278  0.0357  0.0264
 137   /  5:  0.2996  0.2460  0.2143  0.1592  0.1477  0.1043  0.0763  0.1019  0.0446  0.0280  0.0608
 167.4 /  6:  0.2560  0.2401  0.2050  0.1811  0.1056  0.1339  0.0884  0.0705  0.1009  0.0839  0.0911
 197.8 /  7:  0.2185  0.1891  0.1526  0.0948  0.0726  0.0545  0.0690  0.0796  0.0425  0.0464  0.0739
 228.3 /  8:  0.1563  0.0959  0.1318  0.1019  0.1382  0.1211  0.1314  0.1344  0.0733  0.1466  0.1246
 258.7 /  9:  0.1238  0.1400  0.1338  0.1534  0.0919  0.0478  0.1495  0.0580  0.1095  0.1287  0.1646
 289.2 / 10:  0.0836  0.0227  0.1132  0.0251  0.1019  0.0639  0.1040  0.0940  0.0997  0.1337  0.2077
 319.6 / 11: -0.0079  0.0922  0.0001  0.0606  0.0753  0.0409  0.1593  0.2240  0.2608  0.2703  0.2921
 350   / 12:  0.1291  0.1152  0.1503  0.0868  0.1446  0.0864  0.0977  0.2176  0.1978  0.2001  0.2962
 380.5 / 13:  0.0877 -0.0121  0.1293  0.0950  0.1879  0.1481  0.1782  0.2343  0.2744  0.2738  0.2524
 410.9 / 14:  0.0393  0.1515  0.0904  0.0708  0.0930  0.1414  0.3028  0.2233  0.3498  0.2423  0.3734
 441.3 / 15: -0.0616  0.1508  0.1924  0.2259  0.2522  0.1706  0.2937  0.3275  0.4060  0.3479  0.3849
 471.8 / 16: -0.0308 -0.0037  0.1599  0.1241  0.2576  0.1767  0.3412  0.2720  0.3188  0.3108  0.4523
 502.2 / 17:  0.1537 -0.0049  0.2213  0.2623  0.1476  0.2229  0.2881  0.3084  0.2656  0.2461  0.2656
 532.6 / 18:  0.1750  0.2361  0.1456  0.1327  0.3567  0.2076  0.3614  0.3754  0.4059  0.4502  0.3630
 563.1 / 19:  0.0653  0.1094  0.1476  0.3287  0.2936  0.2124  0.2815  0.3579  0.3471  0.4268  0.4086
 593.5 / 20:  0.0512  0.1363  0.2269  0.3385  0.2615  0.4114  0.3253  0.2236  0.3194  0.1866  0.2659
 
! compact form with spaces
LET fcstfine = fcst[GT=($TF_LAG_T)@BIN,GF=($TF_CAL_F)@BIN]
 !-> DEFINE VARIABLE fcstfine = fcst[GT=TF_LAG_T@BIN,GF=TF_CAL_F@BIN]
SHADE/I=10/J=10 fcstfine
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 fcstfine
             VARIABLE : FCST[GT=TF_LAG_T@BIN,GF=TF_CAL_F@BIN]
             DATA SET : Forecast series of 11 datasets patterned on fcst_1
             FILENAME : my_fmrc
             SUBSET   : 33 by 20 points (FORECAST-MODEL ELAPSED TIME (days))
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1952    1952    1952    1952    1952    1952    1952    1952    1952  
                 1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24      25      26      27      28      29      30      31      32      33
 15.2  /  1:  0.3309    ....    ....  0.2996    ....    ....  0.2663    ....    ....  0.2314    ....    ....  0.1954    ....    ....  0.1586    ....    ....  0.1216    ....    ....  0.0847    ....    ....  0.0485    ....    ....  0.0134    ....    .... -0.0202    ....    ....
 45.7  /  2:  0.3436    ....    ....  0.3049    ....    ....  0.2625    ....    ....  0.2253    ....    ....  0.1889    ....    ....  0.1553    ....    ....  0.1127    ....    ....  0.0790    ....    ....  0.0438    ....    ....  0.0136    ....    .... -0.0197    ....    ....
 76.1  /  3:  0.3281    ....    ....  0.2846    ....    ....  0.2480    ....    ....  0.2288    ....    ....  0.1760    ....    ....  0.1383    ....    ....  0.1141    ....    ....  0.0766    ....    ....  0.0527    ....    ....  0.0277    ....    .... -0.0086    ....    ....
 106.5 /  4:  0.3257    ....    ....  0.2698    ....    ....  0.2459    ....    ....  0.1889    ....    ....  0.1534    ....    ....  0.1250    ....    ....  0.0827    ....    ....  0.0564    ....    ....  0.0278    ....    ....  0.0357    ....    ....  0.0264    ....    ....
 137   /  5:  0.2996    ....    ....  0.2460    ....    ....  0.2143    ....    ....  0.1592    ....    ....  0.1477    ....    ....  0.1043    ....    ....  0.0763    ....    ....  0.1019    ....    ....  0.0446    ....    ....  0.0280    ....    ....  0.0608    ....    ....
 167.4 /  6:  0.2560    ....    ....  0.2401    ....    ....  0.2050    ....    ....  0.1811    ....    ....  0.1056    ....    ....  0.1339    ....    ....  0.0884    ....    ....  0.0705    ....    ....  0.1009    ....    ....  0.0839    ....    ....  0.0911    ....    ....
 197.8 /  7:  0.2185    ....    ....  0.1891    ....    ....  0.1526    ....    ....  0.0948    ....    ....  0.0726    ....    ....  0.0545    ....    ....  0.0690    ....    ....  0.0796    ....    ....  0.0425    ....    ....  0.0464    ....    ....  0.0739    ....    ....
 228.3 /  8:  0.1563    ....    ....  0.0959    ....    ....  0.1318    ....    ....  0.1019    ....    ....  0.1382    ....    ....  0.1211    ....    ....  0.1314    ....    ....  0.1344    ....    ....  0.0733    ....    ....  0.1466    ....    ....  0.1246    ....    ....
 258.7 /  9:  0.1238    ....    ....  0.1400    ....    ....  0.1338    ....    ....  0.1534    ....    ....  0.0919    ....    ....  0.0478    ....    ....  0.1495    ....    ....  0.0580    ....    ....  0.1095    ....    ....  0.1287    ....    ....  0.1646    ....    ....
 289.2 / 10:  0.0836    ....    ....  0.0227    ....    ....  0.1132    ....    ....  0.0251    ....    ....  0.1019    ....    ....  0.0639    ....    ....  0.1040    ....    ....  0.0940    ....    ....  0.0997    ....    ....  0.1337    ....    ....  0.2077    ....    ....
 319.6 / 11: -0.0079    ....    ....  0.0922    ....    ....  0.0001    ....    ....  0.0606    ....    ....  0.0753    ....    ....  0.0409    ....    ....  0.1593    ....    ....  0.2240    ....    ....  0.2608    ....    ....  0.2703    ....    ....  0.2921    ....    ....
 350   / 12:  0.1291    ....    ....  0.1152    ....    ....  0.1503    ....    ....  0.0868    ....    ....  0.1446    ....    ....  0.0864    ....    ....  0.0977    ....    ....  0.2176    ....    ....  0.1978    ....    ....  0.2001    ....    ....  0.2962    ....    ....
 380.5 / 13:  0.0877    ....    .... -0.0121    ....    ....  0.1293    ....    ....  0.0950    ....    ....  0.1879    ....    ....  0.1481    ....    ....  0.1782    ....    ....  0.2343    ....    ....  0.2744    ....    ....  0.2738    ....    ....  0.2524    ....    ....
 410.9 / 14:  0.0393    ....    ....  0.1515    ....    ....  0.0904    ....    ....  0.0708    ....    ....  0.0930    ....    ....  0.1414    ....    ....  0.3028    ....    ....  0.2233    ....    ....  0.3498    ....    ....  0.2423    ....    ....  0.3734    ....    ....
 441.3 / 15: -0.0616    ....    ....  0.1508    ....    ....  0.1924    ....    ....  0.2259    ....    ....  0.2522    ....    ....  0.1706    ....    ....  0.2937    ....    ....  0.3275    ....    ....  0.4060    ....    ....  0.3479    ....    ....  0.3849    ....    ....
 471.8 / 16: -0.0308    ....    .... -0.0037    ....    ....  0.1599    ....    ....  0.1241    ....    ....  0.2576    ....    ....  0.1767    ....    ....  0.3412    ....    ....  0.2720    ....    ....  0.3188    ....    ....  0.3108    ....    ....  0.4523    ....    ....
 502.2 / 17:  0.1537    ....    .... -0.0049    ....    ....  0.2213    ....    ....  0.2623    ....    ....  0.1476    ....    ....  0.2229    ....    ....  0.2881    ....    ....  0.3084    ....    ....  0.2656    ....    ....  0.2461    ....    ....  0.2656    ....    ....
 532.6 / 18:  0.1750    ....    ....  0.2361    ....    ....  0.1456    ....    ....  0.1327    ....    ....  0.3567    ....    ....  0.2076    ....    ....  0.3614    ....    ....  0.3754    ....    ....  0.4059    ....    ....  0.4502    ....    ....  0.3630    ....    ....
 563.1 / 19:  0.0653    ....    ....  0.1094    ....    ....  0.1476    ....    ....  0.3287    ....    ....  0.2936    ....    ....  0.2124    ....    ....  0.2815    ....    ....  0.3579    ....    ....  0.3471    ....    ....  0.4268    ....    ....  0.4086    ....    ....
 593.5 / 20:  0.0512    ....    ....  0.1363    ....    ....  0.2269    ....    ....  0.3385    ....    ....  0.2615    ....    ....  0.4114    ....    ....  0.3253    ....    ....  0.2236    ....    ....  0.3194    ....    ....  0.1866    ....    ....  0.2659    ....    ....
 
! diagonal form
LET diagform = fcstfine[GT(TF_TIMES)=($TF_CAL_T)]
 !-> DEFINE VARIABLE diagform = fcstfine[GT(TF_TIMES)=TF_CAL_T]
SHADE/I=10/J=10 diagform
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 diagform
             VARIABLE : FCSTFINE[GT(TF_TIMES)=TF_CAL_T]
             DATA SET : Forecast series of 11 datasets patterned on fcst_1
             FILENAME : my_fmrc
             SUBSET   : 33 by 20 points (FORECAST-TIME)
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                      1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1952    1952    1952    1952    1952    1952    1952    1952    1952  
                       1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24      25      26      27      28      29      30      31      32      33
 16-JAN-1950 /  1:  0.3309    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1950 /  2:  0.3436    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1950 /  3:  0.3281    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1950 /  4:  0.3257    ....    ....  0.2996    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-MAY-1950 /  5:  0.2996    ....    ....  0.3049    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1950 /  6:  0.2560    ....    ....  0.2846    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUL-1950 /  7:  0.2185    ....    ....  0.2698    ....    ....  0.2663    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-AUG-1950 /  8:  0.1563    ....    ....  0.2460    ....    ....  0.2625    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-SEP-1950 /  9:  0.1238    ....    ....  0.2401    ....    ....  0.2480    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-OCT-1950 / 10:  0.0836    ....    ....  0.1891    ....    ....  0.2459    ....    ....  0.2314    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-NOV-1950 / 11: -0.0079    ....    ....  0.0959    ....    ....  0.2143    ....    ....  0.2253    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-DEC-1950 / 12:  0.1291    ....    ....  0.1400    ....    ....  0.2050    ....    ....  0.2288    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-JAN-1951 / 13:  0.0877    ....    ....  0.0227    ....    ....  0.1526    ....    ....  0.1889    ....    ....  0.1954    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1951 / 14:  0.0393    ....    ....  0.0922    ....    ....  0.1318    ....    ....  0.1592    ....    ....  0.1889    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1951 / 15: -0.0616    ....    ....  0.1152    ....    ....  0.1338    ....    ....  0.1811    ....    ....  0.1760    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1951 / 16: -0.0308    ....    .... -0.0121    ....    ....  0.1132    ....    ....  0.0948    ....    ....  0.1534    ....    ....  0.1586    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAY-1951 / 17:  0.1537    ....    ....  0.1515    ....    ....  0.0001    ....    ....  0.1019    ....    ....  0.1477    ....    ....  0.1553    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1951 / 18:  0.1750    ....    ....  0.1508    ....    ....  0.1503    ....    ....  0.1534    ....    ....  0.1056    ....    ....  0.1383    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-JUL-1951 / 19:  0.0653    ....    .... -0.0037    ....    ....  0.1293    ....    ....  0.0251    ....    ....  0.0726    ....    ....  0.1250    ....    ....  0.1216    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-AUG-1951 / 20:  0.0512    ....    .... -0.0049    ....    ....  0.0904    ....    ....  0.0606    ....    ....  0.1382    ....    ....  0.1043    ....    ....  0.1127    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 
! forecast evaluation form
LET leadform = fcstfine[GT(TF_TIMES)=($TF_CAL_T),GF(TF_TIMES)=($TF_LAG_F)]
 !-> DEFINE VARIABLE leadform = fcstfine[GT(TF_TIMES)=TF_CAL_T,GF(TF_TIMES)=TF_LAG_F]
SHADE/I=10/J=10 leadform
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 leadform
             VARIABLE : FCSTFINE[GT(TF_TIMES)=TF_CAL_T,GF(TF_TIMES)=TF_LAG_F]
             DATA SET : Forecast series of 11 datasets patterned on fcst_1
             FILENAME : my_fmrc
             SUBSET   : 24 by 20 points (FORECAST LEAD TIME (days)-TIME)
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                      15.2    45.7    76.1   106.5   137     167.4   197.8   228.3   258.7   289.2   319.6   350     380.5   410.9   441.3   471.8   502.2   532.6   563.1   593.5   624     654.4   684.8   715.3  
                       1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24
 16-JAN-1950 /  1:  0.3309    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1950 /  2:    ....  0.3436    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1950 /  3:    ....    ....  0.3281    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1950 /  4:  0.2996    ....    ....  0.3257    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-MAY-1950 /  5:    ....  0.3049    ....    ....  0.2996    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1950 /  6:    ....    ....  0.2846    ....    ....  0.2560    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUL-1950 /  7:  0.2663    ....    ....  0.2698    ....    ....  0.2185    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-AUG-1950 /  8:    ....  0.2625    ....    ....  0.2460    ....    ....  0.1563    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-SEP-1950 /  9:    ....    ....  0.2480    ....    ....  0.2401    ....    ....  0.1238    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-OCT-1950 / 10:  0.2314    ....    ....  0.2459    ....    ....  0.1891    ....    ....  0.0836    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-NOV-1950 / 11:    ....  0.2253    ....    ....  0.2143    ....    ....  0.0959    ....    .... -0.0079    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-DEC-1950 / 12:    ....    ....  0.2288    ....    ....  0.2050    ....    ....  0.1400    ....    ....  0.1291    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-JAN-1951 / 13:  0.1954    ....    ....  0.1889    ....    ....  0.1526    ....    ....  0.0227    ....    ....  0.0877    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1951 / 14:    ....  0.1889    ....    ....  0.1592    ....    ....  0.1318    ....    ....  0.0922    ....    ....  0.0393    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1951 / 15:    ....    ....  0.1760    ....    ....  0.1811    ....    ....  0.1338    ....    ....  0.1152    ....    .... -0.0616    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1951 / 16:  0.1586    ....    ....  0.1534    ....    ....  0.0948    ....    ....  0.1132    ....    .... -0.0121    ....    .... -0.0308    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAY-1951 / 17:    ....  0.1553    ....    ....  0.1477    ....    ....  0.1019    ....    ....  0.0001    ....    ....  0.1515    ....    ....  0.1537    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1951 / 18:    ....    ....  0.1383    ....    ....  0.1056    ....    ....  0.1534    ....    ....  0.1503    ....    ....  0.1508    ....    ....  0.1750    ....    ....    ....    ....    ....    ....
 18-JUL-1951 / 19:  0.1216    ....    ....  0.1250    ....    ....  0.0726    ....    ....  0.0251    ....    ....  0.1293    ....    .... -0.0037    ....    ....  0.0653    ....    ....    ....    ....    ....
 17-AUG-1951 / 20:    ....  0.1127    ....    ....  0.1043    ....    ....  0.1382    ....    ....  0.0606    ....    ....  0.0904    ....    .... -0.0049    ....    ....  0.0512    ....    ....    ....    ....
 
! forecast error visualizatio
LET errform = leadform - leadform[N=1]
SHADE/I=10/J=10 errform
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 errform
             VARIABLE : LEADFORM - LEADFORM[N=1]
             DATA SET : Forecast series of 11 datasets patterned on fcst_1
             FILENAME : my_fmrc
             SUBSET   : 24 by 20 points (FORECAST LEAD TIME (days)-TIME)
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                      15.2    45.7    76.1   106.5   137     167.4   197.8   228.3   258.7   289.2   319.6   350     380.5   410.9   441.3   471.8   502.2   532.6   563.1   593.5   624     654.4   684.8   715.3  
                       1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24
 16-JAN-1950 /  1:  0.0000    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1950 /  2:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1950 /  3:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1950 /  4:  0.0000    ....    ....  0.0261    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-MAY-1950 /  5:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1950 /  6:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUL-1950 /  7:  0.0000    ....    ....  0.0035    ....    .... -0.0478    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-AUG-1950 /  8:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-SEP-1950 /  9:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-OCT-1950 / 10:  0.0000    ....    ....  0.0145    ....    .... -0.0423    ....    .... -0.1479    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-NOV-1950 / 11:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-DEC-1950 / 12:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-JAN-1951 / 13:  0.0000    ....    .... -0.0065    ....    .... -0.0428    ....    .... -0.1727    ....    .... -0.1077    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1951 / 14:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1951 / 15:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1951 / 16:  0.0000    ....    .... -0.0052    ....    .... -0.0637    ....    .... -0.0454    ....    .... -0.1707    ....    .... -0.1894    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAY-1951 / 17:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1951 / 18:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-JUL-1951 / 19:  0.0000    ....    ....  0.0035    ....    .... -0.0489    ....    .... -0.0965    ....    ....  0.0078    ....    .... -0.1253    ....    .... -0.0563    ....    ....    ....    ....    ....
 17-AUG-1951 / 20:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 
! confirm the second variable works, too
LET fcst2fine = fcst_2[GT=($TF_LAG_T)@BIN,GF=($TF_CAL_F)@BIN]
 !-> DEFINE VARIABLE fcst2fine = fcst_2[GT=TF_LAG_T@BIN,GF=TF_CAL_F@BIN]
LET lead2form = fcst2fine[GT(TF_TIMES)=($TF_CAL_T),GF(TF_TIMES)=($TF_LAG_F)]
 !-> DEFINE VARIABLE lead2form = fcst2fine[GT(TF_TIMES)=TF_CAL_T,GF(TF_TIMES)=TF_LAG_F]
LET err2form = lead2form - lead2form[N=1]
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 err2form
             VARIABLE : LEAD2FORM - LEAD2FORM[N=1]
             DATA SET : Forecast series of 11 datasets patterned on fcst_1
             FILENAME : my_fmrc
             SUBSET   : 24 by 20 points (FORECAST LEAD TIME (days)-TIME)
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                      15.2    45.7    76.1   106.5   137     167.4   197.8   228.3   258.7   289.2   319.6   350     380.5   410.9   441.3   471.8   502.2   532.6   563.1   593.5   624     654.4   684.8   715.3  
                       1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24
 16-JAN-1950 /  1:  0.0000    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1950 /  2:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1950 /  3:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1950 /  4:  0.0000    ....    ....  0.0261    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-MAY-1950 /  5:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1950 /  6:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUL-1950 /  7:  0.0000    ....    ....  0.0035    ....    .... -0.0478    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-AUG-1950 /  8:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-SEP-1950 /  9:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-OCT-1950 / 10:  0.0000    ....    ....  0.0145    ....    .... -0.0423    ....    .... -0.1479    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-NOV-1950 / 11:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-DEC-1950 / 12:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-JAN-1951 / 13:  0.0000    ....    .... -0.0065    ....    .... -0.0428    ....    .... -0.1727    ....    .... -0.1077    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1951 / 14:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1951 / 15:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1951 / 16:  0.0000    ....    .... -0.0052    ....    .... -0.0637    ....    .... -0.0454    ....    .... -0.1707    ....    .... -0.1894    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAY-1951 / 17:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1951 / 18:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-JUL-1951 / 19:  0.0000    ....    ....  0.0035    ....    .... -0.0489    ....    .... -0.0965    ....    ....  0.0078    ....    .... -0.1253    ....    .... -0.0563    ....    ....    ....    ....    ....
 17-AUG-1951 / 20:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 
! since the N=1 values are subtracted off, the +2 offset is removed from fcst_2
! so this should give identically zero ... except that all of the subtractions
! lead to errors Order(e-16).  To avoid benchmark results that differ from
! one machine to another, this is commented out
! STAT/I=10/J=10/L=1:20/BRIEF err2form - errform
 
 
cancel data my_fmrc
show data/hidden   ! note that all member files were canceled, too
     currently SET data sets:
 
! agg with 2nd, 3rd, 9th and 10th forecasts missing
use tmp/fcst_1.nc, tmp/fcst_2.nc, tmp/fcst_3.nc, tmp/fcst_9.nc, tmp/fcst_10.nc, tmp/fcst_11.nc
let files = SPAWN("ls -1 tmp/fcst_*.nc")
fmrc/hide my_fmrc = XCAT(files[I=6:10],{"6","1"})           ! double-wide gaps
!fmrc my_fmrc = XCAT(files[I=6:10],{"6","1","2","5"})  ! single-wide gaps
show data/members my_fmrc
     currently SET data sets:
   12> my_fmrc  (default)  Forecast aggregation
 name     title                             I         J         K         L         M         N
 FCST     FIELD + FCST_ERROR               1:21      1:21      ...       1:24      ...       1:11
       (L=1:24)
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:24      ...       1:33
 FCST_2   another variable                 1:21      1:21      ...       1:24      ...       1:11
       (L=1:24)
 
          Member datasets:
      12.1 : tmp/fcst_1.nc
      12.2 : (dummy)
      12.3 : (dummy)
      12.4 : tmp/fcst_4.nc
      12.5 : tmp/fcst_5.nc
      12.6 : tmp/fcst_6.nc
      12.7 : tmp/fcst_7.nc
      12.8 : tmp/fcst_8.nc
      12.9 : (dummy)
      12.10: (dummy)
      12.11: tmp/fcst_11.nc
show data/brief
     currently SET data sets:
    2> tmp/fcst_2.nc
    3> tmp/fcst_3.nc
    4> tmp/fcst_9.nc
    5> tmp/fcst_10.nc
   12> my_fmrc  (default)  Forecast aggregation
LIST TF_TIMES
             VARIABLE : Forecast time step matrix (days since 01-JAN-1900)
             DATA SET : Forecast series of 11 datasets patterned on fcst_1
             FILENAME : my_fmrc
             SUBSET   : 24 by 33 points (MODEL ELAPSED TIME (days)-FORECAST)
             Verification time increases across row.  Initialization time increases down page. 
      ... listing every   2th point
                      15.2    76.1   137     197.8   258.7   319.6   380.5   441.3   502.2   563.1   624     684.8  
                       1       3       5       7       9      11      13      15      17      19      21      23
 01-JAN-1950 /  1:  18277.  18338.  18399.  18460.  18521.  18582.  18642.  18703.  18764.  18825.  18886.  18947.
 31-JAN-1950 /  2:  18308.  18369.  18429.  18490.  18551.  18612.  18673.  18734.  18795.  18856.  18916.  18977.
 02-MAR-1950 /  3:  18338.  18399.  18460.  18521.  18582.  18642.  18703.  18764.  18825.  18886.  18947.  19008.
 02-APR-1950 /  4:  18369.  18429.  18490.  18551.  18612.  18673.  18734.  18795.  18856.  18916.  18977.  19038.
 02-MAY-1950 /  5:  18399.  18460.  18521.  18582.  18642.  18703.  18764.  18825.  18886.  18947.  19008.  19069.
 02-JUN-1950 /  6:  18429.  18490.  18551.  18612.  18673.  18734.  18795.  18856.  18916.  18977.  19038.  19099.
 02-JUL-1950 /  7:  18460.  18521.  18582.  18642.  18703.  18764.  18825.  18886.  18947.  19008.  19069.  19129.
 02-AUG-1950 /  8:  18490.  18551.  18612.  18673.  18734.  18795.  18856.  18916.  18977.  19038.  19099.  19160.
 01-SEP-1950 /  9:  18521.  18582.  18642.  18703.  18764.  18825.  18886.  18947.  19008.  19069.  19129.  19190.
 01-OCT-1950 / 10:  18551.  18612.  18673.  18734.  18795.  18856.  18916.  18977.  19038.  19099.  19160.  19221.
 01-NOV-1950 / 11:  18582.  18642.  18703.  18764.  18825.  18886.  18947.  19008.  19069.  19129.  19190.  19251.
 01-DEC-1950 / 12:  18612.  18673.  18734.  18795.  18856.  18916.  18977.  19038.  19099.  19160.  19221.  19282.
 01-JAN-1951 / 13:  18642.  18703.  18764.  18825.  18886.  18947.  19008.  19069.  19129.  19190.  19251.  19312.
 31-JAN-1951 / 14:  18673.  18734.  18795.  18856.  18916.  18977.  19038.  19099.  19160.  19221.  19282.  19343.
 03-MAR-1951 / 15:  18703.  18764.  18825.  18886.  18947.  19008.  19069.  19129.  19190.  19251.  19312.  19373.
 02-APR-1951 / 16:  18734.  18795.  18856.  18916.  18977.  19038.  19099.  19160.  19221.  19282.  19343.  19403.
 02-MAY-1951 / 17:  18764.  18825.  18886.  18947.  19008.  19069.  19129.  19190.  19251.  19312.  19373.  19434.
 02-JUN-1951 / 18:  18795.  18856.  18916.  18977.  19038.  19099.  19160.  19221.  19282.  19343.  19403.  19464.
 02-JUL-1951 / 19:  18825.  18886.  18947.  19008.  19069.  19129.  19190.  19251.  19312.  19373.  19434.  19495.
 02-AUG-1951 / 20:  18856.  18916.  18977.  19038.  19099.  19160.  19221.  19282.  19343.  19403.  19464.  19525.
 01-SEP-1951 / 21:  18886.  18947.  19008.  19069.  19129.  19190.  19251.  19312.  19373.  19434.  19495.  19556.
 02-OCT-1951 / 22:  18916.  18977.  19038.  19099.  19160.  19221.  19282.  19343.  19403.  19464.  19525.  19586.
 01-NOV-1951 / 23:  18947.  19008.  19069.  19129.  19190.  19251.  19312.  19373.  19434.  19495.  19556.  19616.
 02-DEC-1951 / 24:  18977.  19038.  19099.  19160.  19221.  19282.  19343.  19403.  19464.  19525.  19586.  19647.
 01-JAN-1952 / 25:  19008.  19069.  19129.  19190.  19251.  19312.  19373.  19434.  19495.  19556.  19616.  19677.
 31-JAN-1952 / 26:  19038.  19099.  19160.  19221.  19282.  19343.  19403.  19464.  19525.  19586.  19647.  19708.
 02-MAR-1952 / 27:  19069.  19129.  19190.  19251.  19312.  19373.  19434.  19495.  19556.  19616.  19677.  19738.
 01-APR-1952 / 28:  19099.  19160.  19221.  19282.  19343.  19403.  19464.  19525.  19586.  19647.  19708.  19769.
 02-MAY-1952 / 29:  19129.  19190.  19251.  19312.  19373.  19434.  19495.  19556.  19616.  19677.  19738.  19799.
 01-JUN-1952 / 30:  19160.  19221.  19282.  19343.  19403.  19464.  19525.  19586.  19647.  19708.  19769.  19829.
 02-JUL-1952 / 31:  19190.  19251.  19312.  19373.  19434.  19495.  19556.  19616.  19677.  19738.  19799.  19860.
 01-AUG-1952 / 32:  19221.  19282.  19343.  19403.  19464.  19525.  19586.  19647.  19708.  19769.  19829.  19890.
 31-AUG-1952 / 33:  19251.  19312.  19373.  19434.  19495.  19556.  19616.  19677.  19738.  19799.  19860.  19921.
 
GO bn_aggregate_f.sub
! bn_aggregate_f.sub
 
DEFINE SYMBOL TF_CAL_T = `fcst._cal_t_ax`
 !-> DEFINE SYMBOL TF_CAL_T = TF_CAL_T
DEFINE SYMBOL TF_LAG_F = `fcst._lag_f_ax`
 !-> DEFINE SYMBOL TF_LAG_F = TF_LAG_F
DEFINE SYMBOL TF_LAG_T = `fcst._lag_t_ax`
 !-> DEFINE SYMBOL TF_LAG_T = TF_LAG_T
DEFINE SYMBOL TF_CAL_F = `fcst._cal_f_ax`
 !-> DEFINE SYMBOL TF_CAL_F = TF_CAL_F
 
! native compact form
SHADE/I=10/J=10 fcst
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 fcst
             VARIABLE : FIELD + FCST_ERROR
             DATA SET : Forecast series of 11 datasets patterned on fcst_1
             FILENAME : my_fmrc
             SUBSET   : 11 by 20 points (FORECAST-MODEL ELAPSED TIME (days))
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                1950    1950    1950    1950    1951    1951    1951    1951    1952    1952    1952  
                 1       2       3       4       5       6       7       8       9      10      11
 15.2  /  1:  0.3309    ....    ....  0.2314  0.1954  0.1586  0.1216  0.0847    ....    .... -0.0202
 45.7  /  2:  0.3436    ....    ....  0.2253  0.1889  0.1553  0.1127  0.0790    ....    .... -0.0197
 76.1  /  3:  0.3281    ....    ....  0.2288  0.1760  0.1383  0.1141  0.0766    ....    .... -0.0086
 106.5 /  4:  0.3257    ....    ....  0.1889  0.1534  0.1250  0.0827  0.0564    ....    ....  0.0264
 137   /  5:  0.2996    ....    ....  0.1592  0.1477  0.1043  0.0763  0.1019    ....    ....  0.0608
 167.4 /  6:  0.2560    ....    ....  0.1811  0.1056  0.1339  0.0884  0.0705    ....    ....  0.0911
 197.8 /  7:  0.2185    ....    ....  0.0948  0.0726  0.0545  0.0690  0.0796    ....    ....  0.0739
 228.3 /  8:  0.1563    ....    ....  0.1019  0.1382  0.1211  0.1314  0.1344    ....    ....  0.1246
 258.7 /  9:  0.1238    ....    ....  0.1534  0.0919  0.0478  0.1495  0.0580    ....    ....  0.1646
 289.2 / 10:  0.0836    ....    ....  0.0251  0.1019  0.0639  0.1040  0.0940    ....    ....  0.2077
 319.6 / 11: -0.0079    ....    ....  0.0606  0.0753  0.0409  0.1593  0.2240    ....    ....  0.2921
 350   / 12:  0.1291    ....    ....  0.0868  0.1446  0.0864  0.0977  0.2176    ....    ....  0.2962
 380.5 / 13:  0.0877    ....    ....  0.0950  0.1879  0.1481  0.1782  0.2343    ....    ....  0.2524
 410.9 / 14:  0.0393    ....    ....  0.0708  0.0930  0.1414  0.3028  0.2233    ....    ....  0.3734
 441.3 / 15: -0.0616    ....    ....  0.2259  0.2522  0.1706  0.2937  0.3275    ....    ....  0.3849
 471.8 / 16: -0.0308    ....    ....  0.1241  0.2576  0.1767  0.3412  0.2720    ....    ....  0.4523
 502.2 / 17:  0.1537    ....    ....  0.2623  0.1476  0.2229  0.2881  0.3084    ....    ....  0.2656
 532.6 / 18:  0.1750    ....    ....  0.1327  0.3567  0.2076  0.3614  0.3754    ....    ....  0.3630
 563.1 / 19:  0.0653    ....    ....  0.3287  0.2936  0.2124  0.2815  0.3579    ....    ....  0.4086
 593.5 / 20:  0.0512    ....    ....  0.3385  0.2615  0.4114  0.3253  0.2236    ....    ....  0.2659
 
! compact form with spaces
LET fcstfine = fcst[GT=($TF_LAG_T)@BIN,GF=($TF_CAL_F)@BIN]
 !-> DEFINE VARIABLE fcstfine = fcst[GT=TF_LAG_T@BIN,GF=TF_CAL_F@BIN]
SHADE/I=10/J=10 fcstfine
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 fcstfine
             VARIABLE : FCST[GT=TF_LAG_T@BIN,GF=TF_CAL_F@BIN]
             DATA SET : Forecast series of 11 datasets patterned on fcst_1
             FILENAME : my_fmrc
             SUBSET   : 33 by 20 points (FORECAST-MODEL ELAPSED TIME (days))
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1952    1952    1952    1952    1952    1952    1952    1952    1952  
                 1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24      25      26      27      28      29      30      31      32      33
 15.2  /  1:  0.3309    ....    ....    ....    ....    ....    ....    ....    ....  0.2314    ....    ....  0.1954    ....    ....  0.1586    ....    ....  0.1216    ....    ....  0.0847    ....    ....    ....    ....    ....    ....    ....    .... -0.0202    ....    ....
 45.7  /  2:  0.3436    ....    ....    ....    ....    ....    ....    ....    ....  0.2253    ....    ....  0.1889    ....    ....  0.1553    ....    ....  0.1127    ....    ....  0.0790    ....    ....    ....    ....    ....    ....    ....    .... -0.0197    ....    ....
 76.1  /  3:  0.3281    ....    ....    ....    ....    ....    ....    ....    ....  0.2288    ....    ....  0.1760    ....    ....  0.1383    ....    ....  0.1141    ....    ....  0.0766    ....    ....    ....    ....    ....    ....    ....    .... -0.0086    ....    ....
 106.5 /  4:  0.3257    ....    ....    ....    ....    ....    ....    ....    ....  0.1889    ....    ....  0.1534    ....    ....  0.1250    ....    ....  0.0827    ....    ....  0.0564    ....    ....    ....    ....    ....    ....    ....    ....  0.0264    ....    ....
 137   /  5:  0.2996    ....    ....    ....    ....    ....    ....    ....    ....  0.1592    ....    ....  0.1477    ....    ....  0.1043    ....    ....  0.0763    ....    ....  0.1019    ....    ....    ....    ....    ....    ....    ....    ....  0.0608    ....    ....
 167.4 /  6:  0.2560    ....    ....    ....    ....    ....    ....    ....    ....  0.1811    ....    ....  0.1056    ....    ....  0.1339    ....    ....  0.0884    ....    ....  0.0705    ....    ....    ....    ....    ....    ....    ....    ....  0.0911    ....    ....
 197.8 /  7:  0.2185    ....    ....    ....    ....    ....    ....    ....    ....  0.0948    ....    ....  0.0726    ....    ....  0.0545    ....    ....  0.0690    ....    ....  0.0796    ....    ....    ....    ....    ....    ....    ....    ....  0.0739    ....    ....
 228.3 /  8:  0.1563    ....    ....    ....    ....    ....    ....    ....    ....  0.1019    ....    ....  0.1382    ....    ....  0.1211    ....    ....  0.1314    ....    ....  0.1344    ....    ....    ....    ....    ....    ....    ....    ....  0.1246    ....    ....
 258.7 /  9:  0.1238    ....    ....    ....    ....    ....    ....    ....    ....  0.1534    ....    ....  0.0919    ....    ....  0.0478    ....    ....  0.1495    ....    ....  0.0580    ....    ....    ....    ....    ....    ....    ....    ....  0.1646    ....    ....
 289.2 / 10:  0.0836    ....    ....    ....    ....    ....    ....    ....    ....  0.0251    ....    ....  0.1019    ....    ....  0.0639    ....    ....  0.1040    ....    ....  0.0940    ....    ....    ....    ....    ....    ....    ....    ....  0.2077    ....    ....
 319.6 / 11: -0.0079    ....    ....    ....    ....    ....    ....    ....    ....  0.0606    ....    ....  0.0753    ....    ....  0.0409    ....    ....  0.1593    ....    ....  0.2240    ....    ....    ....    ....    ....    ....    ....    ....  0.2921    ....    ....
 350   / 12:  0.1291    ....    ....    ....    ....    ....    ....    ....    ....  0.0868    ....    ....  0.1446    ....    ....  0.0864    ....    ....  0.0977    ....    ....  0.2176    ....    ....    ....    ....    ....    ....    ....    ....  0.2962    ....    ....
 380.5 / 13:  0.0877    ....    ....    ....    ....    ....    ....    ....    ....  0.0950    ....    ....  0.1879    ....    ....  0.1481    ....    ....  0.1782    ....    ....  0.2343    ....    ....    ....    ....    ....    ....    ....    ....  0.2524    ....    ....
 410.9 / 14:  0.0393    ....    ....    ....    ....    ....    ....    ....    ....  0.0708    ....    ....  0.0930    ....    ....  0.1414    ....    ....  0.3028    ....    ....  0.2233    ....    ....    ....    ....    ....    ....    ....    ....  0.3734    ....    ....
 441.3 / 15: -0.0616    ....    ....    ....    ....    ....    ....    ....    ....  0.2259    ....    ....  0.2522    ....    ....  0.1706    ....    ....  0.2937    ....    ....  0.3275    ....    ....    ....    ....    ....    ....    ....    ....  0.3849    ....    ....
 471.8 / 16: -0.0308    ....    ....    ....    ....    ....    ....    ....    ....  0.1241    ....    ....  0.2576    ....    ....  0.1767    ....    ....  0.3412    ....    ....  0.2720    ....    ....    ....    ....    ....    ....    ....    ....  0.4523    ....    ....
 502.2 / 17:  0.1537    ....    ....    ....    ....    ....    ....    ....    ....  0.2623    ....    ....  0.1476    ....    ....  0.2229    ....    ....  0.2881    ....    ....  0.3084    ....    ....    ....    ....    ....    ....    ....    ....  0.2656    ....    ....
 532.6 / 18:  0.1750    ....    ....    ....    ....    ....    ....    ....    ....  0.1327    ....    ....  0.3567    ....    ....  0.2076    ....    ....  0.3614    ....    ....  0.3754    ....    ....    ....    ....    ....    ....    ....    ....  0.3630    ....    ....
 563.1 / 19:  0.0653    ....    ....    ....    ....    ....    ....    ....    ....  0.3287    ....    ....  0.2936    ....    ....  0.2124    ....    ....  0.2815    ....    ....  0.3579    ....    ....    ....    ....    ....    ....    ....    ....  0.4086    ....    ....
 593.5 / 20:  0.0512    ....    ....    ....    ....    ....    ....    ....    ....  0.3385    ....    ....  0.2615    ....    ....  0.4114    ....    ....  0.3253    ....    ....  0.2236    ....    ....    ....    ....    ....    ....    ....    ....  0.2659    ....    ....
 
! diagonal form
LET diagform = fcstfine[GT(TF_TIMES)=($TF_CAL_T)]
 !-> DEFINE VARIABLE diagform = fcstfine[GT(TF_TIMES)=TF_CAL_T]
SHADE/I=10/J=10 diagform
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 diagform
             VARIABLE : FCSTFINE[GT(TF_TIMES)=TF_CAL_T]
             DATA SET : Forecast series of 11 datasets patterned on fcst_1
             FILENAME : my_fmrc
             SUBSET   : 33 by 20 points (FORECAST-TIME)
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                      1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1952    1952    1952    1952    1952    1952    1952    1952    1952  
                       1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24      25      26      27      28      29      30      31      32      33
 16-JAN-1950 /  1:  0.3309    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1950 /  2:  0.3436    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1950 /  3:  0.3281    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1950 /  4:  0.3257    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-MAY-1950 /  5:  0.2996    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1950 /  6:  0.2560    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUL-1950 /  7:  0.2185    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-AUG-1950 /  8:  0.1563    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-SEP-1950 /  9:  0.1238    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-OCT-1950 / 10:  0.0836    ....    ....    ....    ....    ....    ....    ....    ....  0.2314    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-NOV-1950 / 11: -0.0079    ....    ....    ....    ....    ....    ....    ....    ....  0.2253    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-DEC-1950 / 12:  0.1291    ....    ....    ....    ....    ....    ....    ....    ....  0.2288    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-JAN-1951 / 13:  0.0877    ....    ....    ....    ....    ....    ....    ....    ....  0.1889    ....    ....  0.1954    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1951 / 14:  0.0393    ....    ....    ....    ....    ....    ....    ....    ....  0.1592    ....    ....  0.1889    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1951 / 15: -0.0616    ....    ....    ....    ....    ....    ....    ....    ....  0.1811    ....    ....  0.1760    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1951 / 16: -0.0308    ....    ....    ....    ....    ....    ....    ....    ....  0.0948    ....    ....  0.1534    ....    ....  0.1586    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAY-1951 / 17:  0.1537    ....    ....    ....    ....    ....    ....    ....    ....  0.1019    ....    ....  0.1477    ....    ....  0.1553    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1951 / 18:  0.1750    ....    ....    ....    ....    ....    ....    ....    ....  0.1534    ....    ....  0.1056    ....    ....  0.1383    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-JUL-1951 / 19:  0.0653    ....    ....    ....    ....    ....    ....    ....    ....  0.0251    ....    ....  0.0726    ....    ....  0.1250    ....    ....  0.1216    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-AUG-1951 / 20:  0.0512    ....    ....    ....    ....    ....    ....    ....    ....  0.0606    ....    ....  0.1382    ....    ....  0.1043    ....    ....  0.1127    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 
! forecast evaluation form
LET leadform = fcstfine[GT(TF_TIMES)=($TF_CAL_T),GF(TF_TIMES)=($TF_LAG_F)]
 !-> DEFINE VARIABLE leadform = fcstfine[GT(TF_TIMES)=TF_CAL_T,GF(TF_TIMES)=TF_LAG_F]
SHADE/I=10/J=10 leadform
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 leadform
             VARIABLE : FCSTFINE[GT(TF_TIMES)=TF_CAL_T,GF(TF_TIMES)=TF_LAG_F]
             DATA SET : Forecast series of 11 datasets patterned on fcst_1
             FILENAME : my_fmrc
             SUBSET   : 24 by 20 points (FORECAST LEAD TIME (days)-TIME)
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                      15.2    45.7    76.1   106.5   137     167.4   197.8   228.3   258.7   289.2   319.6   350     380.5   410.9   441.3   471.8   502.2   532.6   563.1   593.5   624     654.4   684.8   715.3  
                       1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24
 16-JAN-1950 /  1:  0.3309    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1950 /  2:    ....  0.3436    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1950 /  3:    ....    ....  0.3281    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1950 /  4:    ....    ....    ....  0.3257    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-MAY-1950 /  5:    ....    ....    ....    ....  0.2996    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1950 /  6:    ....    ....    ....    ....    ....  0.2560    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUL-1950 /  7:    ....    ....    ....    ....    ....    ....  0.2185    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-AUG-1950 /  8:    ....    ....    ....    ....    ....    ....    ....  0.1563    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-SEP-1950 /  9:    ....    ....    ....    ....    ....    ....    ....    ....  0.1238    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-OCT-1950 / 10:  0.2314    ....    ....    ....    ....    ....    ....    ....    ....  0.0836    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-NOV-1950 / 11:    ....  0.2253    ....    ....    ....    ....    ....    ....    ....    .... -0.0079    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-DEC-1950 / 12:    ....    ....  0.2288    ....    ....    ....    ....    ....    ....    ....    ....  0.1291    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-JAN-1951 / 13:  0.1954    ....    ....  0.1889    ....    ....    ....    ....    ....    ....    ....    ....  0.0877    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1951 / 14:    ....  0.1889    ....    ....  0.1592    ....    ....    ....    ....    ....    ....    ....    ....  0.0393    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1951 / 15:    ....    ....  0.1760    ....    ....  0.1811    ....    ....    ....    ....    ....    ....    ....    .... -0.0616    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1951 / 16:  0.1586    ....    ....  0.1534    ....    ....  0.0948    ....    ....    ....    ....    ....    ....    ....    .... -0.0308    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAY-1951 / 17:    ....  0.1553    ....    ....  0.1477    ....    ....  0.1019    ....    ....    ....    ....    ....    ....    ....    ....  0.1537    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1951 / 18:    ....    ....  0.1383    ....    ....  0.1056    ....    ....  0.1534    ....    ....    ....    ....    ....    ....    ....    ....  0.1750    ....    ....    ....    ....    ....    ....
 18-JUL-1951 / 19:  0.1216    ....    ....  0.1250    ....    ....  0.0726    ....    ....  0.0251    ....    ....    ....    ....    ....    ....    ....    ....  0.0653    ....    ....    ....    ....    ....
 17-AUG-1951 / 20:    ....  0.1127    ....    ....  0.1043    ....    ....  0.1382    ....    ....  0.0606    ....    ....    ....    ....    ....    ....    ....    ....  0.0512    ....    ....    ....    ....
 
! forecast error visualizatio
LET errform = leadform - leadform[N=1]
SHADE/I=10/J=10 errform
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 errform
             VARIABLE : LEADFORM - LEADFORM[N=1]
             DATA SET : Forecast series of 11 datasets patterned on fcst_1
             FILENAME : my_fmrc
             SUBSET   : 24 by 20 points (FORECAST LEAD TIME (days)-TIME)
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                      15.2    45.7    76.1   106.5   137     167.4   197.8   228.3   258.7   289.2   319.6   350     380.5   410.9   441.3   471.8   502.2   532.6   563.1   593.5   624     654.4   684.8   715.3  
                       1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24
 16-JAN-1950 /  1:  0.0000    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1950 /  2:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1950 /  3:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1950 /  4:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-MAY-1950 /  5:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1950 /  6:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUL-1950 /  7:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-AUG-1950 /  8:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-SEP-1950 /  9:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-OCT-1950 / 10:  0.0000    ....    ....    ....    ....    ....    ....    ....    .... -0.1479    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-NOV-1950 / 11:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-DEC-1950 / 12:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-JAN-1951 / 13:  0.0000    ....    .... -0.0065    ....    ....    ....    ....    ....    ....    ....    .... -0.1077    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1951 / 14:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1951 / 15:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1951 / 16:  0.0000    ....    .... -0.0052    ....    .... -0.0637    ....    ....    ....    ....    ....    ....    ....    .... -0.1894    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAY-1951 / 17:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1951 / 18:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-JUL-1951 / 19:  0.0000    ....    ....  0.0035    ....    .... -0.0489    ....    .... -0.0965    ....    ....    ....    ....    ....    ....    ....    .... -0.0563    ....    ....    ....    ....    ....
 17-AUG-1951 / 20:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 
! confirm the second variable works, too
LET fcst2fine = fcst_2[GT=($TF_LAG_T)@BIN,GF=($TF_CAL_F)@BIN]
 !-> DEFINE VARIABLE fcst2fine = fcst_2[GT=TF_LAG_T@BIN,GF=TF_CAL_F@BIN]
LET lead2form = fcst2fine[GT(TF_TIMES)=($TF_CAL_T),GF(TF_TIMES)=($TF_LAG_F)]
 !-> DEFINE VARIABLE lead2form = fcst2fine[GT(TF_TIMES)=TF_CAL_T,GF(TF_TIMES)=TF_LAG_F]
LET err2form = lead2form - lead2form[N=1]
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 err2form
             VARIABLE : LEAD2FORM - LEAD2FORM[N=1]
             DATA SET : Forecast series of 11 datasets patterned on fcst_1
             FILENAME : my_fmrc
             SUBSET   : 24 by 20 points (FORECAST LEAD TIME (days)-TIME)
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                      15.2    45.7    76.1   106.5   137     167.4   197.8   228.3   258.7   289.2   319.6   350     380.5   410.9   441.3   471.8   502.2   532.6   563.1   593.5   624     654.4   684.8   715.3  
                       1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24
 16-JAN-1950 /  1:  0.0000    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1950 /  2:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1950 /  3:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1950 /  4:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-MAY-1950 /  5:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1950 /  6:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUL-1950 /  7:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-AUG-1950 /  8:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-SEP-1950 /  9:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-OCT-1950 / 10:  0.0000    ....    ....    ....    ....    ....    ....    ....    .... -0.1479    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-NOV-1950 / 11:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-DEC-1950 / 12:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-JAN-1951 / 13:  0.0000    ....    .... -0.0065    ....    ....    ....    ....    ....    ....    ....    .... -0.1077    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1951 / 14:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1951 / 15:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1951 / 16:  0.0000    ....    .... -0.0052    ....    .... -0.0637    ....    ....    ....    ....    ....    ....    ....    .... -0.1894    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAY-1951 / 17:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1951 / 18:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-JUL-1951 / 19:  0.0000    ....    ....  0.0035    ....    .... -0.0489    ....    .... -0.0965    ....    ....    ....    ....    ....    ....    ....    .... -0.0563    ....    ....    ....    ....    ....
 17-AUG-1951 / 20:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 
! since the N=1 values are subtracted off, the +2 offset is removed from fcst_2
! so this should give identically zero ... except that all of the subtractions
! lead to errors Order(e-16).  To avoid benchmark results that differ from
! one machine to another, this is commented out
! STAT/I=10/J=10/L=1:20/BRIEF err2form - errform
 
 
cancel data my_fmrc
show data/brief/hidden
     currently SET data sets:
    2> tmp/fcst_2.nc
    3> tmp/fcst_3.nc
    4> tmp/fcst_9.nc
    5> tmp/fcst_10.nc
    6> tmp/fcst_11.nc
    7> tmp/fcst_4.nc
    8> tmp/fcst_5.nc
    9> tmp/fcst_6.nc
   10> tmp/fcst_7.nc
   11> tmp/fcst_8.nc
   12> my_fmrc  (default)  Forecast aggregation
cancel data/all
 
! agg with the first forecast of longer time range than the others
let files = SPAWN("ls -1 tmp/fcst_*.nc")
fmrc/hide my_fmrc = XCAT(files[I=4:11],{"tmp/long_fcst_1.nc"}) ! first member is long
show data/members my_fmrc
     currently SET data sets:
   10> my_fmrc  (default)  Forecast aggregation
 name     title                             I         J         K         L         M         N
 FCST     FIELD + FCST_ERROR               1:21      1:21      ...       1:24      ...       1:9
       (L=1:36)
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:24      ...       1:27
 FCST_2   another variable                 1:21      1:21      ...       1:24      ...       1:9
       (L=1:36)
 
          Member datasets:
      10.1: tmp/long_fcst_1.nc
      10.2: tmp/fcst_2.nc
      10.3: tmp/fcst_3.nc
      10.4: tmp/fcst_4.nc
      10.5: tmp/fcst_5.nc
      10.6: tmp/fcst_6.nc
      10.7: tmp/fcst_7.nc
      10.8: tmp/fcst_8.nc
      10.9: tmp/fcst_9.nc
GO bn_aggregate_f.sub
! bn_aggregate_f.sub
 
DEFINE SYMBOL TF_CAL_T = `fcst._cal_t_ax`
 !-> DEFINE SYMBOL TF_CAL_T = TF_CAL_T
DEFINE SYMBOL TF_LAG_F = `fcst._lag_f_ax`
 !-> DEFINE SYMBOL TF_LAG_F = TF_LAG_F
DEFINE SYMBOL TF_LAG_T = `fcst._lag_t_ax`
 !-> DEFINE SYMBOL TF_LAG_T = TF_LAG_T
DEFINE SYMBOL TF_CAL_F = `fcst._cal_f_ax`
 !-> DEFINE SYMBOL TF_CAL_F = TF_CAL_F1
 
! native compact form
SHADE/I=10/J=10 fcst
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 fcst
             VARIABLE : FIELD + FCST_ERROR
             DATA SET : Forecast series of 9 datasets patterned on long_fcst_1
             FILENAME : my_fmrc
             SUBSET   : 9 by 20 points (FORECAST-MODEL ELAPSED TIME (days))
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                1950    1950    1950    1950    1951    1951    1951    1951    1952  
                 1       2       3       4       5       6       7       8       9
 15.2  /  1:  0.3309  0.2996  0.2663  0.2314  0.1954  0.1586  0.1216  0.0847  0.0485
 45.7  /  2:  0.3436  0.3049  0.2625  0.2253  0.1889  0.1553  0.1127  0.0790  0.0438
 76.1  /  3:  0.3281  0.2846  0.2480  0.2288  0.1760  0.1383  0.1141  0.0766  0.0527
 106.5 /  4:  0.3257  0.2698  0.2459  0.1889  0.1534  0.1250  0.0827  0.0564  0.0278
 137   /  5:  0.2996  0.2460  0.2143  0.1592  0.1477  0.1043  0.0763  0.1019  0.0446
 167.4 /  6:  0.2560  0.2401  0.2050  0.1811  0.1056  0.1339  0.0884  0.0705  0.1009
 197.8 /  7:  0.2185  0.1891  0.1526  0.0948  0.0726  0.0545  0.0690  0.0796  0.0425
 228.3 /  8:  0.1563  0.0959  0.1318  0.1019  0.1382  0.1211  0.1314  0.1344  0.0733
 258.7 /  9:  0.1238  0.1400  0.1338  0.1534  0.0919  0.0478  0.1495  0.0580  0.1095
 289.2 / 10:  0.0836  0.0227  0.1132  0.0251  0.1019  0.0639  0.1040  0.0940  0.0997
 319.6 / 11: -0.0079  0.0922  0.0001  0.0606  0.0753  0.0409  0.1593  0.2240  0.2608
 350   / 12:  0.1291  0.1152  0.1503  0.0868  0.1446  0.0864  0.0977  0.2176  0.1978
 380.5 / 13:  0.0877 -0.0121  0.1293  0.0950  0.1879  0.1481  0.1782  0.2343  0.2744
 410.9 / 14:  0.0393  0.1515  0.0904  0.0708  0.0930  0.1414  0.3028  0.2233  0.3498
 441.3 / 15: -0.0616  0.1508  0.1924  0.2259  0.2522  0.1706  0.2937  0.3275  0.4060
 471.8 / 16: -0.0308 -0.0037  0.1599  0.1241  0.2576  0.1767  0.3412  0.2720  0.3188
 502.2 / 17:  0.1537 -0.0049  0.2213  0.2623  0.1476  0.2229  0.2881  0.3084  0.2656
 532.6 / 18:  0.1750  0.2361  0.1456  0.1327  0.3567  0.2076  0.3614  0.3754  0.4059
 563.1 / 19:  0.0653  0.1094  0.1476  0.3287  0.2936  0.2124  0.2815  0.3579  0.3471
 593.5 / 20:  0.0512  0.1363  0.2269  0.3385  0.2615  0.4114  0.3253  0.2236  0.3194
 
! compact form with spaces
LET fcstfine = fcst[GT=($TF_LAG_T)@BIN,GF=($TF_CAL_F)@BIN]
 !-> DEFINE VARIABLE fcstfine = fcst[GT=TF_LAG_T@BIN,GF=TF_CAL_F1@BIN]
SHADE/I=10/J=10 fcstfine
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 fcstfine
             VARIABLE : FCST[GT=TF_LAG_T@BIN,GF=TF_CAL_F1@BIN]
             DATA SET : Forecast series of 9 datasets patterned on long_fcst_1
             FILENAME : my_fmrc
             SUBSET   : 27 by 20 points (FORECAST-MODEL ELAPSED TIME (days))
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1952    1952    1952  
                 1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24      25      26      27
 15.2  /  1:  0.3309    ....    ....  0.2996    ....    ....  0.2663    ....    ....  0.2314    ....    ....  0.1954    ....    ....  0.1586    ....    ....  0.1216    ....    ....  0.0847    ....    ....  0.0485    ....    ....
 45.7  /  2:  0.3436    ....    ....  0.3049    ....    ....  0.2625    ....    ....  0.2253    ....    ....  0.1889    ....    ....  0.1553    ....    ....  0.1127    ....    ....  0.0790    ....    ....  0.0438    ....    ....
 76.1  /  3:  0.3281    ....    ....  0.2846    ....    ....  0.2480    ....    ....  0.2288    ....    ....  0.1760    ....    ....  0.1383    ....    ....  0.1141    ....    ....  0.0766    ....    ....  0.0527    ....    ....
 106.5 /  4:  0.3257    ....    ....  0.2698    ....    ....  0.2459    ....    ....  0.1889    ....    ....  0.1534    ....    ....  0.1250    ....    ....  0.0827    ....    ....  0.0564    ....    ....  0.0278    ....    ....
 137   /  5:  0.2996    ....    ....  0.2460    ....    ....  0.2143    ....    ....  0.1592    ....    ....  0.1477    ....    ....  0.1043    ....    ....  0.0763    ....    ....  0.1019    ....    ....  0.0446    ....    ....
 167.4 /  6:  0.2560    ....    ....  0.2401    ....    ....  0.2050    ....    ....  0.1811    ....    ....  0.1056    ....    ....  0.1339    ....    ....  0.0884    ....    ....  0.0705    ....    ....  0.1009    ....    ....
 197.8 /  7:  0.2185    ....    ....  0.1891    ....    ....  0.1526    ....    ....  0.0948    ....    ....  0.0726    ....    ....  0.0545    ....    ....  0.0690    ....    ....  0.0796    ....    ....  0.0425    ....    ....
 228.3 /  8:  0.1563    ....    ....  0.0959    ....    ....  0.1318    ....    ....  0.1019    ....    ....  0.1382    ....    ....  0.1211    ....    ....  0.1314    ....    ....  0.1344    ....    ....  0.0733    ....    ....
 258.7 /  9:  0.1238    ....    ....  0.1400    ....    ....  0.1338    ....    ....  0.1534    ....    ....  0.0919    ....    ....  0.0478    ....    ....  0.1495    ....    ....  0.0580    ....    ....  0.1095    ....    ....
 289.2 / 10:  0.0836    ....    ....  0.0227    ....    ....  0.1132    ....    ....  0.0251    ....    ....  0.1019    ....    ....  0.0639    ....    ....  0.1040    ....    ....  0.0940    ....    ....  0.0997    ....    ....
 319.6 / 11: -0.0079    ....    ....  0.0922    ....    ....  0.0001    ....    ....  0.0606    ....    ....  0.0753    ....    ....  0.0409    ....    ....  0.1593    ....    ....  0.2240    ....    ....  0.2608    ....    ....
 350   / 12:  0.1291    ....    ....  0.1152    ....    ....  0.1503    ....    ....  0.0868    ....    ....  0.1446    ....    ....  0.0864    ....    ....  0.0977    ....    ....  0.2176    ....    ....  0.1978    ....    ....
 380.5 / 13:  0.0877    ....    .... -0.0121    ....    ....  0.1293    ....    ....  0.0950    ....    ....  0.1879    ....    ....  0.1481    ....    ....  0.1782    ....    ....  0.2343    ....    ....  0.2744    ....    ....
 410.9 / 14:  0.0393    ....    ....  0.1515    ....    ....  0.0904    ....    ....  0.0708    ....    ....  0.0930    ....    ....  0.1414    ....    ....  0.3028    ....    ....  0.2233    ....    ....  0.3498    ....    ....
 441.3 / 15: -0.0616    ....    ....  0.1508    ....    ....  0.1924    ....    ....  0.2259    ....    ....  0.2522    ....    ....  0.1706    ....    ....  0.2937    ....    ....  0.3275    ....    ....  0.4060    ....    ....
 471.8 / 16: -0.0308    ....    .... -0.0037    ....    ....  0.1599    ....    ....  0.1241    ....    ....  0.2576    ....    ....  0.1767    ....    ....  0.3412    ....    ....  0.2720    ....    ....  0.3188    ....    ....
 502.2 / 17:  0.1537    ....    .... -0.0049    ....    ....  0.2213    ....    ....  0.2623    ....    ....  0.1476    ....    ....  0.2229    ....    ....  0.2881    ....    ....  0.3084    ....    ....  0.2656    ....    ....
 532.6 / 18:  0.1750    ....    ....  0.2361    ....    ....  0.1456    ....    ....  0.1327    ....    ....  0.3567    ....    ....  0.2076    ....    ....  0.3614    ....    ....  0.3754    ....    ....  0.4059    ....    ....
 563.1 / 19:  0.0653    ....    ....  0.1094    ....    ....  0.1476    ....    ....  0.3287    ....    ....  0.2936    ....    ....  0.2124    ....    ....  0.2815    ....    ....  0.3579    ....    ....  0.3471    ....    ....
 593.5 / 20:  0.0512    ....    ....  0.1363    ....    ....  0.2269    ....    ....  0.3385    ....    ....  0.2615    ....    ....  0.4114    ....    ....  0.3253    ....    ....  0.2236    ....    ....  0.3194    ....    ....
 
! diagonal form
LET diagform = fcstfine[GT(TF_TIMES)=($TF_CAL_T)]
 !-> DEFINE VARIABLE diagform = fcstfine[GT(TF_TIMES)=TF_CAL_T]
SHADE/I=10/J=10 diagform
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 diagform
             VARIABLE : FCSTFINE[GT(TF_TIMES)=TF_CAL_T]
             DATA SET : Forecast series of 9 datasets patterned on long_fcst_1
             FILENAME : my_fmrc
             SUBSET   : 27 by 20 points (FORECAST-TIME)
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                      1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1952    1952    1952  
                       1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24      25      26      27
 16-JAN-1950 /  1:  0.3309    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1950 /  2:  0.3436    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1950 /  3:  0.3281    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1950 /  4:  0.3257    ....    ....  0.2996    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-MAY-1950 /  5:  0.2996    ....    ....  0.3049    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1950 /  6:  0.2560    ....    ....  0.2846    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUL-1950 /  7:  0.2185    ....    ....  0.2698    ....    ....  0.2663    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-AUG-1950 /  8:  0.1563    ....    ....  0.2460    ....    ....  0.2625    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-SEP-1950 /  9:  0.1238    ....    ....  0.2401    ....    ....  0.2480    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-OCT-1950 / 10:  0.0836    ....    ....  0.1891    ....    ....  0.2459    ....    ....  0.2314    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-NOV-1950 / 11: -0.0079    ....    ....  0.0959    ....    ....  0.2143    ....    ....  0.2253    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-DEC-1950 / 12:  0.1291    ....    ....  0.1400    ....    ....  0.2050    ....    ....  0.2288    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-JAN-1951 / 13:  0.0877    ....    ....  0.0227    ....    ....  0.1526    ....    ....  0.1889    ....    ....  0.1954    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1951 / 14:  0.0393    ....    ....  0.0922    ....    ....  0.1318    ....    ....  0.1592    ....    ....  0.1889    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1951 / 15: -0.0616    ....    ....  0.1152    ....    ....  0.1338    ....    ....  0.1811    ....    ....  0.1760    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1951 / 16: -0.0308    ....    .... -0.0121    ....    ....  0.1132    ....    ....  0.0948    ....    ....  0.1534    ....    ....  0.1586    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAY-1951 / 17:  0.1537    ....    ....  0.1515    ....    ....  0.0001    ....    ....  0.1019    ....    ....  0.1477    ....    ....  0.1553    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1951 / 18:  0.1750    ....    ....  0.1508    ....    ....  0.1503    ....    ....  0.1534    ....    ....  0.1056    ....    ....  0.1383    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-JUL-1951 / 19:  0.0653    ....    .... -0.0037    ....    ....  0.1293    ....    ....  0.0251    ....    ....  0.0726    ....    ....  0.1250    ....    ....  0.1216    ....    ....    ....    ....    ....    ....    ....    ....
 17-AUG-1951 / 20:  0.0512    ....    .... -0.0049    ....    ....  0.0904    ....    ....  0.0606    ....    ....  0.1382    ....    ....  0.1043    ....    ....  0.1127    ....    ....    ....    ....    ....    ....    ....    ....
 
! forecast evaluation form
LET leadform = fcstfine[GT(TF_TIMES)=($TF_CAL_T),GF(TF_TIMES)=($TF_LAG_F)]
 !-> DEFINE VARIABLE leadform = fcstfine[GT(TF_TIMES)=TF_CAL_T,GF(TF_TIMES)=TF_LAG_F]
SHADE/I=10/J=10 leadform
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 leadform
             VARIABLE : FCSTFINE[GT(TF_TIMES)=TF_CAL_T,GF(TF_TIMES)=TF_LAG_F]
             DATA SET : Forecast series of 9 datasets patterned on long_fcst_1
             FILENAME : my_fmrc
             SUBSET   : 24 by 20 points (FORECAST LEAD TIME (days)-TIME)
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                      15.2    45.7    76.1   106.5   137     167.4   197.8   228.3   258.7   289.2   319.6   350     380.5   410.9   441.3   471.8   502.2   532.6   563.1   593.5   624     654.4   684.8   715.3  
                       1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24
 16-JAN-1950 /  1:  0.3309    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1950 /  2:    ....  0.3436    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1950 /  3:    ....    ....  0.3281    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1950 /  4:  0.2996    ....    ....  0.3257    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-MAY-1950 /  5:    ....  0.3049    ....    ....  0.2996    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1950 /  6:    ....    ....  0.2846    ....    ....  0.2560    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUL-1950 /  7:  0.2663    ....    ....  0.2698    ....    ....  0.2185    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-AUG-1950 /  8:    ....  0.2625    ....    ....  0.2460    ....    ....  0.1563    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-SEP-1950 /  9:    ....    ....  0.2480    ....    ....  0.2401    ....    ....  0.1238    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-OCT-1950 / 10:  0.2314    ....    ....  0.2459    ....    ....  0.1891    ....    ....  0.0836    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-NOV-1950 / 11:    ....  0.2253    ....    ....  0.2143    ....    ....  0.0959    ....    .... -0.0079    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-DEC-1950 / 12:    ....    ....  0.2288    ....    ....  0.2050    ....    ....  0.1400    ....    ....  0.1291    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-JAN-1951 / 13:  0.1954    ....    ....  0.1889    ....    ....  0.1526    ....    ....  0.0227    ....    ....  0.0877    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1951 / 14:    ....  0.1889    ....    ....  0.1592    ....    ....  0.1318    ....    ....  0.0922    ....    ....  0.0393    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1951 / 15:    ....    ....  0.1760    ....    ....  0.1811    ....    ....  0.1338    ....    ....  0.1152    ....    .... -0.0616    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1951 / 16:  0.1586    ....    ....  0.1534    ....    ....  0.0948    ....    ....  0.1132    ....    .... -0.0121    ....    .... -0.0308    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAY-1951 / 17:    ....  0.1553    ....    ....  0.1477    ....    ....  0.1019    ....    ....  0.0001    ....    ....  0.1515    ....    ....  0.1537    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1951 / 18:    ....    ....  0.1383    ....    ....  0.1056    ....    ....  0.1534    ....    ....  0.1503    ....    ....  0.1508    ....    ....  0.1750    ....    ....    ....    ....    ....    ....
 18-JUL-1951 / 19:  0.1216    ....    ....  0.1250    ....    ....  0.0726    ....    ....  0.0251    ....    ....  0.1293    ....    .... -0.0037    ....    ....  0.0653    ....    ....    ....    ....    ....
 17-AUG-1951 / 20:    ....  0.1127    ....    ....  0.1043    ....    ....  0.1382    ....    ....  0.0606    ....    ....  0.0904    ....    .... -0.0049    ....    ....  0.0512    ....    ....    ....    ....
 
! forecast error visualizatio
LET errform = leadform - leadform[N=1]
SHADE/I=10/J=10 errform
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 errform
             VARIABLE : LEADFORM - LEADFORM[N=1]
             DATA SET : Forecast series of 9 datasets patterned on long_fcst_1
             FILENAME : my_fmrc
             SUBSET   : 24 by 20 points (FORECAST LEAD TIME (days)-TIME)
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                      15.2    45.7    76.1   106.5   137     167.4   197.8   228.3   258.7   289.2   319.6   350     380.5   410.9   441.3   471.8   502.2   532.6   563.1   593.5   624     654.4   684.8   715.3  
                       1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24
 16-JAN-1950 /  1:  0.0000    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1950 /  2:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1950 /  3:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1950 /  4:  0.0000    ....    ....  0.0261    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-MAY-1950 /  5:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1950 /  6:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUL-1950 /  7:  0.0000    ....    ....  0.0035    ....    .... -0.0478    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-AUG-1950 /  8:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-SEP-1950 /  9:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-OCT-1950 / 10:  0.0000    ....    ....  0.0145    ....    .... -0.0423    ....    .... -0.1479    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-NOV-1950 / 11:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-DEC-1950 / 12:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-JAN-1951 / 13:  0.0000    ....    .... -0.0065    ....    .... -0.0428    ....    .... -0.1727    ....    .... -0.1077    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1951 / 14:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1951 / 15:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1951 / 16:  0.0000    ....    .... -0.0052    ....    .... -0.0637    ....    .... -0.0454    ....    .... -0.1707    ....    .... -0.1894    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAY-1951 / 17:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1951 / 18:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-JUL-1951 / 19:  0.0000    ....    ....  0.0035    ....    .... -0.0489    ....    .... -0.0965    ....    ....  0.0078    ....    .... -0.1253    ....    .... -0.0563    ....    ....    ....    ....    ....
 17-AUG-1951 / 20:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 
! confirm the second variable works, too
LET fcst2fine = fcst_2[GT=($TF_LAG_T)@BIN,GF=($TF_CAL_F)@BIN]
 !-> DEFINE VARIABLE fcst2fine = fcst_2[GT=TF_LAG_T@BIN,GF=TF_CAL_F1@BIN]
LET lead2form = fcst2fine[GT(TF_TIMES)=($TF_CAL_T),GF(TF_TIMES)=($TF_LAG_F)]
 !-> DEFINE VARIABLE lead2form = fcst2fine[GT(TF_TIMES)=TF_CAL_T,GF(TF_TIMES)=TF_LAG_F]
LET err2form = lead2form - lead2form[N=1]
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 err2form
             VARIABLE : LEAD2FORM - LEAD2FORM[N=1]
             DATA SET : Forecast series of 9 datasets patterned on long_fcst_1
             FILENAME : my_fmrc
             SUBSET   : 24 by 20 points (FORECAST LEAD TIME (days)-TIME)
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                      15.2    45.7    76.1   106.5   137     167.4   197.8   228.3   258.7   289.2   319.6   350     380.5   410.9   441.3   471.8   502.2   532.6   563.1   593.5   624     654.4   684.8   715.3  
                       1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24
 16-JAN-1950 /  1:  0.0000    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1950 /  2:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1950 /  3:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1950 /  4:  0.0000    ....    ....  0.0261    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-MAY-1950 /  5:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1950 /  6:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUL-1950 /  7:  0.0000    ....    ....  0.0035    ....    .... -0.0478    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-AUG-1950 /  8:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-SEP-1950 /  9:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-OCT-1950 / 10:  0.0000    ....    ....  0.0145    ....    .... -0.0423    ....    .... -0.1479    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-NOV-1950 / 11:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-DEC-1950 / 12:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-JAN-1951 / 13:  0.0000    ....    .... -0.0065    ....    .... -0.0428    ....    .... -0.1727    ....    .... -0.1077    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1951 / 14:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1951 / 15:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1951 / 16:  0.0000    ....    .... -0.0052    ....    .... -0.0637    ....    .... -0.0454    ....    .... -0.1707    ....    .... -0.1894    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAY-1951 / 17:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1951 / 18:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-JUL-1951 / 19:  0.0000    ....    ....  0.0035    ....    .... -0.0489    ....    .... -0.0965    ....    ....  0.0078    ....    .... -0.1253    ....    .... -0.0563    ....    ....    ....    ....    ....
 17-AUG-1951 / 20:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 
! since the N=1 values are subtracted off, the +2 offset is removed from fcst_2
! so this should give identically zero ... except that all of the subtractions
! lead to errors Order(e-16).  To avoid benchmark results that differ from
! one machine to another, this is commented out
! STAT/I=10/J=10/L=1:20/BRIEF err2form - errform
 
cancel data my_fmrc
 
! agg with the sixth forecast of longer time range than the others
fmrc/hide my_fmrc = tmp/fcst_1.nc, tmp/fcst_2.nc, tmp/fcst_3.nc, tmp/fcst_4.nc, tmp/fcst_5.nc, tmp/long_fcst_6.nc, tmp/fcst_7.nc, tmp/fcst_8.nc
show data/members my_fmrc
     currently SET data sets:
    9> my_fmrc  (default)  Forecast aggregation
 name     title                             I         J         K         L         M         N
 FCST     FIELD + FCST_ERROR               1:21      1:21      ...       1:24      ...       1:8
       (L=1:24)
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:24      ...       1:24
 FCST_2   another variable                 1:21      1:21      ...       1:24      ...       1:8
       (L=1:24)
 
          Member datasets:
      9.1: tmp/fcst_1.nc
      9.2: tmp/fcst_2.nc
      9.3: tmp/fcst_3.nc
      9.4: tmp/fcst_4.nc
      9.5: tmp/fcst_5.nc
      9.6: tmp/long_fcst_6.nc
      9.7: tmp/fcst_7.nc
      9.8: tmp/fcst_8.nc
GO bn_aggregate_f.sub
! bn_aggregate_f.sub
 
DEFINE SYMBOL TF_CAL_T = `fcst._cal_t_ax`
 !-> DEFINE SYMBOL TF_CAL_T = TF_CAL_T
DEFINE SYMBOL TF_LAG_F = `fcst._lag_f_ax`
 !-> DEFINE SYMBOL TF_LAG_F = TF_LAG_F
DEFINE SYMBOL TF_LAG_T = `fcst._lag_t_ax`
 !-> DEFINE SYMBOL TF_LAG_T = TF_LAG_T
DEFINE SYMBOL TF_CAL_F = `fcst._cal_f_ax`
 !-> DEFINE SYMBOL TF_CAL_F = TF_CAL_F2
 
! native compact form
SHADE/I=10/J=10 fcst
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 fcst
             VARIABLE : FIELD + FCST_ERROR
             DATA SET : Forecast series of 8 datasets patterned on fcst_1
             FILENAME : my_fmrc
             SUBSET   : 8 by 20 points (FORECAST-MODEL ELAPSED TIME (days))
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                1950    1950    1950    1950    1951    1951    1951    1951  
                 1       2       3       4       5       6       7       8
 15.2  /  1:  0.3309  0.2996  0.2663  0.2314  0.1954  0.1586  0.1216  0.0847
 45.7  /  2:  0.3436  0.3049  0.2625  0.2253  0.1889  0.1553  0.1127  0.0790
 76.1  /  3:  0.3281  0.2846  0.2480  0.2288  0.1760  0.1383  0.1141  0.0766
 106.5 /  4:  0.3257  0.2698  0.2459  0.1889  0.1534  0.1250  0.0827  0.0564
 137   /  5:  0.2996  0.2460  0.2143  0.1592  0.1477  0.1043  0.0763  0.1019
 167.4 /  6:  0.2560  0.2401  0.2050  0.1811  0.1056  0.1339  0.0884  0.0705
 197.8 /  7:  0.2185  0.1891  0.1526  0.0948  0.0726  0.0545  0.0690  0.0796
 228.3 /  8:  0.1563  0.0959  0.1318  0.1019  0.1382  0.1211  0.1314  0.1344
 258.7 /  9:  0.1238  0.1400  0.1338  0.1534  0.0919  0.0478  0.1495  0.0580
 289.2 / 10:  0.0836  0.0227  0.1132  0.0251  0.1019  0.0639  0.1040  0.0940
 319.6 / 11: -0.0079  0.0922  0.0001  0.0606  0.0753  0.0409  0.1593  0.2240
 350   / 12:  0.1291  0.1152  0.1503  0.0868  0.1446  0.0864  0.0977  0.2176
 380.5 / 13:  0.0877 -0.0121  0.1293  0.0950  0.1879  0.1481  0.1782  0.2343
 410.9 / 14:  0.0393  0.1515  0.0904  0.0708  0.0930  0.1414  0.3028  0.2233
 441.3 / 15: -0.0616  0.1508  0.1924  0.2259  0.2522  0.1706  0.2937  0.3275
 471.8 / 16: -0.0308 -0.0037  0.1599  0.1241  0.2576  0.1767  0.3412  0.2720
 502.2 / 17:  0.1537 -0.0049  0.2213  0.2623  0.1476  0.2229  0.2881  0.3084
 532.6 / 18:  0.1750  0.2361  0.1456  0.1327  0.3567  0.2076  0.3614  0.3754
 563.1 / 19:  0.0653  0.1094  0.1476  0.3287  0.2936  0.2124  0.2815  0.3579
 593.5 / 20:  0.0512  0.1363  0.2269  0.3385  0.2615  0.4114  0.3253  0.2236
 
! compact form with spaces
LET fcstfine = fcst[GT=($TF_LAG_T)@BIN,GF=($TF_CAL_F)@BIN]
 !-> DEFINE VARIABLE fcstfine = fcst[GT=TF_LAG_T@BIN,GF=TF_CAL_F2@BIN]
SHADE/I=10/J=10 fcstfine
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 fcstfine
             VARIABLE : FCST[GT=TF_LAG_T@BIN,GF=TF_CAL_F2@BIN]
             DATA SET : Forecast series of 8 datasets patterned on fcst_1
             FILENAME : my_fmrc
             SUBSET   : 24 by 20 points (FORECAST-MODEL ELAPSED TIME (days))
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951  
                 1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24
 15.2  /  1:  0.3309    ....    ....  0.2996    ....    ....  0.2663    ....    ....  0.2314    ....    ....  0.1954    ....    ....  0.1586    ....    ....  0.1216    ....    ....  0.0847    ....    ....
 45.7  /  2:  0.3436    ....    ....  0.3049    ....    ....  0.2625    ....    ....  0.2253    ....    ....  0.1889    ....    ....  0.1553    ....    ....  0.1127    ....    ....  0.0790    ....    ....
 76.1  /  3:  0.3281    ....    ....  0.2846    ....    ....  0.2480    ....    ....  0.2288    ....    ....  0.1760    ....    ....  0.1383    ....    ....  0.1141    ....    ....  0.0766    ....    ....
 106.5 /  4:  0.3257    ....    ....  0.2698    ....    ....  0.2459    ....    ....  0.1889    ....    ....  0.1534    ....    ....  0.1250    ....    ....  0.0827    ....    ....  0.0564    ....    ....
 137   /  5:  0.2996    ....    ....  0.2460    ....    ....  0.2143    ....    ....  0.1592    ....    ....  0.1477    ....    ....  0.1043    ....    ....  0.0763    ....    ....  0.1019    ....    ....
 167.4 /  6:  0.2560    ....    ....  0.2401    ....    ....  0.2050    ....    ....  0.1811    ....    ....  0.1056    ....    ....  0.1339    ....    ....  0.0884    ....    ....  0.0705    ....    ....
 197.8 /  7:  0.2185    ....    ....  0.1891    ....    ....  0.1526    ....    ....  0.0948    ....    ....  0.0726    ....    ....  0.0545    ....    ....  0.0690    ....    ....  0.0796    ....    ....
 228.3 /  8:  0.1563    ....    ....  0.0959    ....    ....  0.1318    ....    ....  0.1019    ....    ....  0.1382    ....    ....  0.1211    ....    ....  0.1314    ....    ....  0.1344    ....    ....
 258.7 /  9:  0.1238    ....    ....  0.1400    ....    ....  0.1338    ....    ....  0.1534    ....    ....  0.0919    ....    ....  0.0478    ....    ....  0.1495    ....    ....  0.0580    ....    ....
 289.2 / 10:  0.0836    ....    ....  0.0227    ....    ....  0.1132    ....    ....  0.0251    ....    ....  0.1019    ....    ....  0.0639    ....    ....  0.1040    ....    ....  0.0940    ....    ....
 319.6 / 11: -0.0079    ....    ....  0.0922    ....    ....  0.0001    ....    ....  0.0606    ....    ....  0.0753    ....    ....  0.0409    ....    ....  0.1593    ....    ....  0.2240    ....    ....
 350   / 12:  0.1291    ....    ....  0.1152    ....    ....  0.1503    ....    ....  0.0868    ....    ....  0.1446    ....    ....  0.0864    ....    ....  0.0977    ....    ....  0.2176    ....    ....
 380.5 / 13:  0.0877    ....    .... -0.0121    ....    ....  0.1293    ....    ....  0.0950    ....    ....  0.1879    ....    ....  0.1481    ....    ....  0.1782    ....    ....  0.2343    ....    ....
 410.9 / 14:  0.0393    ....    ....  0.1515    ....    ....  0.0904    ....    ....  0.0708    ....    ....  0.0930    ....    ....  0.1414    ....    ....  0.3028    ....    ....  0.2233    ....    ....
 441.3 / 15: -0.0616    ....    ....  0.1508    ....    ....  0.1924    ....    ....  0.2259    ....    ....  0.2522    ....    ....  0.1706    ....    ....  0.2937    ....    ....  0.3275    ....    ....
 471.8 / 16: -0.0308    ....    .... -0.0037    ....    ....  0.1599    ....    ....  0.1241    ....    ....  0.2576    ....    ....  0.1767    ....    ....  0.3412    ....    ....  0.2720    ....    ....
 502.2 / 17:  0.1537    ....    .... -0.0049    ....    ....  0.2213    ....    ....  0.2623    ....    ....  0.1476    ....    ....  0.2229    ....    ....  0.2881    ....    ....  0.3084    ....    ....
 532.6 / 18:  0.1750    ....    ....  0.2361    ....    ....  0.1456    ....    ....  0.1327    ....    ....  0.3567    ....    ....  0.2076    ....    ....  0.3614    ....    ....  0.3754    ....    ....
 563.1 / 19:  0.0653    ....    ....  0.1094    ....    ....  0.1476    ....    ....  0.3287    ....    ....  0.2936    ....    ....  0.2124    ....    ....  0.2815    ....    ....  0.3579    ....    ....
 593.5 / 20:  0.0512    ....    ....  0.1363    ....    ....  0.2269    ....    ....  0.3385    ....    ....  0.2615    ....    ....  0.4114    ....    ....  0.3253    ....    ....  0.2236    ....    ....
 
! diagonal form
LET diagform = fcstfine[GT(TF_TIMES)=($TF_CAL_T)]
 !-> DEFINE VARIABLE diagform = fcstfine[GT(TF_TIMES)=TF_CAL_T]
SHADE/I=10/J=10 diagform
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 diagform
             VARIABLE : FCSTFINE[GT(TF_TIMES)=TF_CAL_T]
             DATA SET : Forecast series of 8 datasets patterned on fcst_1
             FILENAME : my_fmrc
             SUBSET   : 24 by 20 points (FORECAST-TIME)
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                      1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1950    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951    1951  
                       1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24
 16-JAN-1950 /  1:  0.3309    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1950 /  2:  0.3436    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1950 /  3:  0.3281    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1950 /  4:  0.3257    ....    ....  0.2996    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-MAY-1950 /  5:  0.2996    ....    ....  0.3049    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1950 /  6:  0.2560    ....    ....  0.2846    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUL-1950 /  7:  0.2185    ....    ....  0.2698    ....    ....  0.2663    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-AUG-1950 /  8:  0.1563    ....    ....  0.2460    ....    ....  0.2625    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-SEP-1950 /  9:  0.1238    ....    ....  0.2401    ....    ....  0.2480    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-OCT-1950 / 10:  0.0836    ....    ....  0.1891    ....    ....  0.2459    ....    ....  0.2314    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-NOV-1950 / 11: -0.0079    ....    ....  0.0959    ....    ....  0.2143    ....    ....  0.2253    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-DEC-1950 / 12:  0.1291    ....    ....  0.1400    ....    ....  0.2050    ....    ....  0.2288    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-JAN-1951 / 13:  0.0877    ....    ....  0.0227    ....    ....  0.1526    ....    ....  0.1889    ....    ....  0.1954    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1951 / 14:  0.0393    ....    ....  0.0922    ....    ....  0.1318    ....    ....  0.1592    ....    ....  0.1889    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1951 / 15: -0.0616    ....    ....  0.1152    ....    ....  0.1338    ....    ....  0.1811    ....    ....  0.1760    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1951 / 16: -0.0308    ....    .... -0.0121    ....    ....  0.1132    ....    ....  0.0948    ....    ....  0.1534    ....    ....  0.1586    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAY-1951 / 17:  0.1537    ....    ....  0.1515    ....    ....  0.0001    ....    ....  0.1019    ....    ....  0.1477    ....    ....  0.1553    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1951 / 18:  0.1750    ....    ....  0.1508    ....    ....  0.1503    ....    ....  0.1534    ....    ....  0.1056    ....    ....  0.1383    ....    ....    ....    ....    ....    ....    ....    ....
 18-JUL-1951 / 19:  0.0653    ....    .... -0.0037    ....    ....  0.1293    ....    ....  0.0251    ....    ....  0.0726    ....    ....  0.1250    ....    ....  0.1216    ....    ....    ....    ....    ....
 17-AUG-1951 / 20:  0.0512    ....    .... -0.0049    ....    ....  0.0904    ....    ....  0.0606    ....    ....  0.1382    ....    ....  0.1043    ....    ....  0.1127    ....    ....    ....    ....    ....
 
! forecast evaluation form
LET leadform = fcstfine[GT(TF_TIMES)=($TF_CAL_T),GF(TF_TIMES)=($TF_LAG_F)]
 !-> DEFINE VARIABLE leadform = fcstfine[GT(TF_TIMES)=TF_CAL_T,GF(TF_TIMES)=TF_LAG_F]
SHADE/I=10/J=10 leadform
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 leadform
             VARIABLE : FCSTFINE[GT(TF_TIMES)=TF_CAL_T,GF(TF_TIMES)=TF_LAG_F]
             DATA SET : Forecast series of 8 datasets patterned on fcst_1
             FILENAME : my_fmrc
             SUBSET   : 24 by 20 points (FORECAST LEAD TIME (days)-TIME)
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                      15.2    45.7    76.1   106.5   137     167.4   197.8   228.3   258.7   289.2   319.6   350     380.5   410.9   441.3   471.8   502.2   532.6   563.1   593.5   624     654.4   684.8   715.3  
                       1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24
 16-JAN-1950 /  1:  0.3309    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1950 /  2:    ....  0.3436    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1950 /  3:    ....    ....  0.3281    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1950 /  4:  0.2996    ....    ....  0.3257    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-MAY-1950 /  5:    ....  0.3049    ....    ....  0.2996    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1950 /  6:    ....    ....  0.2846    ....    ....  0.2560    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUL-1950 /  7:  0.2663    ....    ....  0.2698    ....    ....  0.2185    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-AUG-1950 /  8:    ....  0.2625    ....    ....  0.2460    ....    ....  0.1563    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-SEP-1950 /  9:    ....    ....  0.2480    ....    ....  0.2401    ....    ....  0.1238    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-OCT-1950 / 10:  0.2314    ....    ....  0.2459    ....    ....  0.1891    ....    ....  0.0836    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-NOV-1950 / 11:    ....  0.2253    ....    ....  0.2143    ....    ....  0.0959    ....    .... -0.0079    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-DEC-1950 / 12:    ....    ....  0.2288    ....    ....  0.2050    ....    ....  0.1400    ....    ....  0.1291    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-JAN-1951 / 13:  0.1954    ....    ....  0.1889    ....    ....  0.1526    ....    ....  0.0227    ....    ....  0.0877    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1951 / 14:    ....  0.1889    ....    ....  0.1592    ....    ....  0.1318    ....    ....  0.0922    ....    ....  0.0393    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1951 / 15:    ....    ....  0.1760    ....    ....  0.1811    ....    ....  0.1338    ....    ....  0.1152    ....    .... -0.0616    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1951 / 16:  0.1586    ....    ....  0.1534    ....    ....  0.0948    ....    ....  0.1132    ....    .... -0.0121    ....    .... -0.0308    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAY-1951 / 17:    ....  0.1553    ....    ....  0.1477    ....    ....  0.1019    ....    ....  0.0001    ....    ....  0.1515    ....    ....  0.1537    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1951 / 18:    ....    ....  0.1383    ....    ....  0.1056    ....    ....  0.1534    ....    ....  0.1503    ....    ....  0.1508    ....    ....  0.1750    ....    ....    ....    ....    ....    ....
 18-JUL-1951 / 19:  0.1216    ....    ....  0.1250    ....    ....  0.0726    ....    ....  0.0251    ....    ....  0.1293    ....    .... -0.0037    ....    ....  0.0653    ....    ....    ....    ....    ....
 17-AUG-1951 / 20:    ....  0.1127    ....    ....  0.1043    ....    ....  0.1382    ....    ....  0.0606    ....    ....  0.0904    ....    .... -0.0049    ....    ....  0.0512    ....    ....    ....    ....
 
! forecast error visualizatio
LET errform = leadform - leadform[N=1]
SHADE/I=10/J=10 errform
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 errform
             VARIABLE : LEADFORM - LEADFORM[N=1]
             DATA SET : Forecast series of 8 datasets patterned on fcst_1
             FILENAME : my_fmrc
             SUBSET   : 24 by 20 points (FORECAST LEAD TIME (days)-TIME)
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                      15.2    45.7    76.1   106.5   137     167.4   197.8   228.3   258.7   289.2   319.6   350     380.5   410.9   441.3   471.8   502.2   532.6   563.1   593.5   624     654.4   684.8   715.3  
                       1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24
 16-JAN-1950 /  1:  0.0000    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1950 /  2:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1950 /  3:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1950 /  4:  0.0000    ....    ....  0.0261    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-MAY-1950 /  5:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1950 /  6:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUL-1950 /  7:  0.0000    ....    ....  0.0035    ....    .... -0.0478    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-AUG-1950 /  8:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-SEP-1950 /  9:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-OCT-1950 / 10:  0.0000    ....    ....  0.0145    ....    .... -0.0423    ....    .... -0.1479    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-NOV-1950 / 11:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-DEC-1950 / 12:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-JAN-1951 / 13:  0.0000    ....    .... -0.0065    ....    .... -0.0428    ....    .... -0.1727    ....    .... -0.1077    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1951 / 14:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1951 / 15:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1951 / 16:  0.0000    ....    .... -0.0052    ....    .... -0.0637    ....    .... -0.0454    ....    .... -0.1707    ....    .... -0.1894    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAY-1951 / 17:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1951 / 18:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-JUL-1951 / 19:  0.0000    ....    ....  0.0035    ....    .... -0.0489    ....    .... -0.0965    ....    ....  0.0078    ....    .... -0.1253    ....    .... -0.0563    ....    ....    ....    ....    ....
 17-AUG-1951 / 20:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 
! confirm the second variable works, too
LET fcst2fine = fcst_2[GT=($TF_LAG_T)@BIN,GF=($TF_CAL_F)@BIN]
 !-> DEFINE VARIABLE fcst2fine = fcst_2[GT=TF_LAG_T@BIN,GF=TF_CAL_F2@BIN]
LET lead2form = fcst2fine[GT(TF_TIMES)=($TF_CAL_T),GF(TF_TIMES)=($TF_LAG_F)]
 !-> DEFINE VARIABLE lead2form = fcst2fine[GT(TF_TIMES)=TF_CAL_T,GF(TF_TIMES)=TF_LAG_F]
LET err2form = lead2form - lead2form[N=1]
LIST/I=10/J=10/ORDER=FT/L=1:20/WIDTH=300 err2form
             VARIABLE : LEAD2FORM - LEAD2FORM[N=1]
             DATA SET : Forecast series of 8 datasets patterned on fcst_1
             FILENAME : my_fmrc
             SUBSET   : 24 by 20 points (FORECAST LEAD TIME (days)-TIME)
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                      15.2    45.7    76.1   106.5   137     167.4   197.8   228.3   258.7   289.2   319.6   350     380.5   410.9   441.3   471.8   502.2   532.6   563.1   593.5   624     654.4   684.8   715.3  
                       1       2       3       4       5       6       7       8       9      10      11      12      13      14      15      16      17      18      19      20      21      22      23      24
 16-JAN-1950 /  1:  0.0000    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1950 /  2:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1950 /  3:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1950 /  4:  0.0000    ....    ....  0.0261    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-MAY-1950 /  5:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1950 /  6:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUL-1950 /  7:  0.0000    ....    ....  0.0035    ....    .... -0.0478    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-AUG-1950 /  8:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-SEP-1950 /  9:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-OCT-1950 / 10:  0.0000    ....    ....  0.0145    ....    .... -0.0423    ....    .... -0.1479    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-NOV-1950 / 11:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-DEC-1950 / 12:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 16-JAN-1951 / 13:  0.0000    ....    .... -0.0065    ....    .... -0.0428    ....    .... -0.1727    ....    .... -0.1077    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 15-FEB-1951 / 14:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAR-1951 / 15:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-APR-1951 / 16:  0.0000    ....    .... -0.0052    ....    .... -0.0637    ....    .... -0.0454    ....    .... -0.1707    ....    .... -0.1894    ....    ....    ....    ....    ....    ....    ....    ....
 18-MAY-1951 / 17:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 17-JUN-1951 / 18:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 18-JUL-1951 / 19:  0.0000    ....    ....  0.0035    ....    .... -0.0489    ....    .... -0.0965    ....    ....  0.0078    ....    .... -0.1253    ....    .... -0.0563    ....    ....    ....    ....    ....
 17-AUG-1951 / 20:    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....    ....
 
! since the N=1 values are subtracted off, the +2 offset is removed from fcst_2
! so this should give identically zero ... except that all of the subtractions
! lead to errors Order(e-16).  To avoid benchmark results that differ from
! one machine to another, this is commented out
! STAT/I=10/J=10/L=1:20/BRIEF err2form - errform
 
cancel data my_fmrc
 
! agg where one dataset lacks one of the variables
fmrc/hide my_fmrc = tmp/fcst_7.nc, tmp/fcst_4.nc, tmp/fcst_5.nc, tmp/one_var_fcst_6.nc, tmp/fcst_3.nc
show data/members
     currently SET data sets:
    6> my_fmrc  (default)  Forecast aggregation
 name     title                             I         J         K         L         M         N
 FCST     FIELD + FCST_ERROR               1:21      1:21      ...       1:24      ...       1:5
       (L=7:30)
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:24      ...       1:15
 
          Member datasets:
      6.1: tmp/fcst_3.nc
      6.2: tmp/fcst_4.nc
      6.3: tmp/fcst_5.nc
      6.4: tmp/one_var_fcst_6.nc
      6.5: tmp/fcst_7.nc
stat/l=1:20 fcst
 
             FIELD + FCST_ERROR
             LONGITUDE: 139.5E to 160.5E
             LATITUDE: 19.5N to 40.5N
             Z:  N/A
             MODEL ELAPSED TIME (days): 0 to 608.7375
             E:  N/A
             FORECAST: 17-MAY-1950 23:10 to 17-AUG-1951 12:27
             DATA SET: my_fmrc
 
 Total # of data points: 44100 (21*21*1*20*1*5)
 # flagged as bad  data: 0
 Minimum value: -0.99999
 Maximum value: 1.3581
 Mean    value: 0.11141 (unweighted average)
 Standard deviation: 0.54038
cancel data my_fmrc
 
! ... added 1/28/2016
! the same agg, but the dataset name pulled implicitly from the script name
fmrc/hide tmp/fcst_7.nc, tmp/fcst_4.nc, tmp/fcst_5.nc, tmp/one_var_fcst_6.nc, tmp/fcst_3.nc
show data/brief
     currently SET data sets:
    6> ./v6jnls/bn_aggregate_f.jnl  (default)  Forecast aggregation
 
! the same agg using the very same files under a different name
fmrc/hide my_fmrc = tmp/fcst_7.nc, tmp/fcst_4.nc, tmp/fcst_5.nc, tmp/one_var_fcst_6.nc, tmp/fcst_3.nc
show data/full
     currently SET data sets:
    6> ./v6jnls/bn_aggregate_f.jnl     Forecast aggregation
     Forecast series of 5 datasets patterned on fcst_3
 name     title                             I         J         K         L         M         N
 FCST     FIELD + FCST_ERROR               1:21      1:21      ...       1:24      ...       1:5
       (L=7:30)
               on grid GFN11 with -1.E+34 for missing data
             X=139.5E:160.5E  Y=19.5N:40.5N  F=17-MAY-1950 23:10:17-AUG-1951 12:27  
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:24      ...       1:15
             days since 01-JAN-1900 on grid FTI1 with -1.E+34 for missing data
             F=17-JUN-1950 09:40:16-SEP-1951 22:56  
 
  time range: 15.21844 to 715.26656
 
          Member datasets:
      6.1: tmp/fcst_3.nc
      6.2: tmp/fcst_4.nc
      6.3: tmp/fcst_5.nc
      6.4: tmp/one_var_fcst_6.nc
      6.5: tmp/fcst_7.nc
    7> my_fmrc  (default)  Forecast aggregation
     Forecast series of 5 datasets patterned on fcst_3
 name     title                             I         J         K         L         M         N
 FCST     FIELD + FCST_ERROR               1:21      1:21      ...       1:24      ...       1:5
       (L=7:30)
               on grid GFN12 with -1.E+34 for missing data
             X=139.5E:160.5E  Y=19.5N:40.5N  F=17-MAY-1950 23:10:17-AUG-1951 12:27  
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:24      ...       1:15
             days since 01-JAN-1900 on grid FTI2 with -1.E+34 for missing data
             F=17-JUN-1950 09:40:16-SEP-1951 22:56  
 
  time range: 15.21844 to 715.26656
 
          Member datasets:
      7.1: tmp/fcst_3.nc
      7.2: tmp/fcst_4.nc
      7.3: tmp/fcst_5.nc
      7.4: tmp/one_var_fcst_6.nc
      7.5: tmp/fcst_7.nc
 
! cancel a component dataset -- used in two aggregations
cancel data tmp/fcst_4.nc
show data
     currently SET data sets:
 
! re-define the same aggs again.
! then cancel one of them only and note that the hidden files remain
fmrc/hide tmp/fcst_7.nc, tmp/fcst_4.nc, tmp/fcst_5.nc, tmp/one_var_fcst_6.nc, tmp/fcst_3.nc
fmrc/hide my_fmrc = tmp/fcst_7.nc, tmp/fcst_4.nc, tmp/fcst_5.nc, tmp/one_var_fcst_6.nc, tmp/fcst_3.nc
cancel data my_fmrc
show data/br/hidden
     currently SET data sets:
    1> tmp/fcst_7.nc
    2> tmp/fcst_4.nc
    3> tmp/fcst_5.nc
    4> tmp/one_var_fcst_6.nc
    5> tmp/fcst_3.nc
    6> ./v6jnls/bn_aggregate_f.jnl     Forecast aggregation
cancel data bn_aggregate_f.jnl   ! 3/16 bug fix (was "...sub")
show data
     currently SET data sets:
 
! agg where a LET/D variable is used to fill in a missing variable
use tmp/one_var_fcst_1.nc, tmp/one_var_fcst_6.nc
let/d=one_var_fcst_1.nc fcst_2 = fcst + 2  ! compute same value as file vars
let/d=one_var_fcst_6.nc fcst_2 = fcst + 2  ! compute same value as file vars
FMRC/hide my_fmrc_letd_6 = tmp/fcst_1.nc, tmp/fcst_2.nc, tmp/fcst_3.nc, tmp/fcst_4.nc, tmp/fcst_5.nc, tmp/one_var_fcst_6.nc, tmp/fcst_7.nc
FMRC/hide my_fmrc_letd_1 = tmp/one_var_fcst_1.nc, tmp/fcst_2.nc, tmp/fcst_3.nc, tmp/fcst_4.nc, tmp/fcst_5.nc, tmp/fcst_6.nc, tmp/fcst_7.nc
FMRC/hide my_fmrc = tmp/fcst_1.nc, tmp/fcst_2.nc, tmp/fcst_3.nc, tmp/fcst_4.nc, tmp/fcst_5.nc, tmp/fcst_6.nc, tmp/fcst_7.nc
show data/members
     currently SET data sets:
    9> my_fmrc_letd_6     Forecast aggregation
 name     title                             I         J         K         L         M         N
 FCST     FIELD + FCST_ERROR               1:21      1:21      ...       1:24      ...       1:7
       (L=1:24)
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:24      ...       1:21
 FCST_2   another variable                 1:21      1:21      ...       1:24      ...       1:7
       (L=1:24)
 
          Member datasets:
      9.1: tmp/fcst_1.nc
      9.2: tmp/fcst_2.nc
      9.3: tmp/fcst_3.nc
      9.4: tmp/fcst_4.nc
      9.5: tmp/fcst_5.nc
      9.6: tmp/one_var_fcst_6.nc
      9.7: tmp/fcst_7.nc
   11> my_fmrc_letd_1     Forecast aggregation
 name     title                             I         J         K         L         M         N
 FCST_2   another variable                 1:21      1:21      ...       1:24      ...       1:7
       (L=4:27)
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:24      ...       1:21
 FCST     FIELD + FCST_ERROR               1:21      1:21      ...       1:24      ...       1:7
       (L=1:24)
 
          Member datasets:
      11.1: tmp/one_var_fcst_1.nc
      11.2: tmp/fcst_2.nc
      11.3: tmp/fcst_3.nc
      11.4: tmp/fcst_4.nc
      11.5: tmp/fcst_5.nc
      11.6: tmp/fcst_6.nc
      11.7: tmp/fcst_7.nc
   12> my_fmrc  (default)  Forecast aggregation
 name     title                             I         J         K         L         M         N
 FCST     FIELD + FCST_ERROR               1:21      1:21      ...       1:24      ...       1:7
       (L=1:24)
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:24      ...       1:21
 FCST_2   another variable                 1:21      1:21      ...       1:24      ...       1:7
       (L=1:24)
 
          Member datasets:
      12.1: tmp/fcst_1.nc
      12.2: tmp/fcst_2.nc
      12.3: tmp/fcst_3.nc
      12.4: tmp/fcst_4.nc
      12.5: tmp/fcst_5.nc
      12.6: tmp/fcst_6.nc
      12.7: tmp/fcst_7.nc
show data
     currently SET data sets:
    9> my_fmrc_letd_6     Forecast aggregation
 name     title                             I         J         K         L         M         N
 FCST     FIELD + FCST_ERROR               1:21      1:21      ...       1:24      ...       1:7
       (L=1:24)
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:24      ...       1:21
 FCST_2   another variable                 1:21      1:21      ...       1:24      ...       1:7
       (L=1:24)
 
   11> my_fmrc_letd_1     Forecast aggregation
 name     title                             I         J         K         L         M         N
 FCST_2   another variable                 1:21      1:21      ...       1:24      ...       1:7
       (L=4:27)
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:24      ...       1:21
 FCST     FIELD + FCST_ERROR               1:21      1:21      ...       1:24      ...       1:7
       (L=1:24)
 
   12> my_fmrc  (default)  Forecast aggregation
 name     title                             I         J         K         L         M         N
 FCST     FIELD + FCST_ERROR               1:21      1:21      ...       1:24      ...       1:7
       (L=1:24)
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:24      ...       1:21
 FCST_2   another variable                 1:21      1:21      ...       1:24      ...       1:7
       (L=1:24)
 
! should be all 0's:
list/i=10/j=10/order=ft/l=1:20/width=200 fcst_2[d=my_fmrc_letd_6] - fcst_2[d=my_fmrc]
             VARIABLE : FCST_2[D=MY_FMRC_LETD_6] - FCST_2[D=MY_FMRC]
             SUBSET   : 7 by 20 points (FORECAST-MODEL ELAPSED TIME (days))
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                1950    1950    1950    1950    1951    1951    1951  
                 1       2       3       4       5       6       7
 15.2  /  1:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 45.7  /  2:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 76.1  /  3:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 106.5 /  4:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 137   /  5:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 167.4 /  6:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 197.8 /  7:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 228.3 /  8:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 258.7 /  9:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 289.2 / 10:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 319.6 / 11:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 350   / 12:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 380.5 / 13:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 410.9 / 14:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 441.3 / 15:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 471.8 / 16:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 502.2 / 17:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 532.6 / 18:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 563.1 / 19:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 593.5 / 20:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
! should be all 0's:
list/i=10/j=10/order=ft/l=1:20/width=200 fcst_2[d=my_fmrc_letd_6] - fcst_2[d=my_fmrc_letd_1]
             VARIABLE : FCST_2[D=MY_FMRC_LETD_6] - FCST_2[D=MY_FMRC_LETD_1]
             SUBSET   : 7 by 20 points (FORECAST-MODEL ELAPSED TIME (days))
             LONGITUDE: 149E
             LATITUDE : 29N
             Initialization time increases across row.  Verification time increases down page. 
                1950    1950    1950    1950    1951    1951    1951  
                 1       2       3       4       5       6       7
 15.2  /  1:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 45.7  /  2:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 76.1  /  3:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 106.5 /  4:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 137   /  5:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 167.4 /  6:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 197.8 /  7:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 228.3 /  8:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 258.7 /  9:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 289.2 / 10:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 319.6 / 11:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 350   / 12:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 380.5 / 13:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 410.9 / 14:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 441.3 / 15:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 471.8 / 16:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 502.2 / 17:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 532.6 / 18:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 563.1 / 19:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 593.5 / 20:  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
cancel data my_fmrc
cancel data my_fmrc_letd_1, my_fmrc_letd_6
 
! files already opened and not hidden remain open after aggregation
use tmp/fcst_1.nc, tmp/fcst_2.nc, tmp/fcst_3.nc, tmp/fcst_9.nc, tmp/fcst_10.nc, tmp/fcst_11.nc
fmrc my_fmrc = XCAT(files[I=6:10],{"6","1"})           ! without /HIDE
cancel data my_fmrc
show data/brief
     currently SET data sets:
    1> tmp/fcst_1.nc
    2> tmp/fcst_2.nc
    3> tmp/fcst_3.nc
    4> tmp/fcst_9.nc
    5> tmp/fcst_10.nc
    6> tmp/fcst_11.nc
cancel data/all
 
! *************************************
! deliberate errors
set mode ignore
 
! error - duplicate file
fmrc my_fmrc = tmp/fcst_1.nc, tmp/fcst_2.nc,tmp/fcst_2.nc,tmp/fcst_3.nc
SH DATA/BR/HIDDEN
     currently SET data sets:
 
! error - unknown dataset
fmrc my_fmrc = XCAT(files,"tmp/no_exist.nc")
SH DATA/BR/HIDDEN
     currently SET data sets:
 
! error - inserting forecasts at two consecutive steps implies too many gaps
fmrc my_fmrc = XCAT(files,"tmp/consecutive_month_fcst.nc")
SH DATA/BR/HIDDEN
     currently SET data sets:
 
! error - inserting out of sequence forecast
fmrc my_fmrc = XCAT(files,"tmp/irregular_start_time_fcst.nc")
SH DATA/BR/HIDDEN
     currently SET data sets:
 
set mode/last ignore
*** Running ferret script: bn_aggregate_tef.jnl
! bn_aggregate_tef.F
! 2/2016 *sh*
! 3/2016 - modified to test single point axis aggregations on Z axis
! 1/2017 *acm* changes in output due to backing off auto-detection of truemonth axes, tkt 2497
! *acm*7/2017 0=success for SPAWN_STATUS
! 6/2018 *acm*Note SHOW DATA output changes:
!             Auto-generated grid names change
!             Ensembles include variables synthesized from dataset names and global atts of members
 
! to avoid re-creating the test files include argument "0" as in
!  yes?  GO bn_aggregate_tef 0
 
 
! exercise 6D aggregations: T, E, and F simultaneously
 
! do not bother to echo the creation of files and the definitions of the
! many time aggregations
CANCEL MODE VERIFY
 
show data/members/br
     currently SET data sets:
    1> t_f01_e1
tmp/f01_e1_t1.nc
tmp/f01_e1_t2.nc
tmp/f01_e1_t3.nc
 
    2> t_f01_e2
tmp/f01_e2_t1.nc
tmp/f01_e2_t2.nc
tmp/f01_e2_t3.nc
 
    3> t_f01_e3
tmp/f01_e3_t1.nc
tmp/f01_e3_t2.nc
tmp/f01_e3_t3.nc
 
    4> t_f01_e4
tmp/f01_e4_t1.nc
tmp/f01_e4_t2.nc
tmp/f01_e4_t3.nc
 
    5> t_f01_e5
tmp/f01_e5_t1.nc
tmp/f01_e5_t2.nc
tmp/f01_e5_t3.nc
 
    6> t_f02_e1
tmp/f02_e1_t1.nc
tmp/f02_e1_t2.nc
tmp/f02_e1_t3.nc
 
    7> t_f02_e2
tmp/f02_e2_t1.nc
tmp/f02_e2_t2.nc
tmp/f02_e2_t3.nc
 
    8> t_f02_e3
tmp/f02_e3_t1.nc
tmp/f02_e3_t2.nc
tmp/f02_e3_t3.nc
 
    9> t_f02_e4
tmp/f02_e4_t1.nc
tmp/f02_e4_t2.nc
tmp/f02_e4_t3.nc
 
   10> t_f02_e5
tmp/f02_e5_t1.nc
tmp/f02_e5_t2.nc
tmp/f02_e5_t3.nc
 
   11> t_f03_e1
tmp/f03_e1_t1.nc
tmp/f03_e1_t2.nc
tmp/f03_e1_t3.nc
 
   12> t_f03_e2
tmp/f03_e2_t1.nc
tmp/f03_e2_t2.nc
tmp/f03_e2_t3.nc
 
   13> t_f03_e3
tmp/f03_e3_t1.nc
tmp/f03_e3_t2.nc
tmp/f03_e3_t3.nc
 
   14> t_f03_e4
tmp/f03_e4_t1.nc
tmp/f03_e4_t2.nc
tmp/f03_e4_t3.nc
 
   15> t_f03_e5
tmp/f03_e5_t1.nc
tmp/f03_e5_t2.nc
tmp/f03_e5_t3.nc
 
   16> t_f04_e1
tmp/f04_e1_t1.nc
tmp/f04_e1_t2.nc
tmp/f04_e1_t3.nc
 
   17> t_f04_e2
tmp/f04_e2_t1.nc
tmp/f04_e2_t2.nc
tmp/f04_e2_t3.nc
 
   18> t_f04_e3
tmp/f04_e3_t1.nc
tmp/f04_e3_t2.nc
tmp/f04_e3_t3.nc
 
   19> t_f04_e4
tmp/f04_e4_t1.nc
tmp/f04_e4_t2.nc
tmp/f04_e4_t3.nc
 
   20> t_f04_e5
tmp/f04_e5_t1.nc
tmp/f04_e5_t2.nc
tmp/f04_e5_t3.nc
 
   21> t_f05_e1
tmp/f05_e1_t1.nc
tmp/f05_e1_t2.nc
tmp/f05_e1_t3.nc
 
   22> t_f05_e2
tmp/f05_e2_t1.nc
tmp/f05_e2_t2.nc
tmp/f05_e2_t3.nc
 
   23> t_f05_e3
tmp/f05_e3_t1.nc
tmp/f05_e3_t2.nc
tmp/f05_e3_t3.nc
 
   24> t_f05_e4
tmp/f05_e4_t1.nc
tmp/f05_e4_t2.nc
tmp/f05_e4_t3.nc
 
   25> t_f05_e5
tmp/f05_e5_t1.nc
tmp/f05_e5_t2.nc
tmp/f05_e5_t3.nc
 
   26> t_f06_e1
tmp/f06_e1_t1.nc
tmp/f06_e1_t2.nc
tmp/f06_e1_t3.nc
 
   27> t_f06_e2
tmp/f06_e2_t1.nc
tmp/f06_e2_t2.nc
tmp/f06_e2_t3.nc
 
   28> t_f06_e3
tmp/f06_e3_t1.nc
tmp/f06_e3_t2.nc
tmp/f06_e3_t3.nc
 
   29> t_f06_e4
tmp/f06_e4_t1.nc
tmp/f06_e4_t2.nc
tmp/f06_e4_t3.nc
 
   30> t_f06_e5
tmp/f06_e5_t1.nc
tmp/f06_e5_t2.nc
tmp/f06_e5_t3.nc
 
   31> t_f07_e1
tmp/f07_e1_t1.nc
tmp/f07_e1_t2.nc
tmp/f07_e1_t3.nc
 
   32> t_f07_e2
tmp/f07_e2_t1.nc
tmp/f07_e2_t2.nc
tmp/f07_e2_t3.nc
 
   33> t_f07_e3
tmp/f07_e3_t1.nc
tmp/f07_e3_t2.nc
tmp/f07_e3_t3.nc
 
   34> t_f07_e4
tmp/f07_e4_t1.nc
tmp/f07_e4_t2.nc
tmp/f07_e4_t3.nc
 
   35> t_f07_e5
tmp/f07_e5_t1.nc
tmp/f07_e5_t2.nc
tmp/f07_e5_t3.nc
 
   36> t_f08_e1
tmp/f08_e1_t1.nc
tmp/f08_e1_t2.nc
tmp/f08_e1_t3.nc
 
   37> t_f08_e2
tmp/f08_e2_t1.nc
tmp/f08_e2_t2.nc
tmp/f08_e2_t3.nc
 
   38> t_f08_e3
tmp/f08_e3_t1.nc
tmp/f08_e3_t2.nc
tmp/f08_e3_t3.nc
 
   39> t_f08_e4
tmp/f08_e4_t1.nc
tmp/f08_e4_t2.nc
tmp/f08_e4_t3.nc
 
   40> t_f08_e5
tmp/f08_e5_t1.nc
tmp/f08_e5_t2.nc
tmp/f08_e5_t3.nc
 
   41> t_f09_e1
tmp/f09_e1_t1.nc
tmp/f09_e1_t2.nc
tmp/f09_e1_t3.nc
 
   42> t_f09_e2
tmp/f09_e2_t1.nc
tmp/f09_e2_t2.nc
tmp/f09_e2_t3.nc
 
   43> t_f09_e3
tmp/f09_e3_t1.nc
tmp/f09_e3_t2.nc
tmp/f09_e3_t3.nc
 
   44> t_f09_e4
tmp/f09_e4_t1.nc
tmp/f09_e4_t2.nc
tmp/f09_e4_t3.nc
 
   45> t_f09_e5
tmp/f09_e5_t1.nc
tmp/f09_e5_t2.nc
tmp/f09_e5_t3.nc
 
   46> t_f10_e1
tmp/f10_e1_t1.nc
tmp/f10_e1_t2.nc
tmp/f10_e1_t3.nc
 
   47> t_f10_e2
tmp/f10_e2_t1.nc
tmp/f10_e2_t2.nc
tmp/f10_e2_t3.nc
 
   48> t_f10_e3
tmp/f10_e3_t1.nc
tmp/f10_e3_t2.nc
tmp/f10_e3_t3.nc
 
   49> t_f10_e4
tmp/f10_e4_t1.nc
tmp/f10_e4_t2.nc
tmp/f10_e4_t3.nc
 
   50> t_f10_e5
tmp/f10_e5_t1.nc
tmp/f10_e5_t2.nc
tmp/f10_e5_t3.nc
 
   51> t_f11_e1
tmp/f11_e1_t1.nc
tmp/f11_e1_t2.nc
tmp/f11_e1_t3.nc
 
   52> t_f11_e2
tmp/f11_e2_t1.nc
tmp/f11_e2_t2.nc
tmp/f11_e2_t3.nc
 
   53> t_f11_e3
tmp/f11_e3_t1.nc
tmp/f11_e3_t2.nc
tmp/f11_e3_t3.nc
 
   54> t_f11_e4
tmp/f11_e4_t1.nc
tmp/f11_e4_t2.nc
tmp/f11_e4_t3.nc
 
   55> t_f11_e5
tmp/f11_e5_t1.nc
tmp/f11_e5_t2.nc
tmp/f11_e5_t3.nc
 
   56> t_f04_e3_1v  (default)
tmp/f04_e3_t1_1v.nc
tmp/f04_e3_t2_1v.nc
tmp/f04_e3_t3_1v.nc
 
 
! should share the same time axis
show grid fcst[d=t_f01_e1]
    GRID GIP1
 name       axis              # pts   start                end                 subset
 XAX       LONGITUDE           21mr   140E                 160E                full
 YAX       LATITUDE            11 r   10N                  20N                 full
 ZAX1      Z (m)                1 r   250                  250                 full
 MONTHLY1  TIME                36 r   16-JAN-1950 05:14    16-DEC-1952 12:13   full
show grid fcst[d=t_f01_e2]
    GRID GIP1
 name       axis              # pts   start                end                 subset
 XAX       LONGITUDE           21mr   140E                 160E                full
 YAX       LATITUDE            11 r   10N                  20N                 full
 ZAX1      Z (m)                1 r   250                  250                 full
 MONTHLY1  TIME                36 r   16-JAN-1950 05:14    16-DEC-1952 12:13   full
 
! ======== TEST SET 1:  aggregate E first, then F
 
! define te aggregations -- only the first 5 remain unhidden
ENSEMBLE      te_f01 = t_f01_e1, t_f01_e2, t_f01_e3, t_f01_e4, t_f01_e5
ENSEMBLE/hide te_f02 = t_f02_e1, t_f02_e2, t_f02_e3, t_f02_e4, t_f02_e5
ENSEMBLE/hide te_f03 = t_f03_e1, t_f03_e2, t_f03_e3, t_f03_e4, t_f03_e5
ENSEMBLE/hide te_f04 = t_f04_e1, t_f04_e2, t_f04_e3, t_f04_e4, t_f04_e5
ENSEMBLE/hide te_f05 = t_f05_e1, t_f05_e2, t_f05_e3, t_f05_e4, t_f05_e5
ENSEMBLE/hide te_f06 = t_f06_e1, t_f06_e2, t_f06_e3, t_f06_e4, t_f06_e5
ENSEMBLE/hide te_f07 = t_f07_e1, t_f07_e2, t_f07_e3, t_f07_e4, t_f07_e5
ENSEMBLE/hide te_f08 = t_f08_e1, t_f08_e2, t_f08_e3, t_f08_e4, t_f08_e5
ENSEMBLE/hide te_f09 = t_f09_e1, t_f09_e2, t_f09_e3, t_f09_e4, t_f09_e5
ENSEMBLE/hide te_f10 = t_f10_e1, t_f10_e2, t_f10_e3, t_f10_e4, t_f10_e5
ENSEMBLE/hide te_f11 = t_f11_e1, t_f11_e2, t_f11_e3, t_f11_e4, t_f11_e5
SHOW DATA/brief
     currently SET data sets:
    1> t_f01_e1
    2> t_f01_e2
    3> t_f01_e3
    4> t_f01_e4
    5> t_f01_e5
   56> t_f04_e3_1v
   57> te_f01     Ensemble aggregation
   58> te_f02     Ensemble aggregation
   59> te_f03     Ensemble aggregation
   60> te_f04     Ensemble aggregation
   61> te_f05     Ensemble aggregation
   62> te_f06     Ensemble aggregation
   63> te_f07     Ensemble aggregation
   64> te_f08     Ensemble aggregation
   65> te_f09     Ensemble aggregation
   66> te_f10     Ensemble aggregation
   67> te_f11  (default)  Ensemble aggregation
! Note the clean_draconian script removes the word HISTORY from the following outputs
SHOW DATA/FULL te_f11
     currently SET data sets:
   67> te_f11  (default)  Ensemble aggregation
     Ensemble series of 5 datasets patterned on t_f11_e1
 name     title                             I         J         K         L         M         N
 FCST     some variable                    1:21      1:11      1:1       1:36      1:5       ...
       (L=31:42)
               on grid GEN111 with -1.E+34 for missing data
             X=139.5E:160.5E  Y=9.5N:20.5N  Z=249.5:250.5  E=0.5:5.5  
 FCST_2   another variable                 1:21      1:11      1:1       1:36      1:5       ...
       (L=31:42)
               on grid GEN111 with -1.E+34 for missing data
             X=139.5E:160.5E  Y=9.5N:20.5N  Z=249.5:250.5  E=0.5:5.5  
 REALIZATION
          1                                ...       ...       ...       ...       1:5       ...
               on grid GGE11 with -1.E+34 for missing data
             E=0.5:5.5  
 ------------------------------
 MEMBER_DSET
          Member dataset names in Ensembl  ...       ...       ...       ...       1:5       ...
            Data type = TEXT
               on grid GGE11 with -1.E+34 for missing data
             E=0.5:5.5  
 HISTORY  Global Att *history* in Ensembl  ...       ...       ...       ...       1:5       ...
            Data type = TEXT
               on grid GGE11 with -1.E+34 for missing data
             E=0.5:5.5  
 CONVENTIONS
          Global Att *Conventions* in Ens  ...       ...       ...       ...       1:5       ...
            Data type = TEXT
               on grid GGE11 with -1.E+34 for missing data
             E=0.5:5.5  
 INVESTIGATOR
          Global Att *INVESTIGATOR* in En  ...       ...       ...       ...       1:5       ...
            Data type = TEXT
               on grid GGE11 with -1.E+34 for missing data
             E=0.5:5.5  
 DESCRIPTION
          Global Att *DESCRIPTION* in Ens  ...       ...       ...       ...       1:5       ...
            Data type = TEXT
               on grid GGE11 with -1.E+34 for missing data
             E=0.5:5.5  
 
  time range: 17-JUL-1952 07:47 to 17-JUN-1955 14:46
 
          Member datasets:
      67.1: t_f11_e1
      67.2: t_f11_e2
      67.3: t_f11_e3
      67.4: t_f11_e4
      67.5: t_f11_e5
SHOW DATA/ATT te_f11   ! notice the promotion of fcst.im_everywhere
     currently SET data sets:
   67> te_f11  (default)  Ensemble aggregation
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               aggregate name  CHAR        6    F       te_f11
  
 FCST                  DOUBLE    long_name       CHAR        13   T       some variable
                                 missing_value   DOUBLE      1    T       -1.E+34
                                 im_everywhere   CHAR        13   F       so promote me
                                 long_name_mod   CHAR        7    F       L=31:42
  
 FCST_2                DOUBLE    long_name       CHAR        16   T       another variable
                                 missing_value   DOUBLE      1    T       -1.E+34
                                 long_name_mod   CHAR        7    F       L=31:42
  
 REALIZATION           DOUBLE    long_name       CHAR        1    T       1
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 member_dset           CHAR      long_name       CHAR        32   T       Member dataset names in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 history               CHAR      long_name       CHAR        32   T       Global Att *history* in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 Conventions           CHAR      long_name       CHAR        36   T       Global Att *Conventions* in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 INVESTIGATOR          CHAR      long_name       CHAR        37   T       Global Att *INVESTIGATOR* in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 DESCRIPTION           CHAR      long_name       CHAR        36   T       Global Att *DESCRIPTION* in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 
list investigator, description
             DATA SET: te_f11
             Ensemble series of 5 datasets patterned on t_f11_e1
             E (realization): 0.5 to 5.5
 Column  1: INVESTIGATOR is Global Att *INVESTIGATOR* in Ensemble
 Column  2: DESCRIPTION is Global Att *DESCRIPTION* in Ensemble
                   INVESTIG                      DESCRIPTION
1   / 1: "Ferret developers" "Data in tseries aggregations T=1, Fdate=31, Ens=1"
2   / 2: "Ferret developers" "Data in tseries aggregations T=1, Fdate=31, Ens=2"
3   / 3: "Ferret developers" "Data in tseries aggregations T=1, Fdate=31, Ens=3"
4   / 4: "Ferret developers" "Data in tseries aggregations T=1, Fdate=31, Ens=4"
5   / 5: "Ferret developers" "Data in tseries aggregations T=1, Fdate=31, Ens=5"
 
set data te_f04
list investigator, description
             DATA SET: te_f04
             Ensemble series of 5 datasets patterned on t_f04_e1
             E (realization): 0.5 to 5.5
 Column  1: INVESTIGATOR is Global Att *INVESTIGATOR* in Ensemble
 Column  2: DESCRIPTION is Global Att *DESCRIPTION* in Ensemble
                   INVESTIG                      DESCRIPTION
1   / 1: "Ferret developers" "Data in tseries aggregations T=1, Fdate=10, Ens=1"
2   / 2: "Ferret developers" "Data in tseries aggregations T=1, Fdate=10, Ens=2"
3   / 3: "Ferret developers" "Data in tseries aggregations T=1, Fdate=10, Ens=3"
4   / 4: "Ferret developers" "Data in tseries aggregations T=1, Fdate=10, Ens=4"
5   / 5: "Ferret developers" "Data in tseries aggregations T=1, Fdate=10, Ens=5"
 
 
! define tef aggregation
FMRC/HIDE tef = te_f01, te_f02, te_f03, te_f04, te_f05, te_f06, te_f07, te_f08, te_f09, te_f10, te_f11
SHOW DATA/brief/members
     currently SET data sets:
    1> t_f01_e1
tmp/f01_e1_t1.nc
tmp/f01_e1_t2.nc
tmp/f01_e1_t3.nc
 
    2> t_f01_e2
tmp/f01_e2_t1.nc
tmp/f01_e2_t2.nc
tmp/f01_e2_t3.nc
 
    3> t_f01_e3
tmp/f01_e3_t1.nc
tmp/f01_e3_t2.nc
tmp/f01_e3_t3.nc
 
    4> t_f01_e4
tmp/f01_e4_t1.nc
tmp/f01_e4_t2.nc
tmp/f01_e4_t3.nc
 
    5> t_f01_e5
tmp/f01_e5_t1.nc
tmp/f01_e5_t2.nc
tmp/f01_e5_t3.nc
 
   56> t_f04_e3_1v
tmp/f04_e3_t1_1v.nc
tmp/f04_e3_t2_1v.nc
tmp/f04_e3_t3_1v.nc
 
   68> tef  (default)  Forecast aggregation
t_f11_e5
t_f11_e5
t_f11_e5
t_f11_e5
t_f11_e5
t_f11_e5
t_f11_e5
t_f11_e5
t_f11_e5
t_f11_e5
t_f11_e5
show data/full tef
     currently SET data sets:
   68> tef  (default)  Forecast aggregation
     Forecast series of 11 datasets patterned on te_f01
 name     title                             I         J         K         L         M         N
 FCST     some variable                    1:21      1:11      1:1       1:36      1:5       1:11
       (L=1:12)
               on grid GFN1 with -1.E+34 for missing data
             X=139.5E:160.5E  Y=9.5N:20.5N  Z=249.5:250.5  E=0.5:5.5  F=16-NOV-1949 08:16:16-AUG-1952 18:16  
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:36      ...       1:33
             days since 01-JAN-1900 on grid FTI11 with -1.E+34 for missing data
             F=16-DEC-1949 18:45:16-SEP-1952 04:45  
 FCST_2   another variable                 1:21      1:11      1:1       1:36      1:5       1:11
       (L=1:12)
               on grid GFN1 with -1.E+34 for missing data
             X=139.5E:160.5E  Y=9.5N:20.5N  Z=249.5:250.5  E=0.5:5.5  F=16-NOV-1949 08:16:16-AUG-1952 18:16  
 
  time range: 15.21844 to 1080.50906
 
          Member datasets:
      68.1 : te_f01
      68.2 : te_f02
      68.3 : te_f03
      68.4 : te_f04
      68.5 : te_f05
      68.6 : te_f06
      68.7 : te_f07
      68.8 : te_f08
      68.9 : te_f09
      68.10: te_f10
      68.11: te_f11
 
! simplest acess -- compact form -- just demonstrate it doesn't fail
stat/brief fcst[i=11:12, j=5:6, l=31:32, m=1:2, n=5:6]
 
 Total # of data points: 32 (2*2*1*2*2*2)
 # flagged as bad  data: 0
 Minimum value: 224.9
 Maximum value: 237.88
 Mean    value: 231.38 (unweighted average)
 
DEFINE SYMBOL TF_CAL_T = `fcst._cal_t_ax`
 !-> DEFINE SYMBOL TF_CAL_T = TF_CAL_T
DEFINE SYMBOL TF_LAG_F = `fcst._lag_f_ax`
 !-> DEFINE SYMBOL TF_LAG_F = TF_LAG_F
DEFINE SYMBOL TF_LAG_T = `fcst._lag_t_ax`
 !-> DEFINE SYMBOL TF_LAG_T = TF_LAG_T
DEFINE SYMBOL TF_CAL_F = `fcst._cal_f_ax`
 !-> DEFINE SYMBOL TF_CAL_F = TF_CAL_F
 
! regrid to TF_.... axes
let fcstfine = fcst[gt=($TF_LAG_T)@BIN,gf=($TF_CAL_F)@BIN]
 !-> DEFINE VARIABLE fcstfine = fcst[gt=TF_LAG_T@BIN,gf=TF_CAL_F@BIN]
 
! diagonal forecast view of ensemble mean
let diag_fcst = fcstfine[gt(TF_TIMES)=($TF_CAL_T),gf(TF_TIMES)=($TF_LAG_F)]
 !-> DEFINE VARIABLE diag_fcst = fcstfine[gt(TF_TIMES)=TF_CAL_T,gf(TF_TIMES)=TF_LAG_F]
shade/x=150E/y=15n diag_fcst[m=1:5@ave]
 
! difference between the mean and the middle is zero within computational error
let epsilon = 1 / 2^50   ! 52 mantissa bits in a double
say using epsilon = `epsilon`
 !-> MESSAGE/CONTINUE using epsilon = 8.881784197001252E-16
using epsilon = 8.881784197001252E-16
let rel_err = (diag_fcst[m=1:5@ave]-diag_fcst[m=3])/diag_fcst[m=3]
stat/brief/x=150E/y=15n IF ABS(rel_err) LT epsilon THEN 0.0 ELSE rel_err
 
 Total # of data points: 2376 (1*1*1*66*1*36)
 # flagged as bad  data: 1980
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 
! warning message indicates fcst_2 is missing from a file
ENSEMBLE te_f04_1v = t_f04_e1, t_f04_e2, t_f04_e3_1v, t_f04_e4, t_f04_e5
SHOW DATA/ATT t_f04_e3_1v ! note atts im_everwhere vs im_not_everwhere
     currently SET data sets:
   56> t_f04_e3_1v
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(XAX)                  DOUBLE    units           CHAR        12   T       degrees_east
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 modulo          DOUBLE      1    T       360
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        3    F       XAX
  
(YAX)                  DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 orig_file_axname
                                                 CHAR        3    F       YAX
  
(ZAX1)                 DOUBLE    units           CHAR        1    T       m
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Z
                                 standard_name   CHAR        8    F       altitude
                                 orig_file_axname
                                                 CHAR        3    F       ZAX
  
(MONTHLY12)            DOUBLE    units           CHAR        21   T       days since 1900-01-01
                                 axis            CHAR        1    T       T
                                 calendar        CHAR        9    T       GREGORIAN
                                 time_origin     CHAR        11   T       01-JAN-1900
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        7    F       MONTHLY
  
 FCST                  DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 long_name       CHAR        13   T       some variable
                                 im_everywhere   CHAR        13   F       so promote me
                                 im_not_everywhere
                                                 CHAR        19   F       so don't promote me
                                 long_name_mod   CHAR        7    F       L=10:21
  
 REALIZATION           DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 long_name       CHAR        1    T       3
  
SHOW DATA/ATT te_f04_1v  ! note atts im_everwhere vs im_not_everwhere
     currently SET data sets:
   69> te_f04_1v  (default)  Ensemble aggregation
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               aggregate name  CHAR        9    F       te_f04_1v
  
 FCST                  DOUBLE    long_name       CHAR        13   T       some variable
                                 missing_value   DOUBLE      1    T       -1.E+34
                                 im_everywhere   CHAR        13   F       so promote me
                                 long_name_mod   CHAR        7    F       L=10:21
  
 REALIZATION           DOUBLE    long_name       CHAR        1    T       1
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 member_dset           CHAR      long_name       CHAR        32   T       Member dataset names in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 history               CHAR      long_name       CHAR        32   T       Global Att *history* in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 Conventions           CHAR      long_name       CHAR        36   T       Global Att *Conventions* in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 INVESTIGATOR          CHAR      long_name       CHAR        37   T       Global Att *INVESTIGATOR* in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 DESCRIPTION           CHAR      long_name       CHAR        36   T       Global Att *DESCRIPTION* in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 
! define fcst_2 as a LET/D variable and then do same calc
let/d=t_f04_e3_1v fcst_2 = fcst + 2
show data/br t_f04_e3_1v
     currently SET data sets:
   56> t_f04_e3_1v
ENSEMBLE te_f04_letd = t_f04_e1, t_f04_e2, t_f04_e3_1v, t_f04_e4, t_f04_e5
FMRC/hide tef_letd = te_f01, te_f02, te_f03, te_f04_letd, te_f05, te_f06, te_f07, te_f08, te_f09, te_f10, te_f11
let fcst2fine = fcst_2[gt=($TF_LAG_T)@BIN,gf=($TF_CAL_F)@BIN]
 !-> DEFINE VARIABLE fcst2fine = fcst_2[gt=TF_LAG_T@BIN,gf=TF_CAL_F@BIN]
let diag_fcst_2 = fcst2fine[gt(TF_TIMES)=($TF_CAL_T),gf(TF_TIMES)=($TF_LAG_F)]
 !-> DEFINE VARIABLE diag_fcst_2 = fcst2fine[gt(TF_TIMES)=TF_CAL_T,gf(TF_TIMES)=TF_LAG_F]
let rel_err_2 = (diag_fcst_2[m=1:5@ave]-diag_fcst_2[m=3])/diag_fcst_2[m=3]
 
! can run in diagnostic mode and look for "eval FCST_2" to confirm LET/D eval
set data tef_letd
stat/brief/x=150E/y=15n diag_fcst_2
 
 Total # of data points: 11880 (1*1*1*66*5*36)
 # flagged as bad  data: 9900
 Minimum value: 226.46
 Maximum value: 277.79
 Mean    value: 252.12 (unweighted average)
stat/brief/x=150E/y=15n IF ABS(rel_err_2) LT epsilon THEN 0.0 ELSE rel_err_2
 
 Total # of data points: 2376 (1*1*1*66*1*36)
 # flagged as bad  data: 1980
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 
! demonstrate redefining the LET/D variable without re-defining the agg
! Look at the column 3 ("e3"), row 4 ("f04") to see  2.110 => 4.110
list/x=150E/y=15n/L=10 fcst_2
             VARIABLE : another variable
             DATA SET : Forecast series of 11 datasets patterned on te_f01
             FILENAME : tef_letd
             SUBSET   : 5 by 11 points (E (realization)-FORECAST)
             LONGITUDE: 150E
             LATITUDE : 15N
             Z (m)    : 250
             MODEL ELAPSED TIME (days): 289.15031
             Initialization time increases down page. 
                      1      2      3      4      5    
                      1      2      3      4      5
 01-JAN-1950 /  1:  227.1  239.6  252.1  264.6  277.1
 02-APR-1950 /  2:  227.1  239.6  252.1  264.6  277.1
 02-JUL-1950 /  3:  227.1  239.6  252.1  264.6  277.1
 01-OCT-1950 /  4:  227.1  239.6  252.1  264.6  277.1
 01-JAN-1951 /  5:  227.1  239.7  252.2  264.7  277.2
 02-APR-1951 /  6:  227.1  239.6  252.1  264.6  277.1
 02-JUL-1951 /  7:  227.2  239.7  252.2  264.7  277.2
 02-OCT-1951 /  8:  227.2  239.7  252.2  264.7  277.2
 01-JAN-1952 /  9:  227.1  239.7  252.2  264.7  277.2
 01-APR-1952 / 10:  227.2  239.7  252.2  264.7  277.2
 02-JUL-1952 / 11:  227.2  239.7  252.2  264.7  277.2
let/d=t_f04_e3_1v fcst_2 = fcst + 2 + 2   ! add 2
list/x=150E/y=15n/L=10 fcst_2
             VARIABLE : another variable
             DATA SET : Forecast series of 11 datasets patterned on te_f01
             FILENAME : tef_letd
             SUBSET   : 5 by 11 points (E (realization)-FORECAST)
             LONGITUDE: 150E
             LATITUDE : 15N
             Z (m)    : 250
             MODEL ELAPSED TIME (days): 289.15031
             Initialization time increases down page. 
                      1      2      3      4      5    
                      1      2      3      4      5
 01-JAN-1950 /  1:  227.1  239.6  252.1  264.6  277.1
 02-APR-1950 /  2:  227.1  239.6  252.1  264.6  277.1
 02-JUL-1950 /  3:  227.1  239.6  252.1  264.6  277.1
 01-OCT-1950 /  4:  227.1  239.6  254.1  264.6  277.1
 01-JAN-1951 /  5:  227.1  239.7  252.2  264.7  277.2
 02-APR-1951 /  6:  227.1  239.6  252.1  264.6  277.1
 02-JUL-1951 /  7:  227.2  239.7  252.2  264.7  277.2
 02-OCT-1951 /  8:  227.2  239.7  252.2  264.7  277.2
 01-JAN-1952 /  9:  227.1  239.7  252.2  264.7  277.2
 01-APR-1952 / 10:  227.2  239.7  252.2  264.7  277.2
 02-JUL-1952 / 11:  227.2  239.7  252.2  264.7  277.2
 
! agg members may have unique contexts on scalar axes of the aggregation
! ... here the LET/D var is normal to Z
let/d=t_f04_e3_1v fcst_2 = X[gx=fcst]+Y[gy=fcst]+T[gt=fcst] + 1000
list/x=150E/y=15n/L=10 fcst_2
             VARIABLE : another variable
             DATA SET : Forecast series of 11 datasets patterned on te_f01
             FILENAME : tef_letd
             SUBSET   : 5 by 11 points (E (realization)-FORECAST)
             LONGITUDE: 150E
             LATITUDE : 15N
             Z (m)    : 250
             MODEL ELAPSED TIME (days): 289.15031
             Initialization time increases down page. 
                      1       2       3       4       5     
                       1       2       3       4       5
 01-JAN-1950 /  1:    227.    240.    252.    265.    277.
 02-APR-1950 /  2:    227.    240.    252.    265.    277.
 02-JUL-1950 /  3:    227.    240.    252.    265.    277.
 01-OCT-1950 /  4:    227.    240.  19990.    265.    277.
 01-JAN-1951 /  5:    227.    240.    252.    265.    277.
 02-APR-1951 /  6:    227.    240.    252.    265.    277.
 02-JUL-1951 /  7:    227.    240.    252.    265.    277.
 02-OCT-1951 /  8:    227.    240.    252.    265.    277.
 01-JAN-1952 /  9:    227.    240.    252.    265.    277.
 01-APR-1952 / 10:    227.    240.    252.    265.    277.
 02-JUL-1952 / 11:    227.    240.    252.    265.    277.
 
! ... here the LET/D var is averaged to a point in a pre-existing agg
LET some_Z_function = Z[Z=0:100:10] + 1000
let/d=t_f04_e3_1v fcst_2 = X[gx=fcst]+Y[gy=fcst]+T[gt=fcst]+some_Z_function[Z=10:60@ave]
list/x=150E/y=15n/L=10 fcst_2
             VARIABLE : another variable
             DATA SET : Forecast series of 11 datasets patterned on te_f01
             FILENAME : tef_letd
             SUBSET   : 5 by 11 points (E (realization)-FORECAST)
             LONGITUDE: 150E
             LATITUDE : 15N
             Z (m)    : 250
             MODEL ELAPSED TIME (days): 289.15031
             Initialization time increases down page. 
                      1       2       3       4       5     
                       1       2       3       4       5
 01-JAN-1950 /  1:    227.    240.    252.    265.    277.
 02-APR-1950 /  2:    227.    240.    252.    265.    277.
 02-JUL-1950 /  3:    227.    240.    252.    265.    277.
 01-OCT-1950 /  4:    227.    240.  20025.    265.    277.
 01-JAN-1951 /  5:    227.    240.    252.    265.    277.
 02-APR-1951 /  6:    227.    240.    252.    265.    277.
 02-JUL-1951 /  7:    227.    240.    252.    265.    277.
 02-OCT-1951 /  8:    227.    240.    252.    265.    277.
 01-JAN-1952 /  9:    227.    240.    252.    265.    277.
 01-APR-1952 / 10:    227.    240.    252.    265.    277.
 02-JUL-1952 / 11:    227.    240.    252.    265.    277.
 
! same as preceding, but the LET/D is included in the agg as defined
ENSEMBLE te_f04_letd_new = t_f04_e1, t_f04_e2, t_f04_e3_1v, t_f04_e4, t_f04_e5
FMRC/hide tef_letd_new = te_f01, te_f02, te_f03, te_f04_letd, te_f05, te_f06, te_f07, te_f08, te_f09, te_f10, te_f11
list/x=150E/y=15n/L=10 fcst_2
             VARIABLE : another variable
             DATA SET : Forecast series of 11 datasets patterned on te_f01
             FILENAME : tef_letd_new
             SUBSET   : 5 by 11 points (E (realization)-FORECAST)
             LONGITUDE: 150E
             LATITUDE : 15N
             Z (m)    : 250
             MODEL ELAPSED TIME (days): 289.15031
             Initialization time increases down page. 
                      1       2       3       4       5     
                       1       2       3       4       5
 01-JAN-1950 /  1:    227.    240.    252.    265.    277.
 02-APR-1950 /  2:    227.    240.    252.    265.    277.
 02-JUL-1950 /  3:    227.    240.    252.    265.    277.
 01-OCT-1950 /  4:    227.    240.  20025.    265.    277.
 01-JAN-1951 /  5:    227.    240.    252.    265.    277.
 02-APR-1951 /  6:    227.    240.    252.    265.    277.
 02-JUL-1951 /  7:    227.    240.    252.    265.    277.
 02-OCT-1951 /  8:    227.    240.    252.    265.    277.
 01-JAN-1952 /  9:    227.    240.    252.    265.    277.
 01-APR-1952 / 10:    227.    240.    252.    265.    277.
 02-JUL-1952 / 11:    227.    240.    252.    265.    277.
 
! deliberate errors:
SET MODE IGNORE
set data tef_letd
! a new LET/D definition that alters the grid of the result is not acceptable
let/d=t_f04_e3_1v fcst_2 = X[x=1:5]+Y[gy=fcst]+Z[gz=fcst]+T[gt=fcst] ! X ax chg
list/x=150E/y=15n/L=10 fcst_2
 
let/d=t_f04_e3_1v fcst_2 = X[gx=fcst]+Y[gy=fcst]+Z[gz=fcst]+T[T=1:36:1] ! T chg
list/x=150E/y=15n/L=10 fcst_2
 
! LET definition may not compress an axis of N>1
let/d=t_f04_e3_1v fcst_2 = fcst[i=1:5@ave]
list/x=150E/y=15n/L=10 fcst_2
SET MODE/LAST IGNORE
 
! now restore the original definition and verify it again works
let/d=t_f04_e3_1v fcst_2 = fcst + 2
list/x=150E/y=15n/L=10 fcst_2
             VARIABLE : another variable
             DATA SET : Forecast series of 11 datasets patterned on te_f01
             FILENAME : tef_letd
             SUBSET   : 5 by 11 points (E (realization)-FORECAST)
             LONGITUDE: 150E
             LATITUDE : 15N
             Z (m)    : 250
             MODEL ELAPSED TIME (days): 289.15031
             Initialization time increases down page. 
                      1      2      3      4      5    
                      1      2      3      4      5
 01-JAN-1950 /  1:  227.1  239.6  252.1  264.6  277.1
 02-APR-1950 /  2:  227.1  239.6  252.1  264.6  277.1
 02-JUL-1950 /  3:  227.1  239.6  252.1  264.6  277.1
 01-OCT-1950 /  4:  227.1  239.6  252.1  264.6  277.1
 01-JAN-1951 /  5:  227.1  239.7  252.2  264.7  277.2
 02-APR-1951 /  6:  227.1  239.6  252.1  264.6  277.1
 02-JUL-1951 /  7:  227.2  239.7  252.2  264.7  277.2
 02-OCT-1951 /  8:  227.2  239.7  252.2  264.7  277.2
 01-JAN-1952 /  9:  227.1  239.7  252.2  264.7  277.2
 01-APR-1952 / 10:  227.2  239.7  252.2  264.7  277.2
 02-JUL-1952 / 11:  227.2  239.7  252.2  264.7  277.2
 
! ======== TEST SET 2:  aggregate F first, then E
FMRC      tf_e1 = t_f01_e1, t_f02_e1, t_f03_e1, t_f04_e1, t_f05_e1, t_f06_e1, t_f07_e1, t_f08_e1, t_f09_e1, t_f10_e1, t_f11_e1
FMRC/hide tf_e2 = t_f01_e2, t_f02_e2, t_f03_e2, t_f04_e2, t_f05_e2, t_f06_e2, t_f07_e2, t_f08_e2, t_f09_e2, t_f10_e2, t_f11_e2
FMRC/hide tf_e3 = t_f01_e3, t_f02_e3, t_f03_e3, t_f04_e3, t_f05_e3, t_f06_e3, t_f07_e3, t_f08_e3, t_f09_e3, t_f10_e3, t_f11_e3
FMRC/hide tf_e4 = t_f01_e4, t_f02_e4, t_f03_e4, t_f04_e4, t_f05_e4, t_f06_e4, t_f07_e4, t_f08_e4, t_f09_e4, t_f10_e4, t_f11_e4
FMRC/hide tf_e5 = t_f01_e5, t_f02_e5, t_f03_e5, t_f04_e5, t_f05_e5, t_f06_e5, t_f07_e5, t_f08_e5, t_f09_e5, t_f10_e5, t_f11_e5
 
! aggregate these F-aggs onto an E axis
ENSEMBLE/HIDE tfe = tf_e1, tf_e2, tf_e3, tf_e4, tf_e5
 
! F-aggregate inherits the TF-auxiliary variable pointers from the members
SHOW DATA/ATTRIB tfe   ! also notice the promotion of fcst.im_everywhere
     currently SET data sets:
   79> tfe  (default)  Ensemble aggregation
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               aggregate name  CHAR        3    F       tfe
  
 FCST                  DOUBLE    long_name       CHAR        13   T       some variable
                                 missing_value   DOUBLE      1    T       -1.E+34
                                 coordinates     CHAR        26   T       RUN1 TF_TIMES ZAX1 YAX XAX
                                 _ftime2d        CHAR        8    T       TF_TIMES
                                 _cal_t_ax       CHAR        8    T       TF_CAL_T
                                 _lag_f_ax       CHAR        8    T       TF_LAG_F
                                 _cal_f_ax       CHAR        8    T       TF_CAL_F
                                 _lag_t_ax       CHAR        8    T       TF_LAG_T
                                 im_everywhere   CHAR        13   F       so promote me
  
 TF_TIMES              DOUBLE    long_name       CHAR        25   T       Forecast time step matrix
                                 units           CHAR        22   T       days since 01-JAN-1900
                                 missing_value   DOUBLE      1    T       -1.E+34
                                 _CoordinateAxisType
                                                 CHAR        4    T       Time
                                 calendar        CHAR        9    T       GREGORIAN
  
 FCST_2                DOUBLE    long_name       CHAR        16   T       another variable
                                 missing_value   DOUBLE      1    T       -1.E+34
                                 coordinates     CHAR        26   T       RUN1 TF_TIMES ZAX1 YAX XAX
                                 _ftime2d        CHAR        8    T       TF_TIMES
                                 _cal_t_ax       CHAR        8    T       TF_CAL_T
                                 _lag_f_ax       CHAR        8    T       TF_LAG_F
                                 _cal_f_ax       CHAR        8    T       TF_CAL_F
                                 _lag_t_ax       CHAR        8    T       TF_LAG_T
  
 member_dset           CHAR      long_name       CHAR        32   T       Member dataset names in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 
! the 2-D coordinate variable (TF_TIMES) should be 2D, only, in T and F
SHOW DATA tfe
     currently SET data sets:
   79> tfe  (default)  Ensemble aggregation
 name     title                             I         J         K         L         M         N
 FCST     some variable                    1:21      1:11      1:1       1:36      1:5       1:11
       (L=1:12)
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:36      ...       1:33
 FCST_2   another variable                 1:21      1:11      1:1       1:36      1:5       1:11
       (L=1:12)
 ------------------------------
 MEMBER_DSET
          Member dataset names in Ensembl  ...       ...       ...       ...       1:5       ...
 
 
! confirm that the TF_TIMES variable is accessible in a T-F-E aggregation
LIST/NOHEAD/L=18:19/N=5:6 TF_TIMES   ! subset access
 02-MAY-1950 / 5:  18916.  18947.
 02-JUN-1950 / 6:  18947.  18977.
STAT/BRIEF TF_TIMES
 
 Total # of data points: 1188 (1*1*1*36*1*33)
 # flagged as bad  data: 0
 Minimum value: 18277
 Maximum value: 20316
 Mean    value: 19297 (unweighted average)
 
! confirm that the T-F-E agg and the T-E-F agg get the same results
! exactlyidentically zero STAT output means correct functioning
let tfe_tef_ave_diff = (diag_fcst[d=tfe,m=1:5@ave]-diag_fcst[d=tef,m=1:5@ave])
stat/brief/x=150E/y=15n tfe_tef_ave_diff
 
 Total # of data points: 2376 (1*1*1*66*1*36)
 # flagged as bad  data: 1980
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
let tfe_tef_diff = (diag_fcst[d=tfe]-diag_fcst[d=tef])
stat/brief/x=150E/y=15n tfe_tef_diff[m=1:5@ave]
 
 Total # of data points: 2376 (1*1*1*66*1*36)
 # flagged as bad  data: 1980
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 
! missing forecast (t_f02_e2) in a T-F-E aggregation
FMRC tf_e2_gap = t_f01_e2, -, t_f03_e2, t_f04_e2, t_f05_e2, t_f06_e2, t_f07_e2, t_f08_e2, t_f09_e2, t_f10_e2, t_f11_e2
ENSEMBLE tfe_gap = tf_e1, tf_e2_gap, tf_e3, tf_e4, tf_e5
LIST/l=10/i=10/j=10/k=1 fcst[d=tfe_gap]
             VARIABLE : some variable
             DATA SET : Ensemble series of 5 datasets patterned on tf_e1
             FILENAME : tfe_gap
             SUBSET   : 5 by 11 points (E (realization)-FORECAST)
             LONGITUDE: 149E
             LATITUDE : 19N
             Z (m)    : 250
             MODEL ELAPSED TIME (days): 289.15031
             Initialization time increases down page. 
                      1      2      3      4      5    
                      1      2      3      4      5
 01-JAN-1950 /  1:  225.2  237.7  250.2  262.7  275.2
 02-APR-1950 /  2:  225.2   ....  250.2  262.8  275.3
 02-JUL-1950 /  3:  225.3  237.9  250.4  262.9  275.4
 01-OCT-1950 /  4:  225.4  237.9  250.4  263.0  275.5
 01-JAN-1951 /  5:  225.4  237.9  250.4  262.9  275.5
 02-APR-1951 /  6:  225.5  238.0  250.5  263.0  275.6
 02-JUL-1951 /  7:  225.5  238.1  250.6  263.1  275.6
 02-OCT-1951 /  8:  225.6  238.1  250.6  263.1  275.7
 01-JAN-1952 /  9:  225.6  238.1  250.7  263.2  275.7
 01-APR-1952 / 10:  225.6  238.1  250.6  263.2  275.7
 02-JUL-1952 / 11:  225.6  238.1  250.7  263.2  275.7
 
! missing ensemble member (t_f02_e2)in a T-E-F agregation
ENSEMBLE te_f02_gap = t_f02_e1, -, t_f02_e3, t_f02_e4, t_f02_e5
FMRC tef_gap = te_f01, te_f02_gap, te_f03, te_f04
LIST/l=10/i=10/j=10/k=1 fcst[d=tef_gap]
             VARIABLE : some variable
             DATA SET : Forecast series of 4 datasets patterned on te_f01
             FILENAME : tef_gap
             SUBSET   : 5 by 4 points (E (realization)-FORECAST)
             LONGITUDE: 149E
             LATITUDE : 19N
             Z (m)    : 250
             MODEL ELAPSED TIME (days): 289.15031
             Initialization time increases down page. 
                     1      2      3      4      5    
                     1      2      3      4      5
 01-JAN-1950 / 1:  225.2  237.7  250.2  262.7  275.2
 02-APR-1950 / 2:  225.2   ....  250.2  262.8  275.3
 02-JUL-1950 / 3:  225.3  237.9  250.4  262.9  275.4
 01-OCT-1950 / 4:  225.4  237.9  250.4  263.0  275.5
 
! deliberate errors
set mode ignore
! unequal ensemble axis lengths
ENSEMBLE te_f02_short = t_f02_e1, t_f02_e2, t_f02_e3, t_f02_e4   ! shorter than others
FMRC tef_short = te_f01, te_f02_short, te_f03, te_f04, te_f05, te_f06, te_f07, te_f08, te_f09, te_f10, te_f11
 
! unequal forecast axis lengths
FMRC tf_e2_short = t_f01_e2, t_f02_e2, t_f03_e2, t_f04_e2  ! shorter than others
ENSEMBLE tfe_short = tf_e1, tf_e2_short, tf_e3, tf_e4, tf_e5
 
! ensemble created with already-ensemble components
ENSEMBLE te_f01 = t_f01_e1, t_f01_e2, t_f01_e3, t_f01_e4, t_f01_e5
ENSEMBLE te_f03 = t_f03_e1, t_f03_e2, t_f03_e3, t_f03_e4, t_f03_e5
ENSEMBLE te_f04 = t_f04_e1, t_f04_e2, t_f04_e3, t_f04_e4, t_f04_e5
ENSEMBLE bad_ens = te_f01, te_f03, te_f04
 
! fmrc created with already-fmrc components
FMRC tf_e1 = t_f01_e1, t_f02_e1, t_f03_e1, t_f04_e1
FMRC tf_e3 = t_f01_e3, t_f02_e3, t_f03_e3, t_f04_e3
FMRC tf_e4 = t_f01_e4, t_f02_e4, t_f03_e4, t_f04_e4
FMRC bad_fmrc = tf_e1, tf_e3, tf_e4
 
set mode/last ignore
 
CANCEL DATA/ALL
*** Running ferret script: bn_dataset_qualifier.jnl
! bn_dataset_qualifier
! see ticket 2632
! Test change from /D= to /DATASET= qualifier for LIST, PLOT, LOAD, etc
! Various commands taken from other scripts.
 
! LIST/DAT=
use gt4d011
use coads_climatology
 
let nv = ..nvars
let nd = ..ndims
let vnames = ..varnames
list/DAT=1 nv, nd
             DATA SET: ./data/gt4d011.cdf
             X: 1
 Column  1: NV is ..NVARS
 Column  2: ND is ..NDIMS
             NV    ND
I / *:     12.00  21.00
list/DAT=1 vnames
             VARIABLE : ..VARNAMES
             FILENAME : gt4d011.cdf
             SUBSET   : 12 points (X)
 1    /  1:"PS3DT2"
 2    /  2:"TEMP"  
 3    /  3:"SALT"  
 4    /  4:"PS3DU2"
 5    /  5:"U"     
 6    /  6:"V"     
 7    /  7:"PS3DW2"
 8    /  8:"W"     
 9    /  9:"PS2DU2"
 10   / 10:"TAUX"  
 11   / 11:"TAUY"  
 12   / 12:"PSI"   
 
list/DAT=coads_climatology nv,nd
             DATA SET: ./data/coads_climatology.cdf
             X: 1
 Column  1: NV is ..NVARS
 Column  2: ND is ..NDIMS
             NV    ND
I / *:     1.000  3.000
list/DAT=gt4d011 nv,nd
             DATA SET: ./data/gt4d011.cdf
             X: 1
 Column  1: NV is ..NVARS
 Column  2: ND is ..NDIMS
             NV    ND
I / *:     12.00  21.00
 
! SET ATT/OUTPUT/DAT=
! DEFINE ATT/OUTPUT/DAT=
! CANCEL ATT/OUTPUT/DAT=
can data/all
use err491_attval
use gt4d011
set att/output/DATA=1 ..dt_internal
define attribute/output/DATA=1 elev.newatt = 7
save/clobber/file=a.nc/outtype=float elev[d=1]
use a.nc
sh att .
     attributes for dataset: ./a.nc
 ..history = FERRET V7.6  DD-MON-YY 
 ..Conventions = CF-1.6 
 ..dt_internal = 15
sh att elev
     attributes for dataset: ./a.nc
 ELEV.missing_value = -32767
 ELEV.long_name = Surface elevation 
 ELEV.units = meter 
 ELEV.scale_factor = 2.74675E-04
 ELEV.add_offset = 0
 ELEV.newatt = 7
 ELEV.Ferret_Precision_Note = This variable written using Ferret was converted from SHORT to FLOAT 
 ELEV.history = From err491_attval 
can data a
cancel attribute/output/DATASET=1  ..dt_internal
cancel attribute/output/DATASET=1  elev.newatt
save/clobber/file=a.nc/outtype=float elev[d=1]
use a.nc
sh att .
     attributes for dataset: ./a.nc
 ..history = FERRET V7.6  DD-MON-YY 
 ..Conventions = CF-1.6 
sh att elev
     attributes for dataset: ./a.nc
 ELEV.missing_value = -32767
 ELEV.long_name = Surface elevation 
 ELEV.units = meter 
 ELEV.scale_factor = 2.74675E-04
 ELEV.add_offset = 0
 ELEV.Ferret_Precision_Note = This variable written using Ferret was converted from SHORT to FLOAT 
 ELEV.history = From err491_attval 
 
! LOAD/DAT=
use coads_climatology
use levitus_climatology
 
load/DAT=coads_climatology sst[y=-10:10:.1,l=1,x=160e]
show grid
 Default grid for DEFINE VARIABLE is ABSTRACT
 Last successful data access was on grid (G###)
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            1 pt
 (AX###)   LATITUDE           201 r   10S                  10N                 201 pts
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        1 pt
 
! LIST/DAT=, LET/DAT=,
can dat/all
use err491_attval
use coads_climatology
use levitus_climatology
use ocean_atlas_temp
use gt4d011
 
let a = temp.units
list/DAT=3 a
             VARIABLE : TEMP.UNITS
             FILENAME : levitus_climatology.cdf
             X        : 1
        "DEG C"
list/DAT=3 temp.history
             VARIABLE : TEMP.HISTORY
             FILENAME : levitus_climatology.cdf
        "From levitus_climatology"
 
! PLOT, SHADE, FILL, CONTOUR, VECTOR, STAT
! various plot and other action commands with /DATA
 
let/DAT=2 temp = sst + 0*z[z=1:5:1]
sh dat 2
     currently SET data sets:
    2> ./data/coads_climatology.cdf
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:3
 ------------------------------
 TEMP[D=coads_climatology] = SST + 0*Z[Z=1:5:1]
 
plot/DATASET=2 sst[L=1,y=0,x=300:360]
fill/DAT=2 sst[L=1,x=30:150,y=-60:0]
contour/over/DATA=3 temp[Z=0]
shade/DATA=2 sst[x=180,y=-10:10]
vec/DAT=gt4d011/l=3 taux,tauy
 
! STAT, LIST
stat/DATASET=1 elev
 
             Surface elevation
             LONGITUDE: 135.5163W(-135.5163) to 135.0455W(-135.0
             LATITUDE: 58.591N to 59.47N
             Z:  N/A
             T (day): 1.78368
             E:  N/A
             F:  N/A
             DATA SET: ./data/err491_attval.cdf
 
 Total # of data points: 4445 (35*127*1*1*1*1)
 # flagged as bad  data: 3065
 Minimum value: 2.9225
 Maximum value: 3.0058
 Mean    value: 2.9799 (unweighted average)
 Standard deviation: 0.017437
shade/DAT=1 elev
list/DAT=1/x=-135.3/y=58.8 elev
             VARIABLE : Surface elevation (meter)
             DATA SET : K-Bay OAR3d model (200m)
             FILENAME : err491_attval.cdf
             LONGITUDE: 135.2944W(-135.2944)
             LATITUDE : 58.797N
             T (day)  : 1.78368
          2.977
 
! POLYGON/DAT
define axis/x=330:350:1/units=degrees_east xax10
define axis/y=-10:10:1/units=degrees_north yax10
 
let fsst = sst[l=3,gx=xax10,gy=yax10]
let lon = xsequence(x[gx=xax10] + 0*y[gy=yax10])
let lat = xsequence(0*x[gx=xax10] + y[gy=yax10])
shade/pal=white/nokey/nolab/DATA=2 sst[l=1,x=300:310,y=-10:10]   ! Set up plot params for polymark.jnl
go polymark poly/DATA=2/key/title="Polygon test", lon, lat, xsequence(fsst), square, 1.2
 
 
! Commands that have another qualifier also starting with /D
! LIST/DATASET= with /DEFLATE
cancel data/all
use levitus_climatology
use gt4d011
use coads_climatology
list/form=cdf/ncformat=4/DEFLATE/file=a.nc/clobber/DATA=1 temp
 
! PLOT/DASH with /DATA=
plot/dash/x=180/z=0/DATASET=1 temp
 
! VECTOR/FLOW/DATA=/DENSITY
flow/DAT=2/den=3/L=3 taux,tauy
*** Running ferret script: bn_speedtest.jnl
! bn_speedtest.jnl
! issue large numbers of commands, timing with clock time
can mode verify
10K LET commands LET a = 0 takes [0-4] seconds
Second 10K LET commands LET a = 0 takes [0-8] seconds
5K LOAD with transform takes [0-9] seconds
*** Running ferret script: bn_show_noupcase.jnl
! bn_show_noupcase.jnl
! 1/2016 ticket 1796
 
cancel mode upcase
 
 
! Previously this mode acted only when saving to netCDf.
! Now applies to SHOW commands of all sorts, as well as `return=*axis`
 
 
 
! User variable with lowercase letters in the name
 
DEFINE AXIS/t=1-jan-1999:31-jan-1999:1/units=days/t0=31-dec-1998 tday
LET MyUpperLowerCaseVar = x[x=1:10] + t[gt=tday]
show var
 Created by DEFINE VARIABLE:
 >>> Definitions that replace any file variable of same name:
     MyUpperLowerCaseVar = X[X=1:10] + T[GT=TDAY]
show grid MyUpperLowerCaseVar
    GRID (G###)
 name       axis              # pts   start                end                 subset
 ABSTRACT  X             99999999 r   1                    1.E+08              10 pts
 normal    Y
 normal    Z
 tday      TIME                31 r   01-JAN-1999 00:00    31-JAN-1999 00:00   full
 
 
! Files have variable and axis names in mixed case.
 
USE a1478.nc
USE a_cartesian_bug1179.nc
show data
     currently SET data sets:
    1> ./data/a1478.nc
 name     title                             I         J         K         L
 lat1_5_bnds
                                           1:2       1:5       ...       ...
 olr      outgoing longwave radiation      1:5       1:5       ...       1:3
 
    2> ./data/a_cartesian_bug1179.nc  (default)
 name     title                             I         J         K         L
 temp     THETA_FO(SALT_EXTRAP,TEMP_EXTRA  1:1       1:1       1:10      1:1
 
 
! Previously the RETURN= gave the capitalized axis names
say `temp,return=zaxis`
 !-> MESSAGE/CONTINUE zt
zt
say `temp,return=xaxis`
 !-> MESSAGE/CONTINUE grid_x_T
grid_x_T
 
sh axis `temp,return=xaxis`
 !-> sh axis grid_x_T
 name       axis              # pts   start                end
 grid_x_T  LONGITUDE            1 r   79E                  79E
   Axis span (to cell edges) = 1
sh axis/x `temp,return=xaxis`
 !-> sh axis/x grid_x_T
 name       axis              # pts   start                end
 grid_x_T  LONGITUDE            1 r   79E                  79E
   Axis span (to cell edges) = 1
 
       I     X                       XBOX          XBOXLO
       1>  79E                       1          78.5E
 
! Define an output variable with some axes from each dataset.
! (the variable definitions have been upcased. Beyond the scope of this fix...)
 
LET/D=1 zvar = 2*temp[d=2]
LET/D=2 newvar =  0*zvar[d=2] + olr[d=1]
 
show data
     currently SET data sets:
    1> ./data/a1478.nc
 name     title                             I         J         K         L
 lat1_5_bnds
                                           1:2       1:5       ...       ...
 olr      outgoing longwave radiation      1:5       1:5       ...       1:3
 ------------------------------
 zvar[D=a1478] = 2*TEMP[D=2]
 
    2> ./data/a_cartesian_bug1179.nc  (default)
 name     title                             I         J         K         L
 temp     THETA_FO(SALT_EXTRAP,TEMP_EXTRA  1:1       1:1       1:10      1:1
 ------------------------------
 newvar[D=a_cartesian_bug1179] = 0*ZVAR[D=2] + OLR[D=1]
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
 
! xml output
 
USE a_cartesian_bug1179.nc
 
say/quiet <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
say/quiet <data>
<data>
 
show var/xml
show data/var/xml
<datasets>
<dataset name="./data/a_cartesian_bug1179.nc" default="true">
<title> </title>
<var name="temp">
<attribute name="units" type="char">
   <value><![CDATA[nounits]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[THETA_FO(SALT_EXTRAP,TEMP_EXTRAP,Z[G=TEMP_EXTRAP],0)]]></value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<grid name="GHU1">
<axes>
<xaxis>grid_x_T</xaxis>
<yaxis>grid_y_T</yaxis>
<zaxis>zt</zaxis>
<taxis>TIME</taxis>
</axes>
</grid>
</var>
</dataset>
</datasets>
<axes>
<axis name="TIME">
<attribute name="direction" type="char">
   <value><![CDATA[L]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[days since 1900-01-01 00:00:00]]></value>
</attribute>
<attribute name="length" type="short">
   <value>1</value>
</attribute>
<attribute name="start" type="double">
   <value>1900-02-15 03:00:00</value>
</attribute>
<attribute name="end" type="double">
   <value>1900-02-15 03:00:00</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value><![CDATA[yes]]></value>
</attribute>
<attribute name="time_origin" type="char">
   <value><![CDATA[1900-01-01 00:00:00]]></value>
</attribute>
<attribute name="calendar" type="char">
   <value><![CDATA[JULIAN]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[TIME]]></value>
</attribute>
</axis>
<axis name="zt">
<attribute name="direction" type="char">
   <value><![CDATA[K]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[meters]]></value>
</attribute>
<attribute name="length" type="short">
   <value>10</value>
</attribute>
<attribute name="start" type="double">
   <value>22.5</value>
</attribute>
<attribute name="end" type="double">
   <value>157.9952</value>
</attribute>
<attribute name="positive" type="char">
   <value><![CDATA[down]]></value>
</attribute>
<attribute name="point_spacing" type="char">
   <value>uneven</value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[zt]]></value>
</attribute>
<attribute name="cartesian_axis" type="char">
   <value><![CDATA[z]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[zt]]></value>
</attribute>
<attribute name="bounds" type="char">
   <value>zt_bnds</value>
</attribute>
</axis>
<axis name="grid_y_T">
<attribute name="direction" type="char">
   <value><![CDATA[J]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[degrees_north]]></value>
</attribute>
<attribute name="length" type="short">
   <value>1</value>
</attribute>
<attribute name="start" type="double">
   <value>-0.25</value>
</attribute>
<attribute name="end" type="double">
   <value>-0.25</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[Nominal Latitude of T-cell center]]></value>
</attribute>
<attribute name="cartesian_axis" type="char">
   <value><![CDATA[Y]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[grid_y_T]]></value>
</attribute>
</axis>
<axis name="grid_x_T">
<attribute name="direction" type="char">
   <value><![CDATA[I]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[degrees_east]]></value>
</attribute>
<attribute name="length" type="short">
   <value>1</value>
</attribute>
<attribute name="start" type="double">
   <value>79</value>
</attribute>
<attribute name="end" type="double">
   <value>79</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[Nominal Longitude of T-cell center]]></value>
</attribute>
<attribute name="cartesian_axis" type="char">
   <value><![CDATA[X]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[grid_x_T]]></value>
</attribute>
</axis>
</axes>
say/quiet </data>
</data>
 
USE a_cartesian_bug1179.nc
 
SHO DATA/XML
<datasets>
<dataset name="./data/a_cartesian_bug1179.nc" default="true">
<title> </title>
<var name="temp" />
</dataset>
</datasets>
 
SHO DATA/VAR/XML
<datasets>
<dataset name="./data/a_cartesian_bug1179.nc" default="true">
<title> </title>
<var name="temp">
<attribute name="units" type="char">
   <value><![CDATA[nounits]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[THETA_FO(SALT_EXTRAP,TEMP_EXTRAP,Z[G=TEMP_EXTRAP],0)]]></value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<grid name="GHU1">
<axes>
<xaxis>grid_x_T</xaxis>
<yaxis>grid_y_T</yaxis>
<zaxis>zt</zaxis>
<taxis>TIME</taxis>
</axes>
</grid>
</var>
</dataset>
</datasets>
<axes>
<axis name="TIME">
<attribute name="direction" type="char">
   <value><![CDATA[L]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[days since 1900-01-01 00:00:00]]></value>
</attribute>
<attribute name="length" type="short">
   <value>1</value>
</attribute>
<attribute name="start" type="double">
   <value>1900-02-15 03:00:00</value>
</attribute>
<attribute name="end" type="double">
   <value>1900-02-15 03:00:00</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value><![CDATA[yes]]></value>
</attribute>
<attribute name="time_origin" type="char">
   <value><![CDATA[1900-01-01 00:00:00]]></value>
</attribute>
<attribute name="calendar" type="char">
   <value><![CDATA[JULIAN]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[TIME]]></value>
</attribute>
</axis>
<axis name="zt">
<attribute name="direction" type="char">
   <value><![CDATA[K]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[meters]]></value>
</attribute>
<attribute name="length" type="short">
   <value>10</value>
</attribute>
<attribute name="start" type="double">
   <value>22.5</value>
</attribute>
<attribute name="end" type="double">
   <value>157.9952</value>
</attribute>
<attribute name="positive" type="char">
   <value><![CDATA[down]]></value>
</attribute>
<attribute name="point_spacing" type="char">
   <value>uneven</value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[zt]]></value>
</attribute>
<attribute name="cartesian_axis" type="char">
   <value><![CDATA[z]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[zt]]></value>
</attribute>
<attribute name="bounds" type="char">
   <value>zt_bnds</value>
</attribute>
</axis>
<axis name="grid_y_T">
<attribute name="direction" type="char">
   <value><![CDATA[J]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[degrees_north]]></value>
</attribute>
<attribute name="length" type="short">
   <value>1</value>
</attribute>
<attribute name="start" type="double">
   <value>-0.25</value>
</attribute>
<attribute name="end" type="double">
   <value>-0.25</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[Nominal Latitude of T-cell center]]></value>
</attribute>
<attribute name="cartesian_axis" type="char">
   <value><![CDATA[Y]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[grid_y_T]]></value>
</attribute>
</axis>
<axis name="grid_x_T">
<attribute name="direction" type="char">
   <value><![CDATA[I]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[degrees_east]]></value>
</attribute>
<attribute name="length" type="short">
   <value>1</value>
</attribute>
<attribute name="start" type="double">
   <value>79</value>
</attribute>
<attribute name="end" type="double">
   <value>79</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[Nominal Longitude of T-cell center]]></value>
</attribute>
<attribute name="cartesian_axis" type="char">
   <value><![CDATA[X]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[grid_x_T]]></value>
</attribute>
</axis>
</axes>
 
SHO GRID/XML temp
<grid name="GHU1">
<axes>
<xaxis>grid_x_T</xaxis>
<yaxis>grid_y_T</yaxis>
<zaxis>zt</zaxis>
<taxis>TIME</taxis>
</axes>
</grid>
 
SHO AXIS/XML `temp,return=xaxis`
 !-> SHO AXIS/XML grid_x_T
<axes>
<axis name="grid_x_T">
<attribute name="direction" type="char">
   <value><![CDATA[I]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[degrees_east]]></value>
</attribute>
<attribute name="length" type="short">
   <value>1</value>
</attribute>
<attribute name="start" type="double">
   <value>79</value>
</attribute>
<attribute name="end" type="double">
   <value>79</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[Nominal Longitude of T-cell center]]></value>
</attribute>
<attribute name="cartesian_axis" type="char">
   <value><![CDATA[X]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[grid_x_T]]></value>
</attribute>
</axis>
</axes>
SHO AXIS/XML `temp,return=yaxis`
 !-> SHO AXIS/XML grid_y_T
<axes>
<axis name="grid_y_T">
<attribute name="direction" type="char">
   <value><![CDATA[J]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[degrees_north]]></value>
</attribute>
<attribute name="length" type="short">
   <value>1</value>
</attribute>
<attribute name="start" type="double">
   <value>-0.25</value>
</attribute>
<attribute name="end" type="double">
   <value>-0.25</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[Nominal Latitude of T-cell center]]></value>
</attribute>
<attribute name="cartesian_axis" type="char">
   <value><![CDATA[Y]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[grid_y_T]]></value>
</attribute>
</axis>
</axes>
SHO AXIS/XML `temp,return=zaxis`
 !-> SHO AXIS/XML zt
<axes>
<axis name="zt">
<attribute name="direction" type="char">
   <value><![CDATA[K]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[meters]]></value>
</attribute>
<attribute name="length" type="short">
   <value>10</value>
</attribute>
<attribute name="start" type="double">
   <value>22.5</value>
</attribute>
<attribute name="end" type="double">
   <value>157.9952</value>
</attribute>
<attribute name="positive" type="char">
   <value><![CDATA[down]]></value>
</attribute>
<attribute name="point_spacing" type="char">
   <value>uneven</value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[zt]]></value>
</attribute>
<attribute name="cartesian_axis" type="char">
   <value><![CDATA[z]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[zt]]></value>
</attribute>
<attribute name="bounds" type="char">
   <value>zt_bnds</value>
</attribute>
</axis>
</axes>
SHO AXIS/XML `temp,return=taxis`
 !-> SHO AXIS/XML TIME
<axes>
<axis name="TIME">
<attribute name="direction" type="char">
   <value><![CDATA[L]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[days since 1900-01-01 00:00:00]]></value>
</attribute>
<attribute name="length" type="short">
   <value>1</value>
</attribute>
<attribute name="start" type="double">
   <value>1900-02-15 03:00:00</value>
</attribute>
<attribute name="end" type="double">
   <value>1900-02-15 03:00:00</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value><![CDATA[yes]]></value>
</attribute>
<attribute name="time_origin" type="char">
   <value><![CDATA[1900-01-01 00:00:00]]></value>
</attribute>
<attribute name="calendar" type="char">
   <value><![CDATA[JULIAN]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[TIME]]></value>
</attribute>
</axis>
</axes>
 
! Define a dataset variable
! SHOW/XML commands list it w/ its dataset (even if dataset is not default)
LET/D=a_cartesian_bug1179 temp_180 = temp[X=79E:79E@AVE]
 
SHOW DATA/XML
<datasets>
<dataset name="./data/a_cartesian_bug1179.nc" default="true">
<title> </title>
<var name="temp" />
<var name="temp_180" />
</dataset>
</datasets>
 
USE a1478.nc
SHOW DATA/XML
<datasets>
<dataset name="./data/a_cartesian_bug1179.nc" default="false">
<title> </title>
<var name="temp" />
<var name="temp_180" />
</dataset>
<dataset name="./data/a1478.nc" default="true">
<title> </title>
<var name="lat1_5_bnds" />
<var name="olr" />
</dataset>
</datasets>
SHO DATA/VAR/XML
<datasets>
<dataset name="./data/a_cartesian_bug1179.nc" default="false">
<title> </title>
<var name="temp">
<attribute name="units" type="char">
   <value><![CDATA[nounits]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[THETA_FO(SALT_EXTRAP,TEMP_EXTRAP,Z[G=TEMP_EXTRAP],0)]]></value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<grid name="GHU1">
<axes>
<xaxis>grid_x_T</xaxis>
<yaxis>grid_y_T</yaxis>
<zaxis>zt</zaxis>
<taxis>TIME</taxis>
</axes>
</grid>
</var>
<var name="temp_180">
<attribute name="definition" type="char">
   <value><![CDATA[TEMP[X=79E:79E@AVE]]]></value>
</attribute>
<attribute name="_FillValue" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[TEMP[X=79E:79E@AVE]]]></value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="GHU1">
<axes>
<yaxis>grid_y_T</yaxis>
<zaxis>zt</zaxis>
<taxis>TIME</taxis>
</axes>
</grid>
</var>
</dataset>
</datasets>
<axes>
<axis name="TIME">
<attribute name="direction" type="char">
   <value><![CDATA[L]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[days since 1900-01-01 00:00:00]]></value>
</attribute>
<attribute name="length" type="short">
   <value>1</value>
</attribute>
<attribute name="start" type="double">
   <value>1900-02-15 03:00:00</value>
</attribute>
<attribute name="end" type="double">
   <value>1900-02-15 03:00:00</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value><![CDATA[yes]]></value>
</attribute>
<attribute name="time_origin" type="char">
   <value><![CDATA[1900-01-01 00:00:00]]></value>
</attribute>
<attribute name="calendar" type="char">
   <value><![CDATA[JULIAN]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[TIME]]></value>
</attribute>
</axis>
<axis name="zt">
<attribute name="direction" type="char">
   <value><![CDATA[K]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[meters]]></value>
</attribute>
<attribute name="length" type="short">
   <value>10</value>
</attribute>
<attribute name="start" type="double">
   <value>22.5</value>
</attribute>
<attribute name="end" type="double">
   <value>157.9952</value>
</attribute>
<attribute name="positive" type="char">
   <value><![CDATA[down]]></value>
</attribute>
<attribute name="point_spacing" type="char">
   <value>uneven</value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[zt]]></value>
</attribute>
<attribute name="cartesian_axis" type="char">
   <value><![CDATA[z]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[zt]]></value>
</attribute>
<attribute name="bounds" type="char">
   <value>zt_bnds</value>
</attribute>
</axis>
<axis name="grid_y_T">
<attribute name="direction" type="char">
   <value><![CDATA[J]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[degrees_north]]></value>
</attribute>
<attribute name="length" type="short">
   <value>1</value>
</attribute>
<attribute name="start" type="double">
   <value>-0.25</value>
</attribute>
<attribute name="end" type="double">
   <value>-0.25</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[Nominal Latitude of T-cell center]]></value>
</attribute>
<attribute name="cartesian_axis" type="char">
   <value><![CDATA[Y]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[grid_y_T]]></value>
</attribute>
</axis>
<axis name="grid_x_T">
<attribute name="direction" type="char">
   <value><![CDATA[I]]></value>
</attribute>
<attribute name="units" type="char">
   <value><![CDATA[degrees_east]]></value>
</attribute>
<attribute name="length" type="short">
   <value>1</value>
</attribute>
<attribute name="start" type="double">
   <value>79</value>
</attribute>
<attribute name="end" type="double">
   <value>79</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[Nominal Longitude of T-cell center]]></value>
</attribute>
<attribute name="cartesian_axis" type="char">
   <value><![CDATA[X]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[grid_x_T]]></value>
</attribute>
</axis>
</axes>
<dataset name="./data/a1478.nc" default="true">
<title> </title>
<var name="lat1_5_bnds">
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<grid name="GPY1">
<axes>
<xaxis>bnds</xaxis>
<yaxis>lat1_5</yaxis>
</axes>
</grid>
</var>
<var name="olr">
<attribute name="units" type="char">
   <value><![CDATA[watts/m2]]></value>
</attribute>
<attribute name="long_name" type="char">
   <value><![CDATA[outgoing longwave radiation]]></value>
</attribute>
<attribute name="_FillValue" type="float">
   <value>-999</value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-999</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="GPY2">
<axes>
<xaxis>lon1_5</xaxis>
<yaxis>lat1_5</yaxis>
<taxis>time1478</taxis>
</axes>
</grid>
</var>
</dataset>
</datasets>
<axes>
<axis name="time1478">
<attribute name="direction" type="char">
   <value><![CDATA[L]]></value>
</attribute>
<attribute name="length" type="short">
   <value>3</value>
</attribute>
<attribute name="start" type="double">
   <value>14782.5</value>
</attribute>
<attribute name="end" type="double">
   <value>15512.5</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="axis" type="char">
   <value><![CDATA[T]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[time1478]]></value>
</attribute>
</axis>
<axis name="lat1_5">
<attribute name="direction" type="char">
   <value><![CDATA[J]]></value>
</attribute>
<attribute name="length" type="short">
   <value>5</value>
</attribute>
<attribute name="start" type="double">
   <value>-89.49438</value>
</attribute>
<attribute name="end" type="double">
   <value>-81.91011</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value>uneven</value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[lat1_5]]></value>
</attribute>
<attribute name="bounds" type="char">
   <value>lat1_5_bnds</value>
</attribute>
</axis>
<axis name="lon1_5">
<attribute name="direction" type="char">
   <value><![CDATA[I]]></value>
</attribute>
<attribute name="length" type="short">
   <value>5</value>
</attribute>
<attribute name="start" type="double">
   <value>1.25</value>
</attribute>
<attribute name="end" type="double">
   <value>11.25</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
<attribute name="infile_datatype" type="char">
   <value><![CDATA[DOUBLE]]></value>
</attribute>
<attribute name="orig_file_axname" type="char">
   <value><![CDATA[lon1_5]]></value>
</attribute>
</axis>
<axis name="bnds">
<attribute name="direction" type="char">
   <value><![CDATA[I]]></value>
</attribute>
<attribute name="length" type="short">
   <value>2</value>
</attribute>
<attribute name="start" type="double">
   <value>1</value>
</attribute>
<attribute name="end" type="double">
   <value>2</value>
</attribute>
<attribute name="point_spacing" type="char">
   <value><![CDATA[even]]></value>
</attribute>
<attribute name="modulo" type="char">
   <value>no</value>
</attribute>
</axis>
</axes>
 
! tests of SHOW VAR/XML for global variables.
CAN DATA/ALL
CAN VAR/ALL
 
USE a1478
USE a_cartesian_bug1179
 
! Define a dataset variable
LET/D=a1478 temp_20 temp[Z=0:20@SUM]
 
! Define a global variable
LET t30 = temp[Z=0:30@SUM]
 
! Another variable, setting title, units, bad flag.
LET/UNITS="Deg C"/BAD=100/TITLE="Indefinite integral of SALT" salty = salt[Z=@IIN]
 
 
! list tha variables
SHO VAR/XML
<global>
<var name="t30">
<attribute name="definition" type="char">
   <value><![CDATA[TEMP[Z=0:30@SUM]]]></value>
</attribute>
<attribute name="missing_value" type="float">
   <value>-1.E+34</value>
</attribute>
<attribute name="ferret_datatype" type="char">
   <value><![CDATA[FLOAT]]></value>
</attribute>
<grid name="GHU1">
<axes>
<xaxis>grid_x_T</xaxis>
<yaxis>grid_y_T</yaxis>
<taxis>TIME</taxis>
</axes>
</grid>
</var>
</global>
 
set mode/last upcase
 
*** Running ferret script: bn_letd_attributes.jnl
! bn_letd_attributes.jnl
! Allow for the same variable name defined with LET/D in multiple datasets.
! See ticket 2352.  Previously for all user variables the
! attribute information stored was in fake uvar-dataset = -1.
! Now if the variable is a LET/D variable, it is stored with
! the attribute information of the dataset.
 
 
! See the variable defined with LET/D in SHOW DAT, SHOW DAT/ATT
! and with SHOW ATT
 
use coads_climatology
let/d=1/title="coads myvar" myvar = 1
 
! Now SHOW DATA/ATT lists the LET/D variables, as SHOW DATA does
show dat 1
     currently SET data sets:
    1> ./data/coads_climatology.cdf  (default)
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:3
 ------------------------------
 MYVAR[D=coads_climatology] = 1
 
 
show dat/att 1
     currently SET data sets:
    1> ./data/coads_climatology.cdf  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        28   T       FERRET V4.91 (GUI)  1-Mar-99
  
(COADSX)               DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        6    F       COADSX
  
(COADSY)               DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        6    F       COADSY
  
(TIME)                 DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        19   T       1-JAN-0000 00:00:00
                                 modulo          CHAR        1    T
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 SST                   FLOAT     missing_value   FLOAT       1    T       -1.E+34
                                 _FillValue      FLOAT       1    T       -1.E+34
                                 long_name       CHAR        23   T       SEA SURFACE TEMPERATURE
                                 history         CHAR        22   T       From coads_climatology
                                 units           CHAR        5    T       Deg C
  
 ------------------------------
 myvar[D=coads_climatology]      long_name       CHAR        11   T       coads myvar
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 
show att myvar
     attributes for dataset: ./data/coads_climatology.cdf
 myvar.long_name = coads myvar 
 myvar.missing_value = -1.E+34
 
! If there is also a global variable of the same name, SHOW VAR
! and SHOW ATT list results for both variables
 
let/title="Global myvar" myvar = 0  ! global
show att myvar
     attributes for user-defined variables
 myvar.long_name = Global myvar 
 myvar.missing_value = -1.E+34
 
! Now a LET/D variable with the same name on a second datset.
! SHOW ATT lists results for the current datset and any global variables
 
use levitus_climatology
let/d=2/title="Levitus myvar" myvar = 2
show dat 2
     currently SET data sets:
    2> ./data/levitus_climatology.cdf  (default)
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                      1:160     1:90      1:1       ...
 ------------------------------
 MYVAR[D=levitus_climatology] = 2
 
show dat/att 2
     currently SET data sets:
    2> ./data/levitus_climatology.cdf  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        24   T       FERRET V5.22    5-Apr-01
  
(XAXLEVITR1_160)       DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        14   F       XAXLEVITR1_160
  
(YAXLEVITR1_90)        DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        13   F       YAXLEVITR1_90
  
(ZAXLEVITR1_1)         DOUBLE    units           CHAR        6    T       METERS
                                 positive        CHAR        4    T       down
                                 orig_file_axname
                                                 CHAR        12   F       ZAXLEVITR1_1
  
 TEMP                  FLOAT     missing_value   FLOAT       1    T       -1.E+10
                                 _FillValue      FLOAT       1    T       -1.E+10
                                 long_name       CHAR        11   T       TEMPERATURE
                                 history         CHAR        24   T       From levitus_climatology
                                 units           CHAR        5    T       DEG C
  
 ------------------------------
 myvar[D=levitus_climatology]    long_name       CHAR        13   T       Levitus myvar
                                 missing_value   DOUBLE      1    T       -1.E+34
  
show att myvar
     attributes for user-defined variables
 myvar.long_name = Global myvar 
 myvar.missing_value = -1.E+34
 
show att/d=1 myvar
     attributes for dataset: ./data/coads_climatology.cdf
 myvar.long_name = coads myvar 
 myvar.missing_value = -1.E+34
 
! ..varnames is the list of file variables. Now to include LET/D variables
 
let vnames = ..varnames
list vnames
             VARIABLE : ..VARNAMES
             FILENAME : levitus_climatology.cdf
             SUBSET   : 2 points (X)
 1   / 1:"TEMP" 
 2   / 2:"myvar"
 
 
set data 1
list vnames
             VARIABLE : ..VARNAMES
             FILENAME : coads_climatology.cdf
             SUBSET   : 2 points (X)
 1   / 1:"SST"  
 2   / 2:"myvar"
 
 
! CANCEL VAR deletes the variables from the linked-list attribute structure.
cancel var/all
show dat
     currently SET data sets:
    1> ./data/coads_climatology.cdf  (default)
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:3
 
    2> ./data/levitus_climatology.cdf
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                      1:160     1:90      1:1       ...
 
 
show dat/att 2
     currently SET data sets:
    2> ./data/levitus_climatology.cdf
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        24   T       FERRET V5.22    5-Apr-01
  
(XAXLEVITR1_160)       DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        14   F       XAXLEVITR1_160
  
(YAXLEVITR1_90)        DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 orig_file_axname
                                                 CHAR        13   F       YAXLEVITR1_90
  
(ZAXLEVITR1_1)         DOUBLE    units           CHAR        6    T       METERS
                                 positive        CHAR        4    T       down
                                 orig_file_axname
                                                 CHAR        12   F       ZAXLEVITR1_1
  
 TEMP                  FLOAT     missing_value   FLOAT       1    T       -1.E+10
                                 _FillValue      FLOAT       1    T       -1.E+10
                                 long_name       CHAR        11   T       TEMPERATURE
                                 history         CHAR        24   T       From levitus_climatology
                                 units           CHAR        5    T       DEG C
  
 
! Redefine our LET/D variables
 
use coads_climatology
let/d=1/title="coads myvar" myvar = 1
 
use levitus_climatology
let/d=2/title="Levitus myvar" myvar = 2
 
! Define new attributes on the file variable and LET/D variable
! in the default dataset
 
define att/output temp.my_new_att="temperature attrib"
define att/output myvar.units="meters"
show att temp
     attributes for dataset: ./data/levitus_climatology.cdf
 TEMP.missing_value = -1.E+10
 TEMP._FillValue = -1.E+10
 TEMP.long_name = TEMPERATURE 
 TEMP.history = From levitus_climatology 
 TEMP.units = DEG C 
 TEMP.my_new_att = temperature attrib 
show att myvar
     attributes for dataset: ./data/levitus_climatology.cdf
 myvar.long_name = Levitus myvar 
 myvar.missing_value = -1.E+34
 myvar.units = meters 
 
! use /D= to define an attribute for a file-specific var
define att/output/d=2 myvar.standard_name = "None"
 
define att/output/d=1 myvar.units="feet"
show att/d=1 myvar
     attributes for dataset: ./data/coads_climatology.cdf
 myvar.long_name = coads myvar 
 myvar.missing_value = -1.E+34
 myvar.units = feet 
save/clobber/file=a.nc myvar[d=1]
sp ncdump -h a.nc >> all_ncdump.out
 
show att/d=2 myvar
     attributes for dataset: ./data/levitus_climatology.cdf
 myvar.long_name = Levitus myvar 
 myvar.missing_value = -1.E+34
 myvar.units = meters 
 myvar.standard_name = None 
save/clobber/file=a.nc myvar[d=2]
sp ncdump -h a.nc >> all_ncdump.out
 
*** Running ferret script: bn_list_clim_axes.jnl
! bn_list_clim_axes.jnl
! *acm* 3/16
! *acm* 7/18 specific list of clim axes to show, and include month_julian
 
! Show and list coordinates for climatological axes
! that are pre-defined in Ferret
!
 
show axis seasonal_reg
 name       axis              # pts   start                end
 SEASONAL_REG TIME              4mr   15-FEB 15:43         15-NOV 14:05
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 8765.82 (modulo length = axis span)
show axis month_irreg, month_reg, month_gregorian, month_noleap, month_360_day, \
 month_all_leap, month_julian
 name       axis              # pts   start                end
 MONTH_IRREG TIME              12mi   16-JAN 12:00         15-DEC 17:49
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 MONTH_REG TIME                12mr   16-JAN 06:00         16-DEC 01:20
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 8765.82 (modulo length = axis span)
 MONTH_GREGORIAN TIME          12mi   16-JAN 12:00         15-DEC 17:49
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 MONTH_NOLEAP TIME             12mi   16-JAN 12:00         16-DEC 12:00
T0 = 01-JAN-0000 00:00:00
CALENDAR = NOLEAP
   Axis span (to cell edges) = 365 (modulo length = axis span)
 MONTH_360_DAY TIME            12mr   16-JAN 00:00         16-DEC 00:00
T0 = 01-JAN-0000 00:00:00
CALENDAR = 360_DAY
   Axis span (to cell edges) = 360 (modulo length = axis span)
 MONTH_ALL_LEAP TIME           12mi   16-JAN 12:00         16-DEC 12:00
T0 = 01-JAN-0000 00:00:00
CALENDAR = ALL_LEAP
   Axis span (to cell edges) = 366 (modulo length = axis span)
 MONTH_JULIAN TIME             12mi   16-JAN 12:00         15-DEC 18:00
T0 = 01-JAN-0000 00:00:00
CALENDAR = JULIAN
   Axis span (to cell edges) = 365.25 (modulo length = axis span)
 
show axis/t month_irreg
 name       axis              # pts   start                end
 MONTH_IRREG TIME              12mi   16-JAN 12:00         15-DEC 17:49
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  16-JAN 12:00:00           31         01-JAN 00:00:00             15.5
       2>  15-FEB 02:54:36           28.2425    01-FEB 00:00:00             45.12125
       3>  15-MAR 17:49:12           31         29-FEB 05:49:12             74.7425
       4>  15-APR 05:49:12           30         31-MAR 05:49:12             105.2425
       5>  15-MAY 17:49:12           31         30-APR 05:49:12             135.7425
       6>  15-JUN 05:49:12           30         31-MAY 05:49:12             166.2425
       7>  15-JUL 17:49:12           31         30-JUN 05:49:12             196.7425
       8>  15-AUG 17:49:12           31         31-JUL 05:49:12             227.7425
       9>  15-SEP 05:49:12           30         31-AUG 05:49:12             258.2425
      10>  15-OCT 17:49:12           31         30-SEP 05:49:12             288.7425
      11>  15-NOV 05:49:12           30         31-OCT 05:49:12             319.2425
      12>  15-DEC 17:49:12           31         30-NOV 05:49:12             349.7425
show axis/t month_gregorian
 name       axis              # pts   start                end
 MONTH_GREGORIAN TIME          12mi   16-JAN 12:00         15-DEC 17:49
T0 = 01-JAN-0000 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  16-JAN 12:00:00           31         01-JAN 00:00:00             15.5
       2>  15-FEB 02:54:36           28.2425    01-FEB 00:00:00             45.12125
       3>  15-MAR 17:49:12           31         29-FEB 05:49:12             74.7425
       4>  15-APR 05:49:12           30         31-MAR 05:49:12             105.2425
       5>  15-MAY 17:49:12           31         30-APR 05:49:12             135.7425
       6>  15-JUN 05:49:12           30         31-MAY 05:49:12             166.2425
       7>  15-JUL 17:49:12           31         30-JUN 05:49:12             196.7425
       8>  15-AUG 17:49:12           31         31-JUL 05:49:12             227.7425
       9>  15-SEP 05:49:12           30         31-AUG 05:49:12             258.2425
      10>  15-OCT 17:49:12           31         30-SEP 05:49:12             288.7425
      11>  15-NOV 05:49:12           30         31-OCT 05:49:12             319.2425
      12>  15-DEC 17:49:12           31         30-NOV 05:49:12             349.7425
show axis/t month_noleap
 name       axis              # pts   start                end
 MONTH_NOLEAP TIME             12mi   16-JAN 12:00         16-DEC 12:00
T0 = 01-JAN-0000 00:00:00
CALENDAR = NOLEAP
   Axis span (to cell edges) = 365 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  16-JAN 12:00:00           31         01-JAN 00:00:00             15.5
       2>  15-FEB 00:00:00           28         01-FEB 00:00:00             45
       3>  16-MAR 12:00:00           31         01-MAR 00:00:00             74.5
       4>  16-APR 00:00:00           30         01-APR 00:00:00             105
       5>  16-MAY 12:00:00           31         01-MAY 00:00:00             135.5
       6>  16-JUN 00:00:00           30         01-JUN 00:00:00             166
       7>  16-JUL 12:00:00           31         01-JUL 00:00:00             196.5
       8>  16-AUG 12:00:00           31         01-AUG 00:00:00             227.5
       9>  16-SEP 00:00:00           30         01-SEP 00:00:00             258
      10>  16-OCT 12:00:00           31         01-OCT 00:00:00             288.5
      11>  16-NOV 00:00:00           30         01-NOV 00:00:00             319
      12>  16-DEC 12:00:00           31         01-DEC 00:00:00             349.5
show axis/t month_360_day
 name       axis              # pts   start                end
 MONTH_360_DAY TIME            12mr   16-JAN 00:00         16-DEC 00:00
T0 = 01-JAN-0000 00:00:00
CALENDAR = 360_DAY
   Axis span (to cell edges) = 360 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  16-JAN 00:00:00           30         01-JAN 00:00:00             15
       2>  16-FEB 00:00:00           30         01-FEB 00:00:00             45
       3>  16-MAR 00:00:00           30         01-MAR 00:00:00             75
       4>  16-APR 00:00:00           30         01-APR 00:00:00             105
       5>  16-MAY 00:00:00           30         01-MAY 00:00:00             135
       6>  16-JUN 00:00:00           30         01-JUN 00:00:00             165
       7>  16-JUL 00:00:00           30         01-JUL 00:00:00             195
       8>  16-AUG 00:00:00           30         01-AUG 00:00:00             225
       9>  16-SEP 00:00:00           30         01-SEP 00:00:00             255
      10>  16-OCT 00:00:00           30         01-OCT 00:00:00             285
      11>  16-NOV 00:00:00           30         01-NOV 00:00:00             315
      12>  16-DEC 00:00:00           30         01-DEC 00:00:00             345
show axis/t month_all_leap
 name       axis              # pts   start                end
 MONTH_ALL_LEAP TIME           12mi   16-JAN 12:00         16-DEC 12:00
T0 = 01-JAN-0000 00:00:00
CALENDAR = ALL_LEAP
   Axis span (to cell edges) = 366 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  16-JAN 12:00:00           31         01-JAN 00:00:00             15.5
       2>  15-FEB 12:00:00           29         01-FEB 00:00:00             45.5
       3>  16-MAR 12:00:00           31         01-MAR 00:00:00             75.5
       4>  16-APR 00:00:00           30         01-APR 00:00:00             106
       5>  16-MAY 12:00:00           31         01-MAY 00:00:00             136.5
       6>  16-JUN 00:00:00           30         01-JUN 00:00:00             167
       7>  16-JUL 12:00:00           31         01-JUL 00:00:00             197.5
       8>  16-AUG 12:00:00           31         01-AUG 00:00:00             228.5
       9>  16-SEP 00:00:00           30         01-SEP 00:00:00             259
      10>  16-OCT 12:00:00           31         01-OCT 00:00:00             289.5
      11>  16-NOV 00:00:00           30         01-NOV 00:00:00             320
      12>  16-DEC 12:00:00           31         01-DEC 00:00:00             350.5
show axis/t month_julian
 name       axis              # pts   start                end
 MONTH_JULIAN TIME             12mi   16-JAN 12:00         15-DEC 18:00
T0 = 01-JAN-0000 00:00:00
CALENDAR = JULIAN
   Axis span (to cell edges) = 365.25 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  16-JAN 12:00:00           31         01-JAN 00:00:00             15.5
       2>  15-FEB 06:00:00           28.25      01-FEB 00:00:00             45.25
       3>  15-MAR 18:00:00           31         29-FEB 06:00:00             74.75
       4>  15-APR 06:00:00           30         31-MAR 06:00:00             105.25
       5>  15-MAY 18:00:00           31         30-APR 06:00:00             135.75
       6>  15-JUN 06:00:00           30         31-MAY 06:00:00             166.25
       7>  15-JUL 18:00:00           31         30-JUN 06:00:00             196.75
       8>  15-AUG 18:00:00           31         31-JUL 06:00:00             227.75
       9>  15-SEP 06:00:00           30         31-AUG 06:00:00             258.25
      10>  15-OCT 18:00:00           31         30-SEP 06:00:00             288.75
      11>  15-NOV 06:00:00           30         31-OCT 06:00:00             319.25
      12>  15-DEC 18:00:00           31         30-NOV 06:00:00             349.75
*** Running ferret script: bn_climatology_attr.jnl
! bn_climatology_attr.jnl
! *acm* 3/16  See ticket 2278
!
! Add an attribute climatology_time_range when writing a computed
! climatology, listing the month/year of the start and end of the
! data used in computing it.
 
! Define a monthly axis
def ax/t=1-feb-1980:1-feb-2003/np=276/unit="day"/t0=1-jan-1900 tax
let tvar = t[gt=tax]
 
! entire input time range used
let clim1 = tvar[gt=month_irreg@mod]
save/file=a.nc/clobber clim1
 
! a subset of the time range used
let t_subset = tvar[t=1-feb-1990:31-dec-1999]
let clim2 = t_subset[gt=month_reg@mod]
save/append/file=a.nc clim2
 
! show the attributes
can dat/all; use a.nc
list/nohead/norow clim1.climatology_time_range, clim2.climatology_time_range
 "FEB-1980:FEB-2003" "FEB-1990:DEC-1999"
 
 
! noleap axis
def ax/edge/t=1-feb-1980:1-feb-2003/np=276/cal=noleap/unit="hour"/t0=1-jan-1900 tax
let tvar = t[gt=tax]
let clim1 = tvar[gt=month_noleap@mod]
save/file=a.nc/clobber clim1
 
let t_subset = tvar[t=1-feb-1990:31-dec-1999]
let clim2 = t_subset[gt=month_noleap@mod]
save/append/file=a.nc clim2
 
! show the attributes
can dat/all; use a.nc
list/nohead/norow clim1.climatology_time_range, clim2.climatology_time_range
 "FEB-1980:JAN-2003" "FEB-1990:DEC-1999"
 
 
 
! If the expression compbines data from multiple ranges, indicate that
 
def ax/t=1-feb-1980:1-feb-2003/np=276/unit="day"/t0=1-jan-1900 tax
let tvar = t[gt=tax]
let a = tvar[gt=month_reg@mod]
 
let t_subset = tvar[t=1-feb-1990:31-dec-1999]
let b = t_subset[gt=month_reg@mod]
let c = a+b
 
save/append/file=a.nc c
 
can dat/all; use a.nc
! show the attributes
can dat/all; use a.nc
list/nohead/norow c.climatology_time_range
 "Multiple time ranges used"
 
 
! The attribute created only for user-defined variables not for an expression
!
! Define a monthly axis
define axis/t=1-feb-1980:1-feb-2003/npoints=276/unit="day"/t0=1-jan-1900 tax
 
let tvar = t[gt=tax]
let clim1 = tvar[gt=month_irreg@mod]
save/nobounds/file=a.nc/clobber 3*clim1
 
can dat/all; use a.nc
 
! The variable did not get a climatology_time_range attribute
let vname = ..varnames
show att `vname[i=1]`
 !-> show att E494
     attributes for dataset: ./a.nc
 E494.missing_value = -1.E+34
 E494._FillValue = -1.E+34
 E494.long_name = 3*CLIM1 
 
*** Running ferret script: bn_plot_along.jnl
! BN_PLOT_ALONG
 
! *sh* 3/2016
 
!  yes? GO bn_plot_along [debug]
 
! exercise breaking up of plot command argument into lones along the
! indicated direction
 
DEFINE SYMBOL debugme = ($1"SAY continuing|debug>PAUSE")
 !-> DEFINE SYMBOL debugme = SAY continuing
 
! basic
LET blocky10 = x[i=1:10]+y[j=1:10]
PLOT/ALONG=x blocky10
($debugme)
 !-> MESSAGE/CONTINUE continuing
continuing
 
! degenerate case -- only a single line
LET blocky1 = x[i=1:10]+y[j=1:1]
PLOT/ALONG=x blocky1
($debugme)
 !-> MESSAGE/CONTINUE continuing
continuing
 
! number of lines exceeds key limit  (40 at time of this writing)
! automatic decimation to keep within key limit
LET blocky200 = x[i=1:10]+y[j=1:200]
PLOT/ALONG=x blocky200
($debugme)
 !-> MESSAGE/CONTINUE continuing
continuing
 
! /nokey  - no longer limited to the number of keys that can be drawn
LET blocky50 = x[i=1:10]+y[j=1:50]
PLOT/ALONG=x/nokey blocky50
($debugme)
 !-> MESSAGE/CONTINUE continuing
continuing
 
! /nokey -- number of lines exceeds line limit  (200 at time of this writing)
! automatic decimation to keep within line limit
LET blocky201 = x[i=1:10]+y[j=1:201]
PLOT/ALONG=x/nokey blocky201
($debugme)
 !-> MESSAGE/CONTINUE continuing
continuing
 
! multi-dimensional
LET blockxyz        = 0.1*T[l=1:10]+x[i=1:2]+10*y[j=1:5]+100*z[k=1:30]
LET blockxyz_little = 0.1*T[l=1:10]+x[i=1:2]+10*y[j=1:3] +100*z[k=1:4]
PLOT/ALONG=t blockxyz_little
($debugme)
 !-> MESSAGE/CONTINUE continuing
continuing
PLOT/ALONG=t blockxyz         ! decimate to key  limit
($debugme)
 !-> MESSAGE/CONTINUE continuing
continuing
PLOT/ALONG=t/nokey blockxyz   ! decimate to line limit
($debugme)
 !-> MESSAGE/CONTINUE continuing
continuing
 
 
! ensemble application
LET block = x[i=1:2]+10*y[j=1:3]+100*z[k=1:4]
LET sin_block = SIN(T[l=1:100]/10)*block
LET ens_sin_block = sin_block*( (20+_E[m=1:20])/20 )
PLOT/ALONG=t ens_sin_block[i=1,j=2,k=3]
*** Running ferret script: bn_show_commands.jnl
! bn_show_commands.jnl
! Testing results for ticket 2078: SHOW COMMAND cmnd subcmnd
! Also new SHOW COMMAND/BRIEF
! 3/2016 *acm*
!
! When commands are highly abbreviated, which command/subcommand is
! executed depends on the order in which they are listed in Ferret
! internal data structures. Keep this output consistent if new commands
! added or command list are reordered.
 
! Commands with subcommands
 
sho command set
 SET
 SET WINDOW/SIZE/NEW/LOCATION/ASPECT/CLEAR/TITLE
 SET REGION/I/J/K/L/M/N/X/Y/Z/T/E/F/DX/DY/DZ/DT/DE/DF/DI/DJ/DK/DL/DM/DN
 SET VIEWPORT
 SET EXPRSION
 SET LIST/PRECISIO/FILE/FORMAT/APPEND/HEADING/NCFORMAT/ENDIAN/DEFLATE/SHUFFLE
      /XCHUNK/YCHUNK/ZCHUNK/TCHUNK/ECHUNK/FCHUNK/OUTTYPE
 SET DATA/EZ/VARIABLE/TITLE/FORMAT/GRID/SKIP/COLUMNS/SAVE/RESTORE/ORDER
      /TYPE/SWAP/REGULART/DELIMITE/STRICT/FEATURE/FMASK
 SET MODE/LAST
 SET MOVI/FILE/COMPRESS/LASER/START
 SET VARIABLE/TITLE/UNITS/GRID/BAD/DATASET/NAME/SCALEFAC/OFFSET/OUTTYPE
      /LAYERZ/CURVILIN
 SET GRID/SAVE/RESTORE
 SET AXIS/MODULO/DEPTH/CALENDAR/T0/UNITS/STRIDE/OFFSET/REGULAR/OUTTYPE/NAME
 SET MEMORY/MAX/SIZE
 SET ATTRIBUT/TYPE/DATASET/OUTPUT/LIKE/QUIET
 SET NCCACHE/SIZE/NELEMS/PREEMPT
 SET REDIRECT/TEE/JOURNAL/FILE/APPEND/CLOBBER
 SET GIFFILE
sho command set w  ! SET WINDOW
 SET WINDOW/SIZE/NEW/LOCATION/ASPECT/CLEAR/TITLE
sho command set r  ! SET REGION
 SET REGION/I/J/K/L/M/N/X/Y/Z/T/E/F/DX/DY/DZ/DT/DE/DF/DI/DJ/DK/DL/DM/DN
sho command set v  ! SET VIEWPORT
 SET VIEWPORT
sho command set e  ! SET EXPRSION
 SET EXPRSION
sho command set l  ! SET LIST
 SET LIST/PRECISIO/FILE/FORMAT/APPEND/HEADING/NCFORMAT/ENDIAN/DEFLATE/SHUFFLE
      /XCHUNK/YCHUNK/ZCHUNK/TCHUNK/ECHUNK/FCHUNK/OUTTYPE
sho command set d  ! SET DATA
 SET DATA/EZ/VARIABLE/TITLE/FORMAT/GRID/SKIP/COLUMNS/SAVE/RESTORE/ORDER
      /TYPE/SWAP/REGULART/DELIMITE/STRICT/FEATURE/FMASK
sho command set m  ! SET MODE
 SET MODE/LAST
sho command set mov! SET MOVIE
 SET MOVI/FILE/COMPRESS/LASER/START
sho command set va ! SET VARIABLE
 SET VARIABLE/TITLE/UNITS/GRID/BAD/DATASET/NAME/SCALEFAC/OFFSET/OUTTYPE
      /LAYERZ/CURVILIN
sho command set g  ! SET GRID
 SET GRID/SAVE/RESTORE
sho command set a  ! SET AXIS
 SET AXIS/MODULO/DEPTH/CALENDAR/T0/UNITS/STRIDE/OFFSET/REGULAR/OUTTYPE/NAME
sho command set me ! SET MEMORY
 SET MEMORY/MAX/SIZE
sho command set at ! SET ATTRIBUTE
 SET ATTRIBUT/TYPE/DATASET/OUTPUT/LIKE/QUIET
sho command set n  ! SET NCCACHE
 SET NCCACHE/SIZE/NELEMS/PREEMPT
sho command set red! SET REDIRECT
 SET REDIRECT/TEE/JOURNAL/FILE/APPEND/CLOBBER
sho command set gi ! SET GIFFILE
 SET GIFFILE
 
sho command sho
 SHOW/ALL
 SHOW WINDOW/ALL
 SHOW REGION/ALL
 SHOW AXIS/ALL/I/J/K/L/M/N/X/Y/Z/T/E/F/XML/OUTFILE/APPEND/CLOBBER
 SHOW EXPRSION/ALL
 SHOW LIST/ALL
 SHOW DATA/ALL/BRIEF/FULL/VARIABLE/FILES/XML/ATTR/OUTFILE/APPEND/CLOBBER
       /HIDDEN/MEMBERS
 SHOW MODE/ALL
 SHOW MOVIE/ALL
 SHOW VARIABLE/ALL/DATASET/USER/XML/OUTFILE/APPEND/CLOBBER/TREE/LAYERZ/CURVILIN
 SHOW COMMANDS/ALL/BRIEF
 SHOW MEMORY/ALL/DIAGNOST/TEMPORY/PERMANT/FREE
 SHOW GRID/ALL/I/J/K/L/M/N/X/Y/Z/T/E/F/DYNAMIC/XML/OUTFILE/APPEND/CLOBBER
 SHOW VIEWPORT/ALL
 SHOW TRANFORM/ALL
 SHOW ALIAS/ALL
 SHOW SYMBOL/ALL
 SHOW ATTRIBUT/ALL/DATASET/OUTPUT
 SHOW NCCACHE
 SHOW GIFFILE
 SHOW FUNCTION/ALL/BRIEF/EXTERNAL/INTERNAL/DETAILS
 SHOW QUERIES/ALL
sho command sho w  ! SHOW WINDOW
 SHOW WINDOW/ALL
sho command sho r  ! SHOW REGION
 SHOW REGION/ALL
sho command sho a  ! SHOW AXIS
 SHOW AXIS/ALL/I/J/K/L/M/N/X/Y/Z/T/E/F/XML/OUTFILE/APPEND/CLOBBER
sho command sho e  ! SHOW EXPRSTION
 SHOW EXPRSION/ALL
sho command sho l  ! SHOW LIST
 SHOW LIST/ALL
sho command sho d  ! SHOW DATA
 SHOW DATA/ALL/BRIEF/FULL/VARIABLE/FILES/XML/ATTR/OUTFILE/APPEND/CLOBBER
       /HIDDEN/MEMBERS
sho command sho m  ! SHOW MODE
 SHOW MODE/ALL
sho command sho mov! SHOW MOVIE
 SHOW MOVIE/ALL
sho command sho v  ! SHOW VARIABLE
 SHOW VARIABLE/ALL/DATASET/USER/XML/OUTFILE/APPEND/CLOBBER/TREE/LAYERZ/CURVILIN
sho command sho c  ! SHOW COMMANDS
 SHOW COMMANDS/ALL/BRIEF
sho command sho me ! SHOW MEMORY
 SHOW MEMORY/ALL/DIAGNOST/TEMPORY/PERMANT/FREE
sho command sho g  ! SHOW GRID
 SHOW GRID/ALL/I/J/K/L/M/N/X/Y/Z/T/E/F/DYNAMIC/XML/OUTFILE/APPEND/CLOBBER
sho command sho vi ! SHOW VIEWPORT
 SHOW VIEWPORT/ALL
sho command sho t  ! SHOW TRANSFORM
 SHOW TRANFORM/ALL
sho command sho al ! SHOW ALIAS
 SHOW ALIAS/ALL
sho command sho s  ! SHOW SYMBOL
 SHOW SYMBOL/ALL
sho command sho at ! SHOW ATTRIBUTE
 SHOW ATTRIBUT/ALL/DATASET/OUTPUT
sho command sho n  ! SHOW NCCACHE
 SHOW NCCACHE
sho command sho gi ! SHOW GIFFILE
 SHOW GIFFILE
sho command sho f  ! SHOW FUNCTION
 SHOW FUNCTION/ALL/BRIEF/EXTERNAL/INTERNAL/DETAILS
sho command sho q  ! SHOW QUERIES
 SHOW QUERIES/ALL
 
sho command can
 CANCEL
 CANCEL WIND/ALL
 CANCEL REGION/ALL/I/J/K/L/M/N/X/Y/Z/T/E/F
 CANCEL MEMORY/ALL/TEMPORY/PERMANT
 CANCEL EXPRSION/ALL
 CANCEL LIST/ALL/PRECISIO/FILE/FORMAT/HEADING/APPEND/OUTTYPE
 CANCEL DATA/ALL/NOERROR/FMASK
 CANCEL MODE
 CANCEL MOVIE/ALL
 CANCEL VIEWPORT
 CANCEL VARIABLE/ALL/DATASET/LAYERZ/CURVILIN/NOERROR
 CANCEL AXIS/MODULO/ALL/DEPTH/STRIDE
 CANCEL GRID
 CANCEL ATTRIBUT/OUTPUT/DATASET
 CANCEL REDIRECT
 CANCEL ALIAS/ALL
 CANCEL SYMBOL/ALL
 CANCEL NCCACHE
sho command can w  ! CANCEL WINDOW
 CANCEL WIND/ALL
sho command can r  ! CANCEL REGION
 CANCEL REGION/ALL/I/J/K/L/M/N/X/Y/Z/T/E/F
sho command can m  ! CANCEL MEMORY
 CANCEL MEMORY/ALL/TEMPORY/PERMANT
sho command can e  ! CANCEL EXPRSION
 CANCEL EXPRSION/ALL
sho command can l  ! CANCEL LIST
 CANCEL LIST/ALL/PRECISIO/FILE/FORMAT/HEADING/APPEND/OUTTYPE
sho command can d  ! CANCEL DATA
 CANCEL DATA/ALL/NOERROR/FMASK
sho command can mo ! CANCEL MODE
 CANCEL MODE
sho command can mov! CANCEL MOVIE
 CANCEL MOVIE/ALL
sho command can v  ! CANCEL VIEWPORT
 CANCEL VIEWPORT
sho command can va ! CANCEL VARIABLE
 CANCEL VARIABLE/ALL/DATASET/LAYERZ/CURVILIN/NOERROR
sho command can a  ! CANCEL AXIS
 CANCEL AXIS/MODULO/ALL/DEPTH/STRIDE
sho command can g  ! CANCEL GRID
 CANCEL GRID
sho command can at ! CANCEL ATTRIBUTE
 CANCEL ATTRIBUT/OUTPUT/DATASET
sho command can red! CANCEL REDIRECT
 CANCEL REDIRECT
sho command can al ! CANCEL ALIAS
 CANCEL ALIAS/ALL
sho command can s  ! CANCEL SYMBOL
 CANCEL SYMBOL/ALL
sho command can n  ! CANCEL NCCACHE
 CANCEL NCCACHE
 
sho command def
 DEFINE
 DEFINE REGION/I/J/K/L/M/N/X/Y/Z/T/E/F/DEFAULT/DX/DY/DZ/DT/DE/DF/DI/DJ/DK
         /DL/DM/DN
 DEFINE GRID/X/Y/Z/T/E/F/FILE/LIKE
 DEFINE VARIABLE/TITLE/UNITS/QUIET/DATASET/BAD/REMOTE/LIKE
 DEFINE AXIS/X/Y/Z/T/E/F/FILE/UNITS/T0/NAME/FROMDATA/DEPTH/MODULO/NPOINTS
         /EDGES/CALENDAR/BOUNDS/QUIET/MONTHLY/LIKE
 DEFINE VIEWPORT/TEXT/XLIMITS/YLIMITS/SIZE/ORIGIN/CLIP/AXES
 DEFINE ALIAS
 DEFINE SYMBOL
 DEFINE ATTRIBUT/DATASET/TYPE/OUTPUT/QUIET
 DEFINE PYFUNC/NAME
 DEFINE DATA/AGGREGAT/T/E/F/TITLE/QUIET/HIDE/U/TAXIS/FAXIS/TOVERLAP
 DEFINE ANNOTATI/USER/NORM/NOUSER/XPOS/YPOS/HALIGN/VALIGN/ANGLE/SIZE/NLAB
sho command def r  ! DEFINE REGION
 DEFINE REGION/I/J/K/L/M/N/X/Y/Z/T/E/F/DEFAULT/DX/DY/DZ/DT/DE/DF/DI/DJ/DK
         /DL/DM/DN
sho command def g  ! DEFINE GRID
 DEFINE GRID/X/Y/Z/T/E/F/FILE/LIKE
sho command def v  ! DEFINE VARIABLE
 DEFINE VARIABLE/TITLE/UNITS/QUIET/DATASET/BAD/REMOTE/LIKE
sho command def a  ! DEFINE AXIS
 DEFINE AXIS/X/Y/Z/T/E/F/FILE/UNITS/T0/NAME/FROMDATA/DEPTH/MODULO/NPOINTS
         /EDGES/CALENDAR/BOUNDS/QUIET/MONTHLY/LIKE
sho command def vi ! DEFINE VIEWPORT
 DEFINE VIEWPORT/TEXT/XLIMITS/YLIMITS/SIZE/ORIGIN/CLIP/AXES
sho command def al ! DEFINE ALIAS
 DEFINE ALIAS
sho command def s  ! DEFINE SYMBOL
 DEFINE SYMBOL
sho command def at ! DEFINE ATTRIBUTE
 DEFINE ATTRIBUT/DATASET/TYPE/OUTPUT/QUIET
sho command def P  ! DEFINE PYFUNC
 DEFINE PYFUNC/NAME
sho command def d  ! DEFINE DATA
 DEFINE DATA/AGGREGAT/T/E/F/TITLE/QUIET/HIDE/U/TAXIS/FAXIS/TOVERLAP
sho command def an ! DEFINE ANNOTATE
 DEFINE ANNOTATI/USER/NORM/NOUSER/XPOS/YPOS/HALIGN/VALIGN/ANGLE/SIZE/NLAB
 
 
! Also new SHOW COMMAND/BRIEF
! Single commands, abbreviated.
 
sho command/brief a
 ANNOTATE
sho command/brief c
 CANCEL
 CANCEL WIND
 CANCEL REGION
 CANCEL MEMORY
 CANCEL EXPRSION
 CANCEL LIST
 CANCEL DATA
 CANCEL MODE
 CANCEL MOVIE
 CANCEL VIEWPORT
 CANCEL VARIABLE
 CANCEL AXIS
 CANCEL GRID
 CANCEL ATTRIBUT
 CANCEL REDIRECT
 CANCEL ALIAS
 CANCEL SYMBOL
 CANCEL NCCACHE
sho command/brief ca
 CANCEL
 CANCEL WIND
 CANCEL REGION
 CANCEL MEMORY
 CANCEL EXPRSION
 CANCEL LIST
 CANCEL DATA
 CANCEL MODE
 CANCEL MOVIE
 CANCEL VIEWPORT
 CANCEL VARIABLE
 CANCEL AXIS
 CANCEL GRID
 CANCEL ATTRIBUT
 CANCEL REDIRECT
 CANCEL ALIAS
 CANCEL SYMBOL
 CANCEL NCCACHE
sho command/brief co
 CONTOUR
sho command/brief d
 DEFINE
 DEFINE REGION
 DEFINE GRID
 DEFINE VARIABLE
 DEFINE AXIS
 DEFINE VIEWPORT
 DEFINE ALIAS
 DEFINE SYMBOL
 DEFINE ATTRIBUT
 DEFINE PYFUNC
 DEFINE DATA
 DEFINE ANNOTATI
sho command/brief e
 EXIT
sho command/brief el
 ELSE
sho command/brief en
 ENDIF
sho command/brief ex
 EXIT
sho command/brief f
 FRAME
sho command/brief h
 HELP
sho command/brief h
 HELP
sho command/brief i
 IF
sho command/brief l
 LIST
sho command/brief li
 LIST
sho command/brief lo
 LOAD
sho command/brief m
 MESSAGE
sho command/brief p
 PLOT
sho command/brief pl
 PLOT
sho command/brief po
 POLYGON
sho command/brief pp
 PPLUS
sho command/brief q
 QUERY
sho command/brief r
 REPEAT
sho command/brief s
 SET
 SET WINDOW
 SET REGION
 SET VIEWPORT
 SET EXPRSION
 SET LIST
 SET DATA
 SET MODE
 SET MOVI
 SET VARIABLE
 SET GRID
 SET AXIS
 SET MEMORY
 SET ATTRIBUT
 SET NCCACHE
 SET REDIRECT
 SET GIFFILE
sho command/brief se
 SET
 SET WINDOW
 SET REGION
 SET VIEWPORT
 SET EXPRSION
 SET LIST
 SET DATA
 SET MODE
 SET MOVI
 SET VARIABLE
 SET GRID
 SET AXIS
 SET MEMORY
 SET ATTRIBUT
 SET NCCACHE
 SET REDIRECT
 SET GIFFILE
sho command/brief sh
 SHOW
 SHOW WINDOW
 SHOW REGION
 SHOW AXIS
 SHOW EXPRSION
 SHOW LIST
 SHOW DATA
 SHOW MODE
 SHOW MOVIE
 SHOW VARIABLE
 SHOW COMMANDS
 SHOW MEMORY
 SHOW GRID
 SHOW VIEWPORT
 SHOW TRANFORM
 SHOW ALIAS
 SHOW SYMBOL
 SHOW ATTRIBUT
 SHOW NCCACHE
 SHOW GIFFILE
 SHOW FUNCTION
 SHOW QUERIES
sho command/brief sp
 SPAWN
sho command/brief st
 STAT
sho command/brief u
 Not a recognized command: u
 
 Use SHOW ALIAS to see alternative command names
sho command/brief v
 VECTOR
 
 
! All the commands, no subcommands, no qualifiers
SHOW COMMAND/BRIEF
 Commands in Program FERRET  version7.6:
 SET
 SHOW
 CANCEL
 CONTOUR
 LIST
 PLOT
 GO
 HELP
 LOAD
 DEFINE
 EXIT
 MESSAGE
 VECTOR
 PPLUS
 FRAME
 REPEAT
 STAT
 SHADE
 SPAWN
 WIRE
 QUERY
 IF
 ELSE
 ELIF
 ENDIF
 POLYGON
 ANNOTATE
 
 Use SHOW ALIAS to see alternative command names
 
! With a command, just show subcommands, no qualifiers
SHOW COMMAND/BRIEF sho
 SHOW
 SHOW WINDOW
 SHOW REGION
 SHOW AXIS
 SHOW EXPRSION
 SHOW LIST
 SHOW DATA
 SHOW MODE
 SHOW MOVIE
 SHOW VARIABLE
 SHOW COMMANDS
 SHOW MEMORY
 SHOW GRID
 SHOW VIEWPORT
 SHOW TRANFORM
 SHOW ALIAS
 SHOW SYMBOL
 SHOW ATTRIBUT
 SHOW NCCACHE
 SHOW GIFFILE
 SHOW FUNCTION
 SHOW QUERIES
 
! With a command and subcommand, no qualifiers
SHOW COMMAND/BRIEF sho da
 SHOW DATA
 
*** Running ferret script: bn_plot_decimate.jnl
! BN_PLOT_SKIP
 
! *acm* 3/2016
 
!  yes? GO bn_plot_skip [debug]
 
! based on PLOT/ALONG tests.
! PLOT/SKIP=n for /SYMBOL plots makes only every SKIP symbol.
 
DEFINE SYMBOL debugme = ($1"SAY continuing|debug>PAUSE")
 !-> DEFINE SYMBOL debugme = SAY continuing
 
DEFINE SYMBOL deci = 2
 
! basic
LET blocky10 = x[i=1:10]+y[j=1:10]
PLOT/SYM/LINE/SKIP=($deci)/ALONG=x blocky10
 !-> PLOT/SYM/LINE/SKIP=2/ALONG=x blocky10
($debugme)
 !-> MESSAGE/CONTINUE continuing
continuing
 
! degenerate case -- only a single line
LET blocky1 = x[i=1:10]+y[j=1:1]
PLOT/SYM/LINE/SKIP=($deci)/ALONG=x blocky1
 !-> PLOT/SYM/LINE/SKIP=2/ALONG=x blocky1
($debugme)
 !-> MESSAGE/CONTINUE continuing
continuing
 
! number of lines exceeds key limit  (40 at time of this writing)
! automatic decimation to keep within key limit
LET blocky200 = x[i=1:10]+y[j=1:200]
PLOT/SYM/LINE/SKIP=($deci)/ALONG=x blocky200
 !-> PLOT/SYM/LINE/SKIP=2/ALONG=x blocky200
($debugme)
 !-> MESSAGE/CONTINUE continuing
continuing
 
! /nokey  - no longer limited to the number of keys that can be drawn
LET blocky50 = x[i=1:10]+y[j=1:50]
PLOT/SYM/LINE/SKIP=($deci)/ALONG=x/nokey blocky50
 !-> PLOT/SYM/LINE/SKIP=2/ALONG=x/nokey blocky50
($debugme)
 !-> MESSAGE/CONTINUE continuing
continuing
 
! /nokey -- number of lines exceeds line limit  (200 at time of this writing)
! automatic decimation to keep within line limit
LET blocky201 = x[i=1:10]+y[j=1:201]
PLOT/SYM/LINE/SKIP=($deci)/ALONG=x/nokey blocky201
 !-> PLOT/SYM/LINE/SKIP=2/ALONG=x/nokey blocky201
($debugme)
 !-> MESSAGE/CONTINUE continuing
continuing
 
! multi-dimensional
LET blockxyz        = 0.1*T[l=1:10]+x[i=1:2]+10*y[j=1:5]+100*z[k=1:30]
LET blockxyz_little = 0.1*T[l=1:10]+x[i=1:2]+10*y[j=1:3] +100*z[k=1:4]
PLOT/SYM/LINE/SKIP=($deci)/ALONG=t blockxyz_little
 !-> PLOT/SYM/LINE/SKIP=2/ALONG=t blockxyz_little
($debugme)
 !-> MESSAGE/CONTINUE continuing
continuing
PLOT/SYM/LINE/SKIP=($deci)/ALONG=t blockxyz         ! decimate to key  limit
 !-> PLOT/SYM/LINE/SKIP=2/ALONG=t blockxyz
($debugme)
 !-> MESSAGE/CONTINUE continuing
continuing
 
define symbol deci = 5
PLOT/SYM/LINE/SKIP=($deci)/ALONG=t/nokey blockxyz   ! decimate to line limit
 !-> PLOT/SYM/LINE/SKIP=5/ALONG=t/nokey blockxyz
($debugme)
 !-> MESSAGE/CONTINUE continuing
continuing
 
 
! ensemble application
! Here the symbols appear on lines automatically for distinguishing
! large number of lines. /SKIP works without explicitly saying /SYM
LET block = x[i=1:2]+10*y[j=1:3]+100*z[k=1:4]
LET sin_block = SIN(T[l=1:100]/10)*block
LET ens_sin_block = sin_block*( (20+_E[m=1:20])/20 )
PLOT/SKIP=($deci)/ALONG=t ens_sin_block[i=1,j=2,k=3]
 !-> PLOT/SKIP=5/ALONG=t ens_sin_block[i=1,j=2,k=3]
*** Running ferret script: bn_auto_tprec_noremote.jnl
! bn_auto_tprec_noremote.jnl
! See ticket 2405
! Time labels on plots always just get the precision from MODE CALENDAR
! Instead, use the same logic as is used for text labels, automatically adjust.
! (later make this the default setting??)
! acm* 3/17 check the URL with TEST_OPENDAP befor trying to open it.
 
set mode calendar:auto
show mode calendar
      MODE            STATE        ARGUMENT
      CALENDAR         SET         auto
 
use levitus_climatology
let ttim = temp + t[gt=tax]
 
!  Varies in seconds
define axis/t/units="seconds"/t0="1-jan-2001" tax = {1,12,13,14,16,17,18,19,24}
 
list/k=1/x=60/y=-40 ttim
             VARIABLE : TEMP + T[GT=TAX]
             FILENAME : levitus_climatology.cdf
             SUBSET   : 9 points (TIME)
             LONGITUDE: 59.5E
             LATITUDE : 40.5S
             DEPTH (m): 0
                             59.5E 
                             40
 01-JAN-2001 00:00:01 / 1:  15.13
 01-JAN-2001 00:00:12 / 2:  26.13
 01-JAN-2001 00:00:13 / 3:  27.13
 01-JAN-2001 00:00:14 / 4:  28.13
 01-JAN-2001 00:00:16 / 5:  30.13
 01-JAN-2001 00:00:17 / 6:  31.13
 01-JAN-2001 00:00:18 / 7:  32.13
 01-JAN-2001 00:00:19 / 8:  33.13
 01-JAN-2001 00:00:24 / 9:  38.13
shade/title="seconds"/l=9/k=1/x=60:70/y=-40:-30 ttim; sh sym  lab($labnum_t)
 !-> sh sym  lab2
LAB2 = "TIME : 01-JAN-2001 00:00:24"
 
!  Varies in minutes, fractions of minutes
define axis/t/units="minutes"/t0="1-jan-2001" tax = {1,1.1,12,13,14,16,17,18.5,19,24}
list/k=1/x=60/y=-40 ttim
             VARIABLE : TEMP + T[GT=TAX]
             FILENAME : levitus_climatology.cdf
             SUBSET   : 10 points (TIME)
             LONGITUDE: 59.5E
             LATITUDE : 40.5S
             DEPTH (m): 0
                              59.5E 
                              40
 01-JAN-2001 00:01:00 /  1:  15.13
 01-JAN-2001 00:01:06 /  2:  15.23
 01-JAN-2001 00:12:00 /  3:  26.13
 01-JAN-2001 00:13:00 /  4:  27.13
 01-JAN-2001 00:14:00 /  5:  28.13
 01-JAN-2001 00:16:00 /  6:  30.13
 01-JAN-2001 00:17:00 /  7:  31.13
 01-JAN-2001 00:18:30 /  8:  32.63
 01-JAN-2001 00:19:00 /  9:  33.13
 01-JAN-2001 00:24:00 / 10:  38.13
shade/title="minutes/fractions of minutes"/l=9/k=1/x=60:70/y=-40:-30 ttim; sh sym  lab($labnum_t)
 !-> sh sym  lab2
LAB2 = "TIME : 01-JAN-2001 00:19:00"
 
! varies in hours, fractions of hours
define axis/t/units="hour"/t0="1-jan-2001" tax = {1,1.1,12.1,12.2,14,16,17,18.5,19,24}
list/k=1/x=60/y=-40 ttim
             VARIABLE : TEMP + T[GT=TAX]
             FILENAME : levitus_climatology.cdf
             SUBSET   : 10 points (TIME)
             LONGITUDE: 59.5E
             LATITUDE : 40.5S
             DEPTH (m): 0
                              59.5E 
                              40
 01-JAN-2001 01:00:00 /  1:  15.13
 01-JAN-2001 01:06:00 /  2:  15.23
 01-JAN-2001 12:06:00 /  3:  26.23
 01-JAN-2001 12:12:00 /  4:  26.33
 01-JAN-2001 14:00:00 /  5:  28.13
 01-JAN-2001 16:00:00 /  6:  30.13
 01-JAN-2001 17:00:00 /  7:  31.13
 01-JAN-2001 18:30:00 /  8:  32.63
 01-JAN-2001 19:00:00 /  9:  33.13
 02-JAN-2001 00:00:00 / 10:  38.13
shade/title="hours/fractions of hours"/l=3/k=1/x=60:70/y=-40:-30 ttim; sh sym  lab($labnum_t)
 !-> sh sym  lab2
LAB2 = "TIME : 01-JAN-2001 12:06"
 
! 6-hour even spacing
define axis/t=1-jan-2001:8-jan-2001:6/units="hour"/t0="1-jan-2001" tax
list/k=1/x=60/y=-40/L=1:6 ttim
             VARIABLE : TEMP + T[GT=TAX]
             FILENAME : levitus_climatology.cdf
             SUBSET   : 6 points (TIME)
             LONGITUDE: 59.5E
             LATITUDE : 40.5S
             DEPTH (m): 0
                          59.5E 
                          40
 01-JAN-2001 00:00 / 1:  14.13
 01-JAN-2001 06:00 / 2:  20.13
 01-JAN-2001 12:00 / 3:  26.13
 01-JAN-2001 18:00 / 4:  32.13
 02-JAN-2001 00:00 / 5:  38.13
 02-JAN-2001 06:00 / 6:  44.13
shade/title="hours "/l=3/k=1/x=60:70/y=-40:-30 ttim; sh sym  lab($labnum_t)
 !-> sh sym  lab2
LAB2 = "TIME : 01-JAN-2001 12:00"
 
! monthly climatology
use TAO_SST_clim
list/x=180/y=0 sst_clim
             VARIABLE : Climatological TAO SST, 1992-1997 (Degrees C)
             FILENAME : TAO_SST_clim.cdf
             SUBSET   : 12 points (TIME)
             LONGITUDE: 180E
             LATITUDE : 0
                     180E  
                      5
 16-JAN      /  1:  28.47
 15-FEB      /  2:  28.02
 17-MAR      /  3:  28.06
 16-APR      /  4:  28.63
 16-MAY      /  5:  28.79
 16-JUN      /  6:  28.89
 16-JUL      /  7:  29.11
 16-AUG      /  8:  29.24
 15-SEP      /  9:  29.15
 16-OCT      / 10:  29.06
 15-NOV      / 11:  28.97
 16-DEC      / 12:  28.88
shade/title="monthly climatology"/k=1/l=5 sst_clim; sh sym  lab($labnum_t)
 !-> sh sym  lab1
LAB1 = "TIME : 16-MAY"
 
! truemonth
use truemonth
list/x=180/y=0/l=20:25 var
             VARIABLE : COS(T[GT=TRUEMONTH]/100)
             FILENAME : truemonth.nc
             SUBSET   : 6 points (TIME)
 16-AUG-1951 / 20:  0.9988
 16-SEP-1951 / 21:  0.9378
 16-OCT-1951 / 22:  0.7903
 16-NOV-1951 / 23:  0.5699
 16-DEC-1951 / 24:  0.2968
 16-JAN-1952 / 25: -0.0086
 
let ttim = temp[d=levitus_climatology] + var
shade/title="true-month axis"/L=32/x=60:70/y=-40:-30 ttim; sh sym  lab($labnum_t)
 !-> sh sym  lab2
LAB2 = "TIME : 16-AUG-1952"
 
set mode/last calendar
 
! Is the default precision of minutes restored?
use truemonth
let ttim = temp[d=levitus_climatology] + var
shade/title="true-month axis"/L=32/x=60:70/y=-40:-30 ttim; sh sym  lab($labnum_t)
 !-> sh sym  lab2
LAB2 = "TIME : 16-AUG-1952 12:00"
*** Running ferret script: bn_coordvars_atts.jnl
! bn_coordvars_atts.jnl
! 5/2016 *acm*  see ticket 2413
! Additional attribute keywords for returning  coordinate variable
! names and number of coordinate vars, to distinguish coordinate
! info from dimension info.
 
! File has dimensions which are not coordinate variables, for
! the dimensions of the 2D coordinate variables.
use dims_not_coord.nc
list/nohead ..ndims
          3.000
list/nohead ..dimnames
 1   / 1:"ETA"     
 2   / 2:"TAU1"    
 3   / 3:"ZT_OCEAN"
list/nohead ..ncoordvars
          1.000
list/nohead ..coordnames
        "ZT_OCEAN"
let cname = ..coordnames
sh axis `cname[i=1]`
 !-> sh axis ZT_OCEAN
 name       axis              # pts   start                end
 ZT_OCEAN  DEPTH (m)            1 r-  15                   15
   Axis span (to cell edges) = 1
 
! The depth axis has coordinate bounds; the length-2 bnds
! dimension is not a coordinate variable
use levitus_3d_subset.nc
list/nohead ..ndims
          4.000
list/nohead ..dimnames
 1   / 1:"XAXLEVITR101_102"
 2   / 2:"YAXLEVITR41_42"  
 3   / 3:"ZAXLEVITR"       
 4   / 4:"bnds"            
list/nohead ..ncoordvars
          3.000
list/nohead ..coordnames
 1   / 1:"XAXLEVITR101_102"
 2   / 2:"YAXLEVITR41_42"  
 3   / 3:"ZAXLEVITR"       
 
! String variables in netcdf files have string-length
! dimensions which are not coordinate variables.
use numstring.nc
list/nohead ..ndims
          4.000
list/nohead ..dimnames
 1   / 1:"XAX"      
 2   / 2:"ZAX"      
 3   / 3:"XAX1_10"  
 4   / 4:"STRING1_7"
list/nohead ..ncoordvars
          3.000
list/nohead ..coordnames
 1   / 1:"XAX"    
 2   / 2:"ZAX"    
 3   / 3:"XAX1_10"
*** Running ferret script: bn710_bug_fixes_noremote.jnl
! bn710_bug_fixes_noremote.jnl
! test various fixes that went into version 7.1
! 6/16 *acm*
!
 
! Bug 2445 missing or repeated coords when axis marked as regular
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_reg_axis_check
! err700_reg_axis_check.jnl
! Ticket 2445: regular axis, test for valid line_delta
! ACM 7/6/2016
 
use bug2445.nc
show data
     currently SET data sets:
    1> ./data/bug2445.nc  (default)
 name     title                             I         J         K         L
 XAX                                       1:5       ...       ...       ...
       (invalid coordinate axis)
 YAX                                       ...       1:3       ...       ...
       (invalid coordinate axis)
 XX       X[GX=xax]                        1:5       ...       ...       ...
 YY       Y var                            ...       1:3       ...       ...
 
 
! Repeated coordinates in first 2 coordinates of x axis.
list xx
             VARIABLE : X[GX=xax]
             FILENAME : bug2445.nc
             SUBSET   : 5 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
list xax
             VARIABLE : XAX
                        invalid coordinate axis
             FILENAME : bug2445.nc
             SUBSET   : 5 points (X)
 1   / 1:  1.000
 2   / 2:  1.000
 3   / 3:  1.000
 4   / 4:  1.000
 5   / 5:  1.000
 
! Missing coordinate in first 2 coordinates of y axis.
! Coordinate data cannot be missing.
list yy
             VARIABLE : Y var
             FILENAME : bug2445.nc
             SUBSET   : 3 points (Y)
 1   / 1:  10.00
 2   / 2:  20.00
 3   / 3:  30.00
list yax
             VARIABLE : YAX
                        invalid coordinate axis
             FILENAME : bug2445.nc
             SUBSET   : 3 points (Y)
 1   / 1:  1.000E+00
 2   / 2:  9.969E+36
 3   / 3:  1.000E+00
 
! Bug 2446 include script name on warning about unclosed IF block
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_unclosed_if
! err71_unclosed_if.jnl
! Ticket 2446
! Add the script name when reporting an unclosed IF block
! ACM 7/2016
 
go unclosed_if.sub
 
let a = 1
if `a eq 1` THEN
 !-> if 1 THEN
SAY YES
YES
let b = 1
 
 
! Bug 2446 inheriting attributes
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_inherit_all
! err700_inherit_all.jnl
! Ticket 2447: If all attributes are inherited, missing-value flags
! are wrong.
 
! This non-standardfile has no missing-value attributes.
use no_miss_att.nc
sh att a
     attributes for dataset: ./data/no_miss_att.nc
 A.min_value = 1
 A.max_value = 3
 A.long_name = {1,2,3} 
 
! Define a variable, using some missing-value flag
let/bad=9999 b = if a ne 2 then a else 9999
list b
             VARIABLE : IF A NE 2 THEN A ELSE 9999
             FILENAME : no_miss_att.nc
             SUBSET   : 3 points (X)
 1   / 1:  1.000
 2   / 2:   ....
 3   / 3:  3.000
 
! Now inherit the attributes from variable a.
set att/like=a b
show att b
     attributes for user-defined variables
 b.missing_value = 9999
 b.min_value = 1
 b.max_value = 3
 b.long_name = {1,2,3} 
 
! The missing-value flag is not written, but the value 9999 is
save/file=a.nc/clobber b
 
can var/all
use a
 
! Element 2 should be missing. Previously lists out the 9999.
list b
             VARIABLE : {1,2,3}
             FILENAME : a.nc
             SUBSET   : 3 points (X)
 1   / 1:  1.000
 2   / 2:   ....
 3   / 3:  3.000
 
 
! Bug 2458  Subspan modulo grids and SAMPLEXY
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_samplexy_subspan_modulo
! err700_samplexy_subspan_modulo.jnl
! 7/29/2016 ACM
! Ticket 2458. The result of SAMPLEXY wrong when it needs
! to do a modulo operation on a subspan modulo axis
! 5/2020 ACM Cleanup: replace SAMPLEXY_CLOSEST with SAMPLEXY_NRST
 
! Define a grid with a subspan longitude axis
 
define axis/x=-100:-60:5/units=degrees_east xaxis
define axis/y=18:30:2/units=degrees_north yaxis
let var = x[gx=xaxis]+100 + 0.3*y[gy=yaxis]
 
save/clobber/file=a.nc var
can var/all; use a
 
list/y=22 var
             VARIABLE : X[GX=XAXIS]+100 + 0.3*Y[GY=YAXIS]
             FILENAME : a.nc
             SUBSET   : 9 points (LONGITUDE)
             LATITUDE : 22N
                22N   
                 3
 100W    / 1:   6.60
 95W     / 2:  11.60
 90W     / 3:  16.60
 85W     / 4:  21.60
 80W     / 5:  26.60
 75W     / 6:  31.60
 70W     / 7:  36.60
 65W     / 8:  41.60
 60W     / 9:  46.60
list samplexy(var, {-80,80}, {22,22})
             VARIABLE : SAMPLEXY(VAR, {-80,80}, {22,22})
             FILENAME : a.nc
             SUBSET   : 2 points (X)
 1   / 1:  26.60
 2   / 2:   ....
 
list samplexy(var, -80, 22)       ! this is ok, in the native range of the axis
             VARIABLE : SAMPLEXY(VAR, -80, 22)
             FILENAME : a.nc
             X        : 1
          26.60
list samplexy(var, `360-80`, 22)  ! this was wrong
 !-> list samplexy(var, 280, 22)
             VARIABLE : SAMPLEXY(VAR, 280, 22)
             FILENAME : a.nc
             X        : 1
          26.60
list samplexy_nrst(var, `360-80`, 22)  ! is ok
 !-> list samplexy_nrst(var, 280, 22)
             VARIABLE : SAMPLEXY_NRST(VAR, 280, 22)
             FILENAME : a.nc
             X        : 1
          26.60
 
! Looking for a point that is not, even in a modulo sense, in the subpsan axis
 
list samplexy(var, {-80,80}, {22,22})
             VARIABLE : SAMPLEXY(VAR, {-80,80}, {22,22})
             FILENAME : a.nc
             SUBSET   : 2 points (X)
 1   / 1:  26.60
 2   / 2:   ....
list samplexy(var, {`360-80`,80}, {22,22})
 !-> list samplexy(var, {280,80}, {22,22})
             VARIABLE : SAMPLEXY(VAR, {280,80}, {22,22})
             FILENAME : a.nc
             SUBSET   : 2 points (X)
 1   / 1:  26.60
 2   / 2:   ....
list samplexy_nrst(var, {`360-80`,80}, {22,22})
 !-> list samplexy_nrst(var, {280,80}, {22,22})
             VARIABLE : SAMPLEXY_NRST(VAR, {280,80}, {22,22})
             FILENAME : a.nc
             SUBSET   : 2 points (X)
 1   / 1:  26.60
 2   / 2:   ....
 
! interpolation between grid points
 
cancel mode interpolate
list/y=21.2/x=277.7 var
             VARIABLE : X[GX=XAXIS]+100 + 0.3*Y[GY=YAXIS]
             FILENAME : a.nc
             LONGITUDE: 80W
             LATITUDE : 22N
          26.60
set mode interpolate; list/y=21.2/x=277.7 var; cancel mode interpolate
             VARIABLE : X[GX=XAXIS]+100 + 0.3*Y[GY=YAXIS]
             FILENAME : a.nc
             LONGITUDE: 82.3W (interpolated)
             LATITUDE : 21.2N (interpolated)
          24.06
 
! These should match the MODE INTERPOLATE result (the second was wrong).
 
list samplexy(var, {-82.3,82.3}, {21.2,21.2})
             VARIABLE : SAMPLEXY(VAR, {-82.3,82.3}, {21.2,21.2})
             FILENAME : a.nc
             SUBSET   : 2 points (X)
 1   / 1:  24.06
 2   / 2:   ....
list samplexy(var, {`360-82.3`,82.3}, {21.2,21.2})
 !-> list samplexy(var, {277.7,82.3}, {21.2,21.2})
             VARIABLE : SAMPLEXY(VAR, {277.7,82.3}, {21.2,21.2})
             FILENAME : a.nc
             SUBSET   : 2 points (X)
 1   / 1:  24.06
 2   / 2:   ....
 
! this should match the non-MODE INTERPOLATE result
list samplexy_nrst(var, {`360-82.3`,82.3}, {21.2,21.2})
 !-> list samplexy_nrst(var, {277.7,82.3}, {21.2,21.2})
             VARIABLE : SAMPLEXY_NRST(VAR, {277.7,82.3}, {21.2,21.2})
             FILENAME : a.nc
             SUBSET   : 2 points (X)
 1   / 1:  26.60
 2   / 2:   ....
 
can dat/all
 
! Test samplexyt functions
 
define axis/t=1:5:1 tax
let vart = x[gx=xaxis]+100 + 0.3*y[gy=yaxis] + 0*t[gt=tax]
save/clobber/file=a.nc vart
can var/all; use a
 
list vart[x=-80,y=21,t=2]
             VARIABLE : X[GX=XAXIS]+100 + 0.3*Y[GY=YAXIS] + 0*T[GT=TAX]
             FILENAME : a.nc
             LONGITUDE: 80W(-80)
             LATITUDE : 20N
             T        : 2
          26.00
list samplexyt(vart, {-82.3,82.3}, {21.2,21.2}, {2,2})
             VARIABLE : SAMPLEXYT(VART, {-82.3,82.3}, {21.2,21.2}, {2,2})
             FILENAME : a.nc
             SUBSET   : 2 points (X)
 1   / 1:  24.06
 2   / 2:   ....
list samplexyt(vart, {`360-82.3`,82.3}, {21.2,21.2}, {2,2})
 !-> list samplexyt(vart, {277.7,82.3}, {21.2,21.2}, {2,2})
             VARIABLE : SAMPLEXYT(VART, {277.7,82.3}, {21.2,21.2}, {2,2})
             FILENAME : a.nc
             SUBSET   : 2 points (X)
 1   / 1:  24.06
 2   / 2:   ....
list samplexyt_nrst(vart, {`360-82.3`,82.3}, {21.2,21.2}, {2,2})
 !-> list samplexyt_nrst(vart, {277.7,82.3}, {21.2,21.2}, {2,2})
             VARIABLE : SAMPLEXYT_NRST(VART, {277.7,82.3}, {21.2,21.2}, {2,2})
             FILENAME : a.nc
             SUBSET   : 2 points (X)
 1   / 1:  26.60
 2   / 2:   ....
 
! Full-span modulo grid is ok
 
use coads_climatology
list/l=1/x=-80/y=22 sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             LONGITUDE: 81W(-81)
             LATITUDE : 21N
             TIME     : 16-JAN 06:00
          26.59
list samplexy(sst[l=1], -80, 22)
             VARIABLE : SAMPLEXY(SST[L=1], -80, 22)
             FILENAME : coads_climatology.cdf
             X        : 1
             TIME     : 16-JAN 06:00
          26.04
list samplexy(sst[l=1], `360-80`, 22)
 !-> list samplexy(sst[l=1], 280, 22)
             VARIABLE : SAMPLEXY(SST[L=1], 280, 22)
             FILENAME : coads_climatology.cdf
             X        : 1
             TIME     : 16-JAN 06:00
          26.04
list samplexy_nrst(sst[l=1], `360-80`, 22)
 !-> list samplexy_nrst(sst[l=1], 280, 22)
             VARIABLE : SAMPLEXY_NRST(SST[L=1], 280, 22)
             FILENAME : coads_climatology.cdf
             X        : 1
             TIME     : 16-JAN 06:00
          26.59
 
list samplexyt(sst, -80, 22, `t[gt=sst,l=1]`)
 !-> list samplexyt(sst, -80, 22, 366)
             VARIABLE : SAMPLEXYT(SST, -80, 22, 366)
             FILENAME : coads_climatology.cdf
             X        : 1
          26.04
 
 
! Bug 2463  SHADE/LEVELS and single-color data
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_levels_one_level
! err700_levels_one_level.jnl
! Ticket 2436. If the data has just one value, then shade it with
! the correct color taken from the /LEVELS and /PALETTE settings
 
use coads_climatology
set view ul
shade/l=1/lev=(0,30,5)  sst
 
! These single-valued expressions should get the correct color from the color bar
 
set view ur
shade/l=1/lev=(0,30,5)  if sst gt 25 and sst le 30 then 28
set view ll
shade/l=1/lev=(0,30,5)  if sst gt 15 and sst le 20 then 18
set view lr
shade/l=1/lev=(0,30,5)  if sst gt  0 and sst le  5 then  3
frame /file=levels_one_level.gif
can view
 
! Bug xxxx  Only examine key labels that are actually going to be printed
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_key
use coads_climatology
set window/aspect=0.7 1
shade/levels="(-inf)(0,1.3,0.025)(inf)"/key=continuous/set_up sst[t=@ave]*5e-2
ppl shakey 1, 1, 0.12, 4, -1, 4
ppl shade
frame /file=err700_key.gif
 
! Bug 2468 Symbol AX_HORIZ corrupted by an overlay
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_ax_horiz
! err700_ax_horiz.jnl
! 8/30/2016 *acm* Ticket 2468
! Symbol axis_horiz was corrupted by overlaying a
! set of points using a list in other than the same
! direction as the axis.
 
use coads_climatology
shade/l=1/pal=grayscale/x=100:140/y=-10:30 sst
 
let xpts={111,115,120,129}
let ypts = {-5,10,20,23}
 
 
! this is ok; ax_horiz = X, ax_vert = y
plot/vs/oversym/color=red/thick/siz=0.2 xpts,ypts
sh sym ax*
AX_HORIZ = "X"
AX_VERT = "Y"
 
! Now overlay points whose grid is in the E direction
 
let expts = esequence(xpts)
let eypts = esequence(ypts)
shade/l=1/pal=grayscale/x=100:140/y=-10:30 sst
plot/vs/oversym/color=red/thick/siz=0.2 expts,eypts
 
! this was incorrect, ax_horiz had changed to E
sh sym ax*
AX_HORIZ = "X"
AX_VERT = "Y"
 
! Bug 2470 Symbol LEV_DEL incorrect on a LEV=(lo,hi,delta)
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_lev_del_symb
! err700_lev_del_symb.jnl
! 9/9/2016
! Ticket 2470: Symbol LEV_DEL was erroneously marked as Irregular
! Also, the symbols LEV_MIN and LEV_MAX are changed to say open-ended
! when (-inf), (inf) or /lev=v is used.
 
use coads_climatology
 
 
! LEV_DEL should be regular
shade/lev=(16.4,24.4,0.4) sst[L=1,x=290:330,y=10:40]
show sym lev*
LEV_TEXT = "(16.4,24.4,0.4)"
LEV_MIN = "16.4"
LEV_MAX = "24.4"
LEV_NUM = "20"
LEV_DEL = "0.4"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "16.4,16.8,17.2,17.6,18,18.4,18.8,19.2,19.6,20,20.4,20.8,21.2,21.6,22,22.4,22.8,23.2,23.6,24,24.4"
 
shade/lev=(16)(16.4)(16.8)(17.2)(17.6) sst[L=1,x=290:330,y=10:40]
show sym lev*
LEV_TEXT = "(16)(16.4)(16.8)(17.2)(17.6)"
LEV_MIN = "16"
LEV_MAX = "17.6"
LEV_NUM = "4"
LEV_DEL = "0.4"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "16,16.4,16.8,17.2,17.6"
 
shade/lev=(22) sst[L=1,x=290:330,y=10:40]
show sym lev*
LEV_TEXT = "(22)"
LEV_MIN = "22"
LEV_MAX = "22"
LEV_NUM = "1"
LEV_DEL = "none"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "22"
 
! LEV_DEL should be irregular
 
shade/lev=(16.4,24.4,0.4)(inf) sst[L=1,x=290:330,y=10:40]
show sym lev*
LEV_TEXT = "(16.4,24.4,0.4)(INF)"
LEV_MIN = "16.4"
LEV_MAX = "open-ended"
LEV_NUM = "21"
LEV_DEL = "irregular"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "16.4,16.8,17.2,17.6,18,18.4,18.8,19.2,19.6,20,20.4,20.8,21.2,21.6,22,22.4,22.8,23.2,23.6,24,24.4,27.89"
 
shade/lev=20v sst[L=1,x=290:330,y=10:40]
show sym lev*
LEV_TEXT = "20V"
LEV_MIN = "open-ended"
LEV_MAX = "open-ended"
LEV_NUM = "19"
LEV_DEL = "irregular"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "13.32,16,17.05,18.1,19.15,19.5,20,20.5,21,21.5,22,22.5,23,23.5,24,24.5,25,25.5,25.7,27.89"
LEV_OPNLEVS = "(-inf)(16,19.1,1.05)(19.5,26,0.5)(25.7,25.7,1.05)(inf)"
 
shade/lev=(16.4,24.4,0.4)(24.4,28.1,0.1) sst[L=1,x=290:330,y=10:40]
show sym lev*
LEV_ALL = "16.4,16.8,17.2,17.6,18,18.4,18.8,19.2,19.6,20,20.4,20.8,21.2,21.6,22,22.4,22.8,23.2,23.6,24,24.4,24.5,24.6,24.7,24.8,24.9,25,25.1,25.2,25.3,25.4,25.5,25.6,25.7,25.8,25.9,26,26.1,26.2,26.3,26.4,26.5,26.6,26.7,26.8,26.9,27,27.1,27.2,27.3,27.4,27.5,27.6,27.7,27.8,27.9,28,28.1"
LEV_TEXT = "(16.4,24.4,0.4)(24.4,28.1,0.1)"
LEV_MIN = "16.4"
LEV_MAX = "28.1"
LEV_NUM = "57"
LEV_DEL = "irregular"
LEV_CENTERED_LABELS = "off"
 
shade/lev=(5)(16.4,24.4,0.4) sst[L=1,x=290:330,y=10:40]
show sym lev*
LEV_TEXT = "(5)(16.4,24.4,0.4)"
LEV_MIN = "5"
LEV_MAX = "24.4"
LEV_NUM = "21"
LEV_DEL = "irregular"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "5,16.4,16.8,17.2,17.6,18,18.4,18.8,19.2,19.6,20,20.4,20.8,21.2,21.6,22,22.4,22.8,23.2,23.6,24,24.4"
 
! Bug 2466 Graticule lines too dense on time plots
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_timegrat
!err700_timegrat.jnl
! 22-sep-2016 *acm*
! See ticket 2466, too many graticule lines on axis with short time axis.
 
define axis/t="22-aug-2016:12":"23-aug-2016:18":6/units=hours tax
define axis/z=0:50:2/depth/units=m zax
let ztvar = sin(L[Gt=tax]/20) + z[gz=zax]
 
set view upper; shade/grat ztvar
set view lower; plot/grat=(color=light_blue)/z=20 ztvar
 
can view
set view left; shade/trans/grat ztvar
set view right; plot/trans/grat=(color=light_blue)/z=20 ztvar
 
! Axis of few days, likewise
 
define axis/t=16-SEP-2016:21-SEP-2016:15/units=minutes/t0=16-SEP-2016 tax
 
can view
set view upper; shade/grat ztvar
set view lower; plot/grat=(color=light_blue)/z=20 ztvar
 
can view
set view left; shade/trans/grat/t=16-SEP-2016:19-sep-2016 ztvar
set view right; plot/trans/grat=(color=light_blue)/z=20/t=16-SEP-2016:19-sep-2016 ztvar
 
 
 
! Bug 2465 parsing errors on commands with expressions involving attrbutes
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_attribute_parsing
! err700_attribute_parsing.jnl
! See ticket 2465. Parsing errors for commands with attribute references
! acm  9/2016
 
! Write a simple file and then try to get at its attributes.
 
let/title="my variable" a = 1
save/clob/file="a.nc"/title="my file" a
can var a
use a.nc
 
! These were ok
list/nohead ..title
        "my file"
list/nohead a.long_name
        "my variable"
 
! errors
list/nohead ..title EQ " "
          0.0000
list/nohead (..title)
        "my file"
list/nohead ..title + "text"
        "my filetext"
list/nohead a.long_name EQ " "
          0.0000
 
list/nohead strlen(a.long_name)
          11.00
list/nohead strindex(..title, "file")
          4.000
 
 
! Note the fix for # 2437 needs documentation: 4D output for grids in X,Y,Z,T only
! Note the fix for # 2451 needs documentation: -gif mode plots with /HLIM or /VLIM reversing an axis.
 
 
! Bug 2477 plot axes are not fully drawn, some /VS plots
! move this to bn_gif.jnl
! go bn_reset
! go err700_vs_plot_axes
 
! Bug 2483. Fixing axis-ends symbols XAXIS_MIN,XAXIS_MAX, YAXIS_MIN,YAXIS_MAX
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_axis_dates
! err700_axis_dates.jnl
! See ticket 2483. 11/10/2016 ACM
!
! The axis-ends symbols XAXIS_MIN,XAXIS_MAX, YAXIS_MIN,YAXIS_MAX
! were not accurate for time axes, which get padded out to the nearest
! time unit, e.g. whole months etc.
 
! This axis gets plotted from 1-oct-2015 to the end of 30-apr-2016
 
def axis/t=23-oct-2015:17-apr-2016:10/units=hours taxis
 
! Define some variables
let tt = t[gt=taxis]
let var = cos(L[gt=taxis]/30)
define axis/x=1:52:4 xaxis
define axis/y=1:52:4 yaxis
let xtvar = x[gx=xaxis] + var
let ytvar = y[gy=yaxis] + var
 
! 1-D time plot
plot var
 
! Previously these were set to the axis-coordinate
! ends not the drawn axis ends.
list tax_datestring(($xaxis_min), tt, "minutes"), tax_datestring(($xaxis_max), tt, "minutes")
 !-> list tax_datestring(1005528.00, tt, "minutes"), tax_datestring(1010640.00, tt, "minutes")
 Column  1: TAX_DATESTRING(1005528.00, TT, "minutes")
 Column  2: TAX_DATESTRING(1010640.00, TT, "minutes")
                   (C001,V00      (C001,V008)
I / *:    "01-OCT-2015 00:00" "01-MAY-2016 00:00"
 
! 2D plots
 
shade ytvar
list tax_datestring(($xaxis_min), tt, "minutes"), tax_datestring(($xaxis_max), tt, "minutes")
 !-> list tax_datestring(1005528.00, tt, "minutes"), tax_datestring(1010640.00, tt, "minutes")
 Column  1: TAX_DATESTRING(1005528.00, TT, "minutes")
 Column  2: TAX_DATESTRING(1010640.00, TT, "minutes")
                   (C001,V00      (C001,V008)
I / *:    "01-OCT-2015 00:00" "01-MAY-2016 00:00"
 
shade xtvar ! T axis on the vertical axis
list tax_datestring(($yaxis_min), tt, "minutes"), tax_datestring(($yaxis_max), tt, "minutes")
 !-> list tax_datestring(1005528.00, tt, "minutes"), tax_datestring(1010640.00, tt, "minutes")
 Column  1: TAX_DATESTRING(1005528.00, TT, "minutes")
 Column  2: TAX_DATESTRING(1010640.00, TT, "minutes")
                   (C001,V00      (C001,V008)
I / *:    "01-OCT-2015 00:00" "01-MAY-2016 00:00"
 
 
! Short time axis, plot ends extended out to the nearest hour
def axis/t="23-oct-2015:01:15":"23-oct-2015:12:30":15/units=minutes taxis
 
plot var
list tax_datestring(($xaxis_min), tt, "minutes"), tax_datestring(($xaxis_max), tt, "minutes")
 !-> list tax_datestring(60363420.0, tt, "minutes"), tax_datestring(60364140.0, tt, "minutes")
 Column  1: TAX_DATESTRING(60363420.0, TT, "minutes")
 Column  2: TAX_DATESTRING(60364140.0, TT, "minutes")
                   (C001,V00      (C001,V008)
I / *:    "23-OCT-2015 01:00" "23-OCT-2015 13:00"
 
shade ytvar
list tax_datestring(($xaxis_min), tt, "minutes"), tax_datestring(($xaxis_max), tt, "minutes")
 !-> list tax_datestring(60363420.0, tt, "minutes"), tax_datestring(60364140.0, tt, "minutes")
 Column  1: TAX_DATESTRING(60363420.0, TT, "minutes")
 Column  2: TAX_DATESTRING(60364140.0, TT, "minutes")
                   (C001,V00      (C001,V008)
I / *:    "23-OCT-2015 01:00" "23-OCT-2015 13:00"
 
shade xtvar
list tax_datestring(($yaxis_min), tt, "minutes"), tax_datestring(($yaxis_max), tt, "minutes")
 !-> list tax_datestring(60363420.0, tt, "minutes"), tax_datestring(60364140.0, tt, "minutes")
 Column  1: TAX_DATESTRING(60363420.0, TT, "minutes")
 Column  2: TAX_DATESTRING(60364140.0, TT, "minutes")
                   (C001,V00      (C001,V008)
I / *:    "23-OCT-2015 01:00" "23-OCT-2015 13:00"
 
 
 
! Bug 2489. Attribute climatology_time_range not defined on an expression
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_clim_attr_expression
! err700_clim_attr_expression.jnl
! Ticket 2489
! 11/22/2016
!
! The attribute climatology_time_range is created whena variable comes
! from a climatological regridding. It can be created only for user-defined
! variables not for an expression. Previously the SAVE command resulted in a crash.
! (See bn_climatology_attr.jnl for more examples).
 
! Define a monthly axis
define axis/t=1-feb-1980:1-feb-2003/npoints=276/unit="day"/t0=1-jan-1900 tax
 
let tvar = t[gt=tax]
let clim1 = tvar[gt=month_irreg@mod]
save/nobounds/file=a.nc/clobber 3*clim1
 
can dat/all; use a.nc
 
! The variable did not get a climatology_time_range attribute
let vname = ..varnames
show att `vname[i=1]`
 !-> show att E494
     attributes for dataset: ./a.nc
 E494.missing_value = -1.E+34
 E494._FillValue = -1.E+34
 E494.long_name = 3*CLIM1 
 
 
! Bug 2491: Location of colorbar labels wrong
! on /HLOG or /VLOG plots
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_ribbon_vlog
! err700_ribbon_vlog.jnl
! 1/3/2017 *acm*
! See ticket 2491: Location of colorbar labels wrong
! on /HLOG or /VLOG plots
 
 
let a = 0.1* {1,2,3,4,5,6,7,8,9}
set v ul
plot/vs/rib/sym=25 a, a, a
 
! Draw with /VLOG, previously put the colorbar labels in the wrong place
set view lr
plot/vs/rib/sym=25/vlog a, a, a
 
! likewise /HLOG on a horizontal color key
set view ll
plot/vs/rib/sym=25/hlog/key=horiz a,a,a
 
frame/file=bn_ribbon_vlog.gif
 
! Bug 2492: single-variable listings with /form=comma or /form=tab
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_list_comma
! err700_list_comma.jnl
! 1/4/2017 Fixes for ticket 2492: for single-variable listings, /FORM=comma and /FORM=tab
 
use gt4d011
 
! Previously for comma and tab listings there was an extra line right after the header
! that showed a longitude, even on [i=@ave,j=@ave]
 
list/L=1:3/K=1/form=comma taux[i=@ave,j=@ave]
             VARIABLE : ZONAL WIND STRESS (dynes/cm**2)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 3 points (TIME)
             LONGITUDE: 139.5W to 121.5W (XY ave)
             LATITUDE : 3.5S to 3.5N (XY ave)
17-AUG-1982 12:00,-0.2742
23-AUG-1982 14:00,-0.2363
29-AUG-1982 16:00,-0.1984
 
list/nohead/L=1:3/K=1/form=comma taux[i=95,j=@ave]
17-AUG-1982 12:00,-0.2738
23-AUG-1982 14:00,-0.2441
29-AUG-1982 16:00,-0.2144
 
list/nohead/L=1:3/K=1/form=comma taux[i=@ave,j=@ave]
17-AUG-1982 12:00,-0.2742
23-AUG-1982 14:00,-0.2363
29-AUG-1982 16:00,-0.1984
 
! Previously /NOROW had no effect for /form=comma or /tab
! (for single-variable listings)
 
list/norow/L=1:3/K=1/form=comma taux[i=@ave,j=@ave]
             VARIABLE : ZONAL WIND STRESS (dynes/cm**2)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 3 points (TIME)
             LONGITUDE: 139.5W to 121.5W (XY ave)
             LATITUDE : 3.5S to 3.5N (XY ave)
-0.2742 
-0.2363 
-0.1984 
 
list/norow/nohead/L=1:3/K=1/form=comma taux[i=95,j=@ave]
-0.2738 
-0.2441 
-0.2144 
 
list/norow/nohead/L=1:3/K=1/i=95/j=40/form=comma taux
-0.3336 
-0.298 
-0.2623 
 
list/norow/nohead/L=1:3/K=1/i=95/j=40/form=comma taux
-0.3336 
-0.298 
-0.2623 
 
! Now all the same commands with /form=tab
 
! Previously for comma and tab listings there was an extra line right after the header
! that showed a longitude, even on [i=@ave,j=@ave]
 
list/L=1:3/K=1/form=tab taux[i=@ave,j=@ave]
             VARIABLE : ZONAL WIND STRESS (dynes/cm**2)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 3 points (TIME)
             LONGITUDE: 139.5W to 121.5W (XY ave)
             LATITUDE : 3.5S to 3.5N (XY ave)
17-AUG-1982 12:00	-0.2742
23-AUG-1982 14:00	-0.2363
29-AUG-1982 16:00	-0.1984
 
list/nohead/L=1:3/K=1/form=tab taux[i=95,j=@ave]
17-AUG-1982 12:00	-0.2738
23-AUG-1982 14:00	-0.2441
29-AUG-1982 16:00	-0.2144
 
list/nohead/L=1:3/K=1/form=tab taux[i=@ave,j=@ave]
17-AUG-1982 12:00	-0.2742
23-AUG-1982 14:00	-0.2363
29-AUG-1982 16:00	-0.1984
 
! Previously /NOROW had no effect for /form=comma or /tab
! (for single-variable listings)
 
list/norow/L=1:3/K=1/form=tab taux[i=@ave,j=@ave]
             VARIABLE : ZONAL WIND STRESS (dynes/cm**2)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 3 points (TIME)
             LONGITUDE: 139.5W to 121.5W (XY ave)
             LATITUDE : 3.5S to 3.5N (XY ave)
-0.2742 
-0.2363 
-0.1984 
 
list/norow/nohead/L=1:3/K=1/form=tab taux[i=95,j=@ave]
-0.2738 
-0.2441 
-0.2144 
 
list/norow/nohead/L=1:3/K=1/i=95/j=40/form=tab taux
-0.3336 
-0.298 
-0.2623 
 
list/norow/nohead/L=1:3/K=1/i=95/j=40/form=tab taux
-0.3336 
-0.298 
-0.2623 
 
 
! Bug 2493: T aggregation when there are E or F axes
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_aggT_5d
! err700_aggT_5d.jnl
! 1/6/2017 ACM  Ticket 2493
! When there are E or F axes in the grid, the multi-file reading
! for time aggregations or mc files corrupted the data.
 
!  The two files have data in different ranges
 
! data range in 260-270
use aggT_5d1.nc
list/i=3/j=2 thetao[d=1]
             VARIABLE : Sea Water Potential Temperature (K)
             FILENAME : aggT_5d1.nc
             SUBSET   : 6 by 10 points (TIME-E)
             CALENDAR : NOLEAP
             LONGITUDE: 22.5E
             LATITUDE : 58.5S
             DEPTH (m): 5
              1999   2000   2001   2002   2003   2004  
               1      2      3      4      5      6
 1    /  1:  265.2  265.6  266.0  266.2  265.5  265.4
 2    /  2:  265.6  265.8  265.6  265.7  265.5  265.5
 3    /  3:  265.2  265.5  265.3  265.3  264.9  265.5
 4    /  4:  263.9  263.3  263.1  263.4  263.5  263.3
 5    /  5:  261.8  261.8  261.9  261.9  262.1  261.8
 6    /  6:  263.4  263.4  263.8  263.6  263.6  263.4
 7    /  7:  264.0  264.5  264.2  264.0  264.3  264.0
 8    /  8:  264.2  264.1  264.0  263.4  263.4  263.9
 9    /  9:  263.7  262.7  262.7  262.9  263.3  263.0
 10   / 10:  263.8  263.7  264.0  263.8  263.7  264.2
 
! data range in 270-280
use aggT_5d2.nc
list/i=3/j=2 thetao[d=2]
             VARIABLE : Sea Water Potential Temperature (K)
             FILENAME : aggT_5d2.nc
             SUBSET   : 4 by 10 points (TIME-E)
             CALENDAR : NOLEAP
             LONGITUDE: 22.5E
             LATITUDE : 58.5S
             DEPTH (m): 5
              2006   2007   2008   2009  
               1      2      3      4
 1    /  1:  275.4  275.1  275.0  275.1
 2    /  2:  275.6  275.8  275.8  275.3
 3    /  3:  275.1  275.3  275.0  275.4
 4    /  4:  273.4  273.3  273.4  273.9
 5    /  5:  271.8  271.7  271.8  271.9
 6    /  6:  273.8  273.6  273.9  273.8
 7    /  7:  273.9  273.9  274.2  274.2
 8    /  8:  273.9  274.0  274.5  274.2
 9    /  9:  272.7  272.9  273.0  274.0
 10   / 10:  274.8  274.9  274.4  274.5
can data/all
 
! Now make an aggregation. Previously the data was wrapped onto
! the grid incorrectly, with zero in M=7 and higher
 
define data/agg/t myagg = aggT_5d1.nc, aggT_5d2.nc
list/i=3/j=2 thetao
             VARIABLE : Sea Water Potential Temperature (K)
             FILENAME : myagg
             SUBSET   : 10 by 10 points (TIME-E)
             CALENDAR : NOLEAP
             LONGITUDE: 22.5E
             LATITUDE : 58.5S
             DEPTH (m): 5
              1999   2000   2001   2002   2003   2004   2006   2007   2008   2009  
               1      2      3      4      5      6      7      8      9     10
 1    /  1:  265.2  265.6  266.0  266.2  265.5  265.4  275.4  275.1  275.0  275.1
 2    /  2:  265.6  265.8  265.6  265.7  265.5  265.5  275.6  275.8  275.8  275.3
 3    /  3:  265.2  265.5  265.3  265.3  264.9  265.5  275.1  275.3  275.0  275.4
 4    /  4:  263.9  263.3  263.1  263.4  263.5  263.3  273.4  273.3  273.4  273.9
 5    /  5:  261.8  261.8  261.9  261.9  262.1  261.8  271.8  271.7  271.8  271.9
 6    /  6:  263.4  263.4  263.8  263.6  263.6  263.4  273.8  273.6  273.9  273.8
 7    /  7:  264.0  264.5  264.2  264.0  264.3  264.0  273.9  273.9  274.2  274.2
 8    /  8:  264.2  264.1  264.0  263.4  263.4  263.9  273.9  274.0  274.5  274.2
 9    /  9:  263.7  262.7  262.7  262.9  263.3  263.0  272.7  272.9  273.0  274.0
 10   / 10:  263.8  263.7  264.0  263.8  263.7  264.2  274.8  274.9  274.4  274.5
 
! Bug 2495: shift on overlay of time series plot on 2d time plot
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_time_overlay
! err700_time_overlay.jnl
! bug 2495
! Shifting on overlay of time series on 2D plot
 
define axis/t=15-jun-1970:16-jun-1970:60/t0=1-jan-1970/units=seconds  tax
def axis/y=-2:2:0.2 yaxis
let tt = t[gt=tax]
 
shade/pal=white/nokey/title="example plot" y[gy=yaxis] + t[gt=tax]
 
! Previously the second plot was shifted in time
plot/over/color=red  cos(tt/3000)
plot/over/color=blue cos(tt/3000)+0.5
 
! now vertical time axis
shade/trans/pal=white/nokey/title="example plot" y[gy=yaxis] + t[gt=tax]
 
plot/trans/over/color=red  cos(tt/3000)
plot/trans/over/color=blue cos(tt/3000) + 0.5
 
 
 
! Bug 2494:  drawing a single-cell shade plot
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_shade_singlecell
! err700_shade_singlecell.jnl
! Ticket 2494, drawing a single-cell shade plot
 
def axis/x=233.59375:293.90625:0.3125/units=degrees_east xlon
def axis/y=24.125:50.625:0.25/units=degrees_north ylat
let iijj = i[gx=xlon] + j[gy=ylat]
set reg/x=77w:72.5w/y=38.9n:41.5n
 
 
shade/pal=grayscale iijj
shade/pal=blue/ov iijj[i=167:168,j=64:65]
 
! previously this was drawn, but located one cell to the left of where it should be
shade/pal=black/ov iijj[i=167,j=64]
 
! Specify a cell by X,Y. Previously this gave a dimensions error
shade/over/pal=green iijj[x=76w,y=40n]
 
! These same sorts of degenerate regions, bug not as an overlay
 
! Previously both of these drew a blank plot
shade/pal=rnb2 iijj[i=167,j=64]
shade/pal=rnb2 iijj[i=167,j=64:66]
 
! Specify a cell by X,Y
! Previously this gave a dimensions error
shade/pal=green iijj[x=76w,y=40n]
 
! Partial cell, given by xy limits.
! Previously drew a blank plot
shade/pal=green iijj[x=74.5w:74.4w,y=39.9:40.0]
 
! Several cells in one direction - partial cells in y at edges
shade/pal=rnb2 iijj[x=74.5w,y=39.9:40.8]
 
 
! Bug 2496: errors using axis with nearly-repeating coordinates
!           where coordinates are very near grid-cell edges.
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_coords
! err700_coords.jnl
! 1/17/2017
! From bug 2496. Data with almost-repeating values used to define an axis
 
use err700_coords.nc
list/i=10:20/prec=16 du_coords, du_coords[i=@ddf]
             DATA SET: ./data/err700_coords.nc
             X: 9.5 to 20.5
 Column  1: DU_COORDS is DU_VU[I=1:20]
 Column  2: DU_COORDS[X=@DDF] is DU_VU[I=1:20] (forward derivative on X)
                   DU_COORDS       DU_COORDS
10   / 10:  23.75000000000000  2.500000000000000
11   / 11:  26.25000000000000  0.000000000000011
12   / 12:  26.25000000000001  2.499999999999989
13   / 13:  28.75000000000000  2.500000000000000
14   / 14:  31.25000000000000  0.000000000000011
15   / 15:  31.25000000000001  2.499999999999989
16   / 16:  33.75000000000000  2.500000000000000
17   / 17:  36.25000000000000  2.500000000000000
18   / 18:  38.75000000000000  2.500000000000000
19   / 19:  41.25000000000000  2.500000000000000
20   / 20:  43.75000000000000               ....
 
! The data has repeated coords, to 1.e15. Should be reported as micro-adjusted
 
def ax/bounds/x/unit="degrees_east"/modulo=360 c2d_ax_x = du_coords[i=1:160], du_edges[i=1:161]
 
 
sh axis c2d_ax_x
 name       axis              # pts   start                end
 C2D_AX_X  LONGITUDE           20mi   1.25E                43.75E
   Axis span (to cell edges) = 45 (modulo length = 360)
let c = x[gx=c2d_ax_x]
 
! for this region, the setup steps got data in index 11:31, then
! at the point of writing the index ragne was found to be 12:31
 
set region/x=25:385
set mode diag
save/clob/file=a.nc c
 dealloc  dynamic grid GAY2            XAX1_21   NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid GAY1            XAX1_20   NORMAL    NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid C        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          C2D_AX_X  NORMAL    NORMAL    NORMAL
 dealloc  dynamic grid (G###)          C2D_AX_X  NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          C2D_AX_X  NORMAL    NORMAL    NORMAL
 allocate dynamic grid (G###)          C2D_AX_X  NORMAL    NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   1 I:     11     31  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    C        C:  6 dset:   0 I:     11     31  J: -999 -999  K: -999 -999  L:   -999   -999
 allocate dynamic grid (G###)          C2D_AX_X  NORMAL    NORMAL    NORMAL
 pseudo  X        M:  7 dset:   0 I:     11     31  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid (G###)          C2D_AX_X  NORMAL    NORMAL    NORMAL
 -DELETE C        M:  5 dset:   0 I:     11     30  J: -999 -999  K: -999 -999  L:   -999   -999
 
set mode /last diag
 
 
! Bug 2499: Define a single-point axis with bounds
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_define_1pt_axis
! err700_define_1pt_axis.jnl
! Ticket 2499: regular axis, test for valid line_delta
! ACM 7/6/2016
 
 
def ax/t/bounds tax = 1, 0, 2
show axis/t tax
 name       axis              # pts   start                end
 TAX       T                    1 i   1                    1
   Axis span (to cell edges) = 2
 
       L     T                       TBOX          TBOXLO
       1>  1                         2          0
 
! check that reading such an axis from a file is ok
let twelve = 12*t[gt=tax]
 
save/file=a.nc/clobber twelve
cancel var/all; cancel axis tax
use a.nc
sh dat
     currently SET data sets:
    1> ./a.nc  (default)
 name     title                             I         J         K         L
 TWELVE   12*T[GT=TAX]                     ...       ...       ...       1:1
 
sh axis/t tax
 name       axis              # pts   start                end
 TAX       T                    1 r   1                    1
T0 = %%
   Axis span (to cell edges) = 2
 
       L     T                       TBOX          TBOXLO
       1>  1                         2          0
 
 
 
! Bug 2498: time unit error in F-aggregation of some OPENDAP datasets
! go bn_reset
! go err700_aggregate_from_fmrc
 
 
! Bug 2504: modulo axes and coordinates
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_modulo
! err700_modulo.jnl
! See ticket 2504. Axis defintions where bounds are not given, and Ferret
! is defining the cell edges. If axis coordinates lie within the modulo range
! but the cell bounds defined automatically using coordinate midpoints range
! larger than 360 degrees, or 1 year, need to adjust bounds. This is done only
! for irregular axes.
 
use modax
 
! The axis 'irreg_no_bounds' is irregular and is stored in the file without
! bounds. The coordinate range is < 360 but previously the computed bounds
! made the axis length 369.45, so it was not treated as modulo.
! Now it is marked modulo.
 
sh axis irreg_no_bounds
 name       axis              # pts   start                end
 IRREG_NO_BOUNDS LONGITUDE      8mi   0E                   0.7W
   Axis span (to cell edges) = 360 (modulo length = axis span)
list/order=x/nohead x[gx=irreg_no_bounds]
            0.0    1.0   20.0   30.0  320.0  330.0  340.0  359.3
show axis/x irreg_no_bounds
 name       axis              # pts   start                end
 IRREG_NO_BOUNDS LONGITUDE      8mi   0E                   0.7W
   Axis span (to cell edges) = 360 (modulo length = axis span)
 
       I     X                       XBOX          XBOXLO
       1>  0E                        0.85       0.35W(-0.35)
       2>  1E                        10         0.5E
       3>  20E                       14.5       10.5E
       4>  30E                       150        25E
       5>  40W                       150        175E
       6>  30W                       10         35W
       7>  20W                       14.65      25W
       8>  0.7W                      10         10.35W
 
 
! The axis 'regular_no_bounds' is regular.  Its coordinate range is < 360, but
! to adjust the grid cells would make it irregular, so this axis is still
! marked as not modulo.
 
sh axis regular_no_bounds
 name       axis              # pts   start                end
 REGULAR_NO_BOUNDS LONGITUDE    8 r   10E                  0E(360)
   Axis span (to cell edges) = 400
list/order=x/nohead x[gx=regular_no_bounds]
           10.0   60.0  110.0  160.0  210.0  260.0  310.0  360.0
show axis/x regular_no_bounds
 name       axis              # pts   start                end
 REGULAR_NO_BOUNDS LONGITUDE    8 r   10E                  0E(360)
   Axis span (to cell edges) = 400
 
       I     X                       XBOX          XBOXLO
       1>  10E                       50         15W(-15)
       2>  60E                       50         35E
       3>  110E                      50         85E
       4>  160E                      50         135E
       5>  150W                      50         175W
       6>  100W                      50         125W
       7>  50W                       50         75W
       8>  0E(360)                   50         25W
 
! The axis 'irreg_with_bounds' is irregular, stored with bounds in the file.
! Its coordinate range is < 360, but the range of the bounds is larger than
! 360. Because the bounds are in the file, nothing is changed; it is marked
! as not modulo.
 
sh axis irreg_with_bounds
 name       axis              # pts   start                end
 IRREG_WITH_BOUNDS LONGITUDE    8 i   0E                   1W
   Axis span (to cell edges) = 362
list/order=x/nohead x[gx=irreg_with_bounds]
            0.0    1.0   20.0   30.0  320.0  330.0  340.0  359.0
show axis/x irreg_with_bounds
 name       axis              # pts   start                end
 IRREG_WITH_BOUNDS LONGITUDE    8 i   0E                   1W
   Axis span (to cell edges) = 362
 
       I     X                       XBOX          XBOXLO
       1>  0E                        1.5        1W(-1)
       2>  1E                        9.5        0.5E
       3>  20E                       15         10E
       4>  30E                       150        25E
       5>  40W                       150        175E
       6>  30W                       10         35W
       7>  20W                       14         25W
       8>  1W                        12         11W
 
cancel data/all
 
! DEFINE AXIS examples
 
! Likewise define an irregular axis whose coordinate range is < 360 but
! the default midpoint grid cell bounds would make it larger than 360.
! Previously this axis was not modulo, now bounds are set so it is.
 
define axis/x/units=degrees_east xax = {0, 10, 20, 340, 358}
show axis xax
 name       axis              # pts   start                end
 XAX       LONGITUDE            5mi   0E                   2W
   Axis span (to cell edges) = 360 (modulo length = axis span)
 
! Now define a regular axis whose coordinate range is < 360 but the
! default midpoint grid cell bounds would make it larger than 360.
! To keep it regular, mark as not modulo.
 
define axis/x=5:355:50/units=degrees_east xax
show axis xax
 name       axis              # pts   start                end
 XAX       LONGITUDE            8 r   5E                   5W
   Axis span (to cell edges) = 400
 
! tests for time axes
! Regular time axis with bounds that make it longer than a year.
! leave this one so it stays regular and is not modulo.
 
define axis/t=3:363:10/units=days/t0=1-jan-0000 treg
show axis treg
 name       axis              # pts   start                end
 TREG      TIME                37 r   04-JAN-0000 00:00    29-DEC-0000 00:00
T0 = 1-JAN-0000
   Axis span (to cell edges) = 370
 
! An irregular axis where moving the bounds can make it a modulo calendar axis.
define axis/t0=1-jan-0000/units=days/t tax2 = { 3, 55, 103, 153, 203, 253, 303, 353}
sh axis tax2
 name       axis              # pts   start                end
 TAX2      TIME                 8mi   04-JAN 00:00         19-DEC 00:00
T0 = 1-JAN-0000
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 
 
! Bug 1480: saving modulo axis with too big a region
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_save_mod_att
! err700_save_mod_att.jnl
! ticket 1480: do not write a modulo axis when saving a modulo
! axis with region longer than the modulo length.
! If it's just one grid-cell too long, write one cell less so
! the axis can still be a valid modulo axis
 
! write a dataset to use, modulo attribute
define axis/x=20:377.5:2.5/units=degrees_east/modulo xlon
sh axis xlon
 name       axis              # pts   start                end
 XLON      LONGITUDE          144mr   20E                  17.5E(377.5)
   Axis span (to cell edges) = 360 (modulo length = axis span)
let var = x[gx=xlon]
 
save/clobber/file=a1.nc var
sp ncdump -h a1.nc
netcdf a1 {
dimensions:
	XLON = 144 ;
variables:
	double XLON(XLON) ;
		XLON:units = "degrees_east" ;
		XLON:point_spacing = "even" ;
		XLON:axis = "X" ;
		XLON:modulo = 360. ;
		XLON:standard_name = "longitude" ;
	double VAR(XLON) ;
		VAR:missing_value = -1.e+34 ;
		VAR:_FillValue = -1.e+34 ;
		VAR:long_name = "X[GX=XLON]" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
! Now set a region and write data. The axis length would be 362.5
use a1
sh axis xlon
 name       axis              # pts   start                end
 XLON      LONGITUDE          144mr   20E                  17.5E(377.5)
   Axis span (to cell edges) = 360 (modulo length = axis span)
set region/x=0:360
stat x[gx=xlon] ! 145 points
 
             X
             axis XLON
             LONGITUDE: 0E to 0E(360)
             Y:  N/A
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 145 (145*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 360
 Mean    value: 180 (unweighted average)
 Standard deviation: 105
 
! but we see that the region is just one cell too big, and
! save it with length 360.
save/clobber/file=a.nc var
 
! previously the x axis had a modulo attribute and length 362.5
! The modulo=360 didnt match the length of the axis so on using the
! file there was a note, modulo attribute ignored. Now the axis is
! the intended length.
sp ncdump -h a.nc
netcdf a {
dimensions:
	XLONN7_136 = 144 ;
variables:
	double XLONN7_136(XLONN7_136) ;
		XLONN7_136:units = "degrees_east" ;
		XLONN7_136:point_spacing = "even" ;
		XLONN7_136:axis = "X" ;
		XLONN7_136:modulo = 360. ;
		XLONN7_136:standard_name = "longitude" ;
	double VAR(XLONN7_136) ;
		VAR:missing_value = -1.e+34 ;
		VAR:_FillValue = -1.e+34 ;
		VAR:long_name = "X[GX=XLON]" ;
		VAR:history = "From a1" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
use a
sh axis `var,return=xaxis`
 !-> sh axis XLONN7_136
 name       axis              # pts   start                end
 XLONN7_136 LONGITUDE         144mr   0E                   2.5W
   Axis span (to cell edges) = 360 (modulo length = axis span)
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
! Now set a bigger region and write data. The axis length is 372.5
use a1
sh axis xlon
 name       axis              # pts   start                end
 XLON      LONGITUDE          144mr   20E                  17.5E(377.5)
   Axis span (to cell edges) = 360 (modulo length = axis span)
set region/x=0:370
 
! Now issues a note, not writing modulo attribute.
save/clobber/file=a.nc var
 
! previously the x axis still had the modulo attribute
sp ncdump -h a.nc
netcdf a {
dimensions:
	XLONN7_141 = 149 ;
variables:
	double XLONN7_141(XLONN7_141) ;
		XLONN7_141:units = "degrees_east" ;
		XLONN7_141:point_spacing = "even" ;
		XLONN7_141:axis = "X" ;
		XLONN7_141:standard_name = "longitude" ;
	double VAR(XLONN7_141) ;
		VAR:missing_value = -1.e+34 ;
		VAR:_FillValue = -1.e+34 ;
		VAR:long_name = "X[GX=XLON]" ;
		VAR:history = "From a1" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
use a
sh axis `var,return=xaxis`
 !-> sh axis XLONN7_141
 name       axis              # pts   start                end
 XLONN7_141 LONGITUDE         149 r   0E                   10E(370)
   Axis span (to cell edges) = 372.5
 
! test the machinery for a file with attribute modulo=" "
 
use coads_climatology
sh att (`sst,return=xaxis`)
 !-> sh att (COADSX)
     attributes for dataset: ./data/coads_climatology.cdf
 (COADSX).units = degrees_east 
 (COADSX).modulo =   
 (COADSX).point_spacing = even 
 (COADSX).orig_file_axname = COADSX 
set region/x=1:361
 
save/clobber/file=a.nc/y=0/l=1 sst
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
use a
sh att (`sst,return=xaxis`)
 !-> sh att (COADSXN9_170)
     attributes for dataset: ./a.nc
 (COADSXN9_170).units = degrees_east 
 (COADSXN9_170).modulo =   
 (COADSXN9_170).point_spacing = even 
 (COADSXN9_170).axis = X 
 (COADSXN9_170).standard_name = longitude 
 (COADSXN9_170).orig_file_axname = COADSXN9_170 
 
! previously the axis, of length 362, was marked modulo.
show axis `sst,return=xaxis`
 !-> show axis COADSXN9_170
 name       axis              # pts   start                end
 COADSXN9_170 LONGITUDE       180mr   1E                   1W
   Axis span (to cell edges) = 360 (modulo length = axis span)
 
 
 
! Bug 2502: FMRC regridding sensitive to insignificant floating-point differences in time
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err700_fmrcdiag
! err700_fmrcdiag.jnl
! these particular datasets (quarterly forecasts of two years of monthly data)
! have times at regular intervals but at values (for 25 and 26) that are difficult
! to represent in binary
!
USE forecast24.nc
USE forecast25.nc
USE forecast26.nc
USE forecast27.nc
DEFINE DATA/AGGREGATE/F testdata = 1,2,3,4
!
! using the values of actual gives perfect forecasts;
! using the values of quirks has a sinusoidal error that get worse with greater lead time
!
 
DEFINE SYMBOL TF_CAL_T = `actual._cal_t_ax`
 !-> DEFINE SYMBOL TF_CAL_T = TF_CAL_T
DEFINE SYMBOL TF_LAG_F = `actual._lag_f_ax`
 !-> DEFINE SYMBOL TF_LAG_F = TF_LAG_F
DEFINE SYMBOL TF_LAG_T = `actual._lag_t_ax`
 !-> DEFINE SYMBOL TF_LAG_T = TF_LAG_T
DEFINE SYMBOL TF_CAL_F = `actual._cal_f_ax`
 !-> DEFINE SYMBOL TF_CAL_F = TF_CAL_F
 
SHOW GRID actual
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAX1      LONGITUDE            7mr   140W                 110W                full
 YAX       LATITUDE             4 r   45N                  60N                 full
 ZAX1      Z (meter)            3 i   50                   1000                full
 TF_LAG_T  MODEL ELAPSED TIME (25 r   15.217               745.62              full
 normal    E
 RUN       FORECAST             4 r   01-OCT-2010 21:36    02-JUL-2011 19:12   full
LIST /WIDTH=600 /X=120W/Y=50N/Z=50 actual
             VARIABLE : actual
             DATA SET : Forecast series of 4 datasets patterned on forecast24
             FILENAME : testdata
             SUBSET   : 25 by 4 points (MODEL ELAPSED TIME (day)-FORECAST)
             LONGITUDE: 120W
             LATITUDE : 50N
             Z (meter): 50
             Verification time increases across row.  Initialization time increases down page. 
                    15.2   45.7   76.1   106.5  137    167.4  197.8  228.3  258.7  289.1  319.6  350    380.4  410.9  441.3  471.7  502.2  532.6  563    593.5  623.9  654.3  684.8  715.2  745.6 
                     1      2      3      4      5      6      7      8      9     10     11     12     13     14     15     16     17     18     19     20     21     22     23     24     25
 01-OCT-2010 / 1:  3.112  3.063  3.548  4.433  5.476  6.388  6.918  6.920  6.392  5.481  4.436  3.546  3.056  3.102  3.671  4.606  5.651  6.517  6.966  6.873  6.263  5.305  4.262  3.422  3.016
 01-JAN-2011 / 2:  4.433  5.476  6.388  6.918  6.920  6.392  5.481  4.436  3.546  3.056  3.102  3.671  4.606  5.651  6.517  6.966  6.873  6.263  5.305  4.262  3.422  3.016  3.157  3.806  4.784
 02-APR-2011 / 3:  6.918  6.920  6.392  5.481  4.436  3.546  3.056  3.102  3.671  4.606  5.651  6.517  6.966  6.873  6.263  5.305  4.262  3.422  3.016  3.157  3.806  4.784  5.823  6.635  6.998
 02-JUL-2011 / 4:  5.481  4.436  3.546  3.056  3.102  3.671  4.606  5.651  6.517  6.966  6.873  6.263  5.305  4.262  3.422  3.016  3.157  3.806  4.784  5.823  6.635  6.998  6.809  6.122  5.125
SHADE /X=120W/Y=50N/Z=50 actual
FRAME /FILE=forecast_actual.gif
 
LET actualfine = actual[GT=($TF_LAG_T)@BIN,GF=($TF_CAL_F)@BIN]
 !-> DEFINE VARIABLE actualfine = actual[GT=TF_LAG_T@BIN,GF=TF_CAL_F@BIN]
SHOW GRID actualfine
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAX1      LONGITUDE            7mr   140W                 110W                full
 YAX       LATITUDE             4 r   45N                  60N                 full
 ZAX1      Z (meter)            3 i   50                   1000                full
 TF_LAG_T  MODEL ELAPSED TIME (25 r   15.217               745.62              full
 normal    E
 TF_CAL_F  FORECAST            12 r   01-OCT-2010 21:36    01-SEP-2011 16:00   full
LIST /WIDTH=600 /X=120W/Y=50N/Z=50 actualfine
             VARIABLE : ACTUAL[GT=TF_LAG_T@BIN,GF=TF_CAL_F@BIN]
             DATA SET : Forecast series of 4 datasets patterned on forecast24
             FILENAME : testdata
             SUBSET   : 25 by 12 points (MODEL ELAPSED TIME (day)-FORECAST)
             LONGITUDE: 120W
             LATITUDE : 50N
             Z (meter): 50
             Verification time increases across row.  Initialization time increases down page. 
                     15.2   45.7   76.1   106.5  137    167.4  197.8  228.3  258.7  289.1  319.6  350    380.4  410.9  441.3  471.7  502.2  532.6  563    593.5  623.9  654.3  684.8  715.2  745.6 
                      1      2      3      4      5      6      7      8      9     10     11     12     13     14     15     16     17     18     19     20     21     22     23     24     25
 01-OCT-2010 /  1:  3.112  3.063  3.548  4.433  5.476  6.388  6.918  6.920  6.392  5.481  4.436  3.546  3.056  3.102  3.671  4.606  5.651  6.517  6.966  6.873  6.263  5.305  4.262  3.422  3.016
 01-NOV-2010 /  2:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 01-DEC-2010 /  3:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 01-JAN-2011 /  4:  4.433  5.476  6.388  6.918  6.920  6.392  5.481  4.436  3.546  3.056  3.102  3.671  4.606  5.651  6.517  6.966  6.873  6.263  5.305  4.262  3.422  3.016  3.157  3.806  4.784
 31-JAN-2011 /  5:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 03-MAR-2011 /  6:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 02-APR-2011 /  7:  6.918  6.920  6.392  5.481  4.436  3.546  3.056  3.102  3.671  4.606  5.651  6.517  6.966  6.873  6.263  5.305  4.262  3.422  3.016  3.157  3.806  4.784  5.823  6.635  6.998
 02-MAY-2011 /  8:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 02-JUN-2011 /  9:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 02-JUL-2011 / 10:  5.481  4.436  3.546  3.056  3.102  3.671  4.606  5.651  6.517  6.966  6.873  6.263  5.305  4.262  3.422  3.016  3.157  3.806  4.784  5.823  6.635  6.998  6.809  6.122  5.125
 02-AUG-2011 / 11:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 01-SEP-2011 / 12:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
SHADE /X=120W/Y=50N/Z=50 actualfine
FRAME /FILE=forecast_actualfine.gif
 
LET diagview = actualfine[gt(TF_TIMES)=($TF_CAL_T)]
 !-> DEFINE VARIABLE diagview = actualfine[gt(TF_TIMES)=TF_CAL_T]
SHOW GRID diagview
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAX1      LONGITUDE            7mr   140W                 110W                full
 YAX       LATITUDE             4 r   45N                  60N                 full
 ZAX1      Z (meter)            3 i   50                   1000                full
 TF_CAL_T  TIME                34 r   17-OCT-2010 02:48    17-JUL-2013 10:00   full
 normal    E
 TF_CAL_F  FORECAST            12 r   01-OCT-2010 21:36    01-SEP-2011 16:00   full
LIST /WIDTH=600 /X=120W/Y=50N/Z=50 diagview
             VARIABLE : ACTUALFINE[GT(TF_TIMES)=TF_CAL_T]
             DATA SET : Forecast series of 4 datasets patterned on forecast24
             FILENAME : testdata
             SUBSET   : 34 by 12 points (TIME-FORECAST)
             LONGITUDE: 120W
             LATITUDE : 50N
             Z (meter): 50
             Verification time increases across row.  Initialization time increases down page. 
                     2010   2010   2010   2011   2011   2011   2011   2011   2011   2011   2011   2011   2011   2011   2011   2012   2012   2012   2012   2012   2012   2012   2012   2012   2012   2012   2012   2013   2013   2013   2013   2013   2013   2013  
                      1      2      3      4      5      6      7      8      9     10     11     12     13     14     15     16     17     18     19     20     21     22     23     24     25     26     27     28     29     30     31     32     33     34
 01-OCT-2010 /  1:  3.112  3.063  3.548  4.433  5.476  6.388  6.918  6.920  6.392  5.481  4.436  3.546  3.056  3.102  3.671  4.606  5.651  6.517  6.966  6.873  6.263  5.305  4.262  3.422  3.016   ....   ....   ....   ....   ....   ....   ....   ....   ....
 01-NOV-2010 /  2:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 01-DEC-2010 /  3:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 01-JAN-2011 /  4:   ....   ....   ....  4.433  5.476  6.388  6.918  6.920  6.392  5.481  4.436  3.546  3.056  3.102  3.671  4.606  5.651  6.517  6.966  6.873  6.263  5.305  4.262  3.422  3.016  3.157  3.806  4.784   ....   ....   ....   ....   ....   ....
 31-JAN-2011 /  5:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 03-MAR-2011 /  6:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 02-APR-2011 /  7:   ....   ....   ....   ....   ....   ....  6.918  6.920  6.392  5.481  4.436  3.546  3.056  3.102  3.671  4.606  5.651  6.517  6.966  6.873  6.263  5.305  4.262  3.422  3.016  3.157  3.806  4.784  5.823  6.635  6.998   ....   ....   ....
 02-MAY-2011 /  8:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 02-JUN-2011 /  9:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 02-JUL-2011 / 10:   ....   ....   ....   ....   ....   ....   ....   ....   ....  5.481  4.436  3.546  3.056  3.102  3.671  4.606  5.651  6.517  6.966  6.873  6.263  5.305  4.262  3.422  3.016  3.157  3.806  4.784  5.823  6.635  6.998  6.809  6.122  5.125
 02-AUG-2011 / 11:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 01-SEP-2011 / 12:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
SHADE /X=120W/Y=50N/Z=50 diagview
FRAME /FILE=forecast_diagview.gif
 
LET leadview = actualfine[gt(TF_TIMES)=($TF_CAL_T),gf(TF_TIMES)=($TF_LAG_F)]
 !-> DEFINE VARIABLE leadview = actualfine[gt(TF_TIMES)=TF_CAL_T,gf(TF_TIMES)=TF_LAG_F]
SHOW GRID leadview
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAX1      LONGITUDE            7mr   140W                 110W                full
 YAX       LATITUDE             4 r   45N                  60N                 full
 ZAX1      Z (meter)            3 i   50                   1000                full
 TF_CAL_T  TIME                34 r   17-OCT-2010 02:48    17-JUL-2013 10:00   full
 normal    E
 TF_LAG_F  FORECAST LEAD TIME (25 r   15.217               745.62              full
LIST /WIDTH=600 /X=120W/Y=50N/Z=50 leadview
             VARIABLE : ACTUALFINE[GT(TF_TIMES)=TF_CAL_T,GF(TF_TIMES)=TF_LAG_F]
             DATA SET : Forecast series of 4 datasets patterned on forecast24
             FILENAME : testdata
             SUBSET   : 34 by 25 points (TIME-FORECAST LEAD TIME (day))
             LONGITUDE: 120W
             LATITUDE : 50N
             Z (meter): 50
             Verification time increases across row.  Initialization time increases down page. 
               2010   2010   2010   2011   2011   2011   2011   2011   2011   2011   2011   2011   2011   2011   2011   2012   2012   2012   2012   2012   2012   2012   2012   2012   2012   2012   2012   2013   2013   2013   2013   2013   2013   2013  
                1      2      3      4      5      6      7      8      9     10     11     12     13     14     15     16     17     18     19     20     21     22     23     24     25     26     27     28     29     30     31     32     33     34
 15.2  /  1:  3.112   ....   ....  4.433   ....   ....  6.918   ....   ....  5.481   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 45.7  /  2:   ....  3.063   ....   ....  5.476   ....   ....  6.920   ....   ....  4.436   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 76.1  /  3:   ....   ....  3.548   ....   ....  6.388   ....   ....  6.392   ....   ....  3.546   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 106.5 /  4:   ....   ....   ....  4.433   ....   ....  6.918   ....   ....  5.481   ....   ....  3.056   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 137   /  5:   ....   ....   ....   ....  5.476   ....   ....  6.920   ....   ....  4.436   ....   ....  3.102   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 167.4 /  6:   ....   ....   ....   ....   ....  6.388   ....   ....  6.392   ....   ....  3.546   ....   ....  3.671   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 197.8 /  7:   ....   ....   ....   ....   ....   ....  6.918   ....   ....  5.481   ....   ....  3.056   ....   ....  4.606   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 228.3 /  8:   ....   ....   ....   ....   ....   ....   ....  6.920   ....   ....  4.436   ....   ....  3.102   ....   ....  5.651   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 258.7 /  9:   ....   ....   ....   ....   ....   ....   ....   ....  6.392   ....   ....  3.546   ....   ....  3.671   ....   ....  6.517   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 289.1 / 10:   ....   ....   ....   ....   ....   ....   ....   ....   ....  5.481   ....   ....  3.056   ....   ....  4.606   ....   ....  6.966   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 319.6 / 11:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  4.436   ....   ....  3.102   ....   ....  5.651   ....   ....  6.873   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 350   / 12:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  3.546   ....   ....  3.671   ....   ....  6.517   ....   ....  6.263   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 380.4 / 13:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  3.056   ....   ....  4.606   ....   ....  6.966   ....   ....  5.305   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 410.9 / 14:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  3.102   ....   ....  5.651   ....   ....  6.873   ....   ....  4.262   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 441.3 / 15:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  3.671   ....   ....  6.517   ....   ....  6.263   ....   ....  3.422   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 471.7 / 16:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  4.606   ....   ....  6.966   ....   ....  5.305   ....   ....  3.016   ....   ....   ....   ....   ....   ....   ....   ....   ....
 502.2 / 17:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  5.651   ....   ....  6.873   ....   ....  4.262   ....   ....  3.157   ....   ....   ....   ....   ....   ....   ....   ....
 532.6 / 18:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  6.517   ....   ....  6.263   ....   ....  3.422   ....   ....  3.806   ....   ....   ....   ....   ....   ....   ....
 563   / 19:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  6.966   ....   ....  5.305   ....   ....  3.016   ....   ....  4.784   ....   ....   ....   ....   ....   ....
 593.5 / 20:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  6.873   ....   ....  4.262   ....   ....  3.157   ....   ....  5.823   ....   ....   ....   ....   ....
 623.9 / 21:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  6.263   ....   ....  3.422   ....   ....  3.806   ....   ....  6.635   ....   ....   ....   ....
 654.3 / 22:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  5.305   ....   ....  3.016   ....   ....  4.784   ....   ....  6.998   ....   ....   ....
 684.8 / 23:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  4.262   ....   ....  3.157   ....   ....  5.823   ....   ....  6.809   ....   ....
 715.2 / 24:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  3.422   ....   ....  3.806   ....   ....  6.635   ....   ....  6.122   ....
 745.6 / 25:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....  3.016   ....   ....  4.784   ....   ....  6.998   ....   ....  5.125
SHADE /X=120W/Y=50N/Z=50 leadview
FRAME /FILE=forecast_leadview.gif
 
 
! Bug 2331: Labeling the labels in line-plot legends.
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
Go err700_legend_labels
! err700_legend_labels.jnl
! See ticket 2231:
!   - consistent labeling of units
!   - PLOT/KEY=title applies to PLOT/VS
 
cancel mode logo
cancel symbol lab*
use gt4d011.cdf
 
! Previously vertical label had Deg C, legend labels had units.
! Now label only the legend labels show the different units.
set v ul; plot/l=1/k=1/y=0/key=title temp, taux, tauy
annotate/norm/xpos=1/ypos=.5/halign=0/valign=-4/angle=-90/size=0.14 "Each label with units"
 
sh sym lab*  ! laby is not used
LABX = "LONGITUDE"
LAB1 = "DEPTH (m) : 5"
LABNUM_Z = "1"
LAB2 = "TIME : 17-AUG-1982 12:00"
LABNUM_T = "2"
LAB3 = "DATA SET: gt4d011"
LABNUM_DSET = "3"
LAB4 = "TEMPERATURE (deg. C)"
LABKEY = "MERIDIONAL WIND STRESS (dynes/cm**2)"
LAB5 = "ZONAL WIND STRESS (dynes/cm**2)"
LAB6 = "MERIDIONAL WIND STRESS (dynes/cm**2)"
can sym lab*
 
! Previously vertical label and legend labels had units.
! Now label only the vertical axis with the common units.
set v ur; plot/l=1/k=1/y=0/key=title taux, tauy
annotate/norm/xpos=1/ypos=.5/halign=0/valign=-4/angle=-90/size=0.14 "Common Units, labeled on left"
 
! legend labels now do not include units
sh sym lab*
LABX = "LONGITUDE"
LAB1 = "LATITUDE : 0"
LABNUM_Y = "1"
LAB2 = "TIME : 17-AUG-1982 12:00"
LABNUM_T = "2"
LAB3 = "DATA SET: gt4d011"
LABNUM_DSET = "3"
LABY = "dynes/cm**2"
LAB4 = "ZONAL WIND STRESS"
LABKEY = "MERIDIONAL WIND STRESS"
LAB5 = "MERIDIONAL WIND STRESS"
can sym lab*
 
! Define some variables with titles
let/title="Temperature Avg"/units="`temp,return=units`" tmpave = temp[L=@ave,z=@ave]
 !-> DEFINE VARIABLE/title="Temperature Avg"/units="deg. C" tmpave = temp[L=@ave,z=@ave]
let/title="September Taux"/units="`taux,return=units`" taux_s = taux[t=23-SEP-1982, k=1]
 !-> DEFINE VARIABLE/title="September Taux"/units="dynes/cm**2" taux_s = taux[t=23-SEP-1982, k=1]
let/title="January Taux"/units="`taux,return=units`" taux_j = taux[t=4-jan-1983, k=1]
 !-> DEFINE VARIABLE/title="January Taux"/units="dynes/cm**2" taux_j = taux[t=4-jan-1983, k=1]
 
! Set up a common set of axes for all variables
set v lower
plot/vs/sym=dot/y=0/nokey tmpave,taux_s,taux_j
annotate/norm/xpos=1/ypos=.5/halign=0/valign=-4/angle=-90/size=0.14 "PLOT/VS with KEY=title"
 
! Overlay; the legend titles are variable titles.
plot/over/vs/color=red/thick/siz=0.14/y=0/key=title tmpave,taux_s
plot/over/vs/color=green/thick/siz=0.14/y=0/key=title tmpave,taux_j
 
frame/file=legend_1d_plots.gif
 
! legend labels are titles
sh sym lab*
LABX = "Temperature Avg (deg. C)"
LAB1 = "January Taux"
LABNUM_Z = "1"
LAB2 = "DATA SET: gt4d011"
LABNUM_DSET = "2"
LABY = "dynes/cm**2"
LABKEY = "January Taux"
 
! Overlaying on a 2D field
 
DEFINE AXIS/T="1-JAN-1980":"1-JAN-1990":5/UNITS=DAYS tdays
DEFINE AXIS/Y=0:40N:2/UNITS=DEGREES yax
 
LET/TITLE=XY my_var = 10*cos(T[gt=tdays]/2000)*EXP((-1)*y[gy=yax]/20)
LET my_var2 = 10*cos(T[gt=tdays]/2000)*EXP((-1)*y[gy=yax]/20)
 
! make a Hovmoller plot
SHADE/nolab my_var
 
! PLOT/OVER without key=title shows the def in the line key
PLOT/OVER my_var[Y=@loc:-4]
PLOT/OVER my_var2[Y=@loc:-3]
 
! with /KEY=TITLE, the variable with a title uses that,
! variable without a title uses the variable name,
! an expression just puts the expression (same as w/o /key=title)
 
PLOT/OVER/KEY=TITLE my_var[Y=@loc:-2]
PLOT/OVER/KEY=TITLE my_var2[Y=@loc:-1]
 
PLOT/OVER/KEY=TITLE 10+cos(T[gt=tdays]/200)
 
set mode/last logo
 
! Bug 2507: time aggregations with same time axis in different grids per file
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
Go err700_aggt_dup_grids
! err700_aggt_dup_grids
! 2/15/2017 ACM
! Bug 2507: new time axis is identical in two tseries aggregation.
!  It exists in more than one grid. Previously the new time axis
!  was swapped into only one of the grids for the second aggregation.
 
! Define some datsets, with two variables with different grids each
! using a common time axis.
 
use  tmp/tagg_irreg_1.nc
define axis/x=1:1:1 xax1
let newvar = x[gx=xax1] + myvar
save/clobber/file=a1.nc myvar, newvar
can dat/all
use  tmp/tagg_irreg_2.nc
save/clobber/file=a2.nc myvar, newvar
 
can dat/all; can var/all
 
! Define two aggregations; the second should share the time axis
! that was set up in the first.
sp ln -sf a1.nc b1.nc
sp ln -sf a2.nc b2.nc
 
tseries a2var = a1.nc, a2.nc
tseries b2var = b1.nc, b2.nc
 
! previously the time axis of the second variable in b2var was
! listed as length 10
sh dat
     currently SET data sets:
    1> a2var
 name     title                             I         J         K         L
 MYVAR    SIN(T[GT=TDAY_IR]/10) + L[GT=TD  ...       ...       ...       1:20
 NEWVAR   X[GX=XAX1] + MYVAR               1:1       ...       ...       1:20
 
    2> b2var  (default)
 name     title                             I         J         K         L
 MYVAR    SIN(T[GT=TDAY_IR]/10) + L[GT=TD  ...       ...       ...       1:20
 NEWVAR   X[GX=XAX1] + MYVAR               1:1       ...       ...       1:20
 
 
*** Running ferret script: bn_delim_datetime.jnl
! bn_delim_datetime.jnl
! ACM 7/2016
!
! Tickets 2448, 2449, 2450: Improvements to date reading in delimited files.
! New: date/time fields for US and European style dates.
! Also report incorrect date/time spec (causes months out of range)
! and put 2-digit years prior to 50 in the 21st century. (prev. cutoff was year 20)
!
 
! File contains index,euro-date-time, us-date-time, us-date, eurodate
! The years in variables 3 and 4 are 2-digit years after year 2020.
 
! Ticket 2472: Allow yyyy/dd/mm in any of the date specs.
 
columns/skip=3/var="index,edtim,udtim,udate,edate"/type="num,edatime,datime,date,eurodate" delim_datetime.csv
sh dat
     currently SET data sets:
    1> ./data/delim_datetime.csv  (default)
 name     title                             I         J         K         L
 INDEX    index                            1:5       ...       ...       ...
 EDTIM    edtim                            1:5       ...       ...       ...
       (Julian days since 1-Jan-1900)
 UDTIM    udtim                            1:5       ...       ...       ...
       (Julian days since 1-Jan-1900)
 UDATE    udate                            1:5       ...       ...       ...
       (Julian days since 1-Jan-1900)
 EDATE    edate                            1:5       ...       ...       ...
       (Julian days since 1-Jan-1900)
 
list index,edtim,udtim,udate,edate
             DATA SET: ./data/delim_datetime.csv
             X: 0.5 to 5.5
 Column  1: INDEX is index
 Column  2: EDTIM is edtim (days)(Julian days since 1-Jan-1900)
 Column  3: UDTIM is udtim (days)(Julian days since 1-Jan-1900)
 Column  4: UDATE is udate (days)(Julian days since 1-Jan-1900)
 Column  5: EDATE is edate (days)(Julian days since 1-Jan-1900)
         INDEX   EDTIM   UDTIM   UDATE   EDATE
1   / 1:  1.000  41659.  43850.  34837.  33376.
2   / 2:  2.000  41659.  44216.  38490.  33407.
3   / 3:  3.000  41659.  44581.  42142.  33437.
4   / 4:  4.000  41659.  44946.  45795.  33468.
5   / 5:  5.000  41659.  45311.  49447.  33529.
 
! axis January 2014
define axis/t/t0=1-jan-1900/units=days timax = edtim
sh axis/t timax
 name       axis              # pts   start                end
 TIMAX     TIME                 5 i   22-JAN-2014 01:00    22-JAN-2014 05:20
T0 = 1-JAN-1900
   Axis span (to cell edges) = 0.2361111
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  22-JAN-2014 01:00:00      0.05556    22-JAN-2014 00:20:00        41659.04
       2>  22-JAN-2014 02:20:00      0.05556    22-JAN-2014 01:40:00        41659.1
       3>  22-JAN-2014 03:40:00      0.03472    22-JAN-2014 03:00:00        41659.15
       4>  22-JAN-2014 04:00:00      0.03472    22-JAN-2014 03:50:00        41659.17
       5>  22-JAN-2014 05:20:00      0.05556    22-JAN-2014 04:40:00        41659.22
 
! time axis in 1991
define axis/t/t0=1-jan-1900/units=days timax = edate
sh axis/t timax
 name       axis              # pts   start                end
 TIMAX     TIME                 5 i   20-MAY-1991 00:00    20-OCT-1991 00:00
T0 = 1-JAN-1900
   Axis span (to cell edges) = 199
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  20-MAY-1991 00:00:00      31         04-MAY-1991 12:00:00        33376
       2>  20-JUN-1991 00:00:00      30.5       04-JUN-1991 12:00:00        33407
       3>  20-JUL-1991 00:00:00      30.5       05-JUL-1991 00:00:00        33437
       4>  20-AUG-1991 00:00:00      46         04-AUG-1991 12:00:00        33468
       5>  20-OCT-1991 00:00:00      61         19-SEP-1991 12:00:00        33529
 
! time axis in 2020 - 2024
define axis/t/t0=1-jan-1900/units=days timax = udtim
sh axis/t timax
 name       axis              # pts   start                end
 TIMAX     TIME                 5 i   22-JAN-2020 06:40    22-JAN-2024 10:40
T0 = 1-JAN-1900
   Axis span (to cell edges) = 1826.708
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  22-JAN-2020 06:40:00      366.0417   23-JUL-2019 06:10:00        43850.28
       2>  22-JAN-2021 07:40:00      365.5417   23-JUL-2020 07:10:00        44216.32
       3>  22-JAN-2022 08:40:00      365.0417   23-JUL-2021 20:10:00        44581.36
       4>  22-JAN-2023 09:40:00      365.0417   23-JUL-2022 21:10:00        44946.4
       5>  22-JAN-2024 10:40:00      365.0417   23-JUL-2023 22:10:00        45311.44
 
! time axis in 1995 - 2035
define axis/t/t0=1-jan-1900/units=days timax = udate
sh axis/t timax
 name       axis              # pts   start                end
 TIMAX     TIME                 5 i   20-MAY-1995 00:00    20-MAY-2035 00:00
T0 = 1-JAN-1900
   Axis span (to cell edges) = 18262.5
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  20-MAY-1995 00:00:00      3653       19-MAY-1990 12:00:00        34837
       2>  20-MAY-2005 00:00:00      3652.5     19-MAY-2000 12:00:00        38490
       3>  20-MAY-2015 00:00:00      3652.5     20-MAY-2010 00:00:00        42142
       4>  20-MAY-2025 00:00:00      3652.5     19-MAY-2020 12:00:00        45795
       5>  20-MAY-2035 00:00:00      3652       20-MAY-2030 00:00:00        49447
 
! Dates of yyyy/dd/mm
! Dates with 00/00/00 return missing-data
 
columns/skip=2/var="index,udate,udtim"/type="num,date,datime" delim_yyyy.csv
sh dat
     currently SET data sets:
    1> ./data/delim_datetime.csv
 name     title                             I         J         K         L
 INDEX    index                            1:5       ...       ...       ...
 EDTIM    edtim                            1:5       ...       ...       ...
       (Julian days since 1-Jan-1900)
 UDTIM    udtim                            1:5       ...       ...       ...
       (Julian days since 1-Jan-1900)
 UDATE    udate                            1:5       ...       ...       ...
       (Julian days since 1-Jan-1900)
 EDATE    edate                            1:5       ...       ...       ...
       (Julian days since 1-Jan-1900)
 
    2> ./data/delim_yyyy.csv  (default)
 name     title                             I         J         K         L
 INDEX    index                            1:6       ...       ...       ...
 UDATE    udate                            1:6       ...       ...       ...
       (Julian days since 1-Jan-1900)
 UDTIM    udtim                            1:6       ...       ...       ...
       (Julian days since 1-Jan-1900)
 
list/prec=10 index,udate,udtim
             DATA SET: ./data/delim_yyyy.csv
             X: 0.5 to 6.5
 Column  1: INDEX is index
 Column  2: UDATE is udate (days)(Julian days since 1-Jan-1900)
 Column  3: UDTIM is udtim (days)(Julian days since 1-Jan-1900)
               INDEX      UDATE        UDTIM
1   / 1:  1.000000000  40920.00000  37243.27778
2   / 2:  2.000000000  40921.00000  37243.31944
3   / 3:  3.000000000  40923.00000  37243.36111
4   / 4:  4.000000000  40924.00000  37243.40278
5   / 5:  5.000000000         ....  37243.48611
6   / 6:  6.000000000  40925.00000  37243.61111
 
! axis January 2014
define axis/t/t0=1-jan-1900/units=days timax = udate[i=1:4]
sh axis/t timax
 name       axis              # pts   start                end
 TIMAX     TIME                 4 i   14-JAN-2012 00:00    18-JAN-2012 00:00
T0 = 1-JAN-1900
   Axis span (to cell edges) = 5
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  14-JAN-2012 00:00:00      1          13-JAN-2012 12:00:00        40920
       2>  15-JAN-2012 00:00:00      1.5        14-JAN-2012 12:00:00        40921
       3>  17-JAN-2012 00:00:00      1.5        16-JAN-2012 00:00:00        40923
       4>  18-JAN-2012 00:00:00      1          17-JAN-2012 12:00:00        40924
! axis December 2001
define axis/t/t0=1-jan-1900/units=days timax = udtim
sh axis/t timax
 name       axis              # pts   start                end
 TIMAX     TIME                 6 i   20-DEC-2001 06:40    20-DEC-2001 14:40
T0 = 1-JAN-1900
   Axis span (to cell edges) = 0.4166667
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  20-DEC-2001 06:40:00      0.04167    20-DEC-2001 06:10:00        37243.28
       2>  20-DEC-2001 07:40:00      0.04167    20-DEC-2001 07:10:00        37243.32
       3>  20-DEC-2001 08:40:00      0.04167    20-DEC-2001 08:10:00        37243.36
       4>  20-DEC-2001 09:40:00      0.0625     20-DEC-2001 09:10:00        37243.4
       5>  20-DEC-2001 11:40:00      0.1041667  20-DEC-2001 10:40:00        37243.49
       6>  20-DEC-2001 14:40:00      0.125      20-DEC-2001 13:10:00        37243.61
 
 
! Intentional errors, specifying the wrong date field type (catches the first error)
! The error is found upon reading the file.
 
set mode ignore
can dat/all
columns/skip=3/var="index,edtim,udtim,udate,edate"/type="num,datime,datime,date,date" delim_datetime.csv
list index,edtim,udtim,udate,edate
 
can dat/all
columns/skip=3/var="index,edtim,udtim,udate,edate"/type="num,edatime,edatime,date,eurodate" delim_datetime.csv
list index,edtim,udtim,udate,edate
 
can dat/all
columns/skip=3/var="index,edtim,udtim,udate,edate"/type="num,edatime,datime,eurodate,date" delim_datetime.csv
list index,edtim,udtim,udate,edate
 
can dat/all
columns/skip=3/var="index,edtim,udtim,udate,edate"/type="num,edatime,datime,date,date" delim_datetime.csv
list index,edtim,udtim,udate,edate
 
set mode/last ignore
 
 
*** Running ferret script: bn_aggregate_u.jnl
! bn_aggregate_u.jnl
! Union aggregations including tests of UNION in combination
! with TSERIES, ENSEMBLE, and FMRC aggregations
! acm 7/15/2016
 
! create some variables in separate datasets.
 
SPAWN "mkdir -p tmp"
 
define axis/t=1-jan-2010:10-jan-2010:1/units=days/t0=1-jan-2010 tax
let/title=sst  sst = x[x=1:5] + 1.3*y[y=1:4] + t[gt=tax]
let/title=temp temp = 0.8*x[x=1:5] - y[y=1:4] + t[gt=tax]
let/title=U    u = x[x=1:5] + 0.4*y[y=1:4] - 1.1* t[gt=tax]
let/title=V    v = x[x=1:5] - 0.2*y[y=1:4] + 1.1* t[gt=tax]
 
save/clobber/file="tmp/uagg_1.nc" sst
save/clobber/file="tmp/uagg_2.nc" temp
save/clobber/file="tmp/uagg_3.nc" u
save/clobber/file="tmp/uagg_4.nc" v
 
save/l=1:3/clobber/file="tmp/uagg_1_t1.nc" sst
save/l=4:6/clobber/file="tmp/uagg_1_t2.nc" sst
save/l=7:10/clobber/file="tmp/uagg_1_t3.nc" sst
 
can dat/all
union tmp/uagg_1.nc,tmp/uagg_2.nc,tmp/uagg_3.nc,tmp/uagg_4.nc
sh dat
     currently SET data sets:
    5> ./v7jnls/bn_aggregate_u.jnl  (default)  Union aggregation
 name     title                             I         J         K         L
 SST      sst                              1:5       1:4       ...       1:10
 TEMP     temp                             1:5       1:4       ...       1:10
 U        U                                1:5       1:4       ...       1:10
 V        V                                1:5       1:4       ...       1:10
 
vec/l=5 u,v
 
cancel dat/all
 
! issue a note if a variable is already in the Union
! a new file with different defiontions of sst and temp
!
let/title="sst in uagg_5"  sst = 1.1*x[x=1:5] + 1.3*y[y=1:4] + t[gt=tax]
let/title="temp in uagg_5" temp = 0.9*x[x=1:5] - y[y=1:4] + t[gt=tax]
save/clobber/file="tmp/uagg_5.nc" sst,temp
 
! In the union set, sst comes from uagg_1, temp comes from uagg_5
union uu = tmp/uagg_1.nc,tmp/uagg_5.nc
sh dat/att
     currently SET data sets:
    3> uu  (default)  Union aggregation
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               aggregate name  CHAR        2    F       uu
  
 SST                   FLOAT     long_name       CHAR        3    T       sst
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 TEMP                  FLOAT     long_name       CHAR        14   T       temp in uagg_5
                                 missing_value   DOUBLE      1    T       -1.E+34
  
can dat/all
 
! Or use /quiet to supress the note
union/quiet uu = tmp/uagg_1.nc,tmp/uagg_5.nc
 
let tnames = SPAWN("ls -1 tmp/uagg_1_*.nc")
tseries  temp_time_agg = tnames
sh dat
     currently SET data sets:
    3> uu     Union aggregation
 name     title                             I         J         K         L
 SST      sst                              1:5       1:4       ...       1:10
 TEMP     temp in uagg_5                   1:5       1:4       ...       1:10
 
    4> temp_time_agg  (default)
 name     title                             I         J         K         L
 SST      sst                              1:5       1:4       ...       1:10
 
union temp_time_agg, tmp/uagg_2.nc,tmp/uagg_3.nc,tmp/uagg_4.nc
 
shade/l=2 sst - temp
 
 
can dat/all; can var/all
 
! exercise 6D aggregations: UNION with T, E, and F simultaneously
 
! do not bother to echo the creation of files and the definitions of the
! many time aggregations
CANCEL MODE VERIFY
! define T aggregations
 
! timeseries of files with variable fcst_1
repeat/name=fdate/range=1:7:3 (\
  let tstart = t[gt=monthly,l=`fdate`];\
  repeat/name=ens/range=1:2:1 (\
    let realization = `ens`;\
    TSERIES  t_f`(fdate-1)/3+1,zw=2`_e`ens` = SPAWN("ls -1 tmp/f`(fdate-1)/3+1,zw=2`_e`ens`_t?.nc")  ))
!-> REPEAT: FDATE:1
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=1]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> DEFINE DATA/AGGREGAT/T  t_f01_e1 = SPAWN("ls -1 tmp/f01_e1_t?.nc")
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> DEFINE DATA/AGGREGAT/T  t_f01_e2 = SPAWN("ls -1 tmp/f01_e2_t?.nc")
!-> REPEAT: FDATE:4
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=4]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> DEFINE DATA/AGGREGAT/T  t_f02_e1 = SPAWN("ls -1 tmp/f02_e1_t?.nc")
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> DEFINE DATA/AGGREGAT/T  t_f02_e2 = SPAWN("ls -1 tmp/f02_e2_t?.nc")
!-> REPEAT: FDATE:7
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=7]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> DEFINE DATA/AGGREGAT/T  t_f03_e1 = SPAWN("ls -1 tmp/f03_e1_t?.nc")
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> DEFINE DATA/AGGREGAT/T  t_f03_e2 = SPAWN("ls -1 tmp/f03_e2_t?.nc")
 
! timeseries of files with variable fcst_3
repeat/name=fdate/range=1:7:3 (\
  let tstart = t[gt=monthly,l=`fdate`];\
  repeat/name=ens/range=1:2:1 (\
    let realization = `ens`;\
    TSERIES  t_f`(fdate-1)/3+1,zw=2`_e`ens`_3 = SPAWN("ls -1 tmp/f`(fdate-1)/3+1,zw=2`_e`ens`_tu?.nc")  ))
!-> REPEAT: FDATE:1
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=1]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> DEFINE DATA/AGGREGAT/T  t_f01_e1_3 = SPAWN("ls -1 tmp/f01_e1_tu?.nc")
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> DEFINE DATA/AGGREGAT/T  t_f01_e2_3 = SPAWN("ls -1 tmp/f01_e2_tu?.nc")
!-> REPEAT: FDATE:4
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=4]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> DEFINE DATA/AGGREGAT/T  t_f02_e1_3 = SPAWN("ls -1 tmp/f02_e1_tu?.nc")
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> DEFINE DATA/AGGREGAT/T  t_f02_e2_3 = SPAWN("ls -1 tmp/f02_e2_tu?.nc")
!-> REPEAT: FDATE:7
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=7]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> DEFINE DATA/AGGREGAT/T  t_f03_e1_3 = SPAWN("ls -1 tmp/f03_e1_tu?.nc")
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> DEFINE DATA/AGGREGAT/T  t_f03_e2_3 = SPAWN("ls -1 tmp/f03_e2_tu?.nc")
 
cancel variable realization
 
SET MODE VERIFY
! now union these to make datsets with fcnst_1 and fcst_3.
 
show data/files/br;
     currently SET data sets:
    1> t_f01_e1
tmp/f01_e1_t1.nc
tmp/f01_e1_t2.nc
tmp/f01_e1_t3.nc
 
    2> t_f01_e2
tmp/f01_e2_t1.nc
tmp/f01_e2_t2.nc
tmp/f01_e2_t3.nc
 
    3> t_f02_e1
tmp/f02_e1_t1.nc
tmp/f02_e1_t2.nc
tmp/f02_e1_t3.nc
 
    4> t_f02_e2
tmp/f02_e2_t1.nc
tmp/f02_e2_t2.nc
tmp/f02_e2_t3.nc
 
    5> t_f03_e1
tmp/f03_e1_t1.nc
tmp/f03_e1_t2.nc
tmp/f03_e1_t3.nc
 
    6> t_f03_e2
tmp/f03_e2_t1.nc
tmp/f03_e2_t2.nc
tmp/f03_e2_t3.nc
 
    7> t_f01_e1_3
tmp/f01_e1_tu1.nc
tmp/f01_e1_tu2.nc
tmp/f01_e1_tu3.nc
 
    8> t_f01_e2_3
tmp/f01_e2_tu1.nc
tmp/f01_e2_tu2.nc
tmp/f01_e2_tu3.nc
 
    9> t_f02_e1_3
tmp/f02_e1_tu1.nc
tmp/f02_e1_tu2.nc
tmp/f02_e1_tu3.nc
 
   10> t_f02_e2_3
tmp/f02_e2_tu1.nc
tmp/f02_e2_tu2.nc
tmp/f02_e2_tu3.nc
 
   11> t_f03_e1_3
tmp/f03_e1_tu1.nc
tmp/f03_e1_tu2.nc
tmp/f03_e1_tu3.nc
 
   12> t_f03_e2_3  (default)
tmp/f03_e2_tu1.nc
tmp/f03_e2_tu2.nc
tmp/f03_e2_tu3.nc
 
 
DEFINE DATA/AGGREGAT/U  u1 = t_f01_e1_3, t_f01_e1
DEFINE DATA/AGGREGAT/U  u2 = t_f01_e2, t_f01_e2_3
show data u1 u2
     currently SET data sets:
   13> u1     Union aggregation
 name     title                             I         J         K         L
 FCST_3   another variable                 1:21      1:11      1:1       1:36
       (L=1:12)
 REALIZATION
          1                                ...       ...       ...       ...
 FCST     some variable                    1:21      1:11      1:1       1:36
       (L=1:12)
 FCST_2   another variable                 1:21      1:11      1:1       1:36
       (L=1:12)
 
can data u1 u2
 
! Make a batch of files, timeseries aggregations union-ed.
! the /QUIET supresses the note about skipping duplicate variables.
repeat/name=fdate/range=1:7:3 (\
  let tstart = t[gt=monthly,l=`fdate`];\
  repeat/name=ens/range=1:2:1 (\
    let realization = `ens`;\
    UNION/quiet  t_f_u`(fdate-1)/3+1,zw=2`_e`ens` = t_f`(fdate-1)/3+1,zw=2`_e`ens`, t_f`(fdate-1)/3+1,zw=2`_e`ens`_3;\
    show data/br t_f_u`(fdate-1)/3+1,zw=2`_e`ens`))
!-> REPEAT: FDATE:1
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=1]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> DEFINE DATA/AGGREGAT/U/quiet  t_f_u01_e1 = t_f01_e1, t_f01_e1_3
 !-> show data/br t_f_u01_e1
     currently SET data sets:
   13> t_f_u01_e1  (default)  Union aggregation
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> DEFINE DATA/AGGREGAT/U/quiet  t_f_u01_e2 = t_f01_e2, t_f01_e2_3
 !-> show data/br t_f_u01_e2
     currently SET data sets:
   14> t_f_u01_e2  (default)  Union aggregation
!-> REPEAT: FDATE:4
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=4]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> DEFINE DATA/AGGREGAT/U/quiet  t_f_u02_e1 = t_f02_e1, t_f02_e1_3
 !-> show data/br t_f_u02_e1
     currently SET data sets:
   15> t_f_u02_e1  (default)  Union aggregation
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> DEFINE DATA/AGGREGAT/U/quiet  t_f_u02_e2 = t_f02_e2, t_f02_e2_3
 !-> show data/br t_f_u02_e2
     currently SET data sets:
   16> t_f_u02_e2  (default)  Union aggregation
!-> REPEAT: FDATE:7
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=7]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> DEFINE DATA/AGGREGAT/U/quiet  t_f_u03_e1 = t_f03_e1, t_f03_e1_3
 !-> show data/br t_f_u03_e1
     currently SET data sets:
   17> t_f_u03_e1  (default)  Union aggregation
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> DEFINE DATA/AGGREGAT/U/quiet  t_f_u03_e2 = t_f03_e2, t_f03_e2_3
 !-> show data/br t_f_u03_e2
     currently SET data sets:
   18> t_f_u03_e2  (default)  Union aggregation
 
cancel variable realization
 
! should share the same time axis
show grid fcst[d=t_f01_e1]
    GRID GBT1
 name       axis              # pts   start                end                 subset
 XAX       LONGITUDE           21mr   140E                 160E                full
 YAX       LATITUDE            11 r   10N                  20N                 full
 ZAX1      Z (m)                1 r   250                  250                 full
 MONTHLY1  TIME                36 r   16-JAN-1950 05:14    16-DEC-1952 12:13   full
show grid fcst_3[d=t_f_u01_e2]
    GRID GBT1
 name       axis              # pts   start                end                 subset
 XAX       LONGITUDE           21mr   140E                 160E                full
 YAX       LATITUDE            11 r   10N                  20N                 full
 ZAX1      Z (m)                1 r   250                  250                 full
 MONTHLY1  TIME                36 r   16-JAN-1950 05:14    16-DEC-1952 12:13   full
 
! Now go on and aggregate these time & union aggregations, in E and F
 
! ======== TEST SET 1:  aggregate E first, then F
 
! define tue aggregations -- only the first remains unhidden
ENSEMBLE      tue_f01 = t_f_u01_e1, t_f_u01_e2
ENSEMBLE/hide tue_f02 = t_f_u02_e1, t_f_u02_e1
ENSEMBLE/hide tue_f03 = t_f_u03_e1, t_f_u03_e2
SHOW DATA/brief
     currently SET data sets:
    1> t_f01_e1
    2> t_f01_e2
    3> t_f02_e1
    4> t_f02_e2
    5> t_f03_e1
    6> t_f03_e2
    7> t_f01_e1_3
    8> t_f01_e2_3
    9> t_f02_e1_3
   10> t_f02_e2_3
   11> t_f03_e1_3
   12> t_f03_e2_3
   13> t_f_u01_e1     Union aggregation
   14> t_f_u01_e2     Union aggregation
   16> t_f_u02_e2     Union aggregation
   19> tue_f01     Ensemble aggregation
   20> tue_f02     Ensemble aggregation
   21> tue_f03  (default)  Ensemble aggregation
SHOW DATA/FULL tue_f03
     currently SET data sets:
   21> tue_f03  (default)  Ensemble aggregation
     Ensemble series of 2 datasets patterned on t_f_u03_e1
 name     title                             I         J         K         L         M         N
 FCST     some variable                    1:21      1:11      1:1       1:36      1:2       ...
       (L=7:18)
               on grid GEN13 with -1.E+34 for missing data
             X=139.5E:160.5E  Y=9.5N:20.5N  Z=249.5:250.5  E=0.5:2.5  
 FCST_2   another variable                 1:21      1:11      1:1       1:36      1:2       ...
       (L=7:18)
               on grid GEN13 with -1.E+34 for missing data
             X=139.5E:160.5E  Y=9.5N:20.5N  Z=249.5:250.5  E=0.5:2.5  
 REALIZATION
          1                                ...       ...       ...       ...       1:2       ...
               on grid GGE3 with -1.E+34 for missing data
             E=0.5:2.5  
 FCST_3   another variable                 1:21      1:11      1:1       1:36      1:2       ...
       (L=7:18)
               on grid GEN13 with -1.E+34 for missing data
             X=139.5E:160.5E  Y=9.5N:20.5N  Z=249.5:250.5  E=0.5:2.5  
 ------------------------------
 MEMBER_DSET
          Member dataset names in Ensembl  ...       ...       ...       ...       1:2       ...
            Data type = TEXT
               on grid GGE3 with -1.E+34 for missing data
             E=0.5:2.5  
 
  time range: 17-JUL-1950 20:09 to 17-JUN-1953 03:07
 
          Member datasets:
      21.1: t_f_u03_e1
      21.2: t_f_u03_e2
SHOW DATA/ATT tue_f03   ! notice the promotion of fcst.im_everywhere
     currently SET data sets:
   21> tue_f03  (default)  Ensemble aggregation
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               aggregate name  CHAR        7    F       tue_f03
  
 FCST                  FLOAT     long_name       CHAR        13   T       some variable
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 FCST_2                FLOAT     long_name       CHAR        16   T       another variable
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 REALIZATION           FLOAT     long_name       CHAR        1    T       1
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 FCST_3                FLOAT     long_name       CHAR        16   T       another variable
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 member_dset           CHAR      long_name       CHAR        32   T       Member dataset names in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 
! define tuef aggregation
FMRC/HIDE tuef = tue_f01, tue_f02, tue_f03
SHOW DATA/brief/files
     currently SET data sets:
    1> t_f01_e1
tmp/f01_e1_t1.nc
tmp/f01_e1_t2.nc
tmp/f01_e1_t3.nc
 
    2> t_f01_e2
tmp/f01_e2_t1.nc
tmp/f01_e2_t2.nc
tmp/f01_e2_t3.nc
 
    3> t_f02_e1
tmp/f02_e1_t1.nc
tmp/f02_e1_t2.nc
tmp/f02_e1_t3.nc
 
    4> t_f02_e2
tmp/f02_e2_t1.nc
tmp/f02_e2_t2.nc
tmp/f02_e2_t3.nc
 
    5> t_f03_e1
tmp/f03_e1_t1.nc
tmp/f03_e1_t2.nc
tmp/f03_e1_t3.nc
 
    6> t_f03_e2
tmp/f03_e2_t1.nc
tmp/f03_e2_t2.nc
tmp/f03_e2_t3.nc
 
    7> t_f01_e1_3
tmp/f01_e1_tu1.nc
tmp/f01_e1_tu2.nc
tmp/f01_e1_tu3.nc
 
    8> t_f01_e2_3
tmp/f01_e2_tu1.nc
tmp/f01_e2_tu2.nc
tmp/f01_e2_tu3.nc
 
    9> t_f02_e1_3
tmp/f02_e1_tu1.nc
tmp/f02_e1_tu2.nc
tmp/f02_e1_tu3.nc
 
   10> t_f02_e2_3
tmp/f02_e2_tu1.nc
tmp/f02_e2_tu2.nc
tmp/f02_e2_tu3.nc
 
   11> t_f03_e1_3
tmp/f03_e1_tu1.nc
tmp/f03_e1_tu2.nc
tmp/f03_e1_tu3.nc
 
   12> t_f03_e2_3
tmp/f03_e2_tu1.nc
tmp/f03_e2_tu2.nc
tmp/f03_e2_tu3.nc
 
   13> t_f_u01_e1     Union aggregation
t_f_u03_e2
t_f_u03_e2
   14> t_f_u01_e2     Union aggregation
t_f_u03_e2
t_f_u03_e2
   16> t_f_u02_e2     Union aggregation
t_f_u03_e2
t_f_u03_e2
   22> tuef  (default)  Forecast aggregation
t_f_u03_e2
t_f_u03_e2
t_f_u03_e2
show data/full tuef
     currently SET data sets:
   22> tuef  (default)  Forecast aggregation
     Forecast series of 3 datasets patterned on tue_f01
 name     title                             I         J         K         L         M         N
 FCST     some variable                    1:21      1:11      1:1       1:36      1:2       1:3
       (L=1:12)
               on grid GFN1 with -1.E+34 for missing data
             X=139.5E:160.5E  Y=9.5N:20.5N  Z=249.5:250.5  E=0.5:2.5  F=16-NOV-1949 08:16:17-AUG-1950 06:38  
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:36      ...       1:9
             days since 01-JAN-1900 on grid FTI11 with -1.E+34 for missing data
             F=16-DEC-1949 18:45:16-SEP-1950 17:07  
 FCST_2   another variable                 1:21      1:11      1:1       1:36      1:2       1:3
       (L=1:12)
               on grid GFN1 with -1.E+34 for missing data
             X=139.5E:160.5E  Y=9.5N:20.5N  Z=249.5:250.5  E=0.5:2.5  F=16-NOV-1949 08:16:17-AUG-1950 06:38  
 FCST_3   another variable                 1:21      1:11      1:1       1:36      1:2       1:3
       (L=1:12)
               on grid GFN1 with -1.E+34 for missing data
             X=139.5E:160.5E  Y=9.5N:20.5N  Z=249.5:250.5  E=0.5:2.5  F=16-NOV-1949 08:16:17-AUG-1950 06:38  
 
  time range: 15.21844 to 1080.50906
 
          Member datasets:
      22.1: tue_f01
      22.2: tue_f02
      22.3: tue_f03
 
! The time-union-ensemble-forecast aggregation
 
set data tuef
show data tuef
     currently SET data sets:
   22> tuef  (default)  Forecast aggregation
 name     title                             I         J         K         L         M         N
 FCST     some variable                    1:21      1:11      1:1       1:36      1:2       1:3
       (L=1:12)
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:36      ...       1:9
 FCST_2   another variable                 1:21      1:11      1:1       1:36      1:2       1:3
       (L=1:12)
 FCST_3   another variable                 1:21      1:11      1:1       1:36      1:2       1:3
       (L=1:12)
 
sh grid fcst
    GRID (G###)  Forecast Aggregation Grid
 name       axis              # pts   start                end                 subset
 XAX       LONGITUDE           21mr   140E                 160E                full
 YAX       LATITUDE            11 r   10N                  20N                 full
 ZAX1      Z (m)                1 r   250                  250                 full
 TF_LAG_T  MODEL ELAPSED TIME  36 r   15.218               1080.5              full
 ENSEMBLE  E (realization)      2 r   1                    2                   full
 RUN       FORECAST             3 r   01-JAN-1950 00:00    02-JUL-1950 14:54   full
sh grid fcst_3
    GRID (G###)  Forecast Aggregation Grid
 name       axis              # pts   start                end                 subset
 XAX       LONGITUDE           21mr   140E                 160E                full
 YAX       LATITUDE            11 r   10N                  20N                 full
 ZAX1      Z (m)                1 r   250                  250                 full
 TF_LAG_T  MODEL ELAPSED TIME  36 r   15.218               1080.5              full
 ENSEMBLE  E (realization)      2 r   1                    2                   full
 RUN       FORECAST             3 r   01-JAN-1950 00:00    02-JUL-1950 14:54   full
 
! simplest acess -- compact form -- just demonstrate it doesn't fail
stat/brief fcst[i=11:12, j=5:6, l=31:32, m=1:2, n=2:3]
 
 Total # of data points: 32 (2*2*1*2*2*2)
 # flagged as bad  data: 0
 Minimum value: 224.77
 Maximum value: 237.75
 Mean    value: 228.15 (unweighted average)
stat/brief fcst_3[i=11:12, j=5:6, l=31:32, m=1:2, n=2:3]
 
 Total # of data points: 32 (2*2*1*2*2*2)
 # flagged as bad  data: 0
 Minimum value: 227.77
 Maximum value: 240.8
 Mean    value: 231.16 (unweighted average)
 
DEFINE SYMBOL TF_CAL_T = `fcst._cal_t_ax`
 !-> DEFINE SYMBOL TF_CAL_T = TF_CAL_T
DEFINE SYMBOL TF_LAG_F = `fcst._lag_f_ax`
 !-> DEFINE SYMBOL TF_LAG_F = TF_LAG_F
DEFINE SYMBOL TF_LAG_T = `fcst._lag_t_ax`
 !-> DEFINE SYMBOL TF_LAG_T = TF_LAG_T
DEFINE SYMBOL TF_CAL_F = `fcst._cal_f_ax`
 !-> DEFINE SYMBOL TF_CAL_F = TF_CAL_F
 
! lead view of ensemble mean
let fcstfine = fcst[gt=($TF_LAG_T)@BIN,gf=($TF_CAL_F)@BIN]
 !-> DEFINE VARIABLE fcstfine = fcst[gt=TF_LAG_T@BIN,gf=TF_CAL_F@BIN]
let lead_fcst = fcstfine[gt(TF_TIMES)=($TF_CAL_T),gf(TF_TIMES)=($TF_LAG_F)]
 !-> DEFINE VARIABLE lead_fcst = fcstfine[gt(TF_TIMES)=TF_CAL_T,gf(TF_TIMES)=TF_LAG_F]
shade/x=150E/y=15n lead_fcst[m=1:2@ave]
 
let fcst3fine = fcst_3[gt=($TF_LAG_T)@BIN,gf=($TF_CAL_F)@BIN]
 !-> DEFINE VARIABLE fcst3fine = fcst_3[gt=TF_LAG_T@BIN,gf=TF_CAL_F@BIN]
let lead_fcst_3 = fcst3fine[gt(TF_TIMES)=($TF_CAL_T),gf(TF_TIMES)=($TF_LAG_F)]
 !-> DEFINE VARIABLE lead_fcst_3 = fcst3fine[gt(TF_TIMES)=TF_CAL_T,gf(TF_TIMES)=TF_LAG_F]
shade/x=150E/y=15n lead_fcst[m=1:2@ave]
 
! the difference will be just a small variation from the value 3
let diff_of_union = lead_fcst - lead_fcst_3
 
shade/x=150E/y=15n  diff_of_union[m=1:2@ave]
CANCEL DATA/ALL
 
 
*** Running ferret script: bn_ez_noupcase.jnl
! bn_ez_noupcase.jnl
! 7/2016 *acm* see ticket 2454
!
! Handle variable-name upcasing for Ascii data
! in the same way as for netcdf variables.
! Previously they were resolutely up-cased and the
! lowercase version was unavailable.
 
can mode upcase
 
let abc = {2,4,6,8,6}
list/clobber/nohead/norow/file=abc.dat abc
can var/all
file/var=abc abc.dat
sh dat
     currently SET data sets:
    1> ./abc.dat  (default)
 name     title                             I         J         K         L
 abc      abc                              1:5       ...       ...       ...
 
sh dat/att
     currently SET data sets:
    1> ./abc.dat  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        7    F       abc.dat
  
 abc                   DOUBLE    long_name       CHAR        3    T       abc
                                 missing_value   DOUBLE      1    T       -1.E+34
  
save/clobber/file=a.nc abc
sp ncdump -h a.nc
netcdf a {
dimensions:
	AX002 = 5 ;
variables:
	double AX002(AX###) ;
		AX002:point_spacing = "even" ;
		AX002:axis = "X" ;
	double abc(AX###) ;
		abc:missing_value = -1.e+34 ;
		abc:_FillValue = -1.e+34 ;
		abc:long_name = "abc" ;
		abc:history = "From abc.dat" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
! Delimited read
columns/skip=1/var="lab,nothing,var,latitude,longitude"/type="text,text,num,latitude,longitude" bn_delimited_read_1.dat
sh dat
     currently SET data sets:
    1> ./abc.dat
 name     title                             I         J         K         L
 abc      abc                              1:5       ...       ...       ...
 
    2> ./data/bn_delimited_read_1.dat  (default)
 name     title                             I         J         K         L
 lab      lab                              1:6       ...       ...       ...
 nothing  nothing                          1:6       ...       ...       ...
 var      var                              1:6       ...       ...       ...
 latitude latitude                         1:6       ...       ...       ...
       (Latitude)
 longitude
          longitude                        1:6       ...       ...       ...
       (Longitude)
 
sh dat/att
     currently SET data sets:
    1> ./abc.dat
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        7    F       abc.dat
  
 abc                   DOUBLE    long_name       CHAR        3    T       abc
                                 missing_value   DOUBLE      1    T       -1.E+34
  
    2> ./data/bn_delimited_read_1.dat  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        23   F       bn_delimited_read_1.dat
  
 lab                   CHAR      long_name       CHAR        3    T       lab
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 nothing               CHAR      long_name       CHAR        7    T       nothing
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 var                   DOUBLE    long_name       CHAR        3    T       var
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 latitude              DOUBLE    long_name       CHAR        8    T       latitude
                                 units           CHAR        13   T       degrees_north
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 longitude             DOUBLE    long_name       CHAR        9    T       longitude
                                 units           CHAR        12   T       degrees_east
                                 missing_value   DOUBLE      1    T       -1.E+34
  
sav/file=a.nc/clobber var,longitude,latitude
sp ncdump -h a.nc
netcdf a {
dimensions:
	AX003 = 6 ;
variables:
	double AX003(AX###) ;
		AX003:point_spacing = "even" ;
		AX003:axis = "X" ;
	double var(AX###) ;
		var:missing_value = -1.e+34 ;
		var:_FillValue = -1.e+34 ;
		var:long_name = "var" ;
		var:history = "From bn_delimited_read_1.dat" ;
	double longitude(AX###) ;
		longitude:missing_value = -1.e+34 ;
		longitude:_FillValue = -1.e+34 ;
		longitude:long_name = "longitude" ;
		longitude:units = "degrees_east" ;
		longitude:long_name_mod = "Longitude" ;
		longitude:history = "From bn_delimited_read_1.dat" ;
	double latitude(AX###) ;
		latitude:missing_value = -1.e+34 ;
		latitude:_FillValue = -1.e+34 ;
		latitude:long_name = "latitude" ;
		latitude:units = "degrees_north" ;
		latitude:long_name_mod = "Latitude" ;
		latitude:history = "From bn_delimited_read_1.dat" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
set mode/last upcase
*** Running ferret script: bn_spawn_fail.jnl
! bn_spawn_fail.jnl
!  See ticket 2453
!  If a no-success flag is returned from a SPAWN,
!  report that as a warning.
!  8/2016 *acm*
 
sp ls notafile.nowhere
sp grep "this text is not in the file" genjnls/bn_all.jnl
sp rm nothing.dat
sp grep modulus data/non_COARDS.cdl
sp cp nofile.dat not_either.dat
*** Running ferret script: bn_ave_of_ave.jnl
! bn_ave_of_ave.jnl
! see ticket 2469
 
let a = x[gx=1:3:1] + t[gt=1:7:1]
let a_xav = a[x=@ave]
let a_dev = a - a_xav
 
list a_dev[x=@ave]
             VARIABLE : A - A_XAV
             SUBSET   : 7 points (T)
             X        : 0.5 to 3.5 (averaged)
 1   / 1:  0.0000
 2   / 2:  0.0000
 3   / 3:  0.0000
 4   / 4:  0.0000
 5   / 5:  0.0000
 6   / 6:  0.0000
 7   / 7:  0.0000
 
! Previously this was an error
list a[x=@ave] - a_xav[x=@ave]
             VARIABLE : A[X=@AVE] - A_XAV[X=@AVE]
             SUBSET   : 7 points (T)
             X        : 0.5 to 3.5
 1   / 1:  0.0000
 2   / 2:  0.0000
 3   / 3:  0.0000
 4   / 4:  0.0000
 5   / 5:  0.0000
 6   / 6:  0.0000
 7   / 7:  0.0000
 
! Combine with functions, regridding
let a = x[gx=1:3:1] + t[gt=1:7:1]
let a_xav = a[x=@ave]
let a_xav_xav = a_xav[x=@ave]
let b = samplel(a_xav_xav, l[gl=1:3:1])
let c = b[gt=1:3:1]
 
! Previously an error
list c
             VARIABLE : B[GT=1:3:1]
             SUBSET   : 3 points (T)
 1   / 1:  3.000
 2   / 2:  4.000
 3   / 3:  5.000
 
! Likewise for @SUM, @MIN, @MAX.
 
let a = TSEQUENCE({1,2,3})
let a_xtrns = a[t=@SUM]
list a[t=@SUM] - a_xtrns[t=@SUM]
             VARIABLE : A[T=@SUM] - A_XTRNS[T=@SUM]
             T        : 0.5 to 3.5
          0.0000
 
let a_xtrns = a[t=@MIN]
list a[t=@MIN] - a_xtrns[t=@MIN]
             VARIABLE : A[T=@MIN] - A_XTRNS[T=@MIN]
             T        : 0.5 to 3.5
          0.0000
 
let a_xtrns = a[t=@MAX]
list a[t=@MAX] - a_xtrns[t=@MAX]
             VARIABLE : A[T=@MAX] - A_XTRNS[T=@MAX]
             T        : 0.5 to 3.5
          0.0000
 
*** Running ferret script: bn_agg_member_syntax.jnl
! bn_agg_member_syntax
 
! *sh* 11/16
 
! running of this benchmark assumes that a tmp directory has been created
! and that it contains the aggregation member files created by bn_aggregate_f
 
 
! define an 11-member FMRC aggregation
let files = SPAWN("ls -1 tmp/fcst_*.nc")
fmrc my_fmrc = files
show data/members my_fmrc   ! /FILES is deprecated
     currently SET data sets:
   12> my_fmrc  (default)  Forecast aggregation
 name     title                             I         J         K         L         M         N
 FCST     FIELD + FCST_ERROR               1:21      1:21      ...       1:24      ...       1:11
       (L=1:24)
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:24      ...       1:33
 FCST_2   another variable                 1:21      1:21      ...       1:24      ...       1:11
       (L=1:24)
 
          Member datasets:
      12.1 : tmp/fcst_1.nc
      12.2 : tmp/fcst_2.nc
      12.3 : tmp/fcst_3.nc
      12.4 : tmp/fcst_4.nc
      12.5 : tmp/fcst_5.nc
      12.6 : tmp/fcst_6.nc
      12.7 : tmp/fcst_7.nc
      12.8 : tmp/fcst_8.nc
      12.9 : tmp/fcst_9.nc
      12.10: tmp/fcst_10.nc
      12.11: tmp/fcst_11.nc
 
show data 12.3   ! turns out to be dset=5
     currently SET data sets:
    5> tmp/fcst_3.nc
 name     title                             I         J         K         L
 FCST     FIELD + FCST_ERROR               1:21      1:21      ...       1:24
       (L=7:30)
 FCST_2   another variable                 1:21      1:21      ...       1:24
       (L=7:30)
 
 
! these are now all allowable references to the parent aggregation
stat fcst[d=12]
 
             FIELD + FCST_ERROR
             LONGITUDE: 139.5E to 160.5E
             LATITUDE: 19.5N to 40.5N
             Z:  N/A
             MODEL ELAPSED TIME (days): 0 to 730.485
             E:  N/A
             FORECAST: 16-NOV-1949 08:16 to 16-AUG-1952 18:16
             DATA SET: my_fmrc
 
 Total # of data points: 116424 (21*21*1*24*1*11)
 # flagged as bad  data: 0
 Minimum value: -1.0066
 Maximum value: 1.4336
 Mean    value: 0.1331 (unweighted average)
 Standard deviation: 0.55293
stat/br fcst[d=12.]
 
 Total # of data points: 116424 (21*21*1*24*1*11)
 # flagged as bad  data: 0
 Minimum value: -1.0066
 Maximum value: 1.4336
 Mean    value: 0.1331 (unweighted average)
stat/br fcst[d=12.0]
 
 Total # of data points: 116424 (21*21*1*24*1*11)
 # flagged as bad  data: 0
 Minimum value: -1.0066
 Maximum value: 1.4336
 Mean    value: 0.1331 (unweighted average)
 
! reference a member
stat fcst[d=12.3]
 
             FIELD + FCST_ERROR
             L=7:30
             LONGITUDE: 139.5E to 160.5E
             LATITUDE: 19.5N to 40.5N
             Z:  N/A
             TIME: 02-JUL-1950 14:54 to 02-JUL-1952 02:33
             E:  N/A
             F:  N/A
             DATA SET: tmp/fcst_3.nc
 
 Total # of data points: 10584 (21*21*1*24*1*1)
 # flagged as bad  data: 0
 Minimum value: -0.99738
 Maximum value: 1.3856
 Mean    value: 0.13343 (unweighted average)
 Standard deviation: 0.54485
stat fcst[d=12.3] - fcst[d=5]   ! v-v=0
 
             FCST[D=fcst_3] - FCST[D=fcst_3]
             LONGITUDE: 139.5E to 160.5E
             LATITUDE: 19.5N to 40.5N
             Z:  N/A
             TIME: 02-JUL-1950 14:54 to 02-JUL-1952 02:33
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 10584 (21*21*1*24*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
 
! note that FMRC members have distinct time axes. Specify "L=1"
stat fcst[d=12.3,l=1] - fcst[d=12.1,l=1]
 
             FCST[D=fcst_3,L=1] - FCST[D=fcst_1,L=1]
             LONGITUDE: 139.5E to 160.5E
             LATITUDE: 19.5N to 40.5N
             Z:  N/A
             TIME: 17-JUL-1950 20:09
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 441 (21*21*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: -0.12136
 Maximum value: 0.12112
 Mean    value: -0.0071027 (unweighted average)
 Standard deviation: 0.075099
 
! deliberate errors
set mode ignore
 
stat/br fcst[d=5.3]       ! d=5 is not an aggregation
stat/br fcst[d=12.30]     ! not this many members
stat/br fcst[d=12.300000]
 
set mode/last ignore
 
cancel data/all
cancel var/all
 
! Union datasets and SHOW DATA/MEMBERS
union tmp/uagg_1.nc,tmp/uagg_2.nc,tmp/uagg_3.nc,tmp/uagg_4.nc
show data/members
     currently SET data sets:
    5> ./v7jnls/bn_agg_member_syntax.jnl  (default)  Union aggregation
 name     title                             I         J         K         L
 SST      sst                              1:5       1:4       ...       1:10
 TEMP     temp                             1:5       1:4       ...       1:10
 U        U                                1:5       1:4       ...       1:10
 V        V                                1:5       1:4       ...       1:10
 
          Member datasets:
      5.1: tmp/uagg_1.nc
      5.2: tmp/uagg_2.nc
      5.3: tmp/uagg_3.nc
      5.4: tmp/uagg_4.nc
show data 5.2
     currently SET data sets:
    2> tmp/uagg_2.nc
 name     title                             I         J         K         L
 TEMP     temp                             1:5       1:4       ...       1:10
 
show data 5.3
     currently SET data sets:
    3> tmp/uagg_3.nc
 name     title                             I         J         K         L
 U        U                                1:5       1:4       ...       1:10
 
 
cancel data/all
 
! Tests for Ensembles
let files = SPAWN("ls -1 data/ens*.nc")
ensemble my_ens = files
sh data/members my_ens
     currently SET data sets:
    5> my_ens  (default)  Ensemble aggregation
 name     title                             I         J         K         L         M         N
 SST      SST_IN                           1:10      1:9       ...       1:12      1:4       ...
 ------------------------------
 MEMBER_DSET
          Member dataset names in Ensembl  ...       ...       ...       ...       1:4       ...
 TITLE    Global Att *title* in Ensemble   ...       ...       ...       ...       1:4       ...
 HISTORY  Global Att *history* in Ensembl  ...       ...       ...       ...       1:4       ...
 CONVENTIONS
          Global Att *Conventions* in Ens  ...       ...       ...       ...       1:4       ...
 MODEL    Global Att *MODEL* in Ensemble   ...       ...       ...       ...       1:4       ...
 NUMBER   Global Att *NUMBER* in Ensemble  ...       ...       ...       ...       1:4       ...
 
          Member datasets:
      5.1: data/ens1.nc
      5.2: data/ens2.nc
      5.3: data/ens3.nc
      5.4: data/ens4.nc
 
show data 5.3
     currently SET data sets:
    3> data/ens3.nc
 name     title                             I         J         K         L
 SST      SST_IN                           1:10      1:9       ...       1:12
 
stat sst[d=5]
 
             SST_IN
             LONGITUDE: 110W to 90W
             LATITUDE: 12N to 30N
             Z:  N/A
             TIME: 01-JAN 00:45 to 31-DEC 06:34
             E (realization): 0.5 to 4.5
             F:  N/A
             DATA SET: my_ens
 
 Total # of data points: 4320 (10*9*1*12*4*1)
 # flagged as bad  data: 1156
 Minimum value: 16.844
 Maximum value: 123.32
 Mean    value: 67.406 (unweighted average)
 Standard deviation: 30.975
stat sst[d=5.2]
 
             SST_IN
             LONGITUDE: 110W to 90W
             LATITUDE: 12N to 30N
             Z:  N/A
             TIME: 01-JAN 00:45 to 31-DEC 06:34
             E:  N/A
             F:  N/A
             DATA SET: data/ens2.nc
 
 Total # of data points: 1080 (10*9*1*12*1*1)
 # flagged as bad  data: 289
 Minimum value: 33.688
 Maximum value: 61.66
 Mean    value: 53.925 (unweighted average)
 Standard deviation: 5.1904
 
can data my_ens
 
! do them in another order
ENSEMBLE fourfiles = ens1, ens3, ens2, ens4
 
! not this is dataset 2
show data 5.3
     currently SET data sets:
    3> ./data/ens2.nc
 name     title                             I         J         K         L
 SST      SST_IN                           1:10      1:9       ...       1:12
 
 
stat sst[d=5] - sst[d=5.3]   ! ensemble minus member #3
 
             SST[D=fourfiles] - SST[D=ens2]
             LONGITUDE: 110W to 90W
             LATITUDE: 12N to 30N
             Z:  N/A
             TIME: 01-JAN 00:45 to 31-DEC 06:34
             E (realization): 0.5 to 4.5
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 4320 (10*9*1*12*4*1)
 # flagged as bad  data: 1156
 Minimum value: -30.83
 Maximum value: 61.66
 Mean    value: 13.481 (unweighted average)
 Standard deviation: 30.317
 
 
! deliberate errors
set mode ignore
 
stat/br sst[d=4.1]     ! not an ensemble
stat/br sst[d=5.30]    ! not this many members
 
set mode/last ignore
 
*** Running ferret script: bn_true_monthly.jnl
! bn_true_monthly.jnl
! examples defining axes with /DEFINE AXIS/MONTHLY
!
! When a true monthly axis is found in a dataset, store it as a TRUEMONTH axis
! When writing a TRUEMONTH axis, write the correct coordinates using the original
! units if it came from a dataset, or using units of days if it's user-defined.
 
! See known error conditions below
 
 
! For comparison, define regularly-spaced monthly axis of the sort we've always defined
 
define axis/t=1-jan-2010:31-jul-2011:1/t0=1-jan-2000/units=month/edges t_reg_month
sh axis/t t_reg_month
 name       axis              # pts   start                end
 T_REG_MONTH TIME              19 r   16-JAN-2010 05:14    18-JUL-2011 01:58
T0 = 1-JAN-2000
   Axis span (to cell edges) = 19
 
       L     T                       TBOX          TBOXLO                TSTEP (MONTH)
       1>  16-JAN-2010 05:14:33      1          01-JAN-2010 00:00:00       120.5189
       2>  15-FEB-2010 15:43:39      1          31-JAN-2010 10:29:06       121.5189
       3>  18-MAR-2010 02:12:45      1          02-MAR-2010 20:58:12       122.5189
       4>  17-APR-2010 12:41:51      1          02-APR-2010 07:27:18       123.5189
       5>  17-MAY-2010 23:10:57      1          02-MAY-2010 17:56:24       124.5189
       6>  17-JUN-2010 09:40:03      1          02-JUN-2010 04:25:30       125.5189
       7>  17-JUL-2010 20:09:09      1          02-JUL-2010 14:54:36       126.5189
       8>  17-AUG-2010 06:38:15      1          02-AUG-2010 01:23:42       127.5189
       9>  16-SEP-2010 17:07:21      1          01-SEP-2010 11:52:48       128.5189
      10>  17-OCT-2010 03:36:27      1          01-OCT-2010 22:21:54       129.5189
      11>  16-NOV-2010 14:05:33      1          01-NOV-2010 08:51:00       130.5189
      12>  17-DEC-2010 00:34:39      1          01-DEC-2010 19:20:06       131.5189
      13>  16-JAN-2011 11:03:45      1          01-JAN-2011 05:49:12       132.5189
      14>  15-FEB-2011 21:32:51      1          31-JAN-2011 16:18:18       133.5189
      15>  18-MAR-2011 08:01:57      1          03-MAR-2011 02:47:24       134.5189
      16>  17-APR-2011 18:31:03      1          02-APR-2011 13:16:30       135.5189
      17>  18-MAY-2011 05:00:09      1          02-MAY-2011 23:45:36       136.5189
      18>  17-JUN-2011 15:29:15      1          02-JUN-2011 10:14:42       137.5189
      19>  18-JUL-2011 01:58:21      1          02-JUL-2011 20:43:48       138.5189
 
! true-monthly axes, t0 at start of axis
define axis/t=1-jan-2010:31-jul-2011:1/t0=1-jan-2010/monthly taxis
sh axis/t taxis
 name       axis              # pts   start                end
 TAXIS     TIME                19 i   JAN-2010             JUL-2011 (True Monthly)
T0 = 1-JAN-2010
   Axis span (to cell edges) = 19
 
       L     T                       TBOX          TBOXLO                TSTEP (TRUMONTH)
       1>  JAN-2010                  31         01-JAN-2010               0
       2>  FEB-2010                  28         01-FEB-2010               1
       3>  MAR-2010                  31         01-MAR-2010               2
       4>  APR-2010                  30         01-APR-2010               3
       5>  MAY-2010                  31         01-MAY-2010               4
       6>  JUN-2010                  30         01-JUN-2010               5
       7>  JUL-2010                  31         01-JUL-2010               6
       8>  AUG-2010                  31         01-AUG-2010               7
       9>  SEP-2010                  30         01-SEP-2010               8
      10>  OCT-2010                  31         01-OCT-2010               9
      11>  NOV-2010                  30         01-NOV-2010               10
      12>  DEC-2010                  31         01-DEC-2010               11
      13>  JAN-2011                  31         01-JAN-2011               12
      14>  FEB-2011                  28         01-FEB-2011               13
      15>  MAR-2011                  31         01-MAR-2011               14
      16>  APR-2011                  30         01-APR-2011               15
      17>  MAY-2011                  31         01-MAY-2011               16
      18>  JUN-2011                  30         01-JUN-2011               17
      19>  JUL-2011                  31         01-JUL-2011               18
 
! t0 before start of axis
define axis/t=1-jan-2010:31-jul-2011:1/t0=1-jan-2000/monthly taxis
sh axis/t taxis
 name       axis              # pts   start                end
 TAXIS     TIME                19 i   JAN-2010             JUL-2011 (True Monthly)
T0 = 1-JAN-2000
   Axis span (to cell edges) = 19
 
       L     T                       TBOX          TBOXLO                TSTEP (TRUMONTH)
       1>  JAN-2010                  31         01-JAN-2010               120
       2>  FEB-2010                  28         01-FEB-2010               121
       3>  MAR-2010                  31         01-MAR-2010               122
       4>  APR-2010                  30         01-APR-2010               123
       5>  MAY-2010                  31         01-MAY-2010               124
       6>  JUN-2010                  30         01-JUN-2010               125
       7>  JUL-2010                  31         01-JUL-2010               126
       8>  AUG-2010                  31         01-AUG-2010               127
       9>  SEP-2010                  30         01-SEP-2010               128
      10>  OCT-2010                  31         01-OCT-2010               129
      11>  NOV-2010                  30         01-NOV-2010               130
      12>  DEC-2010                  31         01-DEC-2010               131
      13>  JAN-2011                  31         01-JAN-2011               132
      14>  FEB-2011                  28         01-FEB-2011               133
      15>  MAR-2011                  31         01-MAR-2011               134
      16>  APR-2011                  30         01-APR-2011               135
      17>  MAY-2011                  31         01-MAY-2011               136
      18>  JUN-2011                  30         01-JUN-2011               137
      19>  JUL-2011                  31         01-JUL-2011               138
 
! default time origin is start of month of first month
define axis/t=1-jul-2010:1-jan-2012:1/monthly taxis
sh axis/t taxis
 name       axis              # pts   start                end
 TAXIS     TIME                19 i   JUL-2010             JAN-2012 (True Monthly)
T0 = 01-JAN-2010
   Axis span (to cell edges) = 19
 
       L     T                       TBOX          TBOXLO                TSTEP (TRUMONTH)
       1>  JUL-2010                  31         01-JUL-2010               6
       2>  AUG-2010                  31         01-AUG-2010               7
       3>  SEP-2010                  30         01-SEP-2010               8
       4>  OCT-2010                  31         01-OCT-2010               9
       5>  NOV-2010                  30         01-NOV-2010               10
       6>  DEC-2010                  31         01-DEC-2010               11
       7>  JAN-2011                  31         01-JAN-2011               12
       8>  FEB-2011                  28         01-FEB-2011               13
       9>  MAR-2011                  31         01-MAR-2011               14
      10>  APR-2011                  30         01-APR-2011               15
      11>  MAY-2011                  31         01-MAY-2011               16
      12>  JUN-2011                  30         01-JUN-2011               17
      13>  JUL-2011                  31         01-JUL-2011               18
      14>  AUG-2011                  31         01-AUG-2011               19
      15>  SEP-2011                  30         01-SEP-2011               20
      16>  OCT-2011                  31         01-OCT-2011               21
      17>  NOV-2011                  30         01-NOV-2011               22
      18>  DEC-2011                  31         01-DEC-2011               23
      19>  JAN-2012                  31         01-JAN-2012               24
 
! Cell edges at mid-month
define axis/t=15-mar-2010:15-dec-2011:1/t0=1-jan-2000/monthly taxis
sh axis/t taxis
 name       axis              # pts   start                end
 TAXIS     TIME                22 i   MAR-2010             DEC-2011 (True Monthly)
T0 = 1-JAN-2000
   Axis span (to cell edges) = 22
 
       L     T                       TBOX          TBOXLO                TSTEP (TRUMONTH)
       1>  MAR-2010                  31         01-MAR-2010               122
       2>  APR-2010                  30         01-APR-2010               123
       3>  MAY-2010                  31         01-MAY-2010               124
       4>  JUN-2010                  30         01-JUN-2010               125
       5>  JUL-2010                  31         01-JUL-2010               126
       6>  AUG-2010                  31         01-AUG-2010               127
       7>  SEP-2010                  30         01-SEP-2010               128
       8>  OCT-2010                  31         01-OCT-2010               129
       9>  NOV-2010                  30         01-NOV-2010               130
      10>  DEC-2010                  31         01-DEC-2010               131
      11>  JAN-2011                  31         01-JAN-2011               132
      12>  FEB-2011                  28         01-FEB-2011               133
      13>  MAR-2011                  31         01-MAR-2011               134
      14>  APR-2011                  30         01-APR-2011               135
      15>  MAY-2011                  31         01-MAY-2011               136
      16>  JUN-2011                  30         01-JUN-2011               137
      17>  JUL-2011                  31         01-JUL-2011               138
      18>  AUG-2011                  31         01-AUG-2011               139
      19>  SEP-2011                  30         01-SEP-2011               140
      20>  OCT-2011                  31         01-OCT-2011               141
      21>  NOV-2011                  30         01-NOV-2011               142
      22>  DEC-2011                  31         01-DEC-2011               143
 
! other calendars JULIAN
define axis/cal=julian/t=1-jan-2011:31-jul-2012:1/t0=1-jan-2000/monthly taxis
sh axis/t taxis
 name       axis              # pts   start                end
 TAXIS     TIME                19 i   JAN-2011             JUL-2012 (True Monthly)
T0 = 1-JAN-2000
CALENDAR = JULIAN
   Axis span (to cell edges) = 19
 
       L     T                       TBOX          TBOXLO                TSTEP (TRUMONTH)
       1>  JAN-2011                  31         01-JAN-2011               132
       2>  FEB-2011                  28         01-FEB-2011               133
       3>  MAR-2011                  31         01-MAR-2011               134
       4>  APR-2011                  30         01-APR-2011               135
       5>  MAY-2011                  31         01-MAY-2011               136
       6>  JUN-2011                  30         01-JUN-2011               137
       7>  JUL-2011                  31         01-JUL-2011               138
       8>  AUG-2011                  31         01-AUG-2011               139
       9>  SEP-2011                  30         01-SEP-2011               140
      10>  OCT-2011                  31         01-OCT-2011               141
      11>  NOV-2011                  30         01-NOV-2011               142
      12>  DEC-2011                  31         01-DEC-2011               143
      13>  JAN-2012                  31         01-JAN-2012               144
      14>  FEB-2012                  29         01-FEB-2012               145
      15>  MAR-2012                  31         01-MAR-2012               146
      16>  APR-2012                  30         01-APR-2012               147
      17>  MAY-2012                  31         01-MAY-2012               148
      18>  JUN-2012                  30         01-JUN-2012               149
      19>  JUL-2012                  31         01-JUL-2012               150
 
! default time origin
define axis/cal=julian/t=15-mar-2010:15-dec-2011:1/monthly taxis
sh axis/t taxis
 name       axis              # pts   start                end
 TAXIS     TIME                22 i   MAR-2010             DEC-2011 (True Monthly)
T0 = 01-JAN-2010
CALENDAR = JULIAN
   Axis span (to cell edges) = 22
 
       L     T                       TBOX          TBOXLO                TSTEP (TRUMONTH)
       1>  MAR-2010                  31         01-MAR-2010               2
       2>  APR-2010                  30         01-APR-2010               3
       3>  MAY-2010                  31         01-MAY-2010               4
       4>  JUN-2010                  30         01-JUN-2010               5
       5>  JUL-2010                  31         01-JUL-2010               6
       6>  AUG-2010                  31         01-AUG-2010               7
       7>  SEP-2010                  30         01-SEP-2010               8
       8>  OCT-2010                  31         01-OCT-2010               9
       9>  NOV-2010                  30         01-NOV-2010               10
      10>  DEC-2010                  31         01-DEC-2010               11
      11>  JAN-2011                  31         01-JAN-2011               12
      12>  FEB-2011                  28         01-FEB-2011               13
      13>  MAR-2011                  31         01-MAR-2011               14
      14>  APR-2011                  30         01-APR-2011               15
      15>  MAY-2011                  31         01-MAY-2011               16
      16>  JUN-2011                  30         01-JUN-2011               17
      17>  JUL-2011                  31         01-JUL-2011               18
      18>  AUG-2011                  31         01-AUG-2011               19
      19>  SEP-2011                  30         01-SEP-2011               20
      20>  OCT-2011                  31         01-OCT-2011               21
      21>  NOV-2011                  30         01-NOV-2011               22
      22>  DEC-2011                  31         01-DEC-2011               23
 
! other calendars NOLEAP
define axis/cal=noleap/t=1-jan-2011:31-jul-2012:1/t0=1-jan-2000/monthly taxis
sh axis/t taxis
 name       axis              # pts   start                end
 TAXIS     TIME                19 i   JAN-2011             JUL-2012 (True Monthly)
T0 = 1-JAN-2000
CALENDAR = NOLEAP
   Axis span (to cell edges) = 19
 
       L     T                       TBOX          TBOXLO                TSTEP (TRUMONTH)
       1>  JAN-2011                  31         01-JAN-2011               132
       2>  FEB-2011                  28         01-FEB-2011               133
       3>  MAR-2011                  31         01-MAR-2011               134
       4>  APR-2011                  30         01-APR-2011               135
       5>  MAY-2011                  31         01-MAY-2011               136
       6>  JUN-2011                  30         01-JUN-2011               137
       7>  JUL-2011                  31         01-JUL-2011               138
       8>  AUG-2011                  31         01-AUG-2011               139
       9>  SEP-2011                  30         01-SEP-2011               140
      10>  OCT-2011                  31         01-OCT-2011               141
      11>  NOV-2011                  30         01-NOV-2011               142
      12>  DEC-2011                  31         01-DEC-2011               143
      13>  JAN-2012                  31         01-JAN-2012               144
      14>  FEB-2012                  28         01-FEB-2012               145
      15>  MAR-2012                  31         01-MAR-2012               146
      16>  APR-2012                  30         01-APR-2012               147
      17>  MAY-2012                  31         01-MAY-2012               148
      18>  JUN-2012                  30         01-JUN-2012               149
      19>  JUL-2012                  31         01-JUL-2012               150
 
! not at first of month
define axis/cal=julian/t=15-mar-2010:15-dec-2011:1/t0=1-jan-2000/monthly taxis
sh axis/t taxis
 name       axis              # pts   start                end
 TAXIS     TIME                22 i   MAR-2010             DEC-2011 (True Monthly)
T0 = 1-JAN-2000
CALENDAR = JULIAN
   Axis span (to cell edges) = 22
 
       L     T                       TBOX          TBOXLO                TSTEP (TRUMONTH)
       1>  MAR-2010                  31         01-MAR-2010               122
       2>  APR-2010                  30         01-APR-2010               123
       3>  MAY-2010                  31         01-MAY-2010               124
       4>  JUN-2010                  30         01-JUN-2010               125
       5>  JUL-2010                  31         01-JUL-2010               126
       6>  AUG-2010                  31         01-AUG-2010               127
       7>  SEP-2010                  30         01-SEP-2010               128
       8>  OCT-2010                  31         01-OCT-2010               129
       9>  NOV-2010                  30         01-NOV-2010               130
      10>  DEC-2010                  31         01-DEC-2010               131
      11>  JAN-2011                  31         01-JAN-2011               132
      12>  FEB-2011                  28         01-FEB-2011               133
      13>  MAR-2011                  31         01-MAR-2011               134
      14>  APR-2011                  30         01-APR-2011               135
      15>  MAY-2011                  31         01-MAY-2011               136
      16>  JUN-2011                  30         01-JUN-2011               137
      17>  JUL-2011                  31         01-JUL-2011               138
      18>  AUG-2011                  31         01-AUG-2011               139
      19>  SEP-2011                  30         01-SEP-2011               140
      20>  OCT-2011                  31         01-OCT-2011               141
      21>  NOV-2011                  30         01-NOV-2011               142
      22>  DEC-2011                  31         01-DEC-2011               143
 
! other calendars 360_day
define axis/cal=360_day/t=1-jan-2010:30-jul-2011:1/t0=1-jan-2000/monthly taxis
sh axis/t taxis
 name       axis              # pts   start                end
 TAXIS     TIME                19 r   JAN-2010             JUL-2011 (True Monthly)
T0 = 1-JAN-2000
CALENDAR = 360_DAY
   Axis span (to cell edges) = 19
 
       L     T                       TBOX          TBOXLO                TSTEP (TRUMONTH)
       1>  JAN-2010                  30         01-JAN-2010               120
       2>  FEB-2010                  30         01-FEB-2010               121
       3>  MAR-2010                  30         01-MAR-2010               122
       4>  APR-2010                  30         01-APR-2010               123
       5>  MAY-2010                  30         01-MAY-2010               124
       6>  JUN-2010                  30         01-JUN-2010               125
       7>  JUL-2010                  30         01-JUL-2010               126
       8>  AUG-2010                  30         01-AUG-2010               127
       9>  SEP-2010                  30         01-SEP-2010               128
      10>  OCT-2010                  30         01-OCT-2010               129
      11>  NOV-2010                  30         01-NOV-2010               130
      12>  DEC-2010                  30         01-DEC-2010               131
      13>  JAN-2011                  30         01-JAN-2011               132
      14>  FEB-2011                  30         01-FEB-2011               133
      15>  MAR-2011                  30         01-MAR-2011               134
      16>  APR-2011                  30         01-APR-2011               135
      17>  MAY-2011                  30         01-MAY-2011               136
      18>  JUN-2011                  30         01-JUN-2011               137
      19>  JUL-2011                  30         01-JUL-2011               138
 
! Writing data, including a leap year
 
define axis/t=3-mar-2011:3-jan-2013:1/monthly/t0=1-jan-2010 taxis
def var tt = t[gt=taxis]
save/clobber/file=a.nc tt
 
can var/all
use a
sh dat/att
     currently SET data sets:
    1> ./a.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(TAXIS1)               DOUBLE    axis            CHAR        1    T       T
                                 bounds          CHAR        10   T       TAXIS_bnds
                                 time_origin     CHAR        11   T       01-JAN-2010
                                 units           CHAR        21   T       days since 2010-01-01
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        5    F       TAXIS
  
 TAXIS_bnds            DOUBLE
  
 TT                    DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 long_name       CHAR        11   T       T[GT=TAXIS]
  
sh grid tt
    GRID GSI1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TAXIS1    TIME                23 i   16-MAR-2011 12:00    16-JAN-2013 12:00   full
sh axis/t taxis
 name       axis              # pts   start                end
 TAXIS     TIME                23 i   MAR-2011             JAN-2013 (True Monthly)
T0 = 1-JAN-2010
   Axis span (to cell edges) = 23
 
       L     T                       TBOX          TBOXLO                TSTEP (TRUMONTH)
       1>  MAR-2011                  31         01-MAR-2011               14
       2>  APR-2011                  30         01-APR-2011               15
       3>  MAY-2011                  31         01-MAY-2011               16
       4>  JUN-2011                  30         01-JUN-2011               17
       5>  JUL-2011                  31         01-JUL-2011               18
       6>  AUG-2011                  31         01-AUG-2011               19
       7>  SEP-2011                  30         01-SEP-2011               20
       8>  OCT-2011                  31         01-OCT-2011               21
       9>  NOV-2011                  30         01-NOV-2011               22
      10>  DEC-2011                  31         01-DEC-2011               23
      11>  JAN-2012                  31         01-JAN-2012               24
      12>  FEB-2012                  29         01-FEB-2012               25
      13>  MAR-2012                  31         01-MAR-2012               26
      14>  APR-2012                  30         01-APR-2012               27
      15>  MAY-2012                  31         01-MAY-2012               28
      16>  JUN-2012                  30         01-JUN-2012               29
      17>  JUL-2012                  31         01-JUL-2012               30
      18>  AUG-2012                  31         01-AUG-2012               31
      19>  SEP-2012                  30         01-SEP-2012               32
      20>  OCT-2012                  31         01-OCT-2012               33
      21>  NOV-2012                  30         01-NOV-2012               34
      22>  DEC-2012                  31         01-DEC-2012               35
      23>  JAN-2013                  31         01-JAN-2013               36
 
can dat/all
 
define axis/t=3-mar-2011:3-jan-2013:1/monthly/t0=1-jan-2010/calendar=julian taxis
def var tt = t[gt=taxis]
save/clobber/file=a.nc tt
 
can var/all
use a
sh dat/att
     currently SET data sets:
    1> ./a.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(TAXIS1)               DOUBLE    axis            CHAR        1    T       T
                                 bounds          CHAR        10   T       TAXIS_bnds
                                 time_origin     CHAR        10   T       1-JAN-2010
                                 calendar        CHAR        6    T       JULIAN
                                 units           CHAR        21   T       days since 2010-01-01
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        5    F       TAXIS
  
 TAXIS_bnds            DOUBLE
  
 TT                    DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 long_name       CHAR        11   T       T[GT=TAXIS]
  
sh grid tt
    GRID GSI1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TAXIS1    TIME                23 i   16-MAR-2011 12:00    16-JAN-2013 12:00   full
sh axis/t taxis
 name       axis              # pts   start                end
 TAXIS     TIME                23 i   MAR-2011             JAN-2013 (True Monthly)
T0 = 1-JAN-2010
CALENDAR = JULIAN
   Axis span (to cell edges) = 23
 
       L     T                       TBOX          TBOXLO                TSTEP (TRUMONTH)
       1>  MAR-2011                  31         01-MAR-2011               14
       2>  APR-2011                  30         01-APR-2011               15
       3>  MAY-2011                  31         01-MAY-2011               16
       4>  JUN-2011                  30         01-JUN-2011               17
       5>  JUL-2011                  31         01-JUL-2011               18
       6>  AUG-2011                  31         01-AUG-2011               19
       7>  SEP-2011                  30         01-SEP-2011               20
       8>  OCT-2011                  31         01-OCT-2011               21
       9>  NOV-2011                  30         01-NOV-2011               22
      10>  DEC-2011                  31         01-DEC-2011               23
      11>  JAN-2012                  31         01-JAN-2012               24
      12>  FEB-2012                  29         01-FEB-2012               25
      13>  MAR-2012                  31         01-MAR-2012               26
      14>  APR-2012                  30         01-APR-2012               27
      15>  MAY-2012                  31         01-MAY-2012               28
      16>  JUN-2012                  30         01-JUN-2012               29
      17>  JUL-2012                  31         01-JUL-2012               30
      18>  AUG-2012                  31         01-AUG-2012               31
      19>  SEP-2012                  30         01-SEP-2012               32
      20>  OCT-2012                  31         01-OCT-2012               33
      21>  NOV-2012                  30         01-NOV-2012               34
      22>  DEC-2012                  31         01-DEC-2012               35
      23>  JAN-2013                  31         01-JAN-2013               36
 
can dat/all
 
define axis/t=3-mar-2011:3-jan-2013:1/monthly/t0=1-jan-2010/calendar=360_day taxis
def var tt = t[gt=taxis]
save/clobber/file=a.nc tt
 
can var/all
use a
sh dat/att
     currently SET data sets:
    1> ./a.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(TAXIS1)               DOUBLE    axis            CHAR        1    T       T
                                 bounds          CHAR        10   T       TAXIS_bnds
                                 time_origin     CHAR        10   T       1-JAN-2010
                                 calendar        CHAR        7    T       360_DAY
                                 units           CHAR        21   T       days since 2010-01-01
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        5    F       TAXIS
  
 TAXIS_bnds            DOUBLE
  
 TT                    DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 long_name       CHAR        11   T       T[GT=TAXIS]
  
sh grid tt
    GRID GSI1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TAXIS1    TIME                22 r   16-MAR-2011 00:00    16-DEC-2012 00:00   full
sh axis/t taxis
 name       axis              # pts   start                end
 TAXIS     TIME                22 r   MAR-2011             DEC-2012 (True Monthly)
T0 = 1-JAN-2010
CALENDAR = 360_DAY
   Axis span (to cell edges) = 22
 
       L     T                       TBOX          TBOXLO                TSTEP (TRUMONTH)
       1>  MAR-2011                  30         01-MAR-2011               14
       2>  APR-2011                  30         01-APR-2011               15
       3>  MAY-2011                  30         01-MAY-2011               16
       4>  JUN-2011                  30         01-JUN-2011               17
       5>  JUL-2011                  30         01-JUL-2011               18
       6>  AUG-2011                  30         01-AUG-2011               19
       7>  SEP-2011                  30         01-SEP-2011               20
       8>  OCT-2011                  30         01-OCT-2011               21
       9>  NOV-2011                  30         01-NOV-2011               22
      10>  DEC-2011                  30         01-DEC-2011               23
      11>  JAN-2012                  30         01-JAN-2012               24
      12>  FEB-2012                  30         01-FEB-2012               25
      13>  MAR-2012                  30         01-MAR-2012               26
      14>  APR-2012                  30         01-APR-2012               27
      15>  MAY-2012                  30         01-MAY-2012               28
      16>  JUN-2012                  30         01-JUN-2012               29
      17>  JUL-2012                  30         01-JUL-2012               30
      18>  AUG-2012                  30         01-AUG-2012               31
      19>  SEP-2012                  30         01-SEP-2012               32
      20>  OCT-2012                  30         01-OCT-2012               33
      21>  NOV-2012                  30         01-NOV-2012               34
      22>  DEC-2012                  30         01-DEC-2012               35
 
! Without date range spec,
def axis/monthly/t0=1-jan-0000/t=1:24:1 taxis
sh axis/t taxis
 name       axis              # pts   start                end
 TAXIS     TIME                24 i   JAN-0000             DEC-0001 (True Monthly)
T0 = 1-JAN-0000
   Axis span (to cell edges) = 24
 
       L     T                       TBOX          TBOXLO                TSTEP (TRUMONTH)
       1>  JAN-0000                  31         01-JAN-0000               0
       2>  FEB-0000                  29         01-FEB-0000               1
       3>  MAR-0000                  31         01-MAR-0000               2
       4>  APR-0000                  30         01-APR-0000               3
       5>  MAY-0000                  31         01-MAY-0000               4
       6>  JUN-0000                  30         01-JUN-0000               5
       7>  JUL-0000                  31         01-JUL-0000               6
       8>  AUG-0000                  31         01-AUG-0000               7
       9>  SEP-0000                  30         01-SEP-0000               8
      10>  OCT-0000                  31         01-OCT-0000               9
      11>  NOV-0000                  30         01-NOV-0000               10
      12>  DEC-0000                  31         01-DEC-0000               11
      13>  JAN-0001                  31         01-JAN-0001               12
      14>  FEB-0001                  28         01-FEB-0001               13
      15>  MAR-0001                  31         01-MAR-0001               14
      16>  APR-0001                  30         01-APR-0001               15
      17>  MAY-0001                  31         01-MAY-0001               16
      18>  JUN-0001                  30         01-JUN-0001               17
      19>  JUL-0001                  31         01-JUL-0001               18
      20>  AUG-0001                  31         01-AUG-0001               19
      21>  SEP-0001                  30         01-SEP-0001               20
      22>  OCT-0001                  31         01-OCT-0001               21
      23>  NOV-0001                  30         01-NOV-0001               22
      24>  DEC-0001                  31         01-DEC-0001               23
 
! With T0 later than year 0
def axis/monthly/t0=1-jan-2000/t=1:24:1 taxis
sh axis/t taxis
 name       axis              # pts   start                end
 TAXIS     TIME                24 i   JAN-2000             DEC-2001 (True Monthly)
T0 = 1-JAN-2000
   Axis span (to cell edges) = 24
 
       L     T                       TBOX          TBOXLO                TSTEP (TRUMONTH)
       1>  JAN-2000                  31         01-JAN-2000               0
       2>  FEB-2000                  29         01-FEB-2000               1
       3>  MAR-2000                  31         01-MAR-2000               2
       4>  APR-2000                  30         01-APR-2000               3
       5>  MAY-2000                  31         01-MAY-2000               4
       6>  JUN-2000                  30         01-JUN-2000               5
       7>  JUL-2000                  31         01-JUL-2000               6
       8>  AUG-2000                  31         01-AUG-2000               7
       9>  SEP-2000                  30         01-SEP-2000               8
      10>  OCT-2000                  31         01-OCT-2000               9
      11>  NOV-2000                  30         01-NOV-2000               10
      12>  DEC-2000                  31         01-DEC-2000               11
      13>  JAN-2001                  31         01-JAN-2001               12
      14>  FEB-2001                  28         01-FEB-2001               13
      15>  MAR-2001                  31         01-MAR-2001               14
      16>  APR-2001                  30         01-APR-2001               15
      17>  MAY-2001                  31         01-MAY-2001               16
      18>  JUN-2001                  30         01-JUN-2001               17
      19>  JUL-2001                  31         01-JUL-2001               18
      20>  AUG-2001                  31         01-AUG-2001               19
      21>  SEP-2001                  30         01-SEP-2001               20
      22>  OCT-2001                  31         01-OCT-2001               21
      23>  NOV-2001                  30         01-NOV-2001               22
      24>  DEC-2001                  31         01-DEC-2001               23
 
! Default T0, non-calendar t def
define axis/monthly/t=1:36:1 taxis
sh axis/t taxis
 name       axis              # pts   start                end
 TAXIS     TIME                36 i   JAN-0000             DEC-0002 (True Monthly)
T0 = 01-JAN-0000
   Axis span (to cell edges) = 36
 
       L     T                       TBOX          TBOXLO                TSTEP (TRUMONTH)
       1>  JAN-0000                  31         01-JAN-0000               0
       2>  FEB-0000                  29         01-FEB-0000               1
       3>  MAR-0000                  31         01-MAR-0000               2
       4>  APR-0000                  30         01-APR-0000               3
       5>  MAY-0000                  31         01-MAY-0000               4
       6>  JUN-0000                  30         01-JUN-0000               5
       7>  JUL-0000                  31         01-JUL-0000               6
       8>  AUG-0000                  31         01-AUG-0000               7
       9>  SEP-0000                  30         01-SEP-0000               8
      10>  OCT-0000                  31         01-OCT-0000               9
      11>  NOV-0000                  30         01-NOV-0000               10
      12>  DEC-0000                  31         01-DEC-0000               11
      13>  JAN-0001                  31         01-JAN-0001               12
      14>  FEB-0001                  28         01-FEB-0001               13
      15>  MAR-0001                  31         01-MAR-0001               14
      16>  APR-0001                  30         01-APR-0001               15
      17>  MAY-0001                  31         01-MAY-0001               16
      18>  JUN-0001                  30         01-JUN-0001               17
      19>  JUL-0001                  31         01-JUL-0001               18
      20>  AUG-0001                  31         01-AUG-0001               19
      21>  SEP-0001                  30         01-SEP-0001               20
      22>  OCT-0001                  31         01-OCT-0001               21
      23>  NOV-0001                  30         01-NOV-0001               22
      24>  DEC-0001                  31         01-DEC-0001               23
      25>  JAN-0002                  31         01-JAN-0002               24
      26>  FEB-0002                  28         01-FEB-0002               25
      27>  MAR-0002                  31         01-MAR-0002               26
      28>  APR-0002                  30         01-APR-0002               27
      29>  MAY-0002                  31         01-MAY-0002               28
      30>  JUN-0002                  30         01-JUN-0002               29
      31>  JUL-0002                  31         01-JUL-0002               30
      32>  AUG-0002                  31         01-AUG-0002               31
      33>  SEP-0002                  30         31-AUG-0002               32
      34>  OCT-0002                  31         01-OCT-0002               33
      35>  NOV-0002                  30         01-NOV-0002               34
      36>  DEC-0002                  31         01-DEC-0002               35
 
! modulo
define axis/t=1-jan-2010:31-dec-2010:1/t0=1-jan-2000/monthly/modulo taxis
 
let var = {1,2,3,4,5,6,7,8,9,10,11,12}
let tvar = reshape(var,t[gt=taxis])
list/L=1:23 tvar
             VARIABLE : RESHAPE(VAR,T[GT=TAXIS])
             SUBSET   : 23 points (TIME)
 16-JAN-2010 12 /  1:   1.00
 15-FEB-2010 00 /  2:   2.00
 16-MAR-2010 12 /  3:   3.00
 16-APR-2010 00 /  4:   4.00
 16-MAY-2010 12 /  5:   5.00
 16-JUN-2010 00 /  6:   6.00
 16-JUL-2010 12 /  7:   7.00
 16-AUG-2010 12 /  8:   8.00
 16-SEP-2010 00 /  9:   9.00
 16-OCT-2010 12 / 10:  10.00
 16-NOV-2010 00 / 11:  11.00
 16-DEC-2010 12 / 12:  12.00
 16-JAN-2011 17 / 13:   1.00
 15-FEB-2011 05 / 14:   2.00
 16-MAR-2011 17 / 15:   3.00
 16-APR-2011 05 / 16:   4.00
 16-MAY-2011 17 / 17:   5.00
 16-JUN-2011 05 / 18:   6.00
 16-JUL-2011 17 / 19:   7.00
 16-AUG-2011 17 / 20:   8.00
 16-SEP-2011 05 / 21:   9.00
 16-OCT-2011 17 / 22:  10.00
 16-NOV-2011 05 / 23:  11.00
! *sh* 3/17:  a possible alternative syntax:
!  let var = TSEQUENCE({1,2,3,4,5,6,7,8,9,10,11,12})
!  let tvar = var[gt=taxis@asn]
! Since this is a fairly common need -- creating a line along some axis
! should we offer a new function AXSEQUENCE(array, axis)  ?
 
! Striding on a monthly axis
 
def axis/monthly/t0=1-jan-2000/t=1-jan-2000:31-dec-2004:1/unit=monthly taxis
!sh axis/t/l=1:14 taxis
let tt = t[gt=taxis]
list tt[l=1:6:2]
             VARIABLE : T[GT=TAXIS]
                        regrid: 2 tmon_gregori on T
             SUBSET   : 3 points (TIME)
 16-JAN-2000 / 1:   15.5
 16-MAR-2000 / 2:   75.5
 16-MAY-2000 / 3:  136.5
 
list/prec=6 tt[l=1:60:12]
             VARIABLE : T[GT=TAXIS]
                        regrid: 12 tmon_gregori on T
             SUBSET   : 5 points (TIME)
 16-JAN-2000 / 1:    15.50
 16-JAN-2001 / 2:   381.50
 16-JAN-2002 / 3:   746.50
 16-JAN-2003 / 4:  1111.50
 16-JAN-2004 / 5:  1476.50
 
! From a file
save/file=a.nc/clobber tt
can dat/all; can var/all
use a
list/prec=6 tt[l=1:60:12]
             VARIABLE : T[GT=TAXIS]
                        regrid: on T
             FILENAME : a.nc
             SUBSET   : 5 points (TIME)
 APR-2001 / 1:    15.50
 OCT-2031 / 2:   381.50
 MAR-2062 / 3:   746.50
 AUG-2092 / 4:  1111.50
 JAN-2123 / 5:  1476.50
 
! DEFINE AXIS/MONTHLY warnings and error conditions:
 
! Not an error - /EDGES is ignored, as it's the default
define axis/t=1-jan-2010:31-jul-2011:1/t0=1-jan-2000/monthly/edges taxis
sh axis taxis
 name       axis              # pts   start                end
 TAXIS     TIME                19 i   JAN-2010             JUL-2011 (True Monthly)
T0 = 1-JAN-2000
   Axis span (to cell edges) = 19
 
! Not an error - /UNITS=month is the default
define axis/t=1-jan-2010:31-jul-2011:1/t0=1-jan-2000/monthly/units=months taxis
sh axis taxis
 name       axis              # pts   start                end
 TAXIS     TIME                19 i   JAN-2010             JUL-2011 (True Monthly)
T0 = 1-JAN-2000
   Axis span (to cell edges) = 19
 
set mode ignore
! not all months have day 30, cannot start at day 30
define axis/t=30-mar-2010:30-dec-2011:1/monthly taxis
 
! Units of other than months is an error
define axis/t=1-jan-2010:31-jul-2011:30/t0=1-jan-2000/monthly/units=days taxis
 
! /NPOINTS, /BOUNDS, /FROMDATA are not allowed. Errors in start:end:del
define axis/t=1-jan-2010:31-dec-2012:1/t0=1-jan-2000/monthly/npoints=13 taxis
 
! missing delta-t
define axis/t=1-jan-2010:31-dec-2012/t0=1-jan-2000/monthly taxis
 
! delta-t must be 1
define axis/t=1-jan-2010:31-dec-2012:2/t0=1-jan-2000/monthly taxis
 
! irregular or from-data
define axis/t/t0=1-jan-2000/monthly taxis = {123,124,126}
 
define axis/from/t/t0=1-jan-2001/monthly/edges taxis = {5,6,6,6,7}
 
! bounds
def axis/t/t0=1-jan-2000/monthly/bounds tax={1.2, 2, 3.2, 5, 7, 8.4, 9}, {0.5,1.5, 1.5,2.5, 2.5,3.5, 3.5,6.5, 6.5,7.5, 7.5,8.5, 8.5,9.5}
 
! Must be T direction (do we need /F=?)
define axis/x=1:5:1/monthly aaxis
 
cancel mode ignore
*** Running ferret script: bn720_bug_fixes.jnl
! bn720_bug_fixes.jnl
! test various fixes that went into version 7.2
! 2/17 *acm*
!
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_uvar_strides
! err710_uvar_strides
! see ticket 2511: crash when doing strides on the user-variable
 
 
use coads_climatology
 
! this is ok using a file variable
let y_vec = x[gx=sst,x=0:360:30]
list y_vec
             VARIABLE : X[GX=SST,X=0:360:30]
             FILENAME : coads_climatology.cdf
             SUBSET   : 13 points (LONGITUDE)
 0E     /  1:    0.0
 30E    /  2:   30.0
 60E    /  3:   60.0
 90E    /  4:   90.0
 120E   /  5:  120.0
 150E   /  6:  150.0
 180E   /  7:  180.0
 150W   /  8:  210.0
 120W   /  9:  240.0
 90W    / 10:  270.0
 60W    / 11:  300.0
 30W    / 12:  330.0
 0E     / 13:  360.0
 
! but this gave a crash on loading the variable.
let s = sst
let y_vec = x[gx=s,x=0:360:30]
list y_vec
             VARIABLE : X[GX=S,X=0:360:30]
             FILENAME : coads_climatology.cdf
             SUBSET   : 13 points (X)
 0     /  1:    0.0
 30    /  2:   30.0
 60    /  3:   60.0
 90    /  4:   90.0
 120   /  5:  120.0
 150   /  6:  150.0
 180   /  7:  180.0
 210   /  8:  210.0
 240   /  9:  240.0
 270   / 10:  270.0
 300   / 11:  300.0
 330   / 12:  330.0
 360   / 13:  360.0
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_prec_return
! err71_prec_return.jnl
! Ticket 2510, `prec=hh` doesn't work when the data is very
! near an integer.
 
 
let a=1+1e-12
 
! This should show the 001 at the end
list/nohead/norow/prec=13 `a,prec=13`
 !-> list/nohead/norow/prec=13 1.000000000001
   1.000000000001
 
! This does not have the 001 at the end
list/nohead/norow/prec=13 `a,prec=12`
 !-> list/nohead/norow/prec=13 1
   1.000000000000
 
! The example from the ticket, with one more.
list/nohead/norow/prec=12 {`1 + 0.1`, `1 + 1e-7`, `1 + 1e-8`, `1 + 1e-10`} - 1
 !-> list/nohead/norow/prec=12 {1.1, 1.0000001, 1.00000001, 1.0000000001} - 1
   0.100000000000
   0.000000100000
   0.000000010000
   0.000000000100
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_save_rigid
! err71_save_rigid.jnl
! Ticket 2513: SAVE/RIGID with irregular axis wrote a bad file.
 
! Define a variable on an irregular axis.
 
let var = {123, 234, 345, 456, 567, 678, 789}
define axis/t/t0=1-jan-2015/units=day tax = \
{ 312.1, 312.7, 313.4, 314.2, 314.7, 315.4, 316.1}
 
let vart = reshape(var, t[gt=tax])
 
! Save with /RIGID. Previously this wrote a file with
! both bounds and edges attributes on the time axis.
! It wrote the edges variable, not the bounds.
 
! Starting with this version, write bounds if needed when
! writing with /RIGID. Only write edges if they said /EDGES.
 
save/clobber/rigid/file=a.nc vart
sp ncdump a.nc
netcdf a {
dimensions:
	TAX = 7 ;
	bnds = 2 ;
variables:
	double TAX(TAX) ;
		TAX:units = "day since 2015-01-01" ;
		TAX:point_spacing = "uneven" ;
		TAX:axis = "T" ;
		TAX:bounds = "TAX_bnds" ;
		TAX:time_origin = "01-JAN-2015" ;
		TAX:standard_name = "time" ;
	double TAX_bnds(TAX, bnds) ;
	double VART(TAX) ;
		VART:missing_value = -1.e+34 ;
		VART:_FillValue = -1.e+34 ;
		VART:long_name = "RESHAPE(VAR, T[GT=TAX])" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
data:

 TAX = 312.1, 312.7, 313.4, 314.2, 314.7, 315.4, 316.1 ;

 TAX_bnds =
  311.8, 312.4,
  312.4, 313.05,
  313.05, 313.8,
  313.8, 314.45,
  314.45, 315.05,
  315.05, 315.75,
  315.75, 316.45 ;

 VART = 123, 234, 345, 456, 567, 678, 789 ;
}
 
cancel var/all
 
! The grid was messed up - this gave an error
use a
show grid vart
    GRID GSI1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TAX1      TIME                 7 i   09-NOV-2015 02:24    13-NOV-2015 02:24   full
 
 
! move this to bn_gif.jnl
! GO bn_reset
! GO err71_plotvs_mode_label
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_set_redirect
! err71_set_redirect.jnl
! 3/2017 ACM
! redirect results to a file with a path.
! See ticket 2521, the path was previously rejected if it contains dashes
 
spawn "mkdir -p sub-dir"
!
! Previously this resulted in an error.
set redirect /tee /file="./sub-dir/redirect_stdout.txt" /clobber  stderr stdout
 
! write to the file and look at the results
 
show symbol ferret_precision, ferret_memory
FERRET_PRECISION = "double"
FERRET_MEMORY = "31.25"
cancel redirect
let contents = { spawn:"cat ./sub-dir/redirect_stdout.txt" }
list contents
             VARIABLE : { SPAWN:"cat ./sub-dir/redirect_stdout.txt" }
             SUBSET   : 7 points (X)
 1   / 1:" "                                          
 2   / 2:"! write to the file and look at the results"
 3   / 3:" "                                          
 4   / 4:"show symbol ferret_precision, ferret_memory"
 5   / 5:"FERRET_PRECISION = "double""                
 6   / 6:"FERRET_MEMORY = "31.25""                    
 7   / 7:"cancel redirect"                            
cancel var contents
 
sp rm -rf sub-dir
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_set_redirect
! err71_set_redirect.jnl
! 3/2017 ACM
! redirect results to a file with a path.
! See ticket 2521, the path was previously rejected if it contains dashes
 
spawn "mkdir -p sub-dir"
!
! Previously this resulted in an error.
set redirect /tee /file="./sub-dir/redirect_stdout.txt" /clobber  stderr stdout
 
! write to the file and look at the results
 
show symbol ferret_precision, ferret_memory
FERRET_PRECISION = "double"
FERRET_MEMORY = "31.25"
cancel redirect
let contents = { spawn:"cat ./sub-dir/redirect_stdout.txt" }
list contents
             VARIABLE : { SPAWN:"cat ./sub-dir/redirect_stdout.txt" }
             SUBSET   : 7 points (X)
 1   / 1:" "                                          
 2   / 2:"! write to the file and look at the results"
 3   / 3:" "                                          
 4   / 4:"show symbol ferret_precision, ferret_memory"
 5   / 5:"FERRET_PRECISION = "double""                
 6   / 6:"FERRET_MEMORY = "31.25""                    
 7   / 7:"cancel redirect"                            
cancel var contents
 
sp rm -rf sub-dir
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_err_attrib_overrun
! err71_err_attrib_overrun.jnl
! See ticket 2523
 
! this ends with a segment fault sensitive to any changes
! presumably a buffer over-run
 
! the crash is occuring because of a buffer over-run
! in IS_ATTRIB_VAL we call CREATE_TEMP_MEM_VAR to create an mr of size=1
! later we call INIT_C_STRING_ARRAY and tell it to initialize this mr array
! using a length nvdims=3  ==> OVERRUN
 
! This bug never reared its head in the pre-dynamic memory Ferret, because
! the buffers couldn't really be over-run, since they were part of a huge
! static memory block
 
! other INIT_* calls in IS_ATTRIB_VAL may have a similar issue
 
 
set mode diag
 
use ocean_atlas_temp
use gt4d011
use levitus_climatology
 
use coads_climatology
 
let lnames = ..dimnames[d=2]
 
CANCEL DATA/ALL
 canceling dset ./data/ocean_atlas_temp.cdf
 canceling dset ./data/gt4d011.cdf
 canceling dset ./data/levitus_climatology.cdf
 canceling dset ./data/coads_climatology.cdf
 
! this line seems to be essential making the crash happen
PPL TICS .125,.25,.125,.25 !reset tics to default
 
use coads_climatology
 
let a = sst[d=1].dimnames
show mem/diag   ! looks like no dynamic memory actions have occured
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 500
    Un-cached variables: 0
    SET MEMORY/MAX: 250 Mb   (31.25 megawords)
    Peak demand: 0 Kb
    Current cache: 0 Kb
 
! resulted in a seg fault (on 32-bit stout)
list a[i=2]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid A        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    A        C:  6 dset:   1 I:      2      2  J: -999 -999  K: -999 -999  L:   -999   -999
 attrib_val attr     M:  3 dset:   1 I:      2      2  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : SST[D=coads_climatology].DIMNAMES
             FILENAME : coads_climatology.cdf
             X        : 2
        "COADSY"
 
 
GO bn_reset
cancel mode verify
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE A        M:  2 dset:   1 I:      2      2  J: -999 -999  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid XABSTRACT       ABSTRACT  NORMAL    NORMAL    NORMAL
 -DELETE attr     M:  3 dset:   1 I:      2      2  J: -999 -999  K: -999 -999  L:   -999   -999
 canceling dset ./data/coads_climatology.cdf
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_user_var_attrib
! err71_user_var_attrib.jnl
! See ticket 2132
 
! command was trying to list dataset information for a user variable
!
 
let a = 1
define att a.myAttr = "whatever"
show att a.myAttr
 a.myAttr = whatever 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_save_bounds
! err71_save_bounds
! Ticket 2524. The SAVE command previously gave an error
 
define axis/t time = {1,2,4}
use write_int_att.nc
 
! Tell Ferret to use the axis names from the file, and write data
cancel mode upcase
save/file=a.nc/clobber mhchla
 
! move this to bn_gif.jnl
! GO bn_reset
! GO err71_vs_constant
 
! run this from bn_gif.jnl
! GO bn_reset
! GO err71_vs_lon_over
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_point_average
! err71_point_average.jnl
! Ticket 2538 6/2017
! Average over a point removes dependence on that dimension.
! previously returned missing-data
 
let a = x[x=1:5] + y[y=1:3]
list a
             VARIABLE : X[X=1:5] + Y[Y=1:3]
             SUBSET   : 5 by 3 points (X-Y)
             1      2      3      4      5    
             1      2      3      4      5
 1   / 1:  2.000  3.000  4.000  5.000  6.000
 2   / 2:  3.000  4.000  5.000  6.000  7.000
 3   / 3:  4.000  5.000  6.000  7.000  8.000
 
list a[y=2@ave]
             VARIABLE : X[X=1:5] + Y[Y=1:3]
             SUBSET   : 5 points (X)
             Y        : 2 (averaged)
 1   / 1:  3.000
 2   / 2:  4.000
 3   / 3:  5.000
 4   / 4:  6.000
 5   / 5:  7.000
list a[x=2@ave]
             VARIABLE : X[X=1:5] + Y[Y=1:3]
             SUBSET   : 3 points (Y)
             X        : 2 (averaged)
 1   / 1:  3.000
 2   / 2:  4.000
 3   / 3:  5.000
list a[y=2@ave,x=4@ave]  ! all prev. versions listed these as missing
             VARIABLE : X[X=1:5] + Y[Y=1:3]
             X        : 4 (XY ave)
             Y        : 2 (XY ave)
          6.000
 
let a = z[z=1:5] + t[t=1:3]
list a[z=2@ave]
             VARIABLE : Z[Z=1:5] + T[T=1:3]
             SUBSET   : 3 points (T)
             Z        : 2 (averaged)
 1   / 1:  3.000
 2   / 2:  4.000
 3   / 3:  5.000
list a[t=2@ave]
             VARIABLE : Z[Z=1:5] + T[T=1:3]
             SUBSET   : 5 points (Z)
             T        : 2 (averaged)
 1   / 1:  3.000
 2   / 2:  4.000
 3   / 3:  5.000
 4   / 4:  6.000
 5   / 5:  7.000
 
list a[t=2@ave,z=4@ave]
             VARIABLE : Z[Z=1:5] + T[T=1:3]
             Z        : 4 (ZT ave)
             T        : 2 (ZT ave)
          6.000
 
let a = _e[e=1:5] + _f[f=1:3]
list a[f=2@ave]
             VARIABLE : _E[E=1:5] + _F[F=1:3]
             SUBSET   : 5 points (E)
             F        : 2 (averaged)
 1   / 1:  3.000
 2   / 2:  4.000
 3   / 3:  5.000
 4   / 4:  6.000
 5   / 5:  7.000
list a[e=2@ave]
             VARIABLE : _E[E=1:5] + _F[F=1:3]
             SUBSET   : 3 points (F)
             E        : 2 (averaged)
 1   / 1:  3.000
 2   / 2:  4.000
 3   / 3:  5.000
list a[f=2@ave,e=4@ave]
             VARIABLE : _E[E=1:5] + _F[F=1:3]
             E        : 4 ( ave)
             F        : 2 ( ave)
          6.000
 
! Check result if the missing-flag is zero
 
let/bad=0 a = x[x=1:5] + y[y=1:3]
list a
             VARIABLE : X[X=1:5] + Y[Y=1:3]
             SUBSET   : 5 by 3 points (X-Y)
             1      2      3      4      5    
             1      2      3      4      5
 1   / 1:  2.000  3.000  4.000  5.000  6.000
 2   / 2:  3.000  4.000  5.000  6.000  7.000
 3   / 3:  4.000  5.000  6.000  7.000  8.000
 
list a[y=2@ave]
             VARIABLE : X[X=1:5] + Y[Y=1:3]
             SUBSET   : 5 points (X)
             Y        : 2 (averaged)
 1   / 1:  3.000
 2   / 2:  4.000
 3   / 3:  5.000
 4   / 4:  6.000
 5   / 5:  7.000
list a[x=2@ave]
             VARIABLE : X[X=1:5] + Y[Y=1:3]
             SUBSET   : 3 points (Y)
             X        : 2 (averaged)
 1   / 1:  3.000
 2   / 2:  4.000
 3   / 3:  5.000
list a[y=2@ave,x=4@ave]  ! all prev. versions listed these as missing
             VARIABLE : X[X=1:5] + Y[Y=1:3]
             X        : 4 (XY ave)
             Y        : 2 (XY ave)
          6.000
 
 
! multiple directions including e,f
 
use 6dfile.nc
 
! average, result is on xz
let uave = u[i=1:3,j=50@ave,l=1@ave,m=3@ave,n=2@ave]
list uave
             VARIABLE : U[I=1:3,J=50@AVE,L=1@AVE,M=3@AVE,N=2@AVE]
             FILENAME : 6dfile.nc
             SUBSET   : 3 by 27 points (LONGITUDE-DEPTH (m))
             LATITUDE : 6.167N to 6.5N
             TIME     : 15-MAR-1983 09:30 to 15-MAR-1983 10:30
             E        : 2.5 to 3.5
             F        : 2 to 4
                161W   160W   159W   
                  1      2      3
 5       /  1:  24.15  24.10  24.52
 15      /  2:  41.58  41.84  42.38
 25      /  3:  36.76  36.95  37.39
 35      /  4:  34.78  34.86  35.18
 45      /  5:  34.36  34.46  34.70
 55      /  6:  30.08  30.10  30.46
 65      /  7:  27.89  27.81  27.94
 75      /  8:  25.72  25.66  25.78
 85      /  9:  23.77  23.69  23.76
 95      / 10:  21.96  21.87  21.92
 106.2   / 11:  20.22  20.12  20.14
 120     / 12:  18.45  18.35  18.34
 136.2   / 13:  16.96  16.85  16.82
 155     / 14:  15.78  15.66  15.61
 177.5   / 15:  14.85  14.72  14.64
 205     / 16:  14.11  13.97  13.85
 240     / 17:  13.43  13.25  13.10
 288.5   / 18:  12.56  12.35  12.15
 362.5   / 19:  11.30  11.04  10.78
 483.5   / 20:   9.32   8.99   8.67
 680     / 21:   6.68   6.33   5.99
 979.5   / 22:   4.31   4.04   3.78
 1395.5  / 23:   3.09   2.96   2.85
 1916    / 24:   3.05   3.07   3.08
 2524    / 25:   3.24   3.36   3.47
 3174    / 26:   3.19   3.36   3.51
 3824    / 27:   3.19   3.39   3.56
save/clobber/nobounds/file=a.nc uave
sp ncdump -h a.nc
netcdf a {
dimensions:
	PSXU69_72 = 3 ;
	PSZT = 27 ;
variables:
	double PSXU69_72(PSXU69_72) ;
		PSXU69_72:units = "degrees_east" ;
		PSXU69_72:point_spacing = "even" ;
		PSXU69_72:modulo = 360. ;
		PSXU69_72:axis = "X" ;
		PSXU69_72:standard_name = "longitude" ;
	double PSZT(PSZT) ;
		PSZT:units = "meters" ;
		PSZT:positive = "down" ;
		PSZT:point_spacing = "uneven" ;
		PSZT:axis = "Z" ;
		PSZT:standard_name = "depth" ;
	double uave(PSZT, PSXU69_72) ;
		uave:missing_value = -1.e+34 ;
		uave:_FillValue = -1.e+34 ;
		uave:long_name = "U[I=1:3,J=50@AVE,L=1@AVE,M=3@AVE,N=2@AVE]" ;
		uave:history = "From 6dfile" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
! average, result is on yt
let uave = u[i=3@ave,j=50:60,l=3:6,z=40@ave,m=3@ave,n=2@ave]
list uave
             VARIABLE : U[I=3@AVE,J=50:60,L=3:6,Z=40@AVE,M=3@AVE,N=2@AVE]
             FILENAME : 6dfile.nc
             SUBSET   : 11 points (LATITUDE)
             LONGITUDE: 159.5W to 158.5W
             DEPTH (m): 35
             TIME     : 15-MAR-1983 12:00
             E        : 2.5 to 3.5
             F        : 2 to 4
 9.67N / 60: -21.61
 9.33N / 59: -15.77
 9N    / 58: -10.95
 8.67N / 57:  -4.78
 8.33N / 56:   0.43
 8N    / 55:   5.49
 7.67N / 54:  10.50
 7.33N / 53:  15.96
 7N    / 52:  21.89
 6.67N / 51:  28.23
 6.33N / 50:  35.20
save/clobber/nobounds/file=a.nc uave
sp ncdump -h a.nc
netcdf a {
dimensions:
	PSYU15_75 = 11 ;
	TIME = UNLIMITED ; // (1 currently)
variables:
	double PSYU15_75(PSYU15_75) ;
		PSYU15_75:units = "degrees_north" ;
		PSYU15_75:point_spacing = "uneven" ;
		PSYU15_75:axis = "Y" ;
		PSYU15_75:standard_name = "latitude" ;
	double TIME(TIME) ;
		TIME:axis = "T" ;
		TIME:units = "hour since 1980-01-14 14:00:00" ;
		TIME:time_origin = "14-JAN-1980 14:00:00" ;
		TIME:standard_name = "time" ;
	double uave(TIME, PSYU15_75) ;
		uave:missing_value = -1.e+34 ;
		uave:_FillValue = -1.e+34 ;
		uave:long_name = "U[I=3@AVE,J=50:60,L=3:6,Z=40@AVE,M=3@AVE,N=2@AVE]" ;
		uave:history = "From 6dfile" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
! average, result is on e-f, single time
let uave = u[i=3@ave,y=8@ave,z=15@ave,t="15-MAR-1983 11:00"]
list uave
             VARIABLE : U[I=3@AVE,Y=8@AVE,Z=15@AVE,T="15-MAR-1983 11:00"]
             FILENAME : 6dfile.nc
             SUBSET   : 5 by 4 points (E-F)
             LONGITUDE: 159.5W to 158.5W
             LATITUDE : 8N
             DEPTH (m): 15
             TIME     : 15-MAR-1983 11:00
             1      2      3      4      5    
             1      2      3      4      5
 1   / 1: -2.239 -1.239 -0.239  0.761  1.761
 3   / 2: -2.039 -1.039 -0.039  0.961  1.961
 5   / 3: -1.839 -0.839  0.161  1.161  2.161
 7   / 4: -1.639 -0.639  0.361  1.361  2.361
save/clobber/nobounds/file=a.nc uave
sp ncdump -h a.nc
netcdf a {
dimensions:
	TIME = 1 ;
	EAXIS = 5 ;
	FAXIS = 4 ;
variables:
	double TIME(TIME) ;
		TIME:point_spacing = "uneven" ;
		TIME:axis = "T" ;
		TIME:units = "hour since 1980-01-14 14:00:00" ;
		TIME:time_origin = "14-JAN-1980 14:00:00" ;
		TIME:standard_name = "time" ;
	double EAXIS(EAXIS) ;
		EAXIS:point_spacing = "even" ;
		EAXIS:axis = "E" ;
	double FAXIS(FAXIS) ;
		FAXIS:point_spacing = "even" ;
		FAXIS:axis = "F" ;
	double uave(FAXIS, EAXIS, TIME) ;
		uave:missing_value = -1.e+34 ;
		uave:_FillValue = -1.e+34 ;
		uave:long_name = "U[I=3@AVE,Y=8@AVE,Z=15@AVE,T=\"15-MAR-1983 11:00\"]" ;
		uave:history = "From 6dfile" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_2d_ave_miss0
! err71_2d_ave_miss0.jnl
! Ticket 2539: data with 0 as missing flag,
! 2D average or definite integral all-missing
! 6/5/2017 *acm*
 
use gt4d011.cdf
let temp0 = temp
set var/bad=0. temp0
save/clobber/file=a.nc temp0
can dat/all
can var/all
use a.nc
 
! Both of these should have all valid numbers,
! previously (in v7.1+) they were all-missing.
list/k=1/L=1:10 temp0[x=@ave,y=@ave], temp0[x=@din,y=@din]
             DATA SET: ./a.nc
             TIME: 14-AUG-1982 11:00 to 14-OCT-1982 07:00
             LONGITUDE: 140W to 122W
             LATITUDE: 3.667S to 3.667N
             DEPTH (m): 5
 Column  1: TEMP0[X=@AV4,Y=@AV4] is TEMP
 Column  2: TEMP0[X=@IN4,Y=@IN4] is TEMP
                     TEMP0     TEMP0
17-AUG-1982 12 /  1:  26.50  4.322E+13
23-AUG-1982 14 /  2:  26.63  4.344E+13
29-AUG-1982 16 /  3:  26.81  4.372E+13
04-SEP-1982 18 /  4:  27.02  4.407E+13
10-SEP-1982 20 /  5:  27.30  4.452E+13
16-SEP-1982 22 /  6:  27.65  4.510E+13
23-SEP-1982 00 /  7:  28.07  4.577E+13
29-SEP-1982 02 /  8:  28.56  4.658E+13
05-OCT-1982 04 /  9:  29.17  4.757E+13
11-OCT-1982 06 / 10:  29.84  4.866E+13
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_read_delim
! err71_read_delim.jnl
! 6/9/2017 ACM
! Ticket 2540, Write errors when data is read using - to skip fields
! in a delimited read
 
define axis/x=1:10:1 row_ax
define grid/x=row_ax in_grid
 
 
FILE/FORM=delim/skip=1/grid=in_grid\
/var="YEAR,MONTH,LON,LAT,-,HAULJOIN,LENGTH,FREQ,-,BTTM_TEMP,SST,BTTM_DEPTH,CPUE,BIN"\
/typ="num,num,num,num,-,num,num,num,-,num,num,num,num,num,"/delim="\,"\
 shorttest.dat
 
set var/title="year" YEAR
set var/title="month" MONTH
set var/title="lon"/units="degrees_E" LON
set var/title="lat"/units="degrees_N" LAT
set var/title="hauljoin" HAULJOIN
set var/title="length"/units="mm" LENGTH
set var/title="freq"/units="Number" FREQ
set var/title="bttm_temp"/units="degrees_C" BTTM_TEMP
set var/title="SST"/units="degrees_C" SST
set var/title="bttm_depth"/units="m" BTTM_DEPTH
set var/title="CPUE"/units="fish/km**2" CPUE
set var/title="bin_size"/units="mm" BIN
 
! Previously this caused netcdf library errors and exited out of Ferret
save/file=a.nc/clobber year, month, lon, lat, hauljoin, length, freq, bttm_temp, SST, bttm_depth, CPUE, bin
 
sp ncdump -h a.nc
netcdf a {
dimensions:
	row_ax = 10 ;
variables:
	double row_ax(row_ax) ;
		row_ax:point_spacing = "even" ;
		row_ax:axis = "X" ;
	double YEAR(row_ax) ;
		YEAR:missing_value = -1.e+34 ;
		YEAR:_FillValue = -1.e+34 ;
		YEAR:long_name = "year" ;
		YEAR:history = "From shorttest.dat" ;
	double MONTH(row_ax) ;
		MONTH:missing_value = -1.e+34 ;
		MONTH:_FillValue = -1.e+34 ;
		MONTH:long_name = "month" ;
		MONTH:history = "From shorttest.dat" ;
	double LON(row_ax) ;
		LON:missing_value = -1.e+34 ;
		LON:_FillValue = -1.e+34 ;
		LON:long_name = "lon" ;
		LON:units = "degrees_E" ;
		LON:history = "From shorttest.dat" ;
	double LAT(row_ax) ;
		LAT:missing_value = -1.e+34 ;
		LAT:_FillValue = -1.e+34 ;
		LAT:long_name = "lat" ;
		LAT:units = "degrees_N" ;
		LAT:history = "From shorttest.dat" ;
	double HAULJOIN(row_ax) ;
		HAULJOIN:missing_value = -1.e+34 ;
		HAULJOIN:_FillValue = -1.e+34 ;
		HAULJOIN:long_name = "hauljoin" ;
		HAULJOIN:history = "From shorttest.dat" ;
	double LENGTH(row_ax) ;
		LENGTH:missing_value = -1.e+34 ;
		LENGTH:_FillValue = -1.e+34 ;
		LENGTH:long_name = "length" ;
		LENGTH:units = "mm" ;
		LENGTH:history = "From shorttest.dat" ;
	double FREQ(row_ax) ;
		FREQ:missing_value = -1.e+34 ;
		FREQ:_FillValue = -1.e+34 ;
		FREQ:long_name = "freq" ;
		FREQ:units = "Number" ;
		FREQ:history = "From shorttest.dat" ;
	double BTTM_TEMP(row_ax) ;
		BTTM_TEMP:missing_value = -1.e+34 ;
		BTTM_TEMP:_FillValue = -1.e+34 ;
		BTTM_TEMP:long_name = "bttm_temp" ;
		BTTM_TEMP:units = "degrees_C" ;
		BTTM_TEMP:history = "From shorttest.dat" ;
	double SST(row_ax) ;
		SST:missing_value = -1.e+34 ;
		SST:_FillValue = -1.e+34 ;
		SST:long_name = "SST" ;
		SST:units = "degrees_C" ;
		SST:history = "From shorttest.dat" ;
	double BTTM_DEPTH(row_ax) ;
		BTTM_DEPTH:missing_value = -1.e+34 ;
		BTTM_DEPTH:_FillValue = -1.e+34 ;
		BTTM_DEPTH:long_name = "bttm_depth" ;
		BTTM_DEPTH:units = "m" ;
		BTTM_DEPTH:history = "From shorttest.dat" ;
	double CPUE(row_ax) ;
		CPUE:missing_value = -1.e+34 ;
		CPUE:_FillValue = -1.e+34 ;
		CPUE:long_name = "CPUE" ;
		CPUE:units = "fish/km**2" ;
		CPUE:history = "From shorttest.dat" ;
	double BIN(row_ax) ;
		BIN:missing_value = -1.e+34 ;
		BIN:_FillValue = -1.e+34 ;
		BIN:long_name = "bin_size" ;
		BIN:units = "mm" ;
		BIN:history = "From shorttest.dat" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_isready_unknown
! err71_isready_unknown.jnl
! ticket 2533, variable b depending on undefined variable c is
! reported not ready, but variable a with a regridding operation is
! mistakenly reported ready.
 
use coads_climatology
let a = b[gxy=sst[d=1]]
let b = c
 
! both should return 0
say `b,r=isready`
 !-> MESSAGE/CONTINUE 0
0
say `a,r=isready`
 !-> MESSAGE/CONTINUE 0
0
 
! And VTREE reported no unknown variables in its tree
! The line for C should say UNKNOWN VARIABLE
sho var/tree a
   in default dataset coads_climatology
   A = B[GXY=SST[D=1]]
     B = C
       C ??			<== UNKNOWN VARIABLE ******
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_ppl_sho_empty
! err71_ppl_sho_empty.jnl
! ticket 2543, PPL SHOW pplsym is a command, but it
! gave a Fortran runtime error if given with no argument
! Now send these errors through the Ferret errmsg routine.
 
! This is a valid sequence, pplus symbol definition
 
pplus set xpos 3.2
pplus show xpos
 XPOS                           = 3.2
 
! intentional error
 
set mode ignore
 
! This is a correct error message, undefined symbol
pplus show nosymbol
 
! This previously hit a runtime error, symbol name missing.
ppl show
 
! Another PPL error we might hit is an invalid command.
! Write this error message
PPL nonsense
 
set mode/last ignore
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_string_and_if
! err71_string_and_if.jnl
!  6/28/2018, ticket 2547
 
! problem with masked strings -> unexpected values instead of strings:
can var/all
let test = {1,1,0}
let strings = {"a", "b", "c"}
list if (test) then strings
             VARIABLE : IF (TEST) THEN STRINGS
             SUBSET   : 3 points (X)
 1   / 1:"a"
 2   / 2:"b"
 3   / 3:"" 
 
! works: define a masked variable instead, then list
let masked = if (test) then strings
list masked
             VARIABLE : IF (TEST) THEN STRINGS
             SUBSET   : 3 points (X)
 1   / 1:"a"
 2   / 2:"b"
 3   / 3:"" 
 
! alternatively, do the same listing for a float first
let floats = {2,3,4}
list if (test) then floats
             VARIABLE : IF (TEST) THEN FLOATS
             SUBSET   : 3 points (X)
 1   / 1:  2.000
 2   / 2:  3.000
 3   / 3:   ....
 
! now, also for strings listing while masking works
list if (test) then strings
             VARIABLE : IF (TEST) THEN STRINGS
             SUBSET   : 3 points (X)
 1   / 1:"a"
 2   / 2:"b"
 3   / 3:"" 
 
 
 
! the next problem comes with xsequence
! again unexpected numerical values instead of strings
can var/all
let test = {1,1,0}
let strings = {"a", "b", "c"}
let masked = if (test) then strings
list xsequence(masked)
             VARIABLE : XSEQUENCE(MASKED)
             SUBSET   : 3 points (X)
 1   / 1:"a"
 2   / 2:"b"
 3   / 3:"" 
 
! but doing a listing first fixes it:
can var/all
let test = {1,1,0}
let strings = {"a", "b", "c"}
list if (test) then strings
             VARIABLE : IF (TEST) THEN STRINGS
             SUBSET   : 3 points (X)
 1   / 1:"a"
 2   / 2:"b"
 3   / 3:"" 
let masked = if (test) then strings
list xsequence(masked)
             VARIABLE : XSEQUENCE(MASKED)
             SUBSET   : 3 points (X)
 1   / 1:"a"
 2   / 2:"b"
 3   / 3:"" 
 
 
! NOT fixed by defining a second masked variable before:
can var/all
let test = {1,1,0}
let strings = {"a", "b", "c"}
let masked = if (test) then strings
let masked2 = xsequence(masked)
list masked2
             VARIABLE : XSEQUENCE(MASKED)
             SUBSET   : 3 points (X)
 1   / 1:"a"
 2   / 2:"b"
 3   / 3:"" 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_expr_w_const
! err71_expr_w_const.jnl
! ticket 2313: return= is loading the whole
! grid unnecessarily in the last example
 
DEFINE SYMBOL saved_memory_size = ($FERRET_BYTES_MEM)
 !-> DEFINE SYMBOL saved_memory_size = 250Mb
 
set mem/size=8M
def ax/t=1-jan-0001:1-jan-1000:1/unit=year tax
let a = t[gt=tax] + x[gx=1:1000:1] + y[gy=1:1000:1]
 
! These work fine
say `a,return=cal`
 !-> MESSAGE/CONTINUE GREGORIAN
GREGORIAN
 
use coads_climatology
let s1= sst[x=@ave,y=1,L=@max]
say `s1*a,return=cal`
 !-> MESSAGE/CONTINUE GREGORIAN
GREGORIAN
 
! but the constant variable "let one = 1" introduced abstract
! axes to the grid which  caused Ferret to try to load the
! data in A which is large
 
let one = 1
let a1 = a*one
show grid a1
    GRID (G###)
 name       axis              # pts   start                end                 subset
 (AX###)   X                 1000 r   1                    1000                1000 pts
 (AX###)   Y                 1000 r   1                    1000                1000 pts
 normal    Z
 tax       TIME              1000 r   01-JAN-0001 00:00    01-JAN-1000 06:10   full
say `a*one,return=cal`
 !-> MESSAGE/CONTINUE GREGORIAN
GREGORIAN
 
! clean up
SET MEMORY/SIZE=($saved_memory_size)
 !-> SET MEMORY/SIZE=250Mb
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_colorlevs
! err71_colorlevs
! See ticket 2550. Top data value is not among color levels used in the plot.
! And symbols LEV* do not list the levels used.
 
use co_emac.nc
stat co_emac
 
             CO EMAC
             LONGITUDE: 0E to 120E
             LATITUDE: 0 to 40N
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: ./data/co_emac.nc
 
 Total # of data points: 48 (12*4*1*1*1*1)
 # flagged as bad  data: 4
 Minimum value: 6.1527E-08
 Maximum value: 1.8643E-07
 Mean    value: 8.7383E-08 (unweighted average)
 Standard deviation: 2.2308E-08
 
! previously there were 25 levels chosen by the automatic
! method, missing the top one because of roundoff error.
! Thus one cell went unfilled.  The LEV_MIN etc symbols were
! set to 0 because of inadequate formatting of the tiny numbers.
 
set mode nlevels 30
shade co_emac
sh sym lev*
LEV_ALL = "6.E-08,6.5E-08,7.E-08,7.5E-08,8.E-08,8.5E-08,9.E-08,9.5E-08,1.E-07,1.05E-07,1.1E-07,1.15E-07,1.2E-07,1.25E-07,1.3E-07,1.35E-07,1.4E-07,1.45E-07,1.5E-07,1.55E-07,1.6E-07,1.65E-07,1.7E-07,1.75E-07,1.8E-07,1.85E-07,1.9E-07"
LEV_MIN = "6.E-08"
LEV_MAX = "1.9E-07"
LEV_NUM = "26"
LEV_DEL = "5.E-09"
LEV_CENTERED_LABELS = "off"
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_repeat_paren
! err71_repeat_paren.jnl
! Ticket 2551. The second command with an extra parenthese is not reported
! to be a syntax error but just reports wrong info.
 
repeat/range=1:3:1/name=count (def sym count = `count`; say ($count); message/continue)
 !-> repeat/range=1:3:1/name=count (def sym count = `count`; say ($count); message/continue)
!-> REPEAT: COUNT:1
 !-> def sym count = 1
 !-> MESSAGE/CONTINUE 1
1

!-> REPEAT: COUNT:2
 !-> def sym count = 2
 !-> MESSAGE/CONTINUE 2
2

!-> REPEAT: COUNT:3
 !-> def sym count = 3
 !-> MESSAGE/CONTINUE 3
3

 
! Previously the extra paren at the end did not trigger an error
! but caused a parsing error so the command
!   say ($count)
! was parsed and fixed at "say 3" before the loop started.
 
set mode ignore
repeat/range=1:3:1/name=count (def sym count = `count`; say ($count); message/continue))
set mode/last ignore
 
*** Running ferret script: bn_compressed_gather.jnl
! bn_compressed_gather.jnl
! 11/2016 (for trac #2428 enhancement)
! updated 3/17 for dynamic memory and using SHOW MEM/DIAG
!  6/19, code changes for SET MEM in terms of Mbytes. But
!  here, the SET MEMORY commands are done in terms of megawords,
!  as we're thinking of grid sizes
! 11/19 Remove commented-out references to obsolete mode desperate
!       Change arguments to call for @STD, unintended huge max.
 
! initialize
DEFINE SYMBOL saved_memory_size = ($FERRET_BYTES_MEM)
 !-> DEFINE SYMBOL saved_memory_size = 500Mb
 
 
! force a split/gather operation due to a T=@ave
 
! in previous versions of Ferret the split could not occur on the transformed
! axis, so the X axis would have been used.  Here the T=@ave axis will be used
 
! Give us something to look at while we run these tests which dont make plots
plot/noax/nolab/vlim=0:1/i=4:5 i
annotate/norm/x=0/y=0.5 "@AC... running bn_compressed_gather"
 
! ******* tests of  T=@DIN and T=@ave ******
define axis/x=1:1001:1 xax
define axis/y=1:10:1 yax
define axis/T=1:1000:1 tax
 
let xt = (x[gx=xax]-501) + 0*y[gy=yax] + T[gt=tax]
 
* note: SUM of integers 1 to 1000 = N(N+1)/2 ==> 500500
*       stat average of (x[gx=xax]-501) is zero
*       so the full 2D stat mean should be 500500
 
! there are 10*1000*1001 points in the full grid => ~10M
! given the necessary cautions (see IS_STRIP and MODE FRUGAL),
! a size of 12 for sure requires a gather operation
! confirm gathering is occuring by looking at the diagnostic output
 
SET MEMORY/SIZE=12
 
stat xt[l=@din]
 
             (X[GX=XAX]-501) + 0*Y[GY=YAX] + T[GT=TAX]
             X: 0.5 to 1001.5
             Y: 0.5 to 10.5
             Z:  N/A
             T: 0.5 to 1000.5 (integrated)
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 10010 (1001*10*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 500
 Maximum value: 1.0005E+06
 Mean    value: 5.005E+05 (unweighted average)
 Standard deviation: 2.8898E+05
SHOW MEMORY/DIAGNOSTIC   ! look at peak memory usage
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        XT             T     DIN       209           1
    Total table slots: 500
    Free table slots: 494
    Un-cached variables: 0
    SET MEMORY/MAX: 96 Mb   (12 megawords)
    Peak demand: 16.98 Mb
    Current cache: 80.24 Mb
 
! many variations on this test
! note that in the first case peak memory will show as ZERO.
! The first SET MEMORY command resets the peak memory to zero, and
! then the expression "xt[l=@din]" gets found without re-computation
! having been computed just above
GO bn_compressed_gather.sub xt[l=@din] 40 12
 
 Total # of data points: 10010 (1001*10*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 500
 Maximum value: 1.0005E+06
 Mean    value: 5.005E+05 (unweighted average)
    SET MEMORY/MAX: 320 Mb   (40 megawords)
    Peak demand: 160.16 Kb
    Current cache: 80.24 Mb
 
 Total # of data points: 10010 (1001*10*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 500
 Maximum value: 1.0005E+06
 Mean    value: 5.005E+05 (unweighted average)
    SET MEMORY/MAX: 96 Mb   (12 megawords)
    Peak demand: 16.98 Mb
    Current cache: 80.24 Mb
COMPRESSED GATHER success on expression xt[l=@din]
 
! altered limits syntax
GO bn_compressed_gather.sub xt[l=1:1000@din] 40 12
 
 Total # of data points: 10010 (1001*10*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 500
 Maximum value: 1.0005E+06
 Mean    value: 5.005E+05 (unweighted average)
    SET MEMORY/MAX: 320 Mb   (40 megawords)
    Peak demand: 160.16 Kb
    Current cache: 80.24 Mb
 
 Total # of data points: 10010 (1001*10*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 500
 Maximum value: 1.0005E+06
 Mean    value: 5.005E+05 (unweighted average)
    SET MEMORY/MAX: 96 Mb   (12 megawords)
    Peak demand: 16.98 Mb
    Current cache: 80.24 Mb
COMPRESSED GATHER success on expression xt[l=1:1000@din]
 
! test T=@AVE
GO bn_compressed_gather.sub xt[l=@ave]  40 12
 
 Total # of data points: 10010 (1001*10*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0.5
 Maximum value: 1000.5
 Mean    value: 500.5 (unweighted average)
    SET MEMORY/MAX: 320 Mb   (40 megawords)
    Peak demand: 56.06 Mb
    Current cache: 80.24 Mb
 
 Total # of data points: 10010 (1001*10*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0.5
 Maximum value: 1000.5
 Mean    value: 500.5 (unweighted average)
    SET MEMORY/MAX: 96 Mb   (12 megawords)
    Peak demand: 16.98 Mb
    Current cache: 80.24 Mb
COMPRESSED GATHER success on expression xt[l=@ave]
 
! various partial grid points at end
GO bn_compressed_gather.sub xt[T=@ave]  40 12
 
 Total # of data points: 10010 (1001*10*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0.5
 Maximum value: 1000.5
 Mean    value: 500.5 (unweighted average)
    SET MEMORY/MAX: 320 Mb   (40 megawords)
    Peak demand: 56.06 Mb
    Current cache: 80.24 Mb
 
 Total # of data points: 10010 (1001*10*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0.5
 Maximum value: 1000.5
 Mean    value: 500.5 (unweighted average)
    SET MEMORY/MAX: 96 Mb   (12 megawords)
    Peak demand: 16.98 Mb
    Current cache: 80.24 Mb
COMPRESSED GATHER success on expression xt[T=@ave]
GO bn_compressed_gather.sub xt[T=0.5:1000.5@ave]  40 12
 
 Total # of data points: 10010 (1001*10*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0.5
 Maximum value: 1000.5
 Mean    value: 500.5 (unweighted average)
    SET MEMORY/MAX: 320 Mb   (40 megawords)
    Peak demand: 56.06 Mb
    Current cache: 80.24 Mb
 
 Total # of data points: 10010 (1001*10*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0.5
 Maximum value: 1000.5
 Mean    value: 500.5 (unweighted average)
    SET MEMORY/MAX: 96 Mb   (12 megawords)
    Peak demand: 16.98 Mb
    Current cache: 80.24 Mb
COMPRESSED GATHER success on expression xt[T=0.5:1000.5@ave]
GO bn_compressed_gather.sub xt[T=0.6:1000.4@ave]  40 12
 
 Total # of data points: 10010 (1001*10*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0.5
 Maximum value: 1000.5
 Mean    value: 500.5 (unweighted average)
    SET MEMORY/MAX: 320 Mb   (40 megawords)
    Peak demand: 56.06 Mb
    Current cache: 80.24 Mb
 
 Total # of data points: 10010 (1001*10*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0.5
 Maximum value: 1000.5
 Mean    value: 500.5 (unweighted average)
    SET MEMORY/MAX: 96 Mb   (12 megawords)
    Peak demand: 16.98 Mb
    Current cache: 80.24 Mb
COMPRESSED GATHER success on expression xt[T=0.6:1000.4@ave]
GO bn_compressed_gather.sub xt[T=1:1000@ave]  40 12
 
 Total # of data points: 10010 (1001*10*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0.5
 Maximum value: 1000.5
 Mean    value: 500.5 (unweighted average)
    SET MEMORY/MAX: 320 Mb   (40 megawords)
    Peak demand: 56.06 Mb
    Current cache: 80.24 Mb
 
 Total # of data points: 10010 (1001*10*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0.5
 Maximum value: 1000.5
 Mean    value: 500.5 (unweighted average)
    SET MEMORY/MAX: 96 Mb   (12 megawords)
    Peak demand: 16.98 Mb
    Current cache: 80.24 Mb
COMPRESSED GATHER success on expression xt[T=1:1000@ave]
GO bn_compressed_gather.sub xt[T=1.2:999.8@ave] 40 12
 
 Total # of data points: 10010 (1001*10*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0.5
 Maximum value: 1000.5
 Mean    value: 500.5 (unweighted average)
    SET MEMORY/MAX: 320 Mb   (40 megawords)
    Peak demand: 56.06 Mb
    Current cache: 80.24 Mb
 
 Total # of data points: 10010 (1001*10*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0.5
 Maximum value: 1000.5
 Mean    value: 500.5 (unweighted average)
    SET MEMORY/MAX: 96 Mb   (12 megawords)
    Peak demand: 16.98 Mb
    Current cache: 80.24 Mb
COMPRESSED GATHER success on expression xt[T=1.2:999.8@ave]
 
! *********************************************************
! ******* tests of "4D" @DIN and @ave ******
define axis/x=1:200:1 xax
define axis/y=1:200:1 yax
define axis/z=1:200:1 zax
define axis/T=1:2:1  tax
let xyz  = 0*X[gx=xax] + 0*Y[gy=yax] + Z[gz=zax]
let xyzt = 0*X[gx=xax] + 0*Y[gy=yax] + Z[gz=zax] + 0*T[gt=tax]
 
* note: SUM of Z is N*(N+1)/2 = 20100
* area integral in XY is 200*200=40,000
* total integral is 804,000,000 (8.04*E8)
 
* 3D XYZ test
* 2d slice size = 200*200 = 40,000
* 3d full size is 8,000,000  - so 10,000,000 is bigger
 
! confirm gathering is occuring by looking at the diagnostic output
cancel memory/all
set memory/size = 2  ! 2M v 8M: requires split/gather
! will split into 4 pieces (1/4 of 8,000,000 fits into 2,000,000)
! so z=1:50; then =51:100, Z=101:150, Z=151:200
stat xyz[x=@din,y=@din,z=@din]
 
             0*X[GX=XAX] + 0*Y[GY=YAX] + Z[GZ=ZAX]
             X: 0.5 to 200.5 (XYZ integ.)
             Y: 0.5 to 200.5 (XYZ integ.)
             Z: 0.5 to 200.5 (XYZ integ.)
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 8.04E+08
 Maximum value: 8.04E+08
 Mean    value: 8.04E+08 (unweighted average)
SHOW MEMORY/DIAGNOSTIC   ! look at peak memory usage
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        XYZ            Z     IN4         8           1
    Total table slots: 500
    Free table slots: 493
    Un-cached variables: 0
    SET MEMORY/MAX: 16 Mb   (2 megawords)
    Peak demand: 2.88 Mb
    Current cache: 15.36 Mb
 
! the clean version of same test
GO bn_compressed_gather.sub xyz[x=@din,y=@din,z=@din] 20 2
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 8.04E+08
 Maximum value: 8.04E+08
 Mean    value: 8.04E+08 (unweighted average)
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 0.02 Kb
    Current cache: 15.36 Mb
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 8.04E+08
 Maximum value: 8.04E+08
 Mean    value: 8.04E+08 (unweighted average)
    SET MEMORY/MAX: 16 Mb   (2 megawords)
    Peak demand: 2.88 Mb
    Current cache: 15.36 Mb
COMPRESSED GATHER success on expression xyz[x=@din,y=@din,z=@din]
 
! also do the average, which will provide a comparison result for the test
! that follows
! average along Z is 100.5
GO bn_compressed_gather.sub xyz[x=@ave,y=@ave,z=@ave] 20 2
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 100.5
 Maximum value: 100.5
 Mean    value: 100.5 (unweighted average)
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 28.16 Mb
    Current cache: 64 Mb
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 100.5
 Maximum value: 100.5
 Mean    value: 100.5 (unweighted average)
    SET MEMORY/MAX: 16 Mb   (2 megawords)
    Peak demand: 2.88 Mb
    Current cache: 15.36 Mb
COMPRESSED GATHER success on expression xyz[x=@ave,y=@ave,z=@ave]
 
! Since the T axis has only 2 points, the arithmetic above shows that the
! chunks to be gathered will still be too large after splitting on T, which
! in theory would trigger further splitting along Z.  However, there is only
! one opportunity to process compressed axis splitting -- in IS_STRIP
! at the time that it is stripping off the compressed transformation.  But
! a "4D" transform is stripped in a single operation. We choose an axis that
! is long enough to break into sufficiently small fragments
set memory/size = 6  ! 16M points in grid, 8M in each T-chunk
stat xyzt[x=@ave,y=@ave,z=@ave,t=@ave]
 
             0*X[GX=XAX] + 0*Y[GY=YAX] + Z[GZ=ZAX] + 0*T[GT=TAX]
             X: 0.5 to 200.5 (XYZT ave)
             Y: 0.5 to 200.5 (XYZT ave)
             Z: 0.5 to 200.5 (XYZT ave)
             T: 0.5 to 2.5 (XYZT ave)
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 100.5
 Maximum value: 100.5
 Mean    value: 100.5 (unweighted average)
show mem/diagnostic
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        XYZT           Z     AV4        13           1
    Total table slots: 500
    Free table slots: 493
    Un-cached variables: 0
    SET MEMORY/MAX: 48 Mb   (6 megawords)
    Peak demand: 12.48 Mb
    Current cache: 44.8 Mb
 
! test splitting along 2 axes in succession by making T=@AVE into a separate
! averaging operation
CANCEL MEMORY/ALL
LET xyzave = xyzt[x=@ave,y=@ave,z=@ave]
set memory/size = 6  ! 2M v 8M: requires split/gather
stat xyzave[t=@ave]
 
             XYZT[X=@AVE,Y=@AVE,Z=@AVE]
             X: 0.5 to 200.5
             Y: 0.5 to 200.5
             Z: 0.5 to 200.5
             T: 0.5 to 2.5 (averaged)
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 100.5
 Maximum value: 100.5
 Mean    value: 100.5 (unweighted average)
SHOW MEMORY/DIAGNOSTIC   ! look at peak memory usage
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        XYZAVE         T     AVE         1           1
        XYZT           Z     AV4        26           2
    Total table slots: 500
    Free table slots: 492
    Un-cached variables: 0
    SET MEMORY/MAX: 48 Mb   (6 megawords)
    Peak demand: 16.64 Mb
    Current cache: 39.04 Mb
 
! *********************************************************
! ******* tests of T= @var and @std ******
! the @var and @std transformation had to be switched to
! a single pass algorithm in order to implement split/gather
define axis/x=1:10000:1 xax
define axis/T=1:1001:1 tax
 
let xt = 0*x[gx=xax] + T[gt=tax]
let constant = 0*X[gx=xax] + 0*T[gt=tax] + 1234
let xt_zero_mean = 0*X[gx=xax] + (T[gt=tax]-501) + 1234
 
* note: sum of a sequence 1 to N of square integers is [N*(N+1)*(2N+1)]/6
* T-501 is 2 sequences: -500 to 1 and 1 to 500, therefore sum is
* 2 * [500*501*1001]/6 = 83583500
* mean of this sequence is 83583500/1001 = 83500
* ==> look for this as the correct answer to variance
 
! confirm gathering is occuring by looking at the diagnostic output
set memory/size= 12
stat constant[l=@var]
 
             Variance of 0*X[GX=XAX] + 0*T[GT=TAX] + 1234
             X: 0.5 to 10000.5
             Y:  N/A
             Z:  N/A
             T: 0.5 to 1001.5 (variance)
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 10000 (10000*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
 Standard deviation: 0
SHOW MEMORY/DIAGNOSTIC   ! look at peak memory usage
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        CONSTANT       T     VAR       209           1
    Total table slots: 500
    Free table slots: 494
    Un-cached variables: 0
    SET MEMORY/MAX: 96 Mb   (12 megawords)
    Peak demand: 33.68 Mb
    Current cache: 80.32 Mb
 
! clean test
cancel memory/all
GO bn_compressed_gather.sub constant[l=@var] 40 12
 
 Total # of data points: 10000 (10000*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
    SET MEMORY/MAX: 320 Mb   (40 megawords)
    Peak demand: 111.84 Mb
    Current cache: 80.32 Mb
 
 Total # of data points: 10000 (10000*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
    SET MEMORY/MAX: 96 Mb   (12 megawords)
    Peak demand: 33.68 Mb
    Current cache: 80.32 Mb
COMPRESSED GATHER success on expression constant[l=@var]
 
! known result
GO bn_compressed_gather.sub xt_zero_mean[l=@var] 40 12
 
 Total # of data points: 10000 (10000*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 83500
 Maximum value: 83500
 Mean    value: 83500 (unweighted average)
    SET MEMORY/MAX: 320 Mb   (40 megawords)
    Peak demand: 111.84 Mb
    Current cache: 80.32 Mb
 
 Total # of data points: 10000 (10000*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 83500
 Maximum value: 83500
 Mean    value: 83500 (unweighted average)
    SET MEMORY/MAX: 96 Mb   (12 megawords)
    Peak demand: 33.68 Mb
    Current cache: 80.32 Mb
COMPRESSED GATHER success on expression xt_zero_mean[l=@var]
 
! adding a constant doesn't effect the variance
GO bn_compressed_gather.sub xt[l=@var] 40 12
 
 Total # of data points: 10000 (10000*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 83500
 Maximum value: 83500
 Mean    value: 83500 (unweighted average)
    SET MEMORY/MAX: 320 Mb   (40 megawords)
    Peak demand: 56.16 Mb
    Current cache: 80.32 Mb
 
 Total # of data points: 10000 (10000*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 83500
 Maximum value: 83500
 Mean    value: 83500 (unweighted average)
    SET MEMORY/MAX: 96 Mb   (12 megawords)
    Peak demand: 17.04 Mb
    Current cache: 80.32 Mb
COMPRESSED GATHER success on expression xt[l=@var]
 
! same test, but  on @std (only one line of code difference so limited test)
* square root of 83500 is 288.96366553599779.
* Note: previous Ferret versions gave a consistent value
*  Minimum value: 288.9636655359978
*  Maximum value: 288.9636655359978
*  Mean    value: 288.9636655359978
* Now (11/16) we are getting slight variations in the 16th decimal (see"6")
*  Minimum value: 288.9636655359978
*  Maximum value: 288.9636655359978
*  Mean    value: 288.9636655359976
* *sh* @std differs from @var only by taking a SQRT() in the finalization step.
*      I suspect this is an artifact of the compiler optimization level
GO bn_compressed_gather.sub xt[l=@std] 40 12
 
 Total # of data points: 10000 (10000*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 288.9636655359978
 Maximum value: 288.9636655359978
 Mean    value: 288.9636655360099 (unweighted average)
    SET MEMORY/MAX: 320 Mb   (40 megawords)
    Peak demand: 56.16 Mb
    Current cache: 80.32 Mb
 
 Total # of data points: 10000 (10000*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 288.9636655359978
 Maximum value: 288.9636655359978
 Mean    value: 288.9636655360099 (unweighted average)
    SET MEMORY/MAX: 96 Mb   (12 megawords)
    Peak demand: 17.04 Mb
    Current cache: 80.32 Mb
COMPRESSED GATHER success on expression xt[l=@std]
 
! *********************************************************
! ******* tests of "4D" @var and @std ******
! the @var and @srd transformation had to be switched to
! a single pass algorithm in order to implement split/gather
define axis/x=1:200:1 xax
define axis/y=1:200:1 yax
define axis/z=1:201:1 zax
define axis/T=1:200:1 tax
! adding a constant doesn't effect variance
let constant = 0*X[gx=xax] + 0*Y[gy=yax] + 0*Z[gz=zax] + 1234
let xyz = 0*X[gx=xax] + 0*Y[gy=yax] + Z[gz=zax] + 1
let xyz_zero_mean = 0*X[gx=xax] + 0*Y[gy=yax] + (Z[gz=zax]-101)
 
* note: sum of a sequence 1 to N of square integers is [N*(N+1)*(2N+1)]/6
* Z-101 is 2 sequences: -100 to -1 and 1 to 100, therefore sum is
* 2 * [100*101*201]/6 = 676700
* so the average is 676700/201 = 3366.666666 ...
* At every XY point we have the identical sequence in Z, so the variance is
* the same as the single Z sequence
 
* 3D XYZ test
* 2d slice size = 200*200 = 40,000
* 3d full size is 8,000,000  - so 10,000,000 is bigger
cancel memory/all
set memory/size = 2  ! 2M v 8M: requires split/gather
! will split into 4 pieces (1/4 of 8,000,000 fits into 2,000,000)
! so z=1:50; then =51:100, Z=101:150, Z=151:200
LIST/PREC=12 constant[x=@var,y=@var,z=@var]
             VARIABLE : 0*X[GX=XAX] + 0*Y[GY=YAX] + 0*Z[GZ=ZAX] + 1234
             X        : 0.5 to 200.5 (XYZ variance)
             Y        : 0.5 to 200.5 (XYZ variance)
             Z        : 0.5 to 201.5 (XYZ variance)
          0.000000000000
 
! variance of a constant is zero
GO bn_compressed_gather.sub constant[x=@var,y=@var,z=@var] 20 2
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 0.02 Kb
    Current cache: 13.12 Mb
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 0
 Mean    value: 0 (unweighted average)
    SET MEMORY/MAX: 16 Mb   (2 megawords)
    Peak demand: 5.12 Mb
    Current cache: 13.12 Mb
COMPRESSED GATHER success on expression constant[x=@var,y=@var,z=@var]
 
! confirm that we get the result computed above
GO bn_compressed_gather.sub xyz_zero_mean[x=@var,y=@var,z=@var]  20 2
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 3366.7
 Maximum value: 3366.7
 Mean    value: 3366.7 (unweighted average)
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 28.16 Mb
    Current cache: 64.32 Mb
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 3366.7
 Maximum value: 3366.7
 Mean    value: 3366.7 (unweighted average)
    SET MEMORY/MAX: 16 Mb   (2 megawords)
    Peak demand: 2.88 Mb
    Current cache: 13.12 Mb
COMPRESSED GATHER success on expression xyz_zero_mean[x=@var,y=@var,z=@var]
LIST/PREC=12 xyz_zero_mean[x=@var,y=@var,z=@var]
             VARIABLE : 0*X[GX=XAX] + 0*Y[GY=YAX] + (Z[GZ=ZAX]-101)
             X        : 0.5 to 200.5 (XYZ variance)
             Y        : 0.5 to 200.5 (XYZ variance)
             Z        : 0.5 to 201.5 (XYZ variance)
          3366.66666667
 
! confirm that adding a constant does not change the result
GO bn_compressed_gather.sub xyz[x=@var,y=@var,z=@var]  20 2
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 3366.7
 Maximum value: 3366.7
 Mean    value: 3366.7 (unweighted average)
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 55.68 Mb
    Current cache: 77.44 Mb
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 3366.7
 Maximum value: 3366.7
 Mean    value: 3366.7 (unweighted average)
    SET MEMORY/MAX: 16 Mb   (2 megawords)
    Peak demand: 5.12 Mb
    Current cache: 13.12 Mb
COMPRESSED GATHER success on expression xyz[x=@var,y=@var,z=@var]
LIST/PREC=12 xyz[x=@var,y=@var,z=@var]
             VARIABLE : 0*X[GX=XAX] + 0*Y[GY=YAX] + Z[GZ=ZAX] + 1
             X        : 0.5 to 200.5 (XYZ variance)
             Y        : 0.5 to 200.5 (XYZ variance)
             Z        : 0.5 to 201.5 (XYZ variance)
          3366.66666667
 
CANCEL MEMORY/ALL  ! IF PRESENT THIS PREVENTS THE MEMORY CORRUPTION
! confirm the @std gives the square root of the variance
! SQRT(676700/201) = 58.022983951764034269074805569046
GO bn_compressed_gather.sub xyz[x=@std,y=@std,z=@std]  20 2
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 58.023
 Maximum value: 58.023
 Mean    value: 58.023 (unweighted average)
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 55.68 Mb
    Current cache: 64.32 Mb
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 58.023
 Maximum value: 58.023
 Mean    value: 58.023 (unweighted average)
    SET MEMORY/MAX: 16 Mb   (2 megawords)
    Peak demand: 5.12 Mb
    Current cache: 13.12 Mb
COMPRESSED GATHER success on expression xyz[x=@std,y=@std,z=@std]
LIST/PREC=12 xyz[x=@std,y=@std,z=@std]
             VARIABLE : 0*X[GX=XAX] + 0*Y[GY=YAX] + Z[GZ=ZAX] + 1
             X        : 0.5 to 200.5 (XYZ stddev)
             Y        : 0.5 to 200.5 (XYZ stddev)
             Z        : 0.5 to 201.5 (XYZ stddev)
          58.0229839518
 
 
! add more tests here
! the highest liklihood of problem is in the formulation of "the next chunk"
! when IS_TRANS requests the next piece to be gathered
! ... variations on inner and outer limits
!     (i.e. averaging an expression with limits embedded inside of it
!      where the averaging limits may or may not match the inner limits)
! ... file variable, vs user variables
! ... embedded functions, especially grid-changing functions
!
! ... test irregular axes (unequal weighting) and see how significant are
!     the changes in results from old Ferret (particularly on @var)
 
 
! clean up
set mem/siz=1
SET MEMORY/SIZE=($saved_memory_size)
 !-> SET MEMORY/SIZE=500Mb
*** Running ferret script: bn_dynamic_gather.jnl
! bn_dynamic_gather.jnl
! *sh* 3/2017
! *acm*7/2017 0=success for SPAWN_STATUS
!  6/19, code changes for SET MEM in terms of Mbytes. But
!  here, the SET MEMORY commands are done in terms of megawords,
!  as we're thinking of grid sizes
 
 
! initialize
DEFINE SYMBOL saved_memory_size = ($FERRET_BYTES_MEM)
 !-> DEFINE SYMBOL saved_memory_size = 500Mb
 
 
! There's not really anything "dynamic" about this benchmark, except that it
! excercises the split/gather improvements that were implemented together with
! dynamic memory management
 
 
 
 
! Give us something to look at while we run these tests which dont make plots
plot/noax/nolab/vlim=0:1/i=4:5 i
annotate/norm/x=0/y=0.5 "@AC... running bn_dynamic_gather"
 
 
! **************************************
! create the test data
spawn "mkdir -p tmp"     ! tmp directory to store files
 
! see if the test file already exists
SPAWN "ls tmp/test_dyn_mem.nc"
IF ($SPAWN_OK) THEN
 !-> IF 0 THEN
ELSE
  define symbol saved_memory_size = ($FERRET_MEMORY)
 !-> define symbol saved_memory_size = 62.5
  set mem/size=50
  define axis/x=1:1000:1 x1000
  define axis/y=1:1000:1 y1000
  define axis/z=1:2:1 z2
  define axis/t=1:10:1 t10
  define grid/x=x1000/y=y1000/z=z2/t=t10 gg
  let v = x[g=gg]+y[g=gg]+z[g=gg]+t[g=gg]
  save/clobber/file="tmp/test_dyn_mem.nc" v
  define axis/t=1:1000:1 t1000
  define axis/x=1:10:1   x10
  define axis/y=1:100:1  y100
  define axis/z=1:4:1 z4
  let v1000 = x[gx=x10]+y[gy=y100]+z[gz=z4]+t[gt=t1000]
  save/append/file="tmp/test_dyn_mem.nc" v1000
  cancel variable/all
  cancel mem/all
  set memory/size=($saved_memory_size)
 !-> set memory/size=62.5
ENDIF
 
! ************************************
 
use tmp/test_dyn_mem.nc
show data
     currently SET data sets:
    1> tmp/test_dyn_mem.nc  (default)
 name     title                             I         J         K         L
 V        X[G=GG]+Y[G=GG]+Z[G=GG]+T[G=GG]  1:1000    1:1000    1:2       1:10
 V1000    X[GX=X10]+Y[GY=Y100]+Z[GZ=Z4]+T  1:10      1:100     1:4       1:1000
 
 
! excercise under the least strict memory management
CANCEL MODE FRUGAL
GO bn_dynamic_gather.sub
! bn_dynamic_gather.sub
 
! this subroutine to get called repeatedly for different values of MODE FRUGAL
 
!**************
! remember to test:
! - MODE FRUGAL
! done - case of no single axis long enough
! done - case of transformed axis not long enough, but another is
! 2-axis split including compressed
! 2-axis split not including
! 3-axis splits
!    -- with slowest axis GT 5 in length
!    -- with slowest axis LT 5 and second slowest GT 50
! - modulo regrid examples
! 2d and 3d @AVE
! mixed @AVE and @DIN
!*************
 
! **************************************************
! test memory that is too small to accommodate the result
! this request will fail trying to get the third argument
set mode ignore
set memory/siz=1.99
stat/brief v[i=101:200,j=101:200,k=1,l=1:10@ave], v[i=101:200,j=101:200,k=2,l=1:10@ave], v[l=1:10@ave]
    At the moment that the memory limit was reached
    argument 3 was being evaluated: V[L=1:10@AVE]
    memory was committed as follows:
        - to arguments 1-2: 40000 (2%)
        - to objects used in computation: 0 (0%)
    The size of the requested object was: 16 Mb (101%)
cancel mode ignore
 
! **************************************************
! if memory size is large enough to accommodate the result data plus
! its accumulation buffer(s) when split along the compressed axis (4M)
! then it can choose to use the compressed axis.
! The smallest chunk along that axis is 1000x1000x2x1 ==> 2M
set memory/siz=6
stat/brief v[l=1:10@ave]
 
 Total # of data points: 2000000 (1000*1000*2*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 8.5
 Maximum value: 2007.5
 Mean    value: 1008 (unweighted average)
show memory/diagnostic   ! T axis split, chunk size = 1, peak mem=6
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        V              T     AVE         1           1
    Total table slots: 500
    Free table slots: 498
    Un-cached variables: 0
    SET MEMORY/MAX: 48 Mb   (6 megawords)
    Peak demand: 48 Mb
    Current cache: 48 Mb
show memory/all          ! in memory following the last chunk
    SET MEMORY/MAX: 48 Mb   (6 megawords)
    Peak demand: 48 Mb
    Current cache: 48 Mb
all data in memory:
 V[D=test_dyn_mem]                 XYZ   mr:6 size:32 Mb
         1/0.5                 1/0.5                 1/0.5              ... /0.5
      1000/1000.5           1000/1000.5              2/2.5              ... /10.5
                                                              AVE
 V[D=test_dyn_mem]                 XYZ   mr:4 size:16 Mb
         1/0.5                 1/0.5                 1/0.5                10/9.5
      1000/1000.5           1000/1000.5              2/2.5                10/10.5
 
cancel memory/all
 
! **************************************************
! Since @VAR requires two buffers - the total size of the result is 2M+2*2M=6M
! if we were to split along T the size of a chunk would be 1000x1000x2x1 = 2M
! So the total memory needed would be 6M+2M=8M to split along T
set memory/size=8
stat/brief v[l=1:10@var]
 
 Total # of data points: 2000000 (1000*1000*2*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 8.25
 Maximum value: 8.25
 Mean    value: 8.25 (unweighted average)
show memory/diagnostic   ! T axis split, chunk size = 1, peak mem=8
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        V              T     VAR         1           1
    Total table slots: 500
    Free table slots: 498
    Un-cached variables: 0
    SET MEMORY/MAX: 64 Mb   (8 megawords)
    Peak demand: 64 Mb
    Current cache: 64 Mb
cancel memory/all
 
! **************************************************
! if memory size is NOT large enough to accommodate the result data plus
! its accumulation buffer(s) then it cannot split along T
set memory/siz=5.9
stat/brief v[l=1:10@ave]
 
 Total # of data points: 2000000 (1000*1000*2*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 8.5
 Maximum value: 2007.5
 Mean    value: 1008 (unweighted average)
show memory/diagnostic   ! Y axis split, big chunk size = 1
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        V              Y     AVE       162           1
    Total table slots: 500
    Free table slots: 496
    Un-cached variables: 0
    SET MEMORY/MAX: 47.2 Mb   (5.9 megawords)
    Peak demand: 47.1 Mb
    Current cache: 26.56 Mb
cancel memory/all
 
! **************************************************
! memory barely large enough to accommodate the result (2M), and the
! smallest achievable chunk
! splitting along the Y axis, the smallest chunk size is 1000x1x2x10 ==> 20000
! and the average of a single chunk (incl buffer) is 1000x1x2x1*2 ==> 4000
set memory/siz=2.024
stat/brief v[l=1:10@ave]
 
 Total # of data points: 2000000 (1000*1000*2*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 8.5
 Maximum value: 2007.5
 Mean    value: 1008 (unweighted average)
show memory/diagnostic ! Y axis split, chunk size=1, peak mem=2.024
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        V              Y     AVE         1           1
    Total table slots: 500
    Free table slots: 497
    Un-cached variables: 0
    SET MEMORY/MAX: 16.19 Mb   (2.024 megawords)
    Peak demand: 16.19 Mb
    Current cache: 16.19 Mb
show memory/all        ! in memory following the last chunk
    SET MEMORY/MAX: 16.19 Mb   (2.024 megawords)
    Peak demand: 16.19 Mb
    Current cache: 16.19 Mb
all data in memory:
 V[D=test_dyn_mem]                 XYZ   mr:4 size:16 Mb
         1/0.5                 1/0.5                 1/0.5              ... /0.5
      1000/1000.5           1000/1000.5              2/2.5              ... /10.5
                                                              AVE
 V[D=test_dyn_mem]                 XZ    mr:5 size:32 Kb
         1/0.5              1000/999.5               1/0.5              ... /0.5
      1000/1000.5           1000/1000.5              2/2.5              ... /10.5
                                                              AVE
 V[D=test_dyn_mem]                 XZT   mr:6 size:160 Kb
         1/0.5              1000/999.5               1/0.5                 1/0.5
      1000/1000.5           1000/1000.5              2/2.5                10/10.5
 
cancel memory/all
 
! **************************************************
! Since @VAR requires two buffers - the total size of the result is 2M+2*2M=6M
! if we were to split along T the size of a chunk would be 1000x1000x2x1 = 2M
! So the total memory needed would be 6M+2M=8M.  So the current SET MEMORY=6
! is not enuf mem to split along the T axis
set memory/siz=6
stat/brief v[l=1:10@var]
 
 Total # of data points: 2000000 (1000*1000*2*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 8.25
 Maximum value: 8.25
 Mean    value: 8.25 (unweighted average)
show memory/diagnostic   ! Y axis split
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        V              Y     VAR       153           1
    Total table slots: 500
    Free table slots: 496
    Un-cached variables: 0
    SET MEMORY/MAX: 48 Mb   (6 megawords)
    Peak demand: 47.82 Mb
    Current cache: 40.4 Mb
cancel memory/all
 
! **************************************************
! 3D averaging  v[x=@ave,y=@ave,z=@ave,L=1]
! result size will be 1x1x1x1*2 = 2
! chunk size if split along Z will be 1000x1000x1x1 = 1M
! chunk size if split along Y will be 1000x1x2x1    = 2K
 
! this request can succeed by splitting along Z
set memory/siz=1.001
stat/brief v[x=@ave,y=@ave,z=@ave,L=1]
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 1003.5
 Maximum value: 1003.5
 Mean    value: 1003.5 (unweighted average)
show memory/diagnostic     ! Z axis split
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        V              Z     AV4         1           1
    Total table slots: 500
    Free table slots: 498
    Un-cached variables: 0
    SET MEMORY/MAX: 8.01 Mb   (1.001 megawords)
    Peak demand: 8 Mb
    Current cache: 8 Mb
cancel memory/all
 
! **************************************************
! but if memory is so small that the Z axis of 2 points does not provide
! enough size reduction, then we choose to split along Y
set memory/siz=.99
stat/brief v[x=@ave,y=@ave,z=@ave,L=1]
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 1003.5
 Maximum value: 1003.5
 Mean    value: 1003.5 (unweighted average)
show memory/diagnostic     ! Y axis split
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        V              Y     AV4       494           1
    Total table slots: 500
    Free table slots: 498
    Un-cached variables: 0
    SET MEMORY/MAX: 7.92 Mb   (990000 words)
    Peak demand: 7.9 Mb
    Current cache: 192.02 Kb
cancel memory/all
 
! **************************************************
! multiple transformations on a single expression
! Use of these expressions **is a bad idea in Ferret**
! he "potential size" of the source data is 1000x1000x20x10=20M
! we just get aggressive about memory saving: choose the longest axis
! preferring an uncompressed axis if available
! Here we see a triple level strip: Z-T-Y
! (SHOW MEM/DIAG repeats on each of the 2 K values)
set memory/siz=.99
stat/brief v[x=@ave,y=@ave,L=@SUM]
 
 Total # of data points: 2 (1*1*2*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 10075
 Maximum value: 10085
 Mean    value: 10080 (unweighted average)
show memory/diagnostic        !  split on Z-(T-Y,T-Y)
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        V              Z     SUM         1           1
        V              Y     AV4        98           2
    Total table slots: 500
    Free table slots: 496
    Un-cached variables: 0
    SET MEMORY/MAX: 7.92 Mb   (990000 words)
    Peak demand: 7.84 Mb
    Current cache: 1.6 Mb
cancel memory/all
 
! **************************************************
! now the same situation, but where Z is compressed as well
! Z is not stripped off because other axes are longer
set memory/siz=.99
stat/brief v[x=@ave,y=@ave,z=@ave,L=@SUM]
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 10080
 Maximum value: 10080
 Mean    value: 10080 (unweighted average)
show memory/diagnostic       ! split on T-Y
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        V              Y     AV4        49           1
    Total table slots: 500
    Free table slots: 497
    Un-cached variables: 0
    SET MEMORY/MAX: 7.92 Mb   (990000 words)
    Peak demand: 7.84 Mb
    Current cache: 3.2 Mb
cancel memory/all
 
! **************************************************
! multiple transformation again
! first strip YZT@AVE. Split the long Y axis, no further split needed
set memory/siz=.99
stat/brief v[x=@SUM,y=@ave,z=@ave,L=@ave]
 
 Total # of data points: 1 (1*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 1.008E+06
 Maximum value: 1.008E+06
 Mean    value: 1.008E+06 (unweighted average)
show memory/diagnostic      ! split on Y
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        V              Y     AV4        24           1
    Total table slots: 500
    Free table slots: 494
    Un-cached variables: 0
    SET MEMORY/MAX: 7.92 Mb   (990000 words)
    Peak demand: 3.85 Mb
    Current cache: 6.42 Mb
cancel memory/all
 
! **************************************************
! MODULO REGRID
 
! v1000 is 10x100x4x1000
! for gt=@mod the full result size is 10x100x4x12 ==>  48,000
 
define axis/mod/t=1:12:1 t12mod
 
!**************************************************
set mem/size=10   ! bigger than needed
stat/brief v1000[gt=t12mod@mod]
 
 Total # of data points: 48000 (10*100*4*12*1*1)
 # flagged as bad  data: 0
 Minimum value: 500
 Maximum value: 618
 Mean    value: 559 (unweighted average)
show mem/diag     ! note peak size demand a bit over 4
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 498
    Un-cached variables: 0
    SET MEMORY/MAX: 80 Mb   (10 megawords)
    Peak demand: 33.15 Mb
    Current cache: 32.38 Mb
canc mem/all
 
!**************************************************
set mem/size=4
stat/brief v1000[gt=t12mod@mod]
 
 Total # of data points: 48000 (10*100*4*12*1*1)
 # flagged as bad  data: 0
 Minimum value: 500
 Maximum value: 618
 Mean    value: 559 (unweighted average)
show mem/diag              ! big z chunks (3 on ax of len 4)
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        V1000          Z                 3           1
    Total table slots: 500
    Free table slots: 496
    Un-cached variables: 0
    SET MEMORY/MAX: 32 Mb   (4 megawords)
    Peak demand: 24.86 Mb
    Current cache: 8.77 Mb
canc mem/all
 
!**************************************************
set mem/size=1
stat/brief v1000[gt=t12mod@mod]
 
 Total # of data points: 48000 (10*100*4*12*1*1)
 # flagged as bad  data: 0
 Minimum value: 500
 Maximum value: 618
 Mean    value: 559 (unweighted average)
show mem/diag              !  big y chunks (22 on ax of len 100)
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        V1000          Y                22           1
    Total table slots: 500
    Free table slots: 496
    Un-cached variables: 0
    SET MEMORY/MAX: 8 Mb   (1000000 words)
    Peak demand: 7.68 Mb
    Current cache: 4.35 Mb
canc mem/all
 
!**************************************************
! if the chunk size is 1, then each chunk src is 10x1x4x1000 ==> 40000
! and requires a result plus 2 buffers:          10x1x4x12*3 ==>  1440
! plus the full result size in IS_GATHER                     ==> 48000
!                                                      total ==> 89440
set mem/size=.09
stat/brief v1000[gt=t12mod@mod]
 
 Total # of data points: 48000 (10*100*4*12*1*1)
 # flagged as bad  data: 0
 Minimum value: 500
 Maximum value: 618
 Mean    value: 559 (unweighted average)
show mem/diag              !  y chunk size = 1
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        V1000          Y                 1           1
    Total table slots: 500
    Free table slots: 496
    Un-cached variables: 0
    SET MEMORY/MAX: 720 Kb   (90000 words)
    Peak demand: 715.52 Kb
    Current cache: 711.68 Kb
canc mem/all
 
 
! ************** USER VARIABLES ********************
let a = v[k=1]
let b = v[k=2]
let c = a + b
let d = a + c
 
! for comparison: memory management to average a simple file variable
set memory/siz=3
stat/brief v[l=1:10@ave,k=1]
 
 Total # of data points: 1000000 (1000*1000*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 8.5
 Maximum value: 2006.5
 Mean    value: 1007.5 (unweighted average)
show memory/diagnostic   ! T axis split, chunk size = 1, peak mem=6
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        V              T     AVE         1           1
    Total table slots: 500
    Free table slots: 498
    Un-cached variables: 0
    SET MEMORY/MAX: 24 Mb   (3 megawords)
    Peak demand: 24 Mb
    Current cache: 24 Mb
cancel memory/all
 
! compare to memory management averaging user variables
! not split on T because more memory is needed for components of calculation
set memory/siz=3
 
stat/brief a[l=1:10@ave]
 
 Total # of data points: 1000000 (1000*1000*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 8.5
 Maximum value: 2006.5
 Mean    value: 1007.5 (unweighted average)
show memory/diagnostic   ! X axis split, chunk size = 1, peak mem=1.82
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        A              Y     AVE        47           1
    Total table slots: 500
    Free table slots: 491
    Un-cached variables: 0
    SET MEMORY/MAX: 24 Mb   (3 megawords)
    Peak demand: 15.52 Mb
    Current cache: 23.07 Mb
cancel memory/all
 
stat/brief d[l=1:10@ave]
 
 Total # of data points: 1000000 (1000*1000*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 26.5
 Maximum value: 6020.5
 Mean    value: 3023.5 (unweighted average)
show memory/diagnostic   ! X axis split, chunk size = 1, peak mem=2.23
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        D              Y     AVE        47           1
    Total table slots: 500
    Free table slots: 489
    Un-cached variables: 0
    SET MEMORY/MAX: 24 Mb   (3 megawords)
    Peak demand: 19.28 Mb
    Current cache: 22.72 Mb
cancel memory/all
 
! progressively more frugal mem mgmt is needed as multiple results accumulate
stat/brief a[i=1:500,l=1:10@ave], b[i=1:500,l=1:10@ave], c[i=1:500,l=1:10@ave], d[i=1:500,l=1:10@ave]
 
 Total # of data points: 500000 (500*1000*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 8.5
 Maximum value: 1506.5
 Mean    value: 757.5 (unweighted average)
 
 Total # of data points: 500000 (500*1000*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 9.5
 Maximum value: 1507.5
 Mean    value: 758.5 (unweighted average)
 
 Total # of data points: 500000 (500*1000*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 18
 Maximum value: 3014
 Mean    value: 1516 (unweighted average)
 
 Total # of data points: 500000 (500*1000*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 26.5
 Maximum value: 4520.5
 Mean    value: 2273.5 (unweighted average)
show memory/diagnostic   ! X axis split, chunk size = 1, peak mem=2.23
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        A              T     AVE         1           1
        B              Y     AVE        71           1
        C              Y     AVE        47           1
        D              Y     AVE        23           1
    Total table slots: 500
    Free table slots: 487
    Un-cached variables: 0
    SET MEMORY/MAX: 24 Mb   (3 megawords)
    Peak demand: 22.76 Mb
    Current cache: 23.83 Mb
cancel memory/all
 
! if the initial arguments take up too much memory we cannot succeed
set mode ignore
stat/brief a[l=1:10@ave], b[l=1:10@ave], c[l=1:10@ave], d[l=1:10@ave]
    At the moment that the memory limit was reached
    argument 3 was being evaluated: C[L=1:10@AVE]
    memory was committed as follows:
        - to arguments 1-2: 2000000 (67%)
        - to objects used in computation: 0 (0%)
    The size of the requested object was: 8 Mb (33%)
show memory/diagnostic   ! X axis split, chunk size = 1, peak mem=2.23
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        A              Y     AVE        47           1
        B              Y     AVE        23           1
    Total table slots: 500
    Free table slots: 491
    Un-cached variables: 0
    SET MEMORY/MAX: 24 Mb   (3 megawords)
    Peak demand: 19.68 Mb
    Current cache: 22.35 Mb
cancel mode ignore
cancel memory/all
 
 
! now run the same tests under 3 different FRUGAL levels
! save the outputs so they can be compared
 
! excercise under the least strict memory management
CANCEL REDIRECT
SET REDIRECT/CLOBBER/FILE=bn_dynamic_gather_0.out
SET REDIRECT/CLOBBER/FILE=bn_dynamic_gather_30.out
SET REDIRECT/CLOBBER/FILE=bn_dynamic_gather_60.out
 
! now compare the three output logs:
! differences in *how* the results are computed are fine
! differences in what the results are would be problems
SAY **************************************************
**************************************************
SAY ************* DIFF FRUGAL 0 TO 30 ****************
************* DIFF FRUGAL 0 TO 30 ****************
SPAWN diff bn_dynamic_gather_0.out bn_dynamic_gather_30.out
1c1
< CANCEL MODE FRUGAL
---
> SET MODE FRUGAL    ! 30%
4c4
<       FRUGAL        CANCELED            30
---
>       FRUGAL           SET              30
56c56
<         V              T     AVE         1           1
---
>         V              Y     AVE        91           1
58c58
<     Free table slots: 498
---
>     Free table slots: 496
61,62c61,62
<     Peak demand: 48 Mb
<     Current cache: 48 Mb
---
>     Peak demand: 33.47 Mb
>     Current cache: 36.19 Mb
65,66c65,66
<     Peak demand: 48 Mb
<     Current cache: 48 Mb
---
>     Peak demand: 33.47 Mb
>     Current cache: 36.19 Mb
68c68
<  V[D=test_dyn_mem]                 XYZ   mr:11 size:32 Mb
---
>  V[D=test_dyn_mem]                 XYZ   mr:5 size:16 Mb
72,73c72,77
<  V[D=test_dyn_mem]                 XYZ   mr:16 size:16 Mb
<          1/0.5                 1/0.5                 1/0.5                10/9.5
---
>  V[D=test_dyn_mem]                 XYZ   mr:7 size:2.88 Mb
>          1/0.5               911/910.5               1/0.5              ... /0.5
>       1000/1000.5           1000/1000.5              2/2.5              ... /10.5
>                                                               AVE
>  V[D=test_dyn_mem]                 XYZT  mr:15 size:14.4 Mb
>          1/0.5               911/910.5               1/0.5                 1/0.5
75a80,83
>  V[D=test_dyn_mem]                 XYZ   mr:13 size:2.91 Mb
>          1/0.5               820/819.5               1/0.5              ... /0.5
>       1000/1000.5            910/910.5               2/2.5              ... /10.5
>                                                               AVE
93c101
<         V              T     VAR         1           1
---
>         V              Y     VAR       138           1
95c103
<     Free table slots: 498
---
>     Free table slots: 494
98,99c106,107
<     Peak demand: 64 Mb
<     Current cache: 64 Mb
---
>     Peak demand: 44.7 Mb
>     Current cache: 58.4 Mb
116c124
<         V              Y     AVE       162           1
---
>         V              Y     AVE        88           1
118c126
<     Free table slots: 496
---
>     Free table slots: 494
121,122c129,130
<     Peak demand: 47.1 Mb
<     Current cache: 26.56 Mb
---
>     Peak demand: 32.9 Mb
>     Current cache: 41.86 Mb
141a150
>         V              T     AVE         6         999
143c152
<     Free table slots: 497
---
>     Free table slots: 496
146c155
<     Peak demand: 16.19 Mb
---
>     Peak demand: 16.13 Mb
150c159
<     Peak demand: 16.19 Mb
---
>     Peak demand: 16.13 Mb
153c162
<  V[D=test_dyn_mem]                 XYZ   mr:11 size:16 Mb
---
>  V[D=test_dyn_mem]                 XYZ   mr:9 size:16 Mb
157c166
<  V[D=test_dyn_mem]                 XZ    mr:12 size:32 Kb
---
>  V[D=test_dyn_mem]                 XZ    mr:13 size:32 Kb
161,162c170,171
<  V[D=test_dyn_mem]                 XZT   mr:16 size:160 Kb
<          1/0.5              1000/999.5               1/0.5                 1/0.5
---
>  V[D=test_dyn_mem]                 XZT   mr:5 size:64 Kb
>          1/0.5              1000/999.5               1/0.5                 7/6.5
164a174,177
>  V[D=test_dyn_mem]                 XZT   mr:15 size:96 Kb
>          1/0.5              1000/999.5               1/0.5                 1/0.5
>       1000/1000.5           1000/1000.5              2/2.5                 6/6.5
>  
183c196
<         V              Y     VAR       153           1
---
>         V              Y     VAR        84           1
188,189c201,202
<     Peak demand: 47.82 Mb
<     Current cache: 40.4 Mb
---
>     Peak demand: 33.47 Mb
>     Current cache: 35.84 Mb
210c223
<         V              Z     AV4         1           1
---
>         V              Y     AV4       350           1
215,216c228,229
<     Peak demand: 8 Mb
<     Current cache: 8 Mb
---
>     Peak demand: 5.6 Mb
>     Current cache: 4.8 Mb
233c246
<         V              Y     AV4       494           1
---
>         V              Y     AV4       346           1
238,239c251,252
<     Peak demand: 7.9 Mb
<     Current cache: 192.02 Kb
---
>     Peak demand: 5.54 Mb
>     Current cache: 4.93 Mb
262c275
<         V              Y     AV4        98           2
---
>         V              Y     AV4        69           2
267,268c280,281
<     Peak demand: 7.84 Mb
<     Current cache: 1.6 Mb
---
>     Peak demand: 5.52 Mb
>     Current cache: 2.72 Mb
285c298
<         V              Y     AV4        49           1
---
>         V              Y     AV4        34           1
287c300
<     Free table slots: 497
---
>     Free table slots: 496
290,291c303,304
<     Peak demand: 7.84 Mb
<     Current cache: 3.2 Mb
---
>     Peak demand: 5.44 Mb
>     Current cache: 7.68 Mb
308c321
<         V              Y     AV4        24           1
---
>         V              Y     AV4        17           1
310c323
<     Free table slots: 494
---
>     Free table slots: 492
313,314c326,327
<     Peak demand: 3.85 Mb
<     Current cache: 6.42 Mb
---
>     Peak demand: 2.73 Mb
>     Current cache: 7.7 Mb
356c369
<         V1000          Z                 3           1
---
>         V1000          Z                 2           1
361,362c374,375
<     Peak demand: 24.86 Mb
<     Current cache: 8.77 Mb
---
>     Peak demand: 16.96 Mb
>     Current cache: 16.77 Mb
377c390
<         V1000          Y                22           1
---
>         V1000          Y                15           1
382,383c395,396
<     Peak demand: 7.68 Mb
<     Current cache: 4.35 Mb
---
>     Peak demand: 5.36 Mb
>     Current cache: 3.68 Mb
402a416
>         V1000          Z                 2          99
404c418
<     Free table slots: 496
---
>     Free table slots: 493
407,408c421,422
<     Peak demand: 715.52 Kb
<     Current cache: 711.68 Kb
---
>     Peak demand: 553.6 Kb
>     Current cache: 715.52 Kb
430c444
<         V              T     AVE         1           1
---
>         V              Y     AVE        91           1
432c446
<     Free table slots: 498
---
>     Free table slots: 496
435,436c449,450
<     Peak demand: 24 Mb
<     Current cache: 24 Mb
---
>     Peak demand: 16.74 Mb
>     Current cache: 18.1 Mb
453c467
<         A              Y     AVE        47           1
---
>         A              Y     AVE        26           1
455c469
<     Free table slots: 491
---
>     Free table slots: 487
458,459c472,473
<     Peak demand: 15.52 Mb
<     Current cache: 23.07 Mb
---
>     Peak demand: 12.16 Mb
>     Current cache: 23.84 Mb
472c486
<         D              Y     AVE        47           1
---
>         D              Y     AVE        26           1
474c488
<     Free table slots: 489
---
>     Free table slots: 487
477,478c491,492
<     Peak demand: 19.28 Mb
<     Current cache: 22.72 Mb
---
>     Peak demand: 14.24 Mb
>     Current cache: 22.69 Mb
510,513c524,527
<         A              T     AVE         1           1
<         B              Y     AVE        71           1
<         C              Y     AVE        47           1
<         D              Y     AVE        23           1
---
>         A              Y     AVE        76           1
>         B              Y     AVE        59           1
>         C              Y     AVE        42           1
>         D              Y     AVE        26           1
515c529
<     Free table slots: 487
---
>     Free table slots: 484
518,519c532,533
<     Peak demand: 22.76 Mb
<     Current cache: 23.83 Mb
---
>     Peak demand: 19.12 Mb
>     Current cache: 23.34 Mb
534,535c548,549
<         A              Y     AVE        47           1
<         B              Y     AVE        23           1
---
>         A              Y     AVE        26           1
>         B              Y     AVE         9           1
537c551
<     Free table slots: 491
---
>     Free table slots: 481
540,541c554,555
<     Peak demand: 19.68 Mb
<     Current cache: 22.35 Mb
---
>     Peak demand: 17.44 Mb
>     Current cache: 23.38 Mb
547c561
< ! excercise under the default memory management
---
> ! excercise under pretty strict memory management
 
SAY **************************************************
**************************************************
SAY ************* DIFF FRUGAL 0 TO 60 ****************
************* DIFF FRUGAL 0 TO 60 ****************
SPAWN diff bn_dynamic_gather_0.out bn_dynamic_gather_60.out
1c1
< CANCEL MODE FRUGAL
---
> SET MODE FRUGAL:60
4c4
<       FRUGAL        CANCELED            30
---
>       FRUGAL           SET              60
56c56
<         V              T     AVE         1           1
---
>         V              Y     AVE        16           1
58c58
<     Free table slots: 498
---
>     Free table slots: 478
61,62c61,62
<     Peak demand: 48 Mb
<     Current cache: 48 Mb
---
>     Peak demand: 19.07 Mb
>     Current cache: 45.7 Mb
65,66c65,66
<     Peak demand: 48 Mb
<     Current cache: 48 Mb
---
>     Peak demand: 19.07 Mb
>     Current cache: 45.7 Mb
68c68
<  V[D=test_dyn_mem]                 XYZ   mr:11 size:32 Mb
---
>  V[D=test_dyn_mem]                 XYZ   mr:19 size:16 Mb
72,73c72,77
<  V[D=test_dyn_mem]                 XYZ   mr:16 size:16 Mb
<          1/0.5                 1/0.5                 1/0.5                10/9.5
---
>  V[D=test_dyn_mem]                 XYZ   mr:21 size:256 Kb
>          1/0.5               993/992.5               1/0.5              ... /0.5
>       1000/1000.5           1000/1000.5              2/2.5              ... /10.5
>                                                               AVE
>  V[D=test_dyn_mem]                 XYZT  mr:1 size:1.28 Mb
>          1/0.5               993/992.5               1/0.5                 1/0.5
75a80,155
>  V[D=test_dyn_mem]                 XYZ   mr:20 size:512 Kb
>          1/0.5               977/976.5               1/0.5              ... /0.5
>       1000/1000.5            992/992.5               2/2.5              ... /10.5
>                                                               AVE
>  V[D=test_dyn_mem]                 XYZT  mr:4 size:2.56 Mb
>          1/0.5               977/976.5               1/0.5                 1/0.5
>       1000/1000.5            992/992.5               2/2.5                10/10.5
>  
>  V[D=test_dyn_mem]                 XYZ   mr:2 size:512 Kb
>          1/0.5               961/960.5               1/0.5              ... /0.5
>       1000/1000.5            976/976.5               2/2.5              ... /10.5
>                                                               AVE
>  V[D=test_dyn_mem]                 XYZT  mr:6 size:2.56 Mb
>          1/0.5               961/960.5               1/0.5                 1/0.5
>       1000/1000.5            976/976.5               2/2.5                10/10.5
>  
>  V[D=test_dyn_mem]                 XYZ   mr:5 size:512 Kb
>          1/0.5               945/944.5               1/0.5              ... /0.5
>       1000/1000.5            960/960.5               2/2.5              ... /10.5
>                                                               AVE
>  V[D=test_dyn_mem]                 XYZT  mr:10 size:2.56 Mb
>          1/0.5               945/944.5               1/0.5                 1/0.5
>       1000/1000.5            960/960.5               2/2.5                10/10.5
>  
>  V[D=test_dyn_mem]                 XYZ   mr:8 size:512 Kb
>          1/0.5               929/928.5               1/0.5              ... /0.5
>       1000/1000.5            944/944.5               2/2.5              ... /10.5
>                                                               AVE
>  V[D=test_dyn_mem]                 XYZT  mr:12 size:2.56 Mb
>          1/0.5               929/928.5               1/0.5                 1/0.5
>       1000/1000.5            944/944.5               2/2.5                10/10.5
>  
>  V[D=test_dyn_mem]                 XYZ   mr:11 size:512 Kb
>          1/0.5               913/912.5               1/0.5              ... /0.5
>       1000/1000.5            928/928.5               2/2.5              ... /10.5
>                                                               AVE
>  V[D=test_dyn_mem]                 XYZT  mr:16 size:2.56 Mb
>          1/0.5               913/912.5               1/0.5                 1/0.5
>       1000/1000.5            928/928.5               2/2.5                10/10.5
>  
>  V[D=test_dyn_mem]                 XYZ   mr:15 size:512 Kb
>          1/0.5               897/896.5               1/0.5              ... /0.5
>       1000/1000.5            912/912.5               2/2.5              ... /10.5
>                                                               AVE
>  V[D=test_dyn_mem]                 XYZT  mr:3 size:2.56 Mb
>          1/0.5               897/896.5               1/0.5                 1/0.5
>       1000/1000.5            912/912.5               2/2.5                10/10.5
>  
>  V[D=test_dyn_mem]                 XYZ   mr:18 size:512 Kb
>          1/0.5               881/880.5               1/0.5              ... /0.5
>       1000/1000.5            896/896.5               2/2.5              ... /10.5
>                                                               AVE
>  V[D=test_dyn_mem]                 XYZT  mr:14 size:2.56 Mb
>          1/0.5               881/880.5               1/0.5                 1/0.5
>       1000/1000.5            896/896.5               2/2.5                10/10.5
>  
>  V[D=test_dyn_mem]                 XYZ   mr:7 size:512 Kb
>          1/0.5               865/864.5               1/0.5              ... /0.5
>       1000/1000.5            880/880.5               2/2.5              ... /10.5
>                                                               AVE
>  V[D=test_dyn_mem]                 XYZT  mr:25 size:2.56 Mb
>          1/0.5               865/864.5               1/0.5                 1/0.5
>       1000/1000.5            880/880.5               2/2.5                10/10.5
>  
>  V[D=test_dyn_mem]                 XYZ   mr:17 size:512 Kb
>          1/0.5               849/848.5               1/0.5              ... /0.5
>       1000/1000.5            864/864.5               2/2.5              ... /10.5
>                                                               AVE
>  V[D=test_dyn_mem]                 XYZT  mr:24 size:2.56 Mb
>          1/0.5               849/848.5               1/0.5                 1/0.5
>       1000/1000.5            864/864.5               2/2.5                10/10.5
>  
>  V[D=test_dyn_mem]                 XYZ   mr:23 size:512 Kb
>          1/0.5               833/832.5               1/0.5              ... /0.5
>       1000/1000.5            848/848.5               2/2.5              ... /10.5
>                                                               AVE
93c173
<         V              T     VAR         1           1
---
>         V              Y     VAR        46           1
95c175
<     Free table slots: 498
---
>     Free table slots: 488
98,99c178,179
<     Peak demand: 64 Mb
<     Current cache: 64 Mb
---
>     Peak demand: 25.57 Mb
>     Current cache: 63.55 Mb
116c196
<         V              Y     AVE       162           1
---
>         V              Y     AVE        14           1
118c198
<     Free table slots: 496
---
>     Free table slots: 474
121,122c201,202
<     Peak demand: 47.1 Mb
<     Current cache: 26.56 Mb
---
>     Peak demand: 18.69 Mb
>     Current cache: 47.17 Mb
141a222
>         V              T     AVE         2         999
143c224
<     Free table slots: 497
---
>     Free table slots: 493
146c227
<     Peak demand: 16.19 Mb
---
>     Peak demand: 16.06 Mb
150c231
<     Peak demand: 16.19 Mb
---
>     Peak demand: 16.06 Mb
153c234
<  V[D=test_dyn_mem]                 XYZ   mr:11 size:16 Mb
---
>  V[D=test_dyn_mem]                 XYZ   mr:24 size:16 Mb
157c238
<  V[D=test_dyn_mem]                 XZ    mr:12 size:32 Kb
---
>  V[D=test_dyn_mem]                 XZ    mr:25 size:32 Kb
161,162c242,243
<  V[D=test_dyn_mem]                 XZT   mr:16 size:160 Kb
<          1/0.5              1000/999.5               1/0.5                 1/0.5
---
>  V[D=test_dyn_mem]                 XZT   mr:19 size:32 Kb
>          1/0.5              1000/999.5               1/0.5                 9/8.5
164a246,261
>  V[D=test_dyn_mem]                 XZT   mr:20 size:32 Kb
>          1/0.5              1000/999.5               1/0.5                 7/6.5
>       1000/1000.5           1000/1000.5              2/2.5                 8/8.5
>  
>  V[D=test_dyn_mem]                 XZT   mr:21 size:32 Kb
>          1/0.5              1000/999.5               1/0.5                 5/4.5
>       1000/1000.5           1000/1000.5              2/2.5                 6/6.5
>  
>  V[D=test_dyn_mem]                 XZT   mr:22 size:32 Kb
>          1/0.5              1000/999.5               1/0.5                 3/2.5
>       1000/1000.5           1000/1000.5              2/2.5                 4/4.5
>  
>  V[D=test_dyn_mem]                 XZT   mr:26 size:32 Kb
>          1/0.5              1000/999.5               1/0.5                 1/0.5
>       1000/1000.5           1000/1000.5              2/2.5                 2/2.5
>  
183c280
<         V              Y     VAR       153           1
---
>         V              Y     VAR        15           1
185c282
<     Free table slots: 496
---
>     Free table slots: 478
188,189c285,286
<     Peak demand: 47.82 Mb
<     Current cache: 40.4 Mb
---
>     Peak demand: 19.12 Mb
>     Current cache: 46.88 Mb
210c307
<         V              Z     AV4         1           1
---
>         V              Y     AV4       200           1
212c309
<     Free table slots: 498
---
>     Free table slots: 497
215,216c312,313
<     Peak demand: 8 Mb
<     Current cache: 8 Mb
---
>     Peak demand: 3.2 Mb
>     Current cache: 6.4 Mb
233c330
<         V              Y     AV4       494           1
---
>         V              Y     AV4       197           1
235c332
<     Free table slots: 498
---
>     Free table slots: 496
238,239c335,336
<     Peak demand: 7.9 Mb
<     Current cache: 192.02 Kb
---
>     Peak demand: 3.15 Mb
>     Current cache: 6.54 Mb
262c359
<         V              Y     AV4        98           2
---
>         V              Y     AV4        39           2
264c361
<     Free table slots: 496
---
>     Free table slots: 495
267,268c364,365
<     Peak demand: 7.84 Mb
<     Current cache: 1.6 Mb
---
>     Peak demand: 3.12 Mb
>     Current cache: 5.12 Mb
285c382
<         V              Y     AV4        49           1
---
>         V              Y     AV4        19           1
287c384
<     Free table slots: 497
---
>     Free table slots: 496
290,291c387,388
<     Peak demand: 7.84 Mb
<     Current cache: 3.2 Mb
---
>     Peak demand: 3.04 Mb
>     Current cache: 4.96 Mb
308c405
<         V              Y     AV4        24           1
---
>         V              Y     AV4         9           1
310c407
<     Free table slots: 494
---
>     Free table slots: 486
313,314c410,411
<     Peak demand: 3.85 Mb
<     Current cache: 6.42 Mb
---
>     Peak demand: 1.44 Mb
>     Current cache: 7.38 Mb
335c432,434
<     No split/gather occurred in the last evaluation
---
>     Last gather
>         Variable    Axis   Xform     Chunk    Repeated
>         V1000          Z                 3           1
337c436
<     Free table slots: 498
---
>     Free table slots: 495
340,341c439,440
<     Peak demand: 33.15 Mb
<     Current cache: 32.38 Mb
---
>     Peak demand: 24.86 Mb
>     Current cache: 32.77 Mb
356c455
<         V1000          Z                 3           1
---
>         V1000          Z                 1           1
358c457
<     Free table slots: 496
---
>     Free table slots: 492
361,362c460,461
<     Peak demand: 24.86 Mb
<     Current cache: 8.77 Mb
---
>     Peak demand: 8.67 Mb
>     Current cache: 24.77 Mb
377c476
<         V1000          Y                22           1
---
>         V1000          Y                 8           1
379c478
<     Free table slots: 496
---
>     Free table slots: 492
382,383c481,482
<     Peak demand: 7.68 Mb
<     Current cache: 4.35 Mb
---
>     Peak demand: 3.04 Mb
>     Current cache: 6.89 Mb
402a502
>         V1000          Z                 3         100
404c504
<     Free table slots: 496
---
>     Free table slots: 488
407,408c507,508
<     Peak demand: 715.52 Kb
<     Current cache: 711.68 Kb
---
>     Peak demand: 470.72 Kb
>     Current cache: 716.48 Kb
430c530
<         V              T     AVE         1           1
---
>         V              Y     AVE        16           1
432c532
<     Free table slots: 498
---
>     Free table slots: 478
435,436c535,536
<     Peak demand: 24 Mb
<     Current cache: 24 Mb
---
>     Peak demand: 9.54 Mb
>     Current cache: 22.85 Mb
453c553
<         A              Y     AVE        47           1
---
>         A              Y     AVE         4           1
455c555
<     Free table slots: 491
---
>     Free table slots: 431
458,459c558,559
<     Peak demand: 15.52 Mb
<     Current cache: 23.07 Mb
---
>     Peak demand: 8.64 Mb
>     Current cache: 23.87 Mb
472c572
<         D              Y     AVE        47           1
---
>         D              Y     AVE         4           1
474c574
<     Free table slots: 489
---
>     Free table slots: 442
477,478c577,578
<     Peak demand: 19.28 Mb
<     Current cache: 22.72 Mb
---
>     Peak demand: 8.96 Mb
>     Current cache: 23.94 Mb
510,513c610,613
<         A              T     AVE         1           1
<         B              Y     AVE        71           1
<         C              Y     AVE        47           1
<         D              Y     AVE        23           1
---
>         A              Y     AVE        33           1
>         B              Y     AVE        23           1
>         C              Y     AVE        14           1
>         D              Y     AVE         4           1
515c615
<     Free table slots: 487
---
>     Free table slots: 439
518,519c618,619
<     Peak demand: 22.76 Mb
<     Current cache: 23.83 Mb
---
>     Peak demand: 16.48 Mb
>     Current cache: 23.97 Mb
534,535c634,635
<         A              Y     AVE        47           1
<         B              Y     AVE        23           1
---
>         A              Y     AVE         4           1
>         B              Y     AVE         9           1
537c637
<     Free table slots: 491
---
>     Free table slots: 481
540,541c640,641
<     Peak demand: 19.68 Mb
<     Current cache: 22.35 Mb
---
>     Peak demand: 17.44 Mb
>     Current cache: 23.38 Mb
547d646
< ! excercise under the default memory management
 
 
! deliberate error
SET MODE IGNORE
SET MODE FRUGAL:95
SET MODE/LAST IGNORE
 
SET MEMORY/SIZE=($saved_memory_size)
 !-> SET MEMORY/SIZE=62.5
*** Running ferret script: bn_stat_precision.jnl
! bn_stat_precision.jnl
! 3/2017 *acm* Ticket 2512
 
! The stat command self-adjusts precision to make the
! min and max listed distinct
 
let var = {1907.1,1907.05,1907.11}
stat/br var
 
 Total # of data points: 3 (3*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 1907.05
 Maximum value: 1907.11
 Mean    value: 1907.08667 (unweighted average)
 
let var = {1907.001,1907.0005,1907.0011}
stat/br var
 
 Total # of data points: 3 (3*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 1907.0005
 Maximum value: 1907.0011
 Mean    value: 1907.00087 (unweighted average)
 
let var = {221907.001,221907.0005,221907.0011}
stat/br var
 
 Total # of data points: 3 (3*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 221907.0005
 Maximum value: 221907.0011
 Mean    value: 221907.0008666667 (unweighted average)
 
 
! STAT/PREC controls the precision, writing more or less digits
 
stat/br/prec=5 var
 
 Total # of data points: 3 (3*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 2.2191E+05
 Maximum value: 2.2191E+05
 Mean    value: 2.2191E+05 (unweighted average)
stat/br/prec=12 var
 
 Total # of data points: 3 (3*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 221907.0005
 Maximum value: 221907.0011
 Mean    value: 221907.000867 (unweighted average)
 
! some more examples
let var = 30*randu(1+i[i=1:10])
stat/br var
 
 Total # of data points: 10 (10*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 2.7871
 Maximum value: 27.002
 Mean    value: 15.77 (unweighted average)
stat/br/prec=3 var
 
 Total # of data points: 10 (10*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 2.79
 Maximum value: 27
 Mean    value: 15.8 (unweighted average)
stat/br/prec=7 var
 
 Total # of data points: 10 (10*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 2.787087
 Maximum value: 27.00225
 Mean    value: 15.76991 (unweighted average)
stat/br/prec=12 var
 
 Total # of data points: 10 (10*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 2.78708674143
 Maximum value: 27.002246751
 Mean    value: 15.76991222 (unweighted average)
*** Running ferret script: bn_plot_vs_with_time.jnl
! bn_plot_vs_with_time.jnl
! See ticket 2246
! 3/27/2017 *ACM*
 
! PLOT/VS plots automatically draw a formatted time axis
! when one of the variables has calendar units and time origin
 
! (Currently allow just one axis to be time formatted)
 
can mode logo
 
! Date units syntax days since 1982-01-01 is valid
 
define axis/t=1:500:10/units=days/t0="01-jan-1982" tax
let/units="days since 1982-01-01" mytime2 = t[gt=tax]
 
let myvar2 = RANDU(mytime2)
plot/vs/line mytime2, myvar2
plot/vs/over/sym/color=red mytime2[L=1:50:2], myvar2[L=1:50:2]
 
! time axis on the vertical
 
! Date syntax days since 01-jan-1982 is also valid.
define axis/t=1:500:10/units=days/t0="01-jan-1982" tax
let/units="days since 01-jan-1982" mytime2 = t[gt=tax]
 
plot/vs/line myvar2, mytime2
plot/vs/over/sym/color=red/line  myvar2[L=1:50:2],  mytime2[L=1:50:2]
 
! LAS style plots:
! Dataset with pressure,temperature on ZT grid. Define a time variable
! send it to PLOT/VS to draw plots with time-formatted axis, plain
! 2-variable plots and plot/vs plots.
! Define variables as if gridded T-Z data in spurs dataset
 
define axis/t="25-JAN-2017:23:00":"02-FEB-2017 10:00":12/units=hours/t0=1-jan-2017 time
define axis/z=1:50:4/units=m/depth zaxis
let/title=pressure/units=m pres=z[gz=zaxis] + 0.3*randu(t[gt=time])
let/title=temperature/units="Deg C" temp = 20 - z[gz=zaxis] + 10*randu(t[gt=time])
 
! Define a time variable
let/units="`pres,return=tunits` since `pres,return=t0`" ttvar = t[gt=temp] + 0*temp
 !-> DEFINE VARIABLE/units="HOURS since 1-JAN-2017" ttvar = t[gt=temp] + 0*temp
 
! time on horizontal axis
set v ul; plot/vs/ribbon/sym=17/thick/vlim=50:0  ttvar, pres, temp
 
! time on vertical axis
set v ur; plot/vs/ribbon/sym=17/thick/hlim=50:0  pres, ttvar, temp
 
! More time axis styles
 
define axis/t=1-jan-2016:1-jan-2017:45/units=days/t0=1-jan-1970 time
let/title=pressure/units=m pres=z[gz=zaxis] + 0.3*randu(t[gt=time])
let/title=temperature/units="Deg C" temp = 20 - z[gz=zaxis] + 10*randu(t[gt=time])
let/units="`pres,return=tunits` since `pres,return=t0`" ttvar = t[gt=temp] + 0*temp
 !-> DEFINE VARIABLE/units="DAYS since 1-JAN-1970" ttvar = t[gt=temp] + 0*temp
 
set v ll; plot/vs/ribbon/sym=17/thick/vlim=50:0  ttvar, pres, temp
 
define axis/t=1-jan-2001:1-jan-2012:181/units=days/t0=1-jan-1970 time
let/title=pressure/units=m pres=z[gz=zaxis] + 0.3*randu(t[gt=time])
let/title=temperature/units="Deg C" temp = 20 - z[gz=zaxis] + 10*randu(t[gt=time])
let/units="`pres,return=tunits` since `pres,return=t0`" ttvar = t[gt=temp] + 0*temp
 !-> DEFINE VARIABLE/units="DAYS since 1-JAN-1970" ttvar = t[gt=temp] + 0*temp
 
set v lr; plot/vs/ribbon/sym=17/thick/vlim=50:0  ttvar, pres, temp
 
 
set mode/last logo
*** Running ferret script: bn_dot_product.jnl
! bn_dot_product.jnl
! 3/2017 *acm*  dot product function for matrix multiply operation
 
 
sh func dot*
DOT(VAR1,VAR2,IDIM)
    Compute the inner product of two variables along given dimension
    VAR1: Variable 1
    VAR2: Variable 2
    IDIM: Dimension (e.g.1,2,...)
DOT_E(VAR1,VAR2)
    Compute the inner product of two variables along E-axis
    VAR1: Variable 1
    VAR2: Variable 2
DOT_F(VAR1,VAR2)
    Compute the inner product of two variables along F-axis
    VAR1: Variable 1
    VAR2: Variable 2
DOT_T(VAR1,VAR2)
    Compute the inner product of two variables along T-axis
    VAR1: Variable 1
    VAR2: Variable 2
DOT_X(VAR1,VAR2)
    Compute the inner product of two variables along X-axis
    VAR1: Variable 1
    VAR2: Variable 2
DOT_Y(VAR1,VAR2)
    Compute the inner product of two variables along Y-axis
    VAR1: Variable 1
    VAR2: Variable 2
DOT_Z(VAR1,VAR2)
    Compute the inner product of two variables along Z-axis
    VAR1: Variable 1
    VAR2: Variable 2
 
! A call to dot(var1, var2, dir) translates into call to
! function dot_q(var1,var2) where q is the pax direction
! corresponding to dir=1,2,...,6
 
set list/pre=7
 
define axis/x=1:5:1 xpax
define axis/y=0.1:0.3:0.1 ypax
define axis/z=0.01:0.04:0.01 zpax
define axis/e=-3:-1:1 epax
define axis/f=-0.4:-0.1:0.1 fpax
 
let var1 = x[gx=xpax]
let var2 = 1+0*x[gx=xpax]
list var1, var2
             X: 0.5 to 5.5
 Column  1: VAR1 is X[GX=XPAX]
 Column  2: VAR2 is 1+0*X[GX=XPAX]
             VAR1     VAR2
1   / 1:  1.000000  1.000000
2   / 2:  2.000000  1.000000
3   / 3:  3.000000  1.000000
4   / 4:  4.000000  1.000000
5   / 5:  5.000000  1.000000
list  dot(var1, var2, 1)
             VARIABLE : DOT(VAR1, VAR2, 1)
          15.00000
!can var/all
 
let var1 = x[gx=xpax]
let var2 = 1+0*x[gx=xpax]
list  dot_x(var1, var2)
             VARIABLE : DOT_X(VAR1, VAR2)
          15.00000
 
let var1 = y[gy=ypax]
let var2 = 1+0*y[gy=ypax]
list var1, var2
             Y: 0.05 to 0.35
 Column  1: VAR1 is Y[GY=YPAX]
 Column  2: VAR2 is 1+0*Y[GY=YPAX]
               VAR1     VAR2
0.1  / 1:  0.1000000  1.000000
0.2  / 2:  0.2000000  1.000000
0.3  / 3:  0.3000000  1.000000
list  dot(var1, var2, 2)
             VARIABLE : DOT(VAR1, VAR2, 2)
          0.6000000
 
let var1 = z[gz=zpax]
let var2 = 1+0*z[gz=zpax]
list var1, var2
             Z: 0.005 to 0.045
 Column  1: VAR1 is Z[GZ=ZPAX]
 Column  2: VAR2 is 1+0*Z[GZ=ZPAX]
                 VAR1     VAR2
0.01  / 1:  0.01000000  1.000000
0.02  / 2:  0.02000000  1.000000
0.03  / 3:  0.03000000  1.000000
0.04  / 4:  0.04000000  1.000000
list  dot(var1, var2, 3)
             VARIABLE : DOT(VAR1, VAR2, 3)
          0.10000000
 
let var1 = L[gt=month_reg]
let var2 = 1+0*L[gt=month_reg]
list var1, var2
             TIME: 01-JAN 00:45 to 31-DEC 06:34
 Column  1: VAR1 is L[GT=MONTH_REG]
 Column  2: VAR2 is 1+0*L[GT=MONTH_REG]
                      VAR1     VAR2
16-JAN      /  1:   1.00000  1.000000
15-FEB      /  2:   2.00000  1.000000
17-MAR      /  3:   3.00000  1.000000
16-APR      /  4:   4.00000  1.000000
16-MAY      /  5:   5.00000  1.000000
16-JUN      /  6:   6.00000  1.000000
16-JUL      /  7:   7.00000  1.000000
16-AUG      /  8:   8.00000  1.000000
15-SEP      /  9:   9.00000  1.000000
16-OCT      / 10:  10.00000  1.000000
15-NOV      / 11:  11.00000  1.000000
16-DEC      / 12:  12.00000  1.000000
list  dot(var1, var2, 4)
             VARIABLE : DOT(VAR1, VAR2, 4)
          78.00000
 
let var1 = _e[ge=epax]
let var2 = 1+0*_e[ge=epax]
list var1, var2
             E: -3.5 to -0.5
 Column  1: VAR1 is _E[GE=EPAX]
 Column  2: VAR2 is 1+0*_E[GE=EPAX]
              VAR1     VAR2
-3   / 1: -3.000000  1.000000
-2   / 2: -2.000000  1.000000
-1   / 3: -1.000000  1.000000
list  dot(var1, var2, 5)
             VARIABLE : DOT(VAR1, VAR2, 5)
         -6.000000
 
let var1 = _f[gf=fpax]
let var2 = 1+0*_f[gf=fpax]
list var1, var2
             F: -0.45 to -0.05
 Column  1: VAR1 is _F[GF=FPAX]
 Column  2: VAR2 is 1+0*_F[GF=FPAX]
                VAR1     VAR2
-0.4  / 1: -0.4000000  1.000000
-0.3  / 2: -0.3000000  1.000000
-0.2  / 3: -0.2000000  1.000000
-0.1  / 4: -0.1000000  1.000000
list  dot(var1, var2, 6)
             VARIABLE : DOT(VAR1, VAR2, 6)
         -1.000000
 
let axy = x[gx=xpax] + y[gy=ypax]
let bxz = 0*x[gx=xpax]+  10*Z[GZ=Zpax]
list axy, bxz
             X: 0.5 to 5.5
             Y: 0.05 to 0.35
             Z: 0.005 to 0.045
 Column  1: AXY is X[GX=XPAX] + Y[GY=YPAX]
 Column  2: BXZ is 0*X[GX=XPAX]+  10*Z[GZ=ZPAX]
              AXY      BXZ
 ---- K:1 Z:   0.01
 ---- J:1 Y:   0.1
1   / 1:  1.100000  0.1000000
2   / 2:  2.100000  0.1000000
3   / 3:  3.100000  0.1000000
4   / 4:  4.100000  0.1000000
5   / 5:  5.100000  0.1000000
 ---- J:2 Y:   0.2
1   / 1:  1.200000  0.1000000
2   / 2:  2.200000  0.1000000
3   / 3:  3.200000  0.1000000
4   / 4:  4.200000  0.1000000
5   / 5:  5.200000  0.1000000
 ---- J:3 Y:   0.3
1   / 1:  1.300000  0.1000000
2   / 2:  2.300000  0.1000000
3   / 3:  3.300000  0.1000000
4   / 4:  4.300000  0.1000000
5   / 5:  5.300000  0.1000000
 ---- K:2 Z:   0.02
 ---- J:1 Y:   0.1
1   / 1:  1.100000  0.2000000
2   / 2:  2.100000  0.2000000
3   / 3:  3.100000  0.2000000
4   / 4:  4.100000  0.2000000
5   / 5:  5.100000  0.2000000
 ---- J:2 Y:   0.2
1   / 1:  1.200000  0.2000000
2   / 2:  2.200000  0.2000000
3   / 3:  3.200000  0.2000000
4   / 4:  4.200000  0.2000000
5   / 5:  5.200000  0.2000000
 ---- J:3 Y:   0.3
1   / 1:  1.300000  0.2000000
2   / 2:  2.300000  0.2000000
3   / 3:  3.300000  0.2000000
4   / 4:  4.300000  0.2000000
5   / 5:  5.300000  0.2000000
 ---- K:3 Z:   0.03
 ---- J:1 Y:   0.1
1   / 1:  1.100000  0.3000000
2   / 2:  2.100000  0.3000000
3   / 3:  3.100000  0.3000000
4   / 4:  4.100000  0.3000000
5   / 5:  5.100000  0.3000000
 ---- J:2 Y:   0.2
1   / 1:  1.200000  0.3000000
2   / 2:  2.200000  0.3000000
3   / 3:  3.200000  0.3000000
4   / 4:  4.200000  0.3000000
5   / 5:  5.200000  0.3000000
 ---- J:3 Y:   0.3
1   / 1:  1.300000  0.3000000
2   / 2:  2.300000  0.3000000
3   / 3:  3.300000  0.3000000
4   / 4:  4.300000  0.3000000
5   / 5:  5.300000  0.3000000
 ---- K:4 Z:   0.04
 ---- J:1 Y:   0.1
1   / 1:  1.100000  0.4000000
2   / 2:  2.100000  0.4000000
3   / 3:  3.100000  0.4000000
4   / 4:  4.100000  0.4000000
5   / 5:  5.100000  0.4000000
 ---- J:2 Y:   0.2
1   / 1:  1.200000  0.4000000
2   / 2:  2.200000  0.4000000
3   / 3:  3.200000  0.4000000
4   / 4:  4.200000  0.4000000
5   / 5:  5.200000  0.4000000
 ---- J:3 Y:   0.3
1   / 1:  1.300000  0.4000000
2   / 2:  2.300000  0.4000000
3   / 3:  3.300000  0.4000000
4   / 4:  4.300000  0.4000000
5   / 5:  5.300000  0.4000000
list dot(axy, bxz, 1)
             VARIABLE : DOT(AXY, BXZ, 1)
             SUBSET   : 3 by 4 points (Y-Z)
                0.1       0.2       0.3    
                 1         2         3
 0.01  / 1:  1.550000  1.600000  1.650000
 0.02  / 2:  3.100000  3.200000  3.300000
 0.03  / 3:  4.650000  4.800000  4.950000
 0.04  / 4:  6.200000  6.400000  6.600000
 
let byz = y[gy=ypax]+  10*Z[GZ=Zpax]
list dot(axy, byz, 2)
             VARIABLE : DOT(AXY, BYZ, 2)
             SUBSET   : 5 by 4 points (X-Z)
                1         2         3         4         5      
                 1         2         3         4         5
 0.01  / 1:  1.100000  2.000000  2.900000  3.800000  4.700000
 0.02  / 2:  1.460000  2.660000  3.860000  5.060000  6.260000
 0.03  / 3:  1.820000  3.320000  4.820000  6.320000  7.820000
 0.04  / 4:  2.180000  3.980000  5.780000  7.580000  9.380000
 
let lvar = L[gt=month_reg] - 1
let axyt = axy + lvar
let multi_dot = dot(axyt, byz, 2)
save/file=a.nc/clobber multi_dot
 
can var multi_dot
use a.nc
!  This should be the same as dot(axy, byz, 2)
list/l=1 multi_dot
             VARIABLE : DOT(AXYT, BYZ, 2)
             FILENAME : a.nc
             SUBSET   : 5 by 4 points (X-Z)
             TIME     : 16-JAN 06:00
                1         2         3         4         5      
                 1         2         3         4         5
 0.01  / 1:  1.100000  2.000000  2.900000  3.800000  4.700000
 0.02  / 2:  1.460000  2.660000  3.860000  5.060000  6.260000
 0.03  / 3:  1.820000  3.320000  4.820000  6.320000  7.820000
 0.04  / 4:  2.180000  3.980000  5.780000  7.580000  9.380000
 
!  z and t
 
 
let axz = x[gx=xpax] + z[gz=zpax]
let bzt = 0*z[gz=zpax]+  10*L[gt=month_reg]
list dot(axz, bzt, 3)
             VARIABLE : DOT(AXZ, BZT, 3)
             SUBSET   : 5 by 12 points (X-TIME)
                       1         2         3         4         5      
                        1         2         3         4         5
 16-JAN      /  1:    41.000    81.000   121.000   161.000   201.000
 15-FEB      /  2:    82.000   162.000   242.000   322.000   402.000
 17-MAR      /  3:   123.000   243.000   363.000   483.000   603.000
 16-APR      /  4:   164.000   324.000   484.000   644.000   804.000
 16-MAY      /  5:   205.000   405.000   605.000   805.000  1005.000
 16-JUN      /  6:   246.000   486.000   726.000   966.000  1206.000
 16-JUL      /  7:   287.000   567.000   847.000  1127.000  1407.000
 16-AUG      /  8:   328.000   648.000   968.000  1288.000  1608.000
 15-SEP      /  9:   369.000   729.000  1089.000  1449.000  1809.000
 16-OCT      / 10:   410.000   810.000  1210.000  1610.000  2010.000
 15-NOV      / 11:   451.000   891.000  1331.000  1771.000  2211.000
 16-DEC      / 12:   492.000   972.000  1452.000  1932.000  2412.000
 
let ayt = y[gy=ypax]+ 10*L[gt=month_reg]
list dot(ayt, bzt, 4)
             VARIABLE : DOT(AYT, BZT, 4)
             SUBSET   : 3 by 4 points (Y-Z)
                0.1       0.2       0.3    
                 1         2         3
 0.01  / 1:  65078.00  65156.00  65234.00
 0.02  / 2:  65078.00  65156.00  65234.00
 0.03  / 3:  65078.00  65156.00  65234.00
 0.04  / 4:  65078.00  65156.00  65234.00
 
 
let xvar = x[gx=xpax] - 1
let axyt = ayt + xvar
let multi_dot = dot(axyt, bzt, 4)
save/file=a.nc/clobber multi_dot
 
can var multi_dot
use a.nc
!  This should be the same as dot(ayt, bzt, 4)
list/i=1 multi_dot
             VARIABLE : DOT(AXYT, BYZ, 2)
             FILENAME : a.nc
             SUBSET   : 4 by 12 points (Z-TIME)
             X        : 1
                      0.01      0.02      0.03      0.04    
                        1         2         3         4
 16-JAN      /  1:   1.10000   1.46000   1.82000   2.18000
 15-FEB      /  2:   2.00000   2.66000   3.32000   3.98000
 17-MAR      /  3:   2.90000   3.86000   4.82000   5.78000
 16-APR      /  4:   3.80000   5.06000   6.32000   7.58000
 16-MAY      /  5:   4.70000   6.26000   7.82000   9.38000
 16-JUN      /  6:   5.60000   7.46000   9.32000  11.18000
 16-JUL      /  7:   6.50000   8.66000  10.82000  12.98000
 16-AUG      /  8:   7.40000   9.86000  12.32000  14.78000
 15-SEP      /  9:   8.30000  11.06000  13.82000  16.58000
 16-OCT      / 10:   9.20000  12.26000  15.32000  18.38000
 15-NOV      / 11:  10.10000  13.46000  16.82000  20.18000
 16-DEC      / 12:  11.00000  14.66000  18.32000  21.98000
 
can dat/all
 
!  e and f
 
let ayf = _f[gf=fpax] + y[gy=ypax]
let bfe = 0*_f[gf=fpax]+  10*_e[ge=epax]
list dot(ayf, bfe, 6)
             VARIABLE : DOT(AYF, BFE, 6)
             SUBSET   : 3 by 3 points (Y-E)
               0.1       0.2       0.3    
                1         2         3
 -3   / 1:  18.00000   6.00000  -6.00000
 -2   / 2:  12.00000   4.00000  -4.00000
 -1   / 3:   6.00000   2.00000  -2.00000
 
let aze = z[gz=zpax]+ 10*_e[ge=epax]
list dot(aze, bfe, 5)
             VARIABLE : DOT(AZE, BFE, 5)
             SUBSET   : 4 by 4 points (Z-F)
               0.01      0.02      0.03      0.04    
                 1         2         3         4
 -0.4  / 1:  1399.400  1398.800  1398.200  1397.600
 -0.3  / 2:  1399.400  1398.800  1398.200  1397.600
 -0.2  / 3:  1399.400  1398.800  1398.200  1397.600
 -0.1  / 4:  1399.400  1398.800  1398.200  1397.600
 
let xvar = x[gx=xpax] - 1
let azex = aze + xvar
let multi_dot = dot(azex, bfe, 5)
save/file=a.nc/clobber multi_dot
 
can var multi_dot
use a.nc
!  This should be the same as dot(azex, bfe, 5)
list/i=1 multi_dot
             VARIABLE : DOT(AZEX, BFE, 5)
             FILENAME : a.nc
             SUBSET   : 4 by 4 points (Z-F)
             X        : 1
               0.01      0.02      0.03      0.04    
                 1         2         3         4
 -0.4  / 1:  1399.400  1398.800  1398.200  1397.600
 -0.3  / 2:  1399.400  1398.800  1398.200  1397.600
 -0.2  / 3:  1399.400  1398.800  1398.200  1397.600
 -0.1  / 4:  1399.400  1398.800  1398.200  1397.600
 
cancel list/precision
*** Running ferret script: bn_cache_management.jnl
! bn_cache_management.jnl
 
 ! 1/2017 - try to force Ferret into a complex juggling of dependencies
! and cache maintenance in order to reproduce the problem seen in trac
! ticket #2485 (from Ned Cokelet)
! *acm*7/2017 0=success for SPAWN_STATUS
! *acm* 6/2019 Change to SET MEM in Mb
 
! Ferret's cache of memory-resident results is full when it holds 500 of them.
! At that point it must delete cached results to make room for new variables.
! It is supposed to chose the cached result that has not been used for the
! longest time, AND that is not being "protected" because it is needed in a
! pending calculation.  This script is intended to exercise that behavior.
 
! Memory footprint needed:
! Each dataset contains 7 variables of 1 Mword each
! VTREE reveals that the "result" variable requires 78 intermediate variables
! of size 1Mword (plus 7 small ones)
! Of these only 12 variables needed in the top level "result" sum calculation
! Each of the top level variables in turn requires ?25? component variables
! But the top level variables need these components only in sequence.
! So if no split-gather is performed, Ferret requires ~12+25=37 Mwords
 
DEFINE SYMBOL saved_memory_size = ($FERRET_BYTES_MEM)
 !-> DEFINE SYMBOL saved_memory_size = 500Mb
 
SET MEMORY/SIZE=160M
CANCEL MEMORY/ALL
 
DEFINE SYMBOL nsets = 20
 
define axis/x=1:1000000:1 xmillion
 
! aside: to demonstrate lmitations of ferret memory management prior to
! dynamic memory, use
!     yes? set memory/size=37
!     yes? GO test_auto_cache_delete 0 20
 
! see if the test files already exist
SPAWN "mkdir -p tmp"     ! tmp directory to store files
SPAWN ls tmp/test_auto_cache_($nsets).nc
 !-> SPAWN ls tmp/test_auto_cache_20.nc
IF ($SPAWN_OK) THEN
 !-> IF 0 THEN
ELSE
 say creating test files
creating test files
 cancel mode verify
ENDIF
 
! open the many input datasets
REPEAT/k=1:($nsets)  USE tmp/test_auto_cache_`k`.nc
 !-> REPEAT/k=1:20  USE tmp/test_auto_cache_`k`.nc
!-> REPEAT: K=1
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_1.nc
!-> REPEAT: K=2
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_2.nc
!-> REPEAT: K=3
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_3.nc
!-> REPEAT: K=4
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_4.nc
!-> REPEAT: K=5
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_5.nc
!-> REPEAT: K=6
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_6.nc
!-> REPEAT: K=7
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_7.nc
!-> REPEAT: K=8
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_8.nc
!-> REPEAT: K=9
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_9.nc
!-> REPEAT: K=10
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_10.nc
!-> REPEAT: K=11
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_11.nc
!-> REPEAT: K=12
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_12.nc
!-> REPEAT: K=13
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_13.nc
!-> REPEAT: K=14
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_14.nc
!-> REPEAT: K=15
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_15.nc
!-> REPEAT: K=16
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_16.nc
!-> REPEAT: K=17
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_17.nc
!-> REPEAT: K=18
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_18.nc
!-> REPEAT: K=19
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_19.nc
!-> REPEAT: K=20
 !-> SET DAT/FORM=CDF tmp/test_auto_cache_20.nc
 
! define a huge tree of variables
let  r_one      = RESHAPE(one,X[gx=xmillion])
let  r_ten      = RESHAPE(ten,X[gx=xmillion])
let  r_hundred  = RESHAPE(hundred,X[gx=xmillion])
let  r_thousand = RESHAPE(thousand,X[gx=xmillion])
let  r_tenthou  = RESHAPE(tenthou,X[gx=xmillion])
let  r_hundthou = RESHAPE(hundthou,X[gx=xmillion])
let  r_million  = RESHAPE(million,X[gx=xmillion])
 
let a_one     = r_one[X=@ave]
let a_ten     = r_ten[X=@ave]
let a_hundred = r_hundred[X=@ave]
let a_thousand= r_thousand[X=@ave]
let a_tenthou = r_tenthou[X=@ave]
let a_hundthou= r_hundthou[X=@ave]
let a_million = r_million[X=@ave]
 
let one_2      = a_one
let ten_2      = a_ten
let hundred_2  = a_hundred
let thousand_2 = a_thousand
let tenthou_2  = a_tenthou
let hundthou_2 = a_hundthou
let million_2  = a_million
 
let one_3      = a_one
let ten_3      = a_ten
let hundred_3  = a_hundred
let thousand_3 = a_thousand
let tenthou_3  = a_tenthou
let hundthou_3 = a_hundthou
let million_3  = a_million
 
let result_31 = \
one_3 + ten_3 + hundred_3 + thousand_3 + tenthou_3 + hundthou_3 + million_3
 
let result_21 = \
one_2 + ten_2 + hundred_2 + thousand_2 + tenthou_2 + hundthou_2 + million_2
 
let result_32 = \
one_3 + ten_3 + hundred_3 + thousand_3 + tenthou_3 + hundthou_3 + million_3
 
let result_22 = \
one_2 + ten_2 + hundred_2 + thousand_2 + tenthou_2 + hundthou_2 + million_2
 
let result = result_31 + result_21 + result_32 + result_22 + \
a_one + a_ten + a_hundred + a_thousand + a_tenthou + a_hundthou + a_million
 
! process all of the datasets in turn
! ==> WATCH HOW THE NUMBER OF FREE SLOTS IS PROGRESSIVELY EXHAUSTED
! This proves that we are exercising the limits of table space
sp rm -f test_auto_cache.out
REPEAT/k=1:($nsets)  \
(list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_`k`.nc];\
SHOW MEMORY/DIAG)
 !-> REPEAT/k=1:20  (list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_`k`.nc];SHOW MEMORY/DIAG)
!-> REPEAT: K=1
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_1.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 376
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 115.92 Mb
!-> REPEAT: K=2
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_2.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 273
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 63.84 Mb
!-> REPEAT: K=3
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_3.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 163
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 67.76 Mb
!-> REPEAT: K=4
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_4.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 53
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 71.68 Mb
!-> REPEAT: K=5
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_5.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 1
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 73.36 Mb
!-> REPEAT: K=6
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_6.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 1
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 73.36 Mb
!-> REPEAT: K=7
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_7.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 1
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 73.36 Mb
!-> REPEAT: K=8
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_8.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 1
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 73.36 Mb
!-> REPEAT: K=9
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_9.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 1
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 73.36 Mb
!-> REPEAT: K=10
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_10.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 1
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 73.36 Mb
!-> REPEAT: K=11
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_11.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 1
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 73.36 Mb
!-> REPEAT: K=12
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_12.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 1
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 73.36 Mb
!-> REPEAT: K=13
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_13.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 1
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 73.36 Mb
!-> REPEAT: K=14
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_14.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 1
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 73.36 Mb
!-> REPEAT: K=15
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_15.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 1
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 73.36 Mb
!-> REPEAT: K=16
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_16.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 1
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 73.36 Mb
!-> REPEAT: K=17
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_17.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 1
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 73.36 Mb
!-> REPEAT: K=18
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_18.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 1
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 73.36 Mb
!-> REPEAT: K=19
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_19.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 1
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 73.36 Mb
!-> REPEAT: K=20
 !-> list/nohead/file=test_auto_cache.out/append result[d=test_auto_cache_20.nc]
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 1
    Un-cached variables: 0
    SET MEMORY/MAX: 160 Mb   (20 megawords)
    Peak demand: 64.16 Mb
    Current cache: 73.36 Mb
 
! success
vtree result
   in default dataset test_auto_cache_20
   RESULT = RESULT_31 + RESULT_21 + RESULT_32 + RESULT_22 + A_ONE + A_TEN + A_HUNDRED + A_THOUSAND + A_TENTHOU + A_HUNDTHOU + A_MILLION
     RESULT_31 = ONE_3 + TEN_3 + HUNDRED_3 + THOUSAND_3 + TENTHOU_3 + HUNDTHOU_3 + MILLION_3
       ONE_3 = A_ONE
         A_ONE = R_ONE[X=@AVE]
           R_ONE = RESHAPE(ONE,X[GX=XMILLION])
             (C001,V002) = RESHAPE(ONE,X[GX=XMILLION])
               (C013,V002) = X[GX=XMILLION]
       TEN_3 = A_TEN
         A_TEN = R_TEN[X=@AVE]
           R_TEN = RESHAPE(TEN,X[GX=XMILLION])
             (C001,V005) = RESHAPE(TEN,X[GX=XMILLION])
               (C013,V005) = X[GX=XMILLION]
       HUNDRED_3 = A_HUNDRED
         A_HUNDRED = R_HUNDRED[X=@AVE]
           R_HUNDRED = RESHAPE(HUNDRED,X[GX=XMILLION])
             (C001,V008) = RESHAPE(HUNDRED,X[GX=XMILLION])
               (C017,V008) = X[GX=XMILLION]
       THOUSAND_3 = A_THOUSAND
         A_THOUSAND = R_THOUSAND[X=@AVE]
           R_THOUSAND = RESHAPE(THOUSAND,X[GX=XMILLION])
             (C001,V011) = RESHAPE(THOUSAND,X[GX=XMILLION])
               (C018,V011) = X[GX=XMILLION]
       TENTHOU_3 = A_TENTHOU
         A_TENTHOU = R_TENTHOU[X=@AVE]
           R_TENTHOU = RESHAPE(TENTHOU,X[GX=XMILLION])
             (C001,V014) = RESHAPE(TENTHOU,X[GX=XMILLION])
               (C017,V014) = X[GX=XMILLION]
       HUNDTHOU_3 = A_HUNDTHOU
         A_HUNDTHOU = R_HUNDTHOU[X=@AVE]
           R_HUNDTHOU = RESHAPE(HUNDTHOU,X[GX=XMILLION])
             (C001,V017) = RESHAPE(HUNDTHOU,X[GX=XMILLION])
               (C018,V017) = X[GX=XMILLION]
       MILLION_3 = A_MILLION
         A_MILLION = R_MILLION[X=@AVE]
           R_MILLION = RESHAPE(MILLION,X[GX=XMILLION])
             (C001,V020) = RESHAPE(MILLION,X[GX=XMILLION])
               (C017,V020) = X[GX=XMILLION]
     RESULT_21 = ONE_2 + TEN_2 + HUNDRED_2 + THOUSAND_2 + TENTHOU_2 + HUNDTHOU_2 + MILLION_2
       ONE_2 = A_ONE
         A_ONE =  (defined above)
       TEN_2 = A_TEN
         A_TEN =  (defined above)
       HUNDRED_2 = A_HUNDRED
         A_HUNDRED =  (defined above)
       THOUSAND_2 = A_THOUSAND
         A_THOUSAND =  (defined above)
       TENTHOU_2 = A_TENTHOU
         A_TENTHOU =  (defined above)
       HUNDTHOU_2 = A_HUNDTHOU
         A_HUNDTHOU =  (defined above)
       MILLION_2 = A_MILLION
         A_MILLION =  (defined above)
     RESULT_32 = ONE_3 + TEN_3 + HUNDRED_3 + THOUSAND_3 + TENTHOU_3 + HUNDTHOU_3 + MILLION_3
       ONE_3 =  (defined above)
       TEN_3 =  (defined above)
       HUNDRED_3 =  (defined above)
       THOUSAND_3 =  (defined above)
       TENTHOU_3 =  (defined above)
       HUNDTHOU_3 =  (defined above)
       MILLION_3 =  (defined above)
     RESULT_22 = ONE_2 + TEN_2 + HUNDRED_2 + THOUSAND_2 + TENTHOU_2 + HUNDTHOU_2 + MILLION_2
       ONE_2 =  (defined above)
       TEN_2 =  (defined above)
       HUNDRED_2 =  (defined above)
       THOUSAND_2 =  (defined above)
       TENTHOU_2 =  (defined above)
       HUNDTHOU_2 =  (defined above)
       MILLION_2 =  (defined above)
     A_ONE =  (defined above)
     A_TEN =  (defined above)
     A_HUNDRED =  (defined above)
     A_THOUSAND =  (defined above)
     A_TENTHOU =  (defined above)
     A_HUNDTHOU =  (defined above)
     A_MILLION =  (defined above)
! show that the calculation result never varied
spawn cat test_auto_cache.out
          5555555.
          5555555.
          5555555.
          5555555.
          5555555.
          5555555.
          5555555.
          5555555.
          5555555.
          5555555.
          5555555.
          5555555.
          5555555.
          5555555.
          5555555.
          5555555.
          5555555.
          5555555.
          5555555.
          5555555.
 
! clean up
SET MEMORY/SIZE=($saved_memory_size)
 !-> SET MEMORY/SIZE=500Mb
*** Running ferret script: bn_transp_choose.jnl
! bn_transp_choose.jnl
!  Test the TRANSPOSE function which chooses which of the
! transpose_ functions to run based on arguments
 
can mem
sh func transpose
TRANSPOSE(VAR,DIM1,DIM2)
    Compute the transpose along two given dimensions
    VAR: Variable to transpose
    DIM1: Dimension 1 for transpose (1,2,...)
    DIM2: Dimension 2 for transpose (1,2,...)
 
use gt4d011
 
list/K=1/l=1 u[i=91:100,j=35:45]
             VARIABLE : ZONAL VELOCITY (cm/sec)
             FILENAME : gt4d011.cdf
             SUBSET   : 10 by 11 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 17-AUG-1982 12:00
              139W   138W   137W   136W   135W   134W   133W   132W   131W   130W   
               91     92     93     94     95     96     97     98     99    100
 0     / 45:  -8.20 -19.89 -28.29 -25.75 -16.70 -11.70 -11.69 -13.85 -17.12 -21.07
 0.33S / 44:   1.59  -6.13 -13.69 -15.25 -11.03  -7.87  -7.10  -7.63  -9.21 -12.26
 0.67S / 43:   5.32   1.48  -3.07  -5.89  -5.82  -5.23  -4.74  -4.33  -4.43  -6.13
 1S    / 42:   4.21   2.98   1.52  -0.92  -2.98  -3.76  -3.56  -2.80  -2.14  -2.69
 1.33S / 41:   0.84   0.81   1.58   0.30  -2.14  -2.93  -2.57  -1.80  -1.01  -0.84
 1.67S / 40:  -2.97  -2.36  -0.43  -0.56  -2.17  -2.25  -1.77  -1.32  -0.77  -0.35
 2S    / 39:  -5.92  -4.46  -2.65  -1.48  -1.97  -1.38  -1.01  -1.15  -1.17  -1.00
 2.33S / 38:  -7.43  -5.01  -2.65  -0.75  -0.32   0.16   0.24  -0.26  -0.54  -0.55
 2.67S / 37:  -7.90  -5.72  -2.76  -0.71   0.17   0.87   0.49  -0.46  -1.02  -1.12
 3S    / 36:  -7.76  -5.38  -2.21  -0.01   0.83   1.06   0.35  -1.04  -2.12  -2.57
 3.33S / 35:  -6.68  -4.47  -2.20  -0.62  -0.06  -0.21  -1.41  -2.79  -3.67  -4.03
let var = transpose (u[i=91:100,j=35:41], 1, 2)
list/K=1/l=1 var
             VARIABLE : TRANSPOSE (U[I=91:100,J=35:41], 1, 2)
             FILENAME : gt4d011.cdf
             SUBSET   : 7 by 10 points (X-Y)
             DEPTH (m): 5
             TIME     : 17-AUG-1982 12:00
               1      2      3      4      5      6      7    
               1      2      3      4      5      6      7
 1    /  1: -6.680 -7.762 -7.904 -7.426 -5.923 -2.970  0.842
 2    /  2: -4.470 -5.381 -5.718 -5.006 -4.457 -2.359  0.813
 3    /  3: -2.198 -2.209 -2.764 -2.647 -2.652 -0.425  1.580
 4    /  4: -0.620 -0.005 -0.710 -0.755 -1.478 -0.555  0.299
 5    /  5: -0.058  0.828  0.170 -0.324 -1.974 -2.169 -2.136
 6    /  6: -0.214  1.056  0.875  0.164 -1.383 -2.248 -2.932
 7    /  7: -1.413  0.347  0.486  0.235 -1.009 -1.767 -2.566
 8    /  8: -2.788 -1.040 -0.455 -0.259 -1.149 -1.316 -1.802
 9    /  9: -3.674 -2.118 -1.018 -0.536 -1.167 -0.772 -1.006
 10   / 10: -4.028 -2.566 -1.120 -0.550 -1.001 -0.346 -0.835
 
! same as transpose_xy function
list/k=1/l=1 transpose_xy(u[i=91:100,j=35:41])
             VARIABLE : TRANSPOSE_XY(U[I=91:100,J=35:41])
             FILENAME : gt4d011.cdf
             SUBSET   : 7 by 10 points (X-Y)
             DEPTH (m): 5
             TIME     : 17-AUG-1982 12:00
               1      2      3      4      5      6      7    
               1      2      3      4      5      6      7
 1    /  1: -6.680 -7.762 -7.904 -7.426 -5.923 -2.970  0.842
 2    /  2: -4.470 -5.381 -5.718 -5.006 -4.457 -2.359  0.813
 3    /  3: -2.198 -2.209 -2.764 -2.647 -2.652 -0.425  1.580
 4    /  4: -0.620 -0.005 -0.710 -0.755 -1.478 -0.555  0.299
 5    /  5: -0.058  0.828  0.170 -0.324 -1.974 -2.169 -2.136
 6    /  6: -0.214  1.056  0.875  0.164 -1.383 -2.248 -2.932
 7    /  7: -1.413  0.347  0.486  0.235 -1.009 -1.767 -2.566
 8    /  8: -2.788 -1.040 -0.455 -0.259 -1.149 -1.316 -1.802
 9    /  9: -3.674 -2.118 -1.018 -0.536 -1.167 -0.772 -1.006
 10   / 10: -4.028 -2.566 -1.120 -0.550 -1.001 -0.346 -0.835
 
! Combine transpose with other operations
let vari = u - v
list/l=1 vari[i=91:100,j=35:41,k=1:5@ave]
             VARIABLE : U - V
             FILENAME : gt4d011.cdf
             SUBSET   : 10 by 7 points (LONGITUDE-LATITUDE)
             DEPTH (m): 0 to 50 (averaged)
             TIME     : 17-AUG-1982 12:00
              139W   138W   137W   136W   135W   134W   133W   132W   131W   130W   
               91     92     93     94     95     96     97     98     99    100
 1.33S / 41:  31.96  33.88  35.22  32.52  26.48  23.46  23.71  26.69  30.92  34.16
 1.67S / 40:  25.82  27.64  29.79  29.00  24.90  23.10  23.50  25.89  29.37  32.46
 2S    / 39:  20.82  22.59  24.84  25.83  23.44  22.68  23.09  24.69  27.27  29.79
 2.33S / 38:  17.62  19.51  22.20  24.22  22.98  22.48  22.74  23.81  25.76  27.66
 2.67S / 37:  15.96  17.53  20.70  22.98  22.23  22.31  22.43  23.10  24.59  25.95
 3S    / 36:  14.43  16.40  19.31  21.57  20.87  20.95  20.89  21.14  22.19  23.48
 3.33S / 35:  13.00  14.83  17.21  19.11  18.28  18.32  18.33  18.69  19.60  20.46
let var = transpose (vari[i=91:100,j=35:41,k=1:5@ave], 1, 2)
list/l=1 var
             VARIABLE : TRANSPOSE (VARI[I=91:100,J=35:41,K=1:5@AVE], 1, 2)
             FILENAME : gt4d011.cdf
             SUBSET   : 7 by 10 points (X-Y)
             TIME     : 17-AUG-1982 12:00
               1      2      3      4      5      6      7    
               1      2      3      4      5      6      7
 1    /  1:  13.00  14.43  15.96  17.62  20.82  25.82  31.96
 2    /  2:  14.83  16.40  17.53  19.51  22.59  27.64  33.88
 3    /  3:  17.21  19.31  20.70  22.20  24.84  29.79  35.22
 4    /  4:  19.11  21.57  22.98  24.22  25.83  29.00  32.52
 5    /  5:  18.28  20.87  22.23  22.98  23.44  24.90  26.48
 6    /  6:  18.32  20.95  22.31  22.48  22.68  23.10  23.46
 7    /  7:  18.33  20.89  22.43  22.74  23.09  23.50  23.71
 8    /  8:  18.69  21.14  23.10  23.81  24.69  25.89  26.69
 9    /  9:  19.60  22.19  24.59  25.76  27.27  29.37  30.92
 10   / 10:  20.46  23.48  25.95  27.66  29.79  32.46  34.16
 
*** Running ferret script: bn_iin_regrid.jnl
! bn_iin_regrid.jnl
! @IIN as a regridding transform See Ticket 2346
! 5/10/18 changes to tests, regridding to axis w/ different
!         box size
 
define axis/edge/x=0:10:1 aline
let a = mod(.5+x[gx=aline],2)
 
! DEFINE AXIS/LIKE=  qualifier
! box_edges function
define axis/x/like=`a,return=xaxis` aline_edges = box_edges(a)
 !-> define axis/x/like=ALINE aline_edges = box_edges(a)
 
! @IIN regridding
show axis/x aline_edges
 name       axis              # pts   start                end
 ALINE_EDGES X                 11 r   0                    10
   Axis span (to cell edges) = 11
 
       I     X                       XBOX          XBOXLO
       1>  0                         1          -0.5
       2>  1                         1          0.5
       3>  2                         1          1.5
       4>  3                         1          2.5
       5>  4                         1          3.5
       6>  5                         1          4.5
       7>  6                         1          5.5
       8>  7                         1          6.5
       9>  8                         1          7.5
      10>  9                         1          8.5
      11>  10                        1          9.5
 
let c = a[gx=aline_edges@iin]
list a
             VARIABLE : MOD(.5+X[GX=ALINE],2)
             SUBSET   : 10 points (X)
 0.5 /  1:  1.000
 1.5 /  2:  0.000
 2.5 /  3:  1.000
 3.5 /  4:  0.000
 4.5 /  5:  1.000
 5.5 /  6:  0.000
 6.5 /  7:  1.000
 7.5 /  8:  0.000
 8.5 /  9:  1.000
 9.5 / 10:  0.000
list c
             VARIABLE : A[GX=ALINE_EDGES@IIN]
             SUBSET   : 11 points (X)
 0    /  1:  0.000
 1    /  2:  1.000
 2    /  3:  1.000
 3    /  4:  2.000
 4    /  5:  2.000
 5    /  6:  3.000
 6    /  7:  3.000
 7    /  8:  4.000
 8    /  9:  4.000
 9    / 10:  5.000
 10   / 11:  5.000
 
define axis/edge/x=0:10:1 aline
let a = mod(.5+x[gx=aline],2)
 
! Different delta
 
define axis/x=0.5:10.5:0.5 alinenew
list a[gx=alinenew@iin]
             VARIABLE : MOD(.5+X[GX=ALINE],2)
                        regrid: 0.5 delta on X@IIN
             SUBSET   : 21 points (X)
 0.5   /  1:  0.250
 1     /  2:  0.750
 1.5   /  3:  0.750
 2     /  4:  0.750
 2.5   /  5:  1.250
 3     /  6:  1.750
 3.5   /  7:  1.750
 4     /  8:  1.750
 4.5   /  9:  2.250
 5     / 10:  2.750
 5.5   / 11:  2.750
 6     / 12:  2.750
 6.5   / 13:  3.250
 7     / 14:  3.750
 7.5   / 15:  3.750
 8     / 16:  3.750
 8.5   / 17:  4.250
 9     / 18:  4.750
 9.5   / 19:  4.750
 10    / 20:  4.750
 10.5  / 21:   ....
 
 
! result out of range, returns missing
define axis/x=100:111:1 alinenew
list a[gx=alinenew@iin]
             VARIABLE : MOD(.5+X[GX=ALINE],2)
                        regrid: 1 delta on X@IIN
             SUBSET   : 12 points (X)
 100   /  1:....
 101   /  2:....
 102   /  3:....
 103   /  4:....
 104   /  5:....
 105   /  6:....
 106   /  7:....
 107   /  8:....
 108   /  9:....
 109   / 10:....
 110   / 11:....
 111   / 12:....
 
! partially out of range
define axis/x=2:12:1 alinenew
list a[gx=alinenew@iin]
             VARIABLE : MOD(.5+X[GX=ALINE],2)
                        regrid: 1 delta on X@IIN
             SUBSET   : 11 points (X)
 2    /  1:  0.000
 3    /  2:  1.000
 4    /  3:  1.000
 5    /  4:  2.000
 6    /  5:  2.000
 7    /  6:  3.000
 8    /  7:  3.000
 9    /  8:  4.000
 10   /  9:  4.000
 11   / 10:   ....
 12   / 11:   ....
 
 
 
! The axes must have convertible units
! Calendar time axes
define axis/edge/t=0:10:1/units=days/t0=1-jan-1990 taxis
let a = mod(.5+L[gt=taxis],2)
 
define axis/t/like=taxis taxis_edges = box_edges(a)
 
let c = a[gt=taxis_edges@iin]
list c
             VARIABLE : A[GT=TAXIS_EDGES@IIN]
             SUBSET   : 11 points (TIME)
 01-JAN-1990 00 /  1:       0.
 02-JAN-1990 00 /  2:  129600.
 03-JAN-1990 00 /  3:  172800.
 04-JAN-1990 00 /  4:  302400.
 05-JAN-1990 00 /  5:  345600.
 06-JAN-1990 00 /  6:  475200.
 07-JAN-1990 00 /  7:  518400.
 08-JAN-1990 00 /  8:  648000.
 09-JAN-1990 00 /  9:  691200.
 10-JAN-1990 00 / 10:  820800.
 11-JAN-1990 00 / 11:  864000.
 
!
define axis/edge/t=0:240:12/units=hours/t0=1-jan-1990 thour
let c = a[gt=thour@iin]
list c
             VARIABLE : A[GT=THOUR@IIN]
             SUBSET   : 20 points (TIME)
 01-JAN-1990 06:00 /  1:   32400.
 01-JAN-1990 18:00 /  2:   97200.
 02-JAN-1990 06:00 /  3:  140400.
 02-JAN-1990 18:00 /  4:  162000.
 03-JAN-1990 06:00 /  5:  205200.
 03-JAN-1990 18:00 /  6:  270000.
 04-JAN-1990 06:00 /  7:  313200.
 04-JAN-1990 18:00 /  8:  334800.
 05-JAN-1990 06:00 /  9:  378000.
 05-JAN-1990 18:00 / 10:  442800.
 06-JAN-1990 06:00 / 11:  486000.
 06-JAN-1990 18:00 / 12:  507600.
 07-JAN-1990 06:00 / 13:  550800.
 07-JAN-1990 18:00 / 14:  615600.
 08-JAN-1990 06:00 / 15:  658800.
 08-JAN-1990 18:00 / 16:  680400.
 09-JAN-1990 06:00 / 17:  723600.
 09-JAN-1990 18:00 / 18:  788400.
 10-JAN-1990 06:00 / 19:  831600.
 10-JAN-1990 18:00 / 20:  853200.
 
 
! Intentional errors
set mode ignore
define axis/edge/z=0:10:1/units=km aline
let a = mod(.5+z[gz=aline],2)
 
define axis/z/units=mile aline_edges = box_edges(a)
 
let c = a[gz=aline_edges@iin]
list c
 
! Ferret general regridding handling detects this incompatibility
! between calendar and non-caleandar axis
define axis/t=1:20:1/units=days/t0=1-jan-1990 calendar_t
let a = t[gt=calendar_t]
 
define axis/t=1:17:2 new_t
 
let c = a[gt=new_t@iin]
list c
 
! longitude and undefined units
 
set mode ignore
define axis/edge/x=0:10:1/units=degrees_east aline
let a = mod(.5+x[gx=aline],2)
 
define axis/x aline_edges = box_edges(a)
 
let c = a[gx=aline_edges@iin]
list c
 
 
define axis/edge/z=0:10:1/units=km aline
let a = mod(.5+z[gz=aline],2)
 
define axis/z/units=nothing aline_edges = box_edges(a)
 
let c = a[gz=aline_edges@iin]
list c
can mode ignore
 
can mem
can var/all
! plots in different directions
 
! In X
 
set win/asp=0.5
set v left
define axis/edge/x=0:10:1 aline
let a = mod(.5+x[gx=aline],2)
plot/step=con/vl=-1:6:1/hl=-1:11:1/grat=dash/col=green/thic=3 a
let a_iin = a[x=@iin]
plot/ov/line/sym=2/si=.1/col=2/thic=2 a_iin
 
define axis/x/like=`a,return=xaxis` aline_edges = box_edges(a)
 !-> define axis/x/like=ALINE aline_edges = box_edges(a)
 
let a_iin_edges = a_iin[gx=aline_edges@asn]
let a_int = IF i[gx=aline_edges] EQ 1 THEN 0 ELSE a_iin_edges[x=@shf:-1]
plot/ov/line/sym=28/si=.1/col=purple/thic=2 a_int
 
 
! @IIN regridding
 
show axis/x aline_edges
 name       axis              # pts   start                end
 ALINE_EDGES X                 11 r   0                    10
   Axis span (to cell edges) = 11
 
       I     X                       XBOX          XBOXLO
       1>  0                         1          -0.5
       2>  1                         1          0.5
       3>  2                         1          1.5
       4>  3                         1          2.5
       5>  4                         1          3.5
       6>  5                         1          4.5
       7>  6                         1          5.5
       8>  7                         1          6.5
       9>  8                         1          7.5
      10>  9                         1          8.5
      11>  10                        1          9.5
let c = a[gx=aline_edges@iin]
plot/ov/line/sym=19/si=.1/col=light/thic=1 c
 
set v right
let b = 1+0*a
plot/step=con/vl=-1:12:1/hl=-1:11:1/grat=dash/col=green/thic=3 b
let b_iin = b[x=@iin]
plot/ov/line/sym=2/si=.1/col=2/thic=2 b_iin
let b_iin_edges = b_iin[gx=aline_edges@asn]
let b_int = IF i[gx=aline_edges] EQ 1 THEN 0 ELSE b_iin_edges[x=@shf:-1]
plot/ov/line/sym=28/si=.1/col=purple/thic=2 b_int
 
! @IIN regridding
let d = b[gx=aline_edges@iin]
plot/ov/line/sym=19/si=.1/col=light/thic=1 d
 
list d
             VARIABLE : B[GX=ALINE_EDGES@IIN]
             SUBSET   : 11 points (X)
 0    /  1:   0.00
 1    /  2:   1.00
 2    /  3:   2.00
 3    /  4:   3.00
 4    /  5:   4.00
 5    /  6:   5.00
 6    /  7:   6.00
 7    /  8:   7.00
 8    /  9:   8.00
 9    / 10:   9.00
 10   / 11:  10.00
define axis/z=1:2:1 otheraxis
let b2d = b + z[gz=otheraxis]
list b2d[gx=aline_edges@iin]
             VARIABLE : B + Z[GZ=OTHERAXIS]
                        regrid: 1 delta on X@IIN
             SUBSET   : 11 by 2 points (X-Z)
             0      1      2      3      4      5      6      7      8      9     10    
             1      2      3      4      5      6      7      8      9     10     11
 1   / 1:   0.00   2.00   4.00   6.00   8.00  10.00  12.00  14.00  16.00  18.00  20.00
 2   / 2:   0.00   3.00   6.00   9.00  12.00  15.00  18.00  21.00  24.00  27.00  30.00
 
can view; can var/all
! In Y
 
set win/asp=0.5
set v left
define axis/edge/y=0:10:1 aline
 
 
let a = mod(.5+y[gy=aline],2)
plot/step=con/vl=-1:6:1/hl=-1:11:1/grat=dash/col=green/thic=3 a
let a_iin = a[y=@iin]
plot/ov/line/sym=2/si=.1/col=2/thic=2 a_iin
 
define axis/y/like=`a,return=yaxis` aline_edges = box_edges(a)
 !-> define axis/y/like=ALINE aline_edges = box_edges(a)
 
let a_iin_edges = a_iin[gy=aline_edges@asn]
let a_int = IF j[gy=aline_edges] EQ 1 THEN 0 ELSE a_iin_edges[y=@shf:-1]
plot/ov/line/sym=28/si=.1/col=purple/thic=2 a_int
 
 
! @IIN regridding
let c = a[gy=aline_edges@iin]
plot/ov/line/sym=19/si=.1/col=light/thic=1 c
 
 
set v right
let b = 1+0*a
plot/step=con/vl=-1:12:1/hl=-1:11:1/grat=dash/col=green/thic=3 b
let b_iin = b[y=@iin]
plot/ov/line/sym=2/si=.1/col=2/thic=2 b_iin
let b_iin_edges = b_iin[gy=aline_edges@asn]
let b_int = IF j[gy=aline_edges] EQ 1 THEN 0 ELSE b_iin_edges[y=@shf:-1]
plot/ov/line/sym=28/si=.1/col=purple/thic=2 b_int
 
! @IIN regridding
let d = b[gy=aline_edges@iin]
plot/ov/line/sym=19/si=.1/col=light/thic=1 d
 
list d
             VARIABLE : B[GY=ALINE_EDGES@IIN]
             SUBSET   : 11 points (Y)
 0    /  1:   0.00
 1    /  2:   1.00
 2    /  3:   2.00
 3    /  4:   3.00
 4    /  5:   4.00
 5    /  6:   5.00
 6    /  7:   6.00
 7    /  8:   7.00
 8    /  9:   8.00
 9    / 10:   9.00
 10   / 11:  10.00
define axis/z=1:2:1 otheraxis
let b2d = b + z[gz=otheraxis]
list b2d[gy=aline_edges@iin]
             VARIABLE : B + Z[GZ=OTHERAXIS]
                        regrid: 1 delta on Y@IIN
             SUBSET   : 11 by 2 points (Y-Z)
             0      1      2      3      4      5      6      7      8      9     10    
             1      2      3      4      5      6      7      8      9     10     11
 1   / 1:   0.00   2.00   4.00   6.00   8.00  10.00  12.00  14.00  16.00  18.00  20.00
 2   / 2:   0.00   3.00   6.00   9.00  12.00  15.00  18.00  21.00  24.00  27.00  30.00
 
 
can view; can var/all
! in Z
 
set win/asp=0.5
set v left
define axis/edge/z=0:10:1 aline
let a = mod(.5+z[gz=aline],2)
plot/step=con/hl=-1:6:1/vl=-1:11:1/grat=dash/col=green/thic=3 a
let a_iin = a[z=@iin]
plot/ov/line/sym=2/si=.1/col=2/thic=2 a_iin
let zlo = zboxlo[gz=a]
define axis/z aline_edges = zcat(zlo[k=1], zboxhi[gz=a])
 
let a_iin_edges = a_iin[gz=aline_edges@asn]
let a_int = IF k[gz=aline_edges] EQ 1 THEN 0 ELSE a_iin_edges[z=@shf:-1]
plot/ov/line/sym=28/si=.1/col=purple/thic=2 a_int
 
 
! @IIN regridding
let c = a[gz=aline_edges@iin]
plot/ov/line/sym=19/si=.1/col=light/thic=1 c
 
set v right
let b = 1+0*a
plot/step=con/hl=-1:12:1/vl=-1:11:1/grat=dash/col=green/thic=3 b
let b_iin = b[z=@iin]
plot/ov/line/sym=2/si=.1/col=2/thic=2 b_iin
let b_iin_edges = b_iin[gz=aline_edges@asn]
let b_int = IF k[gz=aline_edges] EQ 1 THEN 0 ELSE b_iin_edges[z=@shf:-1]
plot/ov/line/sym=28/si=.1/col=purple/thic=2 b_int
 
! @IIN regridding
let d = b[gz=aline_edges@iin]
plot/ov/line/sym=19/si=.1/col=light/thic=1 d
 
list d
             VARIABLE : B[GZ=ALINE_EDGES@IIN]
             SUBSET   : 11 points (Z)
 0    /  1:   0.00
 1    /  2:   1.00
 2    /  3:   2.00
 3    /  4:   3.00
 4    /  5:   4.00
 5    /  6:   5.00
 6    /  7:   6.00
 7    /  8:   7.00
 8    /  9:   8.00
 9    / 10:   9.00
 10   / 11:  10.00
define axis/e=1:2:1 otheraxis
let b2d = b + _e[ge=otheraxis]
list b2d[gz=aline_edges@iin]
             VARIABLE : B + _E[GE=OTHERAXIS]
                        regrid: 1 delta on Z@IIN
             SUBSET   : 11 by 2 points (Z-E)
             0      1      2      3      4      5      6      7      8      9     10    
             1      2      3      4      5      6      7      8      9     10     11
 1   / 1:   0.00   2.00   4.00   6.00   8.00  10.00  12.00  14.00  16.00  18.00  20.00
 2   / 2:   0.00   3.00   6.00   9.00  12.00  15.00  18.00  21.00  24.00  27.00  30.00
 
 
can view; can var/all
! In T
 
set win/asp=0.5
set v left
define axis/edge/t=0:10:1 aline
let a = mod(.5+t[gt=aline],2)
plot/step=con/vl=-1:6:1/hl=-1:11:1/grat=dash/col=green/thic=3 a
let a_iin = a[t=@iin]
plot/ov/line/sym=2/si=.1/col=2/thic=2 a_iin
let tlo = tboxlo[gt=a]
define axis/t aline_edges = tcat(tlo[l=1], tboxhi[gt=a])
 
let a_iin_edges = a_iin[gt=aline_edges@asn]
let a_int = IF l[gt=aline_edges] EQ 1 THEN 0 ELSE a_iin_edges[t=@shf:-1]
plot/ov/line/sym=28/si=.1/col=purple/thic=2 a_int
 
 
! @IIN regridding
let c = a[gt=aline_edges@iin]
plot/ov/line/sym=19/si=.1/col=light/thic=1 c
 
set v right
let b = 1+0*a
plot/step=con/vl=-1:12:1/hl=-1:11:1/grat=dash/col=green/thic=3 b
let b_iin = b[t=@iin]
plot/ov/line/sym=2/si=.1/col=2/thic=2 b_iin
let b_iin_edges = b_iin[gt=aline_edges@asn]
let b_int = IF l[gt=aline_edges] EQ 1 THEN 0 ELSE b_iin_edges[t=@shf:-1]
plot/ov/line/sym=28/si=.1/col=purple/thic=2 b_int
 
! @IIN regridding
let d = b[gt=aline_edges@iin]
plot/ov/line/sym=19/si=.1/col=light/thic=1 d
 
list d
             VARIABLE : B[GT=ALINE_EDGES@IIN]
             SUBSET   : 11 points (T)
 0    /  1:   0.00
 1    /  2:   1.00
 2    /  3:   2.00
 3    /  4:   3.00
 4    /  5:   4.00
 5    /  6:   5.00
 6    /  7:   6.00
 7    /  8:   7.00
 8    /  9:   8.00
 9    / 10:   9.00
 10   / 11:  10.00
define axis/z=1:2:1 otheraxis
let b2d = b + z[gz=otheraxis]
list b2d[gt=aline_edges@iin]
             VARIABLE : B + Z[GZ=OTHERAXIS]
                        regrid: 1 delta on T@IIN
             SUBSET   : 2 by 11 points (Z-T)
               1      2    
               1      2
 0    /  1:   0.00   0.00
 1    /  2:   2.00   3.00
 2    /  3:   4.00   6.00
 3    /  4:   6.00   9.00
 4    /  5:   8.00  12.00
 5    /  6:  10.00  15.00
 6    /  7:  12.00  18.00
 7    /  8:  14.00  21.00
 8    /  9:  16.00  24.00
 9    / 10:  18.00  27.00
 10   / 11:  20.00  30.00
 
 
can view; can var/all
! in E
 
set win/asp=0.5
set v left
define axis/edge/e=0:10:1 aline
let a = mod(.5+_e[ge=aline],2)
plot/step=con/vl=-1:6:1/hl=-1:11:1/grat=dash/col=green/thic=3 a
let a_iin = a[e=@iin]
plot/ov/line/sym=2/si=.1/col=2/thic=2 a_iin
let elo = eboxlo[ge=a]
define axis/e aline_edges = ecat(elo[m=1], eboxhi[ge=a])
 
let a_iin_edges = a_iin[ge=aline_edges@asn]
let a_int = IF _m[ge=aline_edges] EQ 1 THEN 0 ELSE a_iin_edges[e=@shf:-1]
plot/ov/line/sym=28/si=.1/col=purple/thic=2 a_int
 
 
! @IIN regridding
let c = a[ge=aline_edges@iin]
plot/ov/line/sym=19/si=.1/col=light/thic=1 c
 
set v right
let b = 1+0*a
plot/step=con/hl=-1:12:1/vl=-1:11:1/grat=dash/col=green/thic=3 b
let b_iin = b[e=@iin]
plot/ov/line/sym=2/si=.1/col=2/thic=2 b_iin
let b_iin_edges = b_iin[ge=aline_edges@asn]
let b_int = IF _m[ge=aline_edges] EQ 1 THEN 0 ELSE b_iin_edges[e=@shf:-1]
plot/ov/line/sym=28/si=.1/col=purple/thic=2 b_int
 
! @IIN regridding
let d = b[ge=aline_edges@iin]
plot/ov/line/sym=19/si=.1/col=light/thic=1 d
 
list d
             VARIABLE : B[GE=ALINE_EDGES@IIN]
             SUBSET   : 11 points (E)
 0    /  1:   0.00
 1    /  2:   1.00
 2    /  3:   2.00
 3    /  4:   3.00
 4    /  5:   4.00
 5    /  6:   5.00
 6    /  7:   6.00
 7    /  8:   7.00
 8    /  9:   8.00
 9    / 10:   9.00
 10   / 11:  10.00
define axis/z=1:2:1 otheraxis
let b2d = b + z[gz=otheraxis]
list b2d[ge=aline_edges@iin]
             VARIABLE : B + Z[GZ=OTHERAXIS]
                        regrid: 1 delta on E@IIN
             SUBSET   : 2 by 11 points (Z-E)
               1      2    
               1      2
 0    /  1:   0.00   0.00
 1    /  2:   2.00   3.00
 2    /  3:   4.00   6.00
 3    /  4:   6.00   9.00
 4    /  5:   8.00  12.00
 5    /  6:  10.00  15.00
 6    /  7:  12.00  18.00
 7    /  8:  14.00  21.00
 8    /  9:  16.00  24.00
 9    / 10:  18.00  27.00
 10   / 11:  20.00  30.00
 
 
can view; can var/all
! In F
 
set win/asp=0.5
set v left
define axis/edge/f=0:10:1 aline
let a = mod(.5+_f[gf=aline],2)
plot/step=con/vl=-1:6:1/hl=-1:11:1/grat=dash/col=green/thic=3 a
let a_iin = a[f=@iin]
plot/ov/line/sym=2/si=.1/col=2/thic=2 a_iin
let flo = fboxlo[gf=a]
define axis/f aline_edges = fcat(flo[n=1], fboxhi[gf=a])
 
let a_iin_edges = a_iin[gf=aline_edges@asn]
let a_int = IF _n[gf=aline_edges] EQ 1 THEN 0 ELSE a_iin_edges[f=@shf:-1]
plot/ov/line/sym=28/si=.1/col=purple/thic=2 a_int
 
 
! @IIN regridding
let c = a[gf=aline_edges@iin]
plot/ov/line/sym=19/si=.1/col=light/thic=1 c
 
set v right
let b = 1+0*a
plot/step=con/vl=-1:12:1/hl=-1:11:1/grat=dash/col=green/thic=3 b
let b_iin = b[f=@iin]
plot/ov/line/sym=2/si=.1/col=2/thic=2 b_iin
let b_iin_edges = b_iin[gf=aline_edges@asn]
let b_int = IF _n[gf=aline_edges] EQ 1 THEN 0 ELSE b_iin_edges[f=@shf:-1]
plot/ov/line/sym=28/si=.1/col=purple/thic=2 b_int
 
! @IIN regridding
let d = b[gf=aline_edges@iin]
plot/ov/line/sym=19/si=.1/col=light/thic=1 d
 
list d
             VARIABLE : B[GF=ALINE_EDGES@IIN]
             SUBSET   : 11 points (F)
 0    /  1:   0.00
 1    /  2:   1.00
 2    /  3:   2.00
 3    /  4:   3.00
 4    /  5:   4.00
 5    /  6:   5.00
 6    /  7:   6.00
 7    /  8:   7.00
 8    /  9:   8.00
 9    / 10:   9.00
 10   / 11:  10.00
define axis/z=1:2:1 otheraxis
let b2d = b + z[gz=otheraxis]
list b2d[gf=aline_edges@iin]
             VARIABLE : B + Z[GZ=OTHERAXIS]
                        regrid: 1 delta on F@IIN
             SUBSET   : 2 by 11 points (Z-F)
               1      2    
               1      2
 0    /  1:   0.00   0.00
 1    /  2:   2.00   3.00
 2    /  3:   4.00   6.00
 3    /  4:   6.00   9.00
 4    /  5:   8.00  12.00
 5    /  6:  10.00  15.00
 6    /  7:  12.00  18.00
 7    /  8:  14.00  21.00
 8    /  9:  16.00  24.00
 9    / 10:  18.00  27.00
 10   / 11:  20.00  30.00
 
! More examples: scale for world coordinates
 
! longitudes
 
 
define axis/edge/x=0:10:1/units=degrees_east aline
let a = mod(.5+x[gx=aline],2)
define axis/x/like=`a,return=xaxis` aline_edges = box_edges(a)
 !-> define axis/x/like=ALINE aline_edges = box_edges(a)
let a_iin_regrid =  a[gx=aline_edges@iin]
let a_iin = a[x=@iin]
 
list a_iin
             VARIABLE : A[X=@IIN]
             SUBSET   : 10 points (LONGITUDE)
 0.5E /  1:  111195.
 1.5E /  2:  111195.
 2.5E /  3:  222390.
 3.5E /  4:  222390.
 4.5E /  5:  333585.
 5.5E /  6:  333585.
 6.5E /  7:  444780.
 7.5E /  8:  444780.
 8.5E /  9:  555975.
 9.5E / 10:  555975.
list a_iin_regrid
             VARIABLE : A[GX=ALINE_EDGES@IIN]
             SUBSET   : 11 points (LONGITUDE)
 0E    /  1:       0.
 1E    /  2:  111195.
 2E    /  3:  111195.
 3E    /  4:  222390.
 4E    /  5:  222390.
 5E    /  6:  333585.
 6E    /  7:  333585.
 7E    /  8:  444780.
 8E    /  9:  444780.
 9E    / 10:  555975.
 10E   / 11:  555975.
 
use coads_climatology
 
define axis/x/like=`sst,return=xaxis` aline_edges = box_edges(sst[y=0,l=1,x=151:181])
 !-> define axis/x/like=COADSX aline_edges = box_edges(sst[y=0,l=1,x=151:181])
 
 
let sst_iin_regrid = sst[gx=aline_edges@iin]
 
! With cosine(lat) correction
list/l=1 sst[x=151:181@iin,y=0], sst[x=151:181@iin,y=50]
             DATA SET: ./data/coads_climatology.cdf
             LONGITUDE: 151E to 179W (indef. integ.)
             TIME: 16-JAN 06:00
 Column  1: SST[Y=1S] is SEA SURFACE TEMPERATURE (Deg C)(indef. integ. on X)
 Column  2: SST[Y=49N] is SEA SURFACE TEMPERATURE (Deg C)(indef. integ. on X)
                   SST     SST
151E   / 66:  3.270E+06   134587.
153E   / 67:  9.814E+06   416978.
155E   / 68:  1.634E+07   649622.
157E   / 69:  2.283E+07   904310.
159E   / 70:  2.932E+07  1187673.
161E   / 71:  3.580E+07  1558414.
163E   / 72:  4.233E+07  1939608.
165E   / 73:  4.882E+07  2363222.
167E   / 74:  5.528E+07  2835953.
169E   / 75:  6.171E+07  3348395.
171E   / 76:  6.816E+07  3886457.
173E   / 77:  7.452E+07  4436197.
175E   / 78:  8.081E+07  5000771.
177E   / 79:  8.719E+07  5566464.
179E   / 80:  9.346E+07  6161540.
179W   / 81:  9.667E+07  6465711.
list/l=1 sst_iin_regrid[y=0], sst_iin_regrid[y=50]
             DATA SET: ./data/coads_climatology.cdf
             LONGITUDE: 149E to 177W
             TIME: 16-JAN 06:00
 Column  1: SST_IIN_REGRID[Y=1S] is SST[GX=ALINE_EDGES@IIN]
 Column  2: SST_IIN_REGRID[Y=49N] is SST[GX=ALINE_EDGES@IIN]
          SST_IIN_REGR  SST_IIN_REGRID
150E   /  1:  0.000E+00        0.
152E   /  2:  6.540E+06   269173.
154E   /  3:  1.308E+07   551565.
156E   /  4:  1.961E+07   784209.
158E   /  5:  2.610E+07  1038897.
160E   /  6:  3.259E+07  1322260.
162E   /  7:  3.907E+07  1693001.
164E   /  8:  4.560E+07  2074194.
166E   /  9:  5.209E+07  2497809.
168E   / 10:  5.855E+07  2970539.
170E   / 11:  6.498E+07  3482981.
172E   / 12:  7.143E+07  4021043.
174E   / 13:  7.779E+07  4570784.
176E   / 14:  8.408E+07  5135358.
178E   / 15:  9.046E+07  5701051.
180E   / 16:  9.673E+07  6296127.
178W   / 17:  1.031E+08  6904468.
 
! latitudes
 
define axis/edge/y=10:80:10/units=degrees_north aline
let a = y[gy=aline]/10
define axis/y/like=`a,return=yaxis` aline_edges = box_edges(a)
 !-> define axis/y/like=ALINE aline_edges = box_edges(a)
let a_iin_regrid = a[gy=aline_edges@iin]
let a_iin = a[y=@iin]
 
list a_iin
             VARIABLE : A[Y=@IIN]
             SUBSET   : 7 points (LATITUDE)
 75N   / 7:  3.503E+07
 65N   / 6:  2.669E+07
 55N   / 5:  1.946E+07
 45N   / 4:  1.334E+07
 35N   / 3:  8.340E+06
 25N   / 2:  4.448E+06
 15N   / 1:  1.668E+06
list a_iin_regrid
             VARIABLE : A[GY=ALINE_EDGES@IIN]
             SUBSET   : 8 points (LATITUDE)
 80N   / 8:  3.503E+07
 70N   / 7:  2.669E+07
 60N   / 6:  1.946E+07
 50N   / 5:  1.334E+07
 40N   / 4:  8.340E+06
 30N   / 3:  4.448E+06
 20N   / 2:  1.668E+06
 10N   / 1:  0.000E+00
 
! Tests of regrid-to-self regridding
! @iin regridding to the source axis
 
define axis/edge/x=0:10:1 aline
let a = i[gx=aline]
 
! edges axis
define axis/x/like=`a,return=xaxis` aline_edges = box_edges(a)
 !-> define axis/x/like=ALINE aline_edges = box_edges(a)
 
let c = a[gx=aline_edges@iin]
let d = a[gx=aline@iin]
 
! to edges axis
list c
             VARIABLE : A[GX=ALINE_EDGES@IIN]
             SUBSET   : 11 points (X)
 0    /  1:   0.00
 1    /  2:   1.00
 2    /  3:   3.00
 3    /  4:   6.00
 4    /  5:  10.00
 5    /  6:  15.00
 6    /  7:  21.00
 7    /  8:  28.00
 8    /  9:  36.00
 9    / 10:  45.00
 10   / 11:  55.00
 
! to source axis. Pushes result of a @IIN transform up half a cell
list a, d, a[x=@iin]
             X: 0 to 10
 Column  1: A is I[GX=ALINE]
 Column  2: D is A[GX=ALINE@IIN]
 Column  3: A[X=@IIN] is I[GX=ALINE] (indef. integ. on X)
              A     D      A
0.5 /  1:   1.00   0.50   1.00
1.5 /  2:   2.00   2.00   3.00
2.5 /  3:   3.00   4.50   6.00
3.5 /  4:   4.00   8.00  10.00
4.5 /  5:   5.00  12.50  15.00
5.5 /  6:   6.00  18.00  21.00
6.5 /  7:   7.00  24.50  28.00
7.5 /  8:   8.00  32.00  36.00
8.5 /  9:   9.00  40.50  45.00
9.5 / 10:  10.00  50.00  55.00
 
 
def ax/edge/t=1-jan-0001:1-jan-0004:365/unit=day/cal=noleap tax
let one = 1 + 0*t[gt=tax]
list one, one[t=@iin], one[gt=tax@iin]
             TIME: 01-JAN-0001 00:00 to 01-JAN-0004 00:00 NOLEAP
 Column  1: ONE is 1 + 0*T[GT=TAX]
 Column  2: ONE[T=@IIN] is 1 + 0*T[GT=TAX] (indef. integ. on T)
 Column  3: ONE[G=365 day on T@IIN] is 1 + 0*T[GT=TAX] (regrid: 365 day on T@IIN)
                ONE      ONE        ONE
JUL-0001 / 1:  1.000  3.154E+07  1.577E+07
JUL-0002 / 2:  1.000  6.307E+07  4.730E+07
JUL-0003 / 3:  1.000  9.461E+07  7.884E+07
 
! Gridding to an identical second axis, columns 3 and 4 match:
def ax/edge/t=1-jan-0001:1-jan-0004:365/unit=day/cal=noleap tax2
list one, one[t=@iin], one[gt=tax@iin],  one[gt=tax2@iin]
 WARNING: Listed variables have ambiguous coordinates on axes: T
 Column  1: ONE is 1 + 0*T[GT=TAX]
 Column  2: ONE[T=@IIN] is 1 + 0*T[GT=TAX] (indef. integ. on T)
 Column  3: ONE[G=365 day on T@IIN] is 1 + 0*T[GT=TAX] (regrid: 365 day on T@IIN)
 Column  4: ONE[G=365 day on T@IIN] is 1 + 0*T[GT=TAX] (regrid: 365 day on T@IIN)
         ONE      ONE        ONE        ONE
L / 1:  1.000  3.154E+07  1.577E+07  1.577E+07
L / 2:  1.000  6.307E+07  4.730E+07  4.730E+07
L / 3:  1.000  9.461E+07  7.884E+07  7.884E+07
 
! Restore default aspect ratio
set window/aspect=0.75
*** Running ferret script: bn721_bug_fixes.jnl
! bn721_bug_fixes.jnl
! test various fixes that went into version 7.21
! 7/17 *acm*
!
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err72_atts_as_vars
! err72_atts_as_vars.jnl
! See ticket 2555.  Allocation of pointers for these strings
 
use coads_climatology
list sst.attnames[i=1]
             VARIABLE : SST.ATTNAMES[I=1]
             FILENAME : coads_climatology.cdf
             X        : 1
        "missing_value"
 
use coads_climatology
let allatts = sst.attnames
let natts = sst.nattrs
 repeat/range=1:`natts`/name=m (let attname = allatts[i=`m`]; list attname)
 !-> repeat/range=1:5/name=m (let attname = allatts[i=`m`]; list attname)
!-> REPEAT: M:1
 !-> DEFINE VARIABLE attname = allatts[i=1]
             VARIABLE : ALLATTS[I=1]
             FILENAME : coads_climatology.cdf
             X        : 1
        "missing_value"
!-> REPEAT: M:2
 !-> DEFINE VARIABLE attname = allatts[i=2]
             VARIABLE : ALLATTS[I=2]
             FILENAME : coads_climatology.cdf
             X        : 2
        "_FillValue"
!-> REPEAT: M:3
 !-> DEFINE VARIABLE attname = allatts[i=3]
             VARIABLE : ALLATTS[I=3]
             FILENAME : coads_climatology.cdf
             X        : 3
        "long_name"
!-> REPEAT: M:4
 !-> DEFINE VARIABLE attname = allatts[i=4]
             VARIABLE : ALLATTS[I=4]
             FILENAME : coads_climatology.cdf
             X        : 4
        "history"
!-> REPEAT: M:5
 !-> DEFINE VARIABLE attname = allatts[i=5]
             VARIABLE : ALLATTS[I=5]
             FILENAME : coads_climatology.cdf
             X        : 5
        "units"
 
! Bug also applied to getting dimnames
list sst.dimnames[i=2:3]
             VARIABLE : SST.DIMNAMES[I=2:3]
             FILENAME : coads_climatology.cdf
             SUBSET   : 2 points (X)
 2   / 2:"COADSY"
 3   / 3:"TIME"  
 
let dnames = sst.dimnames
list dnames[i=2]
             VARIABLE : SST.DIMNAMES
             FILENAME : coads_climatology.cdf
             X        : 2
        "COADSY"
 
! lots of global attributes
use err491_attval
list ..attnames[i=20:23]
             VARIABLE : ..ATTNAMES[I=20:23]
             DATA SET : K-Bay OAR3d model (200m)
             FILENAME : err491_attval.cdf
             SUBSET   : 4 points (X)
 20   / 20:"ny"   
 21   / 21:"x_min"
 22   / 22:"x_max"
 23   / 23:"y_min"
 
 
let gattnames = ..attnames
list gattnames[i=1:10]
             VARIABLE : ..ATTNAMES
             DATA SET : K-Bay OAR3d model (200m)
             FILENAME : err491_attval.cdf
             SUBSET   : 10 points (X)
 1    /  1:"simulation" 
 2    /  2:"start_date" 
 3    /  3:"history"    
 4    /  4:"option"     
 5    /  5:"run_mode"   
 6    /  6:"srfc_bndry" 
 7    /  7:"rad_penet"  
 8    /  8:"dt_external"
 9    /  9:"dt_internal"
 10   / 10:"horiz_diff" 
 
list gattnames[i=1:24:2]
             VARIABLE : ..ATTNAMES
                        regrid: 2 delta on X
             DATA SET : K-Bay OAR3d model (200m)
             FILENAME : err491_attval.cdf
             SUBSET   : 12 points (X)
 1    /  1:"simulation" 
 3    /  2:"history"    
 5    /  3:"run_mode"   
 7    /  4:"rad_penet"  
 9    /  5:"dt_internal"
 11   /  6:"inv_prandtl"
 13   /  7:"title"      
 15   /  8:"remark"     
 17   /  9:"y_units"    
 19   / 10:"nx"         
 21   / 11:"x_min"      
 23   / 12:"y_min"      
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err72_sum_in_x
! err72_sum_in_x.jnl
! ticket 2560, sum in X direcgtion when result is 0
! returne a missing-value
 
! Previously this result was missing
let var = {-1,1,0}
list var[x=@sum]
             VARIABLE : {-1,1,0}
             X        : 0.5 to 3.5 (summed)
          0.0000
 
! This was correct, 0
let yvar = ysequence(var)
list yvar[j=@sum]
             VARIABLE : YSEQUENCE(VAR)
             Y        : 0.5 to 3.5 (summed)
          0.0000
 
*** Running ferret script: bn722_bug_fixes.jnl
! bn721_bug_fixes.jnl
! test various fixes that went into version 7.22
! 9/17 *acm*
!
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err721_dynamic_gather
! err72_dynamic_gather.jnl
! 9/25/2017 Ticket 2561
!  6/19, code changes for SET MEM in terms of Mbytes. But
!  here, the SET MEMORY commands are done in terms of megawords,
!  as we're thinking of grid sizes
 
! Combination of two transforms, and split/gather ops
 
cancel data/all
cancel memory
DEFINE SYMBOL saved_memory_size = ($FERRET_BYTES_MEM)
 !-> DEFINE SYMBOL saved_memory_size = 250Mb
 
! dataset from bn_dynamic_gather.jnl
use tmp/test_dyn_mem.nc
 
! w/ default amount of memory this doesn't need a split-gather
! This result is correct
list/nohead v1000[x=@ave,y=@ave,k=@sum,L=@sum]
          2236000.
show memory/diag
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 497
    Un-cached variables: 0
    SET MEMORY/MAX: 250 Mb   (31.25 megawords)
    Peak demand: 32.06 Mb
    Current cache: 32.06 Mb
 
! Now use smaller memory, so it'll split/gather in the T
! direction. The answer in v7.2 was wrong.
cancel memory
set mem/siz=10
list/nohead v1000[x=@ave,y=@ave,k=@sum,L=@sum]
          2236000.
show memory/diag
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 497
    Un-cached variables: 0
    SET MEMORY/MAX: 80 Mb   (10 megawords)
    Peak demand: 32.06 Mb
    Current cache: 32.06 Mb
 
! With an even smaller amount of memory, a different
! incorrect result was listed with v7.2.
cancel memory
set mem/siz=1
list/nohead v1000[x=@ave,y=@ave,k=@sum,L=@SUM]
          2236000.
sh mem/diag
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        V1000          T     AV4       173           1
    Total table slots: 500
    Free table slots: 495
    Un-cached variables: 0
    SET MEMORY/MAX: 8 Mb   (1000000 words)
    Peak demand: 5.58 Mb
    Current cache: 4.37 Mb
 
! clean up
SET MEMORY/SIZE=($saved_memory_size)
 !-> SET MEMORY/SIZE=250Mb
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err721_polymark_log
 
! err721_polymark_log.jnl
! Ticket 2562, polymark and other polygons over log axis.
! 9/26/17 ACM
 
let frqs = {0.01,0.011,0.012,0.013,0.014,0.015,0.025,0.026,0.027,0.028,\
0.029,0.03,0.031,0.032,0.033,0.08,0.108,0.135,0.193,0.194,0.195,0.196,\
0.197,0.227,0.228,0.229,0.255,0.256,0.31,0.311,0.312,0.362,0.363,0.364}
 
let phas = {61.099,68.796,79.686,80.292, 104.212, 121.192,93.757,\
102.549,115.240,112.831,103.433,102.032,105.109,104.216,93.173,-7.041,\
-133.985,-162.018,161.157,154.128,146.717,140.252,132.944,-29.014,\
-34.848,-38.376,-109.836,-119.620,12.858,17.047,22.327,-167.776,-169.991,-165.467}
 
! Plots with /HLOG
set v ul
plot/hlog/vs/vlim=-180:180:45/nolabs/hlim=0.001:0.1 frqs,phas
go polymark poly/hlog/over/nolabs/nokey/line/pal=red frqs, phas 1 square 0.6
 
 
! more dynamic range
set v ur
let frq2 = XCAT(frqs, 10*frqs)
let phas2 = XCAT(phas,phas)
plot/hlog/vs/vlim=-180:180:45/nolabs frq2, phas2
go polymark poly/hlog/over/nolabs/nokey/line/pal=green frq2, phas2 1 delta 0.8
 
 
! more decades still
set v ll
let var3 = XCAT(0.1*frqs, frq2)
let phas3 = XCAT(phas,phas2)
plot/hlog/vs/vlim=-180:180:45/nolabs var3, phas3
go polymark poly/hlog/over/nolabs/nokey/line/pal=purple_light var3, phas3 1 star 1.1
 
 
! /VLOG
set v lr
plot/vlog/vs/hlim=-180:180:45/nolabs phas3, var3
go polymark poly/vlog/over/nolabs/nokey/line/pal=blue_light phas3, var3 1 circle 0.7
 
 
! Note /VLOG/HLOG together make a blank plot. Not worrying about that now.
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err721_letd_with_grave
! err721_letd_with_grave
! 10/6/17 ACM
! See ticket 2563. Error parsing the grave-accent expr
! because of the quotes around datset path and name.
 
use "data/proleptic_gregorian.nc"
 
! This is fine
let/d="data/proleptic_gregorian.nc" var1 = my_data + 1
 
! This resulted in an error
let/d="data/proleptic_gregorian.nc" var2 = my_data - `my_data[L=@ave]`
 !-> DEFINE VARIABLE/DATA="data/proleptic_gregorian.nc" var2 = my_data - 0.01335748549900018
show data
     currently SET data sets:
    1> data/proleptic_gregorian.nc  (default)
 name     title                             I         J         K         L
 MY_DATA  SIN(L[GT=TDAYS])                 ...       ...       ...       1:32
 ------------------------------
 VAR2[D=proleptic_gregorian] = MY_DATA - 0.01335748549900018
 VAR1[D=proleptic_gregorian] = MY_DATA + 1
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err721_color_levels
! err721_color_levels
! 10/11/2017 ACM
! Ticket 2564, setting up color palette and levels for the second
! plot caused a STOP in PyFerret or in Ferret the gks error message
!    gsetcolourrep()   96 Colour is outside range [0,1]
 
 
let fcn = 0.5*COS(J[j=1:100]/30)+SIN(K[k=1:100]/20)
fill/pal=land_sea_values/lev=vc 7000*fcn
 
fill/pal=ocean_temp_bounds/lev=(-2,35,2) 18.5*fcn
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err721_dup_labels
! err721_dup_labels.jnl
! ticket 2565
! 10/13/17 ACM
!  2/18 *acm* keep mode logo turned off
 
set mode logo
use err721_dup_labels.nc
 
! Draw time plot
plot new_val
ppl list labels
 @ACRESHAPE(V,XTMS)                                                             
                                                                                
                                                                                

          XPOS       YPOS     HGT   ROT   UNITS
 LAB 1  8.000E+00  7.200E+00 0.060    0  SYSTEM  @ASFERRET  Ver.7.6
 LINE PT:    0.000E+00 0.000E+00  NO LINE     CENTER JUSTIFY LABEL
 LAB 2  8.000E+00  7.100E+00 0.060    0  SYSTEM  @ASNOAA/PMEL TMAP
 LINE PT:    0.000E+00 0.000E+00  NO LINE     CENTER JUSTIFY LABEL
 LAB 3  8.000E+00  7.000E+00 0.060    0  SYSTEM  @ASDD-MON-YYYY HH:MM:SS
 LINE PT:    0.000E+00 0.000E+00  NO LINE     CENTER JUSTIFY LABEL
 LAB 4  8.000E+00  6.630E+00 0.120    0  SYSTEM  @ASDATA SET: err721_dup_labels
 LINE PT:    0.000E+00 0.000E+00  NO LINE     RIGHT  JUSTIFY LABEL
 
! Overlay plots should add only the new labels needed. Ferret has
! always redrawn them all, which was harmless. Now, only draw the
! ones needed for each new /overlay
 
plot/over/vs/line/color=green/title="deployment mean"  {284.375, 285.5}, {3472.8, 3472.8}
ppl list labels
                                                                                
 @AS{284.375, 285.5}                                                            
                                                                                

          XPOS       YPOS     HGT   ROT   UNITS
 LAB 1 -4.700E-01 -5.500E-01 0.080    0  SYSTEM  @ASdeployment mean
 LINE PT:    0.000E+00 0.000E+00  NO LINE     LEFT   JUSTIFY LABEL
plot/over/vs/line/color=red/title="HC mean"  {284.375, 285.5}, {3472.9, 3472.9}
ppl list labels
                                                                                
 @AS{284.375, 285.5}                                                            
                                                                                

          XPOS       YPOS     HGT   ROT   UNITS
 LAB 1 -4.700E-01 -7.300E-01 0.080    0  SYSTEM  @ASHC mean
 LINE PT:    0.000E+00 0.000E+00  NO LINE     LEFT   JUSTIFY LABEL
plot/over/vs/line/color=purple/nolab {284.42, 284.42}, {3472.6, 3473.1}
 
! This caused labels below the plot way over to the right by the line
plot/over/vs/line/color=purple/title="purple" {285.4, 285.4}, {3472.6, 3473.1}
ppl list labels
                                                                                
 @AS{285.4, 285.4}                                                              
                                                                                

          XPOS       YPOS     HGT   ROT   UNITS
 LAB 1 -4.700E-01 -9.100E-01 0.080    0  SYSTEM  @ASpurple
 LINE PT:    0.000E+00 0.000E+00  NO LINE     LEFT   JUSTIFY LABEL
 
set mode/last logo
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err721_plotuv
! err721_plotuv.jnl
! Ticket 2566: text size of zero causes graphics library errors
!
 
if ($program_name"0|PyFerret>1|*>0") then set text/font=arial
 !-> if 0 then set text/font=arial
 
! In PyFerret with -nodisplay a Cairo error on the zero-length
! text size caused an ERROR and exit. Without -nodisplay it
! issued errors and used some nominal size
 
use coads_climatology
let uwnd = sst
let vwnd = -1*sst
 
plot/set/x=180/y=0 uwnd,vwnd
ppl axlsze,0,0
ppl plotuv 0,1
 
if ($program_name"0|PyFerret>1|*>0") then cancel text
 !-> if 0 then cancel text
 
! Restore the default
ppl axlsze,0.1,0.1
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err721_ascii_size
! err721_ascii_size.jnl
! ACM 10/25/2017  Ticket 2567
! Initializing an EZ dataset mis-counts the size until data is loaded
 
file/var="t1,t2"/skip=1 err721_ascii_size.dat
show data
     currently SET data sets:
    1> ./data/err721_ascii_size.dat  (default)
 name     title                             I         J         K         L
 T1       t1                               1:3       ...       ...       ...
 T2       t2                               1:3       ...       ...       ...
 
say `t1,return=iend`
 !-> MESSAGE/CONTINUE 3
3
load t1
say `t1,return=iend`
 !-> MESSAGE/CONTINUE 3
3
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err721_dot_grid
! err721_dot_grid
 
!!!! using dot_t(v1,v2) works fine
 
def axis /X=1.0:3.0:1.0 xaxis
def axis /T=0.0:59.75:0.25 taxis_dc
def grid /X=xaxis /T=taxis_dc xtgrid
set grid xtgrid
let v1 = X * sin(T)
let v2 = X * cos(T)
let dp = dot_t(v1,v2)
 
show grid dp
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAXIS     X                    3 r   1                    3                   full
 normal    Y
 normal    Z
 normal    T
 
list dp
             VARIABLE : DOT_T(V1,V2)
             SUBSET   : 3 points (X)
 1   / 1:  0.0368
 2   / 2:  0.1471
 3   / 3:  0.3310
 
can var /all
set grid abstract
can grid xtgrid
can axis xaxis
can axis taxis_dc
 
!!!! using dot(v1,v2,4) gives the correct results
 
def axis /X=1.0:3.0:1.0 xaxis
def axis /T=0.0:59.75:0.25 taxis_dc
def grid /X=xaxis /T=taxis_dc xtgrid
set grid xtgrid
let v1 = X * sin(T)
let v2 = X * cos(T)
let dp = dot(v1,v2,4)
 
! It would be nice if this showed the right grid with NO t axis.
show grid dp
    GRID XTGRID
 name       axis              # pts   start                end                 subset
 XAXIS     X                    3 r   1                    3                   full
 normal    Y
 normal    Z
 TAXIS_DC  T                  240 r   0                    59.75               full
list dp
             VARIABLE : DOT(V1,V2,4)
             SUBSET   : 3 points (X)
 1   / 1:  0.0368
 2   / 2:  0.1471
 3   / 3:  0.3310
 
! but, at least cancel axis taxis_dc is ok
! Previously the "can axis taxis_dc" failed.
can var /all
set grid abstract
can grid xtgrid
can axis xaxis
can axis taxis_dc
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err721_stride_size
! err721_stride_size.jnl
! SHOW DATA and RETURN=isize were
! not updated with new size on a SET AXIS/STRIDE
! *ACM* 11/29/2017 github issue 1843
 
use coads_climatology
set axis/stride=5 `sst,return=xaxis`
 !-> set axis/stride=5 COADSX
 
! Should show new size for x axis
show grid sst
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 (AX###)   LONGITUDE           36mr   21E                  11E(371)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
say `sst,return=isize`
 !-> MESSAGE/CONTINUE 36
36
 
! Restore axis, back to size 180
cancel axis/stride `sst,return=xaxis`
 !-> cancel axis/stride (AX###)
show grid sst
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
say `sst,return=isize`
 !-> MESSAGE/CONTINUE 180
180
 
! Irregular axis
 
USE truemonth.nc
say `var,return=lsize`
 !-> MESSAGE/CONTINUE 239
239
SET AXIS/STRIDE=12/OFFSET=0 `var,return=taxis`  ! every January
 !-> SET AXIS/STRIDE=12/OFFSET=0 TRUEMONTH
LIST var
             VARIABLE : COS(T[GT=TRUEMONTH]/100)
             FILENAME : truemonth.nc
             SUBSET   : 20 points (TIME)
 16-JAN-1950 /  1:  0.8459
 16-JAN-1951 /  2: -0.4792
 16-JAN-1952 /  3: -0.0086
 16-JAN-1953 /  4:  0.5030
 16-JAN-1954 /  5: -0.8601
 16-JAN-1955 /  6:  0.9996
 16-JAN-1956 /  7: -0.8863
 16-JAN-1957 /  8:  0.5404
 16-JAN-1958 /  9: -0.0625
 16-JAN-1959 / 10: -0.4313
 16-JAN-1960 / 11:  0.8159
 16-JAN-1961 / 12: -0.9952
 16-JAN-1962 / 13:  0.9170
 16-JAN-1963 / 14: -0.6068
 16-JAN-1964 / 15:  0.1432
 16-JAN-1965 / 16:  0.3660
 16-JAN-1966 / 17: -0.7727
 16-JAN-1967 / 18:  0.9840
 16-JAN-1968 / 19: -0.9463
 16-JAN-1969 / 20:  0.6618
say `var,return=lsize`
 !-> MESSAGE/CONTINUE 20
20
 
can axis/stride `var,return=taxis`
 !-> can axis/stride (AX###)
sh grid var
    GRID GRZ1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 TRUEMONTH TIME               239 i   16-JAN-1950 12:00    16-NOV-1969 00:00   full
SET AXIS/STRIDE=12/OFFSET=2 `var,return=taxis`  ! every March
 !-> SET AXIS/STRIDE=12/OFFSET=2 TRUEMONTH
say `var,return=lsize`
 !-> MESSAGE/CONTINUE 22
22
list var
             VARIABLE : COS(T[GT=TRUEMONTH]/100)
             FILENAME : truemonth.nc
             SUBSET   : 20 points (TIME)
 16-MAR-1950 /  1:  0.4061
 16-MAR-1951 /  2:  0.0901
 16-MAR-1952 /  3: -0.5718
 16-MAR-1953 /  4:  0.8988
 16-MAR-1954 /  5: -0.9985
 16-MAR-1955 /  6:  0.8456
 16-MAR-1956 /  7: -0.4700
 16-MAR-1957 /  8: -0.0191
 16-MAR-1958 /  9:  0.5034
 16-MAR-1959 / 10: -0.8603
 16-MAR-1960 / 11:  0.9999
 16-MAR-1961 / 12: -0.8814
 16-MAR-1962 / 13:  0.5400
 16-MAR-1963 / 14: -0.0620
 16-MAR-1964 / 15: -0.4407
 16-MAR-1965 / 16:  0.8219
 16-MAR-1966 / 17: -0.9952
 16-MAR-1967 / 18:  0.9168
 16-MAR-1968 / 19: -0.5985
 16-MAR-1969 / 20:  0.1328
say `var,return=lsize`
 !-> MESSAGE/CONTINUE 22
22
 
*** Running ferret script: bn_tseries_modulo.jnl
! bn_tseries_modulo.jnl
!  9/2017 TSERIES aggregations
!
! If a time axis lies within year 0 or year 1 they are seen by ferret
! as modulo. For a tseries aggregation, if the entire aggregated axis
! is still modulo, then mark it as such, but otherwise it is not modulo.
!
! The time axes for these files both lie within year 0.
! The aggregation has a modulo time axis.
 
tseries heat_0a.nc, heat_0b.nc
show grid total_ocean_sens_heat
    GRID GNP1
 name       axis              # pts   start                end                 subset
 SCALAR_AXIS LONGITUDE          1 r   0E                   0E                  full
 normal    Y
 normal    Z
 TIME      TIME                 7mi   16-JAN 12:00         16-NOV 00:00        full
 
! The file heat_01 lies in year 1 so the total TSERIES length is longer than a year.
 
can dat/all
tseries heat_0a.nc, heat_0b.nc, heat_01.nc
show grid total_ocean_sens_heat
    GRID GNP1
 name       axis              # pts   start                end                 subset
 SCALAR_AXIS LONGITUDE          1 r   0E                   0E                  full
 normal    Y
 normal    Z
 TIME      TIME                19 i   16-JAN-0000 12:00    16-DEC-0002 12:00   full
 
! Here is the example reported by Russ Fiedler, 9/5/17, on the Ferret list.
! A file in year 1 and a file in year 2 were previously made into a 24-month
! axis which was marked as modulo.
 
can dat/all
tseries heat_00.nc, heat_01.nc
show grid total_ocean_sens_heat
    GRID GDA1
 name       axis              # pts   start                end                 subset
 SCALAR_AXIS LONGITUDE          1 r   0E                   0E                  full
 normal    Y
 normal    Z
 TIME      TIME                24 i   16-JAN-0001 12:00    16-DEC-0002 12:00   full
 
 
! What happens with files that are members of our descriptor examples?
! (coads_clim.003 needed changing to have the same time-axis name)
 
tseries coads_clim_irreg = coads_clim.001, coads_clim.003
show grid sst
    GRID GMU1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME1     TIME                 4mi   16-JAN 06:00         16-JUN 10:25        full
list/x=180/y=0 sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_clim_irreg
             SUBSET   : 4 points (TIME)
             LONGITUDE: 179E
             LATITUDE : 1S
                   179E   
                    80
 16-JAN      / 1:  28.20
 15-FEB      / 2:  28.36
 16-MAY      / 3:  28.49
 16-JUN      / 4:  28.32
 
! This descriptor file lists the same datasets, which each contain two
! timesteps, but it lists S_START = S_END on the second set so it reads
! just one timestep from coads_clim.003
 
! The descriptor-file code does not mark the axis as modulo.
! (Not changing this at this time.)
 
can data/all
use coads_clim_irreg.des
show grid sst
    GRID GJR1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME1     TIME                 3 i   16-JAN-1900 06:00    17-MAY-1900 23:56   full
list/x=180/y=0 sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             DATA SET : COAD
             FILENAME : coads_clim_irreg.des
             SUBSET   : 3 points (TIME)
             LONGITUDE: 179E
             LATITUDE : 1S
                   179E   
                    80
 16-JAN-1900 / 1:  28.20
 15-FEB-1900 / 2:  28.36
 17-MAY-1900 / 3:  28.49
*** Running ferret script: bn_huge_axis.jnl
! bn_huge_axis
! 9/14/17  Dynamic coordinate storage
! Defining extra-long coordinate axes, and save to a file
! Use a dataset with extra-long coordinate axis.
 
! Previously this would have given a program-limit-reached error
let yy = if y[j=1:900000] eq 10 then 10.1 else  y[j=1:900000]
define axis/y longyax = yy
 
let/bad=0 var = y[gy=longyax]
 
list/j=5:15 var
             VARIABLE : Y[GY=LONGYAX]
             SUBSET   : 11 points (Y)
 5     /  5:   5.00
 6     /  6:   6.00
 7     /  7:   7.00
 8     /  8:   8.00
 9     /  9:   9.00
 10.1  / 10:  10.10
 11    / 11:  11.00
 12    / 12:  12.00
 13    / 13:  13.00
 14    / 14:  14.00
 15    / 15:  15.00
save/clobber/file=a.nc/outtype=int var
 
! Previously issued a limit-on-storage-for-coordinates error
can var/all
can axis longyax
 
use a
show dat
     currently SET data sets:
    1> ./a.nc  (default)
 name     title                             I         J         K         L
 VAR      Y[GY=LONGYAX]                    ...       1:900000  ...       ...
 
list/j=5:15 var
             VARIABLE : Y[GY=LONGYAX]
             FILENAME : a.nc
             SUBSET   : 11 points (Y)
 5     /  5:   5.00
 6     /  6:   6.00
 7     /  7:   7.00
 8     /  8:   8.00
 9     /  9:   9.00
 10.1  / 10:  10.00
 11    / 11:  11.00
 12    / 12:  12.00
 13    / 13:  13.00
 14    / 14:  14.00
 15    / 15:  15.00
list/j=899995:9000000 var
             VARIABLE : Y[GY=LONGYAX]
             FILENAME : a.nc
             SUBSET   : 6 points (Y)
 899995   / 899995:  899995.
 899996   / 899996:  899996.
 899997   / 899997:  899997.
 899998   / 899998:  899998.
 899999   / 899999:  899999.
 900000   / 900000:  900000.
 
! clean up. Remove our huge file
cancel data/all
sp rm a.nc
*** Running ferret script: bn_save_as_global.jnl
! bn_save_asglobal
! 11/2017
!  6/18 add tests for writing scalar numeric variables
! Simple command to save a variable as a global attribute.
! Works on an existing or a new file.
 
! Write to a new file.  Gets the default global attributes.
 
can mode upcase
let my_extra_attribute = "Extra attribute: This file is just attributes to start with"
save/asglobal/clobber/file=a.nc my_extra_attribute
sp ncdump -h a.nc
netcdf a {

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
		:my_extra_attribute = "Extra attribute: This file is just attributes to start with" ;
}
 
! Or write new attributes to a file that has data
 
use coads_climatology
save/clobber/file=a.nc sst[x=150:170,y=0:10]
let my_extra_attribute = "Extra attribute: Adding to a file with existing data and attributes"
save/asglobal/append/file=a.nc my_extra_attribute
 
let my_num_att = 12.56
save/asglobal/append/file=a.nc my_num_att
sp ncdump -h a.nc
netcdf a {
dimensions:
	COADSX = 10 ;
	COADSY = 5 ;
	TIME = UNLIMITED ; // (3 currently)
variables:
	double COADSX(COADSX) ;
		COADSX:units = "degrees_east" ;
		COADSX:modulo = " " ;
		COADSX:point_spacing = "even" ;
		COADSX:axis = "X" ;
		COADSX:standard_name = "longitude" ;
	double COADSY(COADSY) ;
		COADSY:units = "degrees_north" ;
		COADSY:point_spacing = "even" ;
		COADSY:axis = "Y" ;
		COADSY:standard_name = "latitude" ;
	double TIME(TIME) ;
		TIME:units = "hour since 0000-01-01 00:00:00" ;
		TIME:time_origin = "01-JAN-0000 00:00:00" ;
		TIME:modulo = " " ;
		TIME:axis = "T" ;
		TIME:standard_name = "time" ;
	float SST(TIME, COADSY, COADSX) ;
		SST:missing_value = -1.e+34f ;
		SST:_FillValue = -1.e+34f ;
		SST:long_name = "SEA SURFACE TEMPERATURE" ;
		SST:history = "From coads_climatology" ;
		SST:units = "Deg C" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
		:my_extra_attribute = "Extra attribute: Adding to a file with existing data and attributes" ;
		:my_num_att = 12.56 ;
}
 
! Create an attribute from a file variable
 
use maize_1
save/append/file=a.nc/j=4/outtype=float/asglobal maize_yield
sp ncdump -h a.nc
netcdf a {
dimensions:
	COADSX = 10 ;
	COADSY = 5 ;
	TIME = UNLIMITED ; // (3 currently)
variables:
	double COADSX(COADSX) ;
		COADSX:units = "degrees_east" ;
		COADSX:modulo = " " ;
		COADSX:point_spacing = "even" ;
		COADSX:axis = "X" ;
		COADSX:standard_name = "longitude" ;
	double COADSY(COADSY) ;
		COADSY:units = "degrees_north" ;
		COADSY:point_spacing = "even" ;
		COADSY:axis = "Y" ;
		COADSY:standard_name = "latitude" ;
	double TIME(TIME) ;
		TIME:units = "hour since 0000-01-01 00:00:00" ;
		TIME:time_origin = "01-JAN-0000 00:00:00" ;
		TIME:modulo = " " ;
		TIME:axis = "T" ;
		TIME:standard_name = "time" ;
	float SST(TIME, COADSY, COADSX) ;
		SST:missing_value = -1.e+34f ;
		SST:_FillValue = -1.e+34f ;
		SST:long_name = "SEA SURFACE TEMPERATURE" ;
		SST:history = "From coads_climatology" ;
		SST:units = "Deg C" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
		:my_extra_attribute = "Extra attribute: Adding to a file with existing data and attributes" ;
		:my_num_att = 12.56 ;
		:MAIZE_YIELD = 0.05408529f, 0.1875f, -0.04314715f, 9.96921e+36f ;
}
 
! A second write of the same attribute overwrites the attribute values
! (append here is saying dont start a new file)
 
save/append/file=a.nc/j=5/outtype=float/asglobal maize_yield
sp ncdump -h a.nc
netcdf a {
dimensions:
	COADSX = 10 ;
	COADSY = 5 ;
	TIME = UNLIMITED ; // (3 currently)
variables:
	double COADSX(COADSX) ;
		COADSX:units = "degrees_east" ;
		COADSX:modulo = " " ;
		COADSX:point_spacing = "even" ;
		COADSX:axis = "X" ;
		COADSX:standard_name = "longitude" ;
	double COADSY(COADSY) ;
		COADSY:units = "degrees_north" ;
		COADSY:point_spacing = "even" ;
		COADSY:axis = "Y" ;
		COADSY:standard_name = "latitude" ;
	double TIME(TIME) ;
		TIME:units = "hour since 0000-01-01 00:00:00" ;
		TIME:time_origin = "01-JAN-0000 00:00:00" ;
		TIME:modulo = " " ;
		TIME:axis = "T" ;
		TIME:standard_name = "time" ;
	float SST(TIME, COADSY, COADSX) ;
		SST:missing_value = -1.e+34f ;
		SST:_FillValue = -1.e+34f ;
		SST:long_name = "SEA SURFACE TEMPERATURE" ;
		SST:history = "From coads_climatology" ;
		SST:units = "Deg C" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
		:my_extra_attribute = "Extra attribute: Adding to a file with existing data and attributes" ;
		:my_num_att = 12.56 ;
		:MAIZE_YIELD = 0.02854787f, 0.02296161f, 0.02589183f, 0.01891576f ;
}
 
! Allow for various /OUTTYPE as in any SAVE command
let another = {1, 2, 3.1}
save/append/file=a.nc/outtype=INT/asglobal another
 
let negnum = -123.4
save/append/file=a.nc/outtype=INT/asglobal negnum
sp ncdump -h a.nc
netcdf a {
dimensions:
	COADSX = 10 ;
	COADSY = 5 ;
	TIME = UNLIMITED ; // (3 currently)
variables:
	double COADSX(COADSX) ;
		COADSX:units = "degrees_east" ;
		COADSX:modulo = " " ;
		COADSX:point_spacing = "even" ;
		COADSX:axis = "X" ;
		COADSX:standard_name = "longitude" ;
	double COADSY(COADSY) ;
		COADSY:units = "degrees_north" ;
		COADSY:point_spacing = "even" ;
		COADSY:axis = "Y" ;
		COADSY:standard_name = "latitude" ;
	double TIME(TIME) ;
		TIME:units = "hour since 0000-01-01 00:00:00" ;
		TIME:time_origin = "01-JAN-0000 00:00:00" ;
		TIME:modulo = " " ;
		TIME:axis = "T" ;
		TIME:standard_name = "time" ;
	float SST(TIME, COADSY, COADSX) ;
		SST:missing_value = -1.e+34f ;
		SST:_FillValue = -1.e+34f ;
		SST:long_name = "SEA SURFACE TEMPERATURE" ;
		SST:history = "From coads_climatology" ;
		SST:units = "Deg C" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
		:my_extra_attribute = "Extra attribute: Adding to a file with existing data and attributes" ;
		:my_num_att = 12.56 ;
		:MAIZE_YIELD = 0.02854787f, 0.02296161f, 0.02589183f, 0.01891576f ;
		:another = 1, 2, 3 ;
		:negnum = -123 ;
}
 
 
! Intentional errors
set mode ignore
set data 1
 
! String attributes may only be single-valued
let multistring = {"a", "b", "c", "", "e"}
save/asglobal/append/file=a.nc multistring
 
! Refuse to write multi-dimensioned attributes y-t
save/append/asglobal/x=150/outtype=float/file=a.nc sst
 
! Also arbitrarily refuse to write more than a list of 100 values.
set mode ignore
save/append/asglobal/y=10/L=2/outtype=float/file=a.nc sst
 
set mode /last upcase
*** Running ferret script: bn74_bug_fixes.jnl
! bn74_bug_fixes.jnl
! test various fixes that went into version 7.4
! 11/17 *acm*
!
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err73_packed_user_var
! err73_packed_user_var.jnl
! 12/4/2017 acm
! Issue # 1846
! Writing packed user-variable data correctly to netCDF
 
 
use coads_climatology
 
! Define a user variable
let myvar = sst*1.12
list/l=1/y=0/x=37:51 myvar
             VARIABLE : SST*1.12
             FILENAME : coads_climatology.cdf
             SUBSET   : 8 points (LONGITUDE)
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
               1S    
               45
 37E   /  9:   ....
 39E   / 10:   ....
 41E   / 11:  30.13
 43E   / 12:  29.68
 45E   / 13:  29.80
 47E   / 14:  30.29
 49E   / 15:  30.25
 51E   / 16:  30.50
 
! Want to pack it and write as short
set var/outtype=short/bad=-30000 myvar
define attribute/output myvar.scale_factor = 0.001
define attribute/output myvar.offset = -50
 
! previously caused an error, Numeric conversion not representable
save/clobber/file=a.nc/l=1/y=0/x=37:51 myvar
 
! Check the values in the file
sp ncdump a.nc
netcdf a {
dimensions:
	COADSX9_16 = 8 ;
	COADSY45_45 = 1 ;
	TIME = UNLIMITED ; // (1 currently)
variables:
	double COADSX9_16(COADSX9_16) ;
		COADSX9_16:units = "degrees_east" ;
		COADSX9_16:modulo = " " ;
		COADSX9_16:point_spacing = "even" ;
		COADSX9_16:axis = "X" ;
		COADSX9_16:standard_name = "longitude" ;
	double COADSY45_45(COADSY45_45) ;
		COADSY45_45:units = "degrees_north" ;
		COADSY45_45:point_spacing = "even" ;
		COADSY45_45:axis = "Y" ;
		COADSY45_45:standard_name = "latitude" ;
	double TIME(TIME) ;
		TIME:units = "hour since 0000-01-01 00:00:00" ;
		TIME:time_origin = "01-JAN-0000 00:00:00" ;
		TIME:modulo = " " ;
		TIME:axis = "T" ;
		TIME:standard_name = "time" ;
	short MYVAR(TIME, COADSY45_45, COADSX9_16) ;
		MYVAR:missing_value = -30000s ;
		MYVAR:_FillValue = -30000s ;
		MYVAR:long_name = "SST*1.12" ;
		MYVAR:scale_factor = 0.001f ;
		MYVAR:offset = -50.f ;
		MYVAR:history = "From coads_climatology" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
data:

 COADSX9_16 = 37, 39, 41, 43, 45, 47, 49, 51 ;

 COADSY45_45 = -1 ;

 TIME = 366 ;

 MYVAR =
  _, _, 30132, 29678, 29803, 30285, 30247, 30502 ;
}
 
! Does Ferret reread the data correctly?
can dat/all; can var/all; use a.nc
list myvar
             VARIABLE : SST*1.12
             FILENAME : a.nc
             SUBSET   : 8 points (LONGITUDE)
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
              1S    
               1
 37E   / 1:   ....
 39E   / 2:   ....
 41E   / 3:  30.13
 43E   / 4:  29.68
 45E   / 5:  29.80
 47E   / 6:  30.29
 49E   / 7:  30.25
 51E   / 8:  30.50
 
 
! Disallow adding scale_factor and add_offset to file variables,
! or editing existing ones. Else it's ambiguous. Should scaling
! be applied on reading? Only on writing? both?
 
set mode ignore
 
use coads_climatology
! Intentional error
define attribute/output sst.scale_factor = 0.001
 
set mode/last ignore
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err73_rsize_negative
! err73_rsize_negative.jnl
! Issue #1847 , large grid size overwhelms internal integer!
 
 
define axis/t=1-jan-2017:1-apr-2017:.03/unit=days tbig
define axis/y=20s:20n:.01 ybig
define axis/x=0:359:.01/unit=degrees/modulo xbig
define axis/z=0:2:.05/unit=meters zbig
define grid/x=xbig/y=ybig/z=zbig/t=tbig gbig
let/title=Temperature big_temp = y[g=gbig] + 0*(x[g=gbig]+z[g=gbig]+t[g=gbig])
 
! This was returning a negative value
!   !-> MESSAGE/CONTINUE -193364099
 
say `big_temp,r=size`
 !-> MESSAGE/CONTINUE 17673597058941
17673597058941
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err73_calendar_des
! err73_calendar_des.jnl
! See issue #
! Calendar definitions in a descriptor file
!
! 12/20/2017
 
! This descriptor file defines a time axis with 360-day calendar
! for a dataset that has no time axis. The time listed for the
! variable's grid was wrong, should be 01-JAN-1901
 
use add_timeax.des
show grid var
    GRID GJR1
 name       axis              # pts   start                end                 subset
 XLON      LONGITUDE            5mr   1E                   5E                  full
 YLAT      LATITUDE             5 r   2S                   2N                  full
 normal    Z
 TIME      TIME                 1 r   01-JAN-1901 00:00    01-JAN-1901 00:00   full
list var
             VARIABLE : X[GX=XLON] + Y[GY=YLAT]
             DATA SET : test mc file add 360-day time axis to xy set
             FILENAME : add_timeax.des
             SUBSET   : 5 by 5 points (LONGITUDE-LATITUDE)
             TIME     : 01-JAN-1901 00:00 360_DAY
             1E     2E     3E     4E     5E    
              1      2      3      4      5
 2N   / 5:  3.000  4.000  5.000  6.000  7.000
 1N   / 4:  2.000  3.000  4.000  5.000  6.000
 0    / 3:  1.000  2.000  3.000  4.000  5.000
 1S   / 2:  0.000  1.000  2.000  3.000  4.000
 2S   / 1: -1.000  0.000  1.000  2.000  3.000
 
 
! This defines a dataset with the dataset containing
! a Julian time axis
! Should list JULIAN for the calendar
 
use t_julian.des
show grid sst
    GRID GTJ1
 name       axis              # pts   start                end                 subset
 LON1_15   LONGITUDE           15mi   148.95E(148.95)      149.54E(149.54)     full
 LAT1_1    LATITUDE             1 r   45.144S              45.144S             full
 normal    Z
 TIME2     TIME                 1 r   01-JAN-2004 00:00    01-JAN-2004 00:00   full
show axis/t `sst,return=taxis`
 !-> show axis/t TIME2
 name       axis              # pts   start                end
 TIME2     TIME                 1 r   01-JAN-2004 00:00    01-JAN-2004 00:00
T0 = 01-jan-1970 00:00:00
CALENDAR = JULIAN
   Axis span (to cell edges) = 2
 
       L     T                       TBOX          TBOXLO                TSTEP (day)
       1>  01-JAN-2004 00:00:00      2          31-DEC-2003 00:00:00         12418
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err73_wtd_var
! err73_wtd_var
! see github issue #1849.
! When weights - partial box size - is zero, the computation
! returned missing.
 
 
def ax/t/edge/unit=day/mod=365.2425/t0=1-jan-0001 tax_c = {0,31,59.2425,90.2425,120.2425,151.2425,181.2425,212.2425,243.2425,273.2425,304.2425,334.2425,365.2425}
def ax/t/edge/unit=day/t0=1-jan-0001 tax = {146097,146128,146156,146187,146217,146248,146278,146309,146340,146370,146401,146431,146462,146493,146521,146552,146582,146613,146643,146674,146705,146735,146766,146796,146827}
let a = sin(t[gt=tax])
let a_c = a[gt=tax_c@mod]
 
 
list a_c[t=1-jan-0301:1-jan-0302@std]
             VARIABLE : A[GT=TAX_C@MOD]
             TIME     : 01-JAN-0301 00:00 to 01-JAN-0302 00:00 (standard deviation)
          0.6974
list a_c[t=1-jan-0401:1-jan-0402@std]
             VARIABLE : A[GT=TAX_C@MOD]
             TIME     : 01-JAN-0401 00:00 to 01-JAN-0402 00:00 (standard deviation)
          0.6974
 
def ax/t/edge/unit=day/mod=360/t0=1-jan-0001/calendar=d360 tax360_c = {0,30, 60, 90,120,150,180,210,240,270,300,330,360}
def ax/t/edge/unit=day/t0=1-jan-0001/calendar=d360 tax360 = \
144000 + {0,30,60,90,120,150,180,210,240,270,300,330,360,390,420,450,480,510,540,570,600,630,660,690,720}
 
let b = a[gt=tax360@asn]
let b_c = b[gt=tax360_c@mod]
 
list b_c[t=1-jan-0301:1-jan-0302@std]
             VARIABLE : B[GT=TAX360_C@MOD]
             TIME     : 01-JAN-0301 00:00 to 01-JAN-0302 00:00 (standard deviation) 360_DAY
          0.7003
list b_c[t=1-jan-0401:1-jan-0402@std]
             VARIABLE : B[GT=TAX360_C@MOD]
             TIME     : 01-JAN-0401 00:00 to 01-JAN-0402 00:00 (standard deviation) 360_DAY
          0.7003
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err73_time_plot_precision
! err73_time_plot_precision
! ACM 1/4/2018
! issue 1009, from ticket   1737
! high resolution, short-duration time intervals with time
! axis in seconds with lots of precision plotted wrongly
 
! Define an axis with timesteps of 1 minute, units of seconds, with origin in 1970.
! Define a 2D variable using this axis.
 
define axis/z=1:100:5/depth zaxis
define axis/t=1-feb-2010:3-feb-2010:3600/units=seconds/t0=1-jan-1970 tsec1970
 
let ztvar1970 = L[gt=tsec1970] *z[gz=zaxis]
set view ul
 
! This plot previously puts the shade color boxes at the wrong place
shade ztvar1970
 
! Test SHADE/TRANS
set view ur
shade/trans ztvar1970
 
! test xt and xt plots
define axis/y=1:30:1/units=degrees_north yaxis
let ytvar1970 = L[gt=tsec1970] *y[gy=yaxis]
 
set view ll
shade ytvar1970
 
define axis/x=1:30:1/units=degrees_east xaxis
let xtvar1970 = L[gt=tsec1970] *x[gx=xaxis]
 
set view lr
shade xtvar1970
 
frame /file=time_plot_precision_shade.gif
 
! Now fill plots
 
cancel view
set view ul
fill ztvar1970
 
set view ur
fill/trans ztvar1970
 
set view ll
fill ytvar1970
 
set view lr
fill xtvar1970
 
frame /file=time_plot_precision_fill.gif
 
! Now vector plots
 
cancel view
set v ul
let zvec2 = L[gt=tsec1970] *RANDU(z[gz=zaxis])
vector cos(ztvar1970), sin(zvec2)
set v ur
let xvec2 = L[gt=tsec1970] *RANDU(x[gx=xaxis])
vector cos(xtvar1970), sin(xvec2)
 
set v ll
let yvec2 = L[gt=tsec1970] *RANDU(y[gy=yaxis])
vector cos(ytvar1970), sin(yvec2)
 
frame /file=time_plot_precision_vector.gif
 
! Hovmuller plot with overlays
! Previously line plots were correct, shade and fill plots were not
! or line plot not drawn
 
cancel view
fill ztvar1970
plot/over/thick/color=red ztvar1970[z=@loc:1200]
 
! PLOT/VS overlays - give the first arg some time units.
let/units="seconds since `ztvar1970,return=t0`" tt = t[gt=ztvar1970]
 !-> DEFINE VARIABLE/units="seconds since 1-JAN-1970" tt = t[gt=ztvar1970]
let ll = L[gt=ztvar1970]
plot/vs/over/color=green/sym=19 tt,LL
 
! some other variable on a different but overlapping time axis
 
define axis/t="21-jan-2010:00:10:00":"5-feb-2010:00:10:00":3/units=hours/t0=1-jan-1980 tax2
let tt = t[gt=tax2]
let var_1d = 60+5*randu(tt)
plot/over/thick/color=black var_1d
 
frame /file=time_plot_precision_hovmuller.gif
 
! 2D overlay
 
fill ztvar1970
let var2 = L[gt=tax2] + z[gz=zaxis]
shade/over/t="1-feb-2010:12:00":"2-feb-2010:06:00"/lev=40/pal=grayscale  var2
 
frame /file=time_plot_precision_2doverlay.gif
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err73_agg_1_time
! err73_agg_1_time
! see github issue #1853
! Grid cell edges when aggregation is just one point in time
 
 
def ax/edge/t=1-jan-0001:1-jan-0011/np=1/unit=day/t0=1-jan-0001/cal=julian tax
let a = t[gt=tax]
save/clob/file="a.nc"/bounds a
 
can var/all
can ax tax
 
! simple use command, lists correct edges
use a.nc
list/nohead tboxlo[gt=a], tboxhi[gt=a]
I / *:     0.0000  3652.
 
can data/all
can dat/all
 
! tseries aggregation, previously assigned a box size of 1
tseries agg = {"a.nc"}
list/nohead tboxlo[gt=a], tboxhi[gt=a]
I / *:     0.0000  3652.
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err73_shade_curvi
! err73_shade_curvi
!  1/17/2018 See issue 1854 corruption of coordinate data on curvi
!           graphics commands using /set
 
use tripolar_subset.nc
let/d=1 plot_var =     u
let xcoord = geolon_c
let ycoord = geolat_c
 
! The plot is fine when the commands after /SET are not LET commands
 
set v ul
shade/set plot_var , xcoord, ycoord
ppl ylab "my y label"
ppl shade
 
! The coordinate data loaded by SHADE/SET becomes corrupted when LET
! commands are issued after the /SET. Previously there were corrupted
! plots in the next 3 frames
 
LET add_urls = 0
set v ur
shade/set plot_var, xcoord, ycoord
LET add_urls = 1
ppl shade
 
set v ll
fill/set plot_var, xcoord, ycoord
LET add_urls = 3
ppl fill
 
set v lr
let v2 = 10*plot_var
vector/set  plot_var, v2, xcoord, ycoord
 
LET add_urls = 4
ppl vector
 
! /OVER/SET
contour/over/set/color=red  plot_var, xcoord, ycoord
ppl conset,0.07,4,,,,,,1
 
ppl contour/over
 
 
frame/file=curvi_set.gif
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err73_go_box
! err73_go_box.jnl
! 2/12/2018
! The box.jnl script had bugs
 
cancel mode logo
use coads_climatology
 
!set mode ignore
 
! This command works ok
 
set view ul; shade/l=1 sst
go box  300 320 45 20 9
 
! Negative longitudes were not translated so this box was not drawn
 
set view ur; shade/l=1 sst
go box (-220) (-205)  30 42 7
 
! Negative arguments were not consistently handled
! Needed to be put into parentheses - now the script does this.
 
set view ll; shade/l=1 sst
go box  -200 -180 -45 20 11
 
! Script now modernized to take arguments other than
! simple color name or pen number
 
set view lr; shade/l=1 sst
go box  -90 -10 -10 10 black/thick/dash
 
frame/file=go_box.gif
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err73_vector_aspect_yz
! err73_vector_aspect_yz.jnl
! issue #1860
! This question:
! https://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2017/msg00755.html
 
set window/aspect=0.5
 
define view/axes/x=0.1:0.4/y=0.1:0.7 myleft
define view/axes/x=0.6:0.9/y=0.1:0.7 myright
set view myleft
 
let depdata = {0, 10, 20, 40, 80, 120, 180, 300, 450, 650, 900, 1200}
let totaldepth = 1200
let halfdepth = 600
define axis/x=-1:50:1/units=degrees_east xax
define axis/y=-40:40:2/units=degrees_north yax
define axis/depth/z/units=meters/from_data zax = depdata
let/title=u u = 1 + 0*(x[gx=xax] + y[gy=yax] + z[gz=zax])
let/title=w w = 1 + 0*(x[gx=xax] + y[gy=yax] + z[gz=zax])
 
! if lat1 = 0, the vectors are 45 degrees
let lat1 = 0
 
let rad_earth = 6371.e3  ! [m]
let pi = 4*atan(1)
let x_of_deg = rad_earth * cos(pi * lat1 / 180) * pi / 180
let deg_of_x = 1 / x_of_deg
let dellon = deg_of_x * halfdepth ! m -> degE
vector/aspect/xskip=1/vlimits=0:`totaldepth`\
/hlimits=`(-1)*dellon`:`dellon`\
/length=0.1/y=`lat1` u,w
 !-> vector/aspect/xskip=1/vlimits=0:1200/hlimits=-0.005395929635512383:0.005395929635512383/length=0.1/y=0 u,w
 
 
! but if not, they were a bit off
set view myright
 
let lat1 = 24
let rad_earth = 6371.e3  ! [m]
let pi = 4*atan(1)
let x_of_deg = rad_earth * cos(pi * lat1 / 180) * pi / 180
let deg_of_x = 1 / x_of_deg
let dellon = deg_of_x * halfdepth ! m -> degE
vector/aspect/xskip=1/vlimits=0:`totaldepth`\
/hlimits=`(-1)*dellon`:`dellon`\
/length=0.1/y=`lat1` u,w
 !-> vector/aspect/xskip=1/vlimits=0:1200/hlimits=-0.005906580335297765:0.005906580335297765/length=0.1/y=24 u,w
 
frame/file=vector_lats.gif
 
! Restore default aspect ratio
set window/aspect=0.75
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err73_extra_digit_contourlab
! err73_extra_digit_contourlab.jnl
! 2/15/2918
! Issue 1858: The plot on the right, with a smaller number of
! color levels specified, had the contour line labels drawn with
! an unneeded digit after the decimal point 20.0, 22.0, etc
 
set window/aspect=0.5
 
use coads_climatology
set view left;  contour/l=1/lev=2d sst
set view right; contour/l=1/x=120e:80w/y=20s:20n/lev=2d sst
 
frame/file=extra_digit_contourlab.gif
 
! Restore default aspect ratio
set window/aspect=0.75
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err73_append_cdf
! err73_append_cdf
! Issue 1863: invisible error on appending to netCDF
! when forgetting to use SAVE or LIST/FORMAT=CDF
 
define axis/x=1:5:1 xax
define axis/t=1:4:1 tax
 
let xyvar = 1./0 + 0*x[gx=xax]*t[gt=tax]
 
! create a file with all-missing data, then
! use append to add timesteps.  The same behavior
! happens with just simple appending in time
 
save/clobber/file=a.nc xyvar
 
 
! Use SAVE/APPEND/L= to write one timestep at a time
 
let lstep = l[gt=tax]
repeat/name=ll/range=1:2 ( \
	let xyvar = if ( lstep eq `ll` ) then x[gx=xax] +  `ll` + 0*lstep ;\
	save/append/file=a.nc/l=`ll` xyvar ;\
	)
!-> REPEAT: LL:1
 !-> DEFINE VARIABLE xyvar = if ( lstep eq 1 ) then x[gx=xax] +  1 + 0*lstep
 !-> LIST/FORMAT=CDF/append/file=a.nc/l=1 xyvar
!-> REPEAT: LL:2
 !-> DEFINE VARIABLE xyvar = if ( lstep eq 2 ) then x[gx=xax] +  2 + 0*lstep
 !-> LIST/FORMAT=CDF/append/file=a.nc/l=2 xyvar
sp ncdump a.nc
netcdf a {
dimensions:
	XAX = 5 ;
	TAX = UNLIMITED ; // (4 currently)
variables:
	double XAX(XAX) ;
		XAX:point_spacing = "even" ;
		XAX:axis = "X" ;
	double TAX(TAX) ;
		TAX:axis = "T" ;
	double XYVAR(TAX, XAX) ;
		XYVAR:missing_value = -1.e+34 ;
		XYVAR:_FillValue = -1.e+34 ;
		XYVAR:long_name = "1./0 + 0*X[GX=XAX]*T[GT=TAX]" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
data:

 XAX = 1, 2, 3, 4, 5 ;

 TAX = 1, 2, 3, 4 ;

 XYVAR =
  2, 3, 4, 5, 6,
  3, 4, 5, 6, 7,
  _, _, _, _, _,
  _, _, _, _, _ ;
}
 
! This had LIST not SAVE or LIST/FORMAT=CDF
! It just seemed to run but did nothing, and issued no error
! Now return an error
 
set mode ignore
 
repeat/name=ll/range=3:4 ( \
	let xyvar = if ( lstep eq `ll` ) then x[gx=xax] + `ll` + 0*lstep ;\
	list/append/file=a.nc/l=`ll` xyvar ;\
	)
!-> REPEAT: LL:3
 !-> DEFINE VARIABLE xyvar = if ( lstep eq 3 ) then x[gx=xax] + 3 + 0*lstep
 !-> list/append/file=a.nc/l=3 xyvar
!-> REPEAT: LL:4
 !-> DEFINE VARIABLE xyvar = if ( lstep eq 4 ) then x[gx=xax] + 4 + 0*lstep
 !-> list/append/file=a.nc/l=4 xyvar
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err73_poly_vec_script
! err73_poly_vec_script.jnl
! Issue 1864: combination of expressions and contexts
! have scatter/gather operations going into infinite loop
 
! Simplified exapmle from poly_vectors_demo.jnl
 
use coads_climatology
 
! fake vector components
let uwnd = sst
let vwnd = sst
 
SET REGION/X=131:181/Y=21:61/L=1
LET mp_central_meridian = (131+181)/2
LET mp_standard_parallel = (60+20)/2
GO mp_stereographic_north  `mp_central_meridian` `mp_standard_parallel`
 !-> GO mp_stereographic_north  156 40
 
set grid uwnd
 
GO mp_aspect
FILL/NOAXIS/NOKEY/PAL=inverse_grayscale/TITLE="Poly Vectors" sst, x_page,y_page
LET x_vec = X[GX=uwnd,X=131:181] + 0*Y[GY=uwnd,Y=21:61]
LET y_vec = 0*X[GX=uwnd,X=131:181] + Y[GY=uwnd,Y=21:61]
LET u_vec = uwnd[X=131:181,Y=21:61,L=1]
LET v_vec = vwnd[X=131:181,Y=21:61,L=1]
 
! In v7.1-v7.3, Ferret just hangs, doing endless repetitions of "doing gather/compress"
 
GO mp_poly_vectors x_vec y_vec u_vec v_vec 3 "arrow"

*** MP_POLY_VECTORS:  Issue commands such as follow to plot the vectors ***
*** POLYGON/OVER/NOLABEL/KEY/NOAXES MP_X_ARROW, MP_Y_ARROW, MY_VALUES[J=1:546] ***
*** SET REGION SAVE ***

 
POLYGON/OVER/NOLABEL/KEY/NOAXES MP_X_ARROW, MP_Y_ARROW, ysequence(vwnd[X=131:181,Y=21:61,L=5])
 
frame/file=mp_poly_vec.gif
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err73_reshape
! err73_reshape.jnl
! Issue 1867, context and RESHAPE function
!  See also err491_reshape_ctx and bn_true_monthly
!  whose outputs had changed 3/17
! 4/10/18 ACM
!
! Create a dataset with data along just one axis
 
use levitus_3d_subset
save/x=121/y=-49/file=a.nc/clobber temp
cancel data/all
use a.nc
 
define axis/x=4:4:1/units=count xax
let dummy = x[gx=xax] + z[gz=temp]
show grid dummy
    GRID (G###)
 name       axis              # pts   start                end                 subset
 XAX       X (COUNT)            1 r   4                    4                   full
 normal    Y
 ZAXLEVITR DEPTH (m)           20 i-  0                    5000                full
 normal    T
 
! Now try to use RESHAPE to stick the data onto this new grid. It should list 20 points in Z
! The bug was it listed just 1 point.
list reshape(temp, dummy)
             VARIABLE : RESHAPE(TEMP, DUMMY)
             FILENAME : a.nc
             SUBSET   : 20 points (DEPTH (m))
             X (COUNT): 4
                  4    
                  1
 0       /  1:  6.827
 10      /  2:  6.843
 20      /  3:  6.840
 30      /  4:  6.741
 50      /  5:  6.624
 75      /  6:  6.751
 100     /  7:  6.462
 150     /  8:  6.466
 200     /  9:  6.026
 300     / 10:  5.445
 400     / 11:  5.187
 600     / 12:  4.571
 800     / 13:  3.823
 1000    / 14:  3.262
 1200    / 15:  2.757
 1500    / 16:  2.468
 2000    / 17:  2.090
 3000    / 18:  1.184
 4000    / 19:   ....
 5000    / 20:   ....
 
! If the regrid is to a different Z axis, w/ same or different coordinates, it works correctly.
use a.nc
define axis/z/depth/units="`temp,return=zunits`" znew = z[gz=temp]
 !-> define axis/z/depth/units="meters" znew = z[gz=temp]
let dummy =  x[gx=xax] + z[gz=znew]
list reshape(temp, dummy)
             VARIABLE : RESHAPE(TEMP, DUMMY)
             FILENAME : a.nc
             SUBSET   : 20 points (DEPTH (m))
             X (COUNT): 4
                  4    
                  1
 0       /  1:  6.827
 10      /  2:  6.843
 20      /  3:  6.840
 30      /  4:  6.741
 50      /  5:  6.624
 75      /  6:  6.751
 100     /  7:  6.462
 150     /  8:  6.466
 200     /  9:  6.026
 300     / 10:  5.445
 400     / 11:  5.187
 600     / 12:  4.571
 800     / 13:  3.823
 1000    / 14:  3.262
 1200    / 15:  2.757
 1500    / 16:  2.468
 2000    / 17:  2.090
 3000    / 18:  1.184
 4000    / 19:   ....
 5000    / 20:   ....
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err73_scale_miss_fill
! err73_scale_miss_fill.jnl
! Tests for the fix to issue 1861
! scaled data with different missing_value and _FillValue
! attributes.
!
! index numbers 9 and 10 have the _FillValue,
! 1 and 4 are marked with missing_value.
 
use fill_and_miss.nc
list sea_level
             VARIABLE : sea level (meters)
             DATA SET : TOPEX/POSEIDON SEA LEVEL
             FILENAME : fill_and_miss.nc
             SUBSET   : 15 points (LONGITUDE)
             LATITUDE : 45.5N
                 45.5N  
                  1
 10.5W  /  1:     ....
 9.5W   /  2: -0.01500
 8.5W   /  3: -0.00400
 7.5W   /  4:     ....
 6.5W   /  5:  0.05000
 5.5W   /  6:  0.05900
 4.5W   /  7:  0.06500
 3.5W   /  8:  0.06900
 2.5W   /  9:     ....
 1.5W   / 10:     ....
 0.5W   / 11:  0.00400
 0.5E   / 12:  0.04800
 1.5E   / 13:  0.04600
 2.5E   / 14:  0.07300
 3.5E   / 15:  0.07700
*** Running ferret script: bn_clim_special.jnl
! bn_clim_special.jnl
! Test the climatological axes from Andrew's monthly
! and seasonal axis definition files.
! 12/20/2017 (see issue #1848)
 
! Open the datsets containing the axis definitions and
! use SHOW AXIS/T to list the axis properties and coordinates
 
use clim_axes_gregorian
sh axis/t *_GRG
 name       axis              # pts   start                end
 MON_IRREG_GRG TIME            12mi   16-JAN 12:00         16-DEC 17:49
T0 = 01-JAN-0001 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  16-JAN 12:00:00           31         01-JAN 00:00:00             15.5
       2>  15-FEB 02:54:36           28.2425    01-FEB 00:00:00             45.12125
       3>  16-MAR 17:49:12           31         01-MAR 05:49:12             74.7425
       4>  16-APR 05:49:12           30         01-APR 05:49:12             105.2425
       5>  16-MAY 17:49:12           31         01-MAY 05:49:12             135.7425
       6>  16-JUN 05:49:12           30         01-JUN 05:49:12             166.2425
       7>  16-JUL 17:49:12           31         01-JUL 05:49:12             196.7425
       8>  16-AUG 17:49:12           31         01-AUG 05:49:12             227.7425
       9>  16-SEP 05:49:12           30         01-SEP 05:49:12             258.2425
      10>  16-OCT 17:49:12           31         01-OCT 05:49:12             288.7425
      11>  16-NOV 05:49:12           30         01-NOV 05:49:12             319.2425
      12>  16-DEC 17:49:12           31         01-DEC 05:49:12             349.7425
 JFM_IRREG_GRG TIME             4mi   15-FEB 02:54         16-NOV 05:49
T0 = 01-JAN-0001 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  15-FEB 02:54:36           90.2425    01-JAN 00:00:00             45.12125
       2>  16-MAY 17:49:12           91         01-APR 05:49:12             135.7425
       3>  16-AUG 05:49:12           92         01-JUL 05:49:12             227.2425
       4>  16-NOV 05:49:12           92         01-OCT 05:49:12             319.2425
 DJF_IRREG_GRG TIME             4mi   15-JAN 08:43         16-OCT 23:38
T0 = 01-JAN-0001 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  15-JAN 08:43:48           90.2425    01-DEC 05:49:12             379.3637
       2>  16-APR 11:38:24           92         01-MAR 11:38:24             470.485
       3>  17-JUL 11:38:24           92         01-JUN 11:38:24             562.485
       4>  16-OCT 23:38:24           91         01-SEP 11:38:24             653.985
 NDJ_IRREG_GRG TIME             4mi   17-DEC 05:49         16-SEP 11:38
T0 = 01-JAN-0001 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  17-DEC 05:49:12           92         01-NOV 05:49:12             350.2425
       2>  17-MAR 20:43:48           89.2425    01-FEB 05:49:12             440.8637
       3>  16-JUN 11:38:24           92         01-MAY 11:38:24             531.485
       4>  16-SEP 11:38:24           92         01-AUG 11:38:24             623.485
 MON_REG_GRG TIME              12mr   16-JAN 05:14         17-DEC 00:34
T0 = 01-JAN-0001 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  16-JAN 05:14:33           30.43688   01-JAN 00:00:00             15.21844
       2>  15-FEB 15:43:39           30.43688   31-JAN 10:29:06             45.65531
       3>  18-MAR 02:12:45           30.43688   02-MAR 20:58:12             76.09219
       4>  17-APR 12:41:51           30.43688   02-APR 07:27:18             106.5291
       5>  17-MAY 23:10:57           30.43688   02-MAY 17:56:24             136.9659
       6>  17-JUN 09:40:03           30.43688   02-JUN 04:25:30             167.4028
       7>  17-JUL 20:09:09           30.43688   02-JUL 14:54:36             197.8397
       8>  17-AUG 06:38:15           30.43688   02-AUG 01:23:42             228.2766
       9>  16-SEP 17:07:21           30.43688   01-SEP 11:52:48             258.7134
      10>  17-OCT 03:36:27           30.43688   01-OCT 22:21:54             289.1503
      11>  16-NOV 14:05:33           30.43688   01-NOV 08:51:00             319.5872
      12>  17-DEC 00:34:39           30.43688   01-DEC 19:20:06             350.0241
 JFM_REG_GRG TIME               4mr   15-FEB 15:43         16-NOV 14:05
T0 = 01-JAN-0001 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  15-FEB 15:43:39           91.31063   01-JAN 00:00:00             45.65531
       2>  17-MAY 23:10:57           91.31063   02-APR 07:27:18             136.9659
       3>  17-AUG 06:38:15           91.31063   02-JUL 14:54:36             228.2766
       4>  16-NOV 14:05:33           91.31063   01-OCT 22:21:54             319.5872
 DJF_REG_GRG TIME               4mr   16-JAN 11:03         17-OCT 09:25
T0 = 01-JAN-0001 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  16-JAN 11:03:45           91.31062   01-DEC 19:20:06             380.4609
       2>  17-APR 18:31:03           91.31062   03-MAR 02:47:24             471.7716
       3>  18-JUL 01:58:21           91.31062   02-JUN 10:14:42             563.0822
       4>  17-OCT 09:25:39           91.31062   01-SEP 17:42:00             654.3928
 NDJ_REG_GRG TIME               4mr   17-DEC 00:34         16-SEP 22:56
T0 = 01-JAN-0001 00:00:00
   Axis span (to cell edges) = 365.2425 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  17-DEC 00:34:39           91.31062   01-NOV 08:51:00             350.0241
       2>  18-MAR 08:01:57           91.31062   31-JAN 16:18:18             441.3347
       3>  17-JUN 15:29:15           91.31062   02-MAY 23:45:36             532.6453
       4>  16-SEP 22:56:33           91.31062   02-AUG 07:12:53             623.9559
 
cancel data/all
 
cancel axis MON_IRREG_GRG
cancel axis JFM_IRREG_GRG
cancel axis DJF_IRREG_GRG
cancel axis NDJ_IRREG_GRG
cancel axis MON_REG_GRG
cancel axis JFM_REG_GRG
cancel axis DJF_REG_GRG
cancel axis NDJ_REG_GRG
 
 
use clim_axes_julian
sh axis/t *_JUL
 name       axis              # pts   start                end
 MON_IRREG_JUL TIME            12mi   16-JAN 12:00         16-DEC 18:00
T0 = 01-JAN-0001 00:00:00
CALENDAR = JULIAN
   Axis span (to cell edges) = 365.25 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  16-JAN 12:00:00           31         01-JAN 00:00:00             15.5
       2>  15-FEB 03:00:00           28.25      01-FEB 00:00:00             45.125
       3>  16-MAR 18:00:00           31         01-MAR 06:00:00             74.75
       4>  16-APR 06:00:00           30         01-APR 06:00:00             105.25
       5>  16-MAY 18:00:00           31         01-MAY 06:00:00             135.75
       6>  16-JUN 06:00:00           30         01-JUN 06:00:00             166.25
       7>  16-JUL 18:00:00           31         01-JUL 06:00:00             196.75
       8>  16-AUG 18:00:00           31         01-AUG 06:00:00             227.75
       9>  16-SEP 06:00:00           30         01-SEP 06:00:00             258.25
      10>  16-OCT 18:00:00           31         01-OCT 06:00:00             288.75
      11>  16-NOV 06:00:00           30         01-NOV 06:00:00             319.25
      12>  16-DEC 18:00:00           31         01-DEC 06:00:00             349.75
 JFM_IRREG_JUL TIME             4mi   15-FEB 03:00         16-NOV 06:00
T0 = 01-JAN-0001 00:00:00
CALENDAR = JULIAN
   Axis span (to cell edges) = 365.25 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  15-FEB 03:00:00           90.25      01-JAN 00:00:00             45.125
       2>  16-MAY 18:00:00           91         01-APR 06:00:00             135.75
       3>  16-AUG 06:00:00           92         01-JUL 06:00:00             227.25
       4>  16-NOV 06:00:00           92         01-OCT 06:00:00             319.25
 DJF_IRREG_JUL TIME             4mi   15-JAN 09:00         17-OCT 00:00
T0 = 01-JAN-0001 00:00:00
CALENDAR = JULIAN
   Axis span (to cell edges) = 365.25 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  15-JAN 09:00:00           90.25      01-DEC 06:00:00             379.375
       2>  16-APR 12:00:00           92         01-MAR 12:00:00             470.5
       3>  17-JUL 12:00:00           92         01-JUN 12:00:00             562.5
       4>  17-OCT 00:00:00           91         01-SEP 12:00:00             654
 NDJ_IRREG_JUL TIME             4mi   17-DEC 06:00         16-SEP 12:00
T0 = 01-JAN-0001 00:00:00
CALENDAR = JULIAN
   Axis span (to cell edges) = 365.25 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  17-DEC 06:00:00           92         01-NOV 06:00:00             350.25
       2>  17-MAR 21:00:00           89.25      01-FEB 06:00:00             440.875
       3>  16-JUN 12:00:00           92         01-MAY 12:00:00             531.5
       4>  16-SEP 12:00:00           92         01-AUG 12:00:00             623.5
 MON_REG_JUL TIME              12mr   16-JAN 05:15         17-DEC 00:45
T0 = 01-JAN-0001 00:00:00
CALENDAR = JULIAN
   Axis span (to cell edges) = 365.25 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  16-JAN 05:15:00           30.4375    01-JAN 00:00:00             15.21875
       2>  15-FEB 15:45:00           30.4375    31-JAN 10:30:00             45.65625
       3>  18-MAR 02:15:00           30.4375    02-MAR 21:00:00             76.09375
       4>  17-APR 12:45:00           30.4375    02-APR 07:30:00             106.5312
       5>  17-MAY 23:15:00           30.4375    02-MAY 18:00:00             136.9688
       6>  17-JUN 09:45:00           30.4375    02-JUN 04:30:00             167.4062
       7>  17-JUL 20:15:00           30.4375    02-JUL 15:00:00             197.8438
       8>  17-AUG 06:45:00           30.4375    02-AUG 01:30:00             228.2812
       9>  16-SEP 17:15:00           30.4375    01-SEP 12:00:00             258.7188
      10>  17-OCT 03:45:00           30.4375    01-OCT 22:30:00             289.1562
      11>  16-NOV 14:15:00           30.4375    01-NOV 09:00:00             319.5938
      12>  17-DEC 00:45:00           30.4375    01-DEC 19:30:00             350.0312
 JFM_REG_JUL TIME               4mr   15-FEB 15:45         16-NOV 14:15
T0 = 01-JAN-0001 00:00:00
CALENDAR = JULIAN
   Axis span (to cell edges) = 365.25 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  15-FEB 15:45:00           91.3125    01-JAN 00:00:00             45.65625
       2>  17-MAY 23:15:00           91.3125    02-APR 07:30:00             136.9688
       3>  17-AUG 06:45:00           91.3125    02-JUL 15:00:00             228.2812
       4>  16-NOV 14:15:00           91.3125    01-OCT 22:30:00             319.5938
 DJF_REG_JUL TIME               4mr   16-JAN 11:15         17-OCT 09:45
T0 = 01-JAN-0001 00:00:00
CALENDAR = JULIAN
   Axis span (to cell edges) = 365.25 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  16-JAN 11:15:00           91.3125    01-DEC 19:30:00             380.4688
       2>  17-APR 18:45:00           91.3125    03-MAR 03:00:00             471.7812
       3>  18-JUL 02:15:00           91.3125    02-JUN 10:30:00             563.0938
       4>  17-OCT 09:45:00           91.3125    01-SEP 18:00:00             654.4062
 NDJ_REG_JUL TIME               4mr   17-DEC 00:45         16-SEP 23:15
T0 = 01-JAN-0001 00:00:00
CALENDAR = JULIAN
   Axis span (to cell edges) = 365.25 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  17-DEC 00:45:00           91.3125    01-NOV 09:00:00             350.0312
       2>  18-MAR 08:15:00           91.3125    31-JAN 16:30:00             441.3438
       3>  17-JUN 15:45:00           91.3125    03-MAY 00:00:00             532.6562
       4>  16-SEP 23:15:00           91.3125    02-AUG 07:30:00             623.9688
 
cancel data/all
cancel axis MON_IRREG_JUL
cancel axis JFM_IRREG_JUL
cancel axis DJF_IRREG_JUL
cancel axis NDJ_IRREG_JUL
cancel axis MON_REG_JUL
cancel axis JFM_REG_JUL
cancel axis DJF_REG_JUL
cancel axis NDJ_REG_JUL
 
 
use clim_axes_noleap
sh axis/t *_NLP
 name       axis              # pts   start                end
 MON_IRREG_NLP TIME            12mi   16-JAN 12:00         16-DEC 12:00
T0 = 01-JAN-0001 00:00:00
CALENDAR = NOLEAP
   Axis span (to cell edges) = 365 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  16-JAN 12:00:00           31         01-JAN 00:00:00             15.5
       2>  15-FEB 00:00:00           28         01-FEB 00:00:00             45
       3>  16-MAR 12:00:00           31         01-MAR 00:00:00             74.5
       4>  16-APR 00:00:00           30         01-APR 00:00:00             105
       5>  16-MAY 12:00:00           31         01-MAY 00:00:00             135.5
       6>  16-JUN 00:00:00           30         01-JUN 00:00:00             166
       7>  16-JUL 12:00:00           31         01-JUL 00:00:00             196.5
       8>  16-AUG 12:00:00           31         01-AUG 00:00:00             227.5
       9>  16-SEP 00:00:00           30         01-SEP 00:00:00             258
      10>  16-OCT 12:00:00           31         01-OCT 00:00:00             288.5
      11>  16-NOV 00:00:00           30         01-NOV 00:00:00             319
      12>  16-DEC 12:00:00           31         01-DEC 00:00:00             349.5
 JFM_IRREG_NLP TIME             4mi   15-FEB 00:00         16-NOV 00:00
T0 = 01-JAN-0001 00:00:00
CALENDAR = NOLEAP
   Axis span (to cell edges) = 365 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  15-FEB 00:00:00           90         01-JAN 00:00:00             45
       2>  16-MAY 12:00:00           91         01-APR 00:00:00             135.5
       3>  16-AUG 00:00:00           92         01-JUL 00:00:00             227
       4>  16-NOV 00:00:00           92         01-OCT 00:00:00             319
 DJF_IRREG_NLP TIME             4mi   15-JAN 00:00         16-OCT 12:00
T0 = 01-JAN-0001 00:00:00
CALENDAR = NOLEAP
   Axis span (to cell edges) = 365 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  15-JAN 00:00:00           90         01-DEC 00:00:00             379
       2>  16-APR 00:00:00           92         01-MAR 00:00:00             470
       3>  17-JUL 00:00:00           92         01-JUN 00:00:00             562
       4>  16-OCT 12:00:00           91         01-SEP 00:00:00             653.5
 NDJ_IRREG_NLP TIME             4mi   17-DEC 00:00         16-SEP 00:00
T0 = 01-JAN-0001 00:00:00
CALENDAR = NOLEAP
   Axis span (to cell edges) = 365 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  17-DEC 00:00:00           92         01-NOV 00:00:00             350
       2>  17-MAR 12:00:00           89         01-FEB 00:00:00             440.5
       3>  16-JUN 00:00:00           92         01-MAY 00:00:00             531
       4>  16-SEP 00:00:00           92         01-AUG 00:00:00             623
 MON_REG_NLP TIME              12mr   16-JAN 05:00         16-DEC 19:00
T0 = 01-JAN-0001 00:00:00
CALENDAR = NOLEAP
   Axis span (to cell edges) = 365 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  16-JAN 05:00:00           30.41667   01-JAN 00:00:00             15.20833
       2>  15-FEB 15:00:00           30.41667   31-JAN 10:00:00             45.625
       3>  18-MAR 01:00:00           30.41667   02-MAR 20:00:00             76.04167
       4>  17-APR 11:00:00           30.41667   02-APR 06:00:00             106.4583
       5>  17-MAY 21:00:00           30.41667   02-MAY 16:00:00             136.875
       6>  17-JUN 07:00:00           30.41667   02-JUN 02:00:00             167.2917
       7>  17-JUL 17:00:00           30.41667   02-JUL 12:00:00             197.7083
       8>  17-AUG 03:00:00           30.41667   01-AUG 22:00:00             228.125
       9>  16-SEP 13:00:00           30.41667   01-SEP 08:00:00             258.5417
      10>  16-OCT 23:00:00           30.41667   01-OCT 18:00:00             288.9583
      11>  16-NOV 09:00:00           30.41667   01-NOV 04:00:00             319.375
      12>  16-DEC 19:00:00           30.41667   01-DEC 14:00:00             349.7917
 JFM_REG_NLP TIME               4mr   15-FEB 15:00         16-NOV 09:00
T0 = 01-JAN-0001 00:00:00
CALENDAR = NOLEAP
   Axis span (to cell edges) = 365 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  15-FEB 15:00:00           91.25      01-JAN 00:00:00             45.625
       2>  17-MAY 21:00:00           91.25      02-APR 06:00:00             136.875
       3>  17-AUG 03:00:00           91.25      02-JUL 12:00:00             228.125
       4>  16-NOV 09:00:00           91.25      01-OCT 18:00:00             319.375
 DJF_REG_NLP TIME               4mr   16-JAN 05:00         16-OCT 23:00
T0 = 01-JAN-0001 00:00:00
CALENDAR = NOLEAP
   Axis span (to cell edges) = 365 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  16-JAN 05:00:00           91.25      01-DEC 14:00:00             380.2083
       2>  17-APR 11:00:00           91.25      02-MAR 20:00:00             471.4583
       3>  17-JUL 17:00:00           91.25      02-JUN 02:00:00             562.7083
       4>  16-OCT 23:00:00           91.25      01-SEP 08:00:00             653.9583
 NDJ_REG_NLP TIME               4mr   16-DEC 19:00         16-SEP 13:00
T0 = 01-JAN-0001 00:00:00
CALENDAR = NOLEAP
   Axis span (to cell edges) = 365 (modulo length = axis span)
 
       L     T                       TBOX          TBOXLO                TSTEP (days)
       1>  16-DEC 19:00:00           91.25      01-NOV 04:00:00             349.7917
       2>  18-MAR 01:00:00           91.25      31-JAN 10:00:00             441.0417
       3>  17-JUN 07:00:00           91.25      02-MAY 16:00:00             532.2917
       4>  16-SEP 13:00:00           91.25      01-AUG 22:00:00             623.5417
 
cancel data/all
cancel axis MON_IRREG_NLP
cancel axis JFM_IRREG_NLP
cancel axis DJF_IRREG_NLP
cancel axis NDJ_IRREG_NLP
cancel axis MON_REG_NLP
cancel axis JFM_REG_NLP
cancel axis DJF_REG_NLP
cancel axis NDJ_REG_NLP
 
 
*** Running ferret script: bn_let_like.jnl
! bn_let_like.jnl
! DEFINE VARIABLE/LIKE=oldvar my_new_var
!
! Gets the attributes from the specified variable
! and assigns them to the new variable.  Skips
! missing_flag and _FillVlue as does the existing
! command "set att/like=oldvar newvar".
! also skip add_offset and scale_factor attribs.
!
! 2/22/2018  ACM
 
 
use coads_climatology
let/like=sst sst2 = 2*sst
show att sst2
     attributes for user-defined variables
 sst2.missing_value = -1.E+34
 sst2.long_name = SEA SURFACE TEMPERATURE 
 sst2.history = From coads_climatology 
 sst2.units = Deg C 
 
! Can still set /TITLE, /UNITS on the command line
 
let/like=sst/Title="Sea Surface Temperature" sst2 = 2*sst
show att sst2
     attributes for user-defined variables
 sst2.long_name = Sea Surface Temperature 
 sst2.missing_value = -1.E+34
 sst2.history = From coads_climatology 
 sst2.units = Deg C 
 
! bad-flags are not inherited.  Set a new flag
let/like=sst/bad=999 int_sst = if sst then int(sst) else 999
list/y=0 int_sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 180 by 3 points (LONGITUDE-TIME)
             LATITUDE : 1S
      ... listing every  12th point
                    21E    45E    69E    93E   117E   141E   165E   171W   147W   123W    99W    75W    51W    27W    3W    
                     1     13     25     37     49     61     73     85     97    109    121    133    145    157    169
 16-JAN      / 1:   ....  26.00  28.00  28.00  28.00  29.00  29.00  27.00  26.00  23.00  24.00   ....  27.00  27.00  27.00
 15-FEB      / 2:   ....  26.00  28.00  28.00  28.00  28.00  29.00  27.00  26.00  25.00  25.00   ....  27.00  27.00  27.00
 17-MAR      / 3:   ....  27.00  29.00  29.00  28.00  28.00  28.00  27.00  27.00  26.00  26.00   ....  28.00  27.00  28.00
 
save/clobber/file=a.nc/outtype=int/x=105:125/y=0/L=1 int_sst
sp ncdump a.nc
netcdf a {
dimensions:
	COADSX43_53 = 11 ;
	COADSY45_45 = 1 ;
	TIME = UNLIMITED ; // (1 currently)
variables:
	double COADSX43_53(COADSX43_53) ;
		COADSX43_53:units = "degrees_east" ;
		COADSX43_53:modulo = " " ;
		COADSX43_53:point_spacing = "even" ;
		COADSX43_53:axis = "X" ;
		COADSX43_53:standard_name = "longitude" ;
	double COADSY45_45(COADSY45_45) ;
		COADSY45_45:units = "degrees_north" ;
		COADSY45_45:point_spacing = "even" ;
		COADSY45_45:axis = "Y" ;
		COADSY45_45:standard_name = "latitude" ;
	double TIME(TIME) ;
		TIME:units = "hour since 0000-01-01 00:00:00" ;
		TIME:time_origin = "01-JAN-0000 00:00:00" ;
		TIME:modulo = " " ;
		TIME:axis = "T" ;
		TIME:standard_name = "time" ;
	int INT_SST(TIME, COADSY45_45, COADSX43_53) ;
		INT_SST:missing_value = 999 ;
		INT_SST:_FillValue = 999 ;
		INT_SST:long_name = "SEA SURFACE TEMPERATURE" ;
		INT_SST:history = "From coads_climatology" ;
		INT_SST:units = "Deg C" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
data:

 COADSX43_53 = 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125 ;

 COADSY45_45 = -1 ;

 TIME = 366 ;

 INT_SST =
  27, 27, 27, _, _, _, 28, 28, 28, 29, 29 ;
}
list/x=105:125/y=0/L=1 int_sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 11 points (LONGITUDE)
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
                1S    
                45
 105E   / 43:  27.00
 107E   / 44:  27.00
 109E   / 45:  27.00
 111E   / 46:   ....
 113E   / 47:   ....
 115E   / 48:   ....
 117E   / 49:  28.00
 119E   / 50:  28.00
 121E   / 51:  28.00
 123E   / 52:  29.00
 125E   / 53:  29.00
 
! Now use the file with bad=999
cancel data/all
cancel var/all
use a.nc
sh dat/att
     currently SET data sets:
    1> ./a.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
  
(COADSX43_53)          DOUBLE    units           CHAR        12   T       degrees_east
                                 modulo          CHAR        1    T
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        11   F       COADSX43_53
  
(COADSY45_45)          DOUBLE    units           CHAR        13   T       degrees_north
                                 point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       Y
                                 standard_name   CHAR        8    F       latitude
                                 orig_file_axname
                                                 CHAR        11   F       COADSY45_45
  
(TIME)                 DOUBLE    units           CHAR        30   T       hour since 0000-01-01 00:00:00
                                 time_origin     CHAR        20   T       01-JAN-0000 00:00:00
                                 modulo          CHAR        1    T
                                 axis            CHAR        1    T       T
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 INT_SST               INT       missing_value   INT         1    T       999
                                 _FillValue      INT         1    T       999
                                 long_name       CHAR        23   T       SEA SURFACE TEMPERATURE
                                 history         CHAR        22   T       From coads_climatology
                                 units           CHAR        5    T       Deg C
  
 
! Define a variable with /LIKE=.  Its bad-flag is the Ferret default.
let/like=int_sst newvar = 0.325*int_sst
show att newvar
     attributes for user-defined variables
 newvar.missing_value = -1.E+34
 newvar.long_name = SEA SURFACE TEMPERATURE 
 newvar.history = From coads_climatology 
 newvar.units = Deg C 
list newvar
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : a.nc
             SUBSET   : 11 points (LONGITUDE)
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
                1S    
                 1
 105E   /  1:  8.775
 107E   /  2:  8.775
 109E   /  3:  8.775
 111E   /  4:   ....
 113E   /  5:   ....
 115E   /  6:   ....
 117E   /  7:  9.100
 119E   /  8:  9.100
 121E   /  9:  9.100
 123E   / 10:  9.425
 125E   / 11:  9.425
 
! The operation of renaming a variable and then redefining the var
! in a LET command is streamlined
 
use WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc
set var/name=pco2_in pco2
 
! Some expression changing the definition
 
let/like=PCO2_IN pco2 = tsequence(pco2_in)
sh att pco2
     attributes for user-defined variables
 pco2.missing_value = -1.E+34
 pco2.actual_range = 258.89, 1341.87
 pco2.coordinates = time latitude longitude PRESS_DB 
 pco2.history = From allDataFrom2007-2011-2012WestCoastCarbonCruises-revised3-6-13-1.txt 
 pco2.long_name = PCO2 
say `pco2,return=shape`
 !-> MESSAGE/CONTINUE T
T
 
 
cancel data/all
cancel var/all
 
! Another one replacing SET ATT/LIKE with LET/LIKE, from the
! script bn_cancel_upcase_uservar.  Note the use of dset number
! LET/LIKE=olr[d=1]
 
CANCEL MODE upcase
 
! User variable with lowercase letters in the name
 
DEFINE AXIS/t=1-jan-1999:31-jan-1999:1/units=days/t0=31-dec-1998 tday
LET MyUpperLowerCaseVar = x[x=1:10] + t[gt=tday]
SAVE/file=a.nc/clobber MyUpperLowerCaseVar
 
! Open two datafiles. These have variable and axis
! names in lowercase.
 
USE a1478.nc
show att olr
     attributes for dataset: ./data/a1478.nc
 olr.missing_value = -999
 olr._FillValue = -999
 olr.long_name = outgoing longwave radiation 
 olr.units = watts/m2 
 olr.history = From a 
 
USE a_cartesian_bug1179.nc
 
! Define an output variable with some axes from each dataset.
LET/D=2 zvar = z[gz=temp[d=2]]
LET/LIKE=olr[d=1] newvar =  0*zvar[d=2] + olr[d=1]
SHOW ATT newvar
     attributes for user-defined variables
 newvar.missing_value = -1.E+34
 newvar.long_name = outgoing longwave radiation 
 newvar.units = watts/m2 
 newvar.history = From a 
 
SET MODE/LAST upcase_output
 
! intentional errors
set mode ignore
 
! Unknown variable
IF `var_undefined, return=defined` THEN CANCEL VAR var_undefined
 !-> IF 0 THEN CANCEL VAR var_undefined
let/like=var_undefined myvar = 7
 
set mode/last ignore
*** Running ferret script: bn_def_axis_like.jnl
! bn_def_axis_like
! testing DEFINE AXIS/LIKE=existing_axis  new_axis
!
! Gets the attributes from the specified variable
! and assigns them to the new variable.  Skips
! missing_flag and _FillVar as does the existing
! command "set att/like=oldvar newvar"
! 2/22/2018  ACM
 
use ocean_atlas_temp.cdf
 
! get the attributes, define a new depth axis
 
define axis/like=`temp,return=zaxis`/z=1:15:1 myz
 !-> define axis/like=ZAXLEVIT191_1/z=1:15:1 myz
sh axis `temp,return=zaxis`
 !-> sh axis ZAXLEVIT191_1
 name       axis              # pts   start                end
 ZAXLEVIT191_1 DEPTH (m)        1 r-  0                    0
   Axis span (to cell edges) = 1
sh axis myz
 name       axis              # pts   start                end
 MYZ       DEPTH (m)           15 r-  1                    15
   Axis span (to cell edges) = 15
 
! ! Get the attributes, but change one of them with /UNITS=
define axis/like=`temp,return=xaxis`/x=20:90:.25/units="Deg E" myx
 !-> define axis/like=XAX_LEV9421_380/x=20:90:.25/units="Deg E" myx
sh axis `temp,return=xaxis`
 !-> sh axis XAX_LEV9421_380
 name       axis              # pts   start                end
 XAX_LEV9421_380 LONGITUDE    360mr   20.5E                19.5E(379.5)
   Axis span (to cell edges) = 360 (modulo length = axis span)
sh axis myx
 name       axis              # pts   start                end
 MYX       X (DEG E)          281mr   20                   90
   Axis span (to cell edges) = 70.25 (modulo length = 360)
 
! On the second axis inherit time origin, units, but change the calendar
 
define axis/t=1-jan-2001:9-dec-2001:`24*60`/t0=1-jan-1970/units=seconds timesec
 !-> define axis/t=1-jan-2001:9-dec-2001:1440/t0=1-jan-1970/units=seconds timesec
define axis/like=timesec/t=1-jan-2015:31-dec-2015:`24*3600`/calendar=Julian timeday
 !-> define axis/like=timesec/t=1-jan-2015:31-dec-2015:86400/calendar=Julian timeday
 
sh axis timesec
 name       axis              # pts   start                end
 TIMESEC   TIME             20521 r   01-JAN-2001 00:00    09-DEC-2001 00:00
T0 = 1-JAN-1970
   Axis span (to cell edges) = 2.955024E+07
sh axis timeday
 name       axis              # pts   start                end
 TIMEDAY   TIME               365 r   01-JAN-2015 00:00    31-DEC-2015 00:00
T0 = 1-JAN-1970
CALENDAR = JULIAN
   Axis span (to cell edges) = 3.1536E+07
 
! intentional errors
set mode ignore
 
! Unknown axis
 
show axis axis_undefined
 name       axis              # pts   start                end
define axis/like=axis_undefined/x=1:8:1 myx
 
! axis must be in the same direction as the one we're inheriting from
 
define axis/like=`temp,return=xaxis`/y=-10:10:10 myy
 !-> define axis/like=XAX_LEV9421_380/y=-10:10:10 myy
 
!  Still need to specify the direction and coordinates
define axis/like=timesec/units=minutes timemin
define axis/like=timesec/units=minutes/t timemin
 
set mode/last ignore
 
! Tests for details on time axes
 
cancel data/all
 
use coads_climatology
define axis/t/like=`sst,r=taxis` tax = t[gt=sst]
 !-> define axis/t/like=TIME tax = t[gt=sst]
say `sst,r=t0`, `sst,r=tmod`
 !-> MESSAGE/CONTINUE 01-JAN-0000 00:00:00, 8765.81982421875
01-JAN-0000 00:00:00, 8765.81982421875
say `t[gt=tax],r=t0`, `t[gt=tax],r=tmod`
 !-> MESSAGE/CONTINUE 01-JAN-0000 00:00:00, 8765.81982421875
01-JAN-0000 00:00:00, 8765.81982421875
 
use clim_airt_lev.cdf
define axis/t/like=`airt,r=taxis` tax = t[gt=airt]
 !-> define axis/t/like=TIME1 tax = t[gt=airt]
 
! These should be the same
 
say `airt,return=t0`, `airt,return=tmod`, `airt,return=tunits`
 !-> MESSAGE/CONTINUE 10-JAN-1980 12:00:00, 8760, hour
10-JAN-1980 12:00:00, 8760, hour
say `t[gt=tax],r=t0`, `t[gt=tax],r=tmod`, `t[gt=tax],r=tunits`
 !-> MESSAGE/CONTINUE 10-JAN-1980 12:00:00, 8760, hour
10-JAN-1980 12:00:00, 8760, hour
 
! calendar is inherited
show axis month_julian
 name       axis              # pts   start                end
 MONTH_JULIAN TIME             12mi   16-JAN 12:00         15-DEC 18:00
T0 = 01-JAN-0000 00:00:00
CALENDAR = JULIAN
   Axis span (to cell edges) = 365.25 (modulo length = axis span)
 
define axis/t/like=month_julian tax = t[gt=month_julian]
sh axis tax
 name       axis              # pts   start                end
 TAX       TIME                12mi   16-JAN 12:00         15-DEC 18:00
T0 = 01-JAN-0000 00:00:00
CALENDAR = JULIAN
   Axis span (to cell edges) = 364.375 (modulo length = axis span)
 
! Note how the modulo length is shorter than month_julian's.
! But it's ok if we use the edges.
 
define axis/t/like=month_julian/edges tax = box_edges(t[gt=month_julian])
sh axis tax
 name       axis              # pts   start                end
 TAX       TIME                12mi   16-JAN 12:00         15-DEC 18:00
T0 = 01-JAN-0000 00:00:00
CALENDAR = JULIAN
   Axis span (to cell edges) = 365.25 (modulo length = axis span)
 
! Define and redefine an axis with /LIKE.  Make sure the last definition
! is what's stored
 
define axis/edge/t=1-jan-0001:1-jan-0004:1/unit=year/cal=noleap tax
define axis/t/like=tax tax2 = t[gt=tax]
show axis tax2
 name       axis              # pts   start                end
 TAX2      TIME                 3 r   02-JUL-0001 12:00    02-JUL-0003 12:00
T0 = 01-JAN-0000
CALENDAR = NOLEAP
   Axis span (to cell edges) = 3
 
! Keep the calendar from axis tax, change the time origin
define axis/t/like=tax/t0=01-JAN-1970 tax2 = {1,4,5,6,7}
show axis tax2
 name       axis              # pts   start                end
 TAX2      TIME                 5 i   01-JAN-1971 00:00    01-JAN-1977 00:00
T0 = 01-JAN-1970
CALENDAR = NOLEAP
   Axis span (to cell edges) = 8
 
! Intentional errors.
! The second command here is an error - tax is an axis not a var.
! Make sure we can recover from that error.
 
set mode ignore
define axis/edge/t=1-jan-0001:1-jan-0004:1/unit=year/cal=noleap tax
define axis/t/like=tax tax3 = tax
 
! the axis should be undisturbed
sh axis tax
 name       axis              # pts   start                end
 TAX       TIME                 3 r   02-JUL-0001 12:00    02-JUL-0003 12:00
T0 = 01-JAN-0000
CALENDAR = NOLEAP
   Axis span (to cell edges) = 3
 
set mode/last ignore
*** Running ferret script: bn_box_edges_fcn.jnl
! bn_box_edges_fcn.jnl
! Returns the cell edges of a 1-D variable
! 2/23/2018 *acm*  for part of issue 1618
 
sh func/details box_edges
BOX_EDGES(A)
    Returns the cell edge locations for the axis of a 1-D variable.
        Axes of result:
          X: ABSTRACT (result will occupy indices 1...N)
          Y: NORMAL (no axis)
          Z: NORMAL (no axis)
          T: NORMAL (no axis)
          E: NORMAL (no axis)
          F: NORMAL (no axis)
    A: Variable (FLOAT)
        Influence on output axes:
          X: no influence (indicate argument limits with "[]")
          Y: no influence (indicate argument limits with "[]")
          Z: no influence (indicate argument limits with "[]")
          T: no influence (indicate argument limits with "[]")
          E: no influence (indicate argument limits with "[]")
          F: no influence (indicate argument limits with "[]")
use levitus_3d_subset
 
! coordinate edges from z axis
list box_edges(temp[x=120,y=-48])
             VARIABLE : BOX_EDGES(TEMP[X=120,Y=-48])
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 21 points (X)
 1    /  1:     0.
 2    /  2:     5.
 3    /  3:    15.
 4    /  4:    25.
 5    /  5:    40.
 6    /  6:    62.
 7    /  7:    88.
 8    /  8:   125.
 9    /  9:   175.
 10   / 10:   250.
 11   / 11:   350.
 12   / 12:   500.
 13   / 13:   700.
 14   / 14:   900.
 15   / 15:  1100.
 16   / 16:  1350.
 17   / 17:  1750.
 18   / 18:  2500.
 19   / 19:  3500.
 20   / 20:  4500.
 21   / 21:  5000.
list box_edges(temp[x=120,y=-48,z=600:2000])
             VARIABLE : BOX_EDGES(TEMP[X=120,Y=-48,Z=600:2000])
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 7 points (X)
 1   / 1:   500.
 2   / 2:   700.
 3   / 3:   900.
 4   / 4:  1100.
 5   / 5:  1350.
 6   / 6:  1750.
 7   / 7:  2500.
 
! from y axis
list box_edges(temp[x=120,z=10])
             VARIABLE : BOX_EDGES(TEMP[X=120,Z=10])
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 3 points (X)
 1   / 1: -50.00
 2   / 2: -49.00
 3   / 3: -48.00
 
! 1-point grid in all directions, returns result for first encountered
list box_edges(temp[x=120,y=-48,z=2000])
             VARIABLE : BOX_EDGES(TEMP[X=120,Y=-48,Z=2000])
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 points (X)
 1   / 1:  120.0
 2   / 2:  121.0
 
! Get cell edges for one point on another axis
list box_edges(z[gz=temp,z=2000])
             VARIABLE : BOX_EDGES(Z[GZ=TEMP,Z=2000])
             FILENAME : levitus_3d_subset.nc
             SUBSET   : 2 points (X)
 1   / 1:  1750.
 2   / 2:  2500.
 
! intentional errors - multi-dimensioned argument
 
set mode ignore_errors
 
! multi-dimensioned argument
list box_edges(temp[z=100])
 
! degenerate grid arguments
 
list box_edges (12)
let a = 9
list box_edges (a)
 
! constant array has a nominal grid
let a = {1,3,5}
list box_edges (a)
             VARIABLE : BOX_EDGES (A)
             SUBSET   : 4 points (X)
 1   / 1:  0.500
 2   / 2:  1.500
 3   / 3:  2.500
 4   / 4:  3.500
 
 
set mode/last ignore_errors
*** Running ferret script: bn_hi_res_time.jnl
! bn_hi_res_time.jnl
! see issue 1856: delta-time less than a second
! listings and plots
 
show mode calendar
      MODE            STATE        ARGUMENT
      CALENDAR         SET         minutes
set mode calendar:seconds
 
! use /home/data/saildrone/examples/sub_hz_a.nc
! define axis/t/t0=1-jan-1970/units=seconds tax = time
! let temp_on_time = reshape(temp_ctd_mean, t[gt=tax])
! set view upper
! plot temp_on_time
 
 
define axis/t=1"02-SEP-2017:00:00:01":"02-SEP-2017:05:57":0.63/t0=1-jan-1970/units=seconds taxreg
let temp_on_time = cos(l[gt=taxreg]/1000)
 
! This plot is fine, showing 6 hours data
set v lower
plot/axes=0,1,1,1 temp_on_time
 
 
let temp_on_time = cos(l[gt=taxreg]/30)
 
! This plot is fine, showing 5 minutes' data
set view upper
plot/axes=0,1,1,1/t="2-sep-2017:01:00":"2-sep-2017:01:05" temp_on_time
 
! Time ranges under a minute needed improved labels including seconds
set view lower
plot/axes=0,1,1,1/t="2-sep-2017:01:00":"2-sep-2017:01:01" temp_on_time
 
! /T= translates fractional seconds
plot/t="02-SEP-2017 00:00:06.04":"02-SEP-2017 00:00:37.54" temp_on_time
 
! Labels on plots where T is orthogonal
!
define axis/x=10:330:10/units=degrees_east lonax
define axis/y=-80:80:10/units=degrees_north latax
let var = temp_on_time + x[gx=lonax]/10 - y[gy=latax]/10.
 
can view
 
! The time label should have fractional seconds,
shade/l=6 var
sh sym lab($labnum_t)
 !-> sh sym lab1
LAB1 = "TIME : 02-SEP-2017 00:00:04.15"
 
shade/l=1296 var
sh sym lab($labnum_t)
 !-> sh sym lab1
LAB1 = "TIME : 02-SEP-2017 00:13:36.85"
 
! Listings with fractional seconds
list/t="2-sep-2017:01:00:00":"2-sep-2017:01:00:03"/prec=5 temp_on_time
             VARIABLE : COS(L[GT=TAXREG]/30)
             SUBSET   : 5 points (TIME)
 02-SEP-2017 01:00:00.19 / 5714: -0.38970
 02-SEP-2017 01:00:00.82 / 5715: -0.42018
 02-SEP-2017 01:00:01.45 / 5716: -0.45019
 02-SEP-2017 01:00:02.08 / 5717: -0.47970
 02-SEP-2017 01:00:02.71 / 5718: -0.50867
 
! /T= translates fractional seconds
list/t=" 02-SEP-2017 01:00:01.45":"02-SEP-2017 01:00:02.08" /prec=5 temp_on_time
             VARIABLE : COS(L[GT=TAXREG]/30)
             SUBSET   : 2 points (TIME)
 02-SEP-2017 01:00:01.45 / 5716: -0.45019
 02-SEP-2017 01:00:02.08 / 5717: -0.47970
 
list tax_datestring(t[gt=taxreg,L=1:5], t[gt=taxreg], "seconds")
             VARIABLE : TAX_DATESTRING(T[GT=TAXREG,L=1:5], T[GT=TAXREG], "seconds")
             SUBSET   : 5 points (TIME)
 02-SEP-2017 00:00:01.0  / 1:"02-SEP-2017 00:00:01.0" 
 02-SEP-2017 00:00:01.63 / 2:"02-SEP-2017 00:00:01.63"
 02-SEP-2017 00:00:02.26 / 3:"02-SEP-2017 00:00:02.26"
 02-SEP-2017 00:00:02.89 / 4:"02-SEP-2017 00:00:02.89"
 02-SEP-2017 00:00:03.52 / 5:"02-SEP-2017 00:00:03.52"
 
! comma and tab delimited, one var.
 
 
list/t="2-sep-2017:01:00:00":"2-sep-2017:01:00:03"/form=comma temp_on_time
             VARIABLE : COS(L[GT=TAXREG]/30)
             BAD FLAG : -1.E+34       
             SUBSET   : 5 points (TIME)
02-SEP-2017 01:00:00.19,-0.3897
02-SEP-2017 01:00:00.82,-0.4202
02-SEP-2017 01:00:01.45,-0.4502
02-SEP-2017 01:00:02.08,-0.4797
02-SEP-2017 01:00:02.71,-0.5087
list/t="2-sep-2017:01:00:00":"2-sep-2017:01:00:03"/form=tab temp_on_time
             VARIABLE : COS(L[GT=TAXREG]/30)
             BAD FLAG : -1.E+34       
             SUBSET   : 5 points (TIME)
02-SEP-2017 01:00:00.19	-0.3897
02-SEP-2017 01:00:00.82	-0.4202
02-SEP-2017 01:00:01.45	-0.4502
02-SEP-2017 01:00:02.08	-0.4797
02-SEP-2017 01:00:02.71	-0.5087
 
! Multiple vars and time coords list the row header with time and index value.
! so that would be done with /NOROW
 
let var2_on_time = sin(l[gt=taxreg]/1400)
list/norow/t="2-sep-2017:01:00:00":"2-sep-2017:01:00:03"/form=comma tax_datestring(t[gt=taxreg], t[gt=taxreg], "seconds"), temp_on_time,var2_on_time
             TIME: 02-SEP-2017 01:00:00 to 02-SEP-2017 01:0
 Column  1: TAX_DATESTRING(T[GT=TAXREG], T[GT=TAXREG], "seconds")
 Column  2: TEMP_ON_TIME is COS(L[GT=TAXREG]/30)    BAD FLAG : -1.E+34
 Column  3: VAR2_ON_TIME is SIN(L[GT=TAXREG]/1400)    BAD FLAG : -1.E+34
(C001,V002),TEMP_ON_TIME,VAR2_ON_TIME
"02-SEP-2017 01:00:00.19",-0.3897,-0.8075  
"02-SEP-2017 01:00:00.82",-0.4202,-0.8079  
"02-SEP-2017 01:00:01.45",-0.4502,-0.8083  
"02-SEP-2017 01:00:02.08",-0.4797,-0.8087  
"02-SEP-2017 01:00:02.71",-0.5087,-0.8091  
 
!
! Note with these changes, and time resolution of minutes (mode calendar:minutes)
! the output for list/form=tab or list/form=comma is now correct. It changes
! from 17-AUG-1982 12,...  to   17-AUG-1982 12:00,...
 
set mode/last calendar
use gt4d011
list/L=1:3/K=1/form=comma taux[i=100,j=40]
             VARIABLE : ZONAL WIND STRESS (dynes/cm**2)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 3 points (TIME)
             LONGITUDE: 130W
             LATITUDE : 1.667S
          130W     
17-AUG-1982 12:00,-0.3303
23-AUG-1982 14:00,-0.2849
29-AUG-1982 16:00,-0.2395
 
! This is what these listings previously looked like
set mode calendar:hours
list/L=1:3/K=1/form=comma taux[i=100,j=40]
             VARIABLE : ZONAL WIND STRESS (dynes/cm**2)
             FILENAME : gt4d011.cdf
             BAD FLAG : -1.E+34       
             SUBSET   : 3 points (TIME)
             LONGITUDE: 130W
             LATITUDE : 1.667S
          130W     
17-AUG-1982 12,-0.3303
23-AUG-1982 14,-0.2849
29-AUG-1982 16,-0.2395
 
 
set mode/last calendar
*** Running ferret script: bn_A_I_format.jnl
!bn_A_I_format.jnl
! 3/2018  ACM  Issue 950
!
! Tests of LIST/FORMAT with Fortran formats that include the A specifier.
 
use clim_airt_lev
 
! Redefine time so the tax_datestring function returns year...
define axis/t=15-dec-2010:15-jan-2011/npoints=12 `airt,return=taxis`
 !-> define axis/t=15-dec-2010:15-jan-2011/npoints=12 TIME1
 
 
list/nohead/l=1:10/format=(a,f6.2) \
TAX_DATESTRING(t[g=airt],t[g=airt],"month"), airt[x=-135,y=0]
DEC-2010 25.38
DEC-2010 25.37
DEC-2010 26.83
DEC-2010 26.51
DEC-2010 26.52
DEC-2010 26.62
DEC-2010 25.69
JAN-2011 25.92
JAN-2011 25.41
JAN-2011 26.17
 
list/nohead/l=1:10/format=(a,e12.4,a5, F7.0) \
TAX_DATESTRING(t[g=airt],t[g=airt],"month"), airt[x=-135,y=0], TAX_DATESTRING(t[g=airt],t[g=airt],"year"), INT(airt[x=-135,y=0]*100)
DEC-2010  0.2538E+02 2010  2538.
DEC-2010  0.2537E+02 2010  2537.
DEC-2010  0.2683E+02 2010  2683.
DEC-2010  0.2651E+02 2010  2650.
DEC-2010  0.2652E+02 2010  2651.
DEC-2010  0.2662E+02 2010  2661.
DEC-2010  0.2569E+02 2010  2568.
JAN-2011  0.2592E+02 2011  2591.
JAN-2011  0.2541E+02 2011  2540.
JAN-2011  0.2617E+02 2011  2616.
 
! make sure we haven't broken existing numeric-only formatting
list/nohead/l=1:10/format=(F7.1, f8.3) airt[x=-135,y=0], airt[x=-135,y=-20]
   25.4  26.533
   25.4  26.861
   26.8  26.871
   26.5  26.425
   26.5  25.587
   26.6  24.309
   25.7  23.823
   25.9  23.615
   25.4  23.771
   26.2  24.199
 
list/nohead/l=1:10/format=(a,e12.4,a5, F7.0) \
TAX_DATESTRING(t[g=airt],t[g=airt],"month"), airt[x=-135,y=0], TAX_DATESTRING(t[g=airt],t[g=airt],"year"), INT(airt[x=-135,y=0]*100)
DEC-2010  0.2538E+02 2010  2538.
DEC-2010  0.2537E+02 2010  2537.
DEC-2010  0.2683E+02 2010  2683.
DEC-2010  0.2651E+02 2010  2650.
DEC-2010  0.2652E+02 2010  2651.
DEC-2010  0.2662E+02 2010  2661.
DEC-2010  0.2569E+02 2010  2568.
JAN-2011  0.2592E+02 2011  2591.
JAN-2011  0.2541E+02 2011  2540.
JAN-2011  0.2617E+02 2011  2616.
 
! using format to list parts of strings
let var =  {"Abcdefghijk"}
list/nohead/format=(a5, a7, a1, a4) var,var,var,var
AbcdeAbcdefgAAbcd
 
 
list/nohead/format=(a5, a7, a1, a4) {"Abcde"}, {"Abcdefg"}, {"A"}, {"Abcd"}
AbcdeAbcdefgAAbcd
 
! or to list a string with A formats longer than its length to make a gap
list/nohead/l=1:10/format=(a,e12.4,a9, F7.0) \
TAX_DATESTRING(t[g=airt],t[g=airt],"month"), airt[x=-135,y=0], TAX_DATESTRING(t[g=airt],t[g=airt],"year"), INT(airt[x=-135,y=0]*100)
DEC-2010  0.2538E+02     2010  2538.
DEC-2010  0.2537E+02     2010  2537.
DEC-2010  0.2683E+02     2010  2683.
DEC-2010  0.2651E+02     2010  2650.
DEC-2010  0.2652E+02     2010  2651.
DEC-2010  0.2662E+02     2010  2661.
DEC-2010  0.2569E+02     2010  2568.
JAN-2011  0.2592E+02     2011  2591.
JAN-2011  0.2541E+02     2011  2540.
JAN-2011  0.2617E+02     2011  2616.
 
! Integer formats
 
list/nohead/l=1:10/format=(i4, i6) airt[x=-135,y=-20], airt[x=-135,y=30]
  26    17
  26    16
  26    16
  26    16
  25    17
  24    19
  23    20
  23    21
  23    21
  24    20
 
list/nohead/l=1:10/format=(a,i6) \
TAX_DATESTRING(t[g=airt],t[g=airt],"month"), airt[x=-135,y=-20]
DEC-2010    26
DEC-2010    26
DEC-2010    26
DEC-2010    26
DEC-2010    25
DEC-2010    24
DEC-2010    23
JAN-2011    23
JAN-2011    23
JAN-2011    24
 
 
list/nohead/l=1:4/j=20:23/format=(i6) 10*airt[x=180]
   283
   283
   283
   283
   280
   281
   281
   281
   281
   281
   281
   281
   286
   286
   286
   286
 
 
list/nohead/l=1:10/format=(i4, f8.2, a14) airt[x=-135,y=-20], airt[x=-135,y=30], TAX_DATESTRING(t[g=airt],t[g=airt],"day")
  26   17.34   15-DEC-2010
  26   16.86   17-DEC-2010
  26   16.73   20-DEC-2010
  26   16.72   23-DEC-2010
  25   17.55   26-DEC-2010
  24   19.15   29-DEC-2010
  23   20.07   31-DEC-2010
  23   21.19   03-JAN-2011
  23   21.42   06-JAN-2011
  24   20.73   09-JAN-2011
 
 
! Intentional errors
set mode ignore
 
! Format too complex: one specifier per variable
list/nohead/l=1:0/format=(a,2x,f6.2,a5) \
TAX_DATESTRING(t[g=airt],t[g=airt],"month"), airt[x=-135,y=0], TAX_DATESTRING(t[g=airt],t[g=airt],"year")
 
! Old issue 554: On invalid format, report the allowed formats in msg
LIST/nohead/l=1:0/format=xxx airt[x=-135,y=0]
 
! need parentheses
list/nohead/format=a7 {"Abcde"}
 
! disallow multiples in I format
list/nohead/l=1:10/j=20:23/format=(4i6) 10*airt[x=180]
 
set mode/last ignore
*** Running ferret script: bn_center_keylab.jnl
! bn_center_keylab.jnl
! See issue 1607.
 
def ax/edge/x=0:10:1 xax
let a = x[gx=xax] + 0.01*randu(y[gy=1:9:1]) + y[gy=1:9:1]
 
cancel view
set view ul
shade/lev=(0,16,2)/key/title="/LEV=(0,16,2)/KEY" a
sh sym lev*
LEV_TEXT = "(0,16,2)"
LEV_MIN = "0"
LEV_MAX = "16"
LEV_NUM = "8"
LEV_DEL = "2"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "0,2,4,6,8,10,12,14,16"
set view ur
shade/lev=(1,15,2)/key=centerlab/title="/LEV=(1,15,2)/KEY=CENTERLAB" a
sh sym lev*
LEV_TEXT = "(1,15,2)"
LEV_MIN = "0"
LEV_MAX = "16"
LEV_NUM = "8"
LEV_DEL = "2"
LEV_CENTERED_LABELS = "on"
LEV_ALL = "0,2,4,6,8,10,12,14,16"
 
! centered-levels setting is restored to 'off' with the next plot that doesnt use it.
 
set v ll
shade/lev=(-inf)(4,14,2)(inf)/key/title="/LEV=(-inf)(4,14,2)(inf)/KEY" a
sh sym lev*
LEV_TEXT = "(-INF)(4,14,2)(INF)"
LEV_MIN = "open-ended"
LEV_MAX = "open-ended"
LEV_NUM = "7"
LEV_DEL = "irregular"
LEV_CENTERED_LABELS = "off"
LEV_ALL = "0.5034,4,6,8,10,12,14,19.5"
set v lr
shade/lev=(-inf)(5,13,2)(inf)/key=centerlab/title="/LEV=(-inf)(5,13,2)(inf)/KEY=CENTERLAB" a
 
frame/file=center_key_lab.gif
 
cancel view
 
! Ribbon plots
LET xpts = 180 + 50*COS(2*3.14*I[I=1:50]/60)
LET ypts = 15  + 20*SIN(2*3.14*I[I=1:50]/60)
LET varpts = 25 - ypts + RANDN(ypts)
 
plot/vs/ribbon/thick/sym=18/siz=0.15/lev=10/key=centerlab/hlim=120:250/vlim=-25:65 xpts, ypts, varpts
 
! Set of discrete values in the levels
 
LET/title=xpts xpts =   {1,2,3,4,5,6,7,8,9,10}
LET/title=ypts ypts = {1,1.5,1,1.5,1,1.5,1,1.5,1,1.5}
let/title=var varpts = {1,2,5,2,8,5,6,8,2,1}
 
set v ul
 
plot/vs/ribbon/thick/sym=18/siz=0.15/key=centerlab/lev=(1)(2)(5)(6)(8)/hlim=0:11/vlim=0:2 xpts, ypts, varpts
show sym lev*
LEV_TEXT = "(1)(2)(5)(6)(8)"
LEV_MIN = "0.5"
LEV_MAX = "9"
LEV_NUM = "5"
LEV_DEL = "irregular"
LEV_CENTERED_LABELS = "on"
LEV_ALL = "0.5,1.5,3.5,5.5,7,9"
set v ur
plot/vs/ribbon/thick/sym=18/siz=0.15/key=centerlab/lev=(1)(2)(5)(6)(8)/hlim=0:11/vlim=0:2/palette=ten_by_levels xpts, ypts, varpts
 
! Internally, by-value palettes are handled differently: don't interpolate the levels
set v ul
plot/vs/ribbon/thick=3/sym=18/siz=0.15/key=centerlab/lev=(1)(2)(5)(6)(8)/hlim=0:11/vlim=0:2/palette=koppen xpts, ypts, varpts
set v ur
plot/vs/ribbon/thick=3/sym=18/siz=0.15/key=centerlab/lev=(1,14,1)/hlim=0:11/vlim=0:2/palette=koppen xpts, ypts, xpts+2
show sym lev*
LEV_TEXT = "(1,14,1)"
LEV_MIN = "1"
LEV_MAX = "15"
LEV_NUM = "14"
LEV_DEL = "1"
LEV_CENTERED_LABELS = "on"
LEV_ALL = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15"
*** Running ferret script: bn741_bug_fixes.jnl
! bn741_bug_fixes.jnl
! test various fixes that went into version 7.41 ( released as 7.42)
! 4/18 *acm*
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err74_I_format
! err74_I_format.jnl
! Issue 1870
! 4/25/18 *acm*
 
let var = 55.12
list/nohead/format=("This header ", I5) var
This header    55
 
! This failed in v7.4 -- the code detected a case of Integer format, so
! converted internally to an integer before writing using the fmt statment.
 
list/nohead/format=("This header ", F5.2) var
This header 55.12
 
 
! Do some more testing.
! Intentional errors: Cannot specify text within the format
! if using I or A format and multiple vars
 
set mode ignore
let size = 12345
list/nohead/format=("This header ", I5, F8.2) size, var
 
let avar = "My Text"
list/nohead/format=("This header ", F8.2, A) avar, var
 
set mode/last ignore
 
! But can use multiple vars with I or A, one item in the format
! specifier per variable.
 
let mytext = "This header"
list/nohead/format=(A, F8.2) mytext, var
This header   55.12
 
list/nohead/format=(A, I5, F8.2) mytext, size, var
This header12345   55.12
 
! We do have flexibility if using floating-point formats
list/nohead/format=("This header ", 2F8.2) size, var
This header 12345.00   55.12
list/nohead/format=("This header ", F8.0, e12.2) size, var
This header   12345.    0.55E+02
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err74_append
! err74_append.jnl
! Issue 1871: append slabs along a non-time axis
! when the grid has an abstract axis in its append direction
 
! The same behavior occurs with X, Y, Z, E, F appending
 
use levitus_3d_subset
save/clobber/file=tmp0.nc temp[x=@MAX,y=@MAX]
save/clobber/file=tmp1.nc temp[x=@MIN,y=@MIN]
cancel data/all
 
! Define data on abstract E axis
let evals = esequence({1,2,3})
 
!!! This fixes it... So the issue is with Abstract E axis
! define axis/e=1:3:1 e3ax
! let evals = _e[ge=e5ax]
 
set data tmp0.nc
let etemp = temp + 0*evals
save/clobber/file=a.nc/mlimits=1:3/m=1 etemp
cancel data tmp0.nc
 
set data tmp1.nc
let etemp = temp + 0*evals
save/append/file=a.nc/m=2 etemp
 
let etemp = temp + 2*evals
save/append/file=a.nc/m=3 etemp
 
! Check the contents of the file. The previous behavior had data only at E=1
cancel var etemp
use a
list etemp
             VARIABLE : TEMP + 0*EVALS
             FILENAME : a.nc
             SUBSET   : 20 by 3 points (DEPTH (m)-E)
      ... listing every   2th point
            0      20     50    100    200    400    800    1200   2000   4000   
             1      3      5      7      9     11     13     15     17     19
 1   / 1:   7.92   7.91   7.58   7.44   7.07   6.38   4.66   3.08   2.27   ....
 2   / 2:   6.83   6.84   6.62   6.46   6.03   5.19   3.82   2.76   2.09   ....
 3   / 3:  12.83  12.84  12.62  12.46  12.03  11.19   9.82   8.76   8.09   ....
cancel data a.nc
 
! intentional error, writing from abstract axis indices
! that are outside initial range
set mode ignore
 
! Define data on abstract E axis
let evals = esequence({1,2,3,4,5})
 
set data tmp0.nc
let etemp = temp + 0*evals
save/clobber/file=a.nc/mlimits=1:3/m=1 etemp
cancel data tmp0.nc
 
set data tmp1.nc
let etemp = temp + 0*evals
save/append/file=a.nc/m=4 etemp
 
! Appending two e-steps. The previous behavior wrote the new
! data to steps 1:2 instead of 2:3.
cancel data/all
 
set data tmp0.nc
let etemp = temp + 0*evals
save/clobber/file=a.nc/mlimits=1:3/m=1 etemp
cancel data tmp0.nc
 
cancel var etemp
use a
list etemp
             VARIABLE : TEMP + 0*EVALS
             FILENAME : a.nc
             SUBSET   : 20 by 3 points (DEPTH (m)-E)
      ... listing every   2th point
            0      20     50    100    200    400    800    1200   2000   4000   
             1      3      5      7      9     11     13     15     17     19
 1   / 1:  7.918  7.907  7.584  7.436  7.073  6.377  4.665  3.076  2.274   ....
 2   / 2:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 3   / 3:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
cancel data a.nc
 
set data tmp1.nc
let etemp = temp + 2*evals
save/append/file=a.nc/m=2:3 etemp
 
cancel var etemp
use a
list etemp
             VARIABLE : TEMP + 0*EVALS
             FILENAME : a.nc
             SUBSET   : 20 by 3 points (DEPTH (m)-E)
      ... listing every   2th point
            0      20     50    100    200    400    800    1200   2000   4000   
             1      3      5      7      9     11     13     15     17     19
 1   / 1:   7.92   7.91   7.58   7.44   7.07   6.38   4.66   3.08   2.27   ....
 2   / 2:  10.83  10.84  10.62  10.46  10.03   9.19   7.82   6.76   6.09   ....
 3   / 3:  12.83  12.84  12.62  12.46  12.03  11.19   9.82   8.76   8.09   ....
cancel data a.nc
 
! Other tests of writing and appending data on abstract axes
cancel mode ignore
 
! Overwrite with /APPEND and previously would overwrite the new data at
! the start of what was written before. Only paid attention to the size of
! the region written. Now this is an error, coordinates outside file range.
 
set mode ignore
let avar = x
save/file=a.nc/clobber/i=21:29 avar
save/append/file=a.nc/i=41:46 avar
 
set mode ignore
 
! Overwrite with too many values is an error
 
let avar = x
save/append/file=a.nc/i=41:51 avar
 
! Inconsistent limits is a warning
 
cancel mode ignore
save/file=a.nc/clobber/i=21:35 avar[i=1:7]
 
cancel var avar
use a
list avar
             VARIABLE : X
             FILENAME : a.nc
             SUBSET   : 7 points (X)
 1   / 1:  1.000
 2   / 2:  2.000
 3   / 3:  3.000
 4   / 4:  4.000
 5   / 5:  5.000
 6   / 6:  6.000
 7   / 7:  7.000
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err74_labnum_datitl
! err74_labnum_datitl.jnl
! See issue 1873
! 5/3/18 ACM
 
! coads_climatology does not have a title attribute, but the
! dataset-title label and symbol was set, with blank value,
! and labnum_datitl was defined.
 
use coads_climatology
shade/l=1/x=180:200/y=-5:5 sst
sh sym lab*
LABX = "LONGITUDE"
LABY = "LATITUDE"
LABTIT = "SEA SURFACE TEMPERATURE (Deg C)"
LAB1 = "TIME : 16-JAN 06:00"
LABNUM_T = "1"
LAB2 = "DATA SET: coads_climatology"
LABNUM_DSET = "2"
 
! If there is a dataset title, then those symbols are
! set up correctly.
can data/all; use/title="Classic dataset" coads_climatology
shade/l=1/x=180:200/y=-5:5 sst
sh sym lab*
LABX = "LONGITUDE"
LABY = "LATITUDE"
LABTIT = "SEA SURFACE TEMPERATURE (Deg C)"
LAB1 = "TIME : 16-JAN 06:00"
LABNUM_T = "1"
LAB2 = "DATA SET: coads_climatology"
LABNUM_DSET = "2"
LAB3 = "Classic dataset"
LABNUM_DATITL = "3"
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err74_regrid_to_sameax
! err74__regrid_to_sameax.jnl
! 5/10/18
! Issue 1868: some regridding transformations
! should return something, not always a no-op.
 
def axis/x=1:4:1 xax
let two = 2+0*x[gx=xax]
save/clobber/file=two.nc two
cancel var two
 
 
use two.nc
!NGD
 
! should be all 1's where valid
list two, two[gx=xax@ngd]
             DATA SET: ./two.nc
             X: 0.5 to 4.5
 Column  1: TWO is 2+0*X[GX=XAX]
 Column  2: TWO[G=TWO on X@NGD] is 2+0*X[GX=XAX] (# of points)(regrid: TWO on X@NGD)
           TWO    TWO
1   / 1:  2.000  1.000
2   / 2:  2.000  1.000
3   / 3:  2.000  1.000
4   / 4:  2.000  1.000
 
!NBIN
! should be all 1's where valid
list two, two[gx=xax@nbin]
             DATA SET: ./two.nc
             X: 0.5 to 4.5
 Column  1: TWO is 2+0*X[GX=XAX]
 Column  2: TWO[G=TWO on X@NBIN] is 2+0*X[GX=XAX] (regrid: TWO on X@NBIN)
           TWO    TWO
1   / 1:  2.000  1.000
2   / 2:  2.000  1.000
3   / 3:  2.000  1.000
4   / 4:  2.000  1.000
 
 
! MODNGD, MODNBD
! MODNGD Should be 1 where good, 0 for bad
! vice versa for MODNBD
 
use coads_climatology
 
let sstg =  sst[gx=COADSX@modngd]
let sstb =  sst[gx=COADSX@modnbd]
stat/l=1/y=50 sstg
 
             SST[GX=COADSX@MODNGD]
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 49N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 180 (180*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 1
 Mean    value: 0.49444 (unweighted average)
 Standard deviation: 0.50136
stat/l=1/y=50 sstb
 
             SST[GX=COADSX@MODNBD]
             LONGITUDE: 20E to 20E(380)
             LATITUDE: 49N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: ./data/coads_climatology.cdf
 
 Total # of data points: 180 (180*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0
 Maximum value: 1
 Mean    value: 0.50556 (unweighted average)
 Standard deviation: 0.50136
 
list/l=1/y=40/x=210:250 sst, sst[gx=COADSX@modngd], sst[gx=COADSX@modnbd]
             DATA SET: ./data/coads_climatology.cdf
             LONGITUDE: 150W to 110W
             LATITUDE: 39N
             TIME: 16-JAN 06:00
 Column  1: SST is SEA SURFACE TEMPERATURE (Deg C)
 Column  2: SST[G=SST on X@MODNGD] is SEA SURFACE TEMPERATURE (# of points)(regrid: SST on X@MODNGD)
 Column  3: SST[G=SST on X@MODNBD] is SEA SURFACE TEMPERATURE (# of points)(regrid: SST on X@MODNBD)
                SST    SST    SST
149W   /  96:  12.91  1.000  0.000
147W   /  97:  13.13  1.000  0.000
145W   /  98:  13.38  1.000  0.000
143W   /  99:  13.41  1.000  0.000
141W   / 100:  13.51  1.000  0.000
139W   / 101:  13.60  1.000  0.000
137W   / 102:  13.77  1.000  0.000
135W   / 103:  13.79  1.000  0.000
133W   / 104:  13.80  1.000  0.000
131W   / 105:  13.49  1.000  0.000
129W   / 106:  13.16  1.000  0.000
127W   / 107:  12.65  1.000  0.000
125W   / 108:  11.83  1.000  0.000
123W   / 109:  11.72  1.000  0.000
121W   / 110:   ....  0.000  1.000
119W   / 111:   ....  0.000  1.000
117W   / 112:   ....  0.000  1.000
115W   / 113:   ....  0.000  1.000
113W   / 114:   ....  0.000  1.000
111W   / 115:   ....  0.000  1.000
 
! MODVAR
! should be 0 where valid, missing otherwise
 
list/l=1/y=40/x=210:250 sst, sst[gx=COADSX@modvar]
             DATA SET: ./data/coads_climatology.cdf
             LONGITUDE: 150W to 110W
             LATITUDE: 39N
             TIME: 16-JAN 06:00
 Column  1: SST is SEA SURFACE TEMPERATURE (Deg C)
 Column  2: SST[G=SST on X@MODVAR] is Variance of SEA SURFACE TEMPERATURE ((Deg C)^2)(regrid: SST on X@MODVAR)
                SST    SST
149W   /  96:  12.91  0.0000
147W   /  97:  13.13  0.0000
145W   /  98:  13.38  0.0000
143W   /  99:  13.41  0.0000
141W   / 100:  13.51  0.0000
139W   / 101:  13.60  0.0000
137W   / 102:  13.77  0.0000
135W   / 103:  13.79  0.0000
133W   / 104:  13.80  0.0000
131W   / 105:  13.49  0.0000
129W   / 106:  13.16  0.0000
127W   / 107:  12.65  0.0000
125W   / 108:  11.83  0.0000
123W   / 109:  11.72  0.0000
121W   / 110:   ....    ....
119W   / 111:   ....    ....
117W   / 112:   ....    ....
115W   / 113:   ....    ....
113W   / 114:   ....    ....
111W   / 115:   ....    ....
 
! @var regridding should be 0 where valid, missing otherwise
define axis/y=0:21:3/units=degrees_north yax
 
list/x=300/l=1 sst[gy=yax], sst[gy=yax@var]
             DATA SET: ./data/coads_climatology.cdf
             LATITUDE: 1.5S to 22.5N
             LONGITUDE: 61W
             TIME: 16-JAN 06:00
 Column  1: SST[G=3 deg on Y] is SEA SURFACE TEMPERATURE (Deg C)(regrid: 3 deg on Y)
 Column  2: SST[G=3 deg on Y@VAR] is Variance of SEA SURFACE TEMPERATURE ((Deg C)^2)(regrid: 3 deg on Y@VAR)
             SST     SST
0     / 1:   ....     ....
3N    / 2:   ....     ....
6N    / 3:   ....     ....
9N    / 4:  27.12  0.01891
12N   / 5:  26.75  0.00081
15N   / 6:  26.75  0.02797
18N   / 7:  26.12  0.03315
21N   / 8:  25.44  0.09389
list/x=300/l=1/y=0:20 sst, sst[gy=`sst,return=yaxis`@var]
 !-> list/x=300/l=1/y=0:20 sst, sst[gy=COADSY@var]
             DATA SET: ./data/coads_climatology.cdf
             LATITUDE: 0 to 20N
             LONGITUDE: 61W
             TIME: 16-JAN 06:00
 Column  1: SST is SEA SURFACE TEMPERATURE (Deg C)
 Column  2: SST[G=SST on Y@VAR] is Variance of SEA SURFACE TEMPERATURE ((Deg C)^2)(regrid: SST on Y@VAR)
              SST    SST
1N    / 46:   ....    ....
3N    / 47:   ....    ....
5N    / 48:   ....    ....
7N    / 49:   ....    ....
9N    / 50:  27.12  0.0000
11N   / 51:  26.78  0.0000
13N   / 52:  26.72  0.0000
15N   / 53:  26.75  0.0000
17N   / 54:  26.30  0.0000
19N   / 55:  25.94  0.0000
 
! IIN
! @iin regridding to the source axis
! Result is the same as the @IIN transformation but 0 at
! the start and results pushed up a cell.
 
define axis/edge/x=0:10:1 aline
let a = i[gx=aline]
 
! edges axis
define axis/x/like=`a,return=xaxis` aline_edges = box_edges(a)
 !-> define axis/x/like=ALINE aline_edges = box_edges(a)
 
let c = a[gx=aline_edges@iin]
let d = a[gx=aline@iin]
 
! Regrid to edges axis
list c
             VARIABLE : A[GX=ALINE_EDGES@IIN]
             SUBSET   : 11 points (X)
 0    /  1:   0.00
 1    /  2:   1.00
 2    /  3:   3.00
 3    /  4:   6.00
 4    /  5:  10.00
 5    /  6:  15.00
 6    /  7:  21.00
 7    /  8:  28.00
 8    /  9:  36.00
 9    / 10:  45.00
 10   / 11:  55.00
 
! Regrid to source axis.
list a, d, a[x=@iin]
             X: 0 to 10
 Column  1: A is I[GX=ALINE]
 Column  2: D is A[GX=ALINE@IIN]
 Column  3: A[X=@IIN] is I[GX=ALINE] (indef. integ. on X)
              A     D      A
0.5 /  1:   1.00   0.50   1.00
1.5 /  2:   2.00   2.00   3.00
2.5 /  3:   3.00   4.50   6.00
3.5 /  4:   4.00   8.00  10.00
4.5 /  5:   5.00  12.50  15.00
5.5 /  6:   6.00  18.00  21.00
6.5 /  7:   7.00  24.50  28.00
7.5 /  8:   8.00  32.00  36.00
8.5 /  9:   9.00  40.50  45.00
9.5 / 10:  10.00  50.00  55.00
 
! Time units
def ax/edge/t=1-jan-0001:1-jan-0004:365/unit=day/cal=noleap tax
let one = 1 + 0*t[gt=tax]
list one, one[t=@iin], one[gt=tax@iin]
             TIME: 01-JAN-0001 00:00 to 01-JAN-0004 00:00 NOLEAP
 Column  1: ONE is 1 + 0*T[GT=TAX]
 Column  2: ONE[T=@IIN] is 1 + 0*T[GT=TAX] (indef. integ. on T)
 Column  3: ONE[G=365 day on T@IIN] is 1 + 0*T[GT=TAX] (regrid: 365 day on T@IIN)
                ONE      ONE        ONE
JUL-0001 / 1:  1.000  3.154E+07  1.577E+07
JUL-0002 / 2:  1.000  6.307E+07  4.730E+07
JUL-0003 / 3:  1.000  9.461E+07  7.884E+07
 
! Gridding to an identical second axis, columns 3 and 4 match:
def ax/edge/t=1-jan-0001:1-jan-0004:365/unit=day/cal=noleap tax2
list one, one[t=@iin], one[gt=tax@iin],  one[gt=tax2@iin]
 WARNING: Listed variables have ambiguous coordinates on axes: T
 Column  1: ONE is 1 + 0*T[GT=TAX]
 Column  2: ONE[T=@IIN] is 1 + 0*T[GT=TAX] (indef. integ. on T)
 Column  3: ONE[G=365 day on T@IIN] is 1 + 0*T[GT=TAX] (regrid: 365 day on T@IIN)
 Column  4: ONE[G=365 day on T@IIN] is 1 + 0*T[GT=TAX] (regrid: 365 day on T@IIN)
         ONE      ONE        ONE        ONE
L / 1:  1.000  3.154E+07  1.577E+07  1.577E+07
L / 2:  1.000  6.307E+07  4.730E+07  4.730E+07
L / 3:  1.000  9.461E+07  7.884E+07  7.884E+07
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err74_single_level_contour
! err74_single_level_contour.jnl
! Issue 1874: precision of single levels on contour lines
 
! These levels are labeled fine:
use coads_climatology
 
set view ul; go margins 0.5 0.5 0.8 1
 
fill/nolab/l=1/x=300:380/y=-40:10/pal=grayscale/lev=(-inf)(15.3,27.3,0.4)(inf) sst
cont/l=1/lev=(17.7)/ov/nolab/color=lightblue  sst
cont/l=1/lev=(24.9)/ov/nolab/color=blue sst
contour/l=1/lev=(26.15)/ov/nolab/color=red  sst
 
! magnitude of the numbers given affects it
set view ur; go margins 0.5 0.5 0.8 1
let sst2 = 2*sst
fill/nolab/l=1/x=300:380/y=-40:10/pal=grayscale/lev=(-inf)(30.6,54.6,0.8)(inf) sst2
cont/l=1/lev=(35.4)/ov/nolab/color=lightblue  sst2
cont/l=1/lev=(49.8)/ov/nolab/color=blue sst2
contour/l=1/lev=(52.34)/ov/nolab/color=red  sst2
 
! small values
set view ll; go margins 0.5 0.5 0.8 1
let sst2 = sst/50
fill/nolab/l=1/x=300:380/y=-40:10/pal=grayscale/lev=(-inf)(.306,.546,0.008)(inf) sst2
cont/l=1/lev=(.354)/ov/nolab/color=lightblue  sst2
! What about /SIGDIG? It should override what is done automatically
cont/l=1/lev=(.468)/sigdig=2/ov/nolab/color=blue sst2
contour/l=1/lev=(.5234)/sigdig=3/ov/nolab/color=red  sst2
 
frame /file=single_contour_levels.gif
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err74_transform_constants
! err74_transform_constants.jnl
! 6/13/2018 acm
! See issue 1868
!
! Non-regridding transformations of scalars
let a = 2
 
list a[x=@nbd]
             VARIABLE : 2 (# of points)
          0.0000
list a[x=@ngd]
             VARIABLE : 2 (# of points)
          1.000
list a[x=@ave]
             VARIABLE : 2
          2.000
list a[x=@sum]
             VARIABLE : 2
          2.000
 
! All of these should return an error.
 
set mode ignore
list a[x=@var]
list a[x=@shf]
list a[x=@ddc]
list a[x=@ddf]
list a[x=@ddb]
list a[x=@din]
list a[x=@iin]
list a[x=@loc:3]
list a[x=@weq]
list a[x=@cda]
list a[x=@cdb]
list a[x=@cia]
list a[x=@cib]
list a[x=@evn:3]
list a[x=@std]
list a[x=@wgt]
 
! smoothers can return the constant's value
list a[x=@sbx]
list a[x=@fav]
 
set mode /last ignore
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err74_data_inf
! err74_data_inf.jnl
! Issue 1878: Listing data containing only value of "infinity"
! crashed Ferret.
 
! value at L=14 is Infinity
 
set mode ignore
 
use inf.nc
list/l=14 time
             VARIABLE : TIME (hours since 1979-01-01 00:00:00)
                        invalid coordinate axis
             DATA SET : Hourly Argos-tracked drifters location and velocity estimates, with 95% confidence intervals
             FILENAME : inf.nc
             T        : 14
         Inf
 
set mode /last ignore
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err74_2Dave_partial_cell
! err74_2Dave_partial_cell.jnl
! 7/5/2019 ACM
!
! Issue 1880: 2D average, with a partial cell at the start or end
! has been incorrect since v7.2, when there were updates to memory
! managementand scatter/gather transformations.
 
! Define a simple variable
def ax/edge/x=0:2:1 xax; def ax/edge/y=0:2:1 yax; let a = x[gx=xax] + y[gy=yax]
 
list/nohead a
 0.5 / 1:  1.000  2.000
 1.5 / 2:  2.000  3.000
list/nohead a[x=@ave,y=@ave]
          2.000
 
! compare 2D, XY ave with separate averages X then Y and Y then X
let b = a[x=@ave]
let c = a[y=@ave]
 
list/nohead a[x=@ave,y=@ave], b[y=@ave], c[x=@ave]
I / *:     2.000  2.000  2.000
 
! partial cell at the top
list/nohead/x=0:1.5 a[x=@ave,y=@ave], b[y=@ave], c[x=@ave]
I / *:     1.833  1.833  1.833
 
! Partial cell at the bottom
list/nohead/x=0.5:2 a[x=@ave,y=@ave], b[y=@ave], c[x=@ave]
I / *:     2.167  2.167  2.167
 
!@DIN
 
list/nohead a[x=@din,y=@din]
          8.000
 
! compare 2D, XY din with separate def integral X then Y and Y then X
let b = a[x=@din]
let c = a[y=@din]
 
list/nohead a[x=@din,y=@din], b[y=@din], c[x=@din]
I / *:     8.000  8.000  8.000
 
! partial cell at the top
list/nohead/x=0:1.5 a[x=@din,y=@din], b[y=@din], c[x=@din]
I / *:     5.500  5.500  5.500
 
! Partial cell at the bottom
list/nohead/x=0.5:2 a[x=@din,y=@din], b[y=@din], c[x=@din]
I / *:     6.500  6.500  6.500
 
 
 
! STD multi dimension
! set list/prec=5  (matches results of Ferret v7.0)
 
def ax/edge/x=0:22:1 xax
def ax/edge/y=0:22:1 yax
let a = x[gx=xax] + y[gy=yax]
 
list/nohead a[x=@std,y=@std]
          8.972
 
! partial cell at the top
list/nohead/x=0:1.5 a[x=@std,y=@std]
          6.362
 
! Partial cell at the bottom
list/nohead/x=0.5:2 a[x=@std,y=@std]
          6.362
 
set list/prec=4
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err74_dotsym
! err74_dotsym.jnl
! 7/9/18 ACM
! Issue 1881 Large number of points in PLOT/OVER/VS/SYM=dot hangs Ferret
 
define axis/x=1:359:2/units=degrees_east xaxis
define axis/y=-90:90:1/units=degrees_north yaxis
let xpts = x[gx=xaxis]  + 0*y[gy=yaxis]
let ypts = 0* x[gx=xaxis]  + y[gy=yaxis]
shade xpts
plot/vs/over/sym=dot xpts, ypts
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err74_save_bounds
! err74_save_bounds.jnl
! Appending irregular time to a file without time bounds.
! Caused an error: Ferret wanted to write bounds anyway.  If the file
! being appended does not have bounds, and they didn't specify /BOUNDS,
! then just append w/o bounds.
!
! v7.4 and previous had a bug also with /NOBOUNDS when the axis is
! defined as /MONTHLY. It wrote the bounds anyway.
 
define axis/monthly/t=1-jan-2000:31-dec-2020:1/t0=1-jan-2000 monthax
let tvar = l[gt=monthax]
save/clobber/nobounds/file=a.nc tvar
 
cancel var tvar
cancel axis monthax
 
! Note there is no MONTHAX:bounds = "MONTHAX_bnds" attribute
sp ncdump -h a.nc
netcdf a {
dimensions:
	MONTHAX = UNLIMITED ; // (252 currently)
variables:
	double MONTHAX(MONTHAX) ;
		MONTHAX:units = "days since 2000-01-01" ;
		MONTHAX:axis = "T" ;
		MONTHAX:calendar = "GREGORIAN" ;
		MONTHAX:time_origin = "1-JAN-2000" ;
		MONTHAX:standard_name = "time" ;
	double TVAR(MONTHAX) ;
		TVAR:missing_value = -1.e+34 ;
		TVAR:_FillValue = -1.e+34 ;
		TVAR:long_name = "L[GT=MONTHAX]" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
! Write a couple of subsets.
 
! First, with save/nobounds
use a
save/nobounds/clobber/t=1-mar-2014:15-feb-2016/file=monthA.nc tvar
sp ncdump -h monthA.nc
netcdf monthA {
dimensions:
	MONTHAX = UNLIMITED ; // (25 currently)
variables:
	double MONTHAX(MONTHAX) ;
		MONTHAX:units = "days since 2000-01-01" ;
		MONTHAX:axis = "T" ;
		MONTHAX:calendar = "GREGORIAN" ;
		MONTHAX:time_origin = "1-JAN-2000" ;
		MONTHAX:standard_name = "time" ;
	double TVAR(MONTHAX) ;
		TVAR:missing_value = -1.e+34 ;
		TVAR:_FillValue = -1.e+34 ;
		TVAR:long_name = "L[GT=MONTHAX]" ;
		TVAR:history = "From a" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
! If we don't specify anything for bounds, this file is saved with bounds
save/clobber/file=monthB.nc/t=1-mar-2016:31-dec-2018 tvar
sp ncdump -h monthB.nc
netcdf monthB {
dimensions:
	MONTHAX = UNLIMITED ; // (35 currently)
	bnds = 2 ;
variables:
	double MONTHAX(MONTHAX) ;
		MONTHAX:units = "days since 2000-01-01" ;
		MONTHAX:axis = "T" ;
		MONTHAX:calendar = "GREGORIAN" ;
		MONTHAX:time_origin = "1-JAN-2000" ;
		MONTHAX:standard_name = "time" ;
		MONTHAX:bounds = "MONTHAX_bnds" ;
	double MONTHAX_bnds(MONTHAX, bnds) ;
	double TVAR(MONTHAX) ;
		TVAR:missing_value = -1.e+34 ;
		TVAR:_FillValue = -1.e+34 ;
		TVAR:long_name = "L[GT=MONTHAX]" ;
		TVAR:history = "From a" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
can var/all; can axis monthax; can data/all
 
! Now we want to append the data in monthB.nc to monthA.nc
use monthB
 
! Previously this was an error: complained about not finding MONTHAX_bnds variable.
! Now the save detects that the original file doesn't have bounds, and just doesn't
! write them.
 
save/append/file=monthA.nc/t=1-mar-2016:31-dec-2017  tvar
 
! File monthA is written without error and does not havet time bouunds
! The appended axis, now of length without time bounds
sp ncdump -h monthA.nc
netcdf monthA {
dimensions:
	MONTHAX = UNLIMITED ; // (47 currently)
variables:
	double MONTHAX(MONTHAX) ;
		MONTHAX:units = "days since 2000-01-01" ;
		MONTHAX:axis = "T" ;
		MONTHAX:calendar = "GREGORIAN" ;
		MONTHAX:time_origin = "1-JAN-2000" ;
		MONTHAX:standard_name = "time" ;
	double TVAR(MONTHAX) ;
		TVAR:missing_value = -1.e+34 ;
		TVAR:_FillValue = -1.e+34 ;
		TVAR:long_name = "L[GT=MONTHAX]" ;
		TVAR:history = "From a" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
! File monthA is written without error and does not havet time bouunds
! The appended axis, now of length without time bounds
sp ncdump -h monthA.nc
netcdf monthA {
dimensions:
	MONTHAX = UNLIMITED ; // (47 currently)
variables:
	double MONTHAX(MONTHAX) ;
		MONTHAX:units = "days since 2000-01-01" ;
		MONTHAX:axis = "T" ;
		MONTHAX:calendar = "GREGORIAN" ;
		MONTHAX:time_origin = "1-JAN-2000" ;
		MONTHAX:standard_name = "time" ;
	double TVAR(MONTHAX) ;
		TVAR:missing_value = -1.e+34 ;
		TVAR:_FillValue = -1.e+34 ;
		TVAR:long_name = "L[GT=MONTHAX]" ;
		TVAR:history = "From a" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
 
! Its still an error to try to append with /bounds
set mode ignore
save/append/file=monthA.nc/t=1-dec-2018:31-dec-2018/bounds  tvar
 
set mode/last ignore
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err741_fillvalue_nan
! err741_fillvalue_nan.jnl
! issue 1883.  _FillValue = nan, no missing_value
 
! _FillValue is NaN in longitude and latitude too.
 
use dsg_fill_is_nan
 
show att TEMP_IR_UNCOR_MEAN
     attributes for dataset: ./data/dsg_fill_is_nan.nc
 temp_ir_uncor_mean._FillValue = NaN
 temp_ir_uncor_mean.standard_name = sea_surface_skin_temperature 
 temp_ir_uncor_mean.long_name = Skin temperature 
 temp_ir_uncor_mean.units = degrees_c 
show att O2_RBR_SAT_MEAN
     attributes for dataset: ./data/dsg_fill_is_nan.nc
 o2_rbr_sat_mean.missing_value = NaN
 o2_rbr_sat_mean.long_name = Oxygen saturation 
 o2_rbr_sat_mean.units = percent 
 
! The nan must be replaced in the longitude and latitude coordinate variables
! missing-values are ok (for now?) in DSG files for any coordinate except time
 
plot O2_RBR_SAT_MEAN
 
! previously TEMP_IR_UNCOR_MEAN with only a _FillValue of NaN
! and no missing_vlue had no fill or missing attribute written
 
save/clobber/file=a.nc TEMP_IR_UNCOR_MEAN,O2_RBR_SAT_MEAN
sp ncdump -h a.nc
netcdf a {
dimensions:
	trajectory = 1 ;
	obs = 10 ;
variables:
	float trajectory(trajectory) ;
		trajectory:long_name = "Trajectory/Drone ID" ;
		trajectory:cf_role = "trajectory_id" ;
	int rowsize(trajectory) ;
		rowsize:long_name = "Number of Observations for this Trajectory" ;
		rowsize:sample_dimension = "obs" ;
	double longitude(obs) ;
		longitude:missing_value = -1.e+34 ;
		longitude:_FillValue = -1.e+34 ;
		longitude:long_name = "longitude" ;
		longitude:axis = "X" ;
		longitude:units = "degrees_east" ;
		longitude:actual_range = 290., 355. ;
		longitude:history = "From dsg_fill_is_nan" ;
	double latitude(obs) ;
		latitude:missing_value = -1.e+34 ;
		latitude:_FillValue = -1.e+34 ;
		latitude:long_name = "latitude" ;
		latitude:axis = "Y" ;
		latitude:units = "degrees_north" ;
		latitude:actual_range = 10., 40. ;
		latitude:history = "From dsg_fill_is_nan" ;
	double time(obs) ;
		time:axis = "T" ;
		time:long_name = "Time" ;
		time:point_spacing = "uneven" ;
		time:time_origin = "01-JAN-1970 00:00:00" ;
		time:units = "seconds since 1970-01-01T00:00:00Z" ;
		time:history = "From dsg_fill_is_nan" ;
	double temp_ir_uncor_mean(obs) ;
		temp_ir_uncor_mean:_FillValue = -1.e+34 ;
		temp_ir_uncor_mean:long_name = "Skin temperature" ;
		temp_ir_uncor_mean:units = "degrees_c" ;
		temp_ir_uncor_mean:history = "From dsg_fill_is_nan" ;
	double o2_rbr_sat_mean(obs) ;
		o2_rbr_sat_mean:missing_value = -1.e+34 ;
		o2_rbr_sat_mean:long_name = "Oxygen saturation" ;
		o2_rbr_sat_mean:units = "percent" ;
		o2_rbr_sat_mean:history = "From dsg_fill_is_nan" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
		:featureType = "Trajectory" ;
}
 
*** Running ferret script: bn_use_agg.jnl
! bn_use_agg.jnl
! 5/20/2018  ACM
! The syntax "use myagg.agg" runs Ferret commands in the journal file myagg.agg
! which initialize an aggregation dataset, treating .agg file as a dataset.
! as of 5/20/18, the .agg extension is not needed (issue 1651)
 
! The .agg file in a directory with path spelled out, but w/o the .agg extension
 
! Assumes the current working directory is the bench subdirectory
define symbol pwd `SPAWN("pwd")`
 !-> define symbol pwd ....../bench
use  ($pwd)/v7jnls/four
 !-> SET DAT/FORM=CDF  ....../bench/v7jnls/four
! Example .agg file, used to initialize an aggregation
 
ensemble fourfiles =  ens1, ens3, ens2, ens4
 
show data
     currently SET data sets:
    5> fourfiles  (default)  Ensemble aggregation
 name     title                             I         J         K         L         M         N
 SST      SST_IN                           1:10      1:9       ...       1:12      1:4       ...
 ------------------------------
 MEMBER_DSET
          Member dataset names in Ensembl  ...       ...       ...       ...       1:4       ...
 TITLE    Global Att *title* in Ensemble   ...       ...       ...       ...       1:4       ...
 HISTORY  Global Att *history* in Ensembl  ...       ...       ...       ...       1:4       ...
 CONVENTIONS
          Global Att *Conventions* in Ens  ...       ...       ...       ...       1:4       ...
 MODEL    Global Att *MODEL* in Ensemble   ...       ...       ...       ...       1:4       ...
 NUMBER   Global Att *NUMBER* in Ensemble  ...       ...       ...       ...       1:4       ...
 
can data/all
 
! .agg file found in directory in the FER_GO paths
 
use four.agg
! Example .agg file, used to initialize an aggregation
 
ensemble fourfiles =  ens1, ens3, ens2, ens4
 
 
show data
     currently SET data sets:
    5> fourfiles  (default)  Ensemble aggregation
 name     title                             I         J         K         L         M         N
 SST      SST_IN                           1:10      1:9       ...       1:12      1:4       ...
 ------------------------------
 MEMBER_DSET
          Member dataset names in Ensembl  ...       ...       ...       ...       1:4       ...
 TITLE    Global Att *title* in Ensemble   ...       ...       ...       ...       1:4       ...
 HISTORY  Global Att *history* in Ensembl  ...       ...       ...       ...       1:4       ...
 CONVENTIONS
          Global Att *Conventions* in Ens  ...       ...       ...       ...       1:4       ...
 MODEL    Global Att *MODEL* in Ensemble   ...       ...       ...       ...       1:4       ...
 NUMBER   Global Att *NUMBER* in Ensemble  ...       ...       ...       ...       1:4       ...
 
can data/all
 
! found in a directory in the FER_GO paths, w/o extension
use four
! Example .agg file, used to initialize an aggregation
 
ensemble fourfiles =  ens1, ens3, ens2, ens4
 
show data
     currently SET data sets:
    5> fourfiles  (default)  Ensemble aggregation
 name     title                             I         J         K         L         M         N
 SST      SST_IN                           1:10      1:9       ...       1:12      1:4       ...
 ------------------------------
 MEMBER_DSET
          Member dataset names in Ensembl  ...       ...       ...       ...       1:4       ...
 TITLE    Global Att *title* in Ensemble   ...       ...       ...       ...       1:4       ...
 HISTORY  Global Att *history* in Ensembl  ...       ...       ...       ...       1:4       ...
 CONVENTIONS
          Global Att *Conventions* in Ens  ...       ...       ...       ...       1:4       ...
 MODEL    Global Att *MODEL* in Ensemble   ...       ...       ...       ...       1:4       ...
 NUMBER   Global Att *NUMBER* in Ensemble  ...       ...       ...       ...       1:4       ...
 
can data/all
 
 
! The more complex example from bn_aggregate_u, aggregate in U, T, E, F.
 
! If aggregate_tef script has alrady run, leaving the example files
! it writes in tmp/, reuse those, otherwise create them.
 
! check for those files.
IF `test_opendap("tmp/f03_e2_t3.nc") NE 0` THEN
 !-> IF 0 THEN
ENDIF
 
use bigagg
! Example .agg file, used to initialize an aggregation
 
 
! *** create an artificial file collection with another variable, fcst_3 ***
 
! a 20x20 lat-long region
define axis/x=140e:160e:1 xax
define axis/y=10n:20n:1 yax
define axis/Z=0:500:500/EDGES/units=m zax   ! a single point axis
 
! a 20 year regular monthly axis starting in Jan 1950
DEFINE AXIS/UNITS=DAYS/T0=01-JAN-1900/EDGES/T=01-JAN-1950:31-DEC-1970:`365.2425/12` monthly
 !-> DEFINE AXIS/UNITS=DAYS/T0=01-JAN-1900/EDGES/T=01-JAN-1950:31-DEC-1970:30.436875 monthly
 
! define a moving field with errors increasing from a given forecast date
let vy = 1/500      ! speed that forecast structure deviates from truth
let vx = (1+(T[gt=monthly]-tstart)/2000)* 1/300
let xt = x[gx=xax]-vx*T[gt=monthly]
let yt = y[gy=yax]-vy*T[gt=monthly]
let field = COS((xt-150)/5)*COS((yt-30)/5) + Z[gz=zax]
let fcst = ensemble_variation * (field + fcst_error)
define attribute fcst.im_everywhere = "so promote me"
set variable/title="some variable" fcst
let static_error = SIN((x[gx=xax]-140)/5)*SIN((y[gy=yax]-20)/5) + RANDU(x[gx=xax]+y[gy=yax])
let structure_drift = (t[gt=monthly]-tstart)/5000 * static_error
let random_error = (t[gt=monthly]-tstart)/2000 * RANDU(t[gt=monthly]+x[gx=xax]+y[gy=yax])
let fcst_error = structure_drift + random_error
 
! Define another variable fcst_3
let/title="another variable" fcst_3 = fcst + 3 + 0.1*fcst_error
 
 
repeat/name=fdate/range=1:7:3 (\
  let tstart = t[gt=monthly,l=`fdate`];\
  repeat/name=ens/range=1:2:1 (\
    let ensemble_variation = 1 + (ens-3)/20;\
    let realization = `ens`;\
    save/clobber/file="tmp/f`(fdate-1)/3+1,zw=2`_e`ens`_tu1.nc"/l=`fdate`:`fdate+11` fcst_3, realization;\
    save/clobber/file="tmp/f`(fdate-1)/3+1,zw=2`_e`ens`_tu2.nc"/l=`fdate+12`:`fdate+23` fcst_3, realization;\
    save/clobber/file="tmp/f`(fdate-1)/3+1,zw=2`_e`ens`_tu3.nc"/l=`fdate+24`:`fdate+35` fcst_3, realization))
!-> REPEAT: FDATE:1
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=1]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> LIST/FORMAT=CDF/clobber/file="tmp/f01_e1_tu1.nc"/l=1:12 fcst_3, realization
 !-> LIST/FORMAT=CDF/clobber/file="tmp/f01_e1_tu2.nc"/l=13:24 fcst_3, realization
 !-> LIST/FORMAT=CDF/clobber/file="tmp/f01_e1_tu3.nc"/l=25:36 fcst_3, realization
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> LIST/FORMAT=CDF/clobber/file="tmp/f01_e2_tu1.nc"/l=1:12 fcst_3, realization
 !-> LIST/FORMAT=CDF/clobber/file="tmp/f01_e2_tu2.nc"/l=13:24 fcst_3, realization
 !-> LIST/FORMAT=CDF/clobber/file="tmp/f01_e2_tu3.nc"/l=25:36 fcst_3, realization
!-> REPEAT: FDATE:4
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=4]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> LIST/FORMAT=CDF/clobber/file="tmp/f02_e1_tu1.nc"/l=4:15 fcst_3, realization
 !-> LIST/FORMAT=CDF/clobber/file="tmp/f02_e1_tu2.nc"/l=16:27 fcst_3, realization
 !-> LIST/FORMAT=CDF/clobber/file="tmp/f02_e1_tu3.nc"/l=28:39 fcst_3, realization
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> LIST/FORMAT=CDF/clobber/file="tmp/f02_e2_tu1.nc"/l=4:15 fcst_3, realization
 !-> LIST/FORMAT=CDF/clobber/file="tmp/f02_e2_tu2.nc"/l=16:27 fcst_3, realization
 !-> LIST/FORMAT=CDF/clobber/file="tmp/f02_e2_tu3.nc"/l=28:39 fcst_3, realization
!-> REPEAT: FDATE:7
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=7]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> LIST/FORMAT=CDF/clobber/file="tmp/f03_e1_tu1.nc"/l=7:18 fcst_3, realization
 !-> LIST/FORMAT=CDF/clobber/file="tmp/f03_e1_tu2.nc"/l=19:30 fcst_3, realization
 !-> LIST/FORMAT=CDF/clobber/file="tmp/f03_e1_tu3.nc"/l=31:42 fcst_3, realization
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> LIST/FORMAT=CDF/clobber/file="tmp/f03_e2_tu1.nc"/l=7:18 fcst_3, realization
 !-> LIST/FORMAT=CDF/clobber/file="tmp/f03_e2_tu2.nc"/l=19:30 fcst_3, realization
 !-> LIST/FORMAT=CDF/clobber/file="tmp/f03_e2_tu3.nc"/l=31:42 fcst_3, realization
 
cancel variables/all
 
! ***** end of TEFU file creation ****************
 
SET MODE VERIFY
! define T aggregations
 
! timeseries of files with variable fcst_1
repeat/name=fdate/range=1:7:3 (\
  let tstart = t[gt=monthly,l=`fdate`];\
  repeat/name=ens/range=1:2:1 (\
    let realization = `ens`;\
    TSERIES  t_f`(fdate-1)/3+1,zw=2`_e`ens` = SPAWN("ls -1 tmp/f`(fdate-1)/3+1,zw=2`_e`ens`_t?.nc")  ))
!-> REPEAT: FDATE:1
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=1]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> DEFINE DATA/AGGREGAT/T  t_f01_e1 = SPAWN("ls -1 tmp/f01_e1_t?.nc")
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> DEFINE DATA/AGGREGAT/T  t_f01_e2 = SPAWN("ls -1 tmp/f01_e2_t?.nc")
!-> REPEAT: FDATE:4
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=4]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> DEFINE DATA/AGGREGAT/T  t_f02_e1 = SPAWN("ls -1 tmp/f02_e1_t?.nc")
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> DEFINE DATA/AGGREGAT/T  t_f02_e2 = SPAWN("ls -1 tmp/f02_e2_t?.nc")
!-> REPEAT: FDATE:7
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=7]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> DEFINE DATA/AGGREGAT/T  t_f03_e1 = SPAWN("ls -1 tmp/f03_e1_t?.nc")
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> DEFINE DATA/AGGREGAT/T  t_f03_e2 = SPAWN("ls -1 tmp/f03_e2_t?.nc")
 
! timeseries of files with variable fcst_3
repeat/name=fdate/range=1:7:3 (\
  let tstart = t[gt=monthly,l=`fdate`];\
  repeat/name=ens/range=1:2:1 (\
    let realization = `ens`;\
    TSERIES  t_f`(fdate-1)/3+1,zw=2`_e`ens`_3 = SPAWN("ls -1 tmp/f`(fdate-1)/3+1,zw=2`_e`ens`_tu?.nc")  ))
!-> REPEAT: FDATE:1
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=1]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> DEFINE DATA/AGGREGAT/T  t_f01_e1_3 = SPAWN("ls -1 tmp/f01_e1_tu?.nc")
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> DEFINE DATA/AGGREGAT/T  t_f01_e2_3 = SPAWN("ls -1 tmp/f01_e2_tu?.nc")
!-> REPEAT: FDATE:4
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=4]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> DEFINE DATA/AGGREGAT/T  t_f02_e1_3 = SPAWN("ls -1 tmp/f02_e1_tu?.nc")
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> DEFINE DATA/AGGREGAT/T  t_f02_e2_3 = SPAWN("ls -1 tmp/f02_e2_tu?.nc")
!-> REPEAT: FDATE:7
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=7]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> DEFINE DATA/AGGREGAT/T  t_f03_e1_3 = SPAWN("ls -1 tmp/f03_e1_tu?.nc")
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> DEFINE DATA/AGGREGAT/T  t_f03_e2_3 = SPAWN("ls -1 tmp/f03_e2_tu?.nc")
 
cancel variable realization
 
SET MODE VERIFY
! now union these to make datsets with fcnst_1 and fcst_3.
 
show data/files/br;
     currently SET data sets:
    1> t_f01_e1
tmp/f01_e1_t1.nc
tmp/f01_e1_t2.nc
tmp/f01_e1_t3.nc
 
    2> t_f01_e2
tmp/f01_e2_t1.nc
tmp/f01_e2_t2.nc
tmp/f01_e2_t3.nc
 
    3> t_f02_e1
tmp/f02_e1_t1.nc
tmp/f02_e1_t2.nc
tmp/f02_e1_t3.nc
 
    4> t_f02_e2
tmp/f02_e2_t1.nc
tmp/f02_e2_t2.nc
tmp/f02_e2_t3.nc
 
    5> t_f03_e1
tmp/f03_e1_t1.nc
tmp/f03_e1_t2.nc
tmp/f03_e1_t3.nc
 
    6> t_f03_e2
tmp/f03_e2_t1.nc
tmp/f03_e2_t2.nc
tmp/f03_e2_t3.nc
 
    7> t_f01_e1_3
tmp/f01_e1_tu1.nc
tmp/f01_e1_tu2.nc
tmp/f01_e1_tu3.nc
 
    8> t_f01_e2_3
tmp/f01_e2_tu1.nc
tmp/f01_e2_tu2.nc
tmp/f01_e2_tu3.nc
 
    9> t_f02_e1_3
tmp/f02_e1_tu1.nc
tmp/f02_e1_tu2.nc
tmp/f02_e1_tu3.nc
 
   10> t_f02_e2_3
tmp/f02_e2_tu1.nc
tmp/f02_e2_tu2.nc
tmp/f02_e2_tu3.nc
 
   11> t_f03_e1_3
tmp/f03_e1_tu1.nc
tmp/f03_e1_tu2.nc
tmp/f03_e1_tu3.nc
 
   12> t_f03_e2_3  (default)
tmp/f03_e2_tu1.nc
tmp/f03_e2_tu2.nc
tmp/f03_e2_tu3.nc
 
 
DEFINE DATA/AGGREGAT/U  u1 = t_f01_e1_3, t_f01_e1
DEFINE DATA/AGGREGAT/U  u2 = t_f01_e2, t_f01_e2_3
show data u1 u2
     currently SET data sets:
   13> u1     Union aggregation
 name     title                             I         J         K         L
 FCST_3   another variable                 1:21      1:11      1:1       1:36
       (L=1:12)
 REALIZATION
          1                                ...       ...       ...       ...
 FCST     some variable                    1:21      1:11      1:1       1:36
       (L=1:12)
 FCST_2   another variable                 1:21      1:11      1:1       1:36
       (L=1:12)
 
can data u1 u2
 
! Make a batch of files, timeseries aggregations union-ed.
! the /QUIET supresses the note about skipping duplicate variables.
repeat/name=fdate/range=1:7:3 (\
  let tstart = t[gt=monthly,l=`fdate`];\
  repeat/name=ens/range=1:2:1 (\
    let realization = `ens`;\
    UNION/quiet  t_f_u`(fdate-1)/3+1,zw=2`_e`ens` = t_f`(fdate-1)/3+1,zw=2`_e`ens`, t_f`(fdate-1)/3+1,zw=2`_e`ens`_3;\
    show data/br t_f_u`(fdate-1)/3+1,zw=2`_e`ens`))
!-> REPEAT: FDATE:1
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=1]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> DEFINE DATA/AGGREGAT/U/quiet  t_f_u01_e1 = t_f01_e1, t_f01_e1_3
 !-> show data/br t_f_u01_e1
     currently SET data sets:
   13> t_f_u01_e1  (default)  Union aggregation
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> DEFINE DATA/AGGREGAT/U/quiet  t_f_u01_e2 = t_f01_e2, t_f01_e2_3
 !-> show data/br t_f_u01_e2
     currently SET data sets:
   14> t_f_u01_e2  (default)  Union aggregation
!-> REPEAT: FDATE:4
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=4]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> DEFINE DATA/AGGREGAT/U/quiet  t_f_u02_e1 = t_f02_e1, t_f02_e1_3
 !-> show data/br t_f_u02_e1
     currently SET data sets:
   15> t_f_u02_e1  (default)  Union aggregation
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> DEFINE DATA/AGGREGAT/U/quiet  t_f_u02_e2 = t_f02_e2, t_f02_e2_3
 !-> show data/br t_f_u02_e2
     currently SET data sets:
   16> t_f_u02_e2  (default)  Union aggregation
!-> REPEAT: FDATE:7
 !-> DEFINE VARIABLE tstart = t[gt=monthly,l=7]
!-> REPEAT: ENS:1
 !-> DEFINE VARIABLE realization = 1
 !-> DEFINE DATA/AGGREGAT/U/quiet  t_f_u03_e1 = t_f03_e1, t_f03_e1_3
 !-> show data/br t_f_u03_e1
     currently SET data sets:
   17> t_f_u03_e1  (default)  Union aggregation
!-> REPEAT: ENS:2
 !-> DEFINE VARIABLE realization = 2
 !-> DEFINE DATA/AGGREGAT/U/quiet  t_f_u03_e2 = t_f03_e2, t_f03_e2_3
 !-> show data/br t_f_u03_e2
     currently SET data sets:
   18> t_f_u03_e2  (default)  Union aggregation
 
cancel variable realization
 
! should share the same time axis
show grid fcst[d=t_f01_e1]
    GRID GBT1
 name       axis              # pts   start                end                 subset
 XAX       LONGITUDE           21mr   140E                 160E                full
 YAX       LATITUDE            11 r   10N                  20N                 full
 ZAX1      Z (m)                1 r   250                  250                 full
 MONTHLY1  TIME                36 r   16-JAN-1950 05:14    16-DEC-1952 12:13   full
show grid fcst_3[d=t_f_u01_e2]
    GRID GBT1
 name       axis              # pts   start                end                 subset
 XAX       LONGITUDE           21mr   140E                 160E                full
 YAX       LATITUDE            11 r   10N                  20N                 full
 ZAX1      Z (m)                1 r   250                  250                 full
 MONTHLY1  TIME                36 r   16-JAN-1950 05:14    16-DEC-1952 12:13   full
 
! Now go on and aggregate these time & union aggregations, in E and F
 
! ======== TEST SET 1:  aggregate E first, then F
 
! define tue aggregations -- only the first remains unhidden
ENSEMBLE      tue_f01 = t_f_u01_e1, t_f_u01_e2
ENSEMBLE/hide tue_f02 = t_f_u02_e1, t_f_u02_e1
ENSEMBLE/hide tue_f03 = t_f_u03_e1, t_f_u03_e2
SHOW DATA/brief
     currently SET data sets:
    1> t_f01_e1
    2> t_f01_e2
    3> t_f02_e1
    4> t_f02_e2
    5> t_f03_e1
    6> t_f03_e2
    7> t_f01_e1_3
    8> t_f01_e2_3
    9> t_f02_e1_3
   10> t_f02_e2_3
   11> t_f03_e1_3
   12> t_f03_e2_3
   13> t_f_u01_e1     Union aggregation
   14> t_f_u01_e2     Union aggregation
   16> t_f_u02_e2     Union aggregation
   19> tue_f01     Ensemble aggregation
   20> tue_f02     Ensemble aggregation
   21> tue_f03  (default)  Ensemble aggregation
SHOW DATA/FULL tue_f03
     currently SET data sets:
   21> tue_f03  (default)  Ensemble aggregation
     Ensemble series of 2 datasets patterned on t_f_u03_e1
 name     title                             I         J         K         L         M         N
 FCST     some variable                    1:21      1:11      1:1       1:36      1:2       ...
       (L=7:18)
               on grid GEN13 with -1.E+34 for missing data
             X=139.5E:160.5E  Y=9.5N:20.5N  Z=249.5:250.5  E=0.5:2.5  
 FCST_2   another variable                 1:21      1:11      1:1       1:36      1:2       ...
       (L=7:18)
               on grid GEN13 with -1.E+34 for missing data
             X=139.5E:160.5E  Y=9.5N:20.5N  Z=249.5:250.5  E=0.5:2.5  
 REALIZATION
          1                                ...       ...       ...       ...       1:2       ...
               on grid GGE3 with -1.E+34 for missing data
             E=0.5:2.5  
 FCST_3   another variable                 1:21      1:11      1:1       1:36      1:2       ...
       (L=7:18)
               on grid GEN13 with -1.E+34 for missing data
             X=139.5E:160.5E  Y=9.5N:20.5N  Z=249.5:250.5  E=0.5:2.5  
 ------------------------------
 MEMBER_DSET
          Member dataset names in Ensembl  ...       ...       ...       ...       1:2       ...
            Data type = TEXT
               on grid GGE3 with -1.E+34 for missing data
             E=0.5:2.5  
 
  time range: 17-JUL-1950 20:09 to 17-JUN-1953 03:07
 
          Member datasets:
      21.1: t_f_u03_e1
      21.2: t_f_u03_e2
SHOW DATA/ATT tue_f03   ! notice the promotion of fcst.im_everywhere
     currently SET data sets:
   21> tue_f03  (default)  Ensemble aggregation
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               aggregate name  CHAR        7    F       tue_f03
  
 FCST                  FLOAT     long_name       CHAR        13   T       some variable
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 FCST_2                FLOAT     long_name       CHAR        16   T       another variable
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 REALIZATION           FLOAT     long_name       CHAR        1    T       1
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 FCST_3                FLOAT     long_name       CHAR        16   T       another variable
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 member_dset           CHAR      long_name       CHAR        32   T       Member dataset names in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 
! define tuef aggregation
FMRC/HIDE tuef = tue_f01, tue_f02, tue_f03
SHOW DATA/brief/files
     currently SET data sets:
    1> t_f01_e1
tmp/f01_e1_t1.nc
tmp/f01_e1_t2.nc
tmp/f01_e1_t3.nc
 
    2> t_f01_e2
tmp/f01_e2_t1.nc
tmp/f01_e2_t2.nc
tmp/f01_e2_t3.nc
 
    3> t_f02_e1
tmp/f02_e1_t1.nc
tmp/f02_e1_t2.nc
tmp/f02_e1_t3.nc
 
    4> t_f02_e2
tmp/f02_e2_t1.nc
tmp/f02_e2_t2.nc
tmp/f02_e2_t3.nc
 
    5> t_f03_e1
tmp/f03_e1_t1.nc
tmp/f03_e1_t2.nc
tmp/f03_e1_t3.nc
 
    6> t_f03_e2
tmp/f03_e2_t1.nc
tmp/f03_e2_t2.nc
tmp/f03_e2_t3.nc
 
    7> t_f01_e1_3
tmp/f01_e1_tu1.nc
tmp/f01_e1_tu2.nc
tmp/f01_e1_tu3.nc
 
    8> t_f01_e2_3
tmp/f01_e2_tu1.nc
tmp/f01_e2_tu2.nc
tmp/f01_e2_tu3.nc
 
    9> t_f02_e1_3
tmp/f02_e1_tu1.nc
tmp/f02_e1_tu2.nc
tmp/f02_e1_tu3.nc
 
   10> t_f02_e2_3
tmp/f02_e2_tu1.nc
tmp/f02_e2_tu2.nc
tmp/f02_e2_tu3.nc
 
   11> t_f03_e1_3
tmp/f03_e1_tu1.nc
tmp/f03_e1_tu2.nc
tmp/f03_e1_tu3.nc
 
   12> t_f03_e2_3
tmp/f03_e2_tu1.nc
tmp/f03_e2_tu2.nc
tmp/f03_e2_tu3.nc
 
   13> t_f_u01_e1     Union aggregation
t_f_u03_e2
t_f_u03_e2
   14> t_f_u01_e2     Union aggregation
t_f_u03_e2
t_f_u03_e2
   16> t_f_u02_e2     Union aggregation
t_f_u03_e2
t_f_u03_e2
   22> tuef  (default)  Forecast aggregation
t_f_u03_e2
t_f_u03_e2
t_f_u03_e2
show data/full tuef
     currently SET data sets:
   22> tuef  (default)  Forecast aggregation
     Forecast series of 3 datasets patterned on tue_f01
 name     title                             I         J         K         L         M         N
 FCST     some variable                    1:21      1:11      1:1       1:36      1:2       1:3
       (L=1:12)
               on grid GFN1 with -1.E+34 for missing data
             X=139.5E:160.5E  Y=9.5N:20.5N  Z=249.5:250.5  E=0.5:2.5  F=16-NOV-1949 08:16:17-AUG-1950 06:38  
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:36      ...       1:9
             days since 01-JAN-1900 on grid FTI11 with -1.E+34 for missing data
             F=16-DEC-1949 18:45:16-SEP-1950 17:07  
 FCST_2   another variable                 1:21      1:11      1:1       1:36      1:2       1:3
       (L=1:12)
               on grid GFN1 with -1.E+34 for missing data
             X=139.5E:160.5E  Y=9.5N:20.5N  Z=249.5:250.5  E=0.5:2.5  F=16-NOV-1949 08:16:17-AUG-1950 06:38  
 FCST_3   another variable                 1:21      1:11      1:1       1:36      1:2       1:3
       (L=1:12)
               on grid GFN1 with -1.E+34 for missing data
             X=139.5E:160.5E  Y=9.5N:20.5N  Z=249.5:250.5  E=0.5:2.5  F=16-NOV-1949 08:16:17-AUG-1950 06:38  
 
  time range: 15.21844 to 1080.50906
 
          Member datasets:
      22.1: tue_f01
      22.2: tue_f02
      22.3: tue_f03
 
! The time-union-ensemble-forecast aggregation
 
set data tuef
show data tuef
     currently SET data sets:
   22> tuef  (default)  Forecast aggregation
 name     title                             I         J         K         L         M         N
 FCST     some variable                    1:21      1:11      1:1       1:36      1:2       1:3
       (L=1:12)
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:36      ...       1:9
 FCST_2   another variable                 1:21      1:11      1:1       1:36      1:2       1:3
       (L=1:12)
 FCST_3   another variable                 1:21      1:11      1:1       1:36      1:2       1:3
       (L=1:12)
 
sh grid fcst
    GRID (G###)  Forecast Aggregation Grid
 name       axis              # pts   start                end                 subset
 XAX       LONGITUDE           21mr   140E                 160E                full
 YAX       LATITUDE            11 r   10N                  20N                 full
 ZAX1      Z (m)                1 r   250                  250                 full
 TF_LAG_T  MODEL ELAPSED TIME  36 r   15.218               1080.5              full
 ENSEMBLE  E (realization)      2 r   1                    2                   full
 RUN       FORECAST             3 r   01-JAN-1950 00:00    02-JUL-1950 14:54   full
sh grid fcst_3
    GRID (G###)  Forecast Aggregation Grid
 name       axis              # pts   start                end                 subset
 XAX       LONGITUDE           21mr   140E                 160E                full
 YAX       LATITUDE            11 r   10N                  20N                 full
 ZAX1      Z (m)                1 r   250                  250                 full
 TF_LAG_T  MODEL ELAPSED TIME  36 r   15.218               1080.5              full
 ENSEMBLE  E (realization)      2 r   1                    2                   full
 RUN       FORECAST             3 r   01-JAN-1950 00:00    02-JUL-1950 14:54   full
 
! simplest acess -- compact form -- just demonstrate it doesn't fail
stat/brief fcst[i=11:12, j=5:6, l=31:32, m=1:2, n=2:3]
 
 Total # of data points: 32 (2*2*1*2*2*2)
 # flagged as bad  data: 0
 Minimum value: 224.77
 Maximum value: 237.75
 Mean    value: 228.15 (unweighted average)
stat/brief fcst_3[i=11:12, j=5:6, l=31:32, m=1:2, n=2:3]
 
 Total # of data points: 32 (2*2*1*2*2*2)
 # flagged as bad  data: 0
 Minimum value: 227.77
 Maximum value: 240.8
 Mean    value: 231.16 (unweighted average)
 
! 22 datasets are open including the final T-U-E-F forecast aggregation
show data
     currently SET data sets:
    1> t_f01_e1
 name     title                             I         J         K         L
 FCST     some variable                    1:21      1:11      1:1       1:36
       (L=1:12)
 FCST_2   another variable                 1:21      1:11      1:1       1:36
       (L=1:12)
 REALIZATION
          1                                ...       ...       ...       ...
 
    2> t_f01_e2
 name     title                             I         J         K         L
 FCST     some variable                    1:21      1:11      1:1       1:36
       (L=1:12)
 FCST_2   another variable                 1:21      1:11      1:1       1:36
       (L=1:12)
 REALIZATION
          2                                ...       ...       ...       ...
 
    3> t_f02_e1
 name     title                             I         J         K         L
 FCST     some variable                    1:21      1:11      1:1       1:36
       (L=4:15)
 FCST_2   another variable                 1:21      1:11      1:1       1:36
       (L=4:15)
 REALIZATION
          1                                ...       ...       ...       ...
 
    4> t_f02_e2
 name     title                             I         J         K         L
 FCST     some variable                    1:21      1:11      1:1       1:36
       (L=4:15)
 FCST_2   another variable                 1:21      1:11      1:1       1:36
       (L=4:15)
 REALIZATION
          2                                ...       ...       ...       ...
 
    5> t_f03_e1
 name     title                             I         J         K         L
 FCST     some variable                    1:21      1:11      1:1       1:36
       (L=7:18)
 FCST_2   another variable                 1:21      1:11      1:1       1:36
       (L=7:18)
 REALIZATION
          1                                ...       ...       ...       ...
 
    6> t_f03_e2
 name     title                             I         J         K         L
 FCST     some variable                    1:21      1:11      1:1       1:36
       (L=7:18)
 FCST_2   another variable                 1:21      1:11      1:1       1:36
       (L=7:18)
 REALIZATION
          2                                ...       ...       ...       ...
 
    7> t_f01_e1_3
 name     title                             I         J         K         L
 FCST_3   another variable                 1:21      1:11      1:1       1:36
       (L=1:12)
 REALIZATION
          1                                ...       ...       ...       ...
 
    8> t_f01_e2_3
 name     title                             I         J         K         L
 FCST_3   another variable                 1:21      1:11      1:1       1:36
       (L=1:12)
 REALIZATION
          2                                ...       ...       ...       ...
 
    9> t_f02_e1_3
 name     title                             I         J         K         L
 FCST_3   another variable                 1:21      1:11      1:1       1:36
       (L=4:15)
 REALIZATION
          1                                ...       ...       ...       ...
 
   10> t_f02_e2_3
 name     title                             I         J         K         L
 FCST_3   another variable                 1:21      1:11      1:1       1:36
       (L=4:15)
 REALIZATION
          2                                ...       ...       ...       ...
 
   11> t_f03_e1_3
 name     title                             I         J         K         L
 FCST_3   another variable                 1:21      1:11      1:1       1:36
       (L=7:18)
 REALIZATION
          1                                ...       ...       ...       ...
 
   12> t_f03_e2_3
 name     title                             I         J         K         L
 FCST_3   another variable                 1:21      1:11      1:1       1:36
       (L=7:18)
 REALIZATION
          2                                ...       ...       ...       ...
 
   13> t_f_u01_e1     Union aggregation
 name     title                             I         J         K         L
 FCST     some variable                    1:21      1:11      1:1       1:36
       (L=1:12)
 FCST_2   another variable                 1:21      1:11      1:1       1:36
       (L=1:12)
 REALIZATION
          1                                ...       ...       ...       ...
 FCST_3   another variable                 1:21      1:11      1:1       1:36
       (L=1:12)
 
   14> t_f_u01_e2     Union aggregation
 name     title                             I         J         K         L
 FCST     some variable                    1:21      1:11      1:1       1:36
       (L=1:12)
 FCST_2   another variable                 1:21      1:11      1:1       1:36
       (L=1:12)
 REALIZATION
          2                                ...       ...       ...       ...
 FCST_3   another variable                 1:21      1:11      1:1       1:36
       (L=1:12)
 
   16> t_f_u02_e2     Union aggregation
 name     title                             I         J         K         L
 FCST     some variable                    1:21      1:11      1:1       1:36
       (L=4:15)
 FCST_2   another variable                 1:21      1:11      1:1       1:36
       (L=4:15)
 REALIZATION
          2                                ...       ...       ...       ...
 FCST_3   another variable                 1:21      1:11      1:1       1:36
       (L=4:15)
 
   22> tuef  (default)  Forecast aggregation
 name     title                             I         J         K         L         M         N
 FCST     some variable                    1:21      1:11      1:1       1:36      1:2       1:3
       (L=1:12)
 TF_TIMES Forecast time step matrix        ...       ...       ...       1:36      ...       1:9
 FCST_2   another variable                 1:21      1:11      1:1       1:36      1:2       1:3
       (L=1:12)
 FCST_3   another variable                 1:21      1:11      1:1       1:36      1:2       1:3
       (L=1:12)
 
*** Running ferret script: bn_ens_promote_global.jnl
! bn_ens_promote_global.jnl
! *acm* 6/4/2018   Issue 1667
 
! When making ensembles, promote global attributes of member
! sets to variables, so can examine, e.g. model_run description.
 
ensemble fourfiles =  memb2, memb3, memb1, memb4
show data
     currently SET data sets:
    5> fourfiles  (default)  Ensemble aggregation
 name     title                             I         J         K         L         M         N
 SST      sst_IN                           1:10      1:9       ...       1:12      1:4       ...
 MYSTRING string var                       1:1       ...       ...       ...       1:4       ...
 ------------------------------
 MEMBER_DSET
          Member dataset names in Ensembl  ...       ...       ...       ...       1:4       ...
 HISTORY  Global Att *history* in Ensembl  ...       ...       ...       ...       1:4       ...
 CONVENTIONS
          Global Att *Conventions* in Ens  ...       ...       ...       ...       1:4       ...
 MODEL_RUN
          Global Att *model_run* in Ensem  ...       ...       ...       ...       1:4       ...
 NUMBER   Global Att *number* in Ensemble  ...       ...       ...       ...       1:4       ...
 TITLE    Global Att *title* in Ensemble   ...       ...       ...       ...       1:4       ...
 NUMLIST  Global Att *numlist* in Ensembl  ...       ...       ...       ...       1:4       ...
 SST_G_   Global Att *sst* in Ensemble     ...       ...       ...       ...       1:4       ...
 INVESTIGATOR
          Global Att *investigator* in En  ...       ...       ...       ...       1:4       ...
 
 
sh dat/att
     currently SET data sets:
    5> fourfiles  (default)  Ensemble aggregation
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               aggregate name  CHAR        9    F       fourfiles
  
 SST                   FLOAT     long_name       CHAR        6    T       sst_IN
                                 units           CHAR        5    T       Deg C
                                 missing_value   DOUBLE      1    T       -1.E+34
                                 history         CHAR        22   T       From coads_climatology
  
 MYSTRING              CHAR      long_name       CHAR        10   T       string var
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 member_dset           CHAR      long_name       CHAR        32   T       Member dataset names in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 history               CHAR      long_name       CHAR        32   T       Global Att *history* in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 Conventions           CHAR      long_name       CHAR        36   T       Global Att *Conventions* in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 model_run             CHAR      long_name       CHAR        34   T       Global Att *model_run* in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 number                DOUBLE    long_name       CHAR        31   T       Global Att *number* in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 title                 CHAR      long_name       CHAR        30   T       Global Att *title* in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 numlist               CHAR      long_name       CHAR        32   T       Global Att *numlist* in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 sst_g_                CHAR      long_name       CHAR        28   T       Global Att *sst* in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
 investigator          CHAR      long_name       CHAR        37   T       Global Att *investigator* in Ensemble
                                 missing_value   DOUBLE      1    T       -1.E+34
  
sh att .
     attributes for dataset: fourfiles
 ..aggregate name = fourfiles 
 
! List a numeric file variable
list/i=1/j=2/l=1 sst
             VARIABLE : sst_IN (Deg C)
             DATA SET : Ensemble series of 4 datasets patterned on memb2
             FILENAME : fourfiles
             SUBSET   : 4 points (E (realization))
             LONGITUDE: 109W
             LATITUDE : 15N
             TIME     : 16-JAN 06:00
           109W   
             1
 1   / 1:   54.0
 2   / 2:   81.0
 3   / 3:   27.0
 4   / 4:  108.0
 
! and a string file variable
list mystring
             VARIABLE : string var
             DATA SET : Ensemble series of 4 datasets patterned on memb2
             FILENAME : fourfiles
             SUBSET   : 4 points (E (realization))
             X        : 1
              1     
              1
 1   / 1:"def"    
 2   / 2:"ghi_ghi"
 3   / 3:"abc"    
 4   / 4:"klm"    
 
! Dataset names collected as a variable on the Ens axis
 
say `mystring[d=2],return=dset`
 !-> MESSAGE/CONTINUE memb3
memb3
list member_dset
             VARIABLE : Member dataset names in Ensemble
             DATA SET : Ensemble series of 4 datasets patterned on memb2
             FILENAME : fourfiles
             SUBSET   : 4 points (E (realization))
 1   / 1:"memb2"
 2   / 2:"memb3"
 3   / 3:"memb1"
 4   / 4:"memb4"
 
! Global attributes promoted to variables on Ens axis
 
 
! strings
list model_run
             VARIABLE : Global Att *model_run* in Ensemble
             DATA SET : Ensemble series of 4 datasets patterned on memb2
             FILENAME : fourfiles
             SUBSET   : 4 points (E (realization))
 1   / 1:"model run B special case"
 2   / 2:"model run C"             
 3   / 3:"modelA"                  
 4   / 4:"modelD"                  
 
list/e=2:3 model_run
             VARIABLE : Global Att *model_run* in Ensemble
             DATA SET : Ensemble series of 4 datasets patterned on memb2
             FILENAME : fourfiles
             SUBSET   : 2 points (E (realization))
 2   / 2:"model run C"
 3   / 3:"modelA"     
 
set data fourfiles
show att .
     attributes for dataset: fourfiles
 ..aggregate name = fourfiles 
 
! Title is a global att in only some sets
list title
             VARIABLE : Global Att *title* in Ensemble
             DATA SET : Ensemble series of 4 datasets patterned on memb2
             FILENAME : fourfiles
             SUBSET   : 4 points (E (realization))
 1   / 1:"Example datset 2"
 2   / 2:""                
 3   / 3:"A dataset title" 
 4   / 4:"Example datset 4"
 
 
! investigator is a global att in only some sets, is not in 1st set.
list investigator
             VARIABLE : Global Att *investigator* in Ensemble
             DATA SET : Ensemble series of 4 datasets patterned on memb2
             FILENAME : fourfiles
             SUBSET   : 4 points (E (realization))
 1   / 1:""            
 2   / 2:""            
 3   / 3:"Mickey Mouse"
 4   / 4:""            
 
! Numeric single-valued attributes become numeric variables.
! any sets that don't have the attribute are represented by missing-value
list number
             VARIABLE : Global Att *number* in Ensemble
             DATA SET : Ensemble series of 4 datasets patterned on memb2
             FILENAME : fourfiles
             SUBSET   : 4 points (E (realization))
 1   / 1:  2.000
 2   / 2:   ....
 3   / 3:  1.000
 4   / 4:  4.000
 
! Numeric multi-valued attributes become strings listing the values.
! any sets that don't have the attribute are represented by null string
list numlist
             VARIABLE : Global Att *numlist* in Ensemble
             DATA SET : Ensemble series of 4 datasets patterned on memb2
             FILENAME : fourfiles
             SUBSET   : 4 points (E (realization))
 1   / 1:"2"      
 2   / 2:"3,2,1"  
 3   / 3:""       
 4   / 4:"4,3,2,1"
 
! A global attribute matching a file variable is promoted using a changed name
! Global attribute sst becomes promoted variable sst_g_
list sst_g_
             VARIABLE : Global Att *sst* in Ensemble
             DATA SET : Ensemble series of 4 datasets patterned on memb2
             FILENAME : fourfiles
             SUBSET   : 4 points (E (realization))
 1   / 1:"A global att matching a file variable"
 2   / 2:"A global att matching a file variable"
 3   / 3:""                                     
 4   / 4:"A global att matching a file variable"
 
! Multiple ensembles defined
cancel data/all
 
ensemble f1 = memb2, memb3
ensemble f2 = memb1, memb4
 
set data f1
show data
     currently SET data sets:
    3> f1  (default)  Ensemble aggregation
 name     title                             I         J         K         L         M         N
 SST      sst_IN                           1:10      1:9       ...       1:12      1:2       ...
 MYSTRING string var                       1:1       ...       ...       ...       1:2       ...
 ------------------------------
 MEMBER_DSET
          Member dataset names in Ensembl  ...       ...       ...       ...       1:2       ...
 HISTORY  Global Att *history* in Ensembl  ...       ...       ...       ...       1:2       ...
 CONVENTIONS
          Global Att *Conventions* in Ens  ...       ...       ...       ...       1:2       ...
 MODEL_RUN
          Global Att *model_run* in Ensem  ...       ...       ...       ...       1:2       ...
 NUMBER   Global Att *number* in Ensemble  ...       ...       ...       ...       1:2       ...
 TITLE    Global Att *title* in Ensemble   ...       ...       ...       ...       1:2       ...
 NUMLIST  Global Att *numlist* in Ensembl  ...       ...       ...       ...       1:2       ...
 SST_G_   Global Att *sst* in Ensemble     ...       ...       ...       ...       1:2       ...
 
    6> f2     Ensemble aggregation
 name     title                             I         J         K         L         M         N
 SST      sst_IN                           1:10      1:9       ...       1:12      1:2       ...
 MYSTRING string var                       1:1       ...       ...       ...       1:2       ...
 ------------------------------
 MEMBER_DSET
          Member dataset names in Ensembl  ...       ...       ...       ...       1:2       ...
 HISTORY  Global Att *history* in Ensembl  ...       ...       ...       ...       1:2       ...
 CONVENTIONS
          Global Att *Conventions* in Ens  ...       ...       ...       ...       1:2       ...
 INVESTIGATOR
          Global Att *investigator* in En  ...       ...       ...       ...       1:2       ...
 MODEL_RUN
          Global Att *model_run* in Ensem  ...       ...       ...       ...       1:2       ...
 NUMBER   Global Att *number* in Ensemble  ...       ...       ...       ...       1:2       ...
 TITLE    Global Att *title* in Ensemble   ...       ...       ...       ...       1:2       ...
 NUMLIST  Global Att *numlist* in Ensembl  ...       ...       ...       ...       1:2       ...
 SST_G_   Global Att *sst* in Ensemble     ...       ...       ...       ...       1:2       ...
 
list model_run, title
             DATA SET: f1
             Ensemble series of 2 datasets patterned on memb2
             E (realization): 0.5 to 2.5
 Column  1: MODEL_RUN is Global Att *model_run* in Ensemble
 Column  2: TITLE is Global Att *title* in Ensemble
                          MODEL_RU         TITLE
1   / 1: "model run B special case" "Example datset 2"
2   / 2: "model run C"              ""                
 
set data f2
show data
     currently SET data sets:
    3> f1     Ensemble aggregation
 name     title                             I         J         K         L         M         N
 SST      sst_IN                           1:10      1:9       ...       1:12      1:2       ...
 MYSTRING string var                       1:1       ...       ...       ...       1:2       ...
 ------------------------------
 MEMBER_DSET
          Member dataset names in Ensembl  ...       ...       ...       ...       1:2       ...
 HISTORY  Global Att *history* in Ensembl  ...       ...       ...       ...       1:2       ...
 CONVENTIONS
          Global Att *Conventions* in Ens  ...       ...       ...       ...       1:2       ...
 MODEL_RUN
          Global Att *model_run* in Ensem  ...       ...       ...       ...       1:2       ...
 NUMBER   Global Att *number* in Ensemble  ...       ...       ...       ...       1:2       ...
 TITLE    Global Att *title* in Ensemble   ...       ...       ...       ...       1:2       ...
 NUMLIST  Global Att *numlist* in Ensembl  ...       ...       ...       ...       1:2       ...
 SST_G_   Global Att *sst* in Ensemble     ...       ...       ...       ...       1:2       ...
 
    6> f2  (default)  Ensemble aggregation
 name     title                             I         J         K         L         M         N
 SST      sst_IN                           1:10      1:9       ...       1:12      1:2       ...
 MYSTRING string var                       1:1       ...       ...       ...       1:2       ...
 ------------------------------
 MEMBER_DSET
          Member dataset names in Ensembl  ...       ...       ...       ...       1:2       ...
 HISTORY  Global Att *history* in Ensembl  ...       ...       ...       ...       1:2       ...
 CONVENTIONS
          Global Att *Conventions* in Ens  ...       ...       ...       ...       1:2       ...
 INVESTIGATOR
          Global Att *investigator* in En  ...       ...       ...       ...       1:2       ...
 MODEL_RUN
          Global Att *model_run* in Ensem  ...       ...       ...       ...       1:2       ...
 NUMBER   Global Att *number* in Ensemble  ...       ...       ...       ...       1:2       ...
 TITLE    Global Att *title* in Ensemble   ...       ...       ...       ...       1:2       ...
 NUMLIST  Global Att *numlist* in Ensembl  ...       ...       ...       ...       1:2       ...
 SST_G_   Global Att *sst* in Ensemble     ...       ...       ...       ...       1:2       ...
 
list model_run, title, investigator
             DATA SET: f2
             Ensemble series of 2 datasets patterned on memb1
             E (realization): 0.5 to 2.5
 Column  1: MODEL_RUN is Global Att *model_run* in Ensemble
 Column  2: TITLE is Global Att *title* in Ensemble
 Column  3: INVESTIGATOR is Global Att *investigator* in Ensemble
        MODEL_RU         TITLE        INVESTIGATOR
1   / 1: "modelA" "A dataset title"  "Mickey Mouse"
2   / 2: "modelD" "Example datset 4" ""            
 
 
*** Running ferret script: bn743_bug_fixes.jnl
! bn743_bug_fixes.jnl
! test various fixes that went into version 7.43
! 7/18 *acm*
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err742_plot_vs_windowing
! err742_plot_vs_windowing
! bug 1884 The lower two windows showed nothing.
! they should look the same as the upper ones.
 
set mode verify
 
! Want a specific aspect ratio, so open a new window
set win/asp=.77 2
 
def view/x=0.1:0.33330/y=0.55:0.9 v1; set view v1; go magnify
plot/thick/nolab/hl=-70:70/vl=-70:70/vs/line 1e6*{-1,1}, 1e6*{-1,1}
 
def view/x=0.1:0.33331/y=0.1:0.45 v2; set view v2; go magnify
plot/thick/nolab/hl=-70:70/vl=-70:70/vs/line 1e6*{-1,1}, 1e6*{-1,1}
 
 
 
def view/x=0.6:0.83330/y=0.55:0.9 v3; set view v3; go magnify
plot/thick/nolab/hl=-70:70/vl=-70:70/vs/line 1e6*{-1,1}, 1e6*{1,-1}
 
def view/x=0.6:0.83331/y=0.1:0.45 v4; set view v4; go magnify
plot/thick/nolab/hl=-70:70/vl=-70:70/vs/line 1e6*{-1,1}, 1e6*{1,-1}
 
frame/file=plot_vs_windowing.gif
 
cancel window 2
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err742_use_numeric_name
! err742_use_numeric_name
! Issue 1887
! 26-July 2018 ACm
!
! write some example files
 
let var = {1,2,3,4,5}
save/clobber/file=1990-2010.nc var
save/clobber/file=2001.07.nc cos(var)
save/clobber/file=1990.nc var[i=1]
save/clobber/file=2001+07.nc sin(var)
can var/all
 
! These USE commands previously caused fortran run-time errors
use 1990-2010
use 2001.07
use 2001+07
 
sh dat
     currently SET data sets:
    1> ./1990-2010.nc
 name     title                             I         J         K         L
 VAR      {1,2,3,4,5}                      1:5       ...       ...       ...
 
    2> ./2001.07.nc
 name     title                             I         J         K         L
 E054     COS(VAR)                         1:5       ...       ...       ...
 
    3> ./2001+07.nc  (default)
 name     title                             I         J         K         L
 E355     SIN(VAR)                         1:5       ...       ...       ...
 
 
! Intentional error
!The syntax "USE n" where n is any integr, always means just see if
!that dataset number is in use, and make it the default.
 
set mode ignore
use 1990
set mode/last ignore
 
! Looking for files somewhere in the dataset paths.
 
let var = {1,2,3,4,5}
save/clobber/file="data/1990-2010.nc" var
save/clobber/file="data/2001.07.nc" cos(var)
save/clobber/file="data/2001+07.nc" sin(var)
can var/all
 
! These USE commands previously caused fortran run-time errors
use 1990-2010
use 2001.07
use 2001+07
 
sh dat
     currently SET data sets:
    1> ./1990-2010.nc
 name     title                             I         J         K         L
 VAR      {1,2,3,4,5}                      1:5       ...       ...       ...
 
    2> ./2001.07.nc
 name     title                             I         J         K         L
 E054     COS(VAR)                         1:5       ...       ...       ...
 
    3> ./2001+07.nc  (default)
 name     title                             I         J         K         L
 E355     SIN(VAR)                         1:5       ...       ...       ...
 
 
sp rm data/1990-2010.nc
sp rm data/2001.07.nc
sp rm data/2001+07.nc
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err742_hov_fill
! err742_hov_fill.jnl
! Issue 1888, location of FILL plot
! 7/27/2018 ACM
 
set window/aspect=1
 
 
! A variable on a 5-month axis of 3-hour intervals defined with units
! of seconds.
define axis/t=1-mar-2012:1-aug-2012:10800/units=seconds/t0=1-mar-2012 t3hour
define axis/y=1:30:1/units=degrees_north yaxis
let ytvar = y[gy=yaxis] * cos(L[gt=t3hour]/200) +0.1*L[gt=t3hour]
 
! The upper plot is fine. The lower one has the right data but is located
! wrong so its shifted and the first part of it is chopped off.
set v upper; fill/pal=pale_green_blue_rev ytvar
set v lower; fill/pal=pale_green_blue_rev/lev/l=400:1224 ytvar
 
frame/file=hov_fill.gif
 
! Restore default aspect ratio
set window/aspect=0.75
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err742_list_many_vars
! err742_list_many_vars.jnl
!
! manyvars.nc was created using the following:
!
! DEFINE AXIS /X=1:99:1 XAX
! DEFINE AXIS /Z=1:5:1 ZAX
! DEFINE GRID /X=XAX /Z=ZAX XZGRID
! SET GRID XZGRID
! LET VAR01 = 1.0 + 0.1 * Z
! SAVE /CLOBBER /FILE=manyvars.nc VAR01
! REPEAT /I=2:9:1 ( LET VAR0`I` = `I`.0 + 0.1 * Z ; SAVE /APPEND /FILE=manyvars.nc VAR0`I` )
! REPEAT /I=10:99:1 ( LET VAR`I` = `I`.0 + 0.1 * Z ; SAVE /APPEND /FILE=manyvars.nc VAR`I` )
!
USE manyvars.nc
LIST /CLOBBER /FILE=manyvars.tsv /norow /width=1024 /format=tab \
  VAR01,  VAR02,  VAR03,  VAR04,  VAR05,  VAR06,  VAR07,  VAR08,  VAR09,  VAR10, \
  VAR11,  VAR12,  VAR13,  VAR14,  VAR15,  VAR16,  VAR17,  VAR18,  VAR19,  VAR20, \
  VAR21,  VAR22,  VAR23,  VAR24,  VAR25,  VAR26,  VAR27,  VAR28,  VAR29,  VAR30, \
  VAR31,  VAR32,  VAR33,  VAR34,  VAR35,  VAR36,  VAR37,  VAR38,  VAR39,  VAR40, \
  VAR41,  VAR42,  VAR43,  VAR44,  VAR45,  VAR46,  VAR47,  VAR48,  VAR49,  VAR50, \
  VAR51,  VAR52,  VAR53,  VAR54,  VAR55,  VAR56,  VAR57,  VAR58,  VAR59,  VAR60, \
  VAR61,  VAR62,  VAR63,  VAR64,  VAR65,  VAR66,  VAR67,  VAR68,  VAR69,  VAR70, \
  VAR71,  VAR72,  VAR73,  VAR74,  VAR75,  VAR76,  VAR77,  VAR78,  VAR79,  VAR80, \
  VAR81,  VAR82,  VAR83,  VAR84,  VAR85,  VAR86,  VAR87,  VAR88,  VAR89,  VAR90, \
  VAR91,  VAR92,  VAR93,  VAR94,  VAR95,  VAR96,  VAR97,  VAR98,  VAR99
!
! Earier versions would show VAR49 VAR50 ... VAR74 where VAR17 VAR18 ... VAR42 should be
! in both the titles and the values
!
SPAWN "cat manyvars.tsv"
             DATA SET: ./data/manyvars.nc
             Z: 0.5 to 5.5
 Column  1: VAR01 is 1.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column  2: VAR02 is 2.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column  3: VAR03 is 3.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column  4: VAR04 is 4.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column  5: VAR05 is 5.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column  6: VAR06 is 6.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column  7: VAR07 is 7.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column  8: VAR08 is 8.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column  9: VAR09 is 9.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 10: VAR10 is 10.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 11: VAR11 is 11.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 12: VAR12 is 12.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 13: VAR13 is 13.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 14: VAR14 is 14.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 15: VAR15 is 15.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 16: VAR16 is 16.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 17: VAR17 is 17.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 18: VAR18 is 18.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 19: VAR19 is 19.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 20: VAR20 is 20.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 21: VAR21 is 21.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 22: VAR22 is 22.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 23: VAR23 is 23.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 24: VAR24 is 24.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 25: VAR25 is 25.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 26: VAR26 is 26.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 27: VAR27 is 27.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 28: VAR28 is 28.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 29: VAR29 is 29.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 30: VAR30 is 30.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 31: VAR31 is 31.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 32: VAR32 is 32.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 33: VAR33 is 33.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 34: VAR34 is 34.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 35: VAR35 is 35.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 36: VAR36 is 36.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 37: VAR37 is 37.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 38: VAR38 is 38.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 39: VAR39 is 39.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 40: VAR40 is 40.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 41: VAR41 is 41.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 42: VAR42 is 42.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 43: VAR43 is 43.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 44: VAR44 is 44.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 45: VAR45 is 45.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 46: VAR46 is 46.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 47: VAR47 is 47.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 48: VAR48 is 48.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 49: VAR49 is 49.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 50: VAR50 is 50.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 51: VAR51 is 51.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 52: VAR52 is 52.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 53: VAR53 is 53.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 54: VAR54 is 54.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 55: VAR55 is 55.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 56: VAR56 is 56.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 57: VAR57 is 57.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 58: VAR58 is 58.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 59: VAR59 is 59.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 60: VAR60 is 60.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 61: VAR61 is 61.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 62: VAR62 is 62.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 63: VAR63 is 63.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 64: VAR64 is 64.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 65: VAR65 is 65.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 66: VAR66 is 66.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 67: VAR67 is 67.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 68: VAR68 is 68.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 69: VAR69 is 69.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 70: VAR70 is 70.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 71: VAR71 is 71.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 72: VAR72 is 72.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 73: VAR73 is 73.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 74: VAR74 is 74.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 75: VAR75 is 75.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 76: VAR76 is 76.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 77: VAR77 is 77.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 78: VAR78 is 78.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 79: VAR79 is 79.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 80: VAR80 is 80.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 81: VAR81 is 81.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 82: VAR82 is 82.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 83: VAR83 is 83.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 84: VAR84 is 84.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 85: VAR85 is 85.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 86: VAR86 is 86.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 87: VAR87 is 87.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 88: VAR88 is 88.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 89: VAR89 is 89.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 90: VAR90 is 90.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 91: VAR91 is 91.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 92: VAR92 is 92.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 93: VAR93 is 93.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 94: VAR94 is 94.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 95: VAR95 is 95.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 96: VAR96 is 96.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 97: VAR97 is 97.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 98: VAR98 is 98.0 + 0.1 * Z    BAD FLAG : -1.E+34
 Column 99: VAR99 is 99.0 + 0.1 * Z    BAD FLAG : -1.E+34
VAR01	VAR02	VAR03	VAR04	VAR05	VAR06	VAR07	VAR08	VAR09	VAR10	VAR11	VAR12	VAR13	VAR14	VAR15	VAR16	VAR17	VAR18	VAR19	VAR20	VAR21	VAR22	VAR23	VAR24	VAR25	VAR26	VAR27	VAR28	VAR29	VAR30	VAR31	VAR32	VAR33	VAR34	VAR35	VAR36	VAR37	VAR38	VAR39	VAR40	VAR41	VAR42	VAR43	VAR44	VAR45	VAR46	VAR47	VAR48	VAR49	VAR50	VAR51	VAR52	VAR53	VAR54	VAR55	VAR56	VAR57	VAR58	VAR59	VAR60	VAR61	VAR62	VAR63	VAR64	VAR65	VAR66	VAR67	VAR68	VAR69	VAR70	VAR71	VAR72	VAR73	VAR74	VAR75	VAR76	VAR77	VAR78	VAR79	VAR80	VAR81	VAR82	VAR83	VAR84	VAR85	VAR86	VAR87	VAR88	VAR89	VAR90	VAR91	VAR92	VAR93	VAR94	VAR95	VAR96	VAR97	VAR98	VAR99
1.1	2.1	3.1	4.1	5.1	6.1	7.1	8.1	9.1	10.1	11.1	12.1	13.1	14.1	15.1	16.1	17.1	18.1	19.1	20.1	21.1	22.1	23.1	24.1	25.1	26.1	27.1	28.1	29.1	30.1	31.1	32.1	33.1	34.1	35.1	36.1	37.1	38.1	39.1	40.1	41.1	42.1	43.1	44.1	45.1	46.1	47.1	48.1	49.1	50.1	51.1	52.1	53.1	54.1	55.1	56.1	57.1	58.1	59.1	60.1	61.1	62.1	63.1	64.1	65.1	66.1	67.1	68.1	69.1	70.1	71.1	72.1	73.1	74.1	75.1	76.1	77.1	78.1	79.1	80.1	81.1	82.1	83.1	84.1	85.1	86.1	87.1	88.1	89.1	90.1	91.1	92.1	93.1	94.1	95.1	96.1	97.1	98.1	99.1  
1.2	2.2	3.2	4.2	5.2	6.2	7.2	8.2	9.2	10.2	11.2	12.2	13.2	14.2	15.2	16.2	17.2	18.2	19.2	20.2	21.2	22.2	23.2	24.2	25.2	26.2	27.2	28.2	29.2	30.2	31.2	32.2	33.2	34.2	35.2	36.2	37.2	38.2	39.2	40.2	41.2	42.2	43.2	44.2	45.2	46.2	47.2	48.2	49.2	50.2	51.2	52.2	53.2	54.2	55.2	56.2	57.2	58.2	59.2	60.2	61.2	62.2	63.2	64.2	65.2	66.2	67.2	68.2	69.2	70.2	71.2	72.2	73.2	74.2	75.2	76.2	77.2	78.2	79.2	80.2	81.2	82.2	83.2	84.2	85.2	86.2	87.2	88.2	89.2	90.2	91.2	92.2	93.2	94.2	95.2	96.2	97.2	98.2	99.2  
1.3	2.3	3.3	4.3	5.3	6.3	7.3	8.3	9.3	10.3	11.3	12.3	13.3	14.3	15.3	16.3	17.3	18.3	19.3	20.3	21.3	22.3	23.3	24.3	25.3	26.3	27.3	28.3	29.3	30.3	31.3	32.3	33.3	34.3	35.3	36.3	37.3	38.3	39.3	40.3	41.3	42.3	43.3	44.3	45.3	46.3	47.3	48.3	49.3	50.3	51.3	52.3	53.3	54.3	55.3	56.3	57.3	58.3	59.3	60.3	61.3	62.3	63.3	64.3	65.3	66.3	67.3	68.3	69.3	70.3	71.3	72.3	73.3	74.3	75.3	76.3	77.3	78.3	79.3	80.3	81.3	82.3	83.3	84.3	85.3	86.3	87.3	88.3	89.3	90.3	91.3	92.3	93.3	94.3	95.3	96.3	97.3	98.3	99.3  
1.4	2.4	3.4	4.4	5.4	6.4	7.4	8.4	9.4	10.4	11.4	12.4	13.4	14.4	15.4	16.4	17.4	18.4	19.4	20.4	21.4	22.4	23.4	24.4	25.4	26.4	27.4	28.4	29.4	30.4	31.4	32.4	33.4	34.4	35.4	36.4	37.4	38.4	39.4	40.4	41.4	42.4	43.4	44.4	45.4	46.4	47.4	48.4	49.4	50.4	51.4	52.4	53.4	54.4	55.4	56.4	57.4	58.4	59.4	60.4	61.4	62.4	63.4	64.4	65.4	66.4	67.4	68.4	69.4	70.4	71.4	72.4	73.4	74.4	75.4	76.4	77.4	78.4	79.4	80.4	81.4	82.4	83.4	84.4	85.4	86.4	87.4	88.4	89.4	90.4	91.4	92.4	93.4	94.4	95.4	96.4	97.4	98.4	99.4  
1.5	2.5	3.5	4.5	5.5	6.5	7.5	8.5	9.5	10.5	11.5	12.5	13.5	14.5	15.5	16.5	17.5	18.5	19.5	20.5	21.5	22.5	23.5	24.5	25.5	26.5	27.5	28.5	29.5	30.5	31.5	32.5	33.5	34.5	35.5	36.5	37.5	38.5	39.5	40.5	41.5	42.5	43.5	44.5	45.5	46.5	47.5	48.5	49.5	50.5	51.5	52.5	53.5	54.5	55.5	56.5	57.5	58.5	59.5	60.5	61.5	62.5	63.5	64.5	65.5	66.5	67.5	68.5	69.5	70.5	71.5	72.5	73.5	74.5	75.5	76.5	77.5	78.5	79.5	80.5	81.5	82.5	83.5	84.5	85.5	86.5	87.5	88.5	89.5	90.5	91.5	92.5	93.5	94.5	95.5	96.5	97.5	98.5	99.5  
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err742_stride_irreg_modulo
! err742_stride_irreg_modulo
! bug 1890, a subspan modulo axis that's irregularly spaced,
! applying strides caused a crash.
 
! x axis is shorter than 360
use err742_stride_irreg_modulo.nc
sh axis `lonvar,return=xaxis`
 !-> sh axis LONGITUDE
 name       axis              # pts   start                end
 LONGITUDE LONGITUDE            6mi   179.5W(-179.5)       179.5E
   Axis span (to cell edges) = 359.9 (modulo length = 360)
 
set axis/stride=2 `lonvar,return=xaxis`
 !-> set axis/stride=2 LONGITUDE
 
! Previously this command crashes Ferret
stat lonvar
 
             X[GX=WIND_SPEED]
             regrid: on X
             LONGITUDE: 179.95W(-179.95) to 179.95E
             Y:  N/A
             Z:  N/A
             T:  N/A
             E:  N/A
             F:  N/A
             DATA SET: ./data/err742_stride_irreg_modulo.nc
 
 Total # of data points: 3 (3*1*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 292
 Maximum value: 9584
 Mean    value: 4404.3 (unweighted average)
 Standard deviation: 4737.1
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err742_dash_vs
! err743_dash_vs.jnl
! 8/24/18  Another example of issue 1884: correctly doing critical
!          portion of finding intercepts with axes in double precision
 
! The dashed line plots had extra solid lines drawn, report of 8/23/18
 
def sym com "hl=-1:1/vs/line/dash x[gx=-2:2:.1], 0-1.3*cos(2*x[gx=-2:2:.1])"
can view;
set view ul; plot/nolab/vl=-4:4/($com)
 !-> plot/nolab/vl=-4:4/hl=-1:1/vs/line/dash x[gx=-2:2:.1], 0-1.3*cos(2*x[gx=-2:2:.1])
set view ur; plot/nolab/vl=-2:2/($com)
 !-> plot/nolab/vl=-2:2/hl=-1:1/vs/line/dash x[gx=-2:2:.1], 0-1.3*cos(2*x[gx=-2:2:.1])
set view ll; plot/nolab/vl=-1:1/($com)
 !-> plot/nolab/vl=-1:1/hl=-1:1/vs/line/dash x[gx=-2:2:.1], 0-1.3*cos(2*x[gx=-2:2:.1])
set view lr; plot/nolab/vl=-.5:.5/($com)
 !-> plot/nolab/vl=-.5:.5/hl=-1:1/vs/line/dash x[gx=-2:2:.1], 0-1.3*cos(2*x[gx=-2:2:.1])
 
frame/file=dash_vs.gif
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err742_bounds_and_even
! err742_bounds_and_even.jnl
! The SHOW GRID couldn't get coordinates for the lon axis
! The first LIST command shows * for longitude range.
! The second LIST command caused a Fortran runtime error and crash
 
! File has both point_spacing="even" attribute and bounds on the lon
! axis.  The coordinates/bounds are not equally spaced. So neither
! the line_start/line_delta nor the line_coordinates were stored.
 
use bug1894.nc
show grid sealev
    GRID GDP1
 name       axis              # pts   start                end                 subset
 LON       LONGITUDE           72mi   2.5E                 2.5W                full
 LAT       LATITUDE             5 r   10S                  10N                 full
 normal    Z
 TIME      TIME                 1 r   02-OCT-1992 12:00    02-OCT-1992 12:00   full
list/y=0/x=-20:20 sealev
             VARIABLE : Sea Level Anomaly Estimate (m)
             FILENAME : bug1894.nc
             SUBSET   : 8 points (LONGITUDE)
             LATITUDE : 0
             TIME     : 02-OCT-1992 12:00
                  0     
                  3
 17.5W  / -3:  0.00433
 12.5W  / -2: -0.01566
 7.5W   / -1: -0.01129
 2.5W   /  0:  0.01790
 2.5E   /  1:  0.03413
 7.5E   /  2:  0.04252
 12.5E  /  3:     ....
 17.5E  /  4:     ....
list/i=1:4 x[gx=sealev]
             VARIABLE : X
                        axis LON
             FILENAME : bug1894.nc
             SUBSET   : 4 points (LONGITUDE)
 2.5E  / 1:   2.50
 7.5E  / 2:   7.50
 12.5E / 3:  12.50
 17.5E / 4:  17.50
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err742_v_levels
! err742_v_levels.jnl
! Issue 1899
! ACM 10/30/2018
!  If the magnitudes of data are small, then /LEVELS=v failed
!  to use the variance.
 
use data/smallval.nc
 
! Previously reported data too large or not within 3 STD
set view ul
shade/lev=v chl
show symbol LEV_OPNLEVS
LEV_OPNLEVS = "(0,3.5E-09,3.5E-09)(3.E-09,3.1E-08,1.E-09)(3.E-08,5.45E-08,3.5E-09)(inf)"
 
! variable minus mean
 
set view ur
shade/lev=vc chl - chl[x=@ave,y=@ave]
show symbol LEV_OPNLEVS
LEV_OPNLEVS = "(-inf)(-4.2E-08,-3.4E-08,8.E-09)(-3.4E-08,3.4E-08,2.E-09)(3.4E-08,4.2E-08,8.E-09)(inf)"
 
! one cell w/ a larger value
 
set view ll
shade/lev=v if chl gt 3.e-07 then (-3.e-6) else chl
show symbol LEV_OPNLEVS
LEV_OPNLEVS = "(-inf)(-4.E-08,-1.E-08,1.E-08)(-6.E-09,4.2E-08,2.E-09)(4.E-08,8.E-08,1.E-08)(inf)"
 
! this is fine, plots a constant color
 
set view lr
shade/lev=v 0.2 + 0*chl
show symbol LEV_OPNLEVS
 
frame/file=lev_v_levels.gif
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err742_overlay_shorttime
 
! err742_overlay_shorttime.jnl
! 11/1/2018  acm
! Issue 1900
!
 
! Overlay wrong for short-time-span plots.  No line sample on key
! for plot/over lines.
! In addition for some choices of intervals, the minor tic marks
! are notdrawn at even sub-intervals of the labeled tics.
 
define axis/t=30-aug-2017:1-sep-2017:1/units=minutes taxis
let var1 = cos(L[gt=taxis]/30)
let var2 = sin(L[gt=taxis]/10)
 
set view upper
plot/t="30-aug-2017:01:00":"30-aug-2017:03:00" var1, var2
set view lower
plot/t="30-aug-2017:01:00":"30-aug-2017:03:00" var1
plot/over var2
 
frame/file=shorttime_over.gif
 
! also for vertical time axes
cancel view
set view left
plot/trans/t="30-aug-2017:01:00":"30-aug-2017:03:00" var1, var2
set view right
plot/trans/t="30-aug-2017:01:00":"30-aug-2017:03:00" var1
plot/trans/over var2
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err742_xact_regrid
! err742_xact_regrid.jnl
! 11/6/2018 ACM
!
! More on @XACT regridding, see issue 1238
! and see err682_xact_high_prec.jnl
 
! Some axes where which match well enough that we we want to ignore
! the variation from the daily axis.
 
Let time = {\
   221.0000000000000,\
   221.0416666666280,\
   221.0833333333720,\
   221.1250000000000,\
   221.1666666666280,\
   221.2083333333720,\
   221.2916666666280,\
   221.3333333333720,\
   221.3750000000000,\
   221.4166666666280}
define axis/t/t0=1-jan-2018/units=days my_axis = time
let var = L[gt=my_axis]
 
define axis/t="10-aug-2018 00:00":"10-aug-2018 10:00":`1/24`/units=day/t0="1-jan-2018 00:00" hrly_ax
 !-> define axis/t="10-aug-2018 00:00":"10-aug-2018 10:00":0.04166666666666666/units=day/t0="1-jan-2018 00:00" hrly_ax
 
 
! Some differ in the last few digits
list/prec=16 t[gt=my_axis]
             VARIABLE : T
                        axis MY_AXIS
             SUBSET   : 10 points (TIME)
 10-AUG-2018 00:00:00 /  1:  221.0000000000000
 10-AUG-2018 01:00:00 /  2:  221.0416666666280
 10-AUG-2018 02:00:00 /  3:  221.0833333333720
 10-AUG-2018 03:00:00 /  4:  221.1250000000000
 10-AUG-2018 04:00:00 /  5:  221.1666666666280
 10-AUG-2018 05:00:00 /  6:  221.2083333333720
 10-AUG-2018 07:00:00 /  7:  221.2916666666280
 10-AUG-2018 08:00:00 /  8:  221.3333333333720
 10-AUG-2018 09:00:00 /  9:  221.3750000000000
 10-AUG-2018 10:00:00 / 10:  221.4166666666280
list/prec=16 t[gt=hrly_ax]
             VARIABLE : T
                        axis HRLY_AX
             SUBSET   : 11 points (TIME)
 10-AUG-2018 00:00:00 /  1:  221.0000000000000
 10-AUG-2018 01:00:00 /  2:  221.0416666666667
 10-AUG-2018 02:00:00 /  3:  221.0833333333333
 10-AUG-2018 03:00:00 /  4:  221.1250000000000
 10-AUG-2018 04:00:00 /  5:  221.1666666666667
 10-AUG-2018 05:00:00 /  6:  221.2083333333333
 10-AUG-2018 06:00:00 /  7:  221.2500000000000
 10-AUG-2018 07:00:00 /  8:  221.2916666666667
 10-AUG-2018 08:00:00 /  9:  221.3333333333333
 10-AUG-2018 09:00:00 / 10:  221.3750000000000
 10-AUG-2018 10:00:00 / 11:  221.4166666666667
 
let var_on_reg = var[gt=hrly_ax@xact]
 
! Previously the regridding was wrong: listed values were 1,2,2,4,5,5,...
list var_on_reg
             VARIABLE : VAR[GT=HRLY_AX@XACT]
             SUBSET   : 11 points (TIME)
 10-AUG-2018 00:00:00 /  1:  1.000
 10-AUG-2018 01:00:00 /  2:  2.000
 10-AUG-2018 02:00:00 /  3:  3.000
 10-AUG-2018 03:00:00 /  4:  4.000
 10-AUG-2018 04:00:00 /  5:  5.000
 10-AUG-2018 05:00:00 /  6:  6.000
 10-AUG-2018 06:00:00 /  7:   ....
 10-AUG-2018 07:00:00 /  8:  7.000
 10-AUG-2018 08:00:00 /  9:  8.000
 10-AUG-2018 09:00:00 / 10:  9.000
 10-AUG-2018 10:00:00 / 11:   ....
 
! some axes with different units so other magnitudes of coordinates
let time = 109573 + {\
   221.0000000000000,\
   221.0416666666280,\
   221.0833333333720,\
   221.1250000000000,\
   221.1666666666280,\
   221.2083333333720,\
   221.2916666666280,\
   221.3333333333720,\
   221.3750000000000,\
   221.4166666666280}
 
define axis/t/t0=1-jan-1718/units=days my_axis = time
 
define axis/t="10-aug-2018 00:00":"10-aug-2018 10:00":`1/24`/units=day/t0="1-jan-1900 00:00" hrly_ax
 !-> define axis/t="10-aug-2018 00:00":"10-aug-2018 10:00":0.04166666666666666/units=day/t0="1-jan-1900 00:00" hrly_ax
 
let var_on_reg = var[gt=hrly_ax@xact]
list var_on_reg
             VARIABLE : VAR[GT=HRLY_AX@XACT]
             SUBSET   : 11 points (TIME)
 10-AUG-2018 00:00:00 /  1:  1.000
 10-AUG-2018 01:00:00 /  2:  2.000
 10-AUG-2018 02:00:00 /  3:  3.000
 10-AUG-2018 03:00:00 /  4:  4.000
 10-AUG-2018 04:00:00 /  5:  5.000
 10-AUG-2018 05:00:00 /  6:  6.000
 10-AUG-2018 06:00:00 /  7:   ....
 10-AUG-2018 07:00:00 /  8:  7.000
 10-AUG-2018 08:00:00 /  9:  8.000
 10-AUG-2018 09:00:00 / 10:  9.000
 10-AUG-2018 10:00:00 / 11:   ....
 
 
define axis/t/t0=1-jan-2018/units=seconds my_axis = 24*3600* {\
   221.0000000000000,\
   221.0416666666280,\
   221.0833333333720,\
   221.1250000000000,\
   221.1666666666280,\
   221.2083333333720,\
   221.2916666666280,\
   221.3333333333720,\
   221.3750000000000,\
   221.4166666666280}
 
define axis/t="10-aug-2018 00:00":"10-aug-2018 10:00":3600//units=seconds/t0="1-jan-1900 00:00" hrly_ax
 
let var_on_reg = var[gt=hrly_ax@xact]
list var_on_reg
             VARIABLE : VAR[GT=HRLY_AX@XACT]
             SUBSET   : 11 points (TIME)
 10-AUG-2018 00:00 /  1:  1.000
 10-AUG-2018 01:00 /  2:  2.000
 10-AUG-2018 02:00 /  3:  3.000
 10-AUG-2018 03:00 /  4:  4.000
 10-AUG-2018 04:00 /  5:  5.000
 10-AUG-2018 05:00 /  6:  6.000
 10-AUG-2018 06:00 /  7:   ....
 10-AUG-2018 07:00 /  8:  7.000
 10-AUG-2018 08:00 /  9:  8.000
 10-AUG-2018 09:00 / 10:  9.000
 10-AUG-2018 10:00 / 11:   ....
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err742_trans_striding
! err742_trans_striding.jnl
! 11/7/2018 *acm*
!
! Testing fix for issue 965. Loading adev[L=@max] where the
! underlying variable has strides specified previuosly resulted
! in an error:
! inconsistent sizes of data regions: can't label T axis of A[L=@AVE]
!
use data/navy_uw.nc
let a = uwnd[l=1:132:2]
let adev = a-a[l=@ave]
stat adev[L=@max]
 
             A-A[L=@AVE]
             LONGITUDE: 60W to 0E(360)
             LATITUDE: 0 to 60N
             Z:  N/A
             TIME: 01-JAN-0000 00:00 to 16-DEC-0010 11:32 (maximum)
             E:  N/A
             F:  N/A
             DATA SET: data/navy_uw.nc
 
 Total # of data points: 900 (30*30*1*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 0.17362
 Maximum value: 6.4716
 Mean    value: 1.6091 (unweighted average)
 Standard deviation: 0.94096
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err742_tstart_tend
! err742_tstart_tend.jnl
! 11/27/2018 ACM
!
! See issue 1902: `var,return=tstart` and `var,return=tend`  report incorrect
! fractional-seconds on their output
 
define axis/t="01-jan-2012 12:00:00":"31-dec-2014 12:00:00":1/unit="days" tdata
let tvar = randu(t[gt=tdata])
 
! Results should end in 12:00:00, but ended in 12:00:00.5
 
define symbol time1 `tvar,return=tstart`
 !-> define symbol time1 01-JAN-2012 12:00:00
define symbol time2 `tvar,return=tend`
 !-> define symbol time2 31-DEC-2014 12:00:00
 
! These outputs get stripped off by the cleaning script. Show the hour:min:second portion
let ns = STRLEN("($time1)")
 !-> DEFINE VARIABLE ns = STRLEN("01-JAN-2012 12:00:00")
let t1 = STR_REPLACE("($time1)", ":", "_")
 !-> DEFINE VARIABLE t1 = STR_REPLACE("01-JAN-2012 12:00:00", ":", "_")
let t2 = STR_REPLACE("($time1)", ":", "_")
 !-> DEFINE VARIABLE t2 = STR_REPLACE("01-JAN-2012 12:00:00", ":", "_")
SAY TSTART ends  `substring(t1,13,ns)`   TEND ends  `substring(t2,13,ns)`
 !-> MESSAGE/CONTINUE TSTART ends  12_00_00   TEND ends  12_00_00
TSTART ends  12_00_00   TEND ends  12_00_00
 
 
! Check if the units are minutes. These results were also incorrect
 
define axis/t="01-jan-2012 12:00:30":"31-dec-2014 12:00:30":0.5/unit="minutes" tdata
let tvar = randu(t[gt=tdata])
 
define symbol time1 `tvar,return=tstart`
 !-> define symbol time1 01-JAN-2012 12:00:30
define symbol time2 `tvar,return=tend`
 !-> define symbol time2 31-DEC-2014 12:00:30
let t1 = STR_REPLACE("($time1)", ":", "_")
 !-> DEFINE VARIABLE t1 = STR_REPLACE("01-JAN-2012 12:00:30", ":", "_")
let t2 = STR_REPLACE("($time1)", ":", "_")
 !-> DEFINE VARIABLE t2 = STR_REPLACE("01-JAN-2012 12:00:30", ":", "_")
SAY TSTART ends  `substring(t1,13,ns)`   TEND ends  `substring(t2,13,ns)`
 !-> MESSAGE/CONTINUE TSTART ends  12_00_30   TEND ends  12_00_30
TSTART ends  12_00_30   TEND ends  12_00_30
 
 
 
! Check if the units are seconds. These results were also incorrect
 
define axis/t="01-jan-2012 12:00:30":"31-dec-2014 12:00:30":30/unit="seconds" tdata
 
let tvar = randu(t[gt=tdata])
 
define symbol time1 `tvar,return=tstart`
 !-> define symbol time1 01-JAN-2012 12:00:30.0
define symbol time2 `tvar,return=tend`
 !-> define symbol time2 31-DEC-2014 12:00:30.0
let ns = STRLEN("($time1)")
 !-> DEFINE VARIABLE ns = STRLEN("01-JAN-2012 12:00:30.0")
let t1 = STR_REPLACE("($time1)", ":", "_")
 !-> DEFINE VARIABLE t1 = STR_REPLACE("01-JAN-2012 12:00:30.0", ":", "_")
let t2 = STR_REPLACE("($time1)", ":", "_")
 !-> DEFINE VARIABLE t2 = STR_REPLACE("01-JAN-2012 12:00:30.0", ":", "_")
SAY TSTART ends  `substring(t1,13,ns)`   TEND ends  `substring(t2,13,ns)`
 !-> MESSAGE/CONTINUE TSTART ends  12_00_30.0   TEND ends  12_00_30.0
TSTART ends  12_00_30.0   TEND ends  12_00_30.0
 
 
! Correctly lists fractions if the coordinates are fractions of seconds
 
define axis/t="01-jan-2012 12:00:01.2":"01-jan-2012 12:12:01.8":0.2/unit="seconds" tdata
let tvar = randu(t[gt=tdata])
 
define symbol time1 `tvar,return=tstart`
 !-> define symbol time1 01-JAN-2012 12:00:01.2
define symbol time2 `tvar,return=tend`
 !-> define symbol time2 01-JAN-2012 12:12:01.8
let ns = STRLEN("($time1)")
 !-> DEFINE VARIABLE ns = STRLEN("01-JAN-2012 12:00:01.2")
let t1 = STR_REPLACE("($time1)", ":", "_")
 !-> DEFINE VARIABLE t1 = STR_REPLACE("01-JAN-2012 12:00:01.2", ":", "_")
let t2 = STR_REPLACE("($time1)", ":", "_")
 !-> DEFINE VARIABLE t2 = STR_REPLACE("01-JAN-2012 12:00:01.2", ":", "_")
SAY TSTART ends  `substring(t1,13,ns)`   TEND ends  `substring(t2,13,ns)`
 !-> MESSAGE/CONTINUE TSTART ends  12_00_01.2   TEND ends  12_00_01.2
TSTART ends  12_00_01.2   TEND ends  12_00_01.2
*** Running ferret script: bn_data_squared.jnl
! bn_data_squared.jnl
! Simple test for var^2 output, results after change for ticket 1891
! 8/29/2018
 
use levitus_3d_subset.nc
list/k=1:10/i=1/j=1/prec=6 temp, temp^2
             DATA SET: ./data/levitus_3d_subset.nc
             DEPTH (m): 0 to 350
             LONGITUDE: 120.5E
             LATITUDE: 49.5S
 Column  1: TEMP is TEMPERATURE (DEG C)
 Column  2: EX#2 is TEMP^2
                TEMP    EX#2
0      /  1:  6.82700  46.6079
10     /  2:  6.84300  46.8267
20     /  3:  6.84000  46.7856
30     /  4:  6.74100  45.4411
50     /  5:  6.62400  43.8774
75     /  6:  6.75100  45.5760
100    /  7:  6.46200  41.7574
150    /  8:  6.46600  41.8092
200    /  9:  6.02600  36.3127
300    / 10:  5.44500  29.6480
*** Running ferret script: bn_overlay_graticules.jnl
! bn_overlay_graticules.jnl
! See issue 1786, graticule lines on plots with overlays.
! Multiple overlay of axis lines causes extra thickness inpyFerret,
! so have been drawing axis lines only once on 1st plot. es and
! graticules weren't drawn on an overlay so the graticule lines
! show on the final plot only where the plot has missing areas
 
use coads_climatology
define view/axes/x=0.2:0.8/y=.1:.4 lov
define view/axes/x=0.2:0.8/y=.6:.9 hiv
 
 
set mode graticule:(dash,color=black)
set view hiv
shade/l=1/x=100:160/y=-40:-10/nolab sst
fill/over/nolab/l=1 sst
 
! Do the first plot with /NOAX and the overlay with /AXES
! to draw the axes once, only on the last plot.
 
set v lov
shade/l=1/x=100:160/y=-40:-10/nolab/noax sst
fill/over/nolab/l=1/AXES sst
frame/file=graticule_on_over.gif
 
 
cancel view
! likewise for polygons where the overlay covered up the graticule lines
 
set mode graticule
polygon/thick/color=red/palette=blue/noax {1,2,1}, {2,1,0.5}
polygon/thick/color=red/palette=green/over/nolab/axes {2,1,2}, {2,1,0.5}
 
! or just vertical ones
polygon/thick/color=red/palette=blue/noax {1,2,1}, {2,1,0.5}
polygon/thick/color=red/palette=green/over/nolab/axes=1,1,0,0 {2,1,2}, {2,1,0.5}
 
 
! Line plots
 
set mode graticule:(dash,thick)
PLOT/i=1:120/color=lighblue/thick=3/nokey/noax cos(i/30), cos(i/33), cos(i/35), cos(i/36), cos(i/38)
PLOT/i=1:120/color=red/thick=3/axes/nokey/nolab/over sin(i/30), sin(i/33), sin(i/35), sin(i/36), sin(i/38)
 
! vectors
 
VECTOR/I=1:10/J=1:20/LEN=2/color=red/thick=3/noax i/j,j/i
VECTOR/over/nolab/I=1:10/J=1:20/LEN=2/color=lightblue/thick=3/axes (i/j),(j*1.2)/i
 
cancel mode graticule
*** Running ferret script: bn_mixed_gregorian.jnl
! bn_mixed_gregorian
! Issue 1906
! 11/2018 PROLEPTIC_GREGORIAN overrides mixed-calendar handling, so no offset applied
 
! Create a test dataset with several time axes
!
! This will handled as a mixed, 2-day shifted calendar axis
 
define axis/t=1-jan-2001:5-jan-2001:1/t0=1-jan-0001/units=days timem
let var1 = t[gt=timem]
save/clobber/file=mixed_or_proleptic.nc var1
 
 
! This uses PROLEPTIC_GREGORIAN, so will handled without the shift
 
define axis/t=1-jan-2001:5-jan-2001:1/t0=1-jan-0001/units=days/calendar="PROLEPTIC_GREGORIAN" timep
let var2 = t[gt=timep]
save/append/file=mixed_or_proleptic.nc var2
 
 
! This will handled as always, as a proleptic gregorian calendar
 
define axis/t=1-jan-2001:5-jan-2001:1/t0=1-jan-1000/units=days tstd
let var3 = t[gt=tstd]
save/append/file=mixed_or_proleptic.nc var3
 
cancel var/all
cancel axis timem,timep,tstd
 
! Now test how the axes are interpreted.
 
use mixed_or_proleptic.nc
 
! This is on a mixed-Gregorian calendar axis so  dates are shifted and start on 30-dec-2000
show axis `var1,return=taxis`
 !-> show axis TIMEM
 name       axis              # pts   start                end
 TIMEM     TIME                 5 r   30-DEC-2000 00:00    03-JAN-2001 00:00
T0 = 01-JAN-0001 00:00:00
   Axis span (to cell edges) = 5
 
 
! This is on a proleptic-Gregorian calendar axis so dates are not shifted
show axis `var2,return=taxis`
 !-> show axis TIMEP
 name       axis              # pts   start                end
 TIMEP     TIME                 5 r   01-JAN-2001 00:00    05-JAN-2001 00:00
T0 = 01-JAN-0001
CALENDAR = PROLEPTIC_GREGORIAN
   Axis span (to cell edges) = 5
 
 
! Axes with time origins other than 1-jan-0001 are handled as proleptic-Gregorian
show axis `var3,return=taxis`
 !-> show axis TSTD
 name       axis              # pts   start                end
 TSTD      TIME                 5 r   01-JAN-2001 00:00    05-JAN-2001 00:00
T0 = 01-JAN-1000
   Axis span (to cell edges) = 5
 
*** Running ferret script: bn_int64.jnl
! bn_int64.jnl
! issue 1905
! 11/29/2018 ACM
!
! This dataset stores time coordinates as INT64
! previously the USE gave a warning about unknown type
 
use int64.nc
sh dat
     currently SET data sets:
    1> ./data/int64.nc  (default)
 name     title                             I         J         K         L
 BLGPCO2  Surface ocean partial pressure   1:5       ...       ...       1:6
 
sh dat/att
     currently SET data sets:
    1> ./data/int64.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        36   T       FERRET V7.432 (beta/debug) 29-Nov-18
                                 Conventions     CHAR        6    F       CF-1.6
  
(XC5)                  FLOAT     units           CHAR        12   T       degrees_east
                                 long_name       CHAR        9    T       longitude
                                 axis            CHAR        1    T       X
                                 modulo          FLOAT       1    T       360
                                 standard_name   CHAR        9    F       longitude
                                 orig_file_axname
                                                 CHAR        3    F       XC5
  
(TIME)                 INT64     long_name       CHAR        4    T       Time
                                 axis            CHAR        1    T       T
                                 units           CHAR        33   T       seconds since 2012-12-01 00:00:00
                                 calendar        CHAR        19   T       proleptic_gregorian
                                 standard_name   CHAR        4    F       time
                                 orig_file_axname
                                                 CHAR        4    F       TIME
  
 BLGPCO2               FLOAT     _FillValue      FLOAT       1    T       -1.E+34
                                 units           CHAR        3    T       atm
                                 long_name       CHAR        37   T       Surface ocean partial pressure of CO2
                                 history         CHAR        70   T       From /home/users/ansley/tarfiles/bsose_i001_2013to2017_monthly_pCO2.nc
  
 
! previously this gave an error
save/clobber/file=a.nc/i=1:4/l=1:5 blgpco2
 
! Write the coords using double, as netcdf fortran wont let us
! define an int64 var for writing.
use a.nc
show grid blgpco2[d=1]
    GRID GKU1
 name       axis              # pts   start                end                 subset
 XC5       LONGITUDE            5mr   60.083W(299.92)      59.417W(300.58)     full
 normal    Y
 normal    Z
 TIME      TIME                 6 r   02-JUL-2015 10:24    01-DEC-2015 14:24   full
show grid blgpco2[d=2]
    GRID GSI1
 name       axis              # pts   start                end                 subset
 XC51_4    LONGITUDE            4mr   60.083W(299.92)      59.583W(300.42)     full
 normal    Y
 normal    Z
 TIME1     TIME                 5 r   02-JUL-2015 10:24    01-NOV-2015 04:00   full
list/i=1 blgpco2[d=1]
             VARIABLE : Surface ocean partial pressure of CO2 (atm)
             FILENAME : int64.nc
             SUBSET   : 6 points (TIME)
             CALENDAR : PROLEPTIC_GREGORIAN
             LONGITUDE: 60.0833W
                     60.08W   
                       1
 02-JUL-2015 / 1:  3.646E-04
 01-AUG-2015 / 2:  3.617E-04
 01-SEP-2015 / 3:  3.430E-04
 01-OCT-2015 / 4:  3.442E-04
 01-NOV-2015 / 5:  3.492E-04
 01-DEC-2015 / 6:  3.867E-04
list/i=1 blgpco2[d=2]
             VARIABLE : Surface ocean partial pressure of CO2 (atm)
             FILENAME : a.nc
             SUBSET   : 5 points (TIME)
             CALENDAR : PROLEPTIC_GREGORIAN
             LONGITUDE: 60.0833W
                     60.08W   
                       1
 02-JUL-2015 / 1:  3.646E-04
 01-AUG-2015 / 2:  3.617E-04
 01-SEP-2015 / 3:  3.430E-04
 01-OCT-2015 / 4:  3.442E-04
 01-NOV-2015 / 5:  3.492E-04
*** Running ferret script: bn_samplexyz.jnl
! bn_samplexyz.jnl
 
! Check the SAMPLEXYZ function, should give missing results for Z sample points
! that lie beyond the ends of the Z axis of the grid being sampled
 
show function samplexyz
SAMPLEXYZ(DAT_TO_SAMPLE,XPTS,YPTS,ZPTS)
    Returns data sampled at a set of (X,Y,Z) points, using linear interpolation
    DAT_TO_SAMPLE: variable (x,y,z,t,e,f) to sample
    XPTS: X values of sample points
    YPTS: Y values of sample points
    ZPTS: Z values of sample points
 
define axis/x=0:360:1/units=longitude/edges/modulo x1
define axis/y=-90:90:45/units=latitude/edges y1
define axis/z/depth/units=meters z1 = {0,2,4,10,20,40,80,120}
 
let my_data = 0*x[gx=x1]+y[gy=y1]+z[gz=z1]
 
define axis/z=5:155:10/depth zsamples
let zpts = xsequence(z[gz=zsamples])
let ypts = xsequence((randu(zpts)-0.5)*90)
let xpts = 180 + 0*ypts
let sampl_pts =  samplexyz(my_data,xpts,ypts,zpts)
 
!  Note that the samplexyz should flag points beyond the ends of the grid
 
! Check the results with a listing
list ypts, zpts, sampl_pts
             X: 0.5 to 16.5
 Column  1: YPTS is XSEQUENCE((RANDU(ZPTS)-0.5)*90)
 Column  2: ZPTS is XSEQUENCE(Z[GZ=ZSAMPLES])
 Column  3: SAMPL_PTS is SAMPLEXYZ(MY_DATA,XPTS,YPTS,ZPTS)
            YPTS   ZPTS  SAMPL_PTS
1    /  1:   9.29    5.0    14.3
2    /  2:   4.68   15.0    19.7
3    /  3:  15.39   25.0    40.4
4    /  4:   4.78   35.0    39.8
5    /  5: -28.35   45.0    16.6
6    /  6:  14.41   55.0    69.4
7    /  7: -22.97   65.0    42.0
8    /  8: -13.93   75.0    61.1
9    /  9:  23.70   85.0   108.7
10   / 10:  -7.89   95.0    87.1
11   / 11: -17.39  105.0    87.6
12   / 12:  32.67  115.0   147.7
13   / 13: -17.40  125.0   102.6
14   / 14: -41.75  135.0    78.2
15   / 15:  10.21  145.0    ....
16   / 16: -15.09  155.0    ....
 
let my_yz = y[gy=y1]+z[gz=z1]
let sampl_yz = sampleyz(my_yz, ypts, zpts)
 
! Check the results with a listing
list ypts, zpts, reshape(sampl_yz,ypts)
             X: 0.5 to 16.5
 Column  1: YPTS is XSEQUENCE((RANDU(ZPTS)-0.5)*90)
 Column  2: ZPTS is XSEQUENCE(Z[GZ=ZSAMPLES])
 Column  3: EX#3 is RESHAPE(SAMPL_YZ,YPTS)
            YPTS   ZPTS   EX#3
1    /  1:   9.29    5.0   14.3
2    /  2:   4.68   15.0   19.7
3    /  3:  15.39   25.0   40.4
4    /  4:   4.78   35.0   39.8
5    /  5: -28.35   45.0   16.6
6    /  6:  14.41   55.0   69.4
7    /  7: -22.97   65.0   42.0
8    /  8: -13.93   75.0   61.1
9    /  9:  23.70   85.0  108.7
10   / 10:  -7.89   95.0   87.1
11   / 11: -17.39  105.0   87.6
12   / 12:  32.67  115.0  147.7
13   / 13: -17.40  125.0   ....
14   / 14: -41.75  135.0   ....
15   / 15:  10.21  145.0   ....
16   / 16: -15.09  155.0   ....
 
plot/line/sym sampl_pts, reshape(sampl_yz,ypts)
 
! and here we show it graphically
shade my_data[x=180]
 
plot/vs/over/nolab/ribbon/lev/sym=18/thick/siz=0.2 ypts, zpts, sampl_pts
 
 
*** Running ferret script: bn745_bug_fixes.jnl
! bn745_bug_fixes.jnl
! test various fixes that went into version 7.45
! 12/18 *acm*
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err744_time_as_string
! err744_time_as_string.jnl
! 12/12/2018 ACM
! See issue 1049: time_dim_1 coordinate is not numeric
 
! Previously didnt give a warning message about the invalid time axis
! in the variable time_dim_1
 
use stringtime.nc
show data
     currently SET data sets:
    1> ./data/stringtime.nc  (default)
 name     title                             I         J         K         L
 TIME_DIM_1
                                           ...       ...       ...       1:5
 CRW      Twice-weekly global 50km satell  1:1       1:1       ...       1:5
 
show grid crw
    GRID GJX2
 name       axis              # pts   start                end                 subset
 LONGITUDE LONGITUDE            1 r   105.1E(105.1)        105.1E(105.1)       full
 LATITUDE  LATITUDE             1 r   11.212N              11.212N             full
 normal    Z
 TIME_DIM_1 T                   5 r   1                    5                   full
 
! The strings are available in a variable, as in other invalid
! coordinate axes, so one could use string functions to parse the
! strings and define a valid axis...
 
list time_dim_1
             VARIABLE : TIME_DIM_1
             FILENAME : stringtime.nc
             SUBSET   : 5 points (T)
 1   / 1:"2000-12-02T00:00:00Z"
 2   / 2:"2000-12-05T00:00:00Z"
 3   / 3:"2000-12-09T00:00:00Z"
 4   / 4:"2000-12-12T00:00:00Z"
 5   / 5:"2000-12-16T00:00:00Z"
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err744_dsetnum
! err744_dsetnum
!   2/8/2019
! issue 400.
!
! for user-defined variables, return=dset returns wrong result
! Likewise dsetnum, dsatpath
!
 
! open a couple data sets
let sst = {1,2,3,4}
let airt = {4,5,6,7,8}
 
save/clobber/file=a1.nc sst
save/clobber/file=a2.nc airt
 
can var/all
 
use a1, a2
 
! this is correct
 
say `sst[d=1],return=dsetpath`
 !-> MESSAGE/CONTINUE ./a1.nc
./a1.nc
 
let u1 = sst[d=1]
 
! This should return dataset 1 but returns 2
! Same bug for return=dset, dsetnum, dsetpath
 
say `u1,return=dsetnum`
 !-> MESSAGE/CONTINUE 1
1
say `u1,return=dset`
 !-> MESSAGE/CONTINUE a1
a1
say `u1,return=dsetpath`
 !-> MESSAGE/CONTINUE ./a1.nc
./a1.nc
 
! What about a let/D variable?  Not sure what's the right answer here,
! but the changes return 1.
 
let/d=2 mydata = sst[d=1]
say `mydata,return=dsetnum`
 !-> MESSAGE/CONTINUE 1
1
 
 
! Not going any further with variable definitions. If the
! definition itself doesn't have [d=1] don't try to figure out
! its "dataset". As before this just returns the default dataset
! Document this.
 
let var = u1
say `var,return=dsetnum`
 !-> MESSAGE/CONTINUE 2
2
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err744_shade_error
! err744_shade/nolab/nokey_error
! Issue 1914: with some plot areas, portions of shade/nolab/nokey plot go missing
! Ansley Manke March 8 2019
 
let/title="longitude"/unit="degrees_e" xedge = x[gx=0:3:1] + 0*y[gy=0:3:1]
let/title="latitude"/unit="degrees_n" yedge = 0*x[gx=0:3:1] + y[gy=0:3:1]
let/title="temperature"/unit="K" val = reshape({1,2,3,4,5,6,7,8,9},x[gx=1:3:1]+y[gy=1:3:1])
 
! This plot left the bottom row of cells blank
set win/asp=0.86
set view full
shade/nolab/nokey val, xedge, yedge
 
! With another aspect ratio, it's correct
define view/axes/x=0.5:1/y=0.5:1 square
set view square
shade/nolab/nokey val, xedge, yedge
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err744_keylabs
! err744_keylabs.jnl
! ticket 1915: Numbers at the start of moveable labels weren't drawn.
! 3/2019 ACM
 
if ($program_name"0|PyFerret>1|*>0") then set text/font=verdana
 !-> if 0 then set text/font=verdana
 
let /title="771" var1 = {7,7,1}
let/title="893.0" var2 = {8,9,3}
set view upper
! both of the key labels were missing
plot/thick/key=title var1, var2
 
 
let /title="my label is 771" var1 = {7,7,1}
let/title="893 and stuff" var2 = {8,9,3}
set view lower
 
! key label for second line said just "and stuff"
plot/thick/key=title var1, var2
 
frame/file=line_key_labels.gif
 
if ($program_name"0|PyFerret>1|*>0") then cancel text
 !-> if 0 then cancel text
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err744_list_precision
! err744_list_precision.jnl
 
! "nnn.nnn" - not a problem
LIST /PREC=6  100.0 * COS(_X[X=0.0:3.2:0.2])
             VARIABLE : 100.0 * COS(_X[X=0.0:3.2:0.2])
             SUBSET   : 17 points (X)
 0    /  1:  100.000
 0.2  /  2:   98.007
 0.4  /  3:   92.106
 0.6  /  4:   82.534
 0.8  /  5:   69.671
 1    /  6:   54.030
 1.2  /  7:   36.236
 1.4  /  8:   16.997
 1.6  /  9:   -2.920
 1.8  / 10:  -22.720
 2    / 11:  -41.615
 2.2  / 12:  -58.850
 2.4  / 13:  -73.739
 2.6  / 14:  -85.689
 2.8  / 15:  -94.222
 3    / 16:  -98.999
 3.2  / 17:  -99.829
 
! should be "nnn.nnnnnn"; previously was giving just "n." (/PREC=1)
LIST /PREC=-6 100.0 * COS(_X[X=0.0:3.2:0.2])
             VARIABLE : 100.0 * COS(_X[X=0.0:3.2:0.2])
             SUBSET   : 17 points (X)
 0    /  1:  100.000000
 0.2  /  2:   98.006658
 0.4  /  3:   92.106099
 0.6  /  4:   82.533561
 0.8  /  5:   69.670671
 1    /  6:   54.030231
 1.2  /  7:   36.235775
 1.4  /  8:   16.996714
 1.6  /  9:   -2.919952
 1.8  / 10:  -22.720209
 2    / 11:  -41.614684
 2.2  / 12:  -58.850112
 2.4  / 13:  -73.739372
 2.6  / 14:  -85.688875
 2.8  / 15:  -94.222234
 3    / 16:  -98.999250
 3.2  / 17:  -99.829478
 
! "nnn.nnn" - not a problem
SET LIST /PREC=6
LIST 100.0 * COS(_X[X=0.0:3.2:0.2])
             VARIABLE : 100.0 * COS(_X[X=0.0:3.2:0.2])
             SUBSET   : 17 points (X)
 0    /  1:  100.000
 0.2  /  2:   98.007
 0.4  /  3:   92.106
 0.6  /  4:   82.534
 0.8  /  5:   69.671
 1    /  6:   54.030
 1.2  /  7:   36.236
 1.4  /  8:   16.997
 1.6  /  9:   -2.920
 1.8  / 10:  -22.720
 2    / 11:  -41.615
 2.2  / 12:  -58.850
 2.4  / 13:  -73.739
 2.6  / 14:  -85.689
 2.8  / 15:  -94.222
 3    / 16:  -98.999
 3.2  / 17:  -99.829
 
! should be "nnn.nnnnnn"; previously was giving **ERROR: Unknown error writing data    100.00000000000000
SET LIST /PREC=-6
LIST 100.0 * COS(_X[X=0.0:3.2:0.2])
             VARIABLE : 100.0 * COS(_X[X=0.0:3.2:0.2])
             SUBSET   : 17 points (X)
 0    /  1:  100.000000
 0.2  /  2:   98.006658
 0.4  /  3:   92.106099
 0.6  /  4:   82.533561
 0.8  /  5:   69.670671
 1    /  6:   54.030231
 1.2  /  7:   36.235775
 1.4  /  8:   16.996714
 1.6  /  9:   -2.919952
 1.8  / 10:  -22.720209
 2    / 11:  -41.614684
 2.2  / 12:  -58.850112
 2.4  / 13:  -73.739372
 2.6  / 14:  -85.688875
 2.8  / 15:  -94.222234
 3    / 16:  -98.999250
 3.2  / 17:  -99.829478
 
 
! return to default precision
SET LIST /PREC
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err744_context
! err744_context.jnl
! also testing fix for ticket 1916
! The fix for 1323 caused this, interfering with
! correct application of the region when loading expression
! with [x=@sum,y=@sum] for different ranges in X and Y
 
! test with `return= ` results in the mix.
 
set mode diagnos
use "cellareas.nc"
show grid areacella
 getgrid EX#1     C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
    GRID GQL1
 name       axis              # pts   start                end                 subset
 LON       LONGITUDE          288mr   0E                   1.25W               full
 LAT       LATITUDE           192 i   90S                  90N                 full
 normal    Z
 normal    T
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 
! this factor previously had a problem with modulo operations
! (as well as using cached values, although obscured by the modulo problem)
let factor = 1.0E14 + areacella
 
! this factor had the cache but not the modulo problem
! let factor = 1.0E14 + 100.0 * _X[gx=areacella] + 100.0 * _Y[gy=areacella]
 
! the problem arose only with implicit limits on the transformation
let w = factor / areacella[x=@sum,y=@sum]
 
! the error used to show up without the following, but arose from code changes
! to support this command.  Verify using it beforehand does not cause problems.
say `w,return=shape`
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid W        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid FACTOR   C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 getgrid EX#1     C:  6 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 !-> MESSAGE/CONTINUE XY
XY
 
! X bounds must be assymetrical across the modulo split
define symbol xlobnds "-5:-1.25"
define symbol xhibnds "0:10"
define symbol xfullbnds "-5:10"
define symbol ybnds "-3.3:9.9"
 
! the values in all these should be the same for all longitudes
! but differ with different region sizes
 
! following always was computed correctly
list /width=500 /prec=7 /x=($xlobnds) /y=($ybnds) w
 !-> list /width=500 /prec=7 /x=-5:-1.25 /y=-3.3:9.9 w
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid W        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid FACTOR   C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 eval    W        C:  7 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 strip moduloing FACTOR on X axis:       -3        0 dset:   1
 eval    FACTOR   C: 11 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 constan cnst     M:  5 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 reading ARE-ELLA M:  4 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE cnst     M:  5 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 doing moduloing FACTOR on X axis:      285      288 dset:   1
 strip --> AREACELLA[Y=3.3S:9.9N@SM4,D=1]
 strip moduloing AREACELLA on X axis:       -3        0 dset:   1
 found   ARE-ELLA M:  4 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 doing moduloing AREACELLA on X axis:      285      288 dset:   1
 doing --> AREACELLA[Y=3.3S:9.9N@SM4,D=1]
             VARIABLE : FACTOR / AREACELLA[X=@SUM,Y=@SUM]
             FILENAME : cellareas.nc
             SUBSET   : 4 by 15 points (LONGITUDE-LATITUDE)
                 5W(-5)    3.8W      2.5W      1.2W    
                  -3        -2        -1         0
 9.89N / 107:  114.9170  114.9170  114.9170  114.9170
 8.95N / 106:  114.9170  114.9170  114.9170  114.9170
 8.01N / 105:  114.9170  114.9170  114.9170  114.9170
 7.07N / 104:  114.9171  114.9171  114.9171  114.9171
 6.13N / 103:  114.9171  114.9171  114.9171  114.9171
 5.18N / 102:  114.9171  114.9171  114.9171  114.9171
 4.24N / 101:  114.9172  114.9172  114.9172  114.9172
 3.3N  / 100:  114.9172  114.9172  114.9172  114.9172
 2.36N /  99:  114.9172  114.9172  114.9172  114.9172
 1.41N /  98:  114.9172  114.9172  114.9172  114.9172
 0.47N /  97:  114.9172  114.9172  114.9172  114.9172
 0.47S /  96:  114.9172  114.9172  114.9172  114.9172
 1.41S /  95:  114.9172  114.9172  114.9172  114.9172
 2.36S /  94:  114.9172  114.9172  114.9172  114.9172
 3.3S  /  93:  114.9172  114.9172  114.9172  114.9172
 
! following always was computed correctly
list /width=500 /prec=7 /x=($xhibnds) /y=($ybnds) w
 !-> list /width=500 /prec=7 /x=0:10 /y=-3.3:9.9 w
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 eval    W        C:  7 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 eval    FACTOR   C:  9 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 constan cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 reading ARE-ELLA M:  8 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 strip --> AREACELLA[Y=3.3S:9.9N@SM4,D=1]
 found   ARE-ELLA M:  8 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 doing --> AREACELLA[Y=3.3S:9.9N@SM4,D=1]
             VARIABLE : FACTOR / AREACELLA[X=@SUM,Y=@SUM]
             FILENAME : cellareas.nc
             SUBSET   : 9 by 15 points (LONGITUDE-LATITUDE)
                  0E        1.2E      2.5E      3.8E      5E        6.2E      7.5E      8.8E     10E     
                   1         2         3         4         5         6         7         8         9
 9.89N / 107:  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420
 8.95N / 106:  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422
 8.01N / 105:  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424
 7.07N / 104:  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425
 6.13N / 103:  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427
 5.18N / 102:  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428
 4.24N / 101:  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429
 3.3N  / 100:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 2.36N /  99:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 1.41N /  98:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 0.47N /  97:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 0.47S /  96:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 1.41S /  95:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 2.36S /  94:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 3.3S  /  93:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 
! following used to compute (not pulled from cache) the equivalent of
! the above two sets concatenated (modulo on W instead of ARE-ELLA);
! the correct value is a different altogether and constant across longitude
list /width=500 /prec=7 /x=($xfullbnds) /y=($ybnds) w
 !-> list /width=500 /prec=7 /x=-5:10 /y=-3.3:9.9 w
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 eval    W        C:  7 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 strip moduloing FACTOR on X axis:       -3        9 dset:   1
 found   FACTOR   M:  2 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 doing moduloing FACTOR on X axis:      285      288 dset:   1
 found   FACTOR   M:  9 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 doing moduloing FACTOR on X axis:        1        9 dset:   1
 strip --> AREACELLA[Y=3.3S:9.9N@SM4,D=1]
 strip moduloing AREACELLA on X axis:       -3        9 dset:   1
 found   ARE-ELLA M:  4 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 doing moduloing AREACELLA on X axis:      285      288 dset:   1
 found   ARE-ELLA M:  8 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 doing moduloing AREACELLA on X axis:        1        9 dset:   1
 doing --> AREACELLA[Y=3.3S:9.9N@SM4,D=1]
             VARIABLE : FACTOR / AREACELLA[X=@SUM,Y=@SUM]
             FILENAME : cellareas.nc
             SUBSET   : 13 by 15 points (LONGITUDE-LATITUDE)
                 5W(-5)    3.8W      2.5W      1.2W       0E        1.2E      2.5E      3.8E      5E        6.2E      7.5E      8.8E     10E     
                  -3        -2        -1         0         1         2         3         4         5         6         7         8         9
 9.89N / 107:  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906
 8.95N / 106:  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908
 8.01N / 105:  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909
 7.07N / 104:  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910
 6.13N / 103:  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911
 5.18N / 102:  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912
 4.24N / 101:  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912
 3.3N  / 100:  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913
 2.36N /  99:  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913
 1.41N /  98:  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914
 0.47N /  97:  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914
 0.47S /  96:  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914
 1.41S /  95:  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914
 2.36S /  94:  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913
 3.3S  /  93:  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913
 
! following used to get pulled from cache ("found W") instead of being recomputed
! (if other value of factor used the cache pull was clearer) - should be the same as previous listing
list /width=500 /prec=7 /x=($xlobnds) /y=($ybnds) w
 !-> list /width=500 /prec=7 /x=-5:-1.25 /y=-3.3:9.9 w
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 eval    W        C:  7 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 found   FACTOR   M: 11 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 found   ARE-ELLA M:  7 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : FACTOR / AREACELLA[X=@SUM,Y=@SUM]
             FILENAME : cellareas.nc
             SUBSET   : 4 by 15 points (LONGITUDE-LATITUDE)
                 5W(-5)    3.8W      2.5W      1.2W    
                  -3        -2        -1         0
 9.89N / 107:  114.9170  114.9170  114.9170  114.9170
 8.95N / 106:  114.9170  114.9170  114.9170  114.9170
 8.01N / 105:  114.9170  114.9170  114.9170  114.9170
 7.07N / 104:  114.9171  114.9171  114.9171  114.9171
 6.13N / 103:  114.9171  114.9171  114.9171  114.9171
 5.18N / 102:  114.9171  114.9171  114.9171  114.9171
 4.24N / 101:  114.9172  114.9172  114.9172  114.9172
 3.3N  / 100:  114.9172  114.9172  114.9172  114.9172
 2.36N /  99:  114.9172  114.9172  114.9172  114.9172
 1.41N /  98:  114.9172  114.9172  114.9172  114.9172
 0.47N /  97:  114.9172  114.9172  114.9172  114.9172
 0.47S /  96:  114.9172  114.9172  114.9172  114.9172
 1.41S /  95:  114.9172  114.9172  114.9172  114.9172
 2.36S /  94:  114.9172  114.9172  114.9172  114.9172
 3.3S  /  93:  114.9172  114.9172  114.9172  114.9172
 
! following used to get pulled from cache ("found W") instead of being recomputed
! (if other value of factor used the cache pull was clearer) - should be the same as previous listing
list /width=500 /prec=7 /x=($xhibnds) /y=($ybnds) w
 !-> list /width=500 /prec=7 /x=0:10 /y=-3.3:9.9 w
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 eval    W        C:  7 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 found   FACTOR   M: 11 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 found   ARE-ELLA M:  3 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : FACTOR / AREACELLA[X=@SUM,Y=@SUM]
             FILENAME : cellareas.nc
             SUBSET   : 9 by 15 points (LONGITUDE-LATITUDE)
                  0E        1.2E      2.5E      3.8E      5E        6.2E      7.5E      8.8E     10E     
                   1         2         3         4         5         6         7         8         9
 9.89N / 107:  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420
 8.95N / 106:  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422
 8.01N / 105:  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424
 7.07N / 104:  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425
 6.13N / 103:  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427
 5.18N / 102:  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428
 4.24N / 101:  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429
 3.3N  / 100:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 2.36N /  99:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 1.41N /  98:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 0.47N /  97:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 0.47S /  96:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 1.41S /  95:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 2.36S /  94:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 3.3S  /  93:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 
say `w,return=shape`
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid W        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid FACTOR   C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 getgrid EX#1     C:  6 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 !-> MESSAGE/CONTINUE XY
XY
 
cancel memory
 -DELETE W        M:  6 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE W        M: 10 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE W        M: 14 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE W        M: 15 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE W        M: 16 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE FACTOR   M:  2 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE FACTOR   M:  5 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE FACTOR   M:  9 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE FACTOR   M: 11 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE ARE-ELLA M:  1 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE ARE-ELLA M:  3 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE ARE-ELLA M:  4 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE ARE-ELLA M:  7 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE ARE-ELLA M:  8 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE ARE-ELLA M: 12 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE ARE-ELLA M: 13 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 
! repeat with SET REGION
 
set region /x=($xlobnds) /y=($ybnds)
 !-> set region /x=-5:-1.25 /y=-3.3:9.9
list /width=500 /prec=7 w
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid W        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid FACTOR   C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 eval    W        C:  6 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 strip moduloing FACTOR on X axis:       -3        0 dset:   1
 eval    FACTOR   C: 10 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 constan cnst     M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 reading ARE-ELLA M: 12 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE cnst     M: 13 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 doing moduloing FACTOR on X axis:      285      288 dset:   1
 strip --> AREACELLA[Y=3.3S:9.9N@SM4,D=1]
 strip moduloing AREACELLA on X axis:       -3        0 dset:   1
 found   ARE-ELLA M: 12 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 doing moduloing AREACELLA on X axis:      285      288 dset:   1
 doing --> AREACELLA[Y=3.3S:9.9N@SM4,D=1]
             VARIABLE : FACTOR / AREACELLA[X=@SUM,Y=@SUM]
             FILENAME : cellareas.nc
             SUBSET   : 4 by 15 points (LONGITUDE-LATITUDE)
                 5W(-5)    3.8W      2.5W      1.2W    
                  -3        -2        -1         0
 9.89N / 107:  114.9170  114.9170  114.9170  114.9170
 8.95N / 106:  114.9170  114.9170  114.9170  114.9170
 8.01N / 105:  114.9170  114.9170  114.9170  114.9170
 7.07N / 104:  114.9171  114.9171  114.9171  114.9171
 6.13N / 103:  114.9171  114.9171  114.9171  114.9171
 5.18N / 102:  114.9171  114.9171  114.9171  114.9171
 4.24N / 101:  114.9172  114.9172  114.9172  114.9172
 3.3N  / 100:  114.9172  114.9172  114.9172  114.9172
 2.36N /  99:  114.9172  114.9172  114.9172  114.9172
 1.41N /  98:  114.9172  114.9172  114.9172  114.9172
 0.47N /  97:  114.9172  114.9172  114.9172  114.9172
 0.47S /  96:  114.9172  114.9172  114.9172  114.9172
 1.41S /  95:  114.9172  114.9172  114.9172  114.9172
 2.36S /  94:  114.9172  114.9172  114.9172  114.9172
 3.3S  /  93:  114.9172  114.9172  114.9172  114.9172
 
set region /x=($xhibnds) /y=($ybnds)
 !-> set region /x=0:10 /y=-3.3:9.9
list /width=500 /prec=7 w
 eval    EX#1     C:  4 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 eval    W        C:  6 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 eval    FACTOR   C:  8 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 constan cnst     M:  1 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 reading ARE-ELLA M: 11 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE cnst     M:  1 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 strip --> AREACELLA[Y=3.3S:9.9N@SM4,D=1]
 found   ARE-ELLA M: 11 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 doing --> AREACELLA[Y=3.3S:9.9N@SM4,D=1]
             VARIABLE : FACTOR / AREACELLA[X=@SUM,Y=@SUM]
             FILENAME : cellareas.nc
             SUBSET   : 9 by 15 points (LONGITUDE-LATITUDE)
                  0E        1.2E      2.5E      3.8E      5E        6.2E      7.5E      8.8E     10E     
                   1         2         3         4         5         6         7         8         9
 9.89N / 107:  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420
 8.95N / 106:  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422
 8.01N / 105:  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424
 7.07N / 104:  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425
 6.13N / 103:  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427
 5.18N / 102:  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428
 4.24N / 101:  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429
 3.3N  / 100:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 2.36N /  99:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 1.41N /  98:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 0.47N /  97:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 0.47S /  96:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 1.41S /  95:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 2.36S /  94:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 3.3S  /  93:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 
set region /x=($xfullbnds) /y=($ybnds)
 !-> set region /x=-5:10 /y=-3.3:9.9
list /width=500 /prec=7 w
 eval    EX#1     C:  4 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 eval    W        C:  6 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 strip moduloing FACTOR on X axis:       -3        9 dset:   1
 found   FACTOR   M:  8 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 doing moduloing FACTOR on X axis:      285      288 dset:   1
 found   FACTOR   M:  9 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 doing moduloing FACTOR on X axis:        1        9 dset:   1
 strip --> AREACELLA[Y=3.3S:9.9N@SM4,D=1]
 strip moduloing AREACELLA on X axis:       -3        9 dset:   1
 found   ARE-ELLA M: 12 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 doing moduloing AREACELLA on X axis:      285      288 dset:   1
 found   ARE-ELLA M: 11 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 doing moduloing AREACELLA on X axis:        1        9 dset:   1
 doing --> AREACELLA[Y=3.3S:9.9N@SM4,D=1]
             VARIABLE : FACTOR / AREACELLA[X=@SUM,Y=@SUM]
             FILENAME : cellareas.nc
             SUBSET   : 13 by 15 points (LONGITUDE-LATITUDE)
                 5W(-5)    3.8W      2.5W      1.2W       0E        1.2E      2.5E      3.8E      5E        6.2E      7.5E      8.8E     10E     
                  -3        -2        -1         0         1         2         3         4         5         6         7         8         9
 9.89N / 107:  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906
 8.95N / 106:  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908
 8.01N / 105:  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909
 7.07N / 104:  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910
 6.13N / 103:  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911
 5.18N / 102:  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912
 4.24N / 101:  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912
 3.3N  / 100:  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913
 2.36N /  99:  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913
 1.41N /  98:  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914
 0.47N /  97:  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914
 0.47S /  96:  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914
 1.41S /  95:  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914
 2.36S /  94:  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913
 3.3S  /  93:  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913
 
set region /x=($xlobnds) /y=($ybnds)
 !-> set region /x=-5:-1.25 /y=-3.3:9.9
list /width=500 /prec=7 w
 eval    EX#1     C:  4 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 eval    W        C:  6 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 found   FACTOR   M:  2 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 found   ARE-ELLA M:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : FACTOR / AREACELLA[X=@SUM,Y=@SUM]
             FILENAME : cellareas.nc
             SUBSET   : 4 by 15 points (LONGITUDE-LATITUDE)
                 5W(-5)    3.8W      2.5W      1.2W    
                  -3        -2        -1         0
 9.89N / 107:  114.9170  114.9170  114.9170  114.9170
 8.95N / 106:  114.9170  114.9170  114.9170  114.9170
 8.01N / 105:  114.9170  114.9170  114.9170  114.9170
 7.07N / 104:  114.9171  114.9171  114.9171  114.9171
 6.13N / 103:  114.9171  114.9171  114.9171  114.9171
 5.18N / 102:  114.9171  114.9171  114.9171  114.9171
 4.24N / 101:  114.9172  114.9172  114.9172  114.9172
 3.3N  / 100:  114.9172  114.9172  114.9172  114.9172
 2.36N /  99:  114.9172  114.9172  114.9172  114.9172
 1.41N /  98:  114.9172  114.9172  114.9172  114.9172
 0.47N /  97:  114.9172  114.9172  114.9172  114.9172
 0.47S /  96:  114.9172  114.9172  114.9172  114.9172
 1.41S /  95:  114.9172  114.9172  114.9172  114.9172
 2.36S /  94:  114.9172  114.9172  114.9172  114.9172
 3.3S  /  93:  114.9172  114.9172  114.9172  114.9172
 
set region /x=($xhibnds) /y=($ybnds)
 !-> set region /x=0:10 /y=-3.3:9.9
list /width=500 /prec=7 w
 eval    EX#1     C:  4 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 eval    W        C:  6 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 found   FACTOR   M:  2 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 found   ARE-ELLA M:  1 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : FACTOR / AREACELLA[X=@SUM,Y=@SUM]
             FILENAME : cellareas.nc
             SUBSET   : 9 by 15 points (LONGITUDE-LATITUDE)
                  0E        1.2E      2.5E      3.8E      5E        6.2E      7.5E      8.8E     10E     
                   1         2         3         4         5         6         7         8         9
 9.89N / 107:  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420
 8.95N / 106:  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422
 8.01N / 105:  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424
 7.07N / 104:  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425
 6.13N / 103:  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427
 5.18N / 102:  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428
 4.24N / 101:  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429
 3.3N  / 100:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 2.36N /  99:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 1.41N /  98:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 0.47N /  97:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 0.47S /  96:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 1.41S /  95:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 2.36S /  94:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 3.3S  /  93:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 
cancel region
cancel memory
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 -DELETE W        M:  3 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE W        M:  5 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE W        M:  6 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE W        M: 10 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE W        M: 14 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 -DELETE FACTOR   M:  2 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE FACTOR   M:  8 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE FACTOR   M:  9 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE FACTOR   M: 13 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 -DELETE ARE-ELLA M:  1 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE ARE-ELLA M:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE ARE-ELLA M:  7 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE ARE-ELLA M: 11 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE ARE-ELLA M: 12 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE ARE-ELLA M: 15 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE ARE-ELLA M: 16 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 
say `w,return=shape`
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid W        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid FACTOR   C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 getgrid EX#1     C:  6 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 !-> MESSAGE/CONTINUE XY
XY
 
! repeat with [X=...,/Y=...]
 
list /width=500 /prec=7 w[x=($xlobnds),y=($ybnds)]
 !-> list /width=500 /prec=7 w[x=-5:-1.25,y=-3.3:9.9]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid W        C:  7 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid FACTOR   C:  9 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    W        C:  6 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 strip moduloing FACTOR on X axis:       -3        0 dset:   1
 eval    FACTOR   C: 10 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 constan cnst     M: 16 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 reading ARE-ELLA M: 15 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE cnst     M: 16 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 doing moduloing FACTOR on X axis:      285      288 dset:   1
 strip --> AREACELLA[Y=3.3S:9.9N@SM4,D=1]
 strip moduloing AREACELLA on X axis:       -3        0 dset:   1
 found   ARE-ELLA M: 15 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 doing moduloing AREACELLA on X axis:      285      288 dset:   1
 doing --> AREACELLA[Y=3.3S:9.9N@SM4,D=1]
             VARIABLE : FACTOR / AREACELLA[X=@SUM,Y=@SUM]
             FILENAME : cellareas.nc
             SUBSET   : 4 by 15 points (LONGITUDE-LATITUDE)
                 5W(-5)    3.8W      2.5W      1.2W    
                  -3        -2        -1         0
 9.89N / 107:  114.9170  114.9170  114.9170  114.9170
 8.95N / 106:  114.9170  114.9170  114.9170  114.9170
 8.01N / 105:  114.9170  114.9170  114.9170  114.9170
 7.07N / 104:  114.9171  114.9171  114.9171  114.9171
 6.13N / 103:  114.9171  114.9171  114.9171  114.9171
 5.18N / 102:  114.9171  114.9171  114.9171  114.9171
 4.24N / 101:  114.9172  114.9172  114.9172  114.9172
 3.3N  / 100:  114.9172  114.9172  114.9172  114.9172
 2.36N /  99:  114.9172  114.9172  114.9172  114.9172
 1.41N /  98:  114.9172  114.9172  114.9172  114.9172
 0.47N /  97:  114.9172  114.9172  114.9172  114.9172
 0.47S /  96:  114.9172  114.9172  114.9172  114.9172
 1.41S /  95:  114.9172  114.9172  114.9172  114.9172
 2.36S /  94:  114.9172  114.9172  114.9172  114.9172
 3.3S  /  93:  114.9172  114.9172  114.9172  114.9172
 
list /width=500 /prec=7 w[x=($xhibnds),y=($ybnds)]
 !-> list /width=500 /prec=7 w[x=0:10,y=-3.3:9.9]
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    W        C:  6 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 eval    FACTOR   C:  8 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 constan cnst     M:  1 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 reading ARE-ELLA M: 13 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE cnst     M:  1 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 strip --> AREACELLA[Y=3.3S:9.9N@SM4,D=1]
 found   ARE-ELLA M: 13 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 doing --> AREACELLA[Y=3.3S:9.9N@SM4,D=1]
             VARIABLE : FACTOR / AREACELLA[X=@SUM,Y=@SUM]
             FILENAME : cellareas.nc
             SUBSET   : 9 by 15 points (LONGITUDE-LATITUDE)
                  0E        1.2E      2.5E      3.8E      5E        6.2E      7.5E      8.8E     10E     
                   1         2         3         4         5         6         7         8         9
 9.89N / 107:  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420
 8.95N / 106:  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422
 8.01N / 105:  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424
 7.07N / 104:  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425
 6.13N / 103:  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427
 5.18N / 102:  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428
 4.24N / 101:  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429
 3.3N  / 100:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 2.36N /  99:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 1.41N /  98:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 0.47N /  97:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 0.47S /  96:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 1.41S /  95:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 2.36S /  94:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 3.3S  /  93:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 
list /width=500 /prec=7 w[x=($xfullbnds),y=($ybnds)]
 !-> list /width=500 /prec=7 w[x=-5:10,y=-3.3:9.9]
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    W        C:  6 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 strip moduloing FACTOR on X axis:       -3        9 dset:   1
 found   FACTOR   M: 12 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 doing moduloing FACTOR on X axis:      285      288 dset:   1
 found   FACTOR   M:  9 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 doing moduloing FACTOR on X axis:        1        9 dset:   1
 strip --> AREACELLA[Y=3.3S:9.9N@SM4,D=1]
 strip moduloing AREACELLA on X axis:       -3        9 dset:   1
 found   ARE-ELLA M: 15 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 doing moduloing AREACELLA on X axis:      285      288 dset:   1
 found   ARE-ELLA M: 13 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 doing moduloing AREACELLA on X axis:        1        9 dset:   1
 doing --> AREACELLA[Y=3.3S:9.9N@SM4,D=1]
             VARIABLE : FACTOR / AREACELLA[X=@SUM,Y=@SUM]
             FILENAME : cellareas.nc
             SUBSET   : 13 by 15 points (LONGITUDE-LATITUDE)
                 5W(-5)    3.8W      2.5W      1.2W       0E        1.2E      2.5E      3.8E      5E        6.2E      7.5E      8.8E     10E     
                  -3        -2        -1         0         1         2         3         4         5         6         7         8         9
 9.89N / 107:  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906  35.35906
 8.95N / 106:  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908  35.35908
 8.01N / 105:  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909  35.35909
 7.07N / 104:  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910  35.35910
 6.13N / 103:  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911  35.35911
 5.18N / 102:  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912
 4.24N / 101:  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912  35.35912
 3.3N  / 100:  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913
 2.36N /  99:  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913
 1.41N /  98:  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914
 0.47N /  97:  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914
 0.47S /  96:  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914
 1.41S /  95:  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914  35.35914
 2.36S /  94:  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913
 3.3S  /  93:  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913  35.35913
 
list /width=500 /prec=7 w[x=($xlobnds),y=($ybnds)]
 !-> list /width=500 /prec=7 w[x=-5:-1.25,y=-3.3:9.9]
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    W        C:  6 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 found   FACTOR   M:  2 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 found   ARE-ELLA M:  7 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : FACTOR / AREACELLA[X=@SUM,Y=@SUM]
             FILENAME : cellareas.nc
             SUBSET   : 4 by 15 points (LONGITUDE-LATITUDE)
                 5W(-5)    3.8W      2.5W      1.2W    
                  -3        -2        -1         0
 9.89N / 107:  114.9170  114.9170  114.9170  114.9170
 8.95N / 106:  114.9170  114.9170  114.9170  114.9170
 8.01N / 105:  114.9170  114.9170  114.9170  114.9170
 7.07N / 104:  114.9171  114.9171  114.9171  114.9171
 6.13N / 103:  114.9171  114.9171  114.9171  114.9171
 5.18N / 102:  114.9171  114.9171  114.9171  114.9171
 4.24N / 101:  114.9172  114.9172  114.9172  114.9172
 3.3N  / 100:  114.9172  114.9172  114.9172  114.9172
 2.36N /  99:  114.9172  114.9172  114.9172  114.9172
 1.41N /  98:  114.9172  114.9172  114.9172  114.9172
 0.47N /  97:  114.9172  114.9172  114.9172  114.9172
 0.47S /  96:  114.9172  114.9172  114.9172  114.9172
 1.41S /  95:  114.9172  114.9172  114.9172  114.9172
 2.36S /  94:  114.9172  114.9172  114.9172  114.9172
 3.3S  /  93:  114.9172  114.9172  114.9172  114.9172
 
list /width=500 /prec=7 w[x=($xhibnds),y=($ybnds)]
 !-> list /width=500 /prec=7 w[x=0:10,y=-3.3:9.9]
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 eval    W        C:  6 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 found   FACTOR   M:  2 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 found   ARE-ELLA M:  1 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
             VARIABLE : FACTOR / AREACELLA[X=@SUM,Y=@SUM]
             FILENAME : cellareas.nc
             SUBSET   : 9 by 15 points (LONGITUDE-LATITUDE)
                  0E        1.2E      2.5E      3.8E      5E        6.2E      7.5E      8.8E     10E     
                   1         2         3         4         5         6         7         8         9
 9.89N / 107:  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420  51.07420
 8.95N / 106:  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422  51.07422
 8.01N / 105:  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424  51.07424
 7.07N / 104:  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425  51.07425
 6.13N / 103:  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427  51.07427
 5.18N / 102:  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428  51.07428
 4.24N / 101:  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429  51.07429
 3.3N  / 100:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 2.36N /  99:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 1.41N /  98:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 0.47N /  97:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 0.47S /  96:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 1.41S /  95:  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431  51.07431
 2.36S /  94:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 3.3S  /  93:  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430  51.07430
 
! cleanup
 
cancel symbol xlobnds, xhibnds, xfullbnds, ybnds
cancel var w, factor
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 -DELETE W        M:  3 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE W        M:  4 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE W        M:  5 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE W        M:  6 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE W        M:  8 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
 -DELETE FACTOR   M:  2 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE FACTOR   M:  9 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE FACTOR   M: 12 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE FACTOR   M: 16 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 dealloc  dynamic grid GQL1            LON       LAT       NORMAL    NORMAL
cancel data cellareas
 canceling dset ./data/cellareas.nc
 -DELETE ARE-ELLA M:  1 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE ARE-ELLA M:  7 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE ARE-ELLA M: 10 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE ARE-ELLA M: 11 dset:   1 I:     -3      0  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE ARE-ELLA M: 13 dset:   1 I:      1      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE ARE-ELLA M: 14 dset:   1 I:     -3      9  J:   93  107  K: -999 -999  L:   -999   -999
 -DELETE ARE-ELLA M: 15 dset:   1 I:    285    288  J:   93  107  K: -999 -999  L:   -999   -999
set mode /last diagnos
 
!
! further report, ticket 1922, expression with a constant-array.
 
use coads_climatology
let v1 = tsequence(sst[x=140w,y=0])
let vx = v1
 
say `vx,return=shape`
 !-> MESSAGE/CONTINUE T
T
 
plot/vs vx+{1,1,-1,-1,1}, 0*vx+{1,2,2,1,1}
 
say `vx,return=shape`
 !-> MESSAGE/CONTINUE T
T
 
 
!
! end of err744_context.jnl
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err744_poly_const_val
! err744_poly_const_val.jnl
! Issue 1918; zero-extent polygons cause a pyferret failure
! but only filled polygons
!
! POLY/LINE without /FILL should still draw even if
! constant-valued in either direction
!
set view upper
let xpts = {2,8,,2,8,,2,2.1,,8,8}
let ypts = {2,2.1,,8,8,,2,8,,2,8}
poly/hl=0:10/vl=0:10/line=14 xpts, ypts
plot/ov/vs/line=16 xpts+1, ypts+1
 
! POLY/FILL will not draw, so will be skipped
 
set view ll
use bar_chart_data_small.nc
POLY/LINE/NOLABEL/FILL/lev=4/coord_ax=Z  BCHx4,BCHy4 ,wt_plt
 
! POLY/LINE/FILL can draw the outline only
 
set view lr
use bar_chart_data_small.nc
POLY/LINE/NOLABEL/FILL/lev=4/LINE/THICK/COLOR=red/coord_ax=Z  BCHx4,BCHy4 ,wt_plt
 
frame/file=poly_with_const.gif
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err744_timeax_plots
! err744_timeax_plots.jnl
! issue 1920: a time range a few seconds into the next day caused
! an extra piece of the time axis to be plotted
! 3/29/2019
 
def view/x=0.1:0.9/y=0.75:0.95/axes v1
def view/x=0.1:0.9/y=0.45:0.65/axes v2
def view/x=0.1:0.9/y=0.15:0.35/axes v3
 
! For discrete data we are often defining the time axis from
! time data in a file
 
set view v1
let times = 1513000000 + {\
509406,511946,513392,551364,555664,570384,584525,584970,591428,643357,649012,\
663121,664727,666085,743198,743286,758245,763918,840450,845033,927021,941481,\
945432,950464,961409,965271,975940,1016568,1038717,1047512,1052024,1104094,\
1163958,1232091,1237204,1247258,1260899,1262517,1268527,1274539,1274628,\
1276161,1278465,1282797,1286385,1291679,1295978,1303257,1315204,1316810,\
1327040,1332801}
 
DEFINE AXIS/T/T0="1-Jan-1970"/UNITS=seconds tax = times
 
! The axis extends to 27-DEC-2017 00:00:01
list/prec=15 t[gt=tax]
             VARIABLE : T
                        axis TAX
             SUBSET   : 52 points (TIME)
 17-DEC-2017 11:16:46 /  1:  1513509406.00000
 17-DEC-2017 11:59:06 /  2:  1513511946.00000
 17-DEC-2017 12:23:12 /  3:  1513513392.00000
 17-DEC-2017 22:56:04 /  4:  1513551364.00000
 18-DEC-2017 00:07:44 /  5:  1513555664.00000
 18-DEC-2017 04:13:04 /  6:  1513570384.00000
 18-DEC-2017 08:08:45 /  7:  1513584525.00000
 18-DEC-2017 08:16:10 /  8:  1513584970.00000
 18-DEC-2017 10:03:48 /  9:  1513591428.00000
 19-DEC-2017 00:29:17 / 10:  1513643357.00000
 19-DEC-2017 02:03:32 / 11:  1513649012.00000
 19-DEC-2017 05:58:41 / 12:  1513663121.00000
 19-DEC-2017 06:25:27 / 13:  1513664727.00000
 19-DEC-2017 06:48:05 / 14:  1513666085.00000
 20-DEC-2017 04:13:18 / 15:  1513743198.00000
 20-DEC-2017 04:14:46 / 16:  1513743286.00000
 20-DEC-2017 08:24:05 / 17:  1513758245.00000
 20-DEC-2017 09:58:38 / 18:  1513763918.00000
 21-DEC-2017 07:14:10 / 19:  1513840450.00000
 21-DEC-2017 08:30:33 / 20:  1513845033.00000
 22-DEC-2017 07:17:01 / 21:  1513927021.00000
 22-DEC-2017 11:18:01 / 22:  1513941481.00000
 22-DEC-2017 12:23:52 / 23:  1513945432.00000
 22-DEC-2017 13:47:44 / 24:  1513950464.00000
 22-DEC-2017 16:50:09 / 25:  1513961409.00000
 22-DEC-2017 17:54:31 / 26:  1513965271.00000
 22-DEC-2017 20:52:20 / 27:  1513975940.00000
 23-DEC-2017 08:09:28 / 28:  1514016568.00000
 23-DEC-2017 14:18:37 / 29:  1514038717.00000
 23-DEC-2017 16:45:12 / 30:  1514047512.00000
 23-DEC-2017 18:00:24 / 31:  1514052024.00000
 24-DEC-2017 08:28:14 / 32:  1514104094.00000
 25-DEC-2017 01:05:58 / 33:  1514163958.00000
 25-DEC-2017 20:01:31 / 34:  1514232091.00000
 25-DEC-2017 21:26:44 / 35:  1514237204.00000
 26-DEC-2017 00:14:18 / 36:  1514247258.00000
 26-DEC-2017 04:01:39 / 37:  1514260899.00000
 26-DEC-2017 04:28:37 / 38:  1514262517.00000
 26-DEC-2017 06:08:47 / 39:  1514268527.00000
 26-DEC-2017 07:48:59 / 40:  1514274539.00000
 26-DEC-2017 07:50:28 / 41:  1514274628.00000
 26-DEC-2017 08:16:01 / 42:  1514276161.00000
 26-DEC-2017 08:54:25 / 43:  1514278465.00000
 26-DEC-2017 10:06:37 / 44:  1514282797.00000
 26-DEC-2017 11:06:25 / 45:  1514286385.00000
 26-DEC-2017 12:34:39 / 46:  1514291679.00000
 26-DEC-2017 13:46:18 / 47:  1514295978.00000
 26-DEC-2017 15:47:37 / 48:  1514303257.00000
 26-DEC-2017 19:06:44 / 49:  1514315204.00000
 26-DEC-2017 19:33:30 / 50:  1514316810.00000
 26-DEC-2017 22:24:00 / 51:  1514327040.00000
 27-DEC-2017 00:00:01 / 52:  1514332801.00000
 
! the plot axis extended by one tic-mark interval at the end
LET tt = L[gt=tax]
plot/nolab/color=blue tt
 
! This example did the same thing even with older Ferret execs, ask to
! plot a second into a new hour.
 
set view v2
 
define axis/t="1-jan-1990:00:00:01":"20-jan-1990:00:00:01":1/units=minutes/t0=1-jan-1990 taxis
let tt = t[gt=taxis]
plot/nolab/color=blue/t="2-jan-1990":"12-jan-1990:00:00:01" cos(tt/400)
 
! Here plot a second into a new hour, the vertical axes and plot scale are
! set correctly
 
set view v3
 
! starting just before beginning of a day works fine
 
plot/nolab/color=blue/t="1-jan-1990:23:59:51":"12-jan-1990:00:00:10" cos(tt/400)
 
frame/file=time_axis_ends.gif
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err744_axis_not_even
! err744_axis_not_even.jnl
! issue 334:  coordinate axis has a point_spacing=even attribute
! Which should be checked more carefully and ignored.
! 4/15/2019 ACM
 
use wrong_reg_axis.nc
list avar
             VARIABLE : Variable with xaxis incorrectly marked even
             FILENAME : wrong_reg_axis.nc
             SUBSET   : 4 points (X)
 1005   / 1:   5.00
 1006   / 2:   6.00
 1029   / 3:  29.00
 1030   / 4:  30.00
 
! But if the user specifies USE/REGULART then that overrides everything
! The coordinates are now different from what's in the file, but they're regular.
 
cancel data/all
use/regulart wrong_reg_axis.nc
list avar
             VARIABLE : Variable with xaxis incorrectly marked even
             FILENAME : wrong_reg_axis.nc
             SUBSET   : 4 points (X)
 1005   / 1:   5.00
 1013.3 / 2:   6.00
 1021.7 / 3:  29.00
 1030   / 4:  30.00
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err744_parsing_slashes
! err744_parsing_slashes.jnl
!  4/17/2019 ACM issue 660 parsing with grave-accent
!               expressions apearing right after a slash.
!
!
! Previously gave an error on the SET REGION, unknown qualifier
! Now it's correct
 
let region = "x=0:360"
say `region`
 !-> MESSAGE/CONTINUE x=0:360
x=0:360
 
set region/`region`
 !-> set region/x=0:360
 
! But this was ok, including the slash in the string
 
let region = "/x=0:360"
set region`region`
 !-> set region/x=0:360
 
! Test multiple such strings
 
let xregion = "x=0:360"
let yregion = "y=15:45"
 
set region/`xregion`/`yregion`
 !-> set region/x=0:360/y=15:45
 
! Any qualifier right after a slash had the same parsing bug
! This previously gave an error on the PLOT command, unknown qualifier
 
let style="color=blue"
plot/`style`/i=1:15 1./i
 !-> plot/color=blue/i=1:15 1./i
 
 
set mode ignore
 
! Intentional errors
! This really is an error
 
let region = "p=0:360"
say `region`
 !-> MESSAGE/CONTINUE p=0:360
p=0:360
 
set region/`region`
 
set mode /last ignore
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err744_F_line_plots
! err744_F_line_plots.jnl
! issue 1926
! Line plots in the F direction borrowed some info
! from the T axis in the grid if available.
 
use 6dfile.nc
show grid u
    GRID GNJ3
 name       axis              # pts   start                end                 subset
 PSXU69_72 LONGITUDE            4mr   161W                 158W                full
 PSYU15_75 LATITUDE            61 i   10S                  10N                 full
 PSZT      DEPTH (m)           27 i-  5                    3824                full
 TIME      TIME                 3 r   15-MAR-1983 10:00    15-MAR-1983 12:00   full
 EAXIS     E                    5 r   1                    5                   full
 FAXIS     F                    4 r   1                    7                   full
 
! give the F axis a date definition different from the T axis
! (not done in general but you could...)
set axis/units=days/t0=1-oct-2000 faxis
show grid u
    GRID GNJ3
 name       axis              # pts   start                end                 subset
 PSXU69_72 LONGITUDE            4mr   161W                 158W                full
 PSYU15_75 LATITUDE            61 i   10S                  10N                 full
 PSZT      DEPTH (m)           27 i-  5                    3824                full
 TIME      TIME                 3 r   15-MAR-1983 10:00    15-MAR-1983 12:00   full
 EAXIS     E                    5 r   1                    5                   full
 FAXIS     FORECAST             4 r   02-OCT-2000 00:00    08-OCT-2000 00:00   full
 
! 2D plot is ok
shade/i=1/k=1/l=1/e=1 u
 
set view upper
! Line plot horiz axis had incorrect dates. Should be Oct 2 - 7
plot/i=1/j=1/k=1/l=1/e=1 u
 
set view lower
! If the variable had no T axis then there was an error (v7.432 - 7.444)
define axis/f=1-jan-1990:1-mar-1990:1/unit=days fday
let a = SIN(_f[gf=fday]/10)
let b = 0.4*cos(_f[gf=fday]/4) - 2
plot a, b
 
frame /file=f_line_plots.gif
*** Running ferret script: bn_iso8601_time.jnl
! bn_iso8601_time.jnl
! test output when MODE DATE_FORMAT is set to ISO
!
! 12/11/2018  ACM
!  By the way, xml output that shows time info, and dates that
!  are part of time-axis units written to netcdf files have
!  already been converted to yyyy-mm-dd dates
 
show mode date_format
      MODE            STATE        ARGUMENT
      DATE_FORMAT      SET         DEFAULT
set mode date:iso
show mode date_format
      MODE            STATE        ARGUMENT
      DATE_FORMAT      SET         ISO8601
 
! Time in headers and listings shown in yyyy-mm-dd form
 
use gt4d011
list/i=100/j=40/k=1/l=1:4 temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 4 points (TIME)
             LONGITUDE: 130.5W
             LATITUDE : 1.833S
             DEPTH (m): 5
                      130.5W 
                      100
 1982-08-17 12  / 1:  26.20
 1982-08-23 14  / 2:  26.30
 1982-08-29 16  / 3:  26.45
 1982-09-04 18  / 4:  26.66
! multi-var
list/i=100/j=40/k=1/l=5:12  u,v
             DATA SET: ./data/gt4d011.cdf
             TIME: 1982-09-07 19:00 to 1982-10-26 11:00
             LONGITUDE: 130W
             LATITUDE: 1.667S
             DEPTH (m): 5
 Column  1: U is ZONAL VELOCITY (cm/sec)
 Column  2: V is MERIDIONAL VELOCITY (cm/sec)
                         U     V
1982-09-10 20  /  5:  23.12 -3.141
1982-09-16 22  /  6:  29.80 -3.303
1982-09-23 00  /  7:  33.85 -4.931
1982-09-29 02  /  8:  38.61 -4.039
1982-10-05 04  /  9:  43.65 -2.142
1982-10-11 06  / 10:  47.04 -2.099
1982-10-17 08  / 11:  46.11 -5.642
1982-10-23 10  / 12:  45.30 -7.819
 
say `u,return=t0`
 !-> MESSAGE/CONTINUE 1980-01-14 14:00:00
1980-01-14 14:00:00
 
save/clobber/file=a.nc/k=1 temp
use a.nc
show att (`temp,return=taxis`)
 !-> show att (TIME1)
     attributes for dataset: ./a.nc
 (TIME1).units = hour since 1980-01-14 14:00:00 
 (TIME1).time_origin = 1980-01-14 14:00:00 
 (TIME1).axis = T 
 (TIME1).standard_name = time 
 (TIME1).orig_file_axname = TIME1 
 
 
cancel data 2
 
! time label on a plot
shade/l=2/k=2 temp
show symbol lab($labnum_t)
 !-> show symbol lab2
LAB2 = "TIME : 1982-08-23 14:00"
 
cancel data/all
 
! For modulo axes list the year as defined in the axis.
! ISO-8601 date formatting must include a year.
 
use coads_climatology
list/x=301/y=-47 sst
             VARIABLE : SEA SURFACE TEMPERATURE (Deg C)
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (TIME)
             LONGITUDE: 59W
             LATITUDE : 47S
                    59W   
                   141
 0000-01-16  / 1:  11.18
 0000-02-15  / 2:  11.17
 0000-03-17  / 3:  10.92
 
cancel data/all
 
! The seasonal axes in clim_axes_gregorian, clim_axes_julian etc start
! in year 0001 and extend into year 0002.  Show the acutal year.
use clim_axes_julian; can data clim_axes_julian
let tt = t[gt=JFM_IRREG_JUL]
list tt
             VARIABLE : T[GT=JFM_IRREG_JUL]
             SUBSET   : 4 points (TIME)
             CALENDAR : JULIAN
 0001-02-15  / 1:   45.1
 0001-05-16  / 2:  135.8
 0001-08-16  / 3:  227.2
 0001-11-16  / 4:  319.2
let tt = t[gt=NDJ_REG_JUL]
list tt
             VARIABLE : T[GT=NDJ_REG_JUL]
             SUBSET   : 4 points (TIME)
             CALENDAR : JULIAN
 0001-12-17  / 1:  350.0
 0002-03-18  / 2:  441.3
 0002-06-17  / 3:  532.7
 0002-09-16  / 4:  624.0
 
! The date string shows year 0002.  Not the most intuitive thing,
! but we are stuck with it.
use gtsa056_2
use clim_axes_gregorian; can data clim_axes_gregorian
let temp_seas = temp[gt=NDJ_REG_GRG@mod]
shade/L=2/K=2 temp_seas
show symbol lab($labnum_t)
 !-> show symbol lab2
LAB2 = "TIME : 0002-03-18 08:01:57"
 
cancel data/all
 
! Define a high-resolution time axis. Dates on the row-headers
! as well as output shown by TAX_DATESTRING are ISO-8601 formatted and
! include fractional part.
 
define axis/t="4-dec-2018:02:20":"4-dec-2018:02:22"/t0=1-dec-2018/units=seconds/npoints=411 tfrac
let tt = t[gt=tfrac]
list/l=30:36/prec=12 tt, tax_datestring(tt,tt,"sec")
             TIME: 2018-12-04 02:20 to 2018-12-04 02:20
 Column  1: TT is T[GT=TFRAC]
 Column  2: EX#2 is TAX_DATESTRING(TT,TT,"sec")
                                            TT              EX#2
2018-12-04 02:20:08.4878   / 30:  267608.487805 "2018-12-04 02:20:08.4878" 
2018-12-04 02:20:08.7805   / 31:  267608.780488 "2018-12-04 02:20:08.7805" 
2018-12-04 02:20:09.07317  / 32:  267609.073171 "2018-12-04 02:20:09.07317"
2018-12-04 02:20:09.3659   / 33:  267609.365854 "2018-12-04 02:20:09.3659" 
2018-12-04 02:20:09.6585   / 34:  267609.658537 "2018-12-04 02:20:09.6585" 
2018-12-04 02:20:09.9512   / 35:  267609.951220 "2018-12-04 02:20:09.9512" 
2018-12-04 02:20:10.2439   / 36:  267610.243902 "2018-12-04 02:20:10.2439" 
 
 
! tax_ functions
 
use gt4d011
 
list/L=15:20 tax_datestring(t[gt=temp],temp,"hour")
             VARIABLE : TAX_DATESTRING(T[GT=TEMP],TEMP,"hour")
             FILENAME : gt4d011.cdf
             SUBSET   : 6 points (TIME)
 1982-11-10 16  / 15:"1982-11-10 16"
 1982-11-16 18  / 16:"1982-11-16 18"
 1982-11-22 20  / 17:"1982-11-22 20"
 1982-11-28 22  / 18:"1982-11-28 22"
 1982-12-05 00  / 19:"1982-12-05 00"
 1982-12-11 02  / 20:"1982-12-11 02"
list/L=15:20 tax_datestring(t[gt=temp],temp,"day")
             VARIABLE : TAX_DATESTRING(T[GT=TEMP],TEMP,"day")
             FILENAME : gt4d011.cdf
             SUBSET   : 6 points (TIME)
 1982-11-10 16  / 15:"1982-11-10"
 1982-11-16 18  / 16:"1982-11-16"
 1982-11-22 20  / 17:"1982-11-22"
 1982-11-28 22  / 18:"1982-11-28"
 1982-12-05 00  / 19:"1982-12-05"
 1982-12-11 02  / 20:"1982-12-11"
list/L=15:20 tax_dayfrac(t[gt=temp],temp), tax_dayfrac(t[gt=temp],temp)*24.
             DATA SET: ./data/gt4d011.cdf
             TIME: 1982-11-07 15:00 to 1982-12-14 03:00
 Column  1: TAX_DAYFRAC(T[GT=TEMP],TEMP)
 Column  2: EX#2 is TAX_DAYFRAC(T[GT=TEMP],TEMP)*24.
                (C001,V001)   EX#2
1982-11-10 16  / 15:  0.6667  16.00
1982-11-16 18  / 16:  0.7500  18.00
1982-11-22 20  / 17:  0.8333  20.00
1982-11-28 22  / 18:  0.9167  22.00
1982-12-05 00  / 19:  0.0000   0.00
1982-12-11 02  / 20:  0.0833   2.00
list/L=15:20 tax_day(t[gt=temp],temp), tax_jday(t[gt=temp],temp)
             DATA SET: ./data/gt4d011.cdf
             TIME: 1982-11-07 15:00 to 1982-12-14 03:00
 Column  1: TAX_DAY(T[GT=TEMP],TEMP)
 Column  2: TAX_JDAY(T[GT=TEMP],TEMP)
                (C001,V001)  (C001,V006)
1982-11-10 16  / 15:   10.00   314.0
1982-11-16 18  / 16:   16.00   320.0
1982-11-22 20  / 17:   22.00   326.0
1982-11-28 22  / 18:   28.00   332.0
1982-12-05 00  / 19:    5.00   339.0
1982-12-11 02  / 20:   11.00   345.0
list/L=15:20 tax_month(t[gt=temp],temp), tax_yearfrac(t[gt=temp],temp)
             DATA SET: ./data/gt4d011.cdf
             TIME: 1982-11-07 15:00 to 1982-12-14 03:00
 Column  1: TAX_MONTH(T[GT=TEMP],TEMP)
 Column  2: TAX_YEARFRAC(T[GT=TEMP],TEMP)
                (C001,V001)  (C001,V006)
1982-11-10 16  / 15:   11.00  0.8621
1982-11-16 18  / 16:   11.00  0.8788
1982-11-22 20  / 17:   11.00  0.8954
1982-11-28 22  / 18:   11.00  0.9121
1982-12-05 00  / 19:   12.00  0.9288
1982-12-11 02  / 20:   12.00  0.9454
list/L=15:20 tax_year(t[gt=temp],temp)
             VARIABLE : TAX_YEAR(T[GT=TEMP],TEMP)
             FILENAME : gt4d011.cdf
             SUBSET   : 6 points (TIME)
 1982-11-10 16  / 15:  1982.
 1982-11-16 18  / 16:  1982.
 1982-11-22 20  / 17:  1982.
 1982-11-28 22  / 18:  1982.
 1982-12-05 00  / 19:  1982.
 1982-12-11 02  / 20:  1982.
list tax_units(temp)
             VARIABLE : TAX_UNITS(TEMP)
             FILENAME : gt4d011.cdf
          3600.
 
! Return to default format. The mode is never set to false
! Alternatively can SET MODE DATE_FORMAT:DEFAULT
 
cancel mode date_format
show mode date_format
      MODE            STATE        ARGUMENT
      DATE_FORMAT      SET         DEFAULT
 
! Also, use iso-8601 dates in command syntax
!
! Define axis with /T= and /T0=
define axis/t=1990-01-15:1991-01-15:5/units=days/t0=1990-01-01 tax
show axis tax
 name       axis              # pts   start                end
 TAX       TIME                74 r   15-JAN-1990 00:00    15-JAN-1991 00:00
T0 = 01-JAN-1990
   Axis span (to cell edges) = 370
 
! Keep the amount of resolution used
define axis/t=1:5:1/units=days/t0="1989-01-01 00:00" tax
show axis tax
 name       axis              # pts   start                end
 TAX       TIME                 5 r   02-JAN-1989 00:00    06-JAN-1989 00:00
T0 = 01-JAN-1989 00:00
   Axis span (to cell edges) = 5
 
! true-monthly axes
define axis/t=2010-01-01:2011-07-31:1/t0=2010-01-01/monthly taxis
show axis taxis
 name       axis              # pts   start                end
 TAXIS     TIME                19 i   JAN-2010             JUL-2011 (True Monthly)
T0 = 01-JAN-2010
   Axis span (to cell edges) = 19
show axis/t taxis
 name       axis              # pts   start                end
 TAXIS     TIME                19 i   JAN-2010             JUL-2011 (True Monthly)
T0 = 01-JAN-2010
   Axis span (to cell edges) = 19
 
       L     T                       TBOX          TBOXLO                TSTEP (TRUMONTH)
       1>  JAN-2010                  31         01-JAN-2010               0
       2>  FEB-2010                  28         01-FEB-2010               1
       3>  MAR-2010                  31         01-MAR-2010               2
       4>  APR-2010                  30         01-APR-2010               3
       5>  MAY-2010                  31         01-MAY-2010               4
       6>  JUN-2010                  30         01-JUN-2010               5
       7>  JUL-2010                  31         01-JUL-2010               6
       8>  AUG-2010                  31         01-AUG-2010               7
       9>  SEP-2010                  30         01-SEP-2010               8
      10>  OCT-2010                  31         01-OCT-2010               9
      11>  NOV-2010                  30         01-NOV-2010               10
      12>  DEC-2010                  31         01-DEC-2010               11
      13>  JAN-2011                  31         01-JAN-2011               12
      14>  FEB-2011                  28         01-FEB-2011               13
      15>  MAR-2011                  31         01-MAR-2011               14
      16>  APR-2011                  30         01-APR-2011               15
      17>  MAY-2011                  31         01-MAY-2011               16
      18>  JUN-2011                  30         01-JUN-2011               17
      19>  JUL-2011                  31         01-JUL-2011               18
 
! SET AXIS/T0
 
define axis/t=1:5:1/units=days/t0="1989-01-01 00:00" tax
show axis/t tax
 name       axis              # pts   start                end
 TAX       TIME                 5 r   02-JAN-1989 00:00    06-JAN-1989 00:00
T0 = 01-JAN-1989 00:00
   Axis span (to cell edges) = 5
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  02-JAN-1989 00:00:00      1          01-JAN-1989 12:00:00        1
       2>  03-JAN-1989 00:00:00      1          02-JAN-1989 12:00:00        2
       3>  04-JAN-1989 00:00:00      1          03-JAN-1989 12:00:00        3
       4>  05-JAN-1989 00:00:00      1          04-JAN-1989 12:00:00        4
       5>  06-JAN-1989 00:00:00      1          05-JAN-1989 12:00:00        5
 
! reset the time origin
set axis/t0=2010-01-01 tax
show axis /t tax
 name       axis              # pts   start                end
 TAX       TIME                 5 r   02-JAN-2010 00:00    06-JAN-2010 00:00
T0 = 01-JAN-2010
   Axis span (to cell edges) = 5
 
       L     T                       TBOX          TBOXLO                TSTEP (DAYS)
       1>  02-JAN-2010 00:00:00      1          01-JAN-2010 12:00:00        1
       2>  03-JAN-2010 00:00:00      1          02-JAN-2010 12:00:00        2
       3>  04-JAN-2010 00:00:00      1          03-JAN-2010 12:00:00        3
       4>  05-JAN-2010 00:00:00      1          04-JAN-2010 12:00:00        4
       5>  06-JAN-2010 00:00:00      1          05-JAN-2010 12:00:00        5
 
! /T= in contexts
let var = t[gt=tax]
list/t=2010-01-03:2010-01-05 var
             VARIABLE : T[GT=TAX]
             SUBSET   : 3 points (TIME)
 03-JAN-2010 00 / 2:  2.000
 04-JAN-2010 00 / 3:  3.000
 05-JAN-2010 00 / 4:  4.000
 
! ok to mix formats
list/t=2-jan-2010:2010-01-05 var
             VARIABLE : T[GT=TAX]
             SUBSET   : 4 points (TIME)
 02-JAN-2010 00 / 1:  1.000
 03-JAN-2010 00 / 2:  2.000
 04-JAN-2010 00 / 3:  3.000
 05-JAN-2010 00 / 4:  4.000
 
!
use gt4d011
list/i=100/j=50/k=1/t=1982-10-15:1982-11-30 temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             SUBSET   : 8 points (TIME)
             LONGITUDE: 130.5W
             LATITUDE : 1.5N
             DEPTH (m): 5
                       130.5W 
                       100
 17-OCT-1982 08 / 11:  30.10
 23-OCT-1982 10 / 12:  31.20
 29-OCT-1982 12 / 13:  31.92
 04-NOV-1982 14 / 14:  32.33
 10-NOV-1982 16 / 15:  32.48
 16-NOV-1982 18 / 16:  32.50
 22-NOV-1982 20 / 17:  32.52
 28-NOV-1982 22 / 18:  32.61
 
set region/t=1982-10-01:1982-12-01/x=-123:-135/z=15/y=-3
list salt
             VARIABLE : (SALINITY(ppt) - 35) /1000 (frac. by wt. less .035)
             FILENAME : gt4d011.cdf
             SUBSET   : 12 by 11 points (LONGITUDE-TIME)
             LATITUDE : 3.167S
             DEPTH (m): 15
      ... listing every   2th point
                         134.5W     132.5W     130.5W     128.5W     126.5W     124.5W   
                         -65        -63        -61        -59        -57        -55
 29-SEP-1982 02 /  8:  2.255E-04  2.272E-04  2.277E-04  2.262E-04  2.238E-04  2.188E-04
 05-OCT-1982 04 /  9:  2.259E-04  2.254E-04  2.260E-04  2.253E-04  2.238E-04  2.211E-04
 11-OCT-1982 06 / 10:  2.307E-04  2.270E-04  2.254E-04  2.247E-04  2.234E-04  2.219E-04
 17-OCT-1982 08 / 11:  2.383E-04  2.329E-04  2.284E-04  2.257E-04  2.239E-04  2.222E-04
 23-OCT-1982 10 / 12:  2.449E-04  2.401E-04  2.349E-04  2.300E-04  2.263E-04  2.235E-04
 29-OCT-1982 12 / 13:  2.480E-04  2.457E-04  2.417E-04  2.368E-04  2.314E-04  2.269E-04
 04-NOV-1982 14 / 14:  2.472E-04  2.477E-04  2.463E-04  2.428E-04  2.378E-04  2.324E-04
 10-NOV-1982 16 / 15:  2.434E-04  2.456E-04  2.469E-04  2.460E-04  2.427E-04  2.377E-04
 16-NOV-1982 18 / 16:  2.385E-04  2.406E-04  2.433E-04  2.452E-04  2.445E-04  2.409E-04
 22-NOV-1982 20 / 17:  2.345E-04  2.352E-04  2.374E-04  2.408E-04  2.430E-04  2.418E-04
 28-NOV-1982 22 / 18:  2.327E-04  2.315E-04  2.316E-04  2.344E-04  2.385E-04  2.405E-04
 
cancel region
 
! Strictly speaking dates must be yyyy-mm-dd  with 2-digit month,day
! parsing is forgiving even though this isn't valid iso-8601 formatting
list/t=1982-9-6/k=6/x=-123/y=-3 temp
             VARIABLE : TEMPERATURE (deg. C)
             FILENAME : gt4d011.cdf
             LONGITUDE: 123.5W(-123.5)
             LATITUDE : 3.167S
             DEPTH (m): 55
             TIME     : 04-SEP-1982 18:00
          25.96
 
! intentional errors
set mode ignore
 
! 4-digit years must be given, else year interpreted as starting with 00
list/t=82-9-6/k=6/x=-123/y=-3 temp
 
! Report time info in iso-8601 date as well.
set mode date:iso
 
! region out of dataset range
list/t=1982-01-01/k=1/x=-123/y=-3 salt
 
! Illegal dates
 
list/t=1982-15-09/k=1/x=-123/y=-3 salt
 
list/t=1982-11-31/k=1/x=-123/y=-3 salt
 
list/t=15/k=1/x=-123/y=-3 salt
 
 
list/t=15-09-1983/k=1/x=-123/y=-3 salt
 
 
! Illegal date specs in DEFINE AXIS
 
define axis/t=01-15-2010:09-01-2010:1/units=days/t0=2010-01-01 taxis
 
define axis/t=2018-15-01:2019-01-01:1/units=days taxis
 
define axis/t=2018--5-01:2019-01-01:1/units=days taxis
 
 
! illegal format in a /t0
set axis/t0=2010-15-01 `salt,return=taxis`
 !-> set axis/t0=2010-15-01 TIME1
 
! restore modes
cancel mode date_format
set mode/last ignore
 
*** Running ferret script: bn_agg_given_taxis.jnl
! bn_agg_given_taxes.jnl
!
! time aggregation along a user-provided time axis
 
! create some dataset to use, along with the time axes ffax and ftax
GO bn_agg_given_create.sub
! bn_agg_given_create.sub
!
! Creates, if they do not already exist, a set of forecast files with T0 times
! set to the time of each forecast.  They have simple values with a logrhythmic
! 'error' with greater forecasted time lag, and a sinusoidal variation along
! the time of forecast.  All times are irregularly spaced, with the times of
! forecasts (T0 times) on 01-JAN and 01-JUL, and forecasted times on the 15th
! of each month.
!
! After this completes, the following exist:
!   files aggf/forecast_01.nc, aggf/forecast_02.nc, ..., aggf/forecast_38.nc
!         containing a single variable called 'value'
!   axes ffax (time-of-forecast F axis),
!        ftax (superset of all forecasted-times T axes), and
 
 
CANCEL AXIS ffax
 
! the datasets to aggregate - have gaps before, after, and between when viewed along ftax
LET aggfiles = { "aggf/forecast_02.nc", "aggf/forecast_13.nc", "aggf/forecast_24.nc", "aggf/forecast_35.nc"  }
 
! test using the exactly-matching-times axis (should use @XACT to match)
DEFINE DATA /AGGREGATE /HIDE /T /TAXIS=ftax timeagg = aggfiles
! should show gaps (missing values) before, after, and between
LIST /PREC=6 /X=12E /Y=12S /Z=5.0 value
             VARIABLE : forecasted value
             FILENAME : timeagg
             SUBSET   : 288 points (TIME)
             LONGITUDE: 12E
             LATITUDE : 12S
             Z (m)    : 5
                          12E    
                           3
 15-JAN-2001 00 /   1:     ....
 14-FEB-2001 00 /   2:     ....
 15-MAR-2001 00 /   3:     ....
 15-APR-2001 00 /   4:     ....
 15-MAY-2001 00 /   5:     ....
 15-JUN-2001 00 /   6:     ....
 15-JUL-2001 00 /   7:  4.78548
 15-AUG-2001 00 /   8:  5.04331
 15-SEP-2001 00 /   9:  4.93140
 15-OCT-2001 00 /  10:  4.69806
 15-NOV-2001 00 /  11:  4.44249
 15-DEC-2001 00 /  12:  4.26702
 15-JAN-2002 00 /  13:  4.22320
 14-FEB-2002 00 /  14:  4.34140
 15-MAR-2002 00 /  15:  4.59768
 15-APR-2002 00 /  16:  4.98267
 15-MAY-2002 00 /  17:  5.39659
 15-JUN-2002 00 /  18:  5.78261
 15-JUL-2002 00 /  19:  6.03890
 15-AUG-2002 00 /  20:  6.12264
 15-SEP-2002 00 /  21:  5.99540
 15-OCT-2002 00 /  22:  5.68400
 15-NOV-2002 00 /  23:  5.21932
 15-DEC-2002 00 /  24:  4.70907
 15-JAN-2003 00 /  25:  4.21538
 14-FEB-2003 00 /  26:  3.85940
 15-MAR-2003 00 /  27:  3.69402
 15-APR-2003 00 /  28:  3.74898
 15-MAY-2003 00 /  29:  4.02725
 15-JUN-2003 00 /  30:  4.50141
 15-JUL-2003 00 /  31:  5.06258
 15-AUG-2003 00 /  32:  5.64487
 15-SEP-2003 00 /  33:  6.12160
 15-OCT-2003 00 /  34:  6.39571
 15-NOV-2003 00 /  35:  6.42950
 15-DEC-2003 00 /  36:  6.20977
 15-JAN-2004 00 /  37:  5.75771
 14-FEB-2004 00 /  38:  5.17681
 15-MAR-2004 00 /  39:  4.55453
 15-APR-2004 00 /  40:  3.98248
 15-MAY-2004 00 /  41:  3.59793
 15-JUN-2004 00 /  42:  3.45004
 15-JUL-2004 00 /  43:  3.57784
 15-AUG-2004 00 /  44:  3.97035
 15-SEP-2004 00 /  45:  4.55922
 15-OCT-2004 00 /  46:  5.21611
 15-NOV-2004 00 /  47:  5.86370
 15-DEC-2004 00 /  48:  6.34797
 15-JAN-2005 00 /  49:  6.60908
 14-FEB-2005 00 /  50:  6.58221
 15-MAR-2005 00 /  51:  6.29531
 15-APR-2005 00 /  52:  5.75513
 15-MAY-2005 00 /  53:  5.09240
 15-JUN-2005 00 /  54:  4.38446
 15-JUL-2005 00 /  55:  3.79868
 15-AUG-2005 00 /  56:  3.40595
 15-SEP-2005 00 /  57:  3.30296
 15-OCT-2005 00 /  58:  3.50035
 15-NOV-2005 00 /  59:  3.97774
 15-DEC-2005 00 /  60:  4.62476
 15-JAN-2006 00 /  61:  5.36631
 14-FEB-2006 00 /  62:  6.02768
 15-MAR-2006 00 /  63:  6.50493
 15-APR-2006 00 /  64:  6.74956
 15-MAY-2006 00 /  65:  6.68160
 15-JUN-2006 00 /  66:  6.30642
 15-JUL-2006 00 /  67:     ....
 15-AUG-2006 00 /  68:     ....
 15-SEP-2006 00 /  69:     ....
 15-OCT-2006 00 /  70:     ....
 15-NOV-2006 00 /  71:     ....
 15-DEC-2006 00 /  72:     ....
 15-JAN-2007 00 /  73:  5.28216
 14-FEB-2007 00 /  74:  4.91316
 15-MAR-2007 00 /  75:  4.93575
 15-APR-2007 00 /  76:  5.13795
 15-MAY-2007 00 /  77:  5.40425
 15-JUN-2007 00 /  78:  5.65764
 15-JUL-2007 00 /  79:  5.80588
 15-AUG-2007 00 /  80:  5.80580
 15-SEP-2007 00 /  81:  5.63212
 15-OCT-2007 00 /  82:  5.31885
 15-NOV-2007 00 /  83:  4.90021
 15-DEC-2007 00 /  84:  4.47828
 15-JAN-2008 00 /  85:  4.11104
 14-FEB-2008 00 /  86:  3.89561
 15-MAR-2008 00 /  87:  3.86670
 15-APR-2008 00 /  88:  4.04843
 15-MAY-2008 00 /  89:  4.40589
 15-JUN-2008 00 /  90:  4.90171
 15-JUL-2008 00 /  91:  5.41997
 15-AUG-2008 00 /  92:  5.89696
 15-SEP-2008 00 /  93:  6.22250
 15-OCT-2008 00 /  94:  6.32998
 15-NOV-2008 00 /  95:  6.19939
 15-DEC-2008 00 /  96:  5.85530
 15-JAN-2009 00 /  97:  5.33369
 14-FEB-2009 00 /  98:  4.75543
 15-MAR-2009 00 /  99:  4.22266
 15-APR-2009 00 / 100:  3.78213
 15-MAY-2009 00 / 101:  3.56132
 15-JUN-2009 00 / 102:  3.59159
 15-JUL-2009 00 / 103:  3.87084
 15-AUG-2009 00 / 104:  4.37044
 15-SEP-2009 00 / 105:  4.99626
 15-OCT-2009 00 / 106:  5.61464
 15-NOV-2009 00 / 107:  6.15138
 15-DEC-2009 00 / 108:  6.47723
 15-JAN-2010 00 / 109:  6.54981
 14-FEB-2010 00 / 110:  6.34792
 15-MAR-2010 00 / 111:  5.92721
 15-APR-2010 00 / 112:  5.30720
 15-MAY-2010 00 / 113:  4.64348
 15-JUN-2010 00 / 114:  4.01454
 15-JUL-2010 00 / 115:  3.57023
 15-AUG-2010 00 / 116:  3.36582
 15-SEP-2010 00 / 117:  3.46052
 15-OCT-2010 00 / 118:  3.82435
 15-NOV-2010 00 / 119:  4.41723
 15-DEC-2010 00 / 120:  5.10114
 15-JAN-2011 00 / 121:  5.79586
 14-FEB-2011 00 / 122:  6.33679
 15-MAR-2011 00 / 123:  6.64611
 15-APR-2011 00 / 124:  6.68541
 15-MAY-2011 00 / 125:  6.42771
 15-JUN-2011 00 / 126:  5.90065
 15-JUL-2011 00 / 127:  5.22649
 15-AUG-2011 00 / 128:  4.48378
 15-SEP-2011 00 / 129:  3.82933
 15-OCT-2011 00 / 130:  3.39470
 15-NOV-2011 00 / 131:  3.23332
 15-DEC-2011 00 / 132:  3.38570
 15-JAN-2012 00 / 133:     ....
 14-FEB-2012 00 / 134:     ....
 15-MAR-2012 00 / 135:     ....
 15-APR-2012 00 / 136:     ....
 15-MAY-2012 00 / 137:     ....
 15-JUN-2012 00 / 138:     ....
 15-JUL-2012 00 / 139:  4.67323
 15-AUG-2012 00 / 140:  5.13185
 15-SEP-2012 00 / 141:  5.17560
 15-OCT-2012 00 / 142:  5.02177
 15-NOV-2012 00 / 143:  4.75087
 15-DEC-2012 00 / 144:  4.46517
 15-JAN-2013 00 / 145:  4.23079
 14-FEB-2013 00 / 146:  4.12877
 15-MAR-2013 00 / 147:  4.18270
 15-APR-2013 00 / 148:  4.41019
 15-MAY-2013 00 / 149:  4.76628
 15-JUN-2013 00 / 150:  5.21047
 15-JUL-2013 00 / 151:  5.63414
 15-AUG-2013 00 / 152:  5.97904
 15-SEP-2013 00 / 153:  6.15628
 15-OCT-2013 00 / 154:  6.12656
 15-NOV-2013 00 / 155:  5.88363
 15-DEC-2013 00 / 156:  5.47793
 15-JAN-2014 00 / 157:  4.95365
 14-FEB-2014 00 / 158:  4.43430
 15-MAR-2014 00 / 159:  4.00892
 15-APR-2014 00 / 160:  3.72098
 15-MAY-2014 00 / 161:  3.66143
 15-JUN-2014 00 / 162:  3.84430
 15-JUL-2014 00 / 163:  4.23222
 15-AUG-2014 00 / 164:  4.78344
 15-SEP-2014 00 / 165:  5.38881
 15-OCT-2014 00 / 166:  5.92058
 15-NOV-2014 00 / 167:  6.31288
 15-DEC-2014 00 / 168:  6.46882
 15-JAN-2015 00 / 169:  6.36477
 14-FEB-2015 00 / 170:  6.02049
 15-MAR-2015 00 / 171:  5.51225
 15-APR-2015 00 / 172:  4.86979
 15-MAY-2015 00 / 173:  4.25906
 15-JUN-2015 00 / 174:  3.75369
 15-JUL-2015 00 / 175:  3.47572
 15-AUG-2015 00 / 176:  3.46192
 15-SEP-2015 00 / 177:  3.73235
 15-OCT-2015 00 / 178:  4.22178
 15-NOV-2015 00 / 179:  4.87495
 15-DEC-2015 00 / 180:  5.53889
 15-JAN-2016 00 / 181:  6.13465
 14-FEB-2016 00 / 182:  6.51992
 15-MAR-2016 00 / 183:  6.64687
 15-APR-2016 00 / 184:  6.48047
 15-MAY-2016 00 / 185:  6.05679
 15-JUN-2016 00 / 186:  5.42322
 15-JUL-2016 00 / 187:  4.72767
 15-AUG-2016 00 / 188:  4.05207
 15-SEP-2016 00 / 189:  3.54408
 15-OCT-2016 00 / 190:  3.30238
 15-NOV-2016 00 / 191:  3.35833
 15-DEC-2016 00 / 192:  3.70156
 15-JAN-2017 00 / 193:  4.29414
 14-FEB-2017 00 / 194:  4.99806
 15-MAR-2017 00 / 195:  5.68610
 15-APR-2017 00 / 196:  6.30291
 15-MAY-2017 00 / 197:  6.67741
 15-JUN-2017 00 / 198:  6.76315
 15-JUL-2017 00 / 199:     ....
 15-AUG-2017 00 / 200:     ....
 15-SEP-2017 00 / 201:     ....
 15-OCT-2017 00 / 202:     ....
 15-NOV-2017 00 / 203:     ....
 15-DEC-2017 00 / 204:     ....
 15-JAN-2018 00 / 205:  5.33684
 14-FEB-2018 00 / 206:  4.85056
 15-MAR-2018 00 / 207:  4.72718
 15-APR-2018 00 / 208:  4.80719
 15-MAY-2018 00 / 209:  5.03077
 15-JUN-2018 00 / 210:  5.33849
 15-JUL-2018 00 / 211:  5.63022
 15-AUG-2018 00 / 212:  5.84520
 15-SEP-2018 00 / 213:  5.91006
 15-OCT-2018 00 / 214:  5.80079
 15-NOV-2018 00 / 215:  5.51786
 15-DEC-2018 00 / 216:  5.12204
 15-JAN-2019 00 / 217:  4.65981
 14-FEB-2019 00 / 218:  4.24476
 15-MAR-2019 00 / 219:  3.94924
 15-APR-2019 00 / 220:  3.81224
 15-MAY-2019 00 / 221:  3.88844
 15-JUN-2019 00 / 222:  4.17776
 15-JUL-2019 00 / 223:  4.61799
 15-AUG-2019 00 / 224:  5.16008
 15-SEP-2019 00 / 225:  5.69162
 15-OCT-2019 00 / 226:  6.10043
 15-NOV-2019 00 / 227:  6.33247
 15-DEC-2019 00 / 228:  6.32654
 15-JAN-2020 00 / 229:  6.07672
 14-FEB-2020 00 / 230:  5.63675
 15-MAR-2020 00 / 231:  5.07494
 15-APR-2020 00 / 232:  4.46827
 15-MAY-2020 00 / 233:  3.96111
 15-JUN-2020 00 / 234:  3.61676
 15-JUL-2020 00 / 235:  3.52089
 15-AUG-2020 00 / 236:  3.68995
 15-SEP-2020 00 / 237:  4.10515
 15-OCT-2020 00 / 238:  4.67309
 15-NOV-2020 00 / 239:  5.32841
 15-DEC-2020 00 / 240:  5.91642
 15-JAN-2021 00 / 241:  6.36574
 14-FEB-2021 00 / 242:  6.56725
 15-MAR-2021 00 / 243:  6.50670
 15-APR-2021 00 / 244:  6.17205
 15-MAY-2021 00 / 245:  5.63651
 15-JUN-2021 00 / 246:  4.96113
 15-JUL-2021 00 / 247:  4.30451
 15-AUG-2021 00 / 248:  3.74505
 15-SEP-2021 00 / 249:  3.41025
 15-OCT-2021 00 / 250:  3.36147
 15-NOV-2021 00 / 251:  3.60787
 15-DEC-2021 00 / 252:  4.09437
 15-JAN-2022 00 / 253:  4.76586
 14-FEB-2022 00 / 254:  5.46513
 15-MAR-2022 00 / 255:  6.07274
 15-APR-2022 00 / 256:  6.53501
 15-MAY-2022 00 / 257:  6.71797
 15-JUN-2022 00 / 258:  6.59715
 15-JUL-2022 00 / 259:  6.19828
 15-AUG-2022 00 / 260:  5.56605
 15-SEP-2022 00 / 261:  4.82373
 15-OCT-2022 00 / 262:  4.12851
 15-NOV-2022 00 / 263:  3.56317
 15-DEC-2022 00 / 264:  3.26260
 15-JAN-2023 00 / 265:     ....
 14-FEB-2023 00 / 266:     ....
 15-MAR-2023 00 / 267:     ....
 15-APR-2023 00 / 268:     ....
 15-MAY-2023 00 / 269:     ....
 15-JUN-2023 00 / 270:     ....
 15-JUL-2023 00 / 271:     ....
 15-AUG-2023 00 / 272:     ....
 15-SEP-2023 00 / 273:     ....
 15-OCT-2023 00 / 274:     ....
 15-NOV-2023 00 / 275:     ....
 15-DEC-2023 00 / 276:     ....
 15-JAN-2024 00 / 277:     ....
 14-FEB-2024 00 / 278:     ....
 15-MAR-2024 00 / 279:     ....
 15-APR-2024 00 / 280:     ....
 15-MAY-2024 00 / 281:     ....
 15-JUN-2024 00 / 282:     ....
 15-JUL-2024 00 / 283:     ....
 15-AUG-2024 00 / 284:     ....
 15-SEP-2024 00 / 285:     ....
 15-OCT-2024 00 / 286:     ....
 15-NOV-2024 00 / 287:     ....
 15-DEC-2024 00 / 288:     ....
CANCEL DATA timeagg
CANCEL AXIS ftax
 
! try a closely matching (regular) time axis (should use @BIN to match)
DEFINE AXIS /UNITS=DAYS /T0=01-JAN-2000 /T=01-JAN-2001:01-JAN-2025:`365.2425/12.0` tax
 !-> DEFINE AXIS /UNITS=DAYS /T0=01-JAN-2000 /T=01-JAN-2001:01-JAN-2025:30.436875 tax
DEFINE DATA /AGGREGATE /HIDE /T /TAXIS=tax timeagg = aggfiles
! should show gaps (missing values) before, after, and between
LIST /PREC=6 /X=12E /Y=12S /Z=5.0 value
             VARIABLE : forecasted value
             FILENAME : timeagg
             SUBSET   : 290 points (TIME)
             LONGITUDE: 12E
             LATITUDE : 12S
             Z (m)    : 5
                       12E    
                        3
 01-JAN-2001 /   1:     ....
 31-JAN-2001 /   2:     ....
 02-MAR-2001 /   3:     ....
 02-APR-2001 /   4:     ....
 02-MAY-2001 /   5:     ....
 02-JUN-2001 /   6:     ....
 02-JUL-2001 /   7:  4.78548
 02-AUG-2001 /   8:  5.04331
 01-SEP-2001 /   9:  4.93140
 01-OCT-2001 /  10:  4.69806
 01-NOV-2001 /  11:  4.44249
 01-DEC-2001 /  12:  4.26702
 01-JAN-2002 /  13:  4.22320
 31-JAN-2002 /  14:  4.34140
 03-MAR-2002 /  15:  4.59768
 02-APR-2002 /  16:  4.98267
 02-MAY-2002 /  17:  5.39659
 02-JUN-2002 /  18:  5.78261
 02-JUL-2002 /  19:  6.03890
 02-AUG-2002 /  20:  6.12264
 01-SEP-2002 /  21:  5.99540
 02-OCT-2002 /  22:  5.68400
 01-NOV-2002 /  23:  5.21932
 02-DEC-2002 /  24:  4.70907
 01-JAN-2003 /  25:  4.21538
 31-JAN-2003 /  26:  3.85940
 03-MAR-2003 /  27:  3.69402
 02-APR-2003 /  28:  3.74898
 03-MAY-2003 /  29:  4.02725
 02-JUN-2003 /  30:  4.50141
 03-JUL-2003 /  31:  5.06258
 02-AUG-2003 /  32:  5.64487
 01-SEP-2003 /  33:  6.12160
 02-OCT-2003 /  34:  6.39571
 01-NOV-2003 /  35:  6.42950
 02-DEC-2003 /  36:  6.20977
 01-JAN-2004 /  37:  5.75771
 01-FEB-2004 /  38:  5.17681
 02-MAR-2004 /  39:  4.55453
 02-APR-2004 /  40:  3.98248
 02-MAY-2004 /  41:  3.59793
 01-JUN-2004 /  42:  3.45004
 02-JUL-2004 /  43:  3.57784
 01-AUG-2004 /  44:  3.97035
 01-SEP-2004 /  45:  4.55922
 01-OCT-2004 /  46:  5.21611
 01-NOV-2004 /  47:  5.86370
 01-DEC-2004 /  48:  6.34797
 31-DEC-2004 /  49:  6.60908
 31-JAN-2005 /  50:  6.58221
 02-MAR-2005 /  51:  6.29531
 02-APR-2005 /  52:  5.75513
 02-MAY-2005 /  53:  5.09240
 02-JUN-2005 /  54:  4.38446
 02-JUL-2005 /  55:  3.79868
 02-AUG-2005 /  56:  3.40595
 01-SEP-2005 /  57:  3.30296
 01-OCT-2005 /  58:  3.50035
 01-NOV-2005 /  59:  3.97774
 01-DEC-2005 /  60:  4.62476
 01-JAN-2006 /  61:  5.36631
 31-JAN-2006 /  62:  6.02768
 03-MAR-2006 /  63:  6.50493
 02-APR-2006 /  64:  6.74956
 02-MAY-2006 /  65:  6.68160
 02-JUN-2006 /  66:  6.30642
 02-JUL-2006 /  67:     ....
 02-AUG-2006 /  68:     ....
 01-SEP-2006 /  69:     ....
 02-OCT-2006 /  70:     ....
 01-NOV-2006 /  71:     ....
 02-DEC-2006 /  72:     ....
 01-JAN-2007 /  73:  5.28216
 31-JAN-2007 /  74:  4.91316
 03-MAR-2007 /  75:  4.93575
 02-APR-2007 /  76:  5.13795
 03-MAY-2007 /  77:  5.40425
 02-JUN-2007 /  78:  5.65764
 03-JUL-2007 /  79:  5.80588
 02-AUG-2007 /  80:  5.80580
 01-SEP-2007 /  81:  5.63212
 02-OCT-2007 /  82:  5.31885
 01-NOV-2007 /  83:  4.90021
 02-DEC-2007 /  84:  4.47828
 01-JAN-2008 /  85:  4.11104
 01-FEB-2008 /  86:  3.89561
 02-MAR-2008 /  87:  3.86670
 02-APR-2008 /  88:  4.04843
 02-MAY-2008 /  89:  4.40589
 01-JUN-2008 /  90:  4.90171
 02-JUL-2008 /  91:  5.41997
 01-AUG-2008 /  92:  5.89696
 01-SEP-2008 /  93:  6.22250
 01-OCT-2008 /  94:  6.32998
 01-NOV-2008 /  95:  6.19939
 01-DEC-2008 /  96:  5.85530
 31-DEC-2008 /  97:  5.33369
 31-JAN-2009 /  98:  4.75543
 02-MAR-2009 /  99:  4.22266
 02-APR-2009 / 100:  3.78213
 02-MAY-2009 / 101:  3.56132
 02-JUN-2009 / 102:  3.59159
 02-JUL-2009 / 103:  3.87084
 01-AUG-2009 / 104:  4.37044
 01-SEP-2009 / 105:  4.99626
 01-OCT-2009 / 106:  5.61464
 01-NOV-2009 / 107:  6.15138
 01-DEC-2009 / 108:  6.47723
 01-JAN-2010 / 109:  6.54981
 31-JAN-2010 / 110:  6.34792
 03-MAR-2010 / 111:  5.92721
 02-APR-2010 / 112:  5.30720
 02-MAY-2010 / 113:  4.64348
 02-JUN-2010 / 114:  4.01454
 02-JUL-2010 / 115:  3.57023
 02-AUG-2010 / 116:  3.36582
 01-SEP-2010 / 117:  3.46052
 02-OCT-2010 / 118:  3.82435
 01-NOV-2010 / 119:  4.41723
 01-DEC-2010 / 120:  5.10114
 01-JAN-2011 / 121:  5.79586
 31-JAN-2011 / 122:  6.33679
 03-MAR-2011 / 123:  6.64611
 02-APR-2011 / 124:  6.68541
 03-MAY-2011 / 125:  6.42771
 02-JUN-2011 / 126:  5.90065
 03-JUL-2011 / 127:  5.22649
 02-AUG-2011 / 128:  4.48378
 01-SEP-2011 / 129:  3.82933
 02-OCT-2011 / 130:  3.39470
 01-NOV-2011 / 131:  3.23332
 02-DEC-2011 / 132:  3.38570
 01-JAN-2012 / 133:     ....
 01-FEB-2012 / 134:     ....
 02-MAR-2012 / 135:     ....
 01-APR-2012 / 136:     ....
 02-MAY-2012 / 137:     ....
 01-JUN-2012 / 138:     ....
 02-JUL-2012 / 139:  4.67323
 01-AUG-2012 / 140:  5.13185
 01-SEP-2012 / 141:  5.17560
 01-OCT-2012 / 142:  5.02177
 01-NOV-2012 / 143:  4.75087
 01-DEC-2012 / 144:  4.46517
 31-DEC-2012 / 145:  4.23079
 31-JAN-2013 / 146:  4.12877
 02-MAR-2013 / 147:  4.18270
 02-APR-2013 / 148:  4.41019
 02-MAY-2013 / 149:  4.76628
 02-JUN-2013 / 150:  5.21047
 02-JUL-2013 / 151:  5.63414
 01-AUG-2013 / 152:  5.97904
 01-SEP-2013 / 153:  6.15628
 01-OCT-2013 / 154:  6.12656
 01-NOV-2013 / 155:  5.88363
 01-DEC-2013 / 156:  5.47793
 01-JAN-2014 / 157:  4.95365
 31-JAN-2014 / 158:  4.43430
 03-MAR-2014 / 159:  4.00892
 02-APR-2014 / 160:  3.72098
 02-MAY-2014 / 161:  3.66143
 02-JUN-2014 / 162:  3.84430
 02-JUL-2014 / 163:  4.23222
 02-AUG-2014 / 164:  4.78344
 01-SEP-2014 / 165:  5.38881
 02-OCT-2014 / 166:  5.92058
 01-NOV-2014 / 167:  6.31288
 01-DEC-2014 / 168:  6.46882
 01-JAN-2015 / 169:  6.36477
 31-JAN-2015 / 170:  6.02049
 03-MAR-2015 / 171:  5.51225
 02-APR-2015 / 172:  4.86979
 03-MAY-2015 / 173:  4.25906
 02-JUN-2015 / 174:  3.75369
 03-JUL-2015 / 175:  3.47572
 02-AUG-2015 / 176:  3.46192
 01-SEP-2015 / 177:  3.73235
 02-OCT-2015 / 178:  4.22178
 01-NOV-2015 / 179:  4.87495
 02-DEC-2015 / 180:  5.53889
 01-JAN-2016 / 181:  6.13465
 01-FEB-2016 / 182:  6.51992
 02-MAR-2016 / 183:  6.64687
 01-APR-2016 / 184:  6.48047
 02-MAY-2016 / 185:  6.05679
 01-JUN-2016 / 186:  5.42322
 02-JUL-2016 / 187:  4.72767
 01-AUG-2016 / 188:  4.05207
 01-SEP-2016 / 189:  3.54408
 01-OCT-2016 / 190:  3.30238
 01-NOV-2016 / 191:  3.35833
 01-DEC-2016 / 192:  3.70156
 31-DEC-2016 / 193:  4.29414
 31-JAN-2017 / 194:  4.99806
 02-MAR-2017 / 195:  5.68610
 02-APR-2017 / 196:  6.30291
 02-MAY-2017 / 197:  6.67741
 02-JUN-2017 / 198:  6.76315
 02-JUL-2017 / 199:     ....
 01-AUG-2017 / 200:     ....
 01-SEP-2017 / 201:     ....
 01-OCT-2017 / 202:     ....
 01-NOV-2017 / 203:     ....
 01-DEC-2017 / 204:     ....
 01-JAN-2018 / 205:  5.33684
 31-JAN-2018 / 206:  4.85056
 02-MAR-2018 / 207:  4.72718
 02-APR-2018 / 208:  4.80719
 02-MAY-2018 / 209:  5.03077
 02-JUN-2018 / 210:  5.33849
 02-JUL-2018 / 211:  5.63022
 02-AUG-2018 / 212:  5.84520
 01-SEP-2018 / 213:  5.91006
 02-OCT-2018 / 214:  5.80079
 01-NOV-2018 / 215:  5.51786
 01-DEC-2018 / 216:  5.12204
 01-JAN-2019 / 217:  4.65981
 31-JAN-2019 / 218:  4.24476
 03-MAR-2019 / 219:  3.94924
 02-APR-2019 / 220:  3.81224
 03-MAY-2019 / 221:  3.88844
 02-JUN-2019 / 222:  4.17776
 02-JUL-2019 / 223:  4.61799
 02-AUG-2019 / 224:  5.16008
 01-SEP-2019 / 225:  5.69162
 02-OCT-2019 / 226:  6.10043
 01-NOV-2019 / 227:  6.33247
 02-DEC-2019 / 228:  6.32654
 01-JAN-2020 / 229:  6.07672
 01-FEB-2020 / 230:  5.63675
 02-MAR-2020 / 231:  5.07494
 01-APR-2020 / 232:  4.46827
 02-MAY-2020 / 233:  3.96111
 01-JUN-2020 / 234:  3.61676
 02-JUL-2020 / 235:  3.52089
 01-AUG-2020 / 236:  3.68995
 01-SEP-2020 / 237:  4.10515
 01-OCT-2020 / 238:  4.67309
 31-OCT-2020 / 239:  5.32841
 01-DEC-2020 / 240:  5.91642
 31-DEC-2020 / 241:  6.36574
 31-JAN-2021 / 242:  6.56725
 02-MAR-2021 / 243:  6.50670
 02-APR-2021 / 244:  6.17205
 02-MAY-2021 / 245:  5.63651
 02-JUN-2021 / 246:  4.96113
 02-JUL-2021 / 247:  4.30451
 01-AUG-2021 / 248:  3.74505
 01-SEP-2021 / 249:  3.41025
 01-OCT-2021 / 250:  3.36147
 01-NOV-2021 / 251:  3.60787
 01-DEC-2021 / 252:  4.09437
 01-JAN-2022 / 253:  4.76586
 31-JAN-2022 / 254:  5.46513
 02-MAR-2022 / 255:  6.07274
 02-APR-2022 / 256:  6.53501
 02-MAY-2022 / 257:  6.71797
 02-JUN-2022 / 258:  6.59715
 02-JUL-2022 / 259:  6.19828
 02-AUG-2022 / 260:  5.56605
 01-SEP-2022 / 261:  4.82373
 02-OCT-2022 / 262:  4.12851
 01-NOV-2022 / 263:  3.56317
 01-DEC-2022 / 264:  3.26260
 01-JAN-2023 / 265:     ....
 31-JAN-2023 / 266:     ....
 03-MAR-2023 / 267:     ....
 02-APR-2023 / 268:     ....
 03-MAY-2023 / 269:     ....
 02-JUN-2023 / 270:     ....
 02-JUL-2023 / 271:     ....
 02-AUG-2023 / 272:     ....
 01-SEP-2023 / 273:     ....
 02-OCT-2023 / 274:     ....
 01-NOV-2023 / 275:     ....
 02-DEC-2023 / 276:     ....
 01-JAN-2024 / 277:     ....
 01-FEB-2024 / 278:     ....
 02-MAR-2024 / 279:     ....
 01-APR-2024 / 280:     ....
 02-MAY-2024 / 281:     ....
 01-JUN-2024 / 282:     ....
 02-JUL-2024 / 283:     ....
 01-AUG-2024 / 284:     ....
 01-SEP-2024 / 285:     ....
 01-OCT-2024 / 286:     ....
 31-OCT-2024 / 287:     ....
 01-DEC-2024 / 288:     ....
 31-DEC-2024 / 289:     ....
 31-JAN-2025 / 290:     ....
CANCEL DATA timeagg
CANCEL AXIS tax
 
! try a completely different time axis (should use @ASN to match)
DEFINE AXIS /UNITS=DAYS /T0=01-JAN-1900 /T=01-JAN-1950:01-JAN-1975:`365.2425/12.0` tax
 !-> DEFINE AXIS /UNITS=DAYS /T0=01-JAN-1900 /T=01-JAN-1950:01-JAN-1975:30.436875 tax
DEFINE DATA /AGGREGATE /HIDE /T /TAXIS=tax timeagg = aggfiles
! should only show gaps (missing values) after
LIST /PREC=6 /X=12E /Y=12S /Z=5.0 value
             VARIABLE : forecasted value
             FILENAME : timeagg
             SUBSET   : 301 points (TIME)
             LONGITUDE: 12E
             LATITUDE : 12S
             Z (m)    : 5
                       12E    
                        3
 01-JAN-1950 /   1:  4.78548
 31-JAN-1950 /   2:  5.04331
 02-MAR-1950 /   3:  4.93140
 02-APR-1950 /   4:  4.69806
 02-MAY-1950 /   5:  4.44249
 02-JUN-1950 /   6:  4.26702
 02-JUL-1950 /   7:  4.22320
 02-AUG-1950 /   8:  4.34140
 01-SEP-1950 /   9:  4.59768
 01-OCT-1950 /  10:  4.98267
 01-NOV-1950 /  11:  5.39659
 01-DEC-1950 /  12:  5.78261
 01-JAN-1951 /  13:  6.03890
 31-JAN-1951 /  14:  6.12264
 03-MAR-1951 /  15:  5.99540
 02-APR-1951 /  16:  5.68400
 02-MAY-1951 /  17:  5.21932
 02-JUN-1951 /  18:  4.70907
 02-JUL-1951 /  19:  4.21538
 02-AUG-1951 /  20:  3.85940
 01-SEP-1951 /  21:  3.69402
 02-OCT-1951 /  22:  3.74898
 01-NOV-1951 /  23:  4.02725
 02-DEC-1951 /  24:  4.50141
 01-JAN-1952 /  25:  5.06258
 31-JAN-1952 /  26:  5.64487
 02-MAR-1952 /  27:  6.12160
 01-APR-1952 /  28:  6.39571
 02-MAY-1952 /  29:  6.42950
 01-JUN-1952 /  30:  6.20977
 02-JUL-1952 /  31:  5.75771
 01-AUG-1952 /  32:  5.17681
 31-AUG-1952 /  33:  4.55453
 01-OCT-1952 /  34:  3.98248
 31-OCT-1952 /  35:  3.59793
 01-DEC-1952 /  36:  3.45004
 31-DEC-1952 /  37:  3.57784
 31-JAN-1953 /  38:  3.97035
 02-MAR-1953 /  39:  4.55922
 02-APR-1953 /  40:  5.21611
 02-MAY-1953 /  41:  5.86370
 01-JUN-1953 /  42:  6.34797
 02-JUL-1953 /  43:  6.60908
 01-AUG-1953 /  44:  6.58221
 01-SEP-1953 /  45:  6.29531
 01-OCT-1953 /  46:  5.75513
 01-NOV-1953 /  47:  5.09240
 01-DEC-1953 /  48:  4.38446
 31-DEC-1953 /  49:  3.79868
 31-JAN-1954 /  50:  3.40595
 02-MAR-1954 /  51:  3.30296
 02-APR-1954 /  52:  3.50035
 02-MAY-1954 /  53:  3.97774
 02-JUN-1954 /  54:  4.62476
 02-JUL-1954 /  55:  5.36631
 02-AUG-1954 /  56:  6.02768
 01-SEP-1954 /  57:  6.50493
 01-OCT-1954 /  58:  6.74956
 01-NOV-1954 /  59:  6.68160
 01-DEC-1954 /  60:  6.30642
 01-JAN-1955 /  61:  5.28216
 31-JAN-1955 /  62:  4.91316
 03-MAR-1955 /  63:  4.93575
 02-APR-1955 /  64:  5.13795
 02-MAY-1955 /  65:  5.40425
 02-JUN-1955 /  66:  5.65764
 02-JUL-1955 /  67:  5.80588
 02-AUG-1955 /  68:  5.80580
 01-SEP-1955 /  69:  5.63212
 02-OCT-1955 /  70:  5.31885
 01-NOV-1955 /  71:  4.90021
 02-DEC-1955 /  72:  4.47828
 01-JAN-1956 /  73:  4.11104
 31-JAN-1956 /  74:  3.89561
 02-MAR-1956 /  75:  3.86670
 01-APR-1956 /  76:  4.04843
 02-MAY-1956 /  77:  4.40589
 01-JUN-1956 /  78:  4.90171
 02-JUL-1956 /  79:  5.41997
 01-AUG-1956 /  80:  5.89696
 31-AUG-1956 /  81:  6.22250
 01-OCT-1956 /  82:  6.32998
 31-OCT-1956 /  83:  6.19939
 01-DEC-1956 /  84:  5.85530
 31-DEC-1956 /  85:  5.33369
 31-JAN-1957 /  86:  4.75543
 02-MAR-1957 /  87:  4.22266
 02-APR-1957 /  88:  3.78213
 02-MAY-1957 /  89:  3.56132
 01-JUN-1957 /  90:  3.59159
 02-JUL-1957 /  91:  3.87084
 01-AUG-1957 /  92:  4.37044
 01-SEP-1957 /  93:  4.99626
 01-OCT-1957 /  94:  5.61464
 01-NOV-1957 /  95:  6.15138
 01-DEC-1957 /  96:  6.47723
 31-DEC-1957 /  97:  6.54981
 31-JAN-1958 /  98:  6.34792
 02-MAR-1958 /  99:  5.92721
 02-APR-1958 / 100:  5.30720
 02-MAY-1958 / 101:  4.64348
 02-JUN-1958 / 102:  4.01454
 02-JUL-1958 / 103:  3.57023
 01-AUG-1958 / 104:  3.36582
 01-SEP-1958 / 105:  3.46052
 01-OCT-1958 / 106:  3.82435
 01-NOV-1958 / 107:  4.41723
 01-DEC-1958 / 108:  5.10114
 01-JAN-1959 / 109:  5.79586
 31-JAN-1959 / 110:  6.33679
 03-MAR-1959 / 111:  6.64611
 02-APR-1959 / 112:  6.68541
 02-MAY-1959 / 113:  6.42771
 02-JUN-1959 / 114:  5.90065
 02-JUL-1959 / 115:  5.22649
 02-AUG-1959 / 116:  4.48378
 01-SEP-1959 / 117:  3.82933
 02-OCT-1959 / 118:  3.39470
 01-NOV-1959 / 119:  3.23332
 01-DEC-1959 / 120:  3.38570
 01-JAN-1960 / 121:  4.67323
 31-JAN-1960 / 122:  5.13185
 02-MAR-1960 / 123:  5.17560
 01-APR-1960 / 124:  5.02177
 02-MAY-1960 / 125:  4.75087
 01-JUN-1960 / 126:  4.46517
 02-JUL-1960 / 127:  4.23079
 01-AUG-1960 / 128:  4.12877
 31-AUG-1960 / 129:  4.18270
 01-OCT-1960 / 130:  4.41019
 31-OCT-1960 / 131:  4.76628
 01-DEC-1960 / 132:  5.21047
 31-DEC-1960 / 133:  5.63414
 31-JAN-1961 / 134:  5.97904
 02-MAR-1961 / 135:  6.15628
 01-APR-1961 / 136:  6.12656
 02-MAY-1961 / 137:  5.88363
 01-JUN-1961 / 138:  5.47793
 02-JUL-1961 / 139:  4.95365
 01-AUG-1961 / 140:  4.43430
 01-SEP-1961 / 141:  4.00892
 01-OCT-1961 / 142:  3.72098
 01-NOV-1961 / 143:  3.66143
 01-DEC-1961 / 144:  3.84430
 31-DEC-1961 / 145:  4.23222
 31-JAN-1962 / 146:  4.78344
 02-MAR-1962 / 147:  5.38881
 02-APR-1962 / 148:  5.92058
 02-MAY-1962 / 149:  6.31288
 02-JUN-1962 / 150:  6.46882
 02-JUL-1962 / 151:  6.36477
 01-AUG-1962 / 152:  6.02049
 01-SEP-1962 / 153:  5.51225
 01-OCT-1962 / 154:  4.86979
 01-NOV-1962 / 155:  4.25906
 01-DEC-1962 / 156:  3.75369
 01-JAN-1963 / 157:  3.47572
 31-JAN-1963 / 158:  3.46192
 03-MAR-1963 / 159:  3.73235
 02-APR-1963 / 160:  4.22178
 02-MAY-1963 / 161:  4.87495
 02-JUN-1963 / 162:  5.53889
 02-JUL-1963 / 163:  6.13465
 02-AUG-1963 / 164:  6.51992
 01-SEP-1963 / 165:  6.64687
 02-OCT-1963 / 166:  6.48047
 01-NOV-1963 / 167:  6.05679
 01-DEC-1963 / 168:  5.42322
 01-JAN-1964 / 169:  4.72767
 31-JAN-1964 / 170:  4.05207
 02-MAR-1964 / 171:  3.54408
 01-APR-1964 / 172:  3.30238
 02-MAY-1964 / 173:  3.35833
 01-JUN-1964 / 174:  3.70156
 02-JUL-1964 / 175:  4.29414
 01-AUG-1964 / 176:  4.99806
 31-AUG-1964 / 177:  5.68610
 01-OCT-1964 / 178:  6.30291
 31-OCT-1964 / 179:  6.67741
 01-DEC-1964 / 180:  6.76315
 31-DEC-1964 / 181:  5.33684
 31-JAN-1965 / 182:  4.85056
 02-MAR-1965 / 183:  4.72718
 01-APR-1965 / 184:  4.80719
 02-MAY-1965 / 185:  5.03077
 01-JUN-1965 / 186:  5.33849
 02-JUL-1965 / 187:  5.63022
 01-AUG-1965 / 188:  5.84520
 01-SEP-1965 / 189:  5.91006
 01-OCT-1965 / 190:  5.80079
 01-NOV-1965 / 191:  5.51786
 01-DEC-1965 / 192:  5.12204
 31-DEC-1965 / 193:  4.65981
 31-JAN-1966 / 194:  4.24476
 02-MAR-1966 / 195:  3.94924
 02-APR-1966 / 196:  3.81224
 02-MAY-1966 / 197:  3.88844
 02-JUN-1966 / 198:  4.17776
 02-JUL-1966 / 199:  4.61799
 01-AUG-1966 / 200:  5.16008
 01-SEP-1966 / 201:  5.69162
 01-OCT-1966 / 202:  6.10043
 01-NOV-1966 / 203:  6.33247
 01-DEC-1966 / 204:  6.32654
 01-JAN-1967 / 205:  6.07672
 31-JAN-1967 / 206:  5.63675
 02-MAR-1967 / 207:  5.07494
 02-APR-1967 / 208:  4.46827
 02-MAY-1967 / 209:  3.96111
 02-JUN-1967 / 210:  3.61676
 02-JUL-1967 / 211:  3.52089
 02-AUG-1967 / 212:  3.68995
 01-SEP-1967 / 213:  4.10515
 02-OCT-1967 / 214:  4.67309
 01-NOV-1967 / 215:  5.32841
 01-DEC-1967 / 216:  5.91642
 01-JAN-1968 / 217:  6.36574
 31-JAN-1968 / 218:  6.56725
 02-MAR-1968 / 219:  6.50670
 01-APR-1968 / 220:  6.17205
 02-MAY-1968 / 221:  5.63651
 01-JUN-1968 / 222:  4.96113
 01-JUL-1968 / 223:  4.30451
 01-AUG-1968 / 224:  3.74505
 31-AUG-1968 / 225:  3.41025
 01-OCT-1968 / 226:  3.36147
 31-OCT-1968 / 227:  3.60787
 01-DEC-1968 / 228:  4.09437
 31-DEC-1968 / 229:  4.76586
 31-JAN-1969 / 230:  5.46513
 02-MAR-1969 / 231:  6.07274
 01-APR-1969 / 232:  6.53501
 02-MAY-1969 / 233:  6.71797
 01-JUN-1969 / 234:  6.59715
 02-JUL-1969 / 235:  6.19828
 01-AUG-1969 / 236:  5.56605
 01-SEP-1969 / 237:  4.82373
 01-OCT-1969 / 238:  4.12851
 31-OCT-1969 / 239:  3.56317
 01-DEC-1969 / 240:  3.26260
 31-DEC-1969 / 241:     ....
 31-JAN-1970 / 242:     ....
 02-MAR-1970 / 243:     ....
 02-APR-1970 / 244:     ....
 02-MAY-1970 / 245:     ....
 02-JUN-1970 / 246:     ....
 02-JUL-1970 / 247:     ....
 01-AUG-1970 / 248:     ....
 01-SEP-1970 / 249:     ....
 01-OCT-1970 / 250:     ....
 01-NOV-1970 / 251:     ....
 01-DEC-1970 / 252:     ....
 01-JAN-1971 / 253:     ....
 31-JAN-1971 / 254:     ....
 02-MAR-1971 / 255:     ....
 02-APR-1971 / 256:     ....
 02-MAY-1971 / 257:     ....
 02-JUN-1971 / 258:     ....
 02-JUL-1971 / 259:     ....
 02-AUG-1971 / 260:     ....
 01-SEP-1971 / 261:     ....
 02-OCT-1971 / 262:     ....
 01-NOV-1971 / 263:     ....
 01-DEC-1971 / 264:     ....
 01-JAN-1972 / 265:     ....
 31-JAN-1972 / 266:     ....
 02-MAR-1972 / 267:     ....
 01-APR-1972 / 268:     ....
 02-MAY-1972 / 269:     ....
 01-JUN-1972 / 270:     ....
 01-JUL-1972 / 271:     ....
 01-AUG-1972 / 272:     ....
 31-AUG-1972 / 273:     ....
 01-OCT-1972 / 274:     ....
 31-OCT-1972 / 275:     ....
 01-DEC-1972 / 276:     ....
 31-DEC-1972 / 277:     ....
 31-JAN-1973 / 278:     ....
 02-MAR-1973 / 279:     ....
 01-APR-1973 / 280:     ....
 02-MAY-1973 / 281:     ....
 01-JUN-1973 / 282:     ....
 02-JUL-1973 / 283:     ....
 01-AUG-1973 / 284:     ....
 01-SEP-1973 / 285:     ....
 01-OCT-1973 / 286:     ....
 31-OCT-1973 / 287:     ....
 01-DEC-1973 / 288:     ....
 31-DEC-1973 / 289:     ....
 31-JAN-1974 / 290:     ....
 02-MAR-1974 / 291:     ....
 02-APR-1974 / 292:     ....
 02-MAY-1974 / 293:     ....
 02-JUN-1974 / 294:     ....
 02-JUL-1974 / 295:     ....
 01-AUG-1974 / 296:     ....
 01-SEP-1974 / 297:     ....
 01-OCT-1974 / 298:     ....
 01-NOV-1974 / 299:     ....
 01-DEC-1974 / 300:     ....
 01-JAN-1975 / 301:     ....
CANCEL DATA timeagg
CANCEL AXIS tax
 
! try without an axis
DEFINE DATA /AGGREGATE /HIDE /T timeagg = aggfiles
! no gaps (missing values) but time axis JUL-2001 -> DEC 2022 with half of 2006, 2012, 2017
LIST /PREC=6 /X=12E /Y=12S /Z=5.0 value
             VARIABLE : forecasted value
             FILENAME : timeagg
             SUBSET   : 240 points (TIME)
             LONGITUDE: 12E
             LATITUDE : 12S
             Z (m)    : 5
                          12E    
                           3
 15-JUL-2001 00 /   1:  4.78548
 15-AUG-2001 00 /   2:  5.04331
 15-SEP-2001 00 /   3:  4.93140
 15-OCT-2001 00 /   4:  4.69806
 15-NOV-2001 00 /   5:  4.44249
 15-DEC-2001 00 /   6:  4.26702
 15-JAN-2002 00 /   7:  4.22320
 14-FEB-2002 00 /   8:  4.34140
 15-MAR-2002 00 /   9:  4.59768
 15-APR-2002 00 /  10:  4.98267
 15-MAY-2002 00 /  11:  5.39659
 15-JUN-2002 00 /  12:  5.78261
 15-JUL-2002 00 /  13:  6.03890
 15-AUG-2002 00 /  14:  6.12264
 15-SEP-2002 00 /  15:  5.99540
 15-OCT-2002 00 /  16:  5.68400
 15-NOV-2002 00 /  17:  5.21932
 15-DEC-2002 00 /  18:  4.70907
 15-JAN-2003 00 /  19:  4.21538
 14-FEB-2003 00 /  20:  3.85940
 15-MAR-2003 00 /  21:  3.69402
 15-APR-2003 00 /  22:  3.74898
 15-MAY-2003 00 /  23:  4.02725
 15-JUN-2003 00 /  24:  4.50141
 15-JUL-2003 00 /  25:  5.06258
 15-AUG-2003 00 /  26:  5.64487
 15-SEP-2003 00 /  27:  6.12160
 15-OCT-2003 00 /  28:  6.39571
 15-NOV-2003 00 /  29:  6.42950
 15-DEC-2003 00 /  30:  6.20977
 15-JAN-2004 00 /  31:  5.75771
 14-FEB-2004 00 /  32:  5.17681
 15-MAR-2004 00 /  33:  4.55453
 15-APR-2004 00 /  34:  3.98248
 15-MAY-2004 00 /  35:  3.59793
 15-JUN-2004 00 /  36:  3.45004
 15-JUL-2004 00 /  37:  3.57784
 15-AUG-2004 00 /  38:  3.97035
 15-SEP-2004 00 /  39:  4.55922
 15-OCT-2004 00 /  40:  5.21611
 15-NOV-2004 00 /  41:  5.86370
 15-DEC-2004 00 /  42:  6.34797
 15-JAN-2005 00 /  43:  6.60908
 14-FEB-2005 00 /  44:  6.58221
 15-MAR-2005 00 /  45:  6.29531
 15-APR-2005 00 /  46:  5.75513
 15-MAY-2005 00 /  47:  5.09240
 15-JUN-2005 00 /  48:  4.38446
 15-JUL-2005 00 /  49:  3.79868
 15-AUG-2005 00 /  50:  3.40595
 15-SEP-2005 00 /  51:  3.30296
 15-OCT-2005 00 /  52:  3.50035
 15-NOV-2005 00 /  53:  3.97774
 15-DEC-2005 00 /  54:  4.62476
 15-JAN-2006 00 /  55:  5.36631
 14-FEB-2006 00 /  56:  6.02768
 15-MAR-2006 00 /  57:  6.50493
 15-APR-2006 00 /  58:  6.74956
 15-MAY-2006 00 /  59:  6.68160
 15-JUN-2006 00 /  60:  6.30642
 15-JAN-2007 00 /  61:  5.28216
 14-FEB-2007 00 /  62:  4.91316
 15-MAR-2007 00 /  63:  4.93575
 15-APR-2007 00 /  64:  5.13795
 15-MAY-2007 00 /  65:  5.40425
 15-JUN-2007 00 /  66:  5.65764
 15-JUL-2007 00 /  67:  5.80588
 15-AUG-2007 00 /  68:  5.80580
 15-SEP-2007 00 /  69:  5.63212
 15-OCT-2007 00 /  70:  5.31885
 15-NOV-2007 00 /  71:  4.90021
 15-DEC-2007 00 /  72:  4.47828
 15-JAN-2008 00 /  73:  4.11104
 14-FEB-2008 00 /  74:  3.89561
 15-MAR-2008 00 /  75:  3.86670
 15-APR-2008 00 /  76:  4.04843
 15-MAY-2008 00 /  77:  4.40589
 15-JUN-2008 00 /  78:  4.90171
 15-JUL-2008 00 /  79:  5.41997
 15-AUG-2008 00 /  80:  5.89696
 15-SEP-2008 00 /  81:  6.22250
 15-OCT-2008 00 /  82:  6.32998
 15-NOV-2008 00 /  83:  6.19939
 15-DEC-2008 00 /  84:  5.85530
 15-JAN-2009 00 /  85:  5.33369
 14-FEB-2009 00 /  86:  4.75543
 15-MAR-2009 00 /  87:  4.22266
 15-APR-2009 00 /  88:  3.78213
 15-MAY-2009 00 /  89:  3.56132
 15-JUN-2009 00 /  90:  3.59159
 15-JUL-2009 00 /  91:  3.87084
 15-AUG-2009 00 /  92:  4.37044
 15-SEP-2009 00 /  93:  4.99626
 15-OCT-2009 00 /  94:  5.61464
 15-NOV-2009 00 /  95:  6.15138
 15-DEC-2009 00 /  96:  6.47723
 15-JAN-2010 00 /  97:  6.54981
 14-FEB-2010 00 /  98:  6.34792
 15-MAR-2010 00 /  99:  5.92721
 15-APR-2010 00 / 100:  5.30720
 15-MAY-2010 00 / 101:  4.64348
 15-JUN-2010 00 / 102:  4.01454
 15-JUL-2010 00 / 103:  3.57023
 15-AUG-2010 00 / 104:  3.36582
 15-SEP-2010 00 / 105:  3.46052
 15-OCT-2010 00 / 106:  3.82435
 15-NOV-2010 00 / 107:  4.41723
 15-DEC-2010 00 / 108:  5.10114
 15-JAN-2011 00 / 109:  5.79586
 14-FEB-2011 00 / 110:  6.33679
 15-MAR-2011 00 / 111:  6.64611
 15-APR-2011 00 / 112:  6.68541
 15-MAY-2011 00 / 113:  6.42771
 15-JUN-2011 00 / 114:  5.90065
 15-JUL-2011 00 / 115:  5.22649
 15-AUG-2011 00 / 116:  4.48378
 15-SEP-2011 00 / 117:  3.82933
 15-OCT-2011 00 / 118:  3.39470
 15-NOV-2011 00 / 119:  3.23332
 15-DEC-2011 00 / 120:  3.38570
 15-JUL-2012 00 / 121:  4.67323
 15-AUG-2012 00 / 122:  5.13185
 15-SEP-2012 00 / 123:  5.17560
 15-OCT-2012 00 / 124:  5.02177
 15-NOV-2012 00 / 125:  4.75087
 15-DEC-2012 00 / 126:  4.46517
 15-JAN-2013 00 / 127:  4.23079
 14-FEB-2013 00 / 128:  4.12877
 15-MAR-2013 00 / 129:  4.18270
 15-APR-2013 00 / 130:  4.41019
 15-MAY-2013 00 / 131:  4.76628
 15-JUN-2013 00 / 132:  5.21047
 15-JUL-2013 00 / 133:  5.63414
 15-AUG-2013 00 / 134:  5.97904
 15-SEP-2013 00 / 135:  6.15628
 15-OCT-2013 00 / 136:  6.12656
 15-NOV-2013 00 / 137:  5.88363
 15-DEC-2013 00 / 138:  5.47793
 15-JAN-2014 00 / 139:  4.95365
 14-FEB-2014 00 / 140:  4.43430
 15-MAR-2014 00 / 141:  4.00892
 15-APR-2014 00 / 142:  3.72098
 15-MAY-2014 00 / 143:  3.66143
 15-JUN-2014 00 / 144:  3.84430
 15-JUL-2014 00 / 145:  4.23222
 15-AUG-2014 00 / 146:  4.78344
 15-SEP-2014 00 / 147:  5.38881
 15-OCT-2014 00 / 148:  5.92058
 15-NOV-2014 00 / 149:  6.31288
 15-DEC-2014 00 / 150:  6.46882
 15-JAN-2015 00 / 151:  6.36477
 14-FEB-2015 00 / 152:  6.02049
 15-MAR-2015 00 / 153:  5.51225
 15-APR-2015 00 / 154:  4.86979
 15-MAY-2015 00 / 155:  4.25906
 15-JUN-2015 00 / 156:  3.75369
 15-JUL-2015 00 / 157:  3.47572
 15-AUG-2015 00 / 158:  3.46192
 15-SEP-2015 00 / 159:  3.73235
 15-OCT-2015 00 / 160:  4.22178
 15-NOV-2015 00 / 161:  4.87495
 15-DEC-2015 00 / 162:  5.53889
 15-JAN-2016 00 / 163:  6.13465
 14-FEB-2016 00 / 164:  6.51992
 15-MAR-2016 00 / 165:  6.64687
 15-APR-2016 00 / 166:  6.48047
 15-MAY-2016 00 / 167:  6.05679
 15-JUN-2016 00 / 168:  5.42322
 15-JUL-2016 00 / 169:  4.72767
 15-AUG-2016 00 / 170:  4.05207
 15-SEP-2016 00 / 171:  3.54408
 15-OCT-2016 00 / 172:  3.30238
 15-NOV-2016 00 / 173:  3.35833
 15-DEC-2016 00 / 174:  3.70156
 15-JAN-2017 00 / 175:  4.29414
 14-FEB-2017 00 / 176:  4.99806
 15-MAR-2017 00 / 177:  5.68610
 15-APR-2017 00 / 178:  6.30291
 15-MAY-2017 00 / 179:  6.67741
 15-JUN-2017 00 / 180:  6.76315
 15-JAN-2018 00 / 181:  5.33684
 14-FEB-2018 00 / 182:  4.85056
 15-MAR-2018 00 / 183:  4.72718
 15-APR-2018 00 / 184:  4.80719
 15-MAY-2018 00 / 185:  5.03077
 15-JUN-2018 00 / 186:  5.33849
 15-JUL-2018 00 / 187:  5.63022
 15-AUG-2018 00 / 188:  5.84520
 15-SEP-2018 00 / 189:  5.91006
 15-OCT-2018 00 / 190:  5.80079
 15-NOV-2018 00 / 191:  5.51786
 15-DEC-2018 00 / 192:  5.12204
 15-JAN-2019 00 / 193:  4.65981
 14-FEB-2019 00 / 194:  4.24476
 15-MAR-2019 00 / 195:  3.94924
 15-APR-2019 00 / 196:  3.81224
 15-MAY-2019 00 / 197:  3.88844
 15-JUN-2019 00 / 198:  4.17776
 15-JUL-2019 00 / 199:  4.61799
 15-AUG-2019 00 / 200:  5.16008
 15-SEP-2019 00 / 201:  5.69162
 15-OCT-2019 00 / 202:  6.10043
 15-NOV-2019 00 / 203:  6.33247
 15-DEC-2019 00 / 204:  6.32654
 15-JAN-2020 00 / 205:  6.07672
 14-FEB-2020 00 / 206:  5.63675
 15-MAR-2020 00 / 207:  5.07494
 15-APR-2020 00 / 208:  4.46827
 15-MAY-2020 00 / 209:  3.96111
 15-JUN-2020 00 / 210:  3.61676
 15-JUL-2020 00 / 211:  3.52089
 15-AUG-2020 00 / 212:  3.68995
 15-SEP-2020 00 / 213:  4.10515
 15-OCT-2020 00 / 214:  4.67309
 15-NOV-2020 00 / 215:  5.32841
 15-DEC-2020 00 / 216:  5.91642
 15-JAN-2021 00 / 217:  6.36574
 14-FEB-2021 00 / 218:  6.56725
 15-MAR-2021 00 / 219:  6.50670
 15-APR-2021 00 / 220:  6.17205
 15-MAY-2021 00 / 221:  5.63651
 15-JUN-2021 00 / 222:  4.96113
 15-JUL-2021 00 / 223:  4.30451
 15-AUG-2021 00 / 224:  3.74505
 15-SEP-2021 00 / 225:  3.41025
 15-OCT-2021 00 / 226:  3.36147
 15-NOV-2021 00 / 227:  3.60787
 15-DEC-2021 00 / 228:  4.09437
 15-JAN-2022 00 / 229:  4.76586
 14-FEB-2022 00 / 230:  5.46513
 15-MAR-2022 00 / 231:  6.07274
 15-APR-2022 00 / 232:  6.53501
 15-MAY-2022 00 / 233:  6.71797
 15-JUN-2022 00 / 234:  6.59715
 15-JUL-2022 00 / 235:  6.19828
 15-AUG-2022 00 / 236:  5.56605
 15-SEP-2022 00 / 237:  4.82373
 15-OCT-2022 00 / 238:  4.12851
 15-NOV-2022 00 / 239:  3.56317
 15-DEC-2022 00 / 240:  3.26260
CANCEL DATA timeagg
 
CANCEL VAR aggfiles
 
*** Running ferret script: bn_tagg_overlaps.jnl
! bn_tagg_overlaps.jnl
! test time aggregation where there are overlaps between data files
 
LET twopi=8.0*ATAN(1.0)
 
DEFINE AXIS /T=1-JAN-2009:1-JAN-2010:1 /UNITS=days /T0=1-JAN-2009 time
LET /TITLE=myvar var = COS(twopi * _T[gt=time]/365.0)
SAVE /CLOBBER /FILE=data2009.nc var
 
DEFINE AXIS /T=1-JAN-2010:3-JAN-2011:1 /UNITS=days /T0=1-JAN-2010 time
LET /TITLE=myvar var = 10.0 + COS(twopi * _T[gt=time]/365.0)
SAVE /CLOBBER /FILE=data2010.nc var
 
DEFINE AXIS /T=1-JAN-2011:1-JAN-2012:1 /UNITS=days /T0=1-JAN-2011 time
LET /TITLE=myvar var = 20.0 + COS(twopi * _T[gt=time]/365.0)
SAVE /CLOBBER /FILE=data2011.nc var
 
CANCEL VAR /ALL
 
! Cancel axis/all is problematic when running all the bench scripts as in bn_all.jnl
! CANCEL AXIS /ALL
CANCEL AXIS time
 
 
DEFINE AXIS /T=1-JAN-2009:31-JAN-2012:1 /UNIT=days /T0=01-JAN-2000 aggtime
 
! Unlimited number of overlaps
DEFINE DATA /AGG /T /TOVERLAP /TAXIS=aggtime myagg = data2010.nc, data2009.nc, data2011.nc
LIST /PREC=8 var
             VARIABLE : myvar
             FILENAME : myagg
             SUBSET   : 1126 points (TIME)
 01-JAN-2009 00 /    1:   1.000000
 02-JAN-2009 00 /    2:   0.999852
 03-JAN-2009 00 /    3:   0.999407
 04-JAN-2009 00 /    4:   0.998667
 05-JAN-2009 00 /    5:   0.997630
 06-JAN-2009 00 /    6:   0.996298
 07-JAN-2009 00 /    7:   0.994671
 08-JAN-2009 00 /    8:   0.992749
 09-JAN-2009 00 /    9:   0.990532
 10-JAN-2009 00 /   10:   0.988023
 11-JAN-2009 00 /   11:   0.985220
 12-JAN-2009 00 /   12:   0.982126
 13-JAN-2009 00 /   13:   0.978740
 14-JAN-2009 00 /   14:   0.975065
 15-JAN-2009 00 /   15:   0.971100
 16-JAN-2009 00 /   16:   0.966848
 17-JAN-2009 00 /   17:   0.962309
 18-JAN-2009 00 /   18:   0.957485
 19-JAN-2009 00 /   19:   0.952378
 20-JAN-2009 00 /   20:   0.946988
 21-JAN-2009 00 /   21:   0.941317
 22-JAN-2009 00 /   22:   0.935368
 23-JAN-2009 00 /   23:   0.929141
 24-JAN-2009 00 /   24:   0.922640
 25-JAN-2009 00 /   25:   0.915864
 26-JAN-2009 00 /   26:   0.908818
 27-JAN-2009 00 /   27:   0.901502
 28-JAN-2009 00 /   28:   0.893919
 29-JAN-2009 00 /   29:   0.886071
 30-JAN-2009 00 /   30:   0.877960
 31-JAN-2009 00 /   31:   0.869589
 01-FEB-2009 00 /   32:   0.860961
 02-FEB-2009 00 /   33:   0.852078
 03-FEB-2009 00 /   34:   0.842942
 04-FEB-2009 00 /   35:   0.833556
 05-FEB-2009 00 /   36:   0.823923
 06-FEB-2009 00 /   37:   0.814046
 07-FEB-2009 00 /   38:   0.803928
 08-FEB-2009 00 /   39:   0.793572
 09-FEB-2009 00 /   40:   0.782980
 10-FEB-2009 00 /   41:   0.772157
 11-FEB-2009 00 /   42:   0.761104
 12-FEB-2009 00 /   43:   0.749826
 13-FEB-2009 00 /   44:   0.738326
 14-FEB-2009 00 /   45:   0.726608
 15-FEB-2009 00 /   46:   0.714673
 16-FEB-2009 00 /   47:   0.702527
 17-FEB-2009 00 /   48:   0.690173
 18-FEB-2009 00 /   49:   0.677615
 19-FEB-2009 00 /   50:   0.664855
 20-FEB-2009 00 /   51:   0.651899
 21-FEB-2009 00 /   52:   0.638749
 22-FEB-2009 00 /   53:   0.625411
 23-FEB-2009 00 /   54:   0.611886
 24-FEB-2009 00 /   55:   0.598181
 25-FEB-2009 00 /   56:   0.584298
 26-FEB-2009 00 /   57:   0.570242
 27-FEB-2009 00 /   58:   0.556017
 28-FEB-2009 00 /   59:   0.541628
 01-MAR-2009 00 /   60:   0.527078
 02-MAR-2009 00 /   61:   0.512371
 03-MAR-2009 00 /   62:   0.497513
 04-MAR-2009 00 /   63:   0.482508
 05-MAR-2009 00 /   64:   0.467359
 06-MAR-2009 00 /   65:   0.452072
 07-MAR-2009 00 /   66:   0.436651
 08-MAR-2009 00 /   67:   0.421101
 09-MAR-2009 00 /   68:   0.405426
 10-MAR-2009 00 /   69:   0.389630
 11-MAR-2009 00 /   70:   0.373720
 12-MAR-2009 00 /   71:   0.357698
 13-MAR-2009 00 /   72:   0.341571
 14-MAR-2009 00 /   73:   0.325342
 15-MAR-2009 00 /   74:   0.309017
 16-MAR-2009 00 /   75:   0.292600
 17-MAR-2009 00 /   76:   0.276097
 18-MAR-2009 00 /   77:   0.259512
 19-MAR-2009 00 /   78:   0.242850
 20-MAR-2009 00 /   79:   0.226116
 21-MAR-2009 00 /   80:   0.209315
 22-MAR-2009 00 /   81:   0.192452
 23-MAR-2009 00 /   82:   0.175531
 24-MAR-2009 00 /   83:   0.158559
 25-MAR-2009 00 /   84:   0.141540
 26-MAR-2009 00 /   85:   0.124479
 27-MAR-2009 00 /   86:   0.107381
 28-MAR-2009 00 /   87:   0.090252
 29-MAR-2009 00 /   88:   0.073095
 30-MAR-2009 00 /   89:   0.055917
 31-MAR-2009 00 /   90:   0.038722
 01-APR-2009 00 /   91:   0.021516
 02-APR-2009 00 /   92:   0.004304
 03-APR-2009 00 /   93:  -0.012910
 04-APR-2009 00 /   94:  -0.030120
 05-APR-2009 00 /   95:  -0.047321
 06-APR-2009 00 /   96:  -0.064508
 07-APR-2009 00 /   97:  -0.081676
 08-APR-2009 00 /   98:  -0.098820
 09-APR-2009 00 /   99:  -0.115935
 10-APR-2009 00 /  100:  -0.133015
 11-APR-2009 00 /  101:  -0.150055
 12-APR-2009 00 /  102:  -0.167052
 13-APR-2009 00 /  103:  -0.183998
 14-APR-2009 00 /  104:  -0.200891
 15-APR-2009 00 /  105:  -0.217723
 16-APR-2009 00 /  106:  -0.234491
 17-APR-2009 00 /  107:  -0.251190
 18-APR-2009 00 /  108:  -0.267814
 19-APR-2009 00 /  109:  -0.284359
 20-APR-2009 00 /  110:  -0.300820
 21-APR-2009 00 /  111:  -0.317191
 22-APR-2009 00 /  112:  -0.333469
 23-APR-2009 00 /  113:  -0.349647
 24-APR-2009 00 /  114:  -0.365723
 25-APR-2009 00 /  115:  -0.381689
 26-APR-2009 00 /  116:  -0.397543
 27-APR-2009 00 /  117:  -0.413279
 28-APR-2009 00 /  118:  -0.428892
 29-APR-2009 00 /  119:  -0.444378
 30-APR-2009 00 /  120:  -0.459733
 01-MAY-2009 00 /  121:  -0.474951
 02-MAY-2009 00 /  122:  -0.490029
 03-MAY-2009 00 /  123:  -0.504961
 04-MAY-2009 00 /  124:  -0.519744
 05-MAY-2009 00 /  125:  -0.534373
 06-MAY-2009 00 /  126:  -0.548843
 07-MAY-2009 00 /  127:  -0.563151
 08-MAY-2009 00 /  128:  -0.577292
 09-MAY-2009 00 /  129:  -0.591261
 10-MAY-2009 00 /  130:  -0.605056
 11-MAY-2009 00 /  131:  -0.618671
 12-MAY-2009 00 /  132:  -0.632103
 13-MAY-2009 00 /  133:  -0.645348
 14-MAY-2009 00 /  134:  -0.658402
 15-MAY-2009 00 /  135:  -0.671260
 16-MAY-2009 00 /  136:  -0.683919
 17-MAY-2009 00 /  137:  -0.696376
 18-MAY-2009 00 /  138:  -0.708627
 19-MAY-2009 00 /  139:  -0.720667
 20-MAY-2009 00 /  140:  -0.732494
 21-MAY-2009 00 /  141:  -0.744104
 22-MAY-2009 00 /  142:  -0.755493
 23-MAY-2009 00 /  143:  -0.766659
 24-MAY-2009 00 /  144:  -0.777597
 25-MAY-2009 00 /  145:  -0.788305
 26-MAY-2009 00 /  146:  -0.798779
 27-MAY-2009 00 /  147:  -0.809017
 28-MAY-2009 00 /  148:  -0.819015
 29-MAY-2009 00 /  149:  -0.828770
 30-MAY-2009 00 /  150:  -0.838280
 31-MAY-2009 00 /  151:  -0.847541
 01-JUN-2009 00 /  152:  -0.856551
 02-JUN-2009 00 /  153:  -0.865307
 03-JUN-2009 00 /  154:  -0.873807
 04-JUN-2009 00 /  155:  -0.882048
 05-JUN-2009 00 /  156:  -0.890028
 06-JUN-2009 00 /  157:  -0.897743
 07-JUN-2009 00 /  158:  -0.905193
 08-JUN-2009 00 /  159:  -0.912375
 09-JUN-2009 00 /  160:  -0.919286
 10-JUN-2009 00 /  161:  -0.925925
 11-JUN-2009 00 /  162:  -0.932289
 12-JUN-2009 00 /  163:  -0.938377
 13-JUN-2009 00 /  164:  -0.944188
 14-JUN-2009 00 /  165:  -0.949718
 15-JUN-2009 00 /  166:  -0.954967
 16-JUN-2009 00 /  167:  -0.959933
 17-JUN-2009 00 /  168:  -0.964614
 18-JUN-2009 00 /  169:  -0.969010
 19-JUN-2009 00 /  170:  -0.973118
 20-JUN-2009 00 /  171:  -0.976938
 21-JUN-2009 00 /  172:  -0.980469
 22-JUN-2009 00 /  173:  -0.983709
 23-JUN-2009 00 /  174:  -0.986658
 24-JUN-2009 00 /  175:  -0.989314
 25-JUN-2009 00 /  176:  -0.991677
 26-JUN-2009 00 /  177:  -0.993747
 27-JUN-2009 00 /  178:  -0.995521
 28-JUN-2009 00 /  179:  -0.997001
 29-JUN-2009 00 /  180:  -0.998186
 30-JUN-2009 00 /  181:  -0.999074
 01-JUL-2009 00 /  182:  -0.999667
 02-JUL-2009 00 /  183:  -0.999963
 03-JUL-2009 00 /  184:  -0.999963
 04-JUL-2009 00 /  185:  -0.999667
 05-JUL-2009 00 /  186:  -0.999074
 06-JUL-2009 00 /  187:  -0.998186
 07-JUL-2009 00 /  188:  -0.997001
 08-JUL-2009 00 /  189:  -0.995521
 09-JUL-2009 00 /  190:  -0.993747
 10-JUL-2009 00 /  191:  -0.991677
 11-JUL-2009 00 /  192:  -0.989314
 12-JUL-2009 00 /  193:  -0.986658
 13-JUL-2009 00 /  194:  -0.983709
 14-JUL-2009 00 /  195:  -0.980469
 15-JUL-2009 00 /  196:  -0.976938
 16-JUL-2009 00 /  197:  -0.973118
 17-JUL-2009 00 /  198:  -0.969010
 18-JUL-2009 00 /  199:  -0.964614
 19-JUL-2009 00 /  200:  -0.959933
 20-JUL-2009 00 /  201:  -0.954967
 21-JUL-2009 00 /  202:  -0.949718
 22-JUL-2009 00 /  203:  -0.944188
 23-JUL-2009 00 /  204:  -0.938377
 24-JUL-2009 00 /  205:  -0.932289
 25-JUL-2009 00 /  206:  -0.925925
 26-JUL-2009 00 /  207:  -0.919286
 27-JUL-2009 00 /  208:  -0.912375
 28-JUL-2009 00 /  209:  -0.905193
 29-JUL-2009 00 /  210:  -0.897743
 30-JUL-2009 00 /  211:  -0.890028
 31-JUL-2009 00 /  212:  -0.882048
 01-AUG-2009 00 /  213:  -0.873807
 02-AUG-2009 00 /  214:  -0.865307
 03-AUG-2009 00 /  215:  -0.856551
 04-AUG-2009 00 /  216:  -0.847541
 05-AUG-2009 00 /  217:  -0.838280
 06-AUG-2009 00 /  218:  -0.828770
 07-AUG-2009 00 /  219:  -0.819015
 08-AUG-2009 00 /  220:  -0.809017
 09-AUG-2009 00 /  221:  -0.798779
 10-AUG-2009 00 /  222:  -0.788305
 11-AUG-2009 00 /  223:  -0.777597
 12-AUG-2009 00 /  224:  -0.766659
 13-AUG-2009 00 /  225:  -0.755493
 14-AUG-2009 00 /  226:  -0.744104
 15-AUG-2009 00 /  227:  -0.732494
 16-AUG-2009 00 /  228:  -0.720667
 17-AUG-2009 00 /  229:  -0.708627
 18-AUG-2009 00 /  230:  -0.696376
 19-AUG-2009 00 /  231:  -0.683919
 20-AUG-2009 00 /  232:  -0.671260
 21-AUG-2009 00 /  233:  -0.658402
 22-AUG-2009 00 /  234:  -0.645348
 23-AUG-2009 00 /  235:  -0.632103
 24-AUG-2009 00 /  236:  -0.618671
 25-AUG-2009 00 /  237:  -0.605056
 26-AUG-2009 00 /  238:  -0.591261
 27-AUG-2009 00 /  239:  -0.577292
 28-AUG-2009 00 /  240:  -0.563151
 29-AUG-2009 00 /  241:  -0.548843
 30-AUG-2009 00 /  242:  -0.534373
 31-AUG-2009 00 /  243:  -0.519744
 01-SEP-2009 00 /  244:  -0.504961
 02-SEP-2009 00 /  245:  -0.490029
 03-SEP-2009 00 /  246:  -0.474951
 04-SEP-2009 00 /  247:  -0.459733
 05-SEP-2009 00 /  248:  -0.444378
 06-SEP-2009 00 /  249:  -0.428892
 07-SEP-2009 00 /  250:  -0.413279
 08-SEP-2009 00 /  251:  -0.397543
 09-SEP-2009 00 /  252:  -0.381689
 10-SEP-2009 00 /  253:  -0.365723
 11-SEP-2009 00 /  254:  -0.349647
 12-SEP-2009 00 /  255:  -0.333469
 13-SEP-2009 00 /  256:  -0.317191
 14-SEP-2009 00 /  257:  -0.300820
 15-SEP-2009 00 /  258:  -0.284359
 16-SEP-2009 00 /  259:  -0.267814
 17-SEP-2009 00 /  260:  -0.251190
 18-SEP-2009 00 /  261:  -0.234491
 19-SEP-2009 00 /  262:  -0.217723
 20-SEP-2009 00 /  263:  -0.200891
 21-SEP-2009 00 /  264:  -0.183998
 22-SEP-2009 00 /  265:  -0.167052
 23-SEP-2009 00 /  266:  -0.150055
 24-SEP-2009 00 /  267:  -0.133015
 25-SEP-2009 00 /  268:  -0.115935
 26-SEP-2009 00 /  269:  -0.098820
 27-SEP-2009 00 /  270:  -0.081676
 28-SEP-2009 00 /  271:  -0.064508
 29-SEP-2009 00 /  272:  -0.047321
 30-SEP-2009 00 /  273:  -0.030120
 01-OCT-2009 00 /  274:  -0.012910
 02-OCT-2009 00 /  275:   0.004304
 03-OCT-2009 00 /  276:   0.021516
 04-OCT-2009 00 /  277:   0.038722
 05-OCT-2009 00 /  278:   0.055917
 06-OCT-2009 00 /  279:   0.073095
 07-OCT-2009 00 /  280:   0.090252
 08-OCT-2009 00 /  281:   0.107381
 09-OCT-2009 00 /  282:   0.124479
 10-OCT-2009 00 /  283:   0.141540
 11-OCT-2009 00 /  284:   0.158559
 12-OCT-2009 00 /  285:   0.175531
 13-OCT-2009 00 /  286:   0.192452
 14-OCT-2009 00 /  287:   0.209315
 15-OCT-2009 00 /  288:   0.226116
 16-OCT-2009 00 /  289:   0.242850
 17-OCT-2009 00 /  290:   0.259512
 18-OCT-2009 00 /  291:   0.276097
 19-OCT-2009 00 /  292:   0.292600
 20-OCT-2009 00 /  293:   0.309017
 21-OCT-2009 00 /  294:   0.325342
 22-OCT-2009 00 /  295:   0.341571
 23-OCT-2009 00 /  296:   0.357698
 24-OCT-2009 00 /  297:   0.373720
 25-OCT-2009 00 /  298:   0.389630
 26-OCT-2009 00 /  299:   0.405426
 27-OCT-2009 00 /  300:   0.421101
 28-OCT-2009 00 /  301:   0.436651
 29-OCT-2009 00 /  302:   0.452072
 30-OCT-2009 00 /  303:   0.467359
 31-OCT-2009 00 /  304:   0.482508
 01-NOV-2009 00 /  305:   0.497513
 02-NOV-2009 00 /  306:   0.512371
 03-NOV-2009 00 /  307:   0.527078
 04-NOV-2009 00 /  308:   0.541628
 05-NOV-2009 00 /  309:   0.556017
 06-NOV-2009 00 /  310:   0.570242
 07-NOV-2009 00 /  311:   0.584298
 08-NOV-2009 00 /  312:   0.598181
 09-NOV-2009 00 /  313:   0.611886
 10-NOV-2009 00 /  314:   0.625411
 11-NOV-2009 00 /  315:   0.638749
 12-NOV-2009 00 /  316:   0.651899
 13-NOV-2009 00 /  317:   0.664855
 14-NOV-2009 00 /  318:   0.677615
 15-NOV-2009 00 /  319:   0.690173
 16-NOV-2009 00 /  320:   0.702527
 17-NOV-2009 00 /  321:   0.714673
 18-NOV-2009 00 /  322:   0.726608
 19-NOV-2009 00 /  323:   0.738326
 20-NOV-2009 00 /  324:   0.749826
 21-NOV-2009 00 /  325:   0.761104
 22-NOV-2009 00 /  326:   0.772157
 23-NOV-2009 00 /  327:   0.782980
 24-NOV-2009 00 /  328:   0.793572
 25-NOV-2009 00 /  329:   0.803928
 26-NOV-2009 00 /  330:   0.814046
 27-NOV-2009 00 /  331:   0.823923
 28-NOV-2009 00 /  332:   0.833556
 29-NOV-2009 00 /  333:   0.842942
 30-NOV-2009 00 /  334:   0.852078
 01-DEC-2009 00 /  335:   0.860961
 02-DEC-2009 00 /  336:   0.869589
 03-DEC-2009 00 /  337:   0.877960
 04-DEC-2009 00 /  338:   0.886071
 05-DEC-2009 00 /  339:   0.893919
 06-DEC-2009 00 /  340:   0.901502
 07-DEC-2009 00 /  341:   0.908818
 08-DEC-2009 00 /  342:   0.915864
 09-DEC-2009 00 /  343:   0.922640
 10-DEC-2009 00 /  344:   0.929141
 11-DEC-2009 00 /  345:   0.935368
 12-DEC-2009 00 /  346:   0.941317
 13-DEC-2009 00 /  347:   0.946988
 14-DEC-2009 00 /  348:   0.952378
 15-DEC-2009 00 /  349:   0.957485
 16-DEC-2009 00 /  350:   0.962309
 17-DEC-2009 00 /  351:   0.966848
 18-DEC-2009 00 /  352:   0.971100
 19-DEC-2009 00 /  353:   0.975065
 20-DEC-2009 00 /  354:   0.978740
 21-DEC-2009 00 /  355:   0.982126
 22-DEC-2009 00 /  356:   0.985220
 23-DEC-2009 00 /  357:   0.988023
 24-DEC-2009 00 /  358:   0.990532
 25-DEC-2009 00 /  359:   0.992749
 26-DEC-2009 00 /  360:   0.994671
 27-DEC-2009 00 /  361:   0.996298
 28-DEC-2009 00 /  362:   0.997630
 29-DEC-2009 00 /  363:   0.998667
 30-DEC-2009 00 /  364:   0.999407
 31-DEC-2009 00 /  365:   0.999852
 01-JAN-2010 00 /  366:  11.000000
 02-JAN-2010 00 /  367:  10.999852
 03-JAN-2010 00 /  368:  10.999407
 04-JAN-2010 00 /  369:  10.998667
 05-JAN-2010 00 /  370:  10.997630
 06-JAN-2010 00 /  371:  10.996298
 07-JAN-2010 00 /  372:  10.994671
 08-JAN-2010 00 /  373:  10.992749
 09-JAN-2010 00 /  374:  10.990532
 10-JAN-2010 00 /  375:  10.988023
 11-JAN-2010 00 /  376:  10.985220
 12-JAN-2010 00 /  377:  10.982126
 13-JAN-2010 00 /  378:  10.978740
 14-JAN-2010 00 /  379:  10.975065
 15-JAN-2010 00 /  380:  10.971100
 16-JAN-2010 00 /  381:  10.966848
 17-JAN-2010 00 /  382:  10.962309
 18-JAN-2010 00 /  383:  10.957485
 19-JAN-2010 00 /  384:  10.952378
 20-JAN-2010 00 /  385:  10.946988
 21-JAN-2010 00 /  386:  10.941317
 22-JAN-2010 00 /  387:  10.935368
 23-JAN-2010 00 /  388:  10.929141
 24-JAN-2010 00 /  389:  10.922640
 25-JAN-2010 00 /  390:  10.915864
 26-JAN-2010 00 /  391:  10.908818
 27-JAN-2010 00 /  392:  10.901502
 28-JAN-2010 00 /  393:  10.893919
 29-JAN-2010 00 /  394:  10.886071
 30-JAN-2010 00 /  395:  10.877960
 31-JAN-2010 00 /  396:  10.869589
 01-FEB-2010 00 /  397:  10.860961
 02-FEB-2010 00 /  398:  10.852078
 03-FEB-2010 00 /  399:  10.842942
 04-FEB-2010 00 /  400:  10.833556
 05-FEB-2010 00 /  401:  10.823923
 06-FEB-2010 00 /  402:  10.814046
 07-FEB-2010 00 /  403:  10.803928
 08-FEB-2010 00 /  404:  10.793572
 09-FEB-2010 00 /  405:  10.782980
 10-FEB-2010 00 /  406:  10.772157
 11-FEB-2010 00 /  407:  10.761104
 12-FEB-2010 00 /  408:  10.749826
 13-FEB-2010 00 /  409:  10.738326
 14-FEB-2010 00 /  410:  10.726608
 15-FEB-2010 00 /  411:  10.714673
 16-FEB-2010 00 /  412:  10.702527
 17-FEB-2010 00 /  413:  10.690173
 18-FEB-2010 00 /  414:  10.677615
 19-FEB-2010 00 /  415:  10.664855
 20-FEB-2010 00 /  416:  10.651899
 21-FEB-2010 00 /  417:  10.638749
 22-FEB-2010 00 /  418:  10.625411
 23-FEB-2010 00 /  419:  10.611886
 24-FEB-2010 00 /  420:  10.598181
 25-FEB-2010 00 /  421:  10.584298
 26-FEB-2010 00 /  422:  10.570242
 27-FEB-2010 00 /  423:  10.556017
 28-FEB-2010 00 /  424:  10.541628
 01-MAR-2010 00 /  425:  10.527078
 02-MAR-2010 00 /  426:  10.512371
 03-MAR-2010 00 /  427:  10.497513
 04-MAR-2010 00 /  428:  10.482508
 05-MAR-2010 00 /  429:  10.467359
 06-MAR-2010 00 /  430:  10.452072
 07-MAR-2010 00 /  431:  10.436651
 08-MAR-2010 00 /  432:  10.421101
 09-MAR-2010 00 /  433:  10.405426
 10-MAR-2010 00 /  434:  10.389630
 11-MAR-2010 00 /  435:  10.373720
 12-MAR-2010 00 /  436:  10.357698
 13-MAR-2010 00 /  437:  10.341571
 14-MAR-2010 00 /  438:  10.325342
 15-MAR-2010 00 /  439:  10.309017
 16-MAR-2010 00 /  440:  10.292600
 17-MAR-2010 00 /  441:  10.276097
 18-MAR-2010 00 /  442:  10.259512
 19-MAR-2010 00 /  443:  10.242850
 20-MAR-2010 00 /  444:  10.226116
 21-MAR-2010 00 /  445:  10.209315
 22-MAR-2010 00 /  446:  10.192452
 23-MAR-2010 00 /  447:  10.175531
 24-MAR-2010 00 /  448:  10.158559
 25-MAR-2010 00 /  449:  10.141540
 26-MAR-2010 00 /  450:  10.124479
 27-MAR-2010 00 /  451:  10.107381
 28-MAR-2010 00 /  452:  10.090252
 29-MAR-2010 00 /  453:  10.073095
 30-MAR-2010 00 /  454:  10.055917
 31-MAR-2010 00 /  455:  10.038722
 01-APR-2010 00 /  456:  10.021516
 02-APR-2010 00 /  457:  10.004304
 03-APR-2010 00 /  458:   9.987090
 04-APR-2010 00 /  459:   9.969880
 05-APR-2010 00 /  460:   9.952679
 06-APR-2010 00 /  461:   9.935492
 07-APR-2010 00 /  462:   9.918324
 08-APR-2010 00 /  463:   9.901180
 09-APR-2010 00 /  464:   9.884065
 10-APR-2010 00 /  465:   9.866985
 11-APR-2010 00 /  466:   9.849945
 12-APR-2010 00 /  467:   9.832948
 13-APR-2010 00 /  468:   9.816002
 14-APR-2010 00 /  469:   9.799109
 15-APR-2010 00 /  470:   9.782277
 16-APR-2010 00 /  471:   9.765509
 17-APR-2010 00 /  472:   9.748810
 18-APR-2010 00 /  473:   9.732186
 19-APR-2010 00 /  474:   9.715641
 20-APR-2010 00 /  475:   9.699180
 21-APR-2010 00 /  476:   9.682809
 22-APR-2010 00 /  477:   9.666531
 23-APR-2010 00 /  478:   9.650353
 24-APR-2010 00 /  479:   9.634277
 25-APR-2010 00 /  480:   9.618311
 26-APR-2010 00 /  481:   9.602457
 27-APR-2010 00 /  482:   9.586721
 28-APR-2010 00 /  483:   9.571108
 29-APR-2010 00 /  484:   9.555622
 30-APR-2010 00 /  485:   9.540267
 01-MAY-2010 00 /  486:   9.525049
 02-MAY-2010 00 /  487:   9.509971
 03-MAY-2010 00 /  488:   9.495039
 04-MAY-2010 00 /  489:   9.480256
 05-MAY-2010 00 /  490:   9.465627
 06-MAY-2010 00 /  491:   9.451157
 07-MAY-2010 00 /  492:   9.436849
 08-MAY-2010 00 /  493:   9.422708
 09-MAY-2010 00 /  494:   9.408739
 10-MAY-2010 00 /  495:   9.394944
 11-MAY-2010 00 /  496:   9.381329
 12-MAY-2010 00 /  497:   9.367897
 13-MAY-2010 00 /  498:   9.354652
 14-MAY-2010 00 /  499:   9.341598
 15-MAY-2010 00 /  500:   9.328740
 16-MAY-2010 00 /  501:   9.316081
 17-MAY-2010 00 /  502:   9.303624
 18-MAY-2010 00 /  503:   9.291373
 19-MAY-2010 00 /  504:   9.279333
 20-MAY-2010 00 /  505:   9.267506
 21-MAY-2010 00 /  506:   9.255896
 22-MAY-2010 00 /  507:   9.244507
 23-MAY-2010 00 /  508:   9.233341
 24-MAY-2010 00 /  509:   9.222403
 25-MAY-2010 00 /  510:   9.211695
 26-MAY-2010 00 /  511:   9.201221
 27-MAY-2010 00 /  512:   9.190983
 28-MAY-2010 00 /  513:   9.180985
 29-MAY-2010 00 /  514:   9.171230
 30-MAY-2010 00 /  515:   9.161720
 31-MAY-2010 00 /  516:   9.152459
 01-JUN-2010 00 /  517:   9.143449
 02-JUN-2010 00 /  518:   9.134693
 03-JUN-2010 00 /  519:   9.126193
 04-JUN-2010 00 /  520:   9.117952
 05-JUN-2010 00 /  521:   9.109972
 06-JUN-2010 00 /  522:   9.102257
 07-JUN-2010 00 /  523:   9.094807
 08-JUN-2010 00 /  524:   9.087625
 09-JUN-2010 00 /  525:   9.080714
 10-JUN-2010 00 /  526:   9.074075
 11-JUN-2010 00 /  527:   9.067711
 12-JUN-2010 00 /  528:   9.061623
 13-JUN-2010 00 /  529:   9.055812
 14-JUN-2010 00 /  530:   9.050282
 15-JUN-2010 00 /  531:   9.045033
 16-JUN-2010 00 /  532:   9.040067
 17-JUN-2010 00 /  533:   9.035386
 18-JUN-2010 00 /  534:   9.030990
 19-JUN-2010 00 /  535:   9.026882
 20-JUN-2010 00 /  536:   9.023062
 21-JUN-2010 00 /  537:   9.019531
 22-JUN-2010 00 /  538:   9.016291
 23-JUN-2010 00 /  539:   9.013342
 24-JUN-2010 00 /  540:   9.010686
 25-JUN-2010 00 /  541:   9.008323
 26-JUN-2010 00 /  542:   9.006253
 27-JUN-2010 00 /  543:   9.004479
 28-JUN-2010 00 /  544:   9.002999
 29-JUN-2010 00 /  545:   9.001814
 30-JUN-2010 00 /  546:   9.000926
 01-JUL-2010 00 /  547:   9.000333
 02-JUL-2010 00 /  548:   9.000037
 03-JUL-2010 00 /  549:   9.000037
 04-JUL-2010 00 /  550:   9.000333
 05-JUL-2010 00 /  551:   9.000926
 06-JUL-2010 00 /  552:   9.001814
 07-JUL-2010 00 /  553:   9.002999
 08-JUL-2010 00 /  554:   9.004479
 09-JUL-2010 00 /  555:   9.006253
 10-JUL-2010 00 /  556:   9.008323
 11-JUL-2010 00 /  557:   9.010686
 12-JUL-2010 00 /  558:   9.013342
 13-JUL-2010 00 /  559:   9.016291
 14-JUL-2010 00 /  560:   9.019531
 15-JUL-2010 00 /  561:   9.023062
 16-JUL-2010 00 /  562:   9.026882
 17-JUL-2010 00 /  563:   9.030990
 18-JUL-2010 00 /  564:   9.035386
 19-JUL-2010 00 /  565:   9.040067
 20-JUL-2010 00 /  566:   9.045033
 21-JUL-2010 00 /  567:   9.050282
 22-JUL-2010 00 /  568:   9.055812
 23-JUL-2010 00 /  569:   9.061623
 24-JUL-2010 00 /  570:   9.067711
 25-JUL-2010 00 /  571:   9.074075
 26-JUL-2010 00 /  572:   9.080714
 27-JUL-2010 00 /  573:   9.087625
 28-JUL-2010 00 /  574:   9.094807
 29-JUL-2010 00 /  575:   9.102257
 30-JUL-2010 00 /  576:   9.109972
 31-JUL-2010 00 /  577:   9.117952
 01-AUG-2010 00 /  578:   9.126193
 02-AUG-2010 00 /  579:   9.134693
 03-AUG-2010 00 /  580:   9.143449
 04-AUG-2010 00 /  581:   9.152459
 05-AUG-2010 00 /  582:   9.161720
 06-AUG-2010 00 /  583:   9.171230
 07-AUG-2010 00 /  584:   9.180985
 08-AUG-2010 00 /  585:   9.190983
 09-AUG-2010 00 /  586:   9.201221
 10-AUG-2010 00 /  587:   9.211695
 11-AUG-2010 00 /  588:   9.222403
 12-AUG-2010 00 /  589:   9.233341
 13-AUG-2010 00 /  590:   9.244507
 14-AUG-2010 00 /  591:   9.255896
 15-AUG-2010 00 /  592:   9.267506
 16-AUG-2010 00 /  593:   9.279333
 17-AUG-2010 00 /  594:   9.291373
 18-AUG-2010 00 /  595:   9.303624
 19-AUG-2010 00 /  596:   9.316081
 20-AUG-2010 00 /  597:   9.328740
 21-AUG-2010 00 /  598:   9.341598
 22-AUG-2010 00 /  599:   9.354652
 23-AUG-2010 00 /  600:   9.367897
 24-AUG-2010 00 /  601:   9.381329
 25-AUG-2010 00 /  602:   9.394944
 26-AUG-2010 00 /  603:   9.408739
 27-AUG-2010 00 /  604:   9.422708
 28-AUG-2010 00 /  605:   9.436849
 29-AUG-2010 00 /  606:   9.451157
 30-AUG-2010 00 /  607:   9.465627
 31-AUG-2010 00 /  608:   9.480256
 01-SEP-2010 00 /  609:   9.495039
 02-SEP-2010 00 /  610:   9.509971
 03-SEP-2010 00 /  611:   9.525049
 04-SEP-2010 00 /  612:   9.540267
 05-SEP-2010 00 /  613:   9.555622
 06-SEP-2010 00 /  614:   9.571108
 07-SEP-2010 00 /  615:   9.586721
 08-SEP-2010 00 /  616:   9.602457
 09-SEP-2010 00 /  617:   9.618311
 10-SEP-2010 00 /  618:   9.634277
 11-SEP-2010 00 /  619:   9.650353
 12-SEP-2010 00 /  620:   9.666531
 13-SEP-2010 00 /  621:   9.682809
 14-SEP-2010 00 /  622:   9.699180
 15-SEP-2010 00 /  623:   9.715641
 16-SEP-2010 00 /  624:   9.732186
 17-SEP-2010 00 /  625:   9.748810
 18-SEP-2010 00 /  626:   9.765509
 19-SEP-2010 00 /  627:   9.782277
 20-SEP-2010 00 /  628:   9.799109
 21-SEP-2010 00 /  629:   9.816002
 22-SEP-2010 00 /  630:   9.832948
 23-SEP-2010 00 /  631:   9.849945
 24-SEP-2010 00 /  632:   9.866985
 25-SEP-2010 00 /  633:   9.884065
 26-SEP-2010 00 /  634:   9.901180
 27-SEP-2010 00 /  635:   9.918324
 28-SEP-2010 00 /  636:   9.935492
 29-SEP-2010 00 /  637:   9.952679
 30-SEP-2010 00 /  638:   9.969880
 01-OCT-2010 00 /  639:   9.987090
 02-OCT-2010 00 /  640:  10.004304
 03-OCT-2010 00 /  641:  10.021516
 04-OCT-2010 00 /  642:  10.038722
 05-OCT-2010 00 /  643:  10.055917
 06-OCT-2010 00 /  644:  10.073095
 07-OCT-2010 00 /  645:  10.090252
 08-OCT-2010 00 /  646:  10.107381
 09-OCT-2010 00 /  647:  10.124479
 10-OCT-2010 00 /  648:  10.141540
 11-OCT-2010 00 /  649:  10.158559
 12-OCT-2010 00 /  650:  10.175531
 13-OCT-2010 00 /  651:  10.192452
 14-OCT-2010 00 /  652:  10.209315
 15-OCT-2010 00 /  653:  10.226116
 16-OCT-2010 00 /  654:  10.242850
 17-OCT-2010 00 /  655:  10.259512
 18-OCT-2010 00 /  656:  10.276097
 19-OCT-2010 00 /  657:  10.292600
 20-OCT-2010 00 /  658:  10.309017
 21-OCT-2010 00 /  659:  10.325342
 22-OCT-2010 00 /  660:  10.341571
 23-OCT-2010 00 /  661:  10.357698
 24-OCT-2010 00 /  662:  10.373720
 25-OCT-2010 00 /  663:  10.389630
 26-OCT-2010 00 /  664:  10.405426
 27-OCT-2010 00 /  665:  10.421101
 28-OCT-2010 00 /  666:  10.436651
 29-OCT-2010 00 /  667:  10.452072
 30-OCT-2010 00 /  668:  10.467359
 31-OCT-2010 00 /  669:  10.482508
 01-NOV-2010 00 /  670:  10.497513
 02-NOV-2010 00 /  671:  10.512371
 03-NOV-2010 00 /  672:  10.527078
 04-NOV-2010 00 /  673:  10.541628
 05-NOV-2010 00 /  674:  10.556017
 06-NOV-2010 00 /  675:  10.570242
 07-NOV-2010 00 /  676:  10.584298
 08-NOV-2010 00 /  677:  10.598181
 09-NOV-2010 00 /  678:  10.611886
 10-NOV-2010 00 /  679:  10.625411
 11-NOV-2010 00 /  680:  10.638749
 12-NOV-2010 00 /  681:  10.651899
 13-NOV-2010 00 /  682:  10.664855
 14-NOV-2010 00 /  683:  10.677615
 15-NOV-2010 00 /  684:  10.690173
 16-NOV-2010 00 /  685:  10.702527
 17-NOV-2010 00 /  686:  10.714673
 18-NOV-2010 00 /  687:  10.726608
 19-NOV-2010 00 /  688:  10.738326
 20-NOV-2010 00 /  689:  10.749826
 21-NOV-2010 00 /  690:  10.761104
 22-NOV-2010 00 /  691:  10.772157
 23-NOV-2010 00 /  692:  10.782980
 24-NOV-2010 00 /  693:  10.793572
 25-NOV-2010 00 /  694:  10.803928
 26-NOV-2010 00 /  695:  10.814046
 27-NOV-2010 00 /  696:  10.823923
 28-NOV-2010 00 /  697:  10.833556
 29-NOV-2010 00 /  698:  10.842942
 30-NOV-2010 00 /  699:  10.852078
 01-DEC-2010 00 /  700:  10.860961
 02-DEC-2010 00 /  701:  10.869589
 03-DEC-2010 00 /  702:  10.877960
 04-DEC-2010 00 /  703:  10.886071
 05-DEC-2010 00 /  704:  10.893919
 06-DEC-2010 00 /  705:  10.901502
 07-DEC-2010 00 /  706:  10.908818
 08-DEC-2010 00 /  707:  10.915864
 09-DEC-2010 00 /  708:  10.922640
 10-DEC-2010 00 /  709:  10.929141
 11-DEC-2010 00 /  710:  10.935368
 12-DEC-2010 00 /  711:  10.941317
 13-DEC-2010 00 /  712:  10.946988
 14-DEC-2010 00 /  713:  10.952378
 15-DEC-2010 00 /  714:  10.957485
 16-DEC-2010 00 /  715:  10.962309
 17-DEC-2010 00 /  716:  10.966848
 18-DEC-2010 00 /  717:  10.971100
 19-DEC-2010 00 /  718:  10.975065
 20-DEC-2010 00 /  719:  10.978740
 21-DEC-2010 00 /  720:  10.982126
 22-DEC-2010 00 /  721:  10.985220
 23-DEC-2010 00 /  722:  10.988023
 24-DEC-2010 00 /  723:  10.990532
 25-DEC-2010 00 /  724:  10.992749
 26-DEC-2010 00 /  725:  10.994671
 27-DEC-2010 00 /  726:  10.996298
 28-DEC-2010 00 /  727:  10.997630
 29-DEC-2010 00 /  728:  10.998667
 30-DEC-2010 00 /  729:  10.999407
 31-DEC-2010 00 /  730:  10.999852
 01-JAN-2011 00 /  731:  21.000000
 02-JAN-2011 00 /  732:  20.999852
 03-JAN-2011 00 /  733:  20.999407
 04-JAN-2011 00 /  734:  20.998667
 05-JAN-2011 00 /  735:  20.997630
 06-JAN-2011 00 /  736:  20.996298
 07-JAN-2011 00 /  737:  20.994671
 08-JAN-2011 00 /  738:  20.992749
 09-JAN-2011 00 /  739:  20.990532
 10-JAN-2011 00 /  740:  20.988023
 11-JAN-2011 00 /  741:  20.985220
 12-JAN-2011 00 /  742:  20.982126
 13-JAN-2011 00 /  743:  20.978740
 14-JAN-2011 00 /  744:  20.975065
 15-JAN-2011 00 /  745:  20.971100
 16-JAN-2011 00 /  746:  20.966848
 17-JAN-2011 00 /  747:  20.962309
 18-JAN-2011 00 /  748:  20.957485
 19-JAN-2011 00 /  749:  20.952378
 20-JAN-2011 00 /  750:  20.946988
 21-JAN-2011 00 /  751:  20.941317
 22-JAN-2011 00 /  752:  20.935368
 23-JAN-2011 00 /  753:  20.929141
 24-JAN-2011 00 /  754:  20.922640
 25-JAN-2011 00 /  755:  20.915864
 26-JAN-2011 00 /  756:  20.908818
 27-JAN-2011 00 /  757:  20.901502
 28-JAN-2011 00 /  758:  20.893919
 29-JAN-2011 00 /  759:  20.886071
 30-JAN-2011 00 /  760:  20.877960
 31-JAN-2011 00 /  761:  20.869589
 01-FEB-2011 00 /  762:  20.860961
 02-FEB-2011 00 /  763:  20.852078
 03-FEB-2011 00 /  764:  20.842942
 04-FEB-2011 00 /  765:  20.833556
 05-FEB-2011 00 /  766:  20.823923
 06-FEB-2011 00 /  767:  20.814046
 07-FEB-2011 00 /  768:  20.803928
 08-FEB-2011 00 /  769:  20.793572
 09-FEB-2011 00 /  770:  20.782980
 10-FEB-2011 00 /  771:  20.772157
 11-FEB-2011 00 /  772:  20.761104
 12-FEB-2011 00 /  773:  20.749826
 13-FEB-2011 00 /  774:  20.738326
 14-FEB-2011 00 /  775:  20.726608
 15-FEB-2011 00 /  776:  20.714673
 16-FEB-2011 00 /  777:  20.702527
 17-FEB-2011 00 /  778:  20.690173
 18-FEB-2011 00 /  779:  20.677615
 19-FEB-2011 00 /  780:  20.664855
 20-FEB-2011 00 /  781:  20.651899
 21-FEB-2011 00 /  782:  20.638749
 22-FEB-2011 00 /  783:  20.625411
 23-FEB-2011 00 /  784:  20.611886
 24-FEB-2011 00 /  785:  20.598181
 25-FEB-2011 00 /  786:  20.584298
 26-FEB-2011 00 /  787:  20.570242
 27-FEB-2011 00 /  788:  20.556017
 28-FEB-2011 00 /  789:  20.541628
 01-MAR-2011 00 /  790:  20.527078
 02-MAR-2011 00 /  791:  20.512371
 03-MAR-2011 00 /  792:  20.497513
 04-MAR-2011 00 /  793:  20.482508
 05-MAR-2011 00 /  794:  20.467359
 06-MAR-2011 00 /  795:  20.452072
 07-MAR-2011 00 /  796:  20.436651
 08-MAR-2011 00 /  797:  20.421101
 09-MAR-2011 00 /  798:  20.405426
 10-MAR-2011 00 /  799:  20.389630
 11-MAR-2011 00 /  800:  20.373720
 12-MAR-2011 00 /  801:  20.357698
 13-MAR-2011 00 /  802:  20.341571
 14-MAR-2011 00 /  803:  20.325342
 15-MAR-2011 00 /  804:  20.309017
 16-MAR-2011 00 /  805:  20.292600
 17-MAR-2011 00 /  806:  20.276097
 18-MAR-2011 00 /  807:  20.259512
 19-MAR-2011 00 /  808:  20.242850
 20-MAR-2011 00 /  809:  20.226116
 21-MAR-2011 00 /  810:  20.209315
 22-MAR-2011 00 /  811:  20.192452
 23-MAR-2011 00 /  812:  20.175531
 24-MAR-2011 00 /  813:  20.158559
 25-MAR-2011 00 /  814:  20.141540
 26-MAR-2011 00 /  815:  20.124479
 27-MAR-2011 00 /  816:  20.107381
 28-MAR-2011 00 /  817:  20.090252
 29-MAR-2011 00 /  818:  20.073095
 30-MAR-2011 00 /  819:  20.055917
 31-MAR-2011 00 /  820:  20.038722
 01-APR-2011 00 /  821:  20.021516
 02-APR-2011 00 /  822:  20.004304
 03-APR-2011 00 /  823:  19.987090
 04-APR-2011 00 /  824:  19.969880
 05-APR-2011 00 /  825:  19.952679
 06-APR-2011 00 /  826:  19.935492
 07-APR-2011 00 /  827:  19.918324
 08-APR-2011 00 /  828:  19.901180
 09-APR-2011 00 /  829:  19.884065
 10-APR-2011 00 /  830:  19.866985
 11-APR-2011 00 /  831:  19.849945
 12-APR-2011 00 /  832:  19.832948
 13-APR-2011 00 /  833:  19.816002
 14-APR-2011 00 /  834:  19.799109
 15-APR-2011 00 /  835:  19.782277
 16-APR-2011 00 /  836:  19.765509
 17-APR-2011 00 /  837:  19.748810
 18-APR-2011 00 /  838:  19.732186
 19-APR-2011 00 /  839:  19.715641
 20-APR-2011 00 /  840:  19.699180
 21-APR-2011 00 /  841:  19.682809
 22-APR-2011 00 /  842:  19.666531
 23-APR-2011 00 /  843:  19.650353
 24-APR-2011 00 /  844:  19.634277
 25-APR-2011 00 /  845:  19.618311
 26-APR-2011 00 /  846:  19.602457
 27-APR-2011 00 /  847:  19.586721
 28-APR-2011 00 /  848:  19.571108
 29-APR-2011 00 /  849:  19.555622
 30-APR-2011 00 /  850:  19.540267
 01-MAY-2011 00 /  851:  19.525049
 02-MAY-2011 00 /  852:  19.509971
 03-MAY-2011 00 /  853:  19.495039
 04-MAY-2011 00 /  854:  19.480256
 05-MAY-2011 00 /  855:  19.465627
 06-MAY-2011 00 /  856:  19.451157
 07-MAY-2011 00 /  857:  19.436849
 08-MAY-2011 00 /  858:  19.422708
 09-MAY-2011 00 /  859:  19.408739
 10-MAY-2011 00 /  860:  19.394944
 11-MAY-2011 00 /  861:  19.381329
 12-MAY-2011 00 /  862:  19.367897
 13-MAY-2011 00 /  863:  19.354652
 14-MAY-2011 00 /  864:  19.341598
 15-MAY-2011 00 /  865:  19.328740
 16-MAY-2011 00 /  866:  19.316081
 17-MAY-2011 00 /  867:  19.303624
 18-MAY-2011 00 /  868:  19.291373
 19-MAY-2011 00 /  869:  19.279333
 20-MAY-2011 00 /  870:  19.267506
 21-MAY-2011 00 /  871:  19.255896
 22-MAY-2011 00 /  872:  19.244507
 23-MAY-2011 00 /  873:  19.233341
 24-MAY-2011 00 /  874:  19.222403
 25-MAY-2011 00 /  875:  19.211695
 26-MAY-2011 00 /  876:  19.201221
 27-MAY-2011 00 /  877:  19.190983
 28-MAY-2011 00 /  878:  19.180985
 29-MAY-2011 00 /  879:  19.171230
 30-MAY-2011 00 /  880:  19.161720
 31-MAY-2011 00 /  881:  19.152459
 01-JUN-2011 00 /  882:  19.143449
 02-JUN-2011 00 /  883:  19.134693
 03-JUN-2011 00 /  884:  19.126193
 04-JUN-2011 00 /  885:  19.117952
 05-JUN-2011 00 /  886:  19.109972
 06-JUN-2011 00 /  887:  19.102257
 07-JUN-2011 00 /  888:  19.094807
 08-JUN-2011 00 /  889:  19.087625
 09-JUN-2011 00 /  890:  19.080714
 10-JUN-2011 00 /  891:  19.074075
 11-JUN-2011 00 /  892:  19.067711
 12-JUN-2011 00 /  893:  19.061623
 13-JUN-2011 00 /  894:  19.055812
 14-JUN-2011 00 /  895:  19.050282
 15-JUN-2011 00 /  896:  19.045033
 16-JUN-2011 00 /  897:  19.040067
 17-JUN-2011 00 /  898:  19.035386
 18-JUN-2011 00 /  899:  19.030990
 19-JUN-2011 00 /  900:  19.026882
 20-JUN-2011 00 /  901:  19.023062
 21-JUN-2011 00 /  902:  19.019531
 22-JUN-2011 00 /  903:  19.016291
 23-JUN-2011 00 /  904:  19.013342
 24-JUN-2011 00 /  905:  19.010686
 25-JUN-2011 00 /  906:  19.008323
 26-JUN-2011 00 /  907:  19.006253
 27-JUN-2011 00 /  908:  19.004479
 28-JUN-2011 00 /  909:  19.002999
 29-JUN-2011 00 /  910:  19.001814
 30-JUN-2011 00 /  911:  19.000926
 01-JUL-2011 00 /  912:  19.000333
 02-JUL-2011 00 /  913:  19.000037
 03-JUL-2011 00 /  914:  19.000037
 04-JUL-2011 00 /  915:  19.000333
 05-JUL-2011 00 /  916:  19.000926
 06-JUL-2011 00 /  917:  19.001814
 07-JUL-2011 00 /  918:  19.002999
 08-JUL-2011 00 /  919:  19.004479
 09-JUL-2011 00 /  920:  19.006253
 10-JUL-2011 00 /  921:  19.008323
 11-JUL-2011 00 /  922:  19.010686
 12-JUL-2011 00 /  923:  19.013342
 13-JUL-2011 00 /  924:  19.016291
 14-JUL-2011 00 /  925:  19.019531
 15-JUL-2011 00 /  926:  19.023062
 16-JUL-2011 00 /  927:  19.026882
 17-JUL-2011 00 /  928:  19.030990
 18-JUL-2011 00 /  929:  19.035386
 19-JUL-2011 00 /  930:  19.040067
 20-JUL-2011 00 /  931:  19.045033
 21-JUL-2011 00 /  932:  19.050282
 22-JUL-2011 00 /  933:  19.055812
 23-JUL-2011 00 /  934:  19.061623
 24-JUL-2011 00 /  935:  19.067711
 25-JUL-2011 00 /  936:  19.074075
 26-JUL-2011 00 /  937:  19.080714
 27-JUL-2011 00 /  938:  19.087625
 28-JUL-2011 00 /  939:  19.094807
 29-JUL-2011 00 /  940:  19.102257
 30-JUL-2011 00 /  941:  19.109972
 31-JUL-2011 00 /  942:  19.117952
 01-AUG-2011 00 /  943:  19.126193
 02-AUG-2011 00 /  944:  19.134693
 03-AUG-2011 00 /  945:  19.143449
 04-AUG-2011 00 /  946:  19.152459
 05-AUG-2011 00 /  947:  19.161720
 06-AUG-2011 00 /  948:  19.171230
 07-AUG-2011 00 /  949:  19.180985
 08-AUG-2011 00 /  950:  19.190983
 09-AUG-2011 00 /  951:  19.201221
 10-AUG-2011 00 /  952:  19.211695
 11-AUG-2011 00 /  953:  19.222403
 12-AUG-2011 00 /  954:  19.233341
 13-AUG-2011 00 /  955:  19.244507
 14-AUG-2011 00 /  956:  19.255896
 15-AUG-2011 00 /  957:  19.267506
 16-AUG-2011 00 /  958:  19.279333
 17-AUG-2011 00 /  959:  19.291373
 18-AUG-2011 00 /  960:  19.303624
 19-AUG-2011 00 /  961:  19.316081
 20-AUG-2011 00 /  962:  19.328740
 21-AUG-2011 00 /  963:  19.341598
 22-AUG-2011 00 /  964:  19.354652
 23-AUG-2011 00 /  965:  19.367897
 24-AUG-2011 00 /  966:  19.381329
 25-AUG-2011 00 /  967:  19.394944
 26-AUG-2011 00 /  968:  19.408739
 27-AUG-2011 00 /  969:  19.422708
 28-AUG-2011 00 /  970:  19.436849
 29-AUG-2011 00 /  971:  19.451157
 30-AUG-2011 00 /  972:  19.465627
 31-AUG-2011 00 /  973:  19.480256
 01-SEP-2011 00 /  974:  19.495039
 02-SEP-2011 00 /  975:  19.509971
 03-SEP-2011 00 /  976:  19.525049
 04-SEP-2011 00 /  977:  19.540267
 05-SEP-2011 00 /  978:  19.555622
 06-SEP-2011 00 /  979:  19.571108
 07-SEP-2011 00 /  980:  19.586721
 08-SEP-2011 00 /  981:  19.602457
 09-SEP-2011 00 /  982:  19.618311
 10-SEP-2011 00 /  983:  19.634277
 11-SEP-2011 00 /  984:  19.650353
 12-SEP-2011 00 /  985:  19.666531
 13-SEP-2011 00 /  986:  19.682809
 14-SEP-2011 00 /  987:  19.699180
 15-SEP-2011 00 /  988:  19.715641
 16-SEP-2011 00 /  989:  19.732186
 17-SEP-2011 00 /  990:  19.748810
 18-SEP-2011 00 /  991:  19.765509
 19-SEP-2011 00 /  992:  19.782277
 20-SEP-2011 00 /  993:  19.799109
 21-SEP-2011 00 /  994:  19.816002
 22-SEP-2011 00 /  995:  19.832948
 23-SEP-2011 00 /  996:  19.849945
 24-SEP-2011 00 /  997:  19.866985
 25-SEP-2011 00 /  998:  19.884065
 26-SEP-2011 00 /  999:  19.901180
 27-SEP-2011 00 / 1000:  19.918324
 28-SEP-2011 00 / 1001:  19.935492
 29-SEP-2011 00 / 1002:  19.952679
 30-SEP-2011 00 / 1003:  19.969880
 01-OCT-2011 00 / 1004:  19.987090
 02-OCT-2011 00 / 1005:  20.004304
 03-OCT-2011 00 / 1006:  20.021516
 04-OCT-2011 00 / 1007:  20.038722
 05-OCT-2011 00 / 1008:  20.055917
 06-OCT-2011 00 / 1009:  20.073095
 07-OCT-2011 00 / 1010:  20.090252
 08-OCT-2011 00 / 1011:  20.107381
 09-OCT-2011 00 / 1012:  20.124479
 10-OCT-2011 00 / 1013:  20.141540
 11-OCT-2011 00 / 1014:  20.158559
 12-OCT-2011 00 / 1015:  20.175531
 13-OCT-2011 00 / 1016:  20.192452
 14-OCT-2011 00 / 1017:  20.209315
 15-OCT-2011 00 / 1018:  20.226116
 16-OCT-2011 00 / 1019:  20.242850
 17-OCT-2011 00 / 1020:  20.259512
 18-OCT-2011 00 / 1021:  20.276097
 19-OCT-2011 00 / 1022:  20.292600
 20-OCT-2011 00 / 1023:  20.309017
 21-OCT-2011 00 / 1024:  20.325342
 22-OCT-2011 00 / 1025:  20.341571
 23-OCT-2011 00 / 1026:  20.357698
 24-OCT-2011 00 / 1027:  20.373720
 25-OCT-2011 00 / 1028:  20.389630
 26-OCT-2011 00 / 1029:  20.405426
 27-OCT-2011 00 / 1030:  20.421101
 28-OCT-2011 00 / 1031:  20.436651
 29-OCT-2011 00 / 1032:  20.452072
 30-OCT-2011 00 / 1033:  20.467359
 31-OCT-2011 00 / 1034:  20.482508
 01-NOV-2011 00 / 1035:  20.497513
 02-NOV-2011 00 / 1036:  20.512371
 03-NOV-2011 00 / 1037:  20.527078
 04-NOV-2011 00 / 1038:  20.541628
 05-NOV-2011 00 / 1039:  20.556017
 06-NOV-2011 00 / 1040:  20.570242
 07-NOV-2011 00 / 1041:  20.584298
 08-NOV-2011 00 / 1042:  20.598181
 09-NOV-2011 00 / 1043:  20.611886
 10-NOV-2011 00 / 1044:  20.625411
 11-NOV-2011 00 / 1045:  20.638749
 12-NOV-2011 00 / 1046:  20.651899
 13-NOV-2011 00 / 1047:  20.664855
 14-NOV-2011 00 / 1048:  20.677615
 15-NOV-2011 00 / 1049:  20.690173
 16-NOV-2011 00 / 1050:  20.702527
 17-NOV-2011 00 / 1051:  20.714673
 18-NOV-2011 00 / 1052:  20.726608
 19-NOV-2011 00 / 1053:  20.738326
 20-NOV-2011 00 / 1054:  20.749826
 21-NOV-2011 00 / 1055:  20.761104
 22-NOV-2011 00 / 1056:  20.772157
 23-NOV-2011 00 / 1057:  20.782980
 24-NOV-2011 00 / 1058:  20.793572
 25-NOV-2011 00 / 1059:  20.803928
 26-NOV-2011 00 / 1060:  20.814046
 27-NOV-2011 00 / 1061:  20.823923
 28-NOV-2011 00 / 1062:  20.833556
 29-NOV-2011 00 / 1063:  20.842942
 30-NOV-2011 00 / 1064:  20.852078
 01-DEC-2011 00 / 1065:  20.860961
 02-DEC-2011 00 / 1066:  20.869589
 03-DEC-2011 00 / 1067:  20.877960
 04-DEC-2011 00 / 1068:  20.886071
 05-DEC-2011 00 / 1069:  20.893919
 06-DEC-2011 00 / 1070:  20.901502
 07-DEC-2011 00 / 1071:  20.908818
 08-DEC-2011 00 / 1072:  20.915864
 09-DEC-2011 00 / 1073:  20.922640
 10-DEC-2011 00 / 1074:  20.929141
 11-DEC-2011 00 / 1075:  20.935368
 12-DEC-2011 00 / 1076:  20.941317
 13-DEC-2011 00 / 1077:  20.946988
 14-DEC-2011 00 / 1078:  20.952378
 15-DEC-2011 00 / 1079:  20.957485
 16-DEC-2011 00 / 1080:  20.962309
 17-DEC-2011 00 / 1081:  20.966848
 18-DEC-2011 00 / 1082:  20.971100
 19-DEC-2011 00 / 1083:  20.975065
 20-DEC-2011 00 / 1084:  20.978740
 21-DEC-2011 00 / 1085:  20.982126
 22-DEC-2011 00 / 1086:  20.985220
 23-DEC-2011 00 / 1087:  20.988023
 24-DEC-2011 00 / 1088:  20.990532
 25-DEC-2011 00 / 1089:  20.992749
 26-DEC-2011 00 / 1090:  20.994671
 27-DEC-2011 00 / 1091:  20.996298
 28-DEC-2011 00 / 1092:  20.997630
 29-DEC-2011 00 / 1093:  20.998667
 30-DEC-2011 00 / 1094:  20.999407
 31-DEC-2011 00 / 1095:  20.999852
 01-JAN-2012 00 / 1096:  21.000000
 02-JAN-2012 00 / 1097:       ....
 03-JAN-2012 00 / 1098:       ....
 04-JAN-2012 00 / 1099:       ....
 05-JAN-2012 00 / 1100:       ....
 06-JAN-2012 00 / 1101:       ....
 07-JAN-2012 00 / 1102:       ....
 08-JAN-2012 00 / 1103:       ....
 09-JAN-2012 00 / 1104:       ....
 10-JAN-2012 00 / 1105:       ....
 11-JAN-2012 00 / 1106:       ....
 12-JAN-2012 00 / 1107:       ....
 13-JAN-2012 00 / 1108:       ....
 14-JAN-2012 00 / 1109:       ....
 15-JAN-2012 00 / 1110:       ....
 16-JAN-2012 00 / 1111:       ....
 17-JAN-2012 00 / 1112:       ....
 18-JAN-2012 00 / 1113:       ....
 19-JAN-2012 00 / 1114:       ....
 20-JAN-2012 00 / 1115:       ....
 21-JAN-2012 00 / 1116:       ....
 22-JAN-2012 00 / 1117:       ....
 23-JAN-2012 00 / 1118:       ....
 24-JAN-2012 00 / 1119:       ....
 25-JAN-2012 00 / 1120:       ....
 26-JAN-2012 00 / 1121:       ....
 27-JAN-2012 00 / 1122:       ....
 28-JAN-2012 00 / 1123:       ....
 29-JAN-2012 00 / 1124:       ....
 30-JAN-2012 00 / 1125:       ....
 31-JAN-2012 00 / 1126:       ....
CANCEL DATA /ALL
 
! No more than three overlaps
DEFINE DATA /AGG /T /TOVERLAP=3 /TAXIS=aggtime myagg = data2010.nc, data2009.nc, data2011.nc
LIST /PREC=8 var[L=1:`var,ret=size`:5]
 !-> LIST /PREC=8 var[L=1:1126:5]
             VARIABLE : myvar
                        regrid: 5 day on T
             FILENAME : myagg
             SUBSET   : 226 points (TIME)
 01-JAN-2009 00 /   1:   1.000000
 06-JAN-2009 00 /   2:   0.996298
 11-JAN-2009 00 /   3:   0.985220
 16-JAN-2009 00 /   4:   0.966848
 21-JAN-2009 00 /   5:   0.941317
 26-JAN-2009 00 /   6:   0.908818
 31-JAN-2009 00 /   7:   0.869589
 05-FEB-2009 00 /   8:   0.823923
 10-FEB-2009 00 /   9:   0.772157
 15-FEB-2009 00 /  10:   0.714673
 20-FEB-2009 00 /  11:   0.651899
 25-FEB-2009 00 /  12:   0.584298
 02-MAR-2009 00 /  13:   0.512371
 07-MAR-2009 00 /  14:   0.436651
 12-MAR-2009 00 /  15:   0.357698
 17-MAR-2009 00 /  16:   0.276097
 22-MAR-2009 00 /  17:   0.192452
 27-MAR-2009 00 /  18:   0.107381
 01-APR-2009 00 /  19:   0.021516
 06-APR-2009 00 /  20:  -0.064508
 11-APR-2009 00 /  21:  -0.150055
 16-APR-2009 00 /  22:  -0.234491
 21-APR-2009 00 /  23:  -0.317191
 26-APR-2009 00 /  24:  -0.397543
 01-MAY-2009 00 /  25:  -0.474951
 06-MAY-2009 00 /  26:  -0.548843
 11-MAY-2009 00 /  27:  -0.618671
 16-MAY-2009 00 /  28:  -0.683919
 21-MAY-2009 00 /  29:  -0.744104
 26-MAY-2009 00 /  30:  -0.798779
 31-MAY-2009 00 /  31:  -0.847541
 05-JUN-2009 00 /  32:  -0.890028
 10-JUN-2009 00 /  33:  -0.925925
 15-JUN-2009 00 /  34:  -0.954967
 20-JUN-2009 00 /  35:  -0.976938
 25-JUN-2009 00 /  36:  -0.991677
 30-JUN-2009 00 /  37:  -0.999074
 05-JUL-2009 00 /  38:  -0.999074
 10-JUL-2009 00 /  39:  -0.991677
 15-JUL-2009 00 /  40:  -0.976938
 20-JUL-2009 00 /  41:  -0.954967
 25-JUL-2009 00 /  42:  -0.925925
 30-JUL-2009 00 /  43:  -0.890028
 04-AUG-2009 00 /  44:  -0.847541
 09-AUG-2009 00 /  45:  -0.798779
 14-AUG-2009 00 /  46:  -0.744104
 19-AUG-2009 00 /  47:  -0.683919
 24-AUG-2009 00 /  48:  -0.618671
 29-AUG-2009 00 /  49:  -0.548843
 03-SEP-2009 00 /  50:  -0.474951
 08-SEP-2009 00 /  51:  -0.397543
 13-SEP-2009 00 /  52:  -0.317191
 18-SEP-2009 00 /  53:  -0.234491
 23-SEP-2009 00 /  54:  -0.150055
 28-SEP-2009 00 /  55:  -0.064508
 03-OCT-2009 00 /  56:   0.021516
 08-OCT-2009 00 /  57:   0.107381
 13-OCT-2009 00 /  58:   0.192452
 18-OCT-2009 00 /  59:   0.276097
 23-OCT-2009 00 /  60:   0.357698
 28-OCT-2009 00 /  61:   0.436651
 02-NOV-2009 00 /  62:   0.512371
 07-NOV-2009 00 /  63:   0.584298
 12-NOV-2009 00 /  64:   0.651899
 17-NOV-2009 00 /  65:   0.714673
 22-NOV-2009 00 /  66:   0.772157
 27-NOV-2009 00 /  67:   0.823923
 02-DEC-2009 00 /  68:   0.869589
 07-DEC-2009 00 /  69:   0.908818
 12-DEC-2009 00 /  70:   0.941317
 17-DEC-2009 00 /  71:   0.966848
 22-DEC-2009 00 /  72:   0.985220
 27-DEC-2009 00 /  73:   0.996298
 01-JAN-2010 00 /  74:  11.000000
 06-JAN-2010 00 /  75:  10.996298
 11-JAN-2010 00 /  76:  10.985220
 16-JAN-2010 00 /  77:  10.966848
 21-JAN-2010 00 /  78:  10.941317
 26-JAN-2010 00 /  79:  10.908818
 31-JAN-2010 00 /  80:  10.869589
 05-FEB-2010 00 /  81:  10.823923
 10-FEB-2010 00 /  82:  10.772157
 15-FEB-2010 00 /  83:  10.714673
 20-FEB-2010 00 /  84:  10.651899
 25-FEB-2010 00 /  85:  10.584298
 02-MAR-2010 00 /  86:  10.512371
 07-MAR-2010 00 /  87:  10.436651
 12-MAR-2010 00 /  88:  10.357698
 17-MAR-2010 00 /  89:  10.276097
 22-MAR-2010 00 /  90:  10.192452
 27-MAR-2010 00 /  91:  10.107381
 01-APR-2010 00 /  92:  10.021516
 06-APR-2010 00 /  93:   9.935492
 11-APR-2010 00 /  94:   9.849945
 16-APR-2010 00 /  95:   9.765509
 21-APR-2010 00 /  96:   9.682809
 26-APR-2010 00 /  97:   9.602457
 01-MAY-2010 00 /  98:   9.525049
 06-MAY-2010 00 /  99:   9.451157
 11-MAY-2010 00 / 100:   9.381329
 16-MAY-2010 00 / 101:   9.316081
 21-MAY-2010 00 / 102:   9.255896
 26-MAY-2010 00 / 103:   9.201221
 31-MAY-2010 00 / 104:   9.152459
 05-JUN-2010 00 / 105:   9.109972
 10-JUN-2010 00 / 106:   9.074075
 15-JUN-2010 00 / 107:   9.045033
 20-JUN-2010 00 / 108:   9.023062
 25-JUN-2010 00 / 109:   9.008323
 30-JUN-2010 00 / 110:   9.000926
 05-JUL-2010 00 / 111:   9.000926
 10-JUL-2010 00 / 112:   9.008323
 15-JUL-2010 00 / 113:   9.023062
 20-JUL-2010 00 / 114:   9.045033
 25-JUL-2010 00 / 115:   9.074075
 30-JUL-2010 00 / 116:   9.109972
 04-AUG-2010 00 / 117:   9.152459
 09-AUG-2010 00 / 118:   9.201221
 14-AUG-2010 00 / 119:   9.255896
 19-AUG-2010 00 / 120:   9.316081
 24-AUG-2010 00 / 121:   9.381329
 29-AUG-2010 00 / 122:   9.451157
 03-SEP-2010 00 / 123:   9.525049
 08-SEP-2010 00 / 124:   9.602457
 13-SEP-2010 00 / 125:   9.682809
 18-SEP-2010 00 / 126:   9.765509
 23-SEP-2010 00 / 127:   9.849945
 28-SEP-2010 00 / 128:   9.935492
 03-OCT-2010 00 / 129:  10.021516
 08-OCT-2010 00 / 130:  10.107381
 13-OCT-2010 00 / 131:  10.192452
 18-OCT-2010 00 / 132:  10.276097
 23-OCT-2010 00 / 133:  10.357698
 28-OCT-2010 00 / 134:  10.436651
 02-NOV-2010 00 / 135:  10.512371
 07-NOV-2010 00 / 136:  10.584298
 12-NOV-2010 00 / 137:  10.651899
 17-NOV-2010 00 / 138:  10.714673
 22-NOV-2010 00 / 139:  10.772157
 27-NOV-2010 00 / 140:  10.823923
 02-DEC-2010 00 / 141:  10.869589
 07-DEC-2010 00 / 142:  10.908818
 12-DEC-2010 00 / 143:  10.941317
 17-DEC-2010 00 / 144:  10.966848
 22-DEC-2010 00 / 145:  10.985220
 27-DEC-2010 00 / 146:  10.996298
 01-JAN-2011 00 / 147:  21.000000
 06-JAN-2011 00 / 148:  20.996298
 11-JAN-2011 00 / 149:  20.985220
 16-JAN-2011 00 / 150:  20.966848
 21-JAN-2011 00 / 151:  20.941317
 26-JAN-2011 00 / 152:  20.908818
 31-JAN-2011 00 / 153:  20.869589
 05-FEB-2011 00 / 154:  20.823923
 10-FEB-2011 00 / 155:  20.772157
 15-FEB-2011 00 / 156:  20.714673
 20-FEB-2011 00 / 157:  20.651899
 25-FEB-2011 00 / 158:  20.584298
 02-MAR-2011 00 / 159:  20.512371
 07-MAR-2011 00 / 160:  20.436651
 12-MAR-2011 00 / 161:  20.357698
 17-MAR-2011 00 / 162:  20.276097
 22-MAR-2011 00 / 163:  20.192452
 27-MAR-2011 00 / 164:  20.107381
 01-APR-2011 00 / 165:  20.021516
 06-APR-2011 00 / 166:  19.935492
 11-APR-2011 00 / 167:  19.849945
 16-APR-2011 00 / 168:  19.765509
 21-APR-2011 00 / 169:  19.682809
 26-APR-2011 00 / 170:  19.602457
 01-MAY-2011 00 / 171:  19.525049
 06-MAY-2011 00 / 172:  19.451157
 11-MAY-2011 00 / 173:  19.381329
 16-MAY-2011 00 / 174:  19.316081
 21-MAY-2011 00 / 175:  19.255896
 26-MAY-2011 00 / 176:  19.201221
 31-MAY-2011 00 / 177:  19.152459
 05-JUN-2011 00 / 178:  19.109972
 10-JUN-2011 00 / 179:  19.074075
 15-JUN-2011 00 / 180:  19.045033
 20-JUN-2011 00 / 181:  19.023062
 25-JUN-2011 00 / 182:  19.008323
 30-JUN-2011 00 / 183:  19.000926
 05-JUL-2011 00 / 184:  19.000926
 10-JUL-2011 00 / 185:  19.008323
 15-JUL-2011 00 / 186:  19.023062
 20-JUL-2011 00 / 187:  19.045033
 25-JUL-2011 00 / 188:  19.074075
 30-JUL-2011 00 / 189:  19.109972
 04-AUG-2011 00 / 190:  19.152459
 09-AUG-2011 00 / 191:  19.201221
 14-AUG-2011 00 / 192:  19.255896
 19-AUG-2011 00 / 193:  19.316081
 24-AUG-2011 00 / 194:  19.381329
 29-AUG-2011 00 / 195:  19.451157
 03-SEP-2011 00 / 196:  19.525049
 08-SEP-2011 00 / 197:  19.602457
 13-SEP-2011 00 / 198:  19.682809
 18-SEP-2011 00 / 199:  19.765509
 23-SEP-2011 00 / 200:  19.849945
 28-SEP-2011 00 / 201:  19.935492
 03-OCT-2011 00 / 202:  20.021516
 08-OCT-2011 00 / 203:  20.107381
 13-OCT-2011 00 / 204:  20.192452
 18-OCT-2011 00 / 205:  20.276097
 23-OCT-2011 00 / 206:  20.357698
 28-OCT-2011 00 / 207:  20.436651
 02-NOV-2011 00 / 208:  20.512371
 07-NOV-2011 00 / 209:  20.584298
 12-NOV-2011 00 / 210:  20.651899
 17-NOV-2011 00 / 211:  20.714673
 22-NOV-2011 00 / 212:  20.772157
 27-NOV-2011 00 / 213:  20.823923
 02-DEC-2011 00 / 214:  20.869589
 07-DEC-2011 00 / 215:  20.908818
 12-DEC-2011 00 / 216:  20.941317
 17-DEC-2011 00 / 217:  20.966848
 22-DEC-2011 00 / 218:  20.985220
 27-DEC-2011 00 / 219:  20.996298
 01-JAN-2012 00 / 220:  21.000000
 06-JAN-2012 00 / 221:       ....
 11-JAN-2012 00 / 222:       ....
 16-JAN-2012 00 / 223:       ....
 21-JAN-2012 00 / 224:       ....
 26-JAN-2012 00 / 225:       ....
 31-JAN-2012 00 / 226:       ....
CANCEL DATA /ALL
 
SET MODE IGNORE
 
! Standard time aggregation fails
DEFINE DATA /AGG /T myagg = data2010.nc, data2009.nc, data2011.nc
 
! Without /TOVERLAP, @XACT fails (defaults to @ASN if permitted)
DEFINE DATA /AGG /T /TAXIS=aggtime@XACT myagg = data2010.nc, data2009.nc, data2011.nc
 
! Without /TOVERLAP, @BIN fails (defaults to @ASN if permitted)
DEFINE DATA /AGG /T /TAXIS=aggtime@BIN myagg = data2010.nc, data2009.nc, data2011.nc
 
! More overlaps than allowed
DEFINE DATA /AGG /T /TOVERLAP=2 /TAXIS=aggtime@XACT myagg = data2010.nc, data2009.nc, data2011.nc
 
! More overlaps than allowed
DEFINE DATA /AGG /T /TOVERLAP=2 /TAXIS=aggtime@BIN myagg = data2010.nc, data2009.nc, data2011.nc
 
CANCEL MODE IGNORE
 
*** Running ferret script: bn_samplexyzt.jnl
! bn_samplexyzt
! Ansley Manke 3/8/2019
 
show function samplexyzt
SAMPLEXYZT(DAT_TO_SAMPLE,XPTS,YPTS,ZPTS,TPTS)
    Returns data sampled at a set of points in X,Y,Z,T, using linear interpolation
    DAT_TO_SAMPLE: variable (x,y,z,t,e,f) to sample
    XPTS: X values of sample points
    YPTS: Y values of sample points
    ZPTS: Z values of sample points
    TPTS: T values of sample points
 
use gt4d011.cdf
let xpts = {-131,-132.4, -126.1}
let ypts = {0.5, -0.2, -2.1}
let zpts = {10,30,80}
let tpts = {23800, 24500, 25700}
 
list/prec=7 samplexyzt(u,xpts, ypts,zpts, tpts)
             VARIABLE : SAMPLEXYZT(U,XPTS, YPTS,ZPTS, TPTS)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 points (X)
 1   / 1:  38.04994
 2   / 2:  62.96714
 3   / 3:  26.76408
 
! Compare result at a constant z location with the SAMPLEXYT function
 
set mode interpolate
 
let zpts = {50, 50, 50}
list/prec=7 samplexyzt(u,xpts, ypts, zpts, tpts)
             VARIABLE : SAMPLEXYZT(U,XPTS, YPTS, ZPTS, TPTS)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 points (X)
 1   / 1:  35.03247
 2   / 2:  56.87335
 3   / 3:  41.07122
list/prec=7 samplexyt(u[z=50], xpts, ypts, tpts)
             VARIABLE : SAMPLEXYT(U[Z=50], XPTS, YPTS, TPTS)
             FILENAME : gt4d011.cdf
             SUBSET   : 3 points (X)
 1   / 1:  35.03247
 2   / 2:  56.87335
 3   / 3:  41.07122
set mode/last interpolate
*** Running ferret script: bn_sample_multi.jnl
! bn_sample_multi
! See the big discussion in issue 1924
!  4/8/2019  ACM
! 4/11/2018  more tests, can't sample 1-D var in another direction
! 4/12/2018  Both arguments must have an axis in the sample-direction
!
! Tests for functions samplei_multi, etc as discussed in ticket 1924
! Same tests in all directions
 
define axis/e=11:15:1 aax_a
define axis/e=1:4:1 aax_b
define axis/x=0:1:1 sax
let a_1 = _e[ge=aax_a]^2
let a_2 = (4-x[gx=sax])^2
let a_2d = a_1 + a_2
let b_1 = 5-_e[ge=aax_b]
let b_2 = 1+x[gx=sax]
let b_2d = b_1 + b_2 - 1
list a_2d
             VARIABLE : A_1 + A_2
             SUBSET   : 2 by 5 points (X-E)
              0      1    
              1      2
 11   / 1:  137.0  130.0
 12   / 2:  160.0  153.0
 13   / 3:  185.0  178.0
 14   / 4:  212.0  205.0
 15   / 5:  241.0  234.0
list b_2d
             VARIABLE : B_1 + B_2 - 1
             SUBSET   : 2 by 4 points (X-E)
             0      1    
             1      2
 1   / 1:  4.000  5.000
 2   / 2:  3.000  4.000
 3   / 3:  2.000  3.000
 4   / 4:  1.000  2.000
list samplem_multi(a_2d, b_2d)
             VARIABLE : SAMPLEM_MULTI(A_2D, B_2D)
             SUBSET   : 2 by 4 points (X-E)
             0      1    
             1      2
 1   / 1:  212.0  234.0
 2   / 2:  185.0  205.0
 3   / 3:  160.0  178.0
 4   / 4:  137.0  153.0
 
! SAMPLEM_MULTI agrees with SAMPLEM for a 1D index list  in the E direction
list b_1
             VARIABLE : 5-_E[GE=AAX_B]
             SUBSET   : 4 points (E)
 1   / 1:  4.000
 2   / 2:  3.000
 3   / 3:  2.000
 4   / 4:  1.000
list samplem (a_2d, b_1)
             VARIABLE : SAMPLEM (A_2D, B_1)
             SUBSET   : 2 by 4 points (X-E)
             0      1    
             1      2
 1   / 1:  212.0  205.0
 2   / 2:  185.0  178.0
 3   / 3:  160.0  153.0
 4   / 4:  137.0  130.0
list samplem_multi (a_2d, b_1)
             VARIABLE : SAMPLEM_MULTI (A_2D, B_1)
             SUBSET   : 2 by 4 points (X-E)
             0      1    
             1      2
 1   / 1:  212.0  205.0
 2   / 2:  185.0  178.0
 3   / 3:  160.0  153.0
 4   / 4:  137.0  130.0
 
! Intentional errors
set mode ignore_error
 
! Cannot sample the x-e data along t
 
define axis/t=3:4:1 sax2
let b_t = t[gt=sax2]
list samplem_multi(a_2d, b_t)
 
! Cannot sample the x data along e, but can if we add an e axis to arg 1
 
list samplem_multi(a_2, b_1)
list samplem_multi(a_2+esequence(0), b_1)
             VARIABLE : SAMPLEM_MULTI(A_2+ESEQUENCE(0), B_1)
             SUBSET   : 2 by 4 points (X-E)
             0      1    
             1      2
 1   / 1:   ....   ....
 2   / 2:   ....   ....
 3   / 3:   ....   ....
 4   / 4:  16.00   9.00
list samplem_multi(a_2+0*esequence({3,1,2}), b_1)
             VARIABLE : SAMPLEM_MULTI(A_2+0*ESEQUENCE({3,1,2}), B_1)
             SUBSET   : 2 by 4 points (X-E)
             0      1    
             1      2
 1   / 1:   ....   ....
 2   / 2:  16.00   9.00
 3   / 3:  16.00   9.00
 4   / 4:  16.00   9.00
 
set mode/last ignore_error
 
! Not an error: The grid of the INDEX var in non-sample directions
! must be conformable with the grid of to-be-sampled.
 
define axis/x=0:3:1 bigax
let c_2 = 1+x[gx=bigax]
let c_2d = c_2 + b_1
list c_2d
             VARIABLE : C_2 + B_1
             SUBSET   : 4 by 4 points (X-E)
             0      1      2      3    
             1      2      3      4
 1   / 1:  5.000  6.000  7.000  8.000
 2   / 2:  4.000  5.000  6.000  7.000
 3   / 3:  3.000  4.000  5.000  6.000
 4   / 4:  2.000  3.000  4.000  5.000
list samplem_multi(a_2d, c_2d)
             VARIABLE : SAMPLEM_MULTI(A_2D, C_2D)
             SUBSET   : 2 by 4 points (X-E)
             0      1    
             1      2
 1   / 1:  241.0   ....
 2   / 2:  212.0  234.0
 3   / 3:  185.0  205.0
 4   / 4:  160.0  178.0
 
! Monte Carlo resamples of a dataset, as outlined in #1924
! Sample E data using an M-N st of indices.
 
let data = ESEQUENCE({59,91,26,37,72,43,87})
let ndat = `data,r=msize`
 !-> DEFINE VARIABLE ndat = 7
let na = 8
let vals = _n[n=1:`na`]
 !-> DEFINE VARIABLE vals = _n[n=1:8]
let samp_indices = 1 + int(ndat * randu(_e[ge=data, m=1:`ndat`]+vals))
 !-> DEFINE VARIABLE samp_indices = 1 + int(ndat * randu(_e[ge=data, m=1:7]+vals))
let bootstrap_resamples = samplem_multi(data+0*samp_indices, samp_indices)
 
list data
             VARIABLE : ESEQUENCE({59,91,26,37,72,43,87})
             SUBSET   : 7 points (E)
 1   / 1:  59.00
 2   / 2:  91.00
 3   / 3:  26.00
 4   / 4:  37.00
 5   / 5:  72.00
 6   / 6:  43.00
 7   / 7:  87.00
list samp_indices
             VARIABLE : 1 + INT(NDAT * RANDU(_E[GE=DATA, M=1:7]+VALS))
             SUBSET   : 7 by 8 points (E-F)
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  7.000  4.000  1.000  2.000  6.000  2.000  7.000
 2   / 2:  4.000  4.000  7.000  3.000  7.000  7.000  4.000
 3   / 3:  5.000  7.000  4.000  1.000  1.000  5.000  6.000
 4   / 4:  6.000  6.000  1.000  2.000  3.000  7.000  4.000
 5   / 5:  1.000  2.000  6.000  2.000  5.000  5.000  2.000
 6   / 6:  6.000  4.000  6.000  7.000  3.000  5.000  3.000
 7   / 7:  4.000  1.000  6.000  4.000  2.000  6.000  7.000
 8   / 8:  2.000  7.000  7.000  1.000  3.000  4.000  7.000
list bootstrap_resamples
             VARIABLE : SAMPLEM_MULTI(DATA+0*SAMP_INDICES, SAMP_INDICES)
             SUBSET   : 7 by 8 points (E-F)
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  87.00  37.00  59.00  91.00  43.00  91.00  87.00
 2   / 2:  37.00  37.00  87.00  26.00  87.00  87.00  37.00
 3   / 3:  72.00  87.00  37.00  59.00  59.00  72.00  43.00
 4   / 4:  43.00  43.00  59.00  91.00  26.00  87.00  37.00
 5   / 5:  59.00  91.00  43.00  91.00  72.00  72.00  91.00
 6   / 6:  43.00  37.00  43.00  87.00  26.00  72.00  26.00
 7   / 7:  37.00  59.00  43.00  37.00  91.00  43.00  87.00
 8   / 8:  91.00  87.00  87.00  59.00  26.00  37.00  87.00
 
! Sample 2D data in this way, samples in M as above for each Z
 
let data2d = data + z[z=0:6:6]
list data2d
             VARIABLE : DATA + Z[Z=0:6:6]
             SUBSET   : 2 by 7 points (Z-E)
             0      6    
             1      2
 1   / 1:  59.00  65.00
 2   / 2:  91.00  97.00
 3   / 3:  26.00  32.00
 4   / 4:  37.00  43.00
 5   / 5:  72.00  78.00
 6   / 6:  43.00  49.00
 7   / 7:  87.00  93.00
 
let data2d_samp = samplem_multi (data2d, samp_indices)
list/z=1 data2d_samp !same as the 1-d sample of "data" just above
             VARIABLE : SAMPLEM_MULTI (DATA2D, SAMP_INDICES)
             SUBSET   : 7 by 8 points (E-F)
             Z        : 0
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  87.00  37.00  59.00  91.00  43.00  91.00  87.00
 2   / 2:  37.00  37.00  87.00  26.00  87.00  87.00  37.00
 3   / 3:  72.00  87.00  37.00  59.00  59.00  72.00  43.00
 4   / 4:  43.00  43.00  59.00  91.00  26.00  87.00  37.00
 5   / 5:  59.00  91.00  43.00  91.00  72.00  72.00  91.00
 6   / 6:  43.00  37.00  43.00  87.00  26.00  72.00  26.00
 7   / 7:  37.00  59.00  43.00  37.00  91.00  43.00  87.00
 8   / 8:  91.00  87.00  87.00  59.00  26.00  37.00  87.00
list/z=6 data2d_samp
             VARIABLE : SAMPLEM_MULTI (DATA2D, SAMP_INDICES)
             SUBSET   : 7 by 8 points (E-F)
             Z        : 6
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  93.00  43.00  65.00  97.00  49.00  97.00  93.00
 2   / 2:  43.00  43.00  93.00  32.00  93.00  93.00  43.00
 3   / 3:  78.00  93.00  43.00  65.00  65.00  78.00  49.00
 4   / 4:  49.00  49.00  65.00  97.00  32.00  93.00  43.00
 5   / 5:  65.00  97.00  49.00  97.00  78.00  78.00  97.00
 6   / 6:  49.00  43.00  49.00  93.00  32.00  78.00  32.00
 7   / 7:  43.00  65.00  49.00  43.00  97.00  49.00  93.00
 8   / 8:  97.00  93.00  93.00  65.00  32.00  43.00  93.00
 
! SAMPLEI_multi
 
define axis/x=11:15:1 aax_a
define axis/x=1:4:1 aax_b
define axis/y=0:1:1 sax
let a_1 = x[gx=aax_a]^2
let a_2 = (4-y[gy=sax])^2
let a_2d = a_1 + a_2
let b_1 = 5-x[gx=aax_b]
let b_2 = 1+y[gy=sax]
let b_2d = b_1 + b_2 - 1
list samplei_multi(a_2d, b_2d)
             VARIABLE : SAMPLEI_MULTI(A_2D, B_2D)
             SUBSET   : 4 by 2 points (X-Y)
             1      2      3      4    
             1      2      3      4
 0   / 1:  212.0  185.0  160.0  137.0
 1   / 2:  234.0  205.0  178.0  153.0
list samplei_multi(a_2d, b_1)
             VARIABLE : SAMPLEI_MULTI(A_2D, B_1)
             SUBSET   : 4 by 2 points (X-Y)
             1      2      3      4    
             1      2      3      4
 0   / 1:  212.0  185.0  160.0  137.0
 1   / 2:  205.0  178.0  153.0  130.0
 
! Intentional errors
set mode ignore_error
 
! Cannot sample the x-y data along t
 
define axis/t=3:4:1 sax2
let b_t = t[gt=sax2]
list samplei_multi(a_2d, b_t)
 
! Cannot sample the y data along x, but can if we add an x axis to arg 1
 
list samplei_multi(a_2, b_1)
list samplei_multi(a_2+xsequence(0), b_1)
             VARIABLE : SAMPLEI_MULTI(A_2+XSEQUENCE(0), B_1)
             SUBSET   : 4 by 2 points (X-Y)
             1      2      3      4    
             1      2      3      4
 0   / 1:   ....   ....   ....  16.00
 1   / 2:   ....   ....   ....   9.00
list samplei_multi(a_2+0*xsequence({3,1,2}), b_1)
             VARIABLE : SAMPLEI_MULTI(A_2+0*XSEQUENCE({3,1,2}), B_1)
             SUBSET   : 4 by 2 points (X-Y)
             1      2      3      4    
             1      2      3      4
 0   / 1:   ....  16.00  16.00  16.00
 1   / 2:   ....   9.00   9.00   9.00
 
set mode/last ignore_error
 
! Not an error: The grid of the INDEX var in non-sample directions
! must be conformable with the grid of to-be-sampled.
 
define axis/y=0:3:1 bigax
let c_2 = 1+y[gy=bigax]
let c_2d = c_2 + b_1
list c_2d
             VARIABLE : C_2 + B_1
             SUBSET   : 4 by 4 points (X-Y)
             1      2      3      4    
             1      2      3      4
 0   / 1:  5.000  4.000  3.000  2.000
 1   / 2:  6.000  5.000  4.000  3.000
 2   / 3:  7.000  6.000  5.000  4.000
 3   / 4:  8.000  7.000  6.000  5.000
list samplei_multi(a_2d, c_2d)
             VARIABLE : SAMPLEI_MULTI(A_2D, C_2D)
             SUBSET   : 4 by 2 points (X-Y)
             1      2      3      4    
             1      2      3      4
 0   / 1:  241.0  212.0  185.0  160.0
 1   / 2:   ....  234.0  205.0  178.0
 
! Monte Carlo resamples of a dataset, as outlined in #1924
! Sample I data using an I-M st of indices.
 
let data = {59,91,26,37,72,43,87}
let ndat = `data,r=isize`
 !-> DEFINE VARIABLE ndat = 7
let na = 8
let vals = _m[m=1:`na`]
 !-> DEFINE VARIABLE vals = _m[m=1:8]
let samp_indices = 1 + int(ndat * randu(x[gx=data,i=1:`ndat`]+vals))
 !-> DEFINE VARIABLE samp_indices = 1 + int(ndat * randu(x[gx=data,i=1:7]+vals))
let bootstrap_resamples = samplei_multi(data+0*samp_indices, samp_indices)
 
list data
             VARIABLE : {59,91,26,37,72,43,87}
             SUBSET   : 7 points (X)
 1   / 1:  59.00
 2   / 2:  91.00
 3   / 3:  26.00
 4   / 4:  37.00
 5   / 5:  72.00
 6   / 6:  43.00
 7   / 7:  87.00
list samp_indices
             VARIABLE : 1 + INT(NDAT * RANDU(X[GX=DATA,I=1:7]+VALS))
             SUBSET   : 7 by 8 points (X-E)
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  7.000  4.000  1.000  2.000  6.000  2.000  7.000
 2   / 2:  4.000  4.000  7.000  3.000  7.000  7.000  4.000
 3   / 3:  5.000  7.000  4.000  1.000  1.000  5.000  6.000
 4   / 4:  6.000  6.000  1.000  2.000  3.000  7.000  4.000
 5   / 5:  1.000  2.000  6.000  2.000  5.000  5.000  2.000
 6   / 6:  6.000  4.000  6.000  7.000  3.000  5.000  3.000
 7   / 7:  4.000  1.000  6.000  4.000  2.000  6.000  7.000
 8   / 8:  2.000  7.000  7.000  1.000  3.000  4.000  7.000
list bootstrap_resamples
             VARIABLE : SAMPLEI_MULTI(DATA+0*SAMP_INDICES, SAMP_INDICES)
             SUBSET   : 7 by 8 points (X-E)
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  87.00  37.00  59.00  91.00  43.00  91.00  87.00
 2   / 2:  37.00  37.00  87.00  26.00  87.00  87.00  37.00
 3   / 3:  72.00  87.00  37.00  59.00  59.00  72.00  43.00
 4   / 4:  43.00  43.00  59.00  91.00  26.00  87.00  37.00
 5   / 5:  59.00  91.00  43.00  91.00  72.00  72.00  91.00
 6   / 6:  43.00  37.00  43.00  87.00  26.00  72.00  26.00
 7   / 7:  37.00  59.00  43.00  37.00  91.00  43.00  87.00
 8   / 8:  91.00  87.00  87.00  59.00  26.00  37.00  87.00
 
! Sample 2D data in this way, samples in I for each Z
 
let data2d = data + z[z=0:6:6]
list data2d
             VARIABLE : DATA + Z[Z=0:6:6]
             SUBSET   : 7 by 2 points (X-Z)
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 0   / 1:  59.00  91.00  26.00  37.00  72.00  43.00  87.00
 6   / 2:  65.00  97.00  32.00  43.00  78.00  49.00  93.00
 
let data2d_samp = samplei_multi (data2d, samp_indices)
list/z=1 data2d_samp !same as the 1-d sample of "data" just above
             VARIABLE : SAMPLEI_MULTI (DATA2D, SAMP_INDICES)
             SUBSET   : 7 by 8 points (X-E)
             Z        : 0
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  87.00  37.00  59.00  91.00  43.00  91.00  87.00
 2   / 2:  37.00  37.00  87.00  26.00  87.00  87.00  37.00
 3   / 3:  72.00  87.00  37.00  59.00  59.00  72.00  43.00
 4   / 4:  43.00  43.00  59.00  91.00  26.00  87.00  37.00
 5   / 5:  59.00  91.00  43.00  91.00  72.00  72.00  91.00
 6   / 6:  43.00  37.00  43.00  87.00  26.00  72.00  26.00
 7   / 7:  37.00  59.00  43.00  37.00  91.00  43.00  87.00
 8   / 8:  91.00  87.00  87.00  59.00  26.00  37.00  87.00
list/z=6 data2d_samp
             VARIABLE : SAMPLEI_MULTI (DATA2D, SAMP_INDICES)
             SUBSET   : 7 by 8 points (X-E)
             Z        : 6
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  93.00  43.00  65.00  97.00  49.00  97.00  93.00
 2   / 2:  43.00  43.00  93.00  32.00  93.00  93.00  43.00
 3   / 3:  78.00  93.00  43.00  65.00  65.00  78.00  49.00
 4   / 4:  49.00  49.00  65.00  97.00  32.00  93.00  43.00
 5   / 5:  65.00  97.00  49.00  97.00  78.00  78.00  97.00
 6   / 6:  49.00  43.00  49.00  93.00  32.00  78.00  32.00
 7   / 7:  43.00  65.00  49.00  43.00  97.00  49.00  93.00
 8   / 8:  97.00  93.00  93.00  65.00  32.00  43.00  93.00
 
! SAMPLJ_multi
 
define axis/y=11:15:1 aax_a
define axis/y=1:4:1 aax_b
define axis/x=0:1:1 sax
let a_1 = y[gy=aax_a]^2
let a_2 = (4-x[gx=sax])^2
let a_2d = a_1 + a_2
let b_1 = 5-y[gy=aax_b]
let b_2 = 1+x[gx=sax]
let b_2d = b_1 + b_2 - 1
list samplej_multi(a_2d, b_2d)
             VARIABLE : SAMPLEJ_MULTI(A_2D, B_2D)
             SUBSET   : 2 by 4 points (X-Y)
             0      1    
             1      2
 1   / 1:  212.0  234.0
 2   / 2:  185.0  205.0
 3   / 3:  160.0  178.0
 4   / 4:  137.0  153.0
list samplej_multi(a_2d, b_1)
             VARIABLE : SAMPLEJ_MULTI(A_2D, B_1)
             SUBSET   : 2 by 4 points (X-Y)
             0      1    
             1      2
 1   / 1:  212.0  205.0
 2   / 2:  185.0  178.0
 3   / 3:  160.0  153.0
 4   / 4:  137.0  130.0
 
! Intentional errors
set mode ignore_error
 
! Cannot sample the x-y data along t
 
define axis/t=3:4:1 sax2
let b_t = t[gt=sax2]
list samplej_multi(a_2d, b_t)
 
! Cannot sample the x data along y, but can if we add a y axis to arg 1
 
list samplej_multi(a_2, b_1)
list samplej_multi(a_2+ysequence(0), b_1)
             VARIABLE : SAMPLEJ_MULTI(A_2+YSEQUENCE(0), B_1)
             SUBSET   : 2 by 4 points (X-Y)
             0      1    
             1      2
 1   / 1:   ....   ....
 2   / 2:   ....   ....
 3   / 3:   ....   ....
 4   / 4:  16.00   9.00
list samplej_multi(a_2+0*ysequence({3,1,2}), b_1)
             VARIABLE : SAMPLEJ_MULTI(A_2+0*YSEQUENCE({3,1,2}), B_1)
             SUBSET   : 2 by 4 points (X-Y)
             0      1    
             1      2
 1   / 1:   ....   ....
 2   / 2:  16.00   9.00
 3   / 3:  16.00   9.00
 4   / 4:  16.00   9.00
 
set mode/last ignore_error
 
! Not an error: The grid of the INDEX var in non-sample directions
! must be conformable with the grid of to-be-sampled.
 
define axis/x=0:3:1 bigax
let c_2 = 1+x[gx=bigax]
let c_2d = c_2 + b_1
list c_2d
             VARIABLE : C_2 + B_1
             SUBSET   : 4 by 4 points (X-Y)
             0      1      2      3    
             1      2      3      4
 1   / 1:  5.000  6.000  7.000  8.000
 2   / 2:  4.000  5.000  6.000  7.000
 3   / 3:  3.000  4.000  5.000  6.000
 4   / 4:  2.000  3.000  4.000  5.000
list samplej_multi(a_2d, c_2d)
             VARIABLE : SAMPLEJ_MULTI(A_2D, C_2D)
             SUBSET   : 2 by 4 points (X-Y)
             0      1    
             1      2
 1   / 1:  241.0   ....
 2   / 2:  212.0  234.0
 3   / 3:  185.0  205.0
 4   / 4:  160.0  178.0
 
! Monte Carlo resamples of a dataset, as outlined in #1924
! Sample Y data using an Y-N st of indices.
 
let data = YSEQUENCE({59,91,26,37,72,43,87})
let ndat = `data,r=jsize`
 !-> DEFINE VARIABLE ndat = 7
let na = 8
let vals = _n[n=1:`na`]
 !-> DEFINE VARIABLE vals = _n[n=1:8]
let samp_indices = 1 + int(ndat * randu(_y[gy=data, j=1:`ndat`]+vals))
 !-> DEFINE VARIABLE samp_indices = 1 + int(ndat * randu(_y[gy=data, j=1:7]+vals))
let bootstrap_resamples = samplej_multi(data+0*samp_indices, samp_indices)
 
list data
             VARIABLE : YSEQUENCE({59,91,26,37,72,43,87})
             SUBSET   : 7 points (Y)
 1   / 1:  59.00
 2   / 2:  91.00
 3   / 3:  26.00
 4   / 4:  37.00
 5   / 5:  72.00
 6   / 6:  43.00
 7   / 7:  87.00
list samp_indices
             VARIABLE : 1 + INT(NDAT * RANDU(_Y[GY=DATA, J=1:7]+VALS))
             SUBSET   : 7 by 8 points (Y-F)
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  7.000  4.000  1.000  2.000  6.000  2.000  7.000
 2   / 2:  4.000  4.000  7.000  3.000  7.000  7.000  4.000
 3   / 3:  5.000  7.000  4.000  1.000  1.000  5.000  6.000
 4   / 4:  6.000  6.000  1.000  2.000  3.000  7.000  4.000
 5   / 5:  1.000  2.000  6.000  2.000  5.000  5.000  2.000
 6   / 6:  6.000  4.000  6.000  7.000  3.000  5.000  3.000
 7   / 7:  4.000  1.000  6.000  4.000  2.000  6.000  7.000
 8   / 8:  2.000  7.000  7.000  1.000  3.000  4.000  7.000
list bootstrap_resamples
             VARIABLE : SAMPLEJ_MULTI(DATA+0*SAMP_INDICES, SAMP_INDICES)
             SUBSET   : 7 by 8 points (Y-F)
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  87.00  37.00  59.00  91.00  43.00  91.00  87.00
 2   / 2:  37.00  37.00  87.00  26.00  87.00  87.00  37.00
 3   / 3:  72.00  87.00  37.00  59.00  59.00  72.00  43.00
 4   / 4:  43.00  43.00  59.00  91.00  26.00  87.00  37.00
 5   / 5:  59.00  91.00  43.00  91.00  72.00  72.00  91.00
 6   / 6:  43.00  37.00  43.00  87.00  26.00  72.00  26.00
 7   / 7:  37.00  59.00  43.00  37.00  91.00  43.00  87.00
 8   / 8:  91.00  87.00  87.00  59.00  26.00  37.00  87.00
 
! Sample 2D data in this way, samples in M as above for each Z
 
let data2d = data + z[z=0:6:6]
list data2d
             VARIABLE : DATA + Z[Z=0:6:6]
             SUBSET   : 7 by 2 points (Y-Z)
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 0   / 1:  59.00  91.00  26.00  37.00  72.00  43.00  87.00
 6   / 2:  65.00  97.00  32.00  43.00  78.00  49.00  93.00
 
let data2d_samp = samplej_multi (data2d, samp_indices)
list/z=1 data2d_samp !same as the 1-d sample of "data" just above
             VARIABLE : SAMPLEJ_MULTI (DATA2D, SAMP_INDICES)
             SUBSET   : 7 by 8 points (Y-F)
             Z        : 0
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  87.00  37.00  59.00  91.00  43.00  91.00  87.00
 2   / 2:  37.00  37.00  87.00  26.00  87.00  87.00  37.00
 3   / 3:  72.00  87.00  37.00  59.00  59.00  72.00  43.00
 4   / 4:  43.00  43.00  59.00  91.00  26.00  87.00  37.00
 5   / 5:  59.00  91.00  43.00  91.00  72.00  72.00  91.00
 6   / 6:  43.00  37.00  43.00  87.00  26.00  72.00  26.00
 7   / 7:  37.00  59.00  43.00  37.00  91.00  43.00  87.00
 8   / 8:  91.00  87.00  87.00  59.00  26.00  37.00  87.00
list/z=6 data2d_samp
             VARIABLE : SAMPLEJ_MULTI (DATA2D, SAMP_INDICES)
             SUBSET   : 7 by 8 points (Y-F)
             Z        : 6
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  93.00  43.00  65.00  97.00  49.00  97.00  93.00
 2   / 2:  43.00  43.00  93.00  32.00  93.00  93.00  43.00
 3   / 3:  78.00  93.00  43.00  65.00  65.00  78.00  49.00
 4   / 4:  49.00  49.00  65.00  97.00  32.00  93.00  43.00
 5   / 5:  65.00  97.00  49.00  97.00  78.00  78.00  97.00
 6   / 6:  49.00  43.00  49.00  93.00  32.00  78.00  32.00
 7   / 7:  43.00  65.00  49.00  43.00  97.00  49.00  93.00
 8   / 8:  97.00  93.00  93.00  65.00  32.00  43.00  93.00
 
! SAMPLEK_MULTI
 
define axis/z=11:15:1 aax_a
define axis/z=1:4:1 aax_b
define axis/x=0:1:1 sax
let a_1 = z[gz=aax_a]^2
let a_2 = (4-x[gx=sax])^2
let a_2d = a_1 + a_2
let b_1 = 5-z[gz=aax_b]
let b_2 = 1+x[gx=sax]
let b_2d = b_1 + b_2 - 1
list samplek_multi(a_2d, b_2d)
             VARIABLE : SAMPLEK_MULTI(A_2D, B_2D)
             SUBSET   : 2 by 4 points (X-Z)
             0      1    
             1      2
 1   / 1:  212.0  234.0
 2   / 2:  185.0  205.0
 3   / 3:  160.0  178.0
 4   / 4:  137.0  153.0
list samplek_multi(a_2d, b_1)
             VARIABLE : SAMPLEK_MULTI(A_2D, B_1)
             SUBSET   : 2 by 4 points (X-Z)
             0      1    
             1      2
 1   / 1:  212.0  205.0
 2   / 2:  185.0  178.0
 3   / 3:  160.0  153.0
 4   / 4:  137.0  130.0
 
! Intentional errors
set mode ignore_error
 
! Cannot sample the x-z data along t
 
define axis/t=3:4:1 sax2
let b_t = t[gt=sax2]
list samplek_multi(a_2d, b_t)
 
! Cannot sample the x data along x, but can if we add a z axis to arg 1
 
list samplek_multi(a_2, b_1)
list samplek_multi(a_2+zsequence(0), b_1)
             VARIABLE : SAMPLEK_MULTI(A_2+ZSEQUENCE(0), B_1)
             SUBSET   : 2 by 4 points (X-Z)
             0      1    
             1      2
 1   / 1:   ....   ....
 2   / 2:   ....   ....
 3   / 3:   ....   ....
 4   / 4:  16.00   9.00
list samplek_multi(a_2+0*zsequence({3,1,2}), b_1)
             VARIABLE : SAMPLEK_MULTI(A_2+0*ZSEQUENCE({3,1,2}), B_1)
             SUBSET   : 2 by 4 points (X-Z)
             0      1    
             1      2
 1   / 1:   ....   ....
 2   / 2:  16.00   9.00
 3   / 3:  16.00   9.00
 4   / 4:  16.00   9.00
 
set mode/last ignore_error
 
! Not an error: The grid of the INDEX var in non-sample directions
! must be conformable with the grid of to-be-sampled.
 
define axis/x=0:3:1 bigax
let c_2 = 1+x[gx=bigax]
let c_2d = c_2 + b_1
list c_2d
             VARIABLE : C_2 + B_1
             SUBSET   : 4 by 4 points (X-Z)
             0      1      2      3    
             1      2      3      4
 1   / 1:  5.000  6.000  7.000  8.000
 2   / 2:  4.000  5.000  6.000  7.000
 3   / 3:  3.000  4.000  5.000  6.000
 4   / 4:  2.000  3.000  4.000  5.000
list samplek_multi(a_2d, c_2d)
             VARIABLE : SAMPLEK_MULTI(A_2D, C_2D)
             SUBSET   : 2 by 4 points (X-Z)
             0      1    
             1      2
 1   / 1:  241.0   ....
 2   / 2:  212.0  234.0
 3   / 3:  185.0  205.0
 4   / 4:  160.0  178.0
 
! Monte Carlo resamples of a dataset, as outlined in #1924
! Sample Z data using an Z-N st of indices.
 
let data = ZSEQUENCE({59,91,26,37,72,43,87})
let ndat = `data,r=ksize`
 !-> DEFINE VARIABLE ndat = 7
let na = 8
let vals = _n[n=1:`na`]
 !-> DEFINE VARIABLE vals = _n[n=1:8]
let samp_indices = 1 + int(ndat * randu(_z[gz=data, k=1:`ndat`]+vals))
 !-> DEFINE VARIABLE samp_indices = 1 + int(ndat * randu(_z[gz=data, k=1:7]+vals))
let bootstrap_resamples = samplek_multi(data+0*samp_indices, samp_indices)
 
list data
             VARIABLE : ZSEQUENCE({59,91,26,37,72,43,87})
             SUBSET   : 7 points (Z)
 1   / 1:  59.00
 2   / 2:  91.00
 3   / 3:  26.00
 4   / 4:  37.00
 5   / 5:  72.00
 6   / 6:  43.00
 7   / 7:  87.00
list samp_indices
             VARIABLE : 1 + INT(NDAT * RANDU(_Z[GZ=DATA, K=1:7]+VALS))
             SUBSET   : 7 by 8 points (Z-F)
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  7.000  4.000  1.000  2.000  6.000  2.000  7.000
 2   / 2:  4.000  4.000  7.000  3.000  7.000  7.000  4.000
 3   / 3:  5.000  7.000  4.000  1.000  1.000  5.000  6.000
 4   / 4:  6.000  6.000  1.000  2.000  3.000  7.000  4.000
 5   / 5:  1.000  2.000  6.000  2.000  5.000  5.000  2.000
 6   / 6:  6.000  4.000  6.000  7.000  3.000  5.000  3.000
 7   / 7:  4.000  1.000  6.000  4.000  2.000  6.000  7.000
 8   / 8:  2.000  7.000  7.000  1.000  3.000  4.000  7.000
list bootstrap_resamples
             VARIABLE : SAMPLEK_MULTI(DATA+0*SAMP_INDICES, SAMP_INDICES)
             SUBSET   : 7 by 8 points (Z-F)
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  87.00  37.00  59.00  91.00  43.00  91.00  87.00
 2   / 2:  37.00  37.00  87.00  26.00  87.00  87.00  37.00
 3   / 3:  72.00  87.00  37.00  59.00  59.00  72.00  43.00
 4   / 4:  43.00  43.00  59.00  91.00  26.00  87.00  37.00
 5   / 5:  59.00  91.00  43.00  91.00  72.00  72.00  91.00
 6   / 6:  43.00  37.00  43.00  87.00  26.00  72.00  26.00
 7   / 7:  37.00  59.00  43.00  37.00  91.00  43.00  87.00
 8   / 8:  91.00  87.00  87.00  59.00  26.00  37.00  87.00
 
! Sample 2D data in this way, samples in M as above for each Z
 
let data2d = data + y[y=0:6:6]
list data2d
             VARIABLE : DATA + Y[Y=0:6:6]
             SUBSET   : 2 by 7 points (Y-Z)
             0      6    
             1      2
 1   / 1:  59.00  65.00
 2   / 2:  91.00  97.00
 3   / 3:  26.00  32.00
 4   / 4:  37.00  43.00
 5   / 5:  72.00  78.00
 6   / 6:  43.00  49.00
 7   / 7:  87.00  93.00
 
let data2d_samp = samplek_multi (data2d, samp_indices)
list/y=1 data2d_samp !same as the 1-d sample of "data" just above
             VARIABLE : SAMPLEK_MULTI (DATA2D, SAMP_INDICES)
             SUBSET   : 7 by 8 points (Z-F)
             Y        : 0
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  87.00  37.00  59.00  91.00  43.00  91.00  87.00
 2   / 2:  37.00  37.00  87.00  26.00  87.00  87.00  37.00
 3   / 3:  72.00  87.00  37.00  59.00  59.00  72.00  43.00
 4   / 4:  43.00  43.00  59.00  91.00  26.00  87.00  37.00
 5   / 5:  59.00  91.00  43.00  91.00  72.00  72.00  91.00
 6   / 6:  43.00  37.00  43.00  87.00  26.00  72.00  26.00
 7   / 7:  37.00  59.00  43.00  37.00  91.00  43.00  87.00
 8   / 8:  91.00  87.00  87.00  59.00  26.00  37.00  87.00
list/y=6 data2d_samp
             VARIABLE : SAMPLEK_MULTI (DATA2D, SAMP_INDICES)
             SUBSET   : 7 by 8 points (Z-F)
             Y        : 6
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  93.00  43.00  65.00  97.00  49.00  97.00  93.00
 2   / 2:  43.00  43.00  93.00  32.00  93.00  93.00  43.00
 3   / 3:  78.00  93.00  43.00  65.00  65.00  78.00  49.00
 4   / 4:  49.00  49.00  65.00  97.00  32.00  93.00  43.00
 5   / 5:  65.00  97.00  49.00  97.00  78.00  78.00  97.00
 6   / 6:  49.00  43.00  49.00  93.00  32.00  78.00  32.00
 7   / 7:  43.00  65.00  49.00  43.00  97.00  49.00  93.00
 8   / 8:  97.00  93.00  93.00  65.00  32.00  43.00  93.00
 
! SAMPLEL_MULTI
 
define axis/t=11:15:1 aax_a
define axis/t=1:4:1 aax_b
define axis/x=0:1:1 sax
let a_1 = t[gt=aax_a]^2
let a_2 = (4-x[gx=sax])^2
let a_2d = a_1 + a_2
let b_1 = 5-t[gt=aax_b]
let b_2 = 1+x[gx=sax]
let b_2d = b_1 + b_2 - 1
list samplel_multi(a_2d, b_2d)
             VARIABLE : SAMPLEL_MULTI(A_2D, B_2D)
             SUBSET   : 2 by 4 points (X-T)
             0      1    
             1      2
 1   / 1:  212.0  234.0
 2   / 2:  185.0  205.0
 3   / 3:  160.0  178.0
 4   / 4:  137.0  153.0
list samplel_multi(a_2d, b_1)
             VARIABLE : SAMPLEL_MULTI(A_2D, B_1)
             SUBSET   : 2 by 4 points (X-T)
             0      1    
             1      2
 1   / 1:  212.0  205.0
 2   / 2:  185.0  178.0
 3   / 3:  160.0  153.0
 4   / 4:  137.0  130.0
 
! Intentional errors
set mode ignore_error
 
! Cannot sample the x-t data along F
 
define axis/f=3:4:1 sax2
let b_f = _F[gf=sax2]
list samplel_multi(a_2d, b_f)
 
! Cannot sample the x data along t, but can if we add a t axis to arg 1
 
list samplel_multi(a_2, b_1)
list samplel_multi(a_2+tsequence(0), b_1)
             VARIABLE : SAMPLEL_MULTI(A_2+TSEQUENCE(0), B_1)
             SUBSET   : 2 by 4 points (X-T)
             0      1    
             1      2
 1   / 1:   ....   ....
 2   / 2:   ....   ....
 3   / 3:   ....   ....
 4   / 4:  16.00   9.00
list samplel_multi(a_2+0*tsequence({3,1,2}), b_1)
             VARIABLE : SAMPLEL_MULTI(A_2+0*TSEQUENCE({3,1,2}), B_1)
             SUBSET   : 2 by 4 points (X-T)
             0      1    
             1      2
 1   / 1:   ....   ....
 2   / 2:  16.00   9.00
 3   / 3:  16.00   9.00
 4   / 4:  16.00   9.00
 
set mode/last ignore_error
 
! Not an error: The grid of the INDEX var in non-sample directions
! must be conformable with the grid of to-be-sampled.
 
define axis/x=0:3:1 bigax
let c_2 = 1+x[gx=bigax]
let c_2d = c_2 + b_1
list c_2d
             VARIABLE : C_2 + B_1
             SUBSET   : 4 by 4 points (X-T)
             0      1      2      3    
             1      2      3      4
 1   / 1:  5.000  6.000  7.000  8.000
 2   / 2:  4.000  5.000  6.000  7.000
 3   / 3:  3.000  4.000  5.000  6.000
 4   / 4:  2.000  3.000  4.000  5.000
list samplel_multi(a_2d, c_2d)
             VARIABLE : SAMPLEL_MULTI(A_2D, C_2D)
             SUBSET   : 2 by 4 points (X-T)
             0      1    
             1      2
 1   / 1:  241.0   ....
 2   / 2:  212.0  234.0
 3   / 3:  185.0  205.0
 4   / 4:  160.0  178.0
 
! Monte Carlo resamples of a dataset, as outlined in #1924
! Sample Z data using an T-N st of indices.
 
let data = TSEQUENCE({59,91,26,37,72,43,87})
let ndat = `data,r=lsize`
 !-> DEFINE VARIABLE ndat = 7
let na = 8
let vals = _n[n=1:`na`]
 !-> DEFINE VARIABLE vals = _n[n=1:8]
let samp_indices = 1 + int(ndat * randu(_t[gt=data, l=1:`ndat`]+vals))
 !-> DEFINE VARIABLE samp_indices = 1 + int(ndat * randu(_t[gt=data, l=1:7]+vals))
let bootstrap_resamples = samplel_multi(data+0*samp_indices, samp_indices)
 
list data
             VARIABLE : TSEQUENCE({59,91,26,37,72,43,87})
             SUBSET   : 7 points (T)
 1   / 1:  59.00
 2   / 2:  91.00
 3   / 3:  26.00
 4   / 4:  37.00
 5   / 5:  72.00
 6   / 6:  43.00
 7   / 7:  87.00
list samp_indices
             VARIABLE : 1 + INT(NDAT * RANDU(_T[GT=DATA, L=1:7]+VALS))
             SUBSET   : 7 by 8 points (T-F)
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  7.000  4.000  1.000  2.000  6.000  2.000  7.000
 2   / 2:  4.000  4.000  7.000  3.000  7.000  7.000  4.000
 3   / 3:  5.000  7.000  4.000  1.000  1.000  5.000  6.000
 4   / 4:  6.000  6.000  1.000  2.000  3.000  7.000  4.000
 5   / 5:  1.000  2.000  6.000  2.000  5.000  5.000  2.000
 6   / 6:  6.000  4.000  6.000  7.000  3.000  5.000  3.000
 7   / 7:  4.000  1.000  6.000  4.000  2.000  6.000  7.000
 8   / 8:  2.000  7.000  7.000  1.000  3.000  4.000  7.000
list bootstrap_resamples
             VARIABLE : SAMPLEL_MULTI(DATA+0*SAMP_INDICES, SAMP_INDICES)
             SUBSET   : 7 by 8 points (T-F)
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  87.00  37.00  59.00  91.00  43.00  91.00  87.00
 2   / 2:  37.00  37.00  87.00  26.00  87.00  87.00  37.00
 3   / 3:  72.00  87.00  37.00  59.00  59.00  72.00  43.00
 4   / 4:  43.00  43.00  59.00  91.00  26.00  87.00  37.00
 5   / 5:  59.00  91.00  43.00  91.00  72.00  72.00  91.00
 6   / 6:  43.00  37.00  43.00  87.00  26.00  72.00  26.00
 7   / 7:  37.00  59.00  43.00  37.00  91.00  43.00  87.00
 8   / 8:  91.00  87.00  87.00  59.00  26.00  37.00  87.00
 
! Sample 2D data in this way, samples in M as above for each Z
 
let data2d = data + y[y=0:6:6]
list data2d
             VARIABLE : DATA + Y[Y=0:6:6]
             SUBSET   : 2 by 7 points (Y-T)
             0      6    
             1      2
 1   / 1:  59.00  65.00
 2   / 2:  91.00  97.00
 3   / 3:  26.00  32.00
 4   / 4:  37.00  43.00
 5   / 5:  72.00  78.00
 6   / 6:  43.00  49.00
 7   / 7:  87.00  93.00
 
let data2d_samp = samplel_multi (data2d, samp_indices)
list/y=1 data2d_samp !same as the 1-d sample of "data" just above
             VARIABLE : SAMPLEL_MULTI (DATA2D, SAMP_INDICES)
             SUBSET   : 7 by 8 points (T-F)
             Y        : 0
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  87.00  37.00  59.00  91.00  43.00  91.00  87.00
 2   / 2:  37.00  37.00  87.00  26.00  87.00  87.00  37.00
 3   / 3:  72.00  87.00  37.00  59.00  59.00  72.00  43.00
 4   / 4:  43.00  43.00  59.00  91.00  26.00  87.00  37.00
 5   / 5:  59.00  91.00  43.00  91.00  72.00  72.00  91.00
 6   / 6:  43.00  37.00  43.00  87.00  26.00  72.00  26.00
 7   / 7:  37.00  59.00  43.00  37.00  91.00  43.00  87.00
 8   / 8:  91.00  87.00  87.00  59.00  26.00  37.00  87.00
list/y=6 data2d_samp
             VARIABLE : SAMPLEL_MULTI (DATA2D, SAMP_INDICES)
             SUBSET   : 7 by 8 points (T-F)
             Y        : 6
             1      2      3      4      5      6      7    
             1      2      3      4      5      6      7
 1   / 1:  93.00  43.00  65.00  97.00  49.00  97.00  93.00
 2   / 2:  43.00  43.00  93.00  32.00  93.00  93.00  43.00
 3   / 3:  78.00  93.00  43.00  65.00  65.00  78.00  49.00
 4   / 4:  49.00  49.00  65.00  97.00  32.00  93.00  43.00
 5   / 5:  65.00  97.00  49.00  97.00  78.00  78.00  97.00
 6   / 6:  49.00  43.00  49.00  93.00  32.00  78.00  32.00
 7   / 7:  43.00  65.00  49.00  43.00  97.00  49.00  93.00
 8   / 8:  97.00  93.00  93.00  65.00  32.00  43.00  93.00
 
! SAMPLEN_MULTI
 
define axis/f=11:15:1 aax_a
define axis/f=1:4:1 aax_b
define axis/x=0:1:1 sax
let a_1 = _f[gf=aax_a]^2
let a_2 = (4-x[gx=sax])^2
let a_2d = a_1 + a_2
let b_1 = 5-_f[gf=aax_b]
let b_2 = 1+x[gx=sax]
let b_2d = b_1 + b_2 - 1
list samplen_multi(a_2d, b_2d)
             VARIABLE : SAMPLEN_MULTI(A_2D, B_2D)
             SUBSET   : 2 by 4 points (X-F)
             0      1    
             1      2
 1   / 1:  212.0  234.0
 2   / 2:  185.0  205.0
 3   / 3:  160.0  178.0
 4   / 4:  137.0  153.0
list samplen_multi(a_2d, b_1)
             VARIABLE : SAMPLEN_MULTI(A_2D, B_1)
             SUBSET   : 2 by 4 points (X-F)
             0      1    
             1      2
 1   / 1:  212.0  205.0
 2   / 2:  185.0  178.0
 3   / 3:  160.0  153.0
 4   / 4:  137.0  130.0
 
! Intentional errors
set mode ignore_error
 
! Cannot sample the x-f data along T
 
define axis/t=3:4:1 sax2
let b_t = t[gt=sax2]
list samplen_multi(a_2d, b_t)
 
! Cannot sample the x data along f, but can if we add an f axis to arg 1
 
list samplen_multi(a_2, b_1)
list samplen_multi(a_2+fsequence(0), b_1)
             VARIABLE : SAMPLEN_MULTI(A_2+FSEQUENCE(0), B_1)
             SUBSET   : 2 by 4 points (X-F)
             0      1    
             1      2
 1   / 1:   ....   ....
 2   / 2:   ....   ....
 3   / 3:   ....   ....
 4   / 4:  16.00   9.00
list samplen_multi(a_2+0*fsequence({3,1,2}), b_1)
             VARIABLE : SAMPLEN_MULTI(A_2+0*FSEQUENCE({3,1,2}), B_1)
             SUBSET   : 2 by 4 points (X-F)
             0      1    
             1      2
 1   / 1:   ....   ....
 2   / 2:  16.00   9.00
 3   / 3:  16.00   9.00
 4   / 4:  16.00   9.00
 
set mode/last ignore_error
 
! Not an error: The grid of the INDEX var in non-sample directions
! must be conformable with the grid of to-be-sampled.
 
define axis/x=0:3:1 bigax
let c_2 = 1+x[gx=bigax]
let c_2d = c_2 + b_1
list c_2d
             VARIABLE : C_2 + B_1
             SUBSET   : 4 by 4 points (X-F)
             0      1      2      3    
             1      2      3      4
 1   / 1:  5.000  6.000  7.000  8.000
 2   / 2:  4.000  5.000  6.000  7.000
 3   / 3:  3.000  4.000  5.000  6.000
 4   / 4:  2.000  3.000  4.000  5.000
list samplen_multi(a_2d, c_2d)
             VARIABLE : SAMPLEN_MULTI(A_2D, C_2D)
             SUBSET   : 2 by 4 points (X-F)
             0      1    
             1      2
 1   / 1:  241.0   ....
 2   / 2:  212.0  234.0
 3   / 3:  185.0  205.0
 4   / 4:  160.0  178.0
 
! Monte Carlo resamples of a dataset, as outlined in #1924
! Sample F data using an T-M st of indices.
 
let data = FSEQUENCE({59,91,26,37,72,43,87})
let ndat = `data,r=nsize`
 !-> DEFINE VARIABLE ndat = 7
let na = 8
let vals = _m[m=1:`na`]
 !-> DEFINE VARIABLE vals = _m[m=1:8]
let samp_indices = 1 + int(ndat * randu(_f[gy=data, n=1:`ndat`]+vals))
 !-> DEFINE VARIABLE samp_indices = 1 + int(ndat * randu(_f[gy=data, n=1:7]+vals))
let bootstrap_resamples = samplen_multi(data+0*samp_indices, samp_indices)
 
list data
             VARIABLE : FSEQUENCE({59,91,26,37,72,43,87})
             SUBSET   : 7 points (F)
 1   / 1:  59.00
 2   / 2:  91.00
 3   / 3:  26.00
 4   / 4:  37.00
 5   / 5:  72.00
 6   / 6:  43.00
 7   / 7:  87.00
list samp_indices
             VARIABLE : 1 + INT(NDAT * RANDU(_F[GY=DATA, N=1:7]+VALS))
             SUBSET   : 8 by 7 points (E-F)
             1      2      3      4      5      6      7      8    
             1      2      3      4      5      6      7      8
 1   / 1:  7.000  4.000  1.000  2.000  6.000  2.000  7.000  4.000
 2   / 2:  4.000  7.000  3.000  7.000  7.000  4.000  5.000  7.000
 3   / 3:  4.000  1.000  1.000  5.000  6.000  6.000  6.000  1.000
 4   / 4:  2.000  3.000  7.000  4.000  1.000  2.000  6.000  2.000
 5   / 5:  5.000  5.000  2.000  6.000  4.000  6.000  7.000  3.000
 6   / 6:  5.000  3.000  4.000  1.000  6.000  4.000  2.000  6.000
 7   / 7:  7.000  2.000  7.000  7.000  1.000  3.000  4.000  7.000
list bootstrap_resamples
             VARIABLE : SAMPLEN_MULTI(DATA+0*SAMP_INDICES, SAMP_INDICES)
             SUBSET   : 8 by 7 points (E-F)
             1      2      3      4      5      6      7      8    
             1      2      3      4      5      6      7      8
 1   / 1:  87.00  37.00  59.00  91.00  43.00  91.00  87.00  37.00
 2   / 2:  37.00  87.00  26.00  87.00  87.00  37.00  72.00  87.00
 3   / 3:  37.00  59.00  59.00  72.00  43.00  43.00  43.00  59.00
 4   / 4:  91.00  26.00  87.00  37.00  59.00  91.00  43.00  91.00
 5   / 5:  72.00  72.00  91.00  43.00  37.00  43.00  87.00  26.00
 6   / 6:  72.00  26.00  37.00  59.00  43.00  37.00  91.00  43.00
 7   / 7:  87.00  91.00  87.00  87.00  59.00  26.00  37.00  87.00
 
! Sample 2D data in this way, samples in M as above for each Z
 
let data2d = data + z[z=0:6:6]
list data2d
             VARIABLE : DATA + Z[Z=0:6:6]
             SUBSET   : 2 by 7 points (Z-F)
             0      6    
             1      2
 1   / 1:  59.00  65.00
 2   / 2:  91.00  97.00
 3   / 3:  26.00  32.00
 4   / 4:  37.00  43.00
 5   / 5:  72.00  78.00
 6   / 6:  43.00  49.00
 7   / 7:  87.00  93.00
 
let data2d_samp = samplen_multi (data2d, samp_indices)
list/z=1 data2d_samp !same as the 1-d sample of "data" just above
             VARIABLE : SAMPLEN_MULTI (DATA2D, SAMP_INDICES)
             SUBSET   : 8 by 7 points (E-F)
             Z        : 0
             1      2      3      4      5      6      7      8    
             1      2      3      4      5      6      7      8
 1   / 1:  87.00  37.00  59.00  91.00  43.00  91.00  87.00  37.00
 2   / 2:  37.00  87.00  26.00  87.00  87.00  37.00  72.00  87.00
 3   / 3:  37.00  59.00  59.00  72.00  43.00  43.00  43.00  59.00
 4   / 4:  91.00  26.00  87.00  37.00  59.00  91.00  43.00  91.00
 5   / 5:  72.00  72.00  91.00  43.00  37.00  43.00  87.00  26.00
 6   / 6:  72.00  26.00  37.00  59.00  43.00  37.00  91.00  43.00
 7   / 7:  87.00  91.00  87.00  87.00  59.00  26.00  37.00  87.00
list/z=6 data2d_samp
             VARIABLE : SAMPLEN_MULTI (DATA2D, SAMP_INDICES)
             SUBSET   : 8 by 7 points (E-F)
             Z        : 6
             1      2      3      4      5      6      7      8    
             1      2      3      4      5      6      7      8
 1   / 1:  93.00  43.00  65.00  97.00  49.00  97.00  93.00  43.00
 2   / 2:  43.00  93.00  32.00  93.00  93.00  43.00  78.00  93.00
 3   / 3:  43.00  65.00  65.00  78.00  49.00  49.00  49.00  65.00
 4   / 4:  97.00  32.00  93.00  43.00  65.00  97.00  49.00  97.00
 5   / 5:  78.00  78.00  97.00  49.00  43.00  49.00  93.00  32.00
 6   / 6:  78.00  32.00  43.00  65.00  49.00  43.00  97.00  49.00
 7   / 7:  93.00  97.00  93.00  93.00  65.00  32.00  43.00  93.00
*** Running ferret script: bn_dsg_tseries.jnl
! bn_dsg_tseries.jnl
! 5/2017 -- exercise native DSG support
 
use DSG_ERDDAP_Tao5daySst.nc
 
SHOW grid t_25
    GRID (G###)
 DSG Feature type Timeseries
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 FEATURE_T TIME              2376 r   15-JAN-2017 12:00    21-APR-2017 12:00   Variable lengths
 FEATURES  E (instance)        70 r   1                    70                  full
 normal    F
 
Dataset coordinates:
  longitude range: 0E to 10W
  latitude range: 19S to 21N
  depth range: 1 to 1.5
  time range: 15-JAN-2017 12:00 to 21-APR-2017 12:00
 
 
! SHOW DATA/FULL lists more details and for DSG data adds region info
show data/full
     currently SET data sets:
    1> ./data/DSG_ERDDAP_Tao5daySst.nc  (default)
     TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
       DSG Feature type Timeseries
 name     title                             I         J         K         L         M         N
 ARRAY    Array                            ...       ...       ...       ...       1:70      ...
            Data type = TEXT
               on grid GNV1 with -1.E+34 & NaN for missing data
             
 STATION  Station                          ...       ...       ...       ...       1:70      ...
            Data type = TEXT
               on grid GNV1 with -1.E+34 & NaN for missing data
             
 WMO_PLATFORM_CODE
          WMO Platform Code                ...       ...       ...       ...       1:70      ...
               on grid GNV1 with 2.147484E+09 for missing data
             
 LONGITUDE
          Nominal Longitude                ...       ...       ...       ...       1:70      ...
             degrees_east on grid GNV1 with 1.E+35 for missing data
             
 LATITUDE Nominal Latitude                 ...       ...       ...       ...       1:70      ...
             degrees_north on grid GNV1 with 1.E+35 for missing data
             
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:70      ...
               on grid GNV1 with NaN & -1.E+34 for missing data
             
 TIME     Centered Time                    ...       ...       ...     tot 2376    1:70      ...
             seconds since 1970-01-01T00:00:00Z on grid GNV2 with NaN & -1.E+34 for missing data
             
 DEPTH    Depth                            ...       ...       ...     tot 2376    1:70      ...
             m on grid GNV2 with 1.E+35 for missing data
             
 T_25     Sea Surface Temperature          ...       ...       ...     tot 2376    1:70      ...
             degree_C on grid GNV2 with 1.E+35 for missing data
             
 QT_5025  Sea Surface Temperature Quality  ...       ...       ...     tot 2376    1:70      ...
               on grid GNV2 with 1.E+35 for missing data
             
 ST_6025  Sea Surface Temperature Source   ...       ...       ...     tot 2376    1:70      ...
               on grid GNV2 with 1.E+35 for missing data
             
 STR_TEMP FLOATSTR(T_25, "(F5.2)")         ...       ...       ...     tot 2376    1:70      ...
            Data type = TEXT
               on grid GNV2 with -1.E+34 & NaN for missing data
             
 
  longitude range: 0E to 10W
  latitude range: 19S to 21N
  depth range: 1 to 1.5
  time range: 15-JAN-2017 12:00 to 21-APR-2017 12:00
 
 
 
!basic file variable listings
list longitude[y=5:10]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 LONGITUDE  is Nominal Longitude (degrees_east)
    FEATURE  STATION     LONGITUDE  LATITUDE LONGITUDE
    44           5n125w       125W        5N   235.0
    45           5n140w       140W        5N   220.0
    46           5n155w       155W        5N   205.0
    47           5n165e       165E        5N   165.0
    48           5n170w       170W        5N   190.0
    49           5n180w       180E        5N   180.0
    58           8n125w       125W        8N   235.0
    59           8n137e       137E        8N   137.0
    60           8n180w       180E        8N   180.0
    61            8n90e        90E        8N    90.0
    62            8n95w        95W        8N   265.0
    70           9n140w       140W        9N   220.0
list rowsize[x=95:180,y=5:10]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 ROWSIZE    is Number of Observations for this TimeSeries
    FEATURE  STATION     LONGITUDE  LATITUDE ROWSIZE
    47           5n165e       165E        5N   37.00
    49           5n180w       180E        5N   37.00
    59           8n137e       137E        8N   37.00
    60           8n180w       180E        8N   37.00
list/e=59:60 rowsize[x=95:180,y=5:10]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 59 to 60
 STATION    is Timeseries-id
 ROWSIZE    is Number of Observations for this TimeSeries
    FEATURE  STATION     LONGITUDE  LATITUDE ROWSIZE
    59           8n137e       137E        8N   37.00
    60           8n180w       180E        8N   37.00
list t_25[x=95:180,y=5:10,t=19-mar-2017:22-mar-2017]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C)
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME        T_25
 
    47           5n165e       165E        5N       1   19-MAR-2017 12:00   29.55
    47           5n165e       165E        5N       1   20-MAR-2017 12:00   29.57
    47           5n165e       165E        5N       1   21-MAR-2017 12:00   29.58
 
    49           5n180w       180E        5N       1   19-MAR-2017 12:00   28.72
    49           5n180w       180E        5N       1   20-MAR-2017 12:00   28.73
    49           5n180w       180E        5N       1   21-MAR-2017 12:00   28.73
 
    59           8n137e       137E        8N     1.5   19-MAR-2017 12:00   28.97
    59           8n137e       137E        8N     1.5   20-MAR-2017 12:00   28.96
    59           8n137e       137E        8N     1.5   21-MAR-2017 12:00   28.95
 
    60           8n180w       180E        8N       1   19-MAR-2017 12:00   28.42
    60           8n180w       180E        8N       1   20-MAR-2017 12:00   28.44
    60           8n180w       180E        8N       1   21-MAR-2017 12:00   28.45
 
 
 
! for convenience /M= is equivalent to /E=
! other subscripts are ignored (F axis functionality remains to be tested)
list/m=59:60 rowsize[x=95:180,y=5:10]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 59 to 60
 STATION    is Timeseries-id
 ROWSIZE    is Number of Observations for this TimeSeries
    FEATURE  STATION     LONGITUDE  LATITUDE ROWSIZE
    59           8n137e       137E        8N   37.00
    60           8n180w       180E        8N   37.00
 
! String variables station id and str_temp on the obs axis
list/m=7:12 station, rowsize
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 7 to 12
 STATION    is Timeseries-id
 STATION    is Station
 ROWSIZE    is Number of Observations for this TimeSeries
    FEATURE  STATION     LONGITUDE  LATITUDE STATION ROWSIZE
     7           0n156e       156E         0 "0n156e"  37.00
     8           0n165e       165E         0 "0n165e"  37.00
     9           0n170w       170W         0 "0n170w"  37.00
    10            0n23w        23W         0 "0n23w"   33.00
    11            0n67e        67E         0 "0n67e"   37.00
    12          0n80.5e      80.5E         0 "0n80.5e" 37.00
 
list/x=95:180/y=5:10/t=19-mar-2017:22-mar-2017 t_25, str_temp, depth, station
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : LONGITUDE: 137E to 180E
              LATITUDE: 5N to 8N
              TIME: 19-MAR-2017 12:00 to 21-MAR-2017 12:00
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C)
 STR_TEMP   is FLOATSTR(T_25, "(F5.2)")
 DEPTH      is Depth (m)
 STATION    is Station
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME        T_25 STR_TEMP  DEPTH STATION
 
    47           5n165e       165E        5N       1   19-MAR-2017 12:00   29.55 "29.55"   1.000 "5n165e"
    47           5n165e       165E        5N       1   20-MAR-2017 12:00   29.57 "29.57"   1.000 "5n165e"
    47           5n165e       165E        5N       1   21-MAR-2017 12:00   29.58 "29.58"   1.000 "5n165e"
 
    49           5n180w       180E        5N       1   19-MAR-2017 12:00   28.72 "28.72"   1.000 "5n180w"
    49           5n180w       180E        5N       1   20-MAR-2017 12:00   28.73 "28.73"   1.000 "5n180w"
    49           5n180w       180E        5N       1   21-MAR-2017 12:00   28.73 "28.73"   1.000 "5n180w"
 
    59           8n137e       137E        8N     1.5   19-MAR-2017 12:00   28.97 "28.97"   1.500 "8n137e"
    59           8n137e       137E        8N     1.5   20-MAR-2017 12:00   28.96 "28.96"   1.500 "8n137e"
    59           8n137e       137E        8N     1.5   21-MAR-2017 12:00   28.95 "28.95"   1.500 "8n137e"
 
    60           8n180w       180E        8N       1   19-MAR-2017 12:00   28.42 "28.42"   1.000 "8n180w"
    60           8n180w       180E        8N       1   20-MAR-2017 12:00   28.44 "28.44"   1.000 "8n180w"
    60           8n180w       180E        8N       1   21-MAR-2017 12:00   28.45 "28.45"   1.000 "8n180w"
 
! simple DSG algebra listings
let a = longitude*0 + rowsize
list/e=11:15 a
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 11 to 15
 STATION    is Timeseries-id
 A          is LONGITUDE*0 + ROWSIZE
    FEATURE  STATION     LONGITUDE  LATITUDE       A
    11            0n67e        67E         0   37.00
    12          0n80.5e      80.5E         0   37.00
    13            0n90e        90E         0   37.00
    14            0n95w        95W         0   32.00
    15          1.5n67e        67E      1.5N   37.00
list a[x=95:180,y=5:10,t=15-mar-2017:22-mar-2017]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 A          is LONGITUDE*0 + ROWSIZE
    FEATURE  STATION     LONGITUDE  LATITUDE       A
    47           5n165e       165E        5N   37.00
    49           5n180w       180E        5N   37.00
    59           8n137e       137E        8N   37.00
    60           8n180w       180E        8N   37.00
list a[x=95:180,y=5:10,t=15-mar-2017:22-mar-2017,e=59:60]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 A          is LONGITUDE*0 + ROWSIZE
    FEATURE  STATION     LONGITUDE  LATITUDE       A
    59           8n137e       137E        8N   37.00
    60           8n180w       180E        8N   37.00
 
! verify cache behaviors
! cache hit should occur on obtaining restricted region - look for 'found b'
! in the second list
! Note: feature subset depends upon T constraints even though expression 'B
! is a pure instance expression
cancel memory/all
let b = longitude*0 + rowsize
list b[x=75:180,y=-5:10]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 B          is LONGITUDE*0 + ROWSIZE
    FEATURE  STATION     LONGITUDE  LATITUDE       B
     7           0n156e       156E         0   37.00
     8           0n165e       165E         0   37.00
    12          0n80.5e      80.5E         0   37.00
    13            0n90e        90E         0   37.00
    17        1.5s80.5e      80.5E      1.5S   37.00
    32           2n180w       180E        2N    1.00
    37           2s165e       165E        2S   37.00
    39           2s180w       180E        2S   24.00
    41            4n90e        90E        4N   35.00
    43          4s80.5e      80.5E        4S   37.00
    47           5n165e       165E        5N   37.00
    49           5n180w       180E        5N   37.00
    54           5s180w       180E        5S   37.00
    55            5s95e        95E        5S   37.00
    59           8n137e       137E        8N   37.00
    60           8n180w       180E        8N   37.00
    61            8n90e        90E        8N   37.00
set mode diagnostic
list b[x=95:180,y=5:10,t=15-mar-2017:22-mar-2017]
 dealloc  dynamic grid GNV1            NORMAL    NORMAL    NORMAL    NORMAL    FEATURES  NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GNV1            NORMAL    NORMAL    NORMAL    NORMAL    FEATURES  NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1   70  N: -999 -999
 found   B        M:  1 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1   70  N: -999 -999
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 B          is LONGITUDE*0 + ROWSIZE
    FEATURE  STATION     LONGITUDE  LATITUDE       B
    47           5n165e       165E        5N   37.00
    49           5n180w       180E        5N   37.00
    59           8n137e       137E        8N   37.00
    60           8n180w       180E        8N   37.00
set mode/last diagnostic
 
! cache hit should not occur when region gets relaxed - no 'found c'
let c = longitude*0 + rowsize
list c[x=95:180,y=5:10]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 C          is LONGITUDE*0 + ROWSIZE
    FEATURE  STATION     LONGITUDE  LATITUDE       C
    47           5n165e       165E        5N   37.00
    49           5n180w       180E        5N   37.00
    59           8n137e       137E        8N   37.00
    60           8n180w       180E        8N   37.00
set mode diagnostic
list c[x=75:180,y=5:10] ! relax existing constraint
 dealloc  dynamic grid GNV1            NORMAL    NORMAL    NORMAL    NORMAL    FEATURES  NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GNV1            NORMAL    NORMAL    NORMAL    NORMAL    FEATURES  NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1   70  N: -999 -999
 eval    C        C:  6 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1   70  N: -999 -999
 found   LON-TUDE M:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1   70  N: -999 -999
 constan cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 found   ROWSIZE  M:  3 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1   70  N: -999 -999
 -DELETE tpry     M:  2 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1   70  N: -999 -999
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 C          is LONGITUDE*0 + ROWSIZE
    FEATURE  STATION     LONGITUDE  LATITUDE       C
    47           5n165e       165E        5N   37.00
    49           5n180w       180E        5N   37.00
    59           8n137e       137E        8N   37.00
    60           8n180w       180E        8N   37.00
    61            8n90e        90E        8N   37.00
set mode/last diagnostic
 
! cache hit shoud not occur when new constraint is added - no 'found d'
let d = longitude*0 + rowsize
list d[x=95:180,y=5:10]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 D          is LONGITUDE*0 + ROWSIZE
    FEATURE  STATION     LONGITUDE  LATITUDE       D
    47           5n165e       165E        5N   37.00
    49           5n180w       180E        5N   37.00
    59           8n137e       137E        8N   37.00
    60           8n180w       180E        8N   37.00
set mode diagnostic
list d[x=95:180]    ! remove  a constraint
 dealloc  dynamic grid GNV1            NORMAL    NORMAL    NORMAL    NORMAL    FEATURES  NORMAL
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid GNV1            NORMAL    NORMAL    NORMAL    NORMAL    FEATURES  NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1   70  N: -999 -999
 eval    D        C:  6 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1   70  N: -999 -999
 found   LON-TUDE M:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1   70  N: -999 -999
 constan cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE cnst     M:  3 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 found   ROWSIZE  M:  3 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1   70  N: -999 -999
 -DELETE tpry     M:  2 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999  M:    1   70  N: -999 -999
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 D          is LONGITUDE*0 + ROWSIZE
    FEATURE  STATION     LONGITUDE  LATITUDE       D
     7           0n156e       156E         0   37.00
     8           0n165e       165E         0   37.00
    32           2n180w       180E        2N    1.00
    37           2s165e       165E        2S   37.00
    39           2s180w       180E        2S   24.00
    47           5n165e       165E        5N   37.00
    49           5n180w       180E        5N   37.00
    54           5s180w       180E        5S   37.00
    55            5s95e        95E        5S   37.00
    59           8n137e       137E        8N   37.00
    60           8n180w       180E        8N   37.00
    65           8s165e       165E        8S   37.00
    67           8s180w       180E        8S   36.00
    69            8s95e        95E        8S   37.00
set mode/last diagnostic
 
! defined regions may be helpful working with DSG datasets
! Note: be alert for cache hit errors if the regions definition gets changed
! If the region name is used *inside* of a LET definition then changing the
! region actually changes the LET definition, but does not cause uvar memory
! to be purged.  I don't *think* this will be a problem for DSG variables
let a = longitude*0 + rowsize
define region/x=95:180/y=5:10/t=15-mar-2017:20-mar-2017 my_reg
list a[@my_reg]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 A          is LONGITUDE*0 + ROWSIZE
    FEATURE  STATION     LONGITUDE  LATITUDE       A
    47           5n165e       165E        5N   37.00
    49           5n180w       180E        5N   37.00
    59           8n137e       137E        8N   37.00
    60           8n180w       180E        8N   37.00
 
! Intentional errors
set mode ignore
 
! trap inconsistent DSG constraints
list t_25[x=95:180] + longitude
 
! Cannot select DSG data by index in i,j,k,l
list/l=1:5 t_25
list/i=200:210 t_25
 
list/m=31:32 t_25  ! by feature number is ok
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 31 to 32
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C)
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME        T_25
 
    31           2n170w       170W        2N       1   15-JAN-2017 12:00   26.99
    31           2n170w       170W        2N       1   20-JAN-2017 12:00   27.41
    31           2n170w       170W        2N       1   25-JAN-2017 12:00   27.44
    31           2n170w       170W        2N       1   30-JAN-2017 12:00   26.85
 
    32           2n180w       180E        2N       1   15-JAN-2017 12:00   27.79
 
set mode/last ignore
 
! pseudo-variable tests
list/e=5:6 x[g=t_25]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 5 to 6
 STATION    is Timeseries-id
 X          is X  (axis)
    FEATURE  STATION     LONGITUDE  LATITUDE       X
     5           0n140w       140W         0   220.0
     6           0n155w       155W         0   205.0
list y[g=rowsize,e=14:18]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 Y          is Y  (axis)
    FEATURE  STATION     LONGITUDE  LATITUDE       Y
    14            0n95w        95W         0    0.00
    15          1.5n67e        67E      1.5N    1.50
    16          1.5s67e        67E      1.5S   -1.50
    17        1.5s80.5e      80.5E      1.5S   -1.50
    18           10s10w        10W       10S  -10.00
list/e=13:15 t[g=t_25,x=60:100,t=1-mar-2017:15-mar-2017]  ! field width DSGTBD
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 13 to 15
 STATION    is Timeseries-id
 T          is T  (axis FEATURE_T)
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME              T
 
    13            0n90e        90E         0       1   01-MAR-2017 12:00  1.488E+09
    13            0n90e        90E         0       1   02-MAR-2017 12:00  1.488E+09
    13            0n90e        90E         0       1   03-MAR-2017 12:00  1.489E+09
    13            0n90e        90E         0       1   04-MAR-2017 12:00  1.489E+09
    13            0n90e        90E         0       1   05-MAR-2017 12:00  1.489E+09
    13            0n90e        90E         0       1   06-MAR-2017 12:00  1.489E+09
    13            0n90e        90E         0       1   07-MAR-2017 12:00  1.489E+09
    13            0n90e        90E         0       1   08-MAR-2017 12:00  1.489E+09
    13            0n90e        90E         0       1   09-MAR-2017 12:00  1.489E+09
    13            0n90e        90E         0       1   10-MAR-2017 12:00  1.489E+09
    13            0n90e        90E         0       1   11-MAR-2017 12:00  1.489E+09
    13            0n90e        90E         0       1   12-MAR-2017 12:00  1.489E+09
    13            0n90e        90E         0       1   13-MAR-2017 12:00  1.489E+09
    13            0n90e        90E         0       1   14-MAR-2017 12:00  1.489E+09
 
    15          1.5n67e        67E      1.5N       1   01-MAR-2017 12:00  1.488E+09
    15          1.5n67e        67E      1.5N       1   02-MAR-2017 12:00  1.488E+09
    15          1.5n67e        67E      1.5N       1   03-MAR-2017 12:00  1.489E+09
    15          1.5n67e        67E      1.5N       1   04-MAR-2017 12:00  1.489E+09
    15          1.5n67e        67E      1.5N       1   05-MAR-2017 12:00  1.489E+09
    15          1.5n67e        67E      1.5N       1   06-MAR-2017 12:00  1.489E+09
    15          1.5n67e        67E      1.5N       1   07-MAR-2017 12:00  1.489E+09
    15          1.5n67e        67E      1.5N       1   08-MAR-2017 12:00  1.489E+09
    15          1.5n67e        67E      1.5N       1   09-MAR-2017 12:00  1.489E+09
    15          1.5n67e        67E      1.5N       1   10-MAR-2017 12:00  1.489E+09
    15          1.5n67e        67E      1.5N       1   11-MAR-2017 12:00  1.489E+09
    15          1.5n67e        67E      1.5N       1   12-MAR-2017 12:00  1.489E+09
    15          1.5n67e        67E      1.5N       1   13-MAR-2017 12:00  1.489E+09
    15          1.5n67e        67E      1.5N       1   14-MAR-2017 12:00  1.489E+09
list i[g=rowsize,e=6:12]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 I          is I  (axis)
    FEATURE  STATION     LONGITUDE  LATITUDE       I
     6           0n155w       155W         0    6.00
     7           0n156e       156E         0    7.00
     8           0n165e       165E         0    8.00
     9           0n170w       170W         0    9.00
    10            0n23w        23W         0   10.00
    11            0n67e        67E         0   11.00
    12          0n80.5e      80.5E         0   12.00
list/t=1-feb-2017:25-feb-2017 l[g=rowsize,e=12:15]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : TIME: 04-FEB-2017 12:00 to 24-FEB-2017 12:00
 STATION    is Timeseries-id
 L          is L  (axis FEATURE_T)
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME           L
 
    12          0n80.5e      80.5E         0       1   04-FEB-2017 12:00    5.00
    12          0n80.5e      80.5E         0       1   09-FEB-2017 12:00    6.00
    12          0n80.5e      80.5E         0       1   14-FEB-2017 12:00    7.00
    12          0n80.5e      80.5E         0       1   19-FEB-2017 12:00    8.00
    12          0n80.5e      80.5E         0       1   24-FEB-2017 12:00    9.00
 
    13            0n90e        90E         0       1   04-FEB-2017 12:00    5.00
    13            0n90e        90E         0       1   09-FEB-2017 12:00    6.00
    13            0n90e        90E         0       1   14-FEB-2017 12:00    7.00
    13            0n90e        90E         0       1   19-FEB-2017 12:00    8.00
    13            0n90e        90E         0       1   24-FEB-2017 12:00    9.00
 
    14            0n95w        95W         0       1   04-FEB-2017 12:00    5.00
    14            0n95w        95W         0       1   09-FEB-2017 12:00    6.00
    14            0n95w        95W         0       1   14-FEB-2017 12:00    7.00
    14            0n95w        95W         0       1   19-FEB-2017 12:00    8.00
    14            0n95w        95W         0       1   24-FEB-2017 12:00    9.00
 
    15          1.5n67e        67E      1.5N       1   04-FEB-2017 12:00    5.00
    15          1.5n67e        67E      1.5N       1   09-FEB-2017 12:00    6.00
    15          1.5n67e        67E      1.5N       1   14-FEB-2017 12:00    7.00
    15          1.5n67e        67E      1.5N       1   19-FEB-2017 12:00    8.00
    15          1.5n67e        67E      1.5N       1   24-FEB-2017 12:00    9.00
 
! multi-variable listing test
list/y=5n rowsize, IF rowsize LT 10 then 1
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : LATITUDE: 5N
 STATION    is Timeseries-id
 ROWSIZE    is Number of Observations for this TimeSeries
 EX#2       is IF ROWSIZE LT 10 THEN 1
    FEATURE  STATION     LONGITUDE  LATITUDE ROWSIZE    EX#2
    44           5n125w       125W        5N   37.00     ...
    45           5n140w       140W        5N   37.00     ...
    46           5n155w       155W        5N    8.00   1.000
    47           5n165e       165E        5N   37.00     ...
    48           5n170w       170W        5N   37.00     ...
    49           5n180w       180E        5N   37.00     ...
list/y=2s/x=165:185/t=15-MAR-2017:27-MAR-2017 rowsize, t_25
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : LONGITUDE: 165E to 180E
              LATITUDE: 2S
              TIME: 15-MAR-2017 12:00 to 22-MAR-2017 12:00
 STATION    is Timeseries-id
 ROWSIZE    is Number of Observations for this TimeSeries
 T_25       is Sea Surface Temperature (degree_C)
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME     ROWSIZE    T_25
 
    37           2s165e       165E        2S       1   15-MAR-2017 12:00   37.00   28.74
    37           2s165e       165E        2S       1   16-MAR-2017 12:00   37.00   28.81
    37           2s165e       165E        2S       1   17-MAR-2017 12:00   37.00   28.90
    37           2s165e       165E        2S       1   18-MAR-2017 12:00   37.00   29.01
    37           2s165e       165E        2S       1   19-MAR-2017 12:00   37.00   29.11
    37           2s165e       165E        2S       1   20-MAR-2017 12:00   37.00   29.18
    37           2s165e       165E        2S       1   21-MAR-2017 12:00   37.00   29.26
    37           2s165e       165E        2S       1   22-MAR-2017 12:00   37.00   29.31
 
    39           2s180w       180E        2S       1   19-MAR-2017 12:00   24.00   27.50
 
! compressing transform tests (using @MAX)
! ... compress instance variable along E axis
list rowsize[e=@max]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 ROWSIZE    is Number of Observations for this TimeSeries
    FEATURE  STATION    ROWSIZE
     1                    37.00
 
! ... demonstrate that constraints are used in the transformation
list/e=30:33 rowsize
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 30 to 33
 STATION    is Timeseries-id
 ROWSIZE    is Number of Observations for this TimeSeries
    FEATURE  STATION     LONGITUDE  LATITUDE ROWSIZE
    30           2n155w       155W        2N   37.00
    31           2n170w       170W        2N    4.00
    32           2n180w       180E        2N    1.00
    33           2s110w       110W        2S   37.00
list/e=30:33 rowsize[e=@max]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 30 to 33 (maximum)
 STATION    is Timeseries-id
 ROWSIZE    is Number of Observations for this TimeSeries
    FEATURE  STATION    ROWSIZE
     1                    37.00
list/e=31:32 rowsize[e=@max]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 31 to 32 (maximum)
 STATION    is Timeseries-id
 ROWSIZE    is Number of Observations for this TimeSeries
    FEATURE  STATION    ROWSIZE
     1                    4.000
 
! ... compress obs variable along orientation axis
list/e=40:43 t_25[t=@max]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 40 to 43
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C) (maximum, each Timeseries-id)
    FEATURE  STATION     LONGITUDE  LATITUDE    T_25
    40            4n23w        23W        4N   29.42
    41            4n90e        90E        4N   30.32
    42            4s57e        57E        4S   30.59
    43          4s80.5e      80.5E        4S   30.18
 
! ... mix instance and point variables in same listing
list/e=14:18  rowsize, rowsize[e=@max], t_25[t=@max]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 14 to 18
 STATION    is Timeseries-id
 ROWSIZE    is Number of Observations for this TimeSeries
 ROWSIZE    is Number of Observations for this TimeSeries
 T_25       is Sea Surface Temperature (degree_C) (maximum, each Timeseries-id)
    FEATURE  STATION     LONGITUDE  LATITUDE ROWSIZE ROWSIZE    T_25
    14            0n95w        95W         0   32.00   37.00   28.60
    15          1.5n67e        67E      1.5N   37.00   37.00   30.44
    16          1.5s67e        67E      1.5S   37.00   37.00   30.48
    17        1.5s80.5e      80.5E      1.5S   37.00   37.00   29.94
    18           10s10w        10W       10S   32.00   37.00   27.84
 
! ... mix obs, point and instance variables in same listing
list/e=14:18/t=10-mar-2017:15-mar-2017  t_25, rowsize[e=@max], t_25[t=@max]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : TIME: 10-MAR-2017 12:00 to 14-MAR-2017 12:00 (maximum)
              E (instance): 14 to 18
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C)
 ROWSIZE    is Number of Observations for this TimeSeries
 T_25       is Sea Surface Temperature (degree_C) (maximum, each Timeseries-id)
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME        T_25 ROWSIZE    T_25
 
    14            0n95w        95W         0       1   10-MAR-2017 12:00   27.61   37.00   27.94
    14            0n95w        95W         0       1   11-MAR-2017 12:00   27.79   37.00   27.94
    14            0n95w        95W         0       1   12-MAR-2017 12:00   27.86   37.00   27.94
    14            0n95w        95W         0       1   13-MAR-2017 12:00   27.94   37.00   27.94
    14            0n95w        95W         0       1   14-MAR-2017 12:00   27.80   37.00   27.94
 
    15          1.5n67e        67E      1.5N       1   10-MAR-2017 12:00   29.55   37.00   29.72
    15          1.5n67e        67E      1.5N       1   11-MAR-2017 12:00   29.56   37.00   29.72
    15          1.5n67e        67E      1.5N       1   12-MAR-2017 12:00   29.60   37.00   29.72
    15          1.5n67e        67E      1.5N       1   13-MAR-2017 12:00   29.67   37.00   29.72
    15          1.5n67e        67E      1.5N       1   14-MAR-2017 12:00   29.72   37.00   29.72
 
    16          1.5s67e        67E      1.5S       1   10-MAR-2017 12:00   29.32   37.00   29.59
    16          1.5s67e        67E      1.5S       1   11-MAR-2017 12:00   29.31   37.00   29.59
    16          1.5s67e        67E      1.5S       1   12-MAR-2017 12:00   29.37   37.00   29.59
    16          1.5s67e        67E      1.5S       1   13-MAR-2017 12:00   29.50   37.00   29.59
    16          1.5s67e        67E      1.5S       1   14-MAR-2017 12:00   29.59   37.00   29.59
 
    17        1.5s80.5e      80.5E      1.5S       1   10-MAR-2017 12:00   29.46   37.00   29.79
    17        1.5s80.5e      80.5E      1.5S       1   11-MAR-2017 12:00   29.56   37.00   29.79
    17        1.5s80.5e      80.5E      1.5S       1   12-MAR-2017 12:00   29.63   37.00   29.79
    17        1.5s80.5e      80.5E      1.5S       1   13-MAR-2017 12:00   29.70   37.00   29.79
    17        1.5s80.5e      80.5E      1.5S       1   14-MAR-2017 12:00   29.79   37.00   29.79
 
    18           10s10w        10W       10S       1   10-MAR-2017 12:00   27.23   37.00   27.39
    18           10s10w        10W       10S       1   11-MAR-2017 12:00   27.23   37.00   27.39
    18           10s10w        10W       10S       1   12-MAR-2017 12:00   27.26   37.00   27.39
    18           10s10w        10W       10S       1   13-MAR-2017 12:00   27.33   37.00   27.39
    18           10s10w        10W       10S       1   14-MAR-2017 12:00   27.39   37.00   27.39
 
! ...confirm that observation-level flitering is happening
let a = l[g=t_25]
list/e=17:18/t=10-mar-2017:15-mar-2017  a, a[t=@max]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : TIME: 10-MAR-2017 12:00 to 14-MAR-2017 12:00 (maximum)
              E (instance): 17 to 18
 STATION    is Timeseries-id
 L          is L  (axis FEATURE_T)
 A          is L[G=T_25] (maximum, each Timeseries-id)
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME           L       A
 
    17        1.5s80.5e      80.5E      1.5S       1   10-MAR-2017 12:00   19.00   23.00
    17        1.5s80.5e      80.5E      1.5S       1   11-MAR-2017 12:00   20.00   23.00
    17        1.5s80.5e      80.5E      1.5S       1   12-MAR-2017 12:00   21.00   23.00
    17        1.5s80.5e      80.5E      1.5S       1   13-MAR-2017 12:00   22.00   23.00
    17        1.5s80.5e      80.5E      1.5S       1   14-MAR-2017 12:00   23.00   23.00
 
    18           10s10w        10W       10S       1   10-MAR-2017 12:00   14.00   18.00
    18           10s10w        10W       10S       1   11-MAR-2017 12:00   15.00   18.00
    18           10s10w        10W       10S       1   12-MAR-2017 12:00   16.00   18.00
    18           10s10w        10W       10S       1   13-MAR-2017 12:00   17.00   18.00
    18           10s10w        10W       10S       1   14-MAR-2017 12:00   18.00   18.00
 
! ... confirm no cache hit on narrowing compressing transform limits
canc mem/all
list/e=17:18/t=10-mar-2017:18-mar-2017  a, a[t=@max]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : TIME: 10-MAR-2017 12:00 to 17-MAR-2017 12:00 (maximum)
              E (instance): 17 to 18
 STATION    is Timeseries-id
 L          is L  (axis FEATURE_T)
 A          is L[G=T_25] (maximum, each Timeseries-id)
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME           L       A
 
    17        1.5s80.5e      80.5E      1.5S       1   10-MAR-2017 12:00   19.00   26.00
    17        1.5s80.5e      80.5E      1.5S       1   11-MAR-2017 12:00   20.00   26.00
    17        1.5s80.5e      80.5E      1.5S       1   12-MAR-2017 12:00   21.00   26.00
    17        1.5s80.5e      80.5E      1.5S       1   13-MAR-2017 12:00   22.00   26.00
    17        1.5s80.5e      80.5E      1.5S       1   14-MAR-2017 12:00   23.00   26.00
    17        1.5s80.5e      80.5E      1.5S       1   15-MAR-2017 12:00   24.00   26.00
    17        1.5s80.5e      80.5E      1.5S       1   16-MAR-2017 12:00   25.00   26.00
    17        1.5s80.5e      80.5E      1.5S       1   17-MAR-2017 12:00   26.00   26.00
 
    18           10s10w        10W       10S       1   10-MAR-2017 12:00   14.00   21.00
    18           10s10w        10W       10S       1   11-MAR-2017 12:00   15.00   21.00
    18           10s10w        10W       10S       1   12-MAR-2017 12:00   16.00   21.00
    18           10s10w        10W       10S       1   13-MAR-2017 12:00   17.00   21.00
    18           10s10w        10W       10S       1   14-MAR-2017 12:00   18.00   21.00
    18           10s10w        10W       10S       1   15-MAR-2017 12:00   19.00   21.00
    18           10s10w        10W       10S       1   16-MAR-2017 12:00   20.00   21.00
    18           10s10w        10W       10S       1   17-MAR-2017 12:00   21.00   21.00
list/e=17:18/t=10-mar-2017:15-mar-2017  a, a[t=@max]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : TIME: 10-MAR-2017 12:00 to 14-MAR-2017 12:00 (maximum)
              E (instance): 17 to 18
 STATION    is Timeseries-id
 A          is L[G=T_25]
 A          is L[G=T_25] (maximum, each Timeseries-id)
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME           A       A
 
    17        1.5s80.5e      80.5E      1.5S       1   10-MAR-2017 12:00   19.00   23.00
    17        1.5s80.5e      80.5E      1.5S       1   11-MAR-2017 12:00   20.00   23.00
    17        1.5s80.5e      80.5E      1.5S       1   12-MAR-2017 12:00   21.00   23.00
    17        1.5s80.5e      80.5E      1.5S       1   13-MAR-2017 12:00   22.00   23.00
    17        1.5s80.5e      80.5E      1.5S       1   14-MAR-2017 12:00   23.00   23.00
 
    18           10s10w        10W       10S       1   10-MAR-2017 12:00   14.00   18.00
    18           10s10w        10W       10S       1   11-MAR-2017 12:00   15.00   18.00
    18           10s10w        10W       10S       1   12-MAR-2017 12:00   16.00   18.00
    18           10s10w        10W       10S       1   13-MAR-2017 12:00   17.00   18.00
    18           10s10w        10W       10S       1   14-MAR-2017 12:00   18.00   18.00
 
! illegal transformations
set mode ignore
list rowsize[t=@max]
list t_25[e=@max]
list t_25[t=@max,e=@max]
set mode/last ignore
 
! build a LET-pyramid involving a DSG transformation
let a = t_25[t=@max]
list a[e=@max]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 A          is T_25[T=@MAX]
    FEATURE  STATION          A
     1                    30.77
list a[e=6:8]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 A          is T_25[T=@MAX]
    FEATURE  STATION     LONGITUDE  LATITUDE       A
     6           0n155w       155W         0   28.22
     7           0n156e       156E         0   30.77
     8           0n165e       165E         0   30.40
let b = a[e=@max]
list b
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 A          is T_25[T=@MAX]
    FEATURE  STATION          A
     1                    30.77
 
! smoothing transformation
list/e=17:18 t_25[t=@sbx], t_25, t_25-t_25[t=@sbx]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 17 to 18
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C) (box smoothed by 3 pts, each Timeseries-id)
 T_25       is Sea Surface Temperature (degree_C)
 EX#3       is T_25-T_25[T=@SBX]
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME        T_25    T_25    EX#3
 
    17        1.5s80.5e      80.5E      1.5S       1   15-JAN-2017 12:00     ...   28.30     ...
    17        1.5s80.5e      80.5E      1.5S       1   20-JAN-2017 12:00   28.45   28.33 -0.1120
    17        1.5s80.5e      80.5E      1.5S       1   25-JAN-2017 12:00   28.62   28.70  0.0820
    17        1.5s80.5e      80.5E      1.5S       1   30-JAN-2017 12:00   28.76   28.82  0.0620
    17        1.5s80.5e      80.5E      1.5S       1   04-FEB-2017 12:00   28.78   28.76 -0.0213
    17        1.5s80.5e      80.5E      1.5S       1   09-FEB-2017 12:00   28.85   28.76 -0.0913
    17        1.5s80.5e      80.5E      1.5S       1   14-FEB-2017 12:00   28.94   29.03  0.0967
    17        1.5s80.5e      80.5E      1.5S       1   19-FEB-2017 12:00   29.05   29.02 -0.0280
    17        1.5s80.5e      80.5E      1.5S       1   24-FEB-2017 12:00   29.09   29.09 -0.0080
    17        1.5s80.5e      80.5E      1.5S       1   01-MAR-2017 12:00   29.15   29.18  0.0273
    17        1.5s80.5e      80.5E      1.5S       1   02-MAR-2017 12:00   29.16   29.19  0.0280
    17        1.5s80.5e      80.5E      1.5S       1   03-MAR-2017 12:00   29.14   29.11 -0.0247
    17        1.5s80.5e      80.5E      1.5S       1   04-MAR-2017 12:00   29.10   29.11  0.0100
    17        1.5s80.5e      80.5E      1.5S       1   05-MAR-2017 12:00   29.10   29.08 -0.0173
    17        1.5s80.5e      80.5E      1.5S       1   06-MAR-2017 12:00   29.13   29.11 -0.0247
    17        1.5s80.5e      80.5E      1.5S       1   07-MAR-2017 12:00   29.21   29.20 -0.0127
    17        1.5s80.5e      80.5E      1.5S       1   08-MAR-2017 12:00   29.31   29.34  0.0247
    17        1.5s80.5e      80.5E      1.5S       1   09-MAR-2017 12:00   29.40   29.40 -0.0013
    17        1.5s80.5e      80.5E      1.5S       1   10-MAR-2017 12:00   29.47   29.46 -0.0107
    17        1.5s80.5e      80.5E      1.5S       1   11-MAR-2017 12:00   29.55   29.56  0.0087
    17        1.5s80.5e      80.5E      1.5S       1   12-MAR-2017 12:00   29.63   29.63  0.0000
    17        1.5s80.5e      80.5E      1.5S       1   13-MAR-2017 12:00   29.70   29.70 -0.0080
    17        1.5s80.5e      80.5E      1.5S       1   14-MAR-2017 12:00   29.80   29.79 -0.0107
    17        1.5s80.5e      80.5E      1.5S       1   15-MAR-2017 12:00   29.88   29.92  0.0353
    17        1.5s80.5e      80.5E      1.5S       1   16-MAR-2017 12:00   29.92   29.94  0.0167
    17        1.5s80.5e      80.5E      1.5S       1   17-MAR-2017 12:00   29.87   29.91  0.0333
    17        1.5s80.5e      80.5E      1.5S       1   18-MAR-2017 12:00   29.81   29.78 -0.0353
    17        1.5s80.5e      80.5E      1.5S       1   19-MAR-2017 12:00   29.74   29.75  0.0133
    17        1.5s80.5e      80.5E      1.5S       1   20-MAR-2017 12:00   29.71   29.69 -0.0220
    17        1.5s80.5e      80.5E      1.5S       1   21-MAR-2017 12:00   29.70   29.69 -0.0053
    17        1.5s80.5e      80.5E      1.5S       1   22-MAR-2017 12:00   29.61   29.71  0.1000
    17        1.5s80.5e      80.5E      1.5S       1   27-MAR-2017 12:00   29.58   29.43 -0.1498
    17        1.5s80.5e      80.5E      1.5S       1   01-APR-2017 12:00   29.51   29.59  0.0842
    17        1.5s80.5e      80.5E      1.5S       1   06-APR-2017 12:00   29.52   29.51 -0.0124
    17        1.5s80.5e      80.5E      1.5S       1   11-APR-2017 12:00   29.51   29.46 -0.0547
    17        1.5s80.5e      80.5E      1.5S       1   16-APR-2017 12:00   29.63   29.58 -0.0533
    17        1.5s80.5e      80.5E      1.5S       1   21-APR-2017 12:00     ...   29.85     ...
 
    18           10s10w        10W       10S       1   15-JAN-2017 12:00     ...     ...     ...
    18           10s10w        10W       10S       1   20-JAN-2017 12:00     ...     ...     ...
    18           10s10w        10W       10S       1   25-JAN-2017 12:00     ...     ...     ...
    18           10s10w        10W       10S       1   30-JAN-2017 12:00     ...     ...     ...
    18           10s10w        10W       10S       1   04-FEB-2017 12:00     ...     ...     ...
    18           10s10w        10W       10S       1   09-FEB-2017 12:00     ...     ...     ...
    18           10s10w        10W       10S       1   14-FEB-2017 12:00     ...     ...     ...
    18           10s10w        10W       10S       1   19-FEB-2017 12:00     ...     ...     ...
    18           10s10w        10W       10S       1   24-FEB-2017 12:00     ...     ...     ...
    18           10s10w        10W       10S       1   01-MAR-2017 12:00     ...     ...     ...
    18           10s10w        10W       10S       1   06-MAR-2017 12:00     ...     ...     ...
    18           10s10w        10W       10S       1   08-MAR-2017 12:00     ...   27.26     ...
    18           10s10w        10W       10S       1   09-MAR-2017 12:00   27.25   27.24 -0.0028
    18           10s10w        10W       10S       1   10-MAR-2017 12:00   27.23   27.23 -0.0044
    18           10s10w        10W       10S       1   11-MAR-2017 12:00   27.24   27.23 -0.0107
    18           10s10w        10W       10S       1   12-MAR-2017 12:00   27.27   27.26 -0.0113
    18           10s10w        10W       10S       1   13-MAR-2017 12:00   27.33   27.33  0.0007
    18           10s10w        10W       10S       1   14-MAR-2017 12:00   27.39   27.39  0.0007
    18           10s10w        10W       10S       1   15-MAR-2017 12:00   27.45   27.45  0.0027
    18           10s10w        10W       10S       1   16-MAR-2017 12:00   27.50   27.51  0.0100
    18           10s10w        10W       10S       1   17-MAR-2017 12:00   27.53   27.53  0.0033
    18           10s10w        10W       10S       1   18-MAR-2017 12:00   27.55   27.55 -0.0040
    18           10s10w        10W       10S       1   19-MAR-2017 12:00   27.58   27.57 -0.0040
    18           10s10w        10W       10S       1   20-MAR-2017 12:00   27.61   27.61 -0.0027
    18           10s10w        10W       10S       1   21-MAR-2017 12:00   27.66   27.66 -0.0060
    18           10s10w        10W       10S       1   22-MAR-2017 12:00   27.74   27.72 -0.0193
    18           10s10w        10W       10S       1   27-MAR-2017 12:00   27.80   27.84  0.0433
    18           10s10w        10W       10S       1   01-APR-2017 12:00   27.80   27.83  0.0327
    18           10s10w        10W       10S       1   06-APR-2017 12:00   27.75   27.73 -0.0207
    18           10s10w        10W       10S       1   11-APR-2017 12:00   27.70   27.68 -0.0147
    18           10s10w        10W       10S       1   16-APR-2017 12:00   27.71   27.68 -0.0240
    18           10s10w        10W       10S       1   21-APR-2017 12:00     ...   27.76     ...
 
! ... smoothed results should not be changed by obs filtering
list/e=17:18/t=15-feb-2017:15-mar-2017 t_25[t=@sbx], t_25, t_25-t_25[t=@sbx]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : TIME: 19-FEB-2017 12:00 to 14-MAR-2017 12:00
              E (instance): 17 to 18
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C) (box smoothed by 3 pts, each Timeseries-id)
 T_25       is Sea Surface Temperature (degree_C)
 EX#3       is T_25-T_25[T=@SBX]
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME        T_25    T_25    EX#3
 
    17        1.5s80.5e      80.5E      1.5S       1   19-FEB-2017 12:00   29.05   29.02 -0.0280
    17        1.5s80.5e      80.5E      1.5S       1   24-FEB-2017 12:00   29.09   29.09 -0.0080
    17        1.5s80.5e      80.5E      1.5S       1   01-MAR-2017 12:00   29.15   29.18  0.0273
    17        1.5s80.5e      80.5E      1.5S       1   02-MAR-2017 12:00   29.16   29.19  0.0280
    17        1.5s80.5e      80.5E      1.5S       1   03-MAR-2017 12:00   29.14   29.11 -0.0247
    17        1.5s80.5e      80.5E      1.5S       1   04-MAR-2017 12:00   29.10   29.11  0.0100
    17        1.5s80.5e      80.5E      1.5S       1   05-MAR-2017 12:00   29.10   29.08 -0.0173
    17        1.5s80.5e      80.5E      1.5S       1   06-MAR-2017 12:00   29.13   29.11 -0.0247
    17        1.5s80.5e      80.5E      1.5S       1   07-MAR-2017 12:00   29.21   29.20 -0.0127
    17        1.5s80.5e      80.5E      1.5S       1   08-MAR-2017 12:00   29.31   29.34  0.0247
    17        1.5s80.5e      80.5E      1.5S       1   09-MAR-2017 12:00   29.40   29.40 -0.0013
    17        1.5s80.5e      80.5E      1.5S       1   10-MAR-2017 12:00   29.47   29.46 -0.0107
    17        1.5s80.5e      80.5E      1.5S       1   11-MAR-2017 12:00   29.55   29.56  0.0087
    17        1.5s80.5e      80.5E      1.5S       1   12-MAR-2017 12:00   29.63   29.63  0.0000
    17        1.5s80.5e      80.5E      1.5S       1   13-MAR-2017 12:00   29.70   29.70 -0.0080
    17        1.5s80.5e      80.5E      1.5S       1   14-MAR-2017 12:00   29.80   29.79 -0.0107
 
    18           10s10w        10W       10S       1   19-FEB-2017 12:00     ...     ...     ...
    18           10s10w        10W       10S       1   24-FEB-2017 12:00     ...     ...     ...
    18           10s10w        10W       10S       1   01-MAR-2017 12:00     ...     ...     ...
    18           10s10w        10W       10S       1   06-MAR-2017 12:00     ...     ...     ...
    18           10s10w        10W       10S       1   08-MAR-2017 12:00     ...   27.26     ...
    18           10s10w        10W       10S       1   09-MAR-2017 12:00   27.25   27.24 -0.0028
    18           10s10w        10W       10S       1   10-MAR-2017 12:00   27.23   27.23 -0.0044
    18           10s10w        10W       10S       1   11-MAR-2017 12:00   27.24   27.23 -0.0107
    18           10s10w        10W       10S       1   12-MAR-2017 12:00   27.27   27.26 -0.0113
    18           10s10w        10W       10S       1   13-MAR-2017 12:00   27.33   27.33  0.0007
    18           10s10w        10W       10S       1   14-MAR-2017 12:00   27.39   27.39  0.0007
 
! ... smoothing along E axis also allowed (but is it useful?)
list rowsize, rowsize[e=@sbx] - rowsize
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 ROWSIZE    is Number of Observations for this TimeSeries
 EX#2       is ROWSIZE[E=@SBX] - ROWSIZE
    FEATURE  STATION     LONGITUDE  LATITUDE ROWSIZE    EX#2
     1             0n0e         0E         0   37.00     ...
     2            0n10w        10W         0   37.00   -4.00
     3           0n110w       110W         0   25.00    8.00
     4           0n125w       125W         0   37.00   -4.00
     5           0n140w       140W         0   37.00    0.00
     6           0n155w       155W         0   37.00    0.00
     7           0n156e       156E         0   37.00    0.00
     8           0n165e       165E         0   37.00    0.00
     9           0n170w       170W         0   37.00   -1.33
    10            0n23w        23W         0   33.00    2.67
    11            0n67e        67E         0   37.00   -1.33
    12          0n80.5e      80.5E         0   37.00    0.00
    13            0n90e        90E         0   37.00   -1.67
    14            0n95w        95W         0   32.00    3.33
    15          1.5n67e        67E      1.5N   37.00   -1.67
    16          1.5s67e        67E      1.5S   37.00    0.00
    17        1.5s80.5e      80.5E      1.5S   37.00   -1.67
    18           10s10w        10W       10S   32.00    3.33
    19           12n23w        23W       12N   37.00   -1.67
    20           12n90e        90E       12N   37.00    0.00
    21         12s80.5e      80.5E       12S   37.00   -2.00
    22           12s93e        93E       12S   31.00    4.00
    23           14s32w        32W       14S   37.00   -2.00
    24           15n90e        90E       15N   37.00    0.00
    25           19s34w        34W       19S   37.00    0.00
    26           20n38w        38W       20N   37.00    0.00
    27           21n23w        23W       21N   37.00    0.00
    28           2n125w       125W        2N   37.00    0.00
    29           2n140w       140W        2N   37.00    0.00
    30           2n155w       155W        2N   37.00  -11.00
    31           2n170w       170W        2N    4.00   10.00
    32           2n180w       180E        2N    1.00   13.00
    33           2s110w       110W        2S   37.00  -12.00
    34           2s125w       125W        2S   37.00    0.00
    35           2s140w       140W        2S   37.00    0.00
    36           2s155w       155W        2S   37.00    0.00
    37           2s165e       165E        2S   37.00   -0.33
    38           2s170w       170W        2S   36.00   -3.67
    39           2s180w       180E        2S   24.00    8.33
    40            4n23w        23W        4N   37.00   -5.00
    41            4n90e        90E        4N   35.00    1.33
    42            4s57e        57E        4S   37.00   -0.67
    43          4s80.5e      80.5E        4S   37.00    0.00
    44           5n125w       125W        5N   37.00    0.00
    45           5n140w       140W        5N   37.00   -9.67
    46           5n155w       155W        5N    8.00   19.33
    47           5n165e       165E        5N   37.00   -9.67
    48           5n170w       170W        5N   37.00    0.00
    49           5n180w       180E        5N   37.00    0.00
    50           5s125w       125W        5S   37.00    0.00
    51           5s140w       140W        5S   37.00  -10.67
    52           5s155w       155W        5S    5.00   21.33
    53           5s170w       170W        5S   37.00  -10.67
    54           5s180w       180E        5S   37.00    0.00
    55            5s95e        95E        5S   37.00   -2.33
    56            6s10w        10W        6S   30.00    4.67
    57             6s8e         8E        6S   37.00   -2.33
    58           8n125w       125W        8N   37.00    0.00
    59           8n137e       137E        8N   37.00    0.00
    60           8n180w       180E        8N   37.00    0.00
    61            8n90e        90E        8N   37.00   -9.33
    62            8n95w        95W        8N    9.00   18.67
    63           8s125w       125W        8S   37.00   -9.33
    64           8s155w       155W        8S   37.00    0.00
    65           8s165e       165E        8S   37.00    0.00
    66           8s170w       170W        8S   37.00   -0.33
    67           8s180w       180E        8S   36.00    0.67
    68            8s55e        55E        8S   37.00   -0.33
    69            8s95e        95E        8S   37.00    0.00
    70           9n140w       140W        9N   37.00     ...
 
! ... identical smoothing result, despite feature filtering
list/e=67:70 rowsize, rowsize[e=@sbx] - rowsize
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 67 to 70
 STATION    is Timeseries-id
 ROWSIZE    is Number of Observations for this TimeSeries
 EX#2       is ROWSIZE[E=@SBX] - ROWSIZE
    FEATURE  STATION     LONGITUDE  LATITUDE ROWSIZE    EX#2
    67           8s180w       180E        8S   36.00  0.6667
    68            8s55e        55E        8S   37.00 -0.3333
    69            8s95e        95E        8S   37.00  0.0000
    70           9n140w       140W        9N   37.00     ...
 
! tbd tests
! - regridding
*** Running ferret script: bn_regrid_to_dsg.jnl
! bn_regrid_to_dsg.jnl
 
! test regridding of gridded data to a DSG target
 
 
! DSGTBD: as of 5/2017 there is more to test.  This tests only
!    - coordinate-complete xyzt source data and coordinate-complete DSG
!    not tested are under- and over-specified situations
!      under-specified:
!        3D XYZ model being sampled onto a 2D XY DSG
!        user would need to specify how to reduce Z limits to a point
!        using a LET definition, say,  LET my_z_restricted = my_var[Z=@ave]
!      over-specified
!        fixed time XYZ model being sampled onto an XYT trajectory DSG
!
! 8/19 adding tests for
!   grid-to-trajectory
!   grid-to-profile
 
 
use DSG_ERDDAP_Tao5daySst.nc
 
! create a test dataset
! fake "temp" values are actually the latitude values
! ******
define axis/t=1-jan-2017:1-apr-2017:3/unit=days tfake
define axis/y=20s:20n:1 yfake
define axis/x=0:359:1/unit=degrees/modulo xfake
define axis/z=0:2:.5/unit=meters zfake
define grid/x=xfake/y=yfake/z=zfake/t=tfake gfake
let/title=Temperature temp = y[g=gfake] + 0*(x[g=gfake]+z[g=gfake]+t[g=gfake])
save/clobber/file=fake_model_temp.nc/outtype=float temp
cancel variables/all
! ******
 
! demonstrate regridding model data to DSG using file data
USE fake_model_temp.nc
 
! regrid of time series
list/x=160e:170e temp[d=fake_model_temp,g=t_25[d=DSG_ERDDAP_Tao5daySst]]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : LONGITUDE: 165
 STATION    is Timeseries-id
 TEMP       is Temperature  (regrid: to Timeseries DSG grid)
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME        TEMP
 
     8           0n165e       165E         0       1   15-JAN-2017 12:00   0.000
     8           0n165e       165E         0       1   20-JAN-2017 12:00   0.000
     8           0n165e       165E         0       1   25-JAN-2017 12:00   0.000
     8           0n165e       165E         0       1   30-JAN-2017 12:00   0.000
     8           0n165e       165E         0       1   04-FEB-2017 12:00   0.000
     8           0n165e       165E         0       1   09-FEB-2017 12:00   0.000
     8           0n165e       165E         0       1   14-FEB-2017 12:00   0.000
     8           0n165e       165E         0       1   19-FEB-2017 12:00   0.000
     8           0n165e       165E         0       1   24-FEB-2017 12:00   0.000
     8           0n165e       165E         0       1   01-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   02-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   03-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   04-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   05-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   06-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   07-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   08-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   09-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   10-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   11-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   12-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   13-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   14-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   15-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   16-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   17-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   18-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   19-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   20-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   21-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   22-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   27-MAR-2017 12:00   0.000
     8           0n165e       165E         0       1   01-APR-2017 12:00   0.000
     8           0n165e       165E         0       1   06-APR-2017 12:00     ...
     8           0n165e       165E         0       1   11-APR-2017 12:00     ...
     8           0n165e       165E         0       1   16-APR-2017 12:00     ...
     8           0n165e       165E         0       1   21-APR-2017 12:00     ...
 
    37           2s165e       165E        2S       1   15-JAN-2017 12:00  -2.000
    37           2s165e       165E        2S       1   20-JAN-2017 12:00  -2.000
    37           2s165e       165E        2S       1   25-JAN-2017 12:00  -2.000
    37           2s165e       165E        2S       1   30-JAN-2017 12:00  -2.000
    37           2s165e       165E        2S       1   04-FEB-2017 12:00  -2.000
    37           2s165e       165E        2S       1   09-FEB-2017 12:00  -2.000
    37           2s165e       165E        2S       1   14-FEB-2017 12:00  -2.000
    37           2s165e       165E        2S       1   19-FEB-2017 12:00  -2.000
    37           2s165e       165E        2S       1   24-FEB-2017 12:00  -2.000
    37           2s165e       165E        2S       1   01-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   02-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   03-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   04-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   05-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   06-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   07-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   08-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   09-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   10-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   11-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   12-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   13-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   14-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   15-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   16-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   17-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   18-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   19-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   20-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   21-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   22-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   27-MAR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   01-APR-2017 12:00  -2.000
    37           2s165e       165E        2S       1   06-APR-2017 12:00     ...
    37           2s165e       165E        2S       1   11-APR-2017 12:00     ...
    37           2s165e       165E        2S       1   16-APR-2017 12:00     ...
    37           2s165e       165E        2S       1   21-APR-2017 12:00     ...
 
    47           5n165e       165E        5N       1   15-JAN-2017 12:00   5.000
    47           5n165e       165E        5N       1   20-JAN-2017 12:00   5.000
    47           5n165e       165E        5N       1   25-JAN-2017 12:00   5.000
    47           5n165e       165E        5N       1   30-JAN-2017 12:00   5.000
    47           5n165e       165E        5N       1   04-FEB-2017 12:00   5.000
    47           5n165e       165E        5N       1   09-FEB-2017 12:00   5.000
    47           5n165e       165E        5N       1   14-FEB-2017 12:00   5.000
    47           5n165e       165E        5N       1   19-FEB-2017 12:00   5.000
    47           5n165e       165E        5N       1   24-FEB-2017 12:00   5.000
    47           5n165e       165E        5N       1   01-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   06-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   07-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   08-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   09-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   10-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   11-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   12-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   13-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   14-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   15-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   16-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   17-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   18-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   19-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   20-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   21-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   22-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   23-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   24-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   25-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   26-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   27-MAR-2017 12:00   5.000
    47           5n165e       165E        5N       1   01-APR-2017 12:00   5.000
    47           5n165e       165E        5N       1   06-APR-2017 12:00     ...
    47           5n165e       165E        5N       1   11-APR-2017 12:00     ...
    47           5n165e       165E        5N       1   16-APR-2017 12:00     ...
    47           5n165e       165E        5N       1   21-APR-2017 12:00     ...
 
    65           8s165e       165E        8S       1   15-JAN-2017 12:00  -8.000
    65           8s165e       165E        8S       1   20-JAN-2017 12:00  -8.000
    65           8s165e       165E        8S       1   25-JAN-2017 12:00  -8.000
    65           8s165e       165E        8S       1   30-JAN-2017 12:00  -8.000
    65           8s165e       165E        8S       1   04-FEB-2017 12:00  -8.000
    65           8s165e       165E        8S       1   09-FEB-2017 12:00  -8.000
    65           8s165e       165E        8S       1   14-FEB-2017 12:00  -8.000
    65           8s165e       165E        8S       1   19-FEB-2017 12:00  -8.000
    65           8s165e       165E        8S       1   24-FEB-2017 12:00  -8.000
    65           8s165e       165E        8S       1   01-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   06-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   07-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   08-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   09-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   10-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   11-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   12-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   13-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   14-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   15-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   16-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   17-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   18-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   19-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   20-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   21-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   22-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   23-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   24-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   25-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   26-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   27-MAR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   01-APR-2017 12:00  -8.000
    65           8s165e       165E        8S       1   06-APR-2017 12:00     ...
    65           8s165e       165E        8S       1   11-APR-2017 12:00     ...
    65           8s165e       165E        8S       1   16-APR-2017 12:00     ...
    65           8s165e       165E        8S       1   21-APR-2017 12:00     ...
cancel mem/all
SET MODE DIAG
! notice that the X-restricted LOAD requests a smaller X subscript range
load/x=160e:170e temp[d=fake_model_temp,g=t_25[d=DSG_ERDDAP_Tao5daySst]]
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          FEATURE_X FEATURE_Y FEATURE_Z FEATURE_T FEATURES  NORMAL
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   2 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1   2376  M: -999 -999  N: -999 -999
 strip regrid on T: TEMP --> GNV2             @NRST
 reading TEMP     M:  2 dset:   2 I:    161    171  J:    2   41  K:    3    4  L:      6     31
 regrid  TEMP     M:  1 dset:   2 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1   2376  M: -999 -999  N: -999 -999
load temp[d=fake_model_temp,g=t_25[d=DSG_ERDDAP_Tao5daySst]]
 eval    EX#1     C:  4 dset:   2 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1   2376  M: -999 -999  N: -999 -999
 strip regrid on T: TEMP --> GNV2             @NRST
 reading TEMP     M:  5 dset:   2 I:      1    351  J:    2   41  K:    3    4  L:      6     31
 regrid  TEMP     M:  4 dset:   2 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1   2376  M: -999 -999  N: -999 -999
SET MODE/LAST DIAG
 
! now the same thing, but sampling from a uvar instead of an fvar
define axis/t=1-jan-2017:1-apr-2017:3/unit=days tlittle
define axis/y=20.01s:20n:1 ylittle ! offset a little from an exact hit
define axis/x=0:359:1/unit=degrees/modulo xlittle
define axis/z=0:2:.5/unit=meters zlittle
define grid/x=xlittle/y=ylittle/z=zlittle/t=tlittle glittle
let/title=Temperature little_temp = y[g=glittle] + 0*(x[g=glittle]+z[g=glittle]+t[g=glittle])
list/x=160e:170e little_temp[g=t_25[d=DSG_ERDDAP_Tao5daySst]]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : LONGITUDE: 165
 STATION     is Timeseries-id
 LITTLE_TEMP is Temperature  (regrid: to Timeseries DSG grid)
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME     LITTLE_TEMP
 
     8           0n165e       165E         0       1   15-JAN-2017 12:00  -0.010
     8           0n165e       165E         0       1   20-JAN-2017 12:00  -0.010
     8           0n165e       165E         0       1   25-JAN-2017 12:00  -0.010
     8           0n165e       165E         0       1   30-JAN-2017 12:00  -0.010
     8           0n165e       165E         0       1   04-FEB-2017 12:00  -0.010
     8           0n165e       165E         0       1   09-FEB-2017 12:00  -0.010
     8           0n165e       165E         0       1   14-FEB-2017 12:00  -0.010
     8           0n165e       165E         0       1   19-FEB-2017 12:00  -0.010
     8           0n165e       165E         0       1   24-FEB-2017 12:00  -0.010
     8           0n165e       165E         0       1   01-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   02-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   03-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   04-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   05-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   06-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   07-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   08-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   09-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   10-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   11-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   12-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   13-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   14-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   15-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   16-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   17-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   18-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   19-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   20-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   21-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   22-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   27-MAR-2017 12:00  -0.010
     8           0n165e       165E         0       1   01-APR-2017 12:00  -0.010
     8           0n165e       165E         0       1   06-APR-2017 12:00     ...
     8           0n165e       165E         0       1   11-APR-2017 12:00     ...
     8           0n165e       165E         0       1   16-APR-2017 12:00     ...
     8           0n165e       165E         0       1   21-APR-2017 12:00     ...
 
    37           2s165e       165E        2S       1   15-JAN-2017 12:00  -2.010
    37           2s165e       165E        2S       1   20-JAN-2017 12:00  -2.010
    37           2s165e       165E        2S       1   25-JAN-2017 12:00  -2.010
    37           2s165e       165E        2S       1   30-JAN-2017 12:00  -2.010
    37           2s165e       165E        2S       1   04-FEB-2017 12:00  -2.010
    37           2s165e       165E        2S       1   09-FEB-2017 12:00  -2.010
    37           2s165e       165E        2S       1   14-FEB-2017 12:00  -2.010
    37           2s165e       165E        2S       1   19-FEB-2017 12:00  -2.010
    37           2s165e       165E        2S       1   24-FEB-2017 12:00  -2.010
    37           2s165e       165E        2S       1   01-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   02-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   03-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   04-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   05-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   06-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   07-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   08-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   09-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   10-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   11-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   12-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   13-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   14-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   15-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   16-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   17-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   18-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   19-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   20-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   21-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   22-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   27-MAR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   01-APR-2017 12:00  -2.010
    37           2s165e       165E        2S       1   06-APR-2017 12:00     ...
    37           2s165e       165E        2S       1   11-APR-2017 12:00     ...
    37           2s165e       165E        2S       1   16-APR-2017 12:00     ...
    37           2s165e       165E        2S       1   21-APR-2017 12:00     ...
 
    47           5n165e       165E        5N       1   15-JAN-2017 12:00   4.990
    47           5n165e       165E        5N       1   20-JAN-2017 12:00   4.990
    47           5n165e       165E        5N       1   25-JAN-2017 12:00   4.990
    47           5n165e       165E        5N       1   30-JAN-2017 12:00   4.990
    47           5n165e       165E        5N       1   04-FEB-2017 12:00   4.990
    47           5n165e       165E        5N       1   09-FEB-2017 12:00   4.990
    47           5n165e       165E        5N       1   14-FEB-2017 12:00   4.990
    47           5n165e       165E        5N       1   19-FEB-2017 12:00   4.990
    47           5n165e       165E        5N       1   24-FEB-2017 12:00   4.990
    47           5n165e       165E        5N       1   01-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   06-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   07-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   08-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   09-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   10-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   11-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   12-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   13-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   14-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   15-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   16-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   17-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   18-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   19-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   20-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   21-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   22-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   23-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   24-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   25-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   26-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   27-MAR-2017 12:00   4.990
    47           5n165e       165E        5N       1   01-APR-2017 12:00   4.990
    47           5n165e       165E        5N       1   06-APR-2017 12:00     ...
    47           5n165e       165E        5N       1   11-APR-2017 12:00     ...
    47           5n165e       165E        5N       1   16-APR-2017 12:00     ...
    47           5n165e       165E        5N       1   21-APR-2017 12:00     ...
 
    65           8s165e       165E        8S       1   15-JAN-2017 12:00  -8.010
    65           8s165e       165E        8S       1   20-JAN-2017 12:00  -8.010
    65           8s165e       165E        8S       1   25-JAN-2017 12:00  -8.010
    65           8s165e       165E        8S       1   30-JAN-2017 12:00  -8.010
    65           8s165e       165E        8S       1   04-FEB-2017 12:00  -8.010
    65           8s165e       165E        8S       1   09-FEB-2017 12:00  -8.010
    65           8s165e       165E        8S       1   14-FEB-2017 12:00  -8.010
    65           8s165e       165E        8S       1   19-FEB-2017 12:00  -8.010
    65           8s165e       165E        8S       1   24-FEB-2017 12:00  -8.010
    65           8s165e       165E        8S       1   01-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   06-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   07-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   08-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   09-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   10-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   11-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   12-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   13-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   14-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   15-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   16-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   17-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   18-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   19-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   20-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   21-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   22-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   23-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   24-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   25-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   26-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   27-MAR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   01-APR-2017 12:00  -8.010
    65           8s165e       165E        8S       1   06-APR-2017 12:00     ...
    65           8s165e       165E        8S       1   11-APR-2017 12:00     ...
    65           8s165e       165E        8S       1   16-APR-2017 12:00     ...
    65           8s165e       165E        8S       1   21-APR-2017 12:00     ...
 
! Test some plots: the legend line samples should be labeled with the station IDs
let regridded_var = temp[d=2,g=t_25[d=1]]
 
set v ul; plot/x=160e:170e t_25[d=1]
set v ur; plot/x=160e:170e regridded_var
 
set v ll; plot/m=35:43 t_25[d=1]
set v lr; plot/m=35:43 regridded_var
frame/file=regrid_to_dsg_ts.gif
cancel view
 
! ******* scatter/gather tests
! see what happens when the source data is too big for memory
! ==> STRIP/GATHER on T axis
define axis/t=1-jan-2017:1-apr-2017:.3/unit=days tbig
define axis/y=20.001s:20n:.5 ybig   ! offset a tiny bit from an exact hit
define axis/x=0:359:2/unit=degrees/modulo xbig
define axis/z=0:2:.1/unit=meters zbig
define grid/x=xbig/y=ybig/z=zbig/t=tbig gbig
let/title=Temperature big_temp = y[g=gbig] + 0*(x[g=gbig]+z[g=gbig]+t[g=gbig])
say `big_temp,r=size`
 !-> MESSAGE/CONTINUE 92672181
92672181
load big_temp[g=t_25[d=DSG_ERDDAP_Tao5daySst]]
SHOW MEMORY/DIAGNOSTIC
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        BIG_TEMP       T               131           1
    Total table slots: 500
    Free table slots: 489
    Un-cached variables: 0
    SET MEMORY/MAX: 500 Mb   (62.5 megawords)
    Peak demand: 88.54 Mb
    Current cache: 175.01 Mb
!stat big_temp[g=t_25[d=DSG_ERDDAP_Tao5daySst]] ! not yet DSG-enabled
 
! Again, this time with T axis size inadequate, so split occurs on Z
! (same size source data but 1/100 as many time points)
! ==> STRIP/GATHER on ****Z*** axis
define axis/t=1-jan-2017:1-apr-2017:`.3*100`/unit=days tbigz
 !-> define axis/t=1-jan-2017:1-apr-2017:30/unit=days tbigz
define axis/y=20.001s:20n:.5 ybigz   ! offset a tiny bit from an exact hit
define axis/x=0:359:2/unit=degrees/modulo xbigz
define axis/z=0:2:`.1/100`/unit=meters zbigz
 !-> define axis/z=0:2:0.001/unit=meters zbigz
define grid/x=xbigz/y=ybigz/z=zbigz/t=tbigz gbigz
let/title=Temperature bigz_temp = y[g=gbigz] + 0*(x[g=gbigz]+z[g=gbigz]+t[g=gbigz])
say `bigz_temp,r=size`
 !-> MESSAGE/CONTINUE 117346644
117346644
load bigz_temp[g=t_25[d=DSG_ERDDAP_Tao5daySst]]
SHOW MEMORY/DIAGNOSTIC
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        BIGZ_TEMP      T                 1           1
    Total table slots: 500
    Free table slots: 486
    Un-cached variables: 0
    SET MEMORY/MAX: 500 Mb   (62.5 megawords)
    Peak demand: 88.54 Mb
    Current cache: 229.08 Mb
!stat bigz_temp[g=t_25[d=DSG_ERDDAP_Tao5daySst]] ! not yet DSG-enabled
 
! by constraining the request (in X) the needed source data is reduced
! (I:81     86  J:    3   81  K:   11   16  L:     49    301)
cancel memory/all
SET MODE DIAG
load/x=160e:170e big_temp[g=t_25[d=DSG_ERDDAP_Tao5daySst]]
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid BIG_TEMP C:  7 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          FEATURE_X FEATURE_Y FEATURE_Z FEATURE_T FEATURES  NORMAL
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   2 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1   2376  M: -999 -999  N: -999 -999
 strip regrid on T: BIG_TEMP --> GNV2             @NRST
 eval    BIG_TEMP C:  8 dset:   0 I:     81     86  J:    3   81  K:   11   16  L:     49    301
 pseudo  Y        M: 10 dset:   0 I:   -999   -999  J:    3   81  K: -999 -999  L:   -999   -999
 constan cnst     M:  9 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  X        M:  7 dset:   0 I:     81     86  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  Z        M:  5 dset:   0 I:   -999   -999  J: -999 -999  K:   11   16  L:   -999   -999
 -DELETE Z        M:  5 dset:   0 I:   -999   -999  J: -999 -999  K:   11   16  L:   -999   -999
 -DELETE X        M:  7 dset:   0 I:     81     86  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  T        M:  7 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:     49    301
 -DELETE T        M:  7 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:     49    301
 -DELETE tpry     M:  4 dset:   0 I:     81     86  J: -999 -999  K:   11   16  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE tpry     M:  5 dset:   0 I:     81     86  J: -999 -999  K:   11   16  L:     49    301  M: -999 -999  N: -999 -999
 -DELETE cnst     M:  9 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE tpry     M:  4 dset:   0 I:     81     86  J: -999 -999  K:   11   16  L:     49    301  M: -999 -999  N: -999 -999
 -DELETE Y        M: 10 dset:   0 I:   -999   -999  J:    3   81  K: -999 -999  L:   -999   -999
 regrid  BIG_TEMP M: 10 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1   2376  M: -999 -999  N: -999 -999
 
! constraining on E implicitly constrains XYZT, too
!(I:    118    118  J:   31   31  K:   11   11  L:     49    301)
cancel memory/all
 dealloc  dynamic grid (G###)          FEATURE_X FEATURE_Y FEATURE_Z FEATURE_T FEATURES  NORMAL
 -DELETE BIG_TEMP M:  9 dset:   0 I:     81     86  J:    3   81  K:   11   16  L:     49    301
 -DELETE BIG_TEMP M: 10 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1   2376  M: -999 -999  N: -999 -999
 dealloc  dynamic grid GBIG            XBIG      YBIG      ZBIG      TBIG
load/e=50 big_temp[g=t_25[d=DSG_ERDDAP_Tao5daySst]]
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 getgrid BIG_TEMP C:  7 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          FEATURE_X FEATURE_Y FEATURE_Z FEATURE_T FEATURES  NORMAL
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   2 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1   2376  M: -999 -999  N: -999 -999
 strip regrid on T: BIG_TEMP --> GNV2             @NRST
 eval    BIG_TEMP C:  8 dset:   0 I:    118    118  J:   31   31  K:   11   11  L:     49    301
 pseudo  Y        M: 10 dset:   0 I:   -999   -999  J:   31   31  K: -999 -999  L:   -999   -999
 constan cnst     M:  9 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  X        M:  4 dset:   0 I:    118    118  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  Z        M:  5 dset:   0 I:   -999   -999  J: -999 -999  K:   11   11  L:   -999   -999
 -DELETE Z        M:  5 dset:   0 I:   -999   -999  J: -999 -999  K:   11   11  L:   -999   -999
 -DELETE X        M:  4 dset:   0 I:    118    118  J: -999 -999  K: -999 -999  L:   -999   -999
 pseudo  T        M:  4 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:     49    301
 -DELETE T        M:  4 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:     49    301
 -DELETE tpry     M:  7 dset:   0 I:    118    118  J: -999 -999  K:   11   11  L:   -999   -999  M: -999 -999  N: -999 -999
 -DELETE tpry     M:  5 dset:   0 I:    118    118  J: -999 -999  K:   11   11  L:     49    301  M: -999 -999  N: -999 -999
 -DELETE cnst     M:  9 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:   -999   -999
 -DELETE tpry     M:  7 dset:   0 I:    118    118  J: -999 -999  K:   11   11  L:     49    301  M: -999 -999  N: -999 -999
 -DELETE Y        M: 10 dset:   0 I:   -999   -999  J:   31   31  K: -999 -999  L:   -999   -999
 regrid  BIG_TEMP M: 10 dset:   0 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1   2376  M: -999 -999  N: -999 -999
SET MODE/LAST DIAG
 
! Gridded-to-Trajectory
cancel data/all
cancel var/all
 
use sail_2019.nc
 
define axis/t=17-may-2019:20-may-2019:1/units=hours tfake
define axis/x=-168:-165:0.2/units=degrees_east xfake
define axis/y=54:57:0.2/units=degrees_north yfake
define grid/x=xfake/y=yfake/t=tfake gfake
let/title="Gridded Temp"/Units="Degrees_C" temp = y[g=gfake] + 0*(x[g=gfake]+t[g=gfake])
save/clobber/file=fake_model_temp.nc/outtype=float temp
can var/all
 
! The data is latitude values
use fake_model_temp.nc
 
set v ul
plot temp[d=2,g=temp_ctd_rbr_mean[d=1]]
 
! With a title
set v ur
LET/title="Temp grid2DSG" temp_from_grid = temp[d=2,g=temp_ctd_rbr_mean[d=1]]
plot temp_from_grid
 
! test modulo in X
define axis/t=17-may-2019:20-may-2019:1/units=hours tfake
define axis/x=192:195:0.2/units=degrees_east xfake
define axis/y=54:57:0.2/units=degrees_north yfake
define grid/x=xfake/y=yfake/t=tfake gfake
let/title="Gridded Temp"/Units="Degrees_C" temp = y[g=gfake] + 0*(x[g=gfake]+t[g=gfake])
save/clobber/file=fake_model_temp.nc/outtype=float temp
can var/all
 
use fake_model_temp.nc
 
set v ll
plot/title="Modulo Longitudes" temp[d=2,g=temp_ctd_rbr_mean[d=1]]
 
set v lr
LET/title="grid2DSG w/ mod" temp_from_grid = temp[d=2,g=temp_ctd_rbr_mean[d=1]]
plot temp_from_grid
frame/file=regrid_to_dsg_trajec.gif
cancel view
 
! constrain in T and E
set mode diag
list/e=2/t="18-may-2019:12:00":"19-MAY-2019 23:00" temp[d=2,g=temp_ctd_rbr_mean[d=1]]
 dealloc  dynamic grid (G###)          FEATURE_X FEATURE_Y NORMAL    FEATURE_T FEATURES  NORMAL
 getgrid EX#1     C:  5 dset:   2 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          FEATURE_X FEATURE_Y NORMAL    FEATURE_T FEATURES  NORMAL
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   2 I:      1    116  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
 strip regrid on X: TEMP --> GDZ2             @NRST
 found   TEMP     M: 10 dset:   2 I:    -10     -6  J:    5   10  K: -999 -999  L:     15     72
 regrid  TEMP     M:  4 dset:   2 I:      1    116  J: -999 -999  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
   DATA SET: ./data/sail_2019.nc
   SUBSET   : TIME: 1558184340 to 1558306740
              E (instance): 2
 TRAJECTORY is Trajectory-id
 TEMP       is Gridded Temp (Degrees_C) (regrid: to Trajectory DSG grid)
    FEATURE  TRAJECTORY  LONGITUDE  LATITUDE            TIME        TEMP
 
     2           1034.0  166.5074W   55.334N   18-MAY-2019 12:59   55.40
     2           1034.0  166.5316W   55.374N   18-MAY-2019 13:59   55.40
     2           1034.0  166.5482W   55.396N   18-MAY-2019 14:59   55.40
     2           1034.0  166.5717W   55.409N   18-MAY-2019 15:59   55.40
     2           1034.0  166.5842W   55.435N   18-MAY-2019 16:59   55.40
     2           1034.0  166.6096W    55.45N   18-MAY-2019 17:59   55.40
     2           1034.0  166.6174W   55.469N   18-MAY-2019 18:59   55.40
     2           1034.0  166.6393W   55.485N   18-MAY-2019 19:59   55.40
     2           1034.0  166.6653W   55.502N   18-MAY-2019 20:59   55.60
     2           1034.0  166.6846W   55.524N   18-MAY-2019 21:59   55.60
     2           1034.0  166.7024W   55.552N   18-MAY-2019 22:59   55.60
     2           1034.0   166.722W   55.577N   18-MAY-2019 23:59   55.60
     2           1034.0  166.7408W   55.601N   19-MAY-2019 00:59   55.60
     2           1034.0  166.7416W   55.618N   19-MAY-2019 01:59   55.60
     2           1034.0  166.7378W   55.637N   19-MAY-2019 02:59   55.60
     2           1034.0  166.7346W   55.648N   19-MAY-2019 03:59   55.60
     2           1034.0  166.7262W   55.648N   19-MAY-2019 04:59   55.60
     2           1034.0  166.7179W   55.643N   19-MAY-2019 05:59   55.60
     2           1034.0  166.7172W   55.636N   19-MAY-2019 06:59   55.60
     2           1034.0  166.7212W    55.63N   19-MAY-2019 07:59   55.60
     2           1034.0  166.7272W   55.625N   19-MAY-2019 08:59   55.60
     2           1034.0  166.7391W   55.624N   19-MAY-2019 09:59   55.60
     2           1034.0  166.7433W    55.63N   19-MAY-2019 10:59   55.60
     2           1034.0   166.748W    55.64N   19-MAY-2019 11:59   55.60
     2           1034.0  166.7553W   55.651N   19-MAY-2019 12:59   55.60
     2           1034.0  166.7629W   55.661N   19-MAY-2019 13:59   55.60
     2           1034.0  166.7648W   55.667N   19-MAY-2019 14:59   55.60
     2           1034.0  166.7687W   55.672N   19-MAY-2019 15:59   55.60
     2           1034.0  166.7739W   55.678N   19-MAY-2019 16:59   55.60
     2           1034.0  166.7828W   55.682N   19-MAY-2019 17:59   55.60
     2           1034.0    166.79W   55.683N   19-MAY-2019 18:59   55.60
     2           1034.0  166.8006W   55.684N   19-MAY-2019 19:59   55.60
     2           1034.0  166.8183W   55.687N   19-MAY-2019 20:59   55.60
     2           1034.0  166.8353W   55.694N   19-MAY-2019 21:59   55.60
     2           1034.0   166.848W   55.705N   19-MAY-2019 22:59   55.80
can mode diag
 
! finer grid, do we get scatter/gather?
can dat/all
define symbol save_mem = ($ferret_memory)
 !-> define symbol save_mem = 62.5
set mem/siz=2mb
 
use sail_2019.nc
 
! Test scatter/gather
define axis/t=17-may-2019:20-may-2019:1/units=minutes tbig
 
define axis/x=0:359:.5/unit=degrees/modulo xbig
define axis/y=54:57:0.2/units=degrees_north ybig
define grid/x=xbig/y=ybig/t=tbig gbig
let big_temp = y[g=gbig] + 0*(x[g=gbig]+t[g=gbig])
 
say `big_temp,r=size`
 !-> MESSAGE/CONTINUE 49708784
49708784
 
load big_temp[g=temp_ctd_rbr_mean[d=1]]
show mem/diag
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        BIG_TEMP       T              2426           1
    Total table slots: 500
    Free table slots: 497
    Un-cached variables: 0
    SET MEMORY/MAX: 2 Mb   (250000 words)
    Peak demand: 407.62 Kb
    Current cache: 493.55 Kb
 
set mem/siz=($save_mem)
 !-> set mem/siz=62.5
 
! Gridded-to-profile
cancel data/all
cancel var/all
 
! Make some fake gridded data: Z from the gridded z axis,
! with small variations in X and Y
 
define axis/t=11-aug-2009:14-aug-2009:6/units=hours tfake
define axis/x=236:240:0.5/units=degrees_east/modulo xfake
define axis/y=35:45:0.5/units=degrees_north yfake
define axis/z=0:35:1/depth/unit=meters zfake
define grid/x=xfake/y=yfake/z=zfake/t=tfake gfake
let/title="z from grid with a little xy" zz = z[g=gfake] + 0.05*x[g=gfake]+ 0.1* y[g=gfake]+ 0*t[g=gfake]
save/clobber/file=fake_model_temp.nc/outtype=float zz
cancel variables/all
 
! ******
! demonstrate regridding model data to DSG using file data
 
! The depths are listed from deepest to shallowest in each profile
 
use  profile_dsg_downup
list/e=1 depth
   DATA SET: ./data/profile_dsg_downup.nc
   SUBSET   : E (instance): 1
 PROFILE    is Profile-id
 DEPTH      is DEPTH_M (m)
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME       DEPTH
 
     1       1             123.14W     41.3N 33.2111   13-AUG-2009 00:00   33.21
     1       1             123.14W     41.3N 31.5953   13-AUG-2009 00:00   31.60
     1       1             123.14W     41.3N 24.9692   13-AUG-2009 00:00   24.97
     1       1             123.14W     41.3N 20.5466   13-AUG-2009 00:00   20.55
     1       1             123.14W     41.3N  15.312   13-AUG-2009 00:00   15.31
     1       1             123.14W     41.3N 10.1546   13-AUG-2009 00:00   10.15
     1       1             123.14W     41.3N  4.9567   13-AUG-2009 00:00    4.96
     1       1             123.14W     41.3N    2.12   13-AUG-2009 00:00    2.12
 
USE fake_model_temp.nc
list zz[d=fake_model_temp,g=temp[d=1]]
   DATA SET: ./data/profile_dsg_downup.nc
 PROFILE    is Profile-id
 ZZ         is z from grid with a little xy  (regrid: to Profile DSG grid)
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME          ZZ
 
     1       1             123.14W     41.3N 33.2111   13-AUG-2009 00:00   49.00
     1       1             123.14W     41.3N 31.5953   13-AUG-2009 00:00   48.00
     1       1             123.14W     41.3N 24.9692   13-AUG-2009 00:00   41.00
     1       1             123.14W     41.3N 20.5466   13-AUG-2009 00:00   37.00
     1       1             123.14W     41.3N  15.312   13-AUG-2009 00:00   31.00
     1       1             123.14W     41.3N 10.1546   13-AUG-2009 00:00   26.00
     1       1             123.14W     41.3N  4.9567   13-AUG-2009 00:00   21.00
     1       1             123.14W     41.3N    2.12   13-AUG-2009 00:00   18.00
 
     2       2              120.4W    44.11N 33.2111   13-AUG-2009 12:58   49.38
     2       2              120.4W    44.11N 32.2686   13-AUG-2009 12:58   48.38
     2       2              120.4W    44.11N  30.491   13-AUG-2009 12:58   46.38
     2       2              120.4W    44.11N 26.6257   13-AUG-2009 12:58   43.38
     2       2              120.4W    44.11N  23.495   13-AUG-2009 12:58   39.38
     2       2              120.4W    44.11N 20.9152   13-AUG-2009 12:58   37.38
     2       2              120.4W    44.11N 17.9293   13-AUG-2009 12:58   34.38
     2       2              120.4W    44.11N 14.8822   13-AUG-2009 12:58   31.38
     2       2              120.4W    44.11N 11.8737   13-AUG-2009 12:58   28.38
     2       2              120.4W    44.11N  8.8551   13-AUG-2009 12:58   25.38
     2       2              120.4W    44.11N   5.823   13-AUG-2009 12:58   22.38
     2       2              120.4W    44.11N  3.7747   13-AUG-2009 12:58   20.38
     2       2              120.4W    44.11N    2.12   13-AUG-2009 12:58   18.38
 
     3       3                121W     38.8N  23.495   12-AUG-2009 00:00   38.85
     3       3                121W     38.8N 20.9152   12-AUG-2009 00:00   36.85
     3       3                121W     38.8N 17.9293   12-AUG-2009 00:00   33.85
     3       3                121W     38.8N 14.8822   12-AUG-2009 00:00   30.85
     3       3                121W     38.8N 11.8737   12-AUG-2009 00:00   27.85
     3       3                121W     38.8N  8.8551   12-AUG-2009 00:00   24.85
     3       3                121W     38.8N   5.823   12-AUG-2009 00:00   21.85
     3       3                121W     38.8N  3.7747   12-AUG-2009 00:00   19.85
     3       3                121W     38.8N    2.12   12-AUG-2009 00:00   17.85
 
cancel data/all
 
! The depths in this file are listed from shallowest to deepest in each profile.
! The results are the same, only inverted.
 
use  profile_dsg_updown
USE fake_model_temp.nc
list zz[d=fake_model_temp,g=temp[d=1]]
   DATA SET: ./data/profile_dsg_updown.nc
 PROFILE    is Profile-id
 ZZ         is z from grid with a little xy  (regrid: to Profile DSG grid)
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME          ZZ
 
     1       1             123.14W     41.3N    2.12   13-AUG-2009 00:00   18.00
     1       1             123.14W     41.3N    4.96   13-AUG-2009 00:00   21.00
     1       1             123.14W     41.3N   10.15   13-AUG-2009 00:00   26.00
     1       1             123.14W     41.3N   15.31   13-AUG-2009 00:00   31.00
     1       1             123.14W     41.3N   20.55   13-AUG-2009 00:00   37.00
     1       1             123.14W     41.3N   24.97   13-AUG-2009 00:00   41.00
     1       1             123.14W     41.3N    31.6   13-AUG-2009 00:00   48.00
     1       1             123.14W     41.3N   33.21   13-AUG-2009 00:00   49.00
 
     2       2              120.4W    44.11N    2.12   13-AUG-2009 12:58   18.38
     2       2              120.4W    44.11N    3.77   13-AUG-2009 12:58   20.38
     2       2              120.4W    44.11N    5.82   13-AUG-2009 12:58   22.38
     2       2              120.4W    44.11N    8.86   13-AUG-2009 12:58   25.38
     2       2              120.4W    44.11N   11.87   13-AUG-2009 12:58   28.38
     2       2              120.4W    44.11N   14.88   13-AUG-2009 12:58   31.38
     2       2              120.4W    44.11N   17.93   13-AUG-2009 12:58   34.38
     2       2              120.4W    44.11N   20.92   13-AUG-2009 12:58   37.38
     2       2              120.4W    44.11N    23.5   13-AUG-2009 12:58   39.38
     2       2              120.4W    44.11N   26.63   13-AUG-2009 12:58   43.38
     2       2              120.4W    44.11N   30.49   13-AUG-2009 12:58   46.38
     2       2              120.4W    44.11N   32.27   13-AUG-2009 12:58   48.38
     2       2              120.4W    44.11N   33.21   13-AUG-2009 12:58   49.38
 
     3       3                121W     38.8N    2.12   12-AUG-2009 00:00   17.85
     3       3                121W     38.8N    3.77   12-AUG-2009 00:00   19.85
     3       3                121W     38.8N    5.82   12-AUG-2009 00:00   21.85
     3       3                121W     38.8N    8.86   12-AUG-2009 00:00   24.85
     3       3                121W     38.8N   11.87   12-AUG-2009 00:00   27.85
     3       3                121W     38.8N   14.88   12-AUG-2009 00:00   30.85
     3       3                121W     38.8N   17.93   12-AUG-2009 00:00   33.85
     3       3                121W     38.8N   20.92   12-AUG-2009 00:00   36.85
     3       3                121W     38.8N    23.5   12-AUG-2009 00:00   38.85
 
! Just list a point or two out of the grid.  They match the above
list/nohead/x=120.4W/y= 44.11N/z=26.6257/l=1 zz
          43.38
list/nohead/x=121W/y=38.8/z=14.8822/L=1 zz
          30.85
 
*** Running ferret script: bn_dsg_feature_mask.jnl
! bn_dsg_feature_mask
! 9/4/2018
! Tests of selecting features via a mask
! PLOT/MASKFEATURE var, mask
 
use dsg_cross_prime.nc
 
! Mask must be the length of feature-direction axis
! Incoming missing-flag on the mask is handled internally
 
let/bad=-99 emask = {1,-99,1}
set data/fmask=emask 1
 
! Mask info listed with SHOW DATA
show data
     currently SET data sets:
    1> ./data/dsg_cross_prime.nc  (default)
       DSG Feature type Trajectory
Mask on features has been set: {1,-99,1}
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:3       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:3       ...
 LONS     longitude                      tot 18      ...       ...       ...       1:3       ...
 LATS     latitude                       tot 18      ...       ...       ...       1:3       ...
 SST      Temperature                    tot 18      ...       ...       ...       1:3       ...
 TIME     Centered Time                  tot 18      ...       ...       ...       1:3       ...
 
 
! Mask applied on a listing
list sst
   DATA SET: ./data/dsg_cross_prime.nc
Mask on features has been set: {1,-99,1}
 ID         is Trajectory-id
 SST        is Temperature (Degrees C)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME         SST
 
     1       1000               6W       20S   09-FEB-2017 12:00   24.41
     1       1000               2E       10S   14-FEB-2017 12:00   25.22
     1       1000               5W       30N   19-FEB-2017 12:00   25.92
     1       1000               3E       40N   24-FEB-2017 12:00   28.97
     1       1000               1E       20S   01-MAR-2017 12:00   28.03
 
     3       3000              15W       15S   10-MAR-2017 12:00   23.41
     3       3000               5W       25S   11-MAR-2017 12:00   20.77
     3       3000               1E       35S   12-MAR-2017 12:00   19.97
     3       3000               5E       45S   13-MAR-2017 12:00   19.05
     3       3000              10E       55S   14-MAR-2017 12:00   18.27
 
! redefine the mask. If the length still matches the mask is replaced.
 
let emask = {,1,1}
set data/fmask=emask 1
list sst
   DATA SET: ./data/dsg_cross_prime.nc
Mask on features has been set: {,1,1}
 ID         is Trajectory-id
 SST        is Temperature (Degrees C)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME         SST
 
     2       2000              70W       15S   02-MAR-2017 12:00   27.77
     2       2000              20E       20N   03-MAR-2017 12:00   26.91
     2       2000              30E       10N   04-MAR-2017 12:00   26.07
     2       2000              60W       15S   05-MAR-2017 12:00   25.08
     2       2000              50W       20N   06-MAR-2017 12:00   24.01
     2       2000              10W       10N   07-MAR-2017 12:00   23.53
     2       2000              50W       15S   08-MAR-2017 12:00   22.64
     2       2000               5E       20N   09-MAR-2017 12:00   21.64
 
     3       3000              15W       15S   10-MAR-2017 12:00   23.41
     3       3000               5W       25S   11-MAR-2017 12:00   20.77
     3       3000               1E       35S   12-MAR-2017 12:00   19.97
     3       3000               5E       45S   13-MAR-2017 12:00   19.05
     3       3000              10E       55S   14-MAR-2017 12:00   18.27
 
! Use a new mask-var
let onefeature = {,1,}
set data/fmask=onefeature 1
list sst
   DATA SET: ./data/dsg_cross_prime.nc
Mask on features has been set: {,1,}
 ID         is Trajectory-id
 SST        is Temperature (Degrees C)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME         SST
 
     2       2000              70W       15S   02-MAR-2017 12:00   27.77
     2       2000              20E       20N   03-MAR-2017 12:00   26.91
     2       2000              30E       10N   04-MAR-2017 12:00   26.07
     2       2000              60W       15S   05-MAR-2017 12:00   25.08
     2       2000              50W       20N   06-MAR-2017 12:00   24.01
     2       2000              10W       10N   07-MAR-2017 12:00   23.53
     2       2000              50W       15S   08-MAR-2017 12:00   22.64
     2       2000               5E       20N   09-MAR-2017 12:00   21.64
 
! Open more datasets and define masks for them.
 
use WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc
set var/units=units pco2
 
let/title="Where Profile is 80,86,87,88" mask = element_index (profile,{80,86,87,88})
 
set data/fmask=mask 2
show data
     currently SET data sets:
    1> ./data/dsg_cross_prime.nc
       DSG Feature type Trajectory
Mask on features has been set: {,1,}
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:3       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:3       ...
 LONS     longitude                      tot 18      ...       ...       ...       1:3       ...
 LATS     latitude                       tot 18      ...       ...       ...       1:3       ...
 SST      Temperature                    tot 18      ...       ...       ...       1:3       ...
 TIME     Centered Time                  tot 18      ...       ...       ...       1:3       ...
 
    2> ./data/WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc  (default)
       DSG Feature type Profile
Mask on features has been set: Where Profile is 80,86,87,88
 name     title                             I         J         K         L         M         N
 PROF     Prof                             ...       ...       ...       ...       1:21      ...
 PROFILE  profile ID: Cruise and Station   ...       ...       ...       ...       1:21      ...
 TIME     Time                             ...       ...       ...       ...       1:21      ...
 LATITUDE Latitude                         ...       ...       ...       ...       1:21      ...
 LONGITUDE
          Longitude                        ...       ...       ...       ...       1:21      ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:21      ...
 PRESS_DB PRESS_DB                         ...       ...     tot 373     ...       1:21      ...
 PCO2     PCO2                             ...       ...     tot 373     ...       1:21      ...
 
set v ul
plot pco2
 
let/title="Where Longitude < 121W" mask =  if longitude lt -121 then 1
set v ur
plot pco2
 
use DSG_ERDDAP_Tao5daySst.nc
 
! This mask doesn't have the right nfeatures length for datset 2 so
! the feature-mask "mask" that was on dataset 2 is canceled.
 
let/title="Where station is 8s125w, 8s170w, 5n155w, 2s165e"  mask = element_index_str (station, {"8s125w", "8s170w", "5n155w", "2s165e"})
 
set data/fmask=mask 3
 
set v lower
set var/title=Temperature/units="Deg C" t_25
plot/color/thick t_25
 
frame/file=dsg_traj_feature_mask.gif
 
 
! All the datasets are still open.  The mask on dataset 2
! is now removed as the variable that defined it was changed.
 
show data
     currently SET data sets:
    1> ./data/dsg_cross_prime.nc
       DSG Feature type Trajectory
Mask on features has been set: {,1,}
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:3       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:3       ...
 LONS     longitude                      tot 18      ...       ...       ...       1:3       ...
 LATS     latitude                       tot 18      ...       ...       ...       1:3       ...
 SST      Temperature                    tot 18      ...       ...       ...       1:3       ...
 TIME     Centered Time                  tot 18      ...       ...       ...       1:3       ...
 
    2> ./data/WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc
       DSG Feature type Profile
 name     title                             I         J         K         L         M         N
 PROF     Prof                             ...       ...       ...       ...       1:21      ...
 PROFILE  profile ID: Cruise and Station   ...       ...       ...       ...       1:21      ...
 TIME     Time                             ...       ...       ...       ...       1:21      ...
 LATITUDE Latitude                         ...       ...       ...       ...       1:21      ...
 LONGITUDE
          Longitude                        ...       ...       ...       ...       1:21      ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:21      ...
 PRESS_DB PRESS_DB                         ...       ...     tot 373     ...       1:21      ...
 PCO2     PCO2                             ...       ...     tot 373     ...       1:21      ...
 
    3> ./data/DSG_ERDDAP_Tao5daySst.nc  (default)
       DSG Feature type Timeseries
Mask on features has been set: Where station is 8s125w, 8s170w, 5n155w, 2s165e
 name     title                             I         J         K         L         M         N
 ARRAY    Array                            ...       ...       ...       ...       1:70      ...
 STATION  Station                          ...       ...       ...       ...       1:70      ...
 WMO_PLATFORM_CODE
          WMO Platform Code                ...       ...       ...       ...       1:70      ...
 LONGITUDE
          Nominal Longitude                ...       ...       ...       ...       1:70      ...
 LATITUDE Nominal Latitude                 ...       ...       ...       ...       1:70      ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:70      ...
 TIME     Centered Time                    ...       ...       ...     tot 2376    1:70      ...
 DEPTH    Depth                            ...       ...       ...     tot 2376    1:70      ...
 T_25     Temperature                      ...       ...       ...     tot 2376    1:70      ...
 QT_5025  Sea Surface Temperature Quality  ...       ...       ...     tot 2376    1:70      ...
 ST_6025  Sea Surface Temperature Source   ...       ...       ...     tot 2376    1:70      ...
 STR_TEMP FLOATSTR(T_25, "(F5.2)")         ...       ...       ...     tot 2376    1:70      ...
 
set data 1
list sst
   DATA SET: ./data/dsg_cross_prime.nc
Mask on features has been set: {,1,}
 ID         is Trajectory-id
 SST        is Temperature (Degrees C)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME         SST
 
     2       2000              70W       15S   02-MAR-2017 12:00   27.77
     2       2000              20E       20N   03-MAR-2017 12:00   26.91
     2       2000              30E       10N   04-MAR-2017 12:00   26.07
     2       2000              60W       15S   05-MAR-2017 12:00   25.08
     2       2000              50W       20N   06-MAR-2017 12:00   24.01
     2       2000              10W       10N   07-MAR-2017 12:00   23.53
     2       2000              50W       15S   08-MAR-2017 12:00   22.64
     2       2000               5E       20N   09-MAR-2017 12:00   21.64
 
! Cancel data/FMASK
 
cancel data/fmask 2
show data 2
     currently SET data sets:
    2> ./data/WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc
       DSG Feature type Profile
 name     title                             I         J         K         L         M         N
 PROF     Prof                             ...       ...       ...       ...       1:21      ...
 PROFILE  profile ID: Cruise and Station   ...       ...       ...       ...       1:21      ...
 TIME     Time                             ...       ...       ...       ...       1:21      ...
 LATITUDE Latitude                         ...       ...       ...       ...       1:21      ...
 LONGITUDE
          Longitude                        ...       ...       ...       ...       1:21      ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:21      ...
 PRESS_DB PRESS_DB                         ...       ...     tot 373     ...       1:21      ...
 PCO2     PCO2                             ...       ...     tot 373     ...       1:21      ...
 
 
show data 1
     currently SET data sets:
    1> ./data/dsg_cross_prime.nc  (default)
       DSG Feature type Trajectory
Mask on features has been set: {,1,}
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:3       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:3       ...
 LONS     longitude                      tot 18      ...       ...       ...       1:3       ...
 LATS     latitude                       tot 18      ...       ...       ...       1:3       ...
 SST      Temperature                    tot 18      ...       ...       ...       1:3       ...
 TIME     Centered Time                  tot 18      ...       ...       ...       1:3       ...
 
 
*** Running ferret script: bn_dsg_repeat_m.jnl
! bn_dsg_repeat_m.jnl
! Can repeat over M to look at individual features
!  10/3/2018
 
 
use dsg_cross_dateline
repeat/m=1:3 (list temp)
!-> REPEAT: M=1
   DATA SET: ./data/dsg_cross_dateline.nc
   SUBSET   : E (instance): 1
 ID         is Trajectory-id
 TEMP       is Temperature (Degrees C)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME        TEMP
 
     1     096U20160108       172E       20S   09-FEB-2017 12:00   28.08
     1     096U20160108       174W       10S   14-FEB-2017 12:00   28.20
     1     096U20160108       175E       30N   19-FEB-2017 12:00   29.01
     1     096U20160108       171W       40N   24-FEB-2017 12:00   29.24
     1     096U20160108       174W       20S   01-MAR-2017 12:00   29.14
!-> REPEAT: M=2
   DATA SET: ./data/dsg_cross_dateline.nc
   SUBSET   : E (instance): 2
 ID         is Trajectory-id
 TEMP       is Temperature (Degrees C)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME        TEMP
 
     2     A 2017 01 14       150E       15S   02-MAR-2017 12:00   29.57
     2     A 2017 01 14       170W       20N   03-MAR-2017 12:00   29.26
     2     A 2017 01 14       120E       10N   04-MAR-2017 12:00   28.53
!-> REPEAT: M=3
   DATA SET: ./data/dsg_cross_dateline.nc
   SUBSET   : E (instance): 3
 ID         is Trajectory-id
 TEMP       is Temperature (Degrees C)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME        TEMP
 
     3     09AR20151209       102E       10N   05-MAR-2017 12:00   28.97
     3     09AR20151209       100E       20N   06-MAR-2017 12:00   28.03
     3     09AR20151209       123E       30N   07-MAR-2017 12:00   27.77
     3     09AR20151209       100E       40N   08-MAR-2017 12:00   26.91
     3     09AR20151209       110E       50N   09-MAR-2017 12:00   26.07
 
plot temp
repeat/m=1:3 (plot/over/nolab/thick/sym=18/siz=`_m*0.1` temp)
!-> REPEAT: M=1
 !-> plot/over/nolab/thick/sym=18/siz=0.1 temp
!-> REPEAT: M=2
 !-> plot/over/nolab/thick/sym=18/siz=0.2 temp
!-> REPEAT: M=3
 !-> plot/over/nolab/thick/sym=18/siz=0.3 temp
 
! A time-series with one point previously was an error now plots a point
use DSG_ERDDAP_Tao5daySst.nc
repeat/m=30:32 (plot/color=blue/thick t_25)
!-> REPEAT: M=30
!-> REPEAT: M=31
!-> REPEAT: M=32
 
use WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d
plot pco2
repeat/m=2:6:2 (plot/thick/color=blue pco2)
!-> REPEAT: M=2
!-> REPEAT: M=4
!-> REPEAT: M=6
*** Running ferret script: bn_dsg_traj_plot.jnl
! bn_dsg_traj_plot.jnl
!  4/24/2018 ACM
!
! Trajectory plots:
!   * Automatically pick up the pen between trajectories
!   * If only lon, lat given and it's a dsg trajectory, color-by feature
!   * Trajectories which cross the dateline, e.g. longitude lists such as
!       {-178, -179, 177} or {354, 355, 3, 1}
!       are corrected internally, only when drawing.
 
! Set up to mimic fland and basemap behavior
use coads_climatology
let land = if sst[d=1,L=1] then 0 else 1
 
! Picking up the pen between trajectories
! Correcting for crossing the prime meridion or dateline
 
use dsg_cross_prime
 
! classic method: plot/vs/ribbon with 3 vars.
! This will still work, but no need for the /GAPVAR
! construct of earlier Ferret versions.  Also handles
! modulo longitude
 
set view upper
plot/vs/ribbon/line/thick/lev=v lons, lats, sst
 
! Or, call to just PLOT SST makes the trajectory plot.
 
set view lower
plot/vs/ribbon/line/thick/lev=v sst
frame/file=dsg_traj_1.gif
cancel view
 
! Overlay on a map
 
set view ul
shade/x=-180:180/y=-80:80/pal=gray_light/lev=(1)/nokey/nolab land
 
! Note how the longitudes cross the prime meridion within trajectories
use dsg_cross_prime
 
list lons
   DATA SET: ./data/dsg_cross_prime.nc
 ID         is Trajectory-id
 LONS       is longitude (degrees_east)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME        LONS
 
     1       1000               6W       20S   09-FEB-2017 12:00   354.0
     1       1000               2E       10S   14-FEB-2017 12:00     2.0
     1       1000               5W       30N   19-FEB-2017 12:00   355.0
     1       1000               3E       40N   24-FEB-2017 12:00     3.0
     1       1000               1E       20S   01-MAR-2017 12:00     1.0
 
     2       2000              70W       15S   02-MAR-2017 12:00   290.0
     2       2000              20E       20N   03-MAR-2017 12:00    20.0
     2       2000              30E       10N   04-MAR-2017 12:00    30.0
     2       2000              60W       15S   05-MAR-2017 12:00   300.0
     2       2000              50W       20N   06-MAR-2017 12:00   310.0
     2       2000              10W       10N   07-MAR-2017 12:00   350.0
     2       2000              50W       15S   08-MAR-2017 12:00   310.0
     2       2000               5E       20N   09-MAR-2017 12:00     5.0
 
     3       3000              15W       15S   10-MAR-2017 12:00   345.0
     3       3000               5W       25S   11-MAR-2017 12:00   355.0
     3       3000               1E       35S   12-MAR-2017 12:00     1.0
     3       3000               5E       45S   13-MAR-2017 12:00     5.0
     3       3000              10E       55S   14-MAR-2017 12:00    10.0
plot/nolab/over/line/thick/key sst
 
 
! or overlay land as in "go fland"
! The region is set by the lon/lat data in the dsg file
 
set view ur
plot/line/thick/lev=v sst
shade/over/nolab/pal=gray_light/lev=(1)/nokey/nolab land
 
! Test longitudes crossing the dateline
 
set view ll
shade/x=0:360/y=-80:80/pal=gray_light/lev=(1)/nokey/nolab land
 
use dsg_cross_dateline
list lons
   DATA SET: ./data/dsg_cross_dateline.nc
 ID         is Trajectory-id
 LONS       is longitude (degrees_east)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME        LONS
 
     1     096U20160108       172E       20S   09-FEB-2017 12:00   172.0
     1     096U20160108       174W       10S   14-FEB-2017 12:00  -174.0
     1     096U20160108       175E       30N   19-FEB-2017 12:00   175.0
     1     096U20160108       171W       40N   24-FEB-2017 12:00  -171.0
     1     096U20160108       174W       20S   01-MAR-2017 12:00  -174.0
 
     2     A 2017 01 14       150E       15S   02-MAR-2017 12:00   150.0
     2     A 2017 01 14       170W       20N   03-MAR-2017 12:00  -170.0
     2     A 2017 01 14       120E       10N   04-MAR-2017 12:00   120.0
 
     3     09AR20151209       102E       10N   05-MAR-2017 12:00   102.0
     3     09AR20151209       100E       20N   06-MAR-2017 12:00   100.0
     3     09AR20151209       123E       30N   07-MAR-2017 12:00   123.0
     3     09AR20151209       100E       40N   08-MAR-2017 12:00   100.0
     3     09AR20151209       110E       50N   09-MAR-2017 12:00   110.0
plot/over/line/thick/pal=ten_by_levels/key=horiz id
 
! These contain some wacky longitude values, -1741, 999.
! The algorithm cannot correct and issues a NOTE, but still
! draws the plot.
 
set view lr
shade/x=0:360/y=-80:80/pal=gray_light/lev=(1)/nokey/nolab land
 
use dsg_cross_dateline_bad.nc
list lons
   DATA SET: ./data/dsg_cross_dateline_bad.nc
 ID         is Trajectory-id
 LONS       is longitude (degrees_east)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME        LONS
 
     1       1000             172E       20S   09-FEB-2017 12:00    172.
     1       1000             174E       10S   14-FEB-2017 12:00    174.
     1       1000             175E       30N   19-FEB-2017 12:00    175.
     1       1000              88E       40N   24-FEB-2017 12:00  -1712.
     1       1000             174W       20S   01-MAR-2017 12:00   -174.
 
     2       2000             150E       15S   02-MAR-2017 12:00    150.
     2       2000             170W       20N   03-MAR-2017 12:00   -170.
     2       2000             120E       10N   04-MAR-2017 12:00    120.
 
     3       3000             100E       10N   05-MAR-2017 12:00    100.
     3       3000             100E       20N   06-MAR-2017 12:00    100.
     3       3000              81W       30N   07-MAR-2017 12:00    999.
     3       3000             100E       40N   08-MAR-2017 12:00    100.
     3       3000             100E       50N   09-MAR-2017 12:00    100.
plot/over/line/thick/key/pal=ten_by_levels/pal=ten_by_levels id
 
frame/file=dsg_traj_2.gif
cancel view
 
! Plot a variable colored by feature number,using PLOT/VS/RIBBON
! Use PLOT/VS for plots in other directions than lon/lat trajectories.
! When coloring by ID, the labels on color keys are automatically centered
 
use dsg_cross_dateline.nc
set view upper
plot/vs/ribbon/line/thick/pal=ten_by_levels lons, temp,  id
 
set view lower
plot/vs/ribbon/line/thick/key=hor/pal=ten_by_levels time, temp, id
frame/file=dsg_traj_3.gif
 
! Label by any feature-level metadata variable, whether it's numeric, string,
! the ID or something else. Labels drawn at an angle if not enough space along key.
 
cancel data/all
cancel view
 
use dsg_cross_dateline
set view ul
plot/thick/pal=ten_by_levels id
 
use dsg_string_id
show data
     currently SET data sets:
    1> ./data/dsg_cross_dateline.nc
       DSG Feature type Trajectory
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:3       ...
 ROWSIZE  Number of Obs                    ...       ...       ...       ...       1:3       ...
 LONS     longitude                      tot 13      ...       ...       ...       1:3       ...
 LATS     latitude                       tot 13      ...       ...       ...       1:3       ...
 TEMP     Temperature                    tot 13      ...       ...       ...       1:3       ...
 TIME     Centered Time                  tot 13      ...       ...       ...       1:3       ...
 
    2> ./data/dsg_string_id.nc  (default)
       DSG Feature type Trajectory
 name     title                             I         J         K         L         M         N
 ID       Institution                      ...       ...       ...       ...       1:3       ...
 INSTITUTION
                                           ...       ...       ...       ...       1:3       ...
 ROWSIZE  Number of Obs                    ...       ...       ...       ...       1:3       ...
 LONS     longitude                      tot 13      ...       ...       ...       1:3       ...
 LATS     latitude                       tot 13      ...       ...       ...       1:3       ...
 TEMP     Temperature                    tot 13      ...       ...       ...       1:3       ...
 TIME     Centered Time                  tot 13      ...       ...       ...       1:3       ...
 
set view ll
plot/line/thick/pal=ten_by_levels id
 
define view/x=0.6:0.9/y=0.5:1 upnarrow
 
set view upnarrow
plot/nolab/line/thick/pal=ten_by_levels/key=horiz institution
set v lr
plot/nolab/line/thick/pal=ten_by_levels rowsize
 
frame/file=dsg_traj_4.gif
*** Running ferret script: bn_regrid_from_dsg.jnl
! bn_regrid_from_dsg.jnl
 
! test regridding from a DSG obs variable to a uniform orthogonal grid
 
! DSGTBD: as of 5/2017 there is more to test.  This tests only
!    - algebra involving the result gridded variable with other grids
!      (this grid still possesses the special E axis of the DSG)
!
! 8/19 adding tests for
!   Trajectory-to-grid requests (not implemented, return an error message)
!   Profile dsg regrid to common z axis.
 
use DSG_ERDDAP_Tao5daySst.nc
 
define axis/t="15-jan-2017:12:00":21-apr-2017:10/unit=days tuniform ! hit L=1
 
! basic, no constraints
list/e=1/t=15-jan-2017:20-jan-2017 t_25, L[g=t_25] ! note result on first tstep
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : TIME: 15-JAN-2017 12:00
              E (instance): 1
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C)
 L          is L  (axis FEATURE_T)
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME        T_25       L
 
     1             0n0e         0E         0       1   15-JAN-2017 12:00   28.59    1.00
list/prec=6 t_25[gt=tuniform]
             VARIABLE : Sea Surface Temperature (degree_C)
                        regrid: 10 day on T
             DATA SET : TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
             FILENAME : DSG_ERDDAP_Tao5daySst.nc
             SUBSET   : 11 by 70 points (TIME-E (instance))
               2017     2017     2017     2017     2017     2017     2017     2017     2017     2017     2017   
                1        2        3        4        5        6        7        8        9       10       11
 1    /  1:  28.5920  28.7760  28.7420  28.7600  29.1500  29.2140  29.8120  29.6185  29.6332  29.2128     ....
 2    /  2:  27.7240  28.7060  28.4840  28.1220  28.1340  28.3160  29.3875  29.5972  29.0836  28.7504     ....
 3    /  3:  25.4366  23.7251  26.4731  26.6892     ....  26.1460  27.6172     ....     ....     ....     ....
 4    /  4:  24.8498  24.2374  25.3987  26.1627  26.2862  25.9022  26.5002  26.7776  27.2821  27.6250     ....
 5    /  5:  25.2489  25.4793  25.5672  26.0399  25.8833  26.0190  26.4824  26.8117  27.0898  27.3055     ....
 6    /  6:  25.1945  25.9425  25.7298  26.3807  26.2529  26.4760  27.0917  26.6732  26.8219  27.9954     ....
 7    /  7:  30.3540  30.5840  30.3660  30.4500  30.4400  30.6440  30.2680  29.5260  30.0400  30.1984     ....
 8    /  8:  30.3981  30.3727  30.1519  29.8793  29.8631  28.5404  28.2173  28.4462  28.7372  28.7229     ....
 9    /  9:  27.0630  26.9899  26.2345  26.9052  26.6382  27.1968  27.0887  26.9299  27.2341  27.7690     ....
 10   / 10:  27.8860  28.1380  27.7960  27.9540  28.5480  27.8580  28.2600  28.8528  28.4828  29.1004     ....
 11   / 11:  28.2540  28.8200  29.0100  28.9660  28.4640  29.5260  29.9500  30.2040  30.0756  30.1932     ....
 12   / 12:  28.2440  28.9260  28.8960  29.2260  29.0820  29.5260  30.1320  29.9952  29.7636  29.6692     ....
 13   / 13:     ....     ....     ....     ....     ....  29.4160  29.4840  29.5608  29.6056  29.6308     ....
 14   / 14:  25.7181  24.9521  27.3566  28.2847  26.9854  26.8104  27.5947  27.2685     ....     ....     ....
 15   / 15:  27.9700  28.7060  28.5380  28.8880  28.3260  29.5140  29.7980  30.1564  30.2924  30.2900     ....
 16   / 16:  28.2400  29.0100  29.4720  29.1920  29.0300  29.4460  29.7920  30.3380  30.1608  30.3372     ....
 17   / 17:  28.3020  28.7020  28.7600  29.0340  29.0860  29.1060  29.9360  29.4824  29.5251  29.5528     ....
 18   / 18:     ....     ....     ....     ....     ....     ....  27.5080  27.8176  27.7492  27.6840     ....
 19   / 19:  25.4760  24.9180  24.7560  23.7380  23.4340  23.6860  24.2560  23.7380  24.3824  24.5140     ....
 20   / 20:  27.6960  27.6840  27.7520  27.8120  27.6000  28.3040  28.4620  28.5960  29.8980  29.5628     ....
 21   / 21:  28.2420  28.0200  28.6620  28.5680  28.7900  28.3020  27.9820  28.2404  28.1108  27.8932     ....
 22   / 22:  28.5980  28.5820  28.1380  27.9440  28.3150  28.2040  28.4620  28.5020  28.3712     ....     ....
 23   / 23:  27.4240  27.3260  27.2360  27.2820  27.5540  27.7660  27.6840  28.1072  28.1084  28.3300     ....
 24   / 24:  26.1660  27.0920  26.9700  26.9160  27.8820  28.5800  28.5680  28.7440  29.5280  29.0300     ....
 25   / 25:  27.6800  27.9160  27.8100  27.9420  28.0633  28.2200  28.2260  28.2480  28.1776  28.2492     ....
 26   / 26:  24.5840  24.4620  24.2280  23.9640  23.7660  23.6160  23.5150  23.4920  24.0564  24.7936     ....
 27   / 27:     ....     ....  21.5720  21.8760  21.5700  21.5220  21.2980  21.0720  21.1256  22.0844     ....
 28   / 28:     ....     ....     ....  26.4567  27.1763  26.3552  27.6875  28.1823  28.2683  26.9952     ....
 29   / 29:     ....  26.5156  26.7506  26.0196  27.1667  26.5549  27.2769  26.9398  27.1434  27.5755     ....
 30   / 30:  25.7479  26.4353  26.5793  26.7931  27.2645  27.5662  27.3482  27.3335  27.1543  27.5070     ....
 31   / 31:  26.9922  27.4433     ....     ....     ....     ....     ....     ....     ....     ....     ....
 32   / 32:  27.7854     ....     ....     ....     ....     ....     ....     ....     ....     ....     ....
 33   / 33:  25.5415  25.2389  26.3913  26.7600  27.7948  27.7852  27.9831  28.4924  28.2647  28.1384     ....
 34   / 34:  26.2452  24.9461  25.9084  26.5116  26.9698  27.5137  27.6385  28.2959  28.6393  29.1112     ....
 35   / 35:     ....     ....  26.3495  26.7855  26.2057  26.8354  27.4080  28.2481  27.9967  28.1523     ....
 36   / 36:  25.8985  25.9715  26.2936  27.0389  26.8928  27.2291  27.9907  27.9069  27.5886  28.7029     ....
 37   / 37:  30.2623  30.4153  30.0306  30.0713  29.7406  29.4690  28.8121  29.2035  29.3607  29.1690     ....
 38   / 38:  27.8394  27.1035  27.5206  27.4739  27.1443  27.7578  27.8452  27.8623  28.3230  28.7562     ....
 39   / 39:  28.9938  28.7350  28.1802  27.5728  28.5446  28.1318  27.5880     ....     ....     ....     ....
 40   / 40:  28.4340  28.3080  28.2180  28.1240  28.4220  28.9475  28.8440  28.3980  28.9268  29.4060     ....
 41   / 41:     ....     ....     ....     ....     ....  29.1375  29.6880  30.1492  30.3072  29.6312     ....
 42   / 42:  28.0540  28.1500  28.3640  29.4500  28.7240  28.8540  29.4620  30.1900  30.1239  30.2152     ....
 43   / 43:  28.1040  28.3540  28.5080  29.0960  29.0980  28.9320  30.0120  29.7232  30.0744  29.9796     ....
 44   / 44:     ....     ....     ....  27.2496  27.4631  27.3657  27.7322  27.9366  28.5746  28.4517     ....
 45   / 45:     ....  26.7640  27.2011  26.5482  27.0442  27.2886  27.6622  27.6954  27.8331  27.8372     ....
 46   / 46:  27.3683  27.3450  27.6267  27.0179     ....     ....     ....     ....     ....     ....     ....
 47   / 47:  29.9147  29.6577  29.7198  29.8171  29.7740  29.4614  29.4949  29.4805  29.2594  29.2837     ....
 48   / 48:  28.2716  27.8597  27.7603  28.6530  28.2802  28.4988  28.5393  28.3882  28.2995  28.3427     ....
 49   / 49:  28.7423  28.6722  28.4748  28.6287  28.5295  28.7298  28.6729  28.6525  28.6364  28.5579     ....
 50   / 50:  26.2561  25.9404  26.8452  27.4136  27.9795  28.2546  28.1749  28.5663  28.6967  28.8996     ....
 51   / 51:  27.1730  26.7001  26.9911  27.5523  28.3286  28.9153  28.0914  29.0374  29.3040  29.4568     ....
 52   / 52:  27.3951  27.5777  28.0065     ....     ....     ....     ....     ....     ....     ....     ....
 53   / 53:  29.1287  29.1422  28.8362  28.6983  28.8934  28.6024  28.8819  29.5393  29.2284  29.4523     ....
 54   / 54:  29.3837  29.2502  29.0386  28.4461  28.9853  29.4221  28.6646  29.4757  29.3935  29.5197     ....
 55   / 55:  28.7000  28.5540  28.1400  28.8620  28.8480  29.0040  28.8780  28.7688  29.1020  29.1036     ....
 56   / 56:     ....     ....     ....     ....     ....     ....  28.3840  28.4532  28.5500  28.7580     ....
 57   / 57:  28.6440  28.5380  28.0740  28.7200  29.0040  29.8660  30.1400  29.5188  29.6416  29.6120     ....
 58   / 58:  27.1523  27.1359  27.2200  27.1974  27.2224  27.3466  27.3929  27.6526  28.2239  28.3139     ....
 59   / 59:  29.3120  28.8040  28.7220  28.7660  29.1060  29.0440  28.9320  28.9468  28.7000  29.1040     ....
 60   / 60:  28.4406  28.3962  28.2732  28.1998  28.3050  28.5506  28.4365  28.4274  28.4004  28.3645     ....
 61   / 61:  28.2375  28.1260  28.1160  28.4840  28.5560  28.9700  29.1880  29.3680  30.3756  29.6456     ....
 62   / 62:  26.0229  26.6641  26.6652  26.7096  27.5338     ....     ....     ....     ....     ....     ....
 63   / 63:  27.1788  26.9122  27.3239  28.1166  28.1861  28.0019  28.3168  28.2539  28.4002  28.5951     ....
 64   / 64:  29.3147  29.1193  28.8509  28.8443  29.1033  29.2192  29.7817  29.6486  29.7789  30.0640     ....
 65   / 65:  30.3589  30.2227  30.3216  30.0064  29.8312  30.0418  30.2157  30.0931  30.0337  30.1482     ....
 66   / 66:  29.8820  29.7754  29.4475  29.6344  29.4614  29.7118  29.6645  29.6100  29.6053  29.7648     ....
 67   / 67:  30.2629  30.0338  29.8520  29.8723  30.0231  30.1067  30.1091  29.9767  29.7343  29.8142     ....
 68   / 68:  28.1640  27.5240  27.7300  28.8980  28.9840  28.4060  28.6680  29.0300  29.7376  29.5444     ....
 69   / 69:  28.9520  28.7580  28.8980  28.9860  29.2440  29.4020  29.0740  28.7880  28.9672  28.9272     ....
 70   / 70:  27.1724  26.5182  26.4219  27.2217  27.4353  27.4308  27.4538  27.1602  27.4573  27.5447     ....
canc mem/all
 
! compute only a subset of the gridded result
set mode diag
list/prec=6/e=29:34/l=3:7 t_25[gt=tuniform]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TUNIFORM  FEATURES  NORMAL
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TUNIFORM  FEATURES  NORMAL
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TUNIFORM  FEATURES  NORMAL
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      3      7  M:   29   34  N: -999 -999
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TUNIFORM  FEATURES  NORMAL
 strip regrid on T: T_25 --> (G###)           @LIN
 reading T_25     M:  2 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1   2376  M: -999 -999  N: -999 -999
 regrid  T_25     M:  1 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      3      7  M:   29   34  N: -999 -999
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TUNIFORM  FEATURES  NORMAL
             VARIABLE : Sea Surface Temperature (degree_C)
                        regrid: 10 day on T
             DATA SET : TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
             FILENAME : DSG_ERDDAP_Tao5daySst.nc
             SUBSET   : 5 by 6 points (TIME-E (instance))
               2017     2017     2017     2017     2017   
                3        4        5        6        7
 29   / 29:  26.7506  26.0196  27.1667  26.5549  27.2769
 30   / 30:  26.5793  26.7931  27.2645  27.5662  27.3482
 31   / 31:     ....     ....     ....     ....     ....
 32   / 32:     ....     ....     ....     ....     ....
 33   / 33:  26.3913  26.7600  27.7948  27.7852  27.9831
 34   / 34:  25.9084  26.5116  26.9698  27.5137  27.6385
canc mem/all
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TUNIFORM  FEATURES  NORMAL
 -DELETE T_25     M:  1 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      3      7  M:   29   34  N: -999 -999
 -DELETE T_25     M:  2 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1   2376  M: -999 -999  N: -999 -999
 
! confirm cache hits are occuring
load t_25[gt=tuniform]
 getgrid EX#1     C:  5 dset:   1 I:      1      1  J:    1    1  K:    1    1  L:      1      1  M:    1    1  N:    1    1
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TUNIFORM  FEATURES  NORMAL
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TUNIFORM  FEATURES  NORMAL
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TUNIFORM  FEATURES  NORMAL
 eval    EX#1     C:  4 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1     11  M:    1   70  N: -999 -999
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TUNIFORM  FEATURES  NORMAL
 strip regrid on T: T_25 --> (G###)           @LIN
 reading T_25     M:  2 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1   2376  M: -999 -999  N: -999 -999
 regrid  T_25     M:  1 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1     11  M:    1   70  N: -999 -999
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TUNIFORM  FEATURES  NORMAL
list/prec=6/e=29:34/l=5:8 t_25[gt=tuniform]
 strip limits reconciliation : EX#1
 eval    EX#1     C:  5 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      5      8  M:   29   34  N: -999 -999
 allocate dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TUNIFORM  FEATURES  NORMAL
 found   T_25     M:  1 dset:   1 I:   -999   -999  J: -999 -999  K: -999 -999  L:      1     11  M:    1   70  N: -999 -999
 dealloc  dynamic grid (G###)          NORMAL    NORMAL    NORMAL    TUNIFORM  FEATURES  NORMAL
             VARIABLE : Sea Surface Temperature (degree_C)
                        regrid: 10 day on T
             DATA SET : TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
             FILENAME : DSG_ERDDAP_Tao5daySst.nc
             SUBSET   : 4 by 6 points (TIME-E (instance))
               2017     2017     2017     2017   
                5        6        7        8
 29   / 29:  27.1667  26.5549  27.2769  26.9398
 30   / 30:  27.2645  27.5662  27.3482  27.3335
 31   / 31:     ....     ....     ....     ....
 32   / 32:     ....     ....     ....     ....
 33   / 33:  27.7948  27.7852  27.9831  28.4924
 34   / 34:  26.9698  27.5137  27.6385  28.2959
 -DELETE T_25     M:  4 dset:   1 I:      5      8  J:   29   34  K: -999 -999  L:   -999   -999  M: -999 -999  N: -999 -999
set mode/last diag
 
! now some operations where the numerical results are apparent
! to confirm that results are right
define axis/t="1-apr-2017:12:00":15-apr-2017:1/unit=days tapril
LET feature_l = 0*t_25 + L   ! grid of L implicit, as with classic grids
list/e=29:34/t=1-apr-2017:15-apr-2017 feature_l  ! a chunk from the middle
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : TIME: 01-APR-2017 12:00 to 11-APR-2017 12:00
              E (instance): 29 to 34
 STATION    is Timeseries-id
 FEATURE_L  is 0*T_25 + L
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME     FEATURE_L
 
    29           2n140w       140W        2N       1   01-APR-2017 12:00   33.00
    29           2n140w       140W        2N       1   06-APR-2017 12:00   34.00
    29           2n140w       140W        2N       1   11-APR-2017 12:00   35.00
 
    30           2n155w       155W        2N       1   01-APR-2017 12:00   33.00
    30           2n155w       155W        2N       1   06-APR-2017 12:00   34.00
    30           2n155w       155W        2N       1   11-APR-2017 12:00   35.00
 
    33           2s110w       110W        2S       1   01-APR-2017 12:00   33.00
    33           2s110w       110W        2S       1   06-APR-2017 12:00   34.00
    33           2s110w       110W        2S       1   11-APR-2017 12:00   35.00
 
    34           2s125w       125W        2S       1   01-APR-2017 12:00   33.00
    34           2s125w       125W        2S       1   06-APR-2017 12:00   34.00
    34           2s125w       125W        2S       1   11-APR-2017 12:00   35.00
list/e=29:34 feature_l[gt=tapril]
             VARIABLE : 0*T_25 + L
                        regrid: 1 day on T
             DATA SET : TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
             FILENAME : DSG_ERDDAP_Tao5daySst.nc
             SUBSET   : 15 by 6 points (TIME-E (instance))
              2017   2017   2017   2017   2017   2017   2017   2017   2017   2017   2017   2017   2017   2017   2017  
               1      2      3      4      5      6      7      8      9     10     11     12     13     14     15
 29   / 29:  33.00  33.20  33.40  33.60  33.80  34.00  34.20  34.40  34.60  34.80  35.00  35.20  35.40  35.60  35.80
 30   / 30:  33.00  33.20  33.40  33.60  33.80  34.00  34.20  34.40  34.60  34.80  35.00  35.20  35.40  35.60  35.80
 31   / 31:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 32   / 32:   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....   ....
 33   / 33:  33.00  33.20  33.40  33.60  33.80  34.00  34.20  34.40  34.60  34.80  35.00  35.20  35.40  35.60  35.80
 34   / 34:  33.00  33.20  33.40  33.60  33.80  34.00  34.20  34.40  34.60  34.80  35.00  35.20  35.40  35.60  35.80
 
! TSEQUENCE as an easy way to get out of DSG-ness
! just proving that it works at this stage ...
stat TSEQUENCE(t_25)
 
             TSEQUENCE(T_25)
             X:  N/A
             Y:  N/A
             Z:  N/A
             T: 0.5 to 2376.5
             E:  N/A
             F:  N/A
             DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
 
 Total # of data points: 2376 (1*1*1*2376*1*1)
 # flagged as bad  data: 64
 Minimum value: 20.892
 Maximum value: 30.774
 Mean    value: 28.185 (unweighted average)
 Standard deviation: 1.5837
stat TSEQUENCE(T[g=t_25])
 
             TSEQUENCE(T[G=T_25])
             X:  N/A
             Y:  N/A
             Z:  N/A
             T: 0.5 to 2376.5
             E:  N/A
             F:  N/A
             DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
 
 Total # of data points: 2376 (1*1*1*2376*1*1)
 # flagged as bad  data: 0
 Minimum value: 1.4844816E+09
 Maximum value: 1.492776E+09
 Mean    value: 1.48890775E+09 (unweighted average)
 Standard deviation: 1.9541E+06
 
! DSGTBD: a good benchmark test/demo:
!   - sort and de-dup the T values
!   - create a time axis that has all of the tsteps of the DSG
!   - regrid to this time axis
CANCEL DATA/ALL
CANCEL VAR/ALL
 
! intentional errors
! Trajectory-to-gridded not implemented at this time.  Return an error
 
use sail_2019.nc
define axis/t=1-may-2019:31-may-2019:31/edges/units=days time_all
define axis/x=-168:-165:0.2/units=degrees_east xreg
define axis/y=54:57:0.2/units=degrees_north yreg
define grid/x=xreg/y=yreg/t=time_all grid_reg
 
let reg_var = x[gx=xreg] + 0*y[gy=yreg] + 0*t[gt=time_all]
 
set mode ignore
load  TEMP_CTD_RBR_MEAN[d=1,g=reg_var]
 
cancel mode ignore
 
! Profile to fixed z axis
 
use  profile_dsg2
list pot_temp_degc
   DATA SET: ./data/profile_dsg2.nc
 PROFILE       is Profile-id
 POT_TEMP_DEGC is pot_temp_degc
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME     POT_TEMP_DEGC
 
     1       1             123.14W     41.3N 33.2111   13-AUG-2009 00:00    8.65
     1       1             123.14W     41.3N 31.5953   13-AUG-2009 00:00    8.65
     1       1             123.14W     41.3N 24.9692   13-AUG-2009 00:00     ...
     1       1             123.14W     41.3N 20.5466   13-AUG-2009 00:00    8.97
     1       1             123.14W     41.3N  15.312   13-AUG-2009 00:00    9.05
     1       1             123.14W     41.3N 10.1546   13-AUG-2009 00:00    9.46
     1       1             123.14W     41.3N  4.9567   13-AUG-2009 00:00   10.61
     1       1             123.14W     41.3N    2.12   13-AUG-2009 00:00   11.47
 
     2       2              120.4W    44.11N 33.2111   13-AUG-2009 12:58     ...
     2       2              120.4W    44.11N 32.2686   13-AUG-2009 12:58     ...
     2       2              120.4W    44.11N  30.491   13-AUG-2009 12:58    8.83
     2       2              120.4W    44.11N 26.6257   13-AUG-2009 12:58    8.83
     2       2              120.4W    44.11N  23.495   13-AUG-2009 12:58    9.44
     2       2              120.4W    44.11N 20.9152   13-AUG-2009 12:58    9.59
     2       2              120.4W    44.11N 17.9293   13-AUG-2009 12:58   11.03
     2       2              120.4W    44.11N 14.8822   13-AUG-2009 12:58   11.38
     2       2              120.4W    44.11N 11.8737   13-AUG-2009 12:58   11.88
     2       2              120.4W    44.11N  8.8551   13-AUG-2009 12:58   12.15
     2       2              120.4W    44.11N   5.823   13-AUG-2009 12:58   12.68
     2       2              120.4W    44.11N  3.7747   13-AUG-2009 12:58   13.90
     2       2              120.4W    44.11N    2.12   13-AUG-2009 12:58   14.72
 
     3       3                121W     38.8N  23.495   12-AUG-2009 00:00    8.83
     3       3                121W     38.8N 20.9152   12-AUG-2009 00:00    8.63
     3       3                121W     38.8N 17.9293   12-AUG-2009 00:00     ...
     3       3                121W     38.8N 14.8822   12-AUG-2009 00:00     ...
     3       3                121W     38.8N 11.8737   12-AUG-2009 00:00   15.86
     3       3                121W     38.8N  8.8551   12-AUG-2009 00:00   16.20
     3       3                121W     38.8N   5.823   12-AUG-2009 00:00   16.47
     3       3                121W     38.8N  3.7747   12-AUG-2009 00:00   16.81
     3       3                121W     38.8N    2.12   12-AUG-2009 00:00   16.81
 
! Define a regular z axis
define axis/z=2:34:2/units=m/depth zreg
 
! Sanity check - regrid the depth variable should reproduce the reg-axis depths
list/order=ez/pre=6 depth[gz=zreg]
             VARIABLE : DEPTH_M (m)
                        regrid: 2 m on Z
             FILENAME : profile_dsg2.nc
             SUBSET   : 3 by 17 points (E (instance)-DEPTH (m))
                 1        2        3     
                 1        2        3
 2     /  1:     ....     ....     ....
 4     /  2:   4.0000   4.0000   4.0000
 6     /  3:   6.0000   6.0000   6.0000
 8     /  4:   8.0000   8.0000   8.0000
 10    /  5:  10.0000  10.0000  10.0000
 12    /  6:  12.0000  12.0000  12.0000
 14    /  7:  14.0000  14.0000  14.0000
 16    /  8:  16.0000  16.0000  16.0000
 18    /  9:  18.0000  18.0000  18.0000
 20    / 10:  20.0000  20.0000  20.0000
 22    / 11:  22.0000  22.0000  22.0000
 24    / 12:  24.0000  24.0000     ....
 26    / 13:  26.0000  26.0000     ....
 28    / 14:  28.0000  28.0000     ....
 30    / 15:  30.0000  30.0000     ....
 32    / 16:  32.0000  32.0000     ....
 34    / 17:     ....     ....     ....
 
! Regrid temperature
list/order=ez/pre=6 pot_temp_degc[gz=zreg]
             VARIABLE : pot_temp_degc
                        regrid: 2 m on Z
             FILENAME : profile_dsg2.nc
             SUBSET   : 3 by 17 points (E (instance)-DEPTH (m))
                 1        2        3     
                 1        2        3
 2     /  1:     ....     ....     ....
 4     /  2:  10.8973  13.7676  16.7763
 6     /  3:  10.3750  12.6446  16.4537
 8     /  4:   9.9336  12.2993  16.2778
 10    /  5:   9.4922  12.0474  16.0736
 12    /  6:   9.3105  11.8557     ....
 14    /  7:   9.1505  11.5246     ....
 16    /  8:   9.0359  11.2492     ....
 18    /  9:   9.0076  10.9918     ....
 20    / 10:   8.9793  10.0322     ....
 22    / 11:     ....   9.5277   8.7149
 24    / 12:     ....   9.3398     ....
 26    / 13:     ....   8.9528     ....
 28    / 14:     ....   8.8317     ....
 30    / 15:     ....   8.8317     ....
 32    / 16:   8.6517     ....     ....
 34    / 17:     ....     ....     ....
 
list/order=ez/pre=6/z=10:26 pot_temp_degc[gz=zreg]
             VARIABLE : pot_temp_degc
                        regrid: 2 m on Z
             FILENAME : profile_dsg2.nc
             SUBSET   : 3 by 9 points (E (instance)-DEPTH (m))
                 1        2        3     
                 1        2        3
 10    /  5:   9.4922  12.0474  16.0736
 12    /  6:   9.3105  11.8557     ....
 14    /  7:   9.1505  11.5246     ....
 16    /  8:   9.0359  11.2492     ....
 18    /  9:   9.0076  10.9918     ....
 20    / 10:   8.9793  10.0322     ....
 22    / 11:     ....   9.5277   8.7149
 24    / 12:     ....   9.3398     ....
 26    / 13:     ....   8.9528     ....
 
 
*** Running ferret script: bn_dsg_use_feature.jnl
! bn_dsg_use_feature
! Tests of use/FEATURE=
! 7/2018  Save a plot
! 9/2018  Allow USE/Feature= on open datasets. If the new
!         feature type will work for the dataset, it's re-initialized.
! 6/2020  For Issue 1980: When possible open invalid DSG datasets anyway
!         so errors here turn into NOTES.
 
! This dataset has featuretype=Trajectory but it also has a time
! coordinate variable. It can be treated as a timeseries dataset
 
use dsg_cross_dateline.nc
! SHOW DATA/FULL lists more details and for DSG data adds region info
show data/full
     currently SET data sets:
    1> ./data/dsg_cross_dateline.nc  (default)
 
       DSG Feature type Trajectory
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:3       ...
            Data type = TEXT
               on grid GTP1 with -1.E+34 & NaN for missing data
             
 ROWSIZE  Number of Obs                    ...       ...       ...       ...       1:3       ...
               on grid GTP1 with -1.E+34 for missing data
             
 LONS     longitude                      tot 13      ...       ...       ...       1:3       ...
             degrees_east on grid GTP2 with -1.E+34 for missing data
             
 LATS     latitude                       tot 13      ...       ...       ...       1:3       ...
             degrees_north on grid GTP2 with -1.E+34 for missing data
             
 TEMP     Temperature                    tot 13      ...       ...       ...       1:3       ...
             Degrees C on grid GTP2 with -1.E+34 for missing data
             
 TIME     Centered Time                  tot 13      ...       ...       ...       1:3       ...
             seconds since 1970-01-01T00:00:00Z on grid GTP2 with NaN & -1.E+34 for missing data
             
 
  longitude range: 100E to 170W
  latitude range: 20S to 50N
  time range: 09-FEB-2017 12:00 to 09-MAR-2017 12:00
 
 
 
! plots as a set of paths
set v upper
plot/thick/title="native trajectories" temp
 
! OR, look at as a timeseries.  Can specify this change on an open dataset
use/feature=timeseries 1
show data/full
     currently SET data sets:
    1> ./data/dsg_cross_dateline.nc  (default)
 
       DSG Feature type Timeseries
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:3       ...
            Data type = TEXT
               on grid GTP1 with -1.E+34 & NaN for missing data
             
 ROWSIZE  Number of Obs                    ...       ...       ...       ...       1:3       ...
               on grid GTP1 with -1.E+34 for missing data
             
 LONS     longitude                        ...       ...       ...     tot 13      1:3       ...
             degrees_east on grid GTP2 with -1.E+34 for missing data
             
 LATS     latitude                         ...       ...       ...     tot 13      1:3       ...
             degrees_north on grid GTP2 with -1.E+34 for missing data
             
 TEMP     Temperature                      ...       ...       ...     tot 13      1:3       ...
             Degrees C on grid GTP2 with -1.E+34 for missing data
             
 TIME     Centered Time                    ...       ...       ...     tot 13      1:3       ...
             seconds since 1970-01-01T00:00:00Z on grid GTP2 with NaN & -1.E+34 for missing data
             
 
  longitude range: 100E to 170W
  latitude range: 20S to 50N
  time range: 09-FEB-2017 12:00 to 09-MAR-2017 12:00
 
 
 
! plots as a set of timeseries
set v lower
plot/thick/title="With /feature=timeseries" temp
 
frame/file=dsg_use_feature.gif
 
cancel data/all
 
! use/feature with its native featuretype is no-op
 
use/feature=Trajectory dsg_cross_dateline.nc
show data
     currently SET data sets:
    1> ./data/dsg_cross_dateline.nc  (default)
       DSG Feature type Trajectory
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:3       ...
 ROWSIZE  Number of Obs                    ...       ...       ...       ...       1:3       ...
 LONS     longitude                      tot 13      ...       ...       ...       1:3       ...
 LATS     latitude                       tot 13      ...       ...       ...       1:3       ...
 TEMP     Temperature                    tot 13      ...       ...       ...       1:3       ...
 TIME     Centered Time                  tot 13      ...       ...       ...       1:3       ...
 
 
! use/feature=none ignores DSG attributes and treats it as
! a classic gridded file
 
use/feature=none dsg_cross_dateline.nc
show data
     currently SET data sets:
    1> ./data/dsg_cross_dateline.nc  (default)
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:3       ...
 ROWSIZE  Number of Obs                    ...       ...       ...       ...       1:3       ...
 LONS     longitude                        1:13      ...       ...       ...       ...       ...
 LATS     latitude                         1:13      ...       ...       ...       ...       ...
 TEMP     Temperature                      1:13      ...       ...       ...       ...       ...
 TIME     Centered Time                    1:13      ...       ...       ...       ...       ...
 
 
! intentional errors:
! This is an error: there is no depth coordinate data
 
cancel data/all
set mode ignore
use/feature=profile dsg_cross_dateline.nc
 
! A timeseries dataset can't be used as a trajectory
 
use DSG_ERDDAP_Tao5daySst
show data
     currently SET data sets:
    1> ./data/DSG_ERDDAP_Tao5daySst.nc  (default)
       DSG Feature type Timeseries
 name     title                             I         J         K         L         M         N
 ARRAY    Array                            ...       ...       ...       ...       1:70      ...
 STATION  Station                          ...       ...       ...       ...       1:70      ...
 WMO_PLATFORM_CODE
          WMO Platform Code                ...       ...       ...       ...       1:70      ...
 LONGITUDE
          Nominal Longitude                ...       ...       ...       ...       1:70      ...
 LATITUDE Nominal Latitude                 ...       ...       ...       ...       1:70      ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:70      ...
 TIME     Centered Time                    ...       ...       ...     tot 2376    1:70      ...
 DEPTH    Depth                            ...       ...       ...     tot 2376    1:70      ...
 T_25     Sea Surface Temperature          ...       ...       ...     tot 2376    1:70      ...
 QT_5025  Sea Surface Temperature Quality  ...       ...       ...     tot 2376    1:70      ...
 ST_6025  Sea Surface Temperature Source   ...       ...       ...     tot 2376    1:70      ...
 STR_TEMP FLOATSTR(T_25, "(F5.2)")         ...       ...       ...     tot 2376    1:70      ...
 
 
! This is an error
use/feature=trajectory DSG_ERDDAP_Tao5daySst
 
! but the dataset is still open from the earlier initializatin
show data
     currently SET data sets:
    1> ./data/DSG_ERDDAP_Tao5daySst.nc  (default)
       DSG Feature type Timeseries
 name     title                             I         J         K         L         M         N
 ARRAY    Array                            ...       ...       ...       ...       1:70      ...
 STATION  Station                          ...       ...       ...       ...       1:70      ...
 WMO_PLATFORM_CODE
          WMO Platform Code                ...       ...       ...       ...       1:70      ...
 LONGITUDE
          Nominal Longitude                ...       ...       ...       ...       1:70      ...
 LATITUDE Nominal Latitude                 ...       ...       ...       ...       1:70      ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:70      ...
 TIME     Centered Time                    ...       ...       ...     tot 2376    1:70      ...
 DEPTH    Depth                            ...       ...       ...     tot 2376    1:70      ...
 T_25     Sea Surface Temperature          ...       ...       ...     tot 2376    1:70      ...
 QT_5025  Sea Surface Temperature Quality  ...       ...       ...     tot 2376    1:70      ...
 ST_6025  Sea Surface Temperature Source   ...       ...       ...     tot 2376    1:70      ...
 STR_TEMP FLOATSTR(T_25, "(F5.2)")         ...       ...       ...     tot 2376    1:70      ...
 
 
cancel data/all
 
! The dataset is a trajectory-profile dataset, not yet implemented.
use traj_prof_example
show data
     currently SET data sets:
    1> ./data/traj_prof_example.nc  (default)
 name     title                             I         J         K         L         M         N
 CRUISE_ID
          cruise id                        ...       ...       ...       ...       1:1       ...
 ROWSIZE  Number of Observations for this  1:2       ...       ...       ...       ...       ...
 TRAJECTORYINDEX
          The trajectory to which this pr  1:2       ...       ...       ...       ...       ...
 LONS     longitude                        1:26      ...       ...       ...       ...       ...
 LATS     latitude                         1:26      ...       ...       ...       ...       ...
 DEPTH    latitude                         1:26      ...       ...       ...       ...       ...
 TIME     Centered Time                    1:2       ...       ...       ...       ...       ...
 SST      Temperature                      1:26      ...       ...       ...       ...       ...
 
 
cancel data/all
 
set mode/last ignore
 
! Not errors: opened as non-dsg datasets, with NOTES
! Intentionally incomplete files. These are automatically
! opened as non-dsg datasets, with NOTES.
 
! Missing a latitude coordinate.
use dsg_bad_coord
sh dat
     currently SET data sets:
    1> ./data/dsg_bad_coord.nc  (default)
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:3       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:3       ...
 LONS     longitude                        1:18      ...       ...       ...       ...       ...
 YVALS                                     1:18      ...       ...       ...       ...       ...
 SST      Temperature                      1:18      ...       ...       ...       ...       ...
 TIME     time                             1:18      ...       ...       ...       ...       ...
 
cancel data/all
 
! Missing the attribute on the RowSize variable
use dsg_bad_atts1
sh dat
     currently SET data sets:
    1> ./data/dsg_bad_atts1.nc  (default)
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:3       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:3       ...
 LONS     longitude                        1:18      ...       ...       ...       ...       ...
 LATS     latitude                         1:18      ...       ...       ...       ...       ...
 SST      Temperature                      1:18      ...       ...       ...       ...       ...
 TIME     time                             1:18      ...       ...       ...       ...       ...
 
cancel data/all
 
! Missing the attribute on the feature-id variable
use dsg_bad_atts2
sh dat
     currently SET data sets:
    1> ./data/dsg_bad_atts2.nc  (default)
 name     title                             I         J         K         L
 ID       id                               1:3       ...       ...       ...
 ROWSIZE  Number of Observations for this  1:3       ...       ...       ...
 LONS     longitude                        1:18      ...       ...       ...
 LATS     latitude                         1:18      ...       ...       ...
 SST      Temperature                      1:18      ...       ...       ...
 TIME     time                             1:18      ...       ...       ...
 
 
cancel data/all
 
! This dataset is not DSG, it's saved from ERDDAP as NCCFMA
! a 2-D form.  Ferret sees the FeatureType attribute but reports
! it's not dsg, and continues as a gridded set.
 
use alamo_float_CFMA_profiles
show data
     currently SET data sets:
    1> ./data/alamo_float_CFMA_profiles.nc  (default)
 name     title                             I         J         K         L         M         N
 PROFILEID
                                           ...       ...       ...       ...       1:4       ...
 TIME     Julian day (UTC) of the station  ...       ...       ...       ...       1:4       ...
 LATITUDE Latitude of the station, best e  ...       ...       ...       ...       1:4       ...
 LONGITUDE
          Longitude of the station, best   ...       ...       ...       ...       1:4       ...
 PRES     Sea water pressure, equals 0 at  1:61      ...       ...       ...       1:4       ...
 
 
cancel data/all
 
 
! Multiple variables with an axis attribute and units of lon/ lat.
! Here lon and lon360 variables - using the wrong one may be harmless
! the lat and yindex variables are different, so the grid will be wrong.
! This is handled as a warning.
 
use dsg_multi_coord
 
! lats is latitude values, but yindex got used for latitude
list sst, lons, lon360, yindex, lats
   DATA SET: ./data/dsg_multi_coord.nc
 ID         is Trajectory-id
 SST        is Temperature (Degrees C)
 LONS       is longitude (degrees_east)
 LON360     is longitude 360 (degrees_east)
 YINDEX     is YINDEX (degrees_north)
 LATS       is latitude (degrees_north)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME         SST    LONS  LON360  YINDEX    LATS
 
     1       1000               8W        1N   10-JAN-1985 04:00   24.41   -8.00   352.0    1.00  -20.00
     1       1000               6W        2N   13-JAN-1985 01:30   25.22   -6.00   354.0    2.00  -10.00
     1       1000               5W        3N   16-JAN-1985 21:30   25.92   -5.00   355.0    3.00   30.00
     1       1000               3E        4N   18-JAN-1985 23:30   28.97    3.00     3.0    4.00   40.00
     1       1000               1E        5N   24-JAN-1985 18:30   28.03    1.00     1.0    5.00  -20.00
 
     2       2000              70W        6N   30-MAR-1985 00:05   27.77  -70.00   290.0    6.00  -15.00
     2       2000              20E        7N   07-APR-1985 06:02   26.91   20.00    20.0    7.00   20.00
     2       2000              30E        8N   18-APR-1985 06:02   26.07   30.00    30.0    8.00   10.00
     2       2000              60W        9N   05-AUG-1985 04:22   25.08  -60.00   300.0    9.00  -15.00
     2       2000              50W       10N   10-AUG-1985 18:28   24.01  -50.00   310.0   10.00   20.00
     2       2000              10W       11N   14-AUG-1985 16:15   23.53  -10.00   350.0   11.00   10.00
     2       2000              50W       12N   18-AUG-1985 16:45   22.64  -50.00   310.0   12.00  -15.00
     2       2000              10W       13N   27-AUG-1985 02:45   21.64  -10.00   350.0   13.00   20.00
 
     3       3000              15W       14N   27-AUG-1985 02:45   23.41  -15.00   345.0   14.00  -15.00
     3       3000               5W       15N   27-AUG-1985 02:46   20.77   -5.00   355.0   15.00  -25.00
     3       3000               1E       16N   27-AUG-1985 02:48   19.97    1.00     1.0   16.00  -35.00
     3       3000               5E       17N   27-AUG-1985 02:50   19.05    5.00     5.0   17.00  -45.00
     3       3000              10E       18N   27-AUG-1985 02:56   18.27   10.00    10.0   18.00  -55.00
 
cancel data/all
 
! use/feature on a non-dsg dataset issues a warning
use/feature=trajectory coads_climatology
show data
     currently SET data sets:
    1> ./data/coads_climatology.cdf  (default)
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:3
 
*** Running ferret script: bn_dsg_plot_timeseries.jnl
! bn_dsg_plot_timeseries.jnl
! Line plots of tseries data
 
 
use DSG_ERDDAP_Tao5daySst.nc
 
! A subset using x/y/t  Label the key with IDs
! Upper left labels reflect the subset
set view upper
plot/x=0:100/y=5:20/thick T_25
 
! A subset in M
set view lower
plot/m=5:13/thick t_25
 
frame/file=dsg_tseries_plot_1.gif
 
! Now USE/FEATURE= to access a trajectory dataset as timeseries data.
! Note how upper-left labels adjust to show dimensions orthogonal to the plots
 
cancel view
cancel data/all
 
! This is a trajectory set.  Plot it as a trajectory and then view it as
! a timeseries. Test PLOT/TITLE= here as well.
 
use dsg_cross_dateline
show data
     currently SET data sets:
    1> ./data/dsg_cross_dateline.nc  (default)
       DSG Feature type Trajectory
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:3       ...
 ROWSIZE  Number of Obs                    ...       ...       ...       ...       1:3       ...
 LONS     longitude                      tot 13      ...       ...       ...       1:3       ...
 LATS     latitude                       tot 13      ...       ...       ...       1:3       ...
 TEMP     Temperature                    tot 13      ...       ...       ...       1:3       ...
 TIME     Centered Time                  tot 13      ...       ...       ...       1:3       ...
 
set view ul
plot/thick/title="My Title" temp
 
! Now reinitialize it as timeseries data.
use/feature="timeseries" dsg_cross_dateline
show data
     currently SET data sets:
    1> ./data/dsg_cross_dateline.nc  (default)
       DSG Feature type Timeseries
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:3       ...
 ROWSIZE  Number of Obs                    ...       ...       ...       ...       1:3       ...
 LONS     longitude                        ...       ...       ...     tot 13      1:3       ...
 LATS     latitude                         ...       ...       ...     tot 13      1:3       ...
 TEMP     Temperature                      ...       ...       ...     tot 13      1:3       ...
 TIME     Centered Time                    ...       ...       ...     tot 13      1:3       ...
 
set view lower
plot/thick/color/title="My Title" temp
 
 
frame/file=dsg_tseries_plot_2.gif
 
 
cancel view
! Plot an instance variable as a line in e direction
 
use DSG_ERDDAP_Tao5daySst.nc
set view upper
plot/NOKEY t_25[t=@max]
frame/file=dsg_tseries_plot_3.gif
 
cancel view
 
! /NOKEY and /KEY qualifiers
! Multi-feature plots automatically get a legend labeled with feature ids
! PLOT/KEY with just one line drawn will also generate a legend key.
! Also testing PLOT/TITLE here
 
set view ul
plot/m=1:3/thick/color/title="My Title" t_25
set view ur
plot/nokey/m=1:3/thick/color/title="My Title" t_25
 
 
! Now just one timeseries.  By default there's no line legend, label below plot
! But PLOT/KEY makes a legend like a multi-feature plot.
 
set view ll
plot/m=5/thick/color/title="My Title" t_25
set view lr
plot/key/m=5/thick/color/title="My Title" t_25
 
 
frame/file=dsg_tseries_plot_4.gif
*** Running ferret script: bn_dsg_save.jnl
!
use dsg_cross_prime.nc
! simple save keeps all the needed elements for DSG file
save/clobber/file=a.nc sst
can data/all; use a
list sst
   DATA SET: ./a.nc
 ID         is Trajectory-id
 SST        is Temperature (Degrees C)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME         SST
 
     1       1000               6W       20S   09-FEB-2017 12:00   24.41
     1       1000               2E       10S   14-FEB-2017 12:00   25.22
     1       1000               5W       30N   19-FEB-2017 12:00   25.92
     1       1000               3E       40N   24-FEB-2017 12:00   28.97
     1       1000               1E       20S   01-MAR-2017 12:00   28.03
 
     2       2000              70W       15S   02-MAR-2017 12:00   27.77
     2       2000              20E       20N   03-MAR-2017 12:00   26.91
     2       2000              30E       10N   04-MAR-2017 12:00   26.07
     2       2000              60W       15S   05-MAR-2017 12:00   25.08
     2       2000              50W       20N   06-MAR-2017 12:00   24.01
     2       2000              10W       10N   07-MAR-2017 12:00   23.53
     2       2000              50W       15S   08-MAR-2017 12:00   22.64
     2       2000               5E       20N   09-MAR-2017 12:00   21.64
 
     3       3000              15W       15S   10-MAR-2017 12:00   23.41
     3       3000               5W       25S   11-MAR-2017 12:00   20.77
     3       3000               1E       35S   12-MAR-2017 12:00   19.97
     3       3000               5E       45S   13-MAR-2017 12:00   19.05
     3       3000              10E       55S   14-MAR-2017 12:00   18.27
 
use dsg_cross_prime.nc
 
! now with a mask
let/bad=-99 emask = {1,-99,1}
set data/fmask=emask 1
save/clobber/file=a.nc/title='masked {1,-99,1}' sst
can data/all; use a
list sst
   DATA SET: ./a.nc
   'masked {1,-99,1}'
 ID         is Trajectory-id
 SST        is Temperature (Degrees C)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME         SST
 
     1       1000               6W       20S   09-FEB-2017 12:00   24.41
     1       1000               2E       10S   14-FEB-2017 12:00   25.22
     1       1000               5W       30N   19-FEB-2017 12:00   25.92
     1       1000               3E       40N   24-FEB-2017 12:00   28.97
     1       1000               1E       20S   01-MAR-2017 12:00   28.03
 
     2       3000              15W       15S   10-MAR-2017 12:00   23.41
     2       3000               5W       25S   11-MAR-2017 12:00   20.77
     2       3000               1E       35S   12-MAR-2017 12:00   19.97
     2       3000               5E       45S   13-MAR-2017 12:00   19.05
     2       3000              10E       55S   14-MAR-2017 12:00   18.27
 
use dsg_cross_prime.nc
 
! or with limits in space-time
cancel data/fmask 1
save/clobber/file=a.nc/x=0:180/y=0:90 sst
list/x=0:180/y=0:90 sst
   DATA SET: ./data/dsg_cross_prime.nc
   SUBSET   : LONGITUDE: 3E to 30E
              LATITUDE: 10N to 40N
 ID         is Trajectory-id
 SST        is Temperature (Degrees C)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME         SST
 
     1       1000               3E       40N   24-FEB-2017 12:00   28.97
 
     2       2000              20E       20N   03-MAR-2017 12:00   26.91
     2       2000              30E       10N   04-MAR-2017 12:00   26.07
     2       2000               5E       20N   09-MAR-2017 12:00   21.64
can data/all; use a
list sst
   DATA SET: ./a.nc
 ID         is Trajectory-id
 SST        is Temperature (Degrees C)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME         SST
 
     1       1000               3E       40N   24-FEB-2017 12:00   28.97
 
     2       2000              20E       20N   03-MAR-2017 12:00   26.91
     2       2000              30E       10N   04-MAR-2017 12:00   26.07
     2       2000               5E       20N   09-MAR-2017 12:00   21.64
 
use dsg_cross_prime.nc
 
! another dataset and mask
 
use WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc
set var/units=units pco2
let/title="Where Profile is 80,86,87,88" mask = element_index (profile,{80,86,87,88})
 
set data/fmask=mask WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d
save/clobber/file=a.nc pco2
can data/all; use a
list pco2
   DATA SET: ./a.nc
 PROFILE    is Profile-id
 PCO2       is PCO2 (units)
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME        PCO2
 
     1       80             120.8W    34.33N  733.64   28-AUG-2011 07:01   1227.
     1       80             120.8W    34.33N  733.56   28-AUG-2011 07:01     ...
     1       80             120.8W    34.33N  650.88   28-AUG-2011 07:01   1261.
     1       80             120.8W    34.33N  550.91   28-AUG-2011 07:01   1266.
     1       80             120.8W    34.33N  470.36   28-AUG-2011 07:01   1186.
     1       80             120.8W    34.33N  400.38   28-AUG-2011 07:01   1209.
     1       80             120.8W    34.33N  300.32   28-AUG-2011 07:01   1218.
     1       80             120.8W    34.33N  200.69   28-AUG-2011 07:01   1072.
     1       80             120.8W    34.33N  150.32   28-AUG-2011 07:01    934.
     1       80             120.8W    34.33N  125.21   28-AUG-2011 07:01    908.
     1       80             120.8W    34.33N   100.7   28-AUG-2011 07:01    857.
     1       80             120.8W    34.33N   79.97   28-AUG-2011 07:01    815.
     1       80             120.8W    34.33N   60.05   28-AUG-2011 07:01    792.
     1       80             120.8W    34.33N   49.34   28-AUG-2011 07:01    605.
     1       80             120.8W    34.33N   40.16   28-AUG-2011 07:01    531.
     1       80             120.8W    34.33N   29.52   28-AUG-2011 07:01     ...
     1       80             120.8W    34.33N    29.8   28-AUG-2011 07:01    527.
     1       80             120.8W    34.33N   19.92   28-AUG-2011 07:01    520.
     1       80             120.8W    34.33N    10.7   28-AUG-2011 07:01    519.
     1       80             120.8W    34.33N    3.79   28-AUG-2011 07:01    524.
     1       80             120.8W    34.33N    2.85   28-AUG-2011 07:01     ...
 
     2       86            120.09W    32.34N 2110.28   29-AUG-2011 17:34    688.
     2       86            120.09W    32.34N  2110.2   29-AUG-2011 17:34     ...
     2       86            120.09W    32.34N 2000.51   29-AUG-2011 17:34    737.
     2       86            120.09W    32.34N 1500.99   29-AUG-2011 17:34    905.
     2       86            120.09W    32.34N 1000.37   29-AUG-2011 17:34   1116.
     2       86            120.09W    32.34N  750.18   29-AUG-2011 17:34   1120.
     2       86            120.09W    32.34N  501.74   29-AUG-2011 17:34   1258.
     2       86            120.09W    32.34N  399.86   29-AUG-2011 17:34   1189.
     2       86            120.09W    32.34N  299.74   29-AUG-2011 17:34     ...
     2       86            120.09W    32.34N  248.46   29-AUG-2011 17:34    886.
     2       86            120.09W    32.34N  200.58   29-AUG-2011 17:34    887.
     2       86            120.09W    32.34N  149.97   29-AUG-2011 17:34    815.
     2       86            120.09W    32.34N  100.86   29-AUG-2011 17:34    499.
     2       86            120.09W    32.34N   80.78   29-AUG-2011 17:34    435.
     2       86            120.09W    32.34N   60.91   29-AUG-2011 17:34    385.
     2       86            120.09W    32.34N   50.22   29-AUG-2011 17:34    364.
     2       86            120.09W    32.34N   40.86   29-AUG-2011 17:34    359.
     2       86            120.09W    32.34N   40.77   29-AUG-2011 17:34     ...
     2       86            120.09W    32.34N   31.01   29-AUG-2011 17:34    332.
     2       86            120.09W    32.34N   21.51   29-AUG-2011 17:34    352.
     2       86            120.09W    32.34N    9.78   29-AUG-2011 17:34    367.
     2       86            120.09W    32.34N    4.31   29-AUG-2011 17:34    366.
     2       86            120.09W    32.34N    4.13   29-AUG-2011 17:34     ...
 
     3       87               120W    32.39N 1151.74   29-AUG-2011 21:26   1155.
     3       87               120W    32.39N 1153.67   29-AUG-2011 21:26     ...
     3       87               120W    32.39N 1000.58   29-AUG-2011 21:26   1154.
     3       87               120W    32.39N   750.4   29-AUG-2011 21:26   1255.
     3       87               120W    32.39N  506.59   29-AUG-2011 21:26   1342.
     3       87               120W    32.39N  402.94   29-AUG-2011 21:26   1266.
     3       87               120W    32.39N  302.26   29-AUG-2011 21:26   1146.
     3       87               120W    32.39N   200.4   29-AUG-2011 21:26    938.
     3       87               120W    32.39N  148.94   29-AUG-2011 21:26    816.
     3       87               120W    32.39N  124.56   29-AUG-2011 21:26    664.
     3       87               120W    32.39N  103.21   29-AUG-2011 21:26    565.
     3       87               120W    32.39N   80.61   29-AUG-2011 21:26    507.
     3       87               120W    32.39N    59.5   29-AUG-2011 21:26    414.
     3       87               120W    32.39N    50.1   29-AUG-2011 21:26    416.
     3       87               120W    32.39N   43.65   29-AUG-2011 21:26    400.
     3       87               120W    32.39N   41.93   29-AUG-2011 21:26     ...
     3       87               120W    32.39N   30.54   29-AUG-2011 21:26    390.
     3       87               120W    32.39N   20.89   29-AUG-2011 21:26    374.
     3       87               120W    32.39N   15.54   29-AUG-2011 21:26    372.
     3       87               120W    32.39N   10.91   29-AUG-2011 21:26    376.
     3       87               120W    32.39N     6.5   29-AUG-2011 21:26    374.
     3       87               120W    32.39N    5.56   29-AUG-2011 21:26     ...
 
     4       88            118.03W    33.35N  724.32   30-AUG-2011 12:40   1297.
     4       88            118.03W    33.35N  724.28   30-AUG-2011 12:40     ...
     4       88            118.03W    33.35N   500.4   30-AUG-2011 12:40   1321.
     4       88            118.03W    33.35N  399.28   30-AUG-2011 12:40   1320.
     4       88            118.03W    33.35N  299.96   30-AUG-2011 12:40   1166.
     4       88            118.03W    33.35N  200.37   30-AUG-2011 12:40   1005.
     4       88            118.03W    33.35N  149.48   30-AUG-2011 12:40    879.
     4       88            118.03W    33.35N  124.78   30-AUG-2011 12:40    794.
     4       88            118.03W    33.35N    99.8   30-AUG-2011 12:40    722.
     4       88            118.03W    33.35N   81.22   30-AUG-2011 12:40    641.
     4       88            118.03W    33.35N   59.86   30-AUG-2011 12:40    553.
     4       88            118.03W    33.35N   50.26   30-AUG-2011 12:40    501.
     4       88            118.03W    33.35N   39.93   30-AUG-2011 12:40    455.
     4       88            118.03W    33.35N   30.08   30-AUG-2011 12:40    447.
     4       88            118.03W    33.35N   25.05   30-AUG-2011 12:40     ...
     4       88            118.03W    33.35N   19.97   30-AUG-2011 12:40    389.
     4       88            118.03W    33.35N      10   30-AUG-2011 12:40    387.
     4       88            118.03W    33.35N    3.22   30-AUG-2011 12:40    406.
     4       88            118.03W    33.35N    3.24   30-AUG-2011 12:40     ...
 
use WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc
 
! Also constrained in space
save/clobber/file=a.nc/z=0:100/y=30:33 pco2
can data/all; use a
list pco2
   DATA SET: ./a.nc
 PROFILE    is Profile-id
 PCO2       is PCO2
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME        PCO2
 
     1       85             120.9W    31.95N   79.94   29-AUG-2011 09:10   504.8
     1       85             120.9W    31.95N   60.12   29-AUG-2011 09:10   380.8
     1       85             120.9W    31.95N   49.62   29-AUG-2011 09:10   379.6
     1       85             120.9W    31.95N    40.6   29-AUG-2011 09:10   369.3
     1       85             120.9W    31.95N   30.21   29-AUG-2011 09:10   380.4
     1       85             120.9W    31.95N   20.37   29-AUG-2011 09:10   370.3
     1       85             120.9W    31.95N   20.34   29-AUG-2011 09:10     ...
     1       85             120.9W    31.95N    9.89   29-AUG-2011 09:10   368.9
     1       85             120.9W    31.95N    4.39   29-AUG-2011 09:10   366.9
     1       85             120.9W    31.95N    4.14   29-AUG-2011 09:10     ...
 
     2       86            120.09W    32.34N   80.78   29-AUG-2011 17:34   434.8
     2       86            120.09W    32.34N   60.91   29-AUG-2011 17:34   385.1
     2       86            120.09W    32.34N   50.22   29-AUG-2011 17:34   364.2
     2       86            120.09W    32.34N   40.86   29-AUG-2011 17:34   358.9
     2       86            120.09W    32.34N   40.77   29-AUG-2011 17:34     ...
     2       86            120.09W    32.34N   31.01   29-AUG-2011 17:34   331.9
     2       86            120.09W    32.34N   21.51   29-AUG-2011 17:34   352.2
     2       86            120.09W    32.34N    9.78   29-AUG-2011 17:34   367.4
     2       86            120.09W    32.34N    4.31   29-AUG-2011 17:34   366.4
     2       86            120.09W    32.34N    4.13   29-AUG-2011 17:34     ...
 
     3       87               120W    32.39N   80.61   29-AUG-2011 21:26   506.8
     3       87               120W    32.39N    59.5   29-AUG-2011 21:26   414.4
     3       87               120W    32.39N    50.1   29-AUG-2011 21:26   416.4
     3       87               120W    32.39N   43.65   29-AUG-2011 21:26   399.6
     3       87               120W    32.39N   41.93   29-AUG-2011 21:26     ...
     3       87               120W    32.39N   30.54   29-AUG-2011 21:26   390.1
     3       87               120W    32.39N   20.89   29-AUG-2011 21:26   374.0
     3       87               120W    32.39N   15.54   29-AUG-2011 21:26   372.0
     3       87               120W    32.39N   10.91   29-AUG-2011 21:26   375.6
     3       87               120W    32.39N     6.5   29-AUG-2011 21:26   374.0
     3       87               120W    32.39N    5.56   29-AUG-2011 21:26     ...
 
cancel data/all; cancel var/all
 
! Save an obs variable and a user-defined var on the same grid.
 
use profile_dsg
let/like=sal nobig = if sal le 35 then sal
save/clobber/file=a.nc sal
save/append/file=a.nc nobig
 
cancel data/all; cancel var/all
use a
show data
     currently SET data sets:
    1> ./a.nc  (default)
       DSG Feature type Profile
 name     title                             I         J         K         L         M         N
 PROFILE  profile ID: Cruise and Station   ...       ...       ...       ...       1:3       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:3       ...
 LONGITUDE
          station longitude                ...       ...       ...       ...       1:3       ...
 LATITUDE station latitude                 ...       ...       ...       ...       1:3       ...
 DEPTH    DEPTH_M                          ...       ...     tot 34      ...       1:3       ...
 TIME     time                             ...       ...       ...       ...       1:3       ...
 SAL      sal                              ...       ...     tot 34      ...       1:3       ...
 NOBIG    sal                              ...       ...     tot 34      ...       1:3       ...
 
list sal, nobig
   DATA SET: ./a.nc
 PROFILE    is Profile-id
 SAL        is sal
 NOBIG      is sal
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME         SAL   NOBIG
 
     1       1             123.14W     41.3N 33.2111   13-AUG-2009 00:00   33.68   33.68
     1       1             123.14W     41.3N 31.5953   13-AUG-2009 00:00   33.68   33.68
     1       1             123.14W     41.3N 24.9692   13-AUG-2009 00:00   33.61   33.61
     1       1             123.14W     41.3N 20.5466   13-AUG-2009 00:00   33.55   33.55
     1       1             123.14W     41.3N  15.312   13-AUG-2009 00:00   33.50   33.50
     1       1             123.14W     41.3N 10.1546   13-AUG-2009 00:00   33.47   33.47
     1       1             123.14W     41.3N  4.9567   13-AUG-2009 00:00   33.46   33.46
     1       1             123.14W     41.3N    2.12   13-AUG-2009 00:00   33.44   33.44
 
     2       2              120.4W    44.11N 33.2111   13-AUG-2009 12:58   34.71   34.71
     2       2              120.4W    44.11N 32.2686   13-AUG-2009 12:58   34.41   34.41
     2       2              120.4W    44.11N  30.491   13-AUG-2009 12:58   34.28   34.28
     2       2              120.4W    44.11N 26.6257   13-AUG-2009 12:58   34.28   34.28
     2       2              120.4W    44.11N  23.495   13-AUG-2009 12:58   34.25   34.25
     2       2              120.4W    44.11N 20.9152   13-AUG-2009 12:58   34.19   34.19
     2       2              120.4W    44.11N 17.9293   13-AUG-2009 12:58   34.31   34.31
     2       2              120.4W    44.11N 14.8822   13-AUG-2009 12:58   34.30   34.30
     2       2              120.4W    44.11N 11.8737   13-AUG-2009 12:58   34.29   34.29
     2       2              120.4W    44.11N  8.8551   13-AUG-2009 12:58   34.21   34.21
     2       2              120.4W    44.11N   5.823   13-AUG-2009 12:58   34.11   34.11
     2       2              120.4W    44.11N  3.7747   13-AUG-2009 12:58   32.94   32.94
     2       2              120.4W    44.11N    2.12   13-AUG-2009 12:58   32.78   32.78
 
     3       3                121W     38.8N 33.2111   12-AUG-2009 00:00   34.83   34.83
     3       3                121W     38.8N 32.2686   12-AUG-2009 00:00   34.82   34.82
     3       3                121W     38.8N  30.491   12-AUG-2009 00:00   35.63     ...
     3       3                121W     38.8N 26.6257   12-AUG-2009 00:00   35.32     ...
     3       3                121W     38.8N  23.495   12-AUG-2009 00:00   32.96   32.96
     3       3                121W     38.8N 20.9152   12-AUG-2009 00:00   32.83   32.83
     3       3                121W     38.8N 17.9293   12-AUG-2009 00:00   32.70   32.70
     3       3                121W     38.8N 14.8822   12-AUG-2009 00:00   32.63   32.63
     3       3                121W     38.8N 11.8737   12-AUG-2009 00:00   32.47   32.47
     3       3                121W     38.8N  8.8551   12-AUG-2009 00:00   32.45   32.45
     3       3                121W     38.8N   5.823   12-AUG-2009 00:00   32.41   32.41
     3       3                121W     38.8N  3.7747   12-AUG-2009 00:00   32.38   32.38
     3       3                121W     38.8N    2.12   12-AUG-2009 00:00   32.38   32.38
*** Running ferret script: bn_dsg_transforms.jnl
! Transforms:
!  DSG_ERDDAP_Tao5daySst.nc  timeseries example
!  simple_traj_dsg.nc trajectories with a varialbe having gaps (can test timeseries ops too)
!  profile_dsg.nc has gaps in the variable pot_temp_degc
 
 
!!!!!!!!!!!!
! NGD, NBD  MIN, MAX
 
use DSG_ERDDAP_Tao5daySst
list/m=1:5 rowsize, T_25[t=@ngd], T_25[t=@nbd], T_25[t=@min], T_25[t=@max]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 1 to 5
 STATION    is Timeseries-id
 ROWSIZE    is Number of Observations for this TimeSeries
 T_25       is Sea Surface Temperature (number of valid, each Timeseries-id)
 T_25       is Sea Surface Temperature (number flagged bad, each Timeseries-id)
 T_25       is Sea Surface Temperature (degree_C) (minimum, each Timeseries-id)
 T_25       is Sea Surface Temperature (degree_C) (maximum, each Timeseries-id)
    FEATURE  STATION     LONGITUDE  LATITUDE ROWSIZE    T_25    T_25    T_25    T_25
     1             0n0e         0E         0   37.00   37.00   0.000   28.53   29.86
     2            0n10w        10W         0   37.00   37.00   0.000   27.72   29.64
     3           0n110w       110W         0   25.00   23.00   2.000   23.73   27.63
     4           0n125w       125W         0   37.00   37.00   0.000   24.24   28.80
     5           0n140w       140W         0   37.00   37.00   0.000   25.25   27.36
 
let tmin = T_25[t=@min]
let tmax = T_25[t=@max]
 
list rowsize[e=@min], rowsize[e=@max]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 ROWSIZE    is Number of Observations for this TimeSeries
 ROWSIZE    is Number of Observations for this TimeSeries
    FEATURE  STATION    ROWSIZE ROWSIZE
     1                    1.000   37.00
list tmin[e=@min], tmax[e=@max]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 TMIN       is T_25[T=@MIN]
 TMAX       is T_25[T=@MAX]
    FEATURE  STATION       TMIN    TMAX
     1                    20.89   30.77
 
! Which tseries have some bad data?
 
LET mask = if T_25[t=@nbd] GT 0 then 1
set data/fmask=mask DSG_ERDDAP_Tao5daySst
 
list station, rowsize, T_25[t=@ngd], T_25[t=@nbd]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
Mask on features has been set: IF T_25[T=@NBD] GT 0 THEN 1
 STATION    is Timeseries-id
 STATION    is Station
 ROWSIZE    is Number of Observations for this TimeSeries
 T_25       is Sea Surface Temperature (number of valid, each Timeseries-id)
 T_25       is Sea Surface Temperature (number flagged bad, each Timeseries-id)
    FEATURE  STATION     LONGITUDE  LATITUDE STATION ROWSIZE    T_25    T_25
     3           0n110w       110W         0 "0n110w"  25.00   23.00    2.00
    13            0n90e        90E         0 "0n90e"   37.00   27.00   10.00
    18           10s10w        10W       10S "10s10w"  32.00   21.00   11.00
    27           21n23w        23W       21N "21n23w"  37.00   34.00    3.00
    28           2n125w       125W        2N "2n125w"  37.00   32.00    5.00
    29           2n140w       140W        2N "2n140w"  37.00   35.00    2.00
    35           2s140w       140W        2S "2s140w"  37.00   34.00    3.00
    41            4n90e        90E        4N "4n90e"   35.00   25.00   10.00
    44           5n125w       125W        5N "5n125w"  37.00   32.00    5.00
    45           5n140w       140W        5N "5n140w"  37.00   35.00    2.00
    56            6s10w        10W        6S "6s10w"   30.00   19.00   11.00
 
can data/all
use simple_traj_dsg
list rowsize, sstgap[i=@ngd], sstgap[i=@nbd], sstgap[i=@min], sstgap[i=@max]
   DATA SET: ./data/simple_traj_dsg.nc
 ID         is Trajectory-id
 ROWSIZE    is Number of Observations for this Trajectory
 SSTGAP     is IF SST GT 20 THEN SST (number of valid, each Trajectory-id)
 SSTGAP     is IF SST GT 20 THEN SST (number flagged bad, each Trajectory-id)
 SSTGAP     is IF SST GT 20 THEN SST (minimum, each Trajectory-id)
 SSTGAP     is IF SST GT 20 THEN SST (maximum, each Trajectory-id)
    FEATURE  ID         ROWSIZE  SSTGAP  SSTGAP  SSTGAP  SSTGAP
     1       1000         5.000   4.000   1.000   23.97   28.03
     2       2000         8.000   4.000   4.000   23.53   27.77
     3       3000         5.000   3.000   2.000   21.05   23.41
     4       4000         8.000   4.000   4.000   21.64   37.77
 
! good+bad is now less than rowsize - based on # in the subset
 
list/y=15:20 rowsize, sstgap[i=@ngd]+sstgap[i=@nbd], sstgap[i=@ngd], sstgap[i=@nbd], sstgap[i=@min], sstgap[i=@max]
   DATA SET: ./data/simple_traj_dsg.nc
 ID         is Trajectory-id
 ROWSIZE    is Number of Observations for this Trajectory
 EX#2       is SSTGAP[I=@NGD]+SSTGAP[I=@NBD]
 SSTGAP     is IF SST GT 20 THEN SST (number of valid, each Trajectory-id)
 SSTGAP     is IF SST GT 20 THEN SST (number flagged bad, each Trajectory-id)
 SSTGAP     is IF SST GT 20 THEN SST (minimum, each Trajectory-id)
 SSTGAP     is IF SST GT 20 THEN SST (maximum, each Trajectory-id)
    FEATURE  ID         ROWSIZE    EX#2  SSTGAP  SSTGAP  SSTGAP  SSTGAP
     1       1000         5.000   1.000   1.000   0.000   24.41   24.41
     2       2000         8.000   7.000   4.000   3.000   23.53   27.77
     4       4000         8.000   8.000   4.000   4.000   21.64   37.77
 
can data/all
use WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d
 
list rowsize, pco2[z=@ngd], pco2[z=@nbd], pco2[z=@min], pco2[z=@max]
   DATA SET: ./data/WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc
   West Coast Carbon cruises
 PROFILE    is Profile-id
 ROWSIZE    is Number of Observations for this Profile
 PCO2       is PCO2 (number of valid, each Profile-id)
 PCO2       is PCO2 (number flagged bad, each Profile-id)
 PCO2       is PCO2 (minimum, each Profile-id)
 PCO2       is PCO2 (maximum, each Profile-id)
    FEATURE  PROFILE     LONGITUDE  LATITUDE            TIME     ROWSIZE    PCO2    PCO2    PCO2    PCO2
     1       70            122.43W    36.52N   25-AUG-2011 11:46   24.00   21.00   3.000   369.9   1300.
     2       71            122.06W     36.7N   25-AUG-2011 16:33   22.00   19.00   3.000   370.2   1322.
     3       72            122.02W    36.71N   25-AUG-2011 19:23   17.00   14.00   3.000   335.5   1233.
     4       73            121.97W    36.74N   25-AUG-2011 22:03   14.00   11.00   3.000   336.4   1024.
     5       74            121.93W    36.76N   26-AUG-2011 01:07   12.00   10.00   2.000   333.1    809.
     6       75            121.87W    36.79N   26-AUG-2011 03:51   17.00   14.00   3.000   258.9   1158.
     7       76            121.85W     36.8N   26-AUG-2011 06:18   17.00   15.00   2.000   349.5   1265.
     8       77             122.5W    33.52N   27-AUG-2011 12:17   24.00   21.00   3.000   372.7   1303.
     9       78            121.16W    34.14N   27-AUG-2011 23:06   24.00   21.00   3.000   364.7   1310.
    10       79            121.02W    34.21N   28-AUG-2011 03:24   21.00   18.00   3.000   367.1   1315.
    11       80             120.8W    34.33N   28-AUG-2011 07:01   21.00   18.00   3.000   519.0   1266.
    12       81            120.65W    34.38N   28-AUG-2011 10:34   17.00   14.00   3.000   574.7   1224.
    13       82            120.58W    34.42N   28-AUG-2011 13:19   15.00   11.00   4.000   566.7    978.
    14       83            120.43W    34.43N   28-AUG-2011 16:07    9.00    6.00   3.000   348.8    553.
    15       84            120.49W    34.43N   28-AUG-2011 18:55   11.00    8.00   3.000   373.0    814.
    16       85             120.9W    31.95N   29-AUG-2011 09:10   24.00   21.00   3.000   366.9   1225.
    17       86            120.09W    32.34N   29-AUG-2011 17:34   23.00   19.00   4.000   331.9   1258.
    18       87               120W    32.39N   29-AUG-2011 21:26   22.00   19.00   3.000   372.0   1342.
    19       88            118.03W    33.35N   30-AUG-2011 12:40   19.00   16.00   3.000   386.9   1321.
    20       89            117.77W    33.48N   30-AUG-2011 16:47   12.00    9.00   3.000   362.0    619.
    21       90            117.75W    33.49N   30-AUG-2011 18:06    8.00    5.00   3.000   372.4    495.
 
 
!!!!!!!!!!!!
! FILLERS
! FLN, FAV, FNR
! Filling ends and restarts with each new feature
 
cancel data/all
 
! IN X
use simple_traj_dsg
list sstgap, sstgap[x=@fln], sstgap[x=@fav], sstgap[x=@fnr]
   DATA SET: ./data/simple_traj_dsg.nc
 ID         is Trajectory-id
 SSTGAP     is IF SST GT 20 THEN SST
 SSTGAP     is IF SST GT 20 THEN SST (linear-filled by 1 pts, each Trajectory-id)
 SSTGAP     is IF SST GT 20 THEN SST (ave-filled by 3 pts, each Trajectory-id)
 SSTGAP     is IF SST GT 20 THEN SST (nearest-filled by 1 pts, each Trajectory-id)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME      SSTGAP  SSTGAP  SSTGAP  SSTGAP
 
     1       1000              98W       20N   02-JAN-1970 12:00   24.41   24.41   24.41   24.41
     1       1000              96W       21N   03-JAN-1970 12:00   25.22   25.22   25.22   25.22
     1       1000              95W     22.3N   04-JAN-1970 12:00     ...     ...   24.59   24.59
     1       1000              99W       23N   05-JAN-1970 12:00   23.97   23.97   23.97   23.97
     1       1000              90W       21N   06-JAN-1970 12:00   28.03   28.03   28.03   28.03
 
     2       2000             108W       15N   03-JAN-1970 00:00   27.77   27.77   27.77   27.77
     2       2000             106W       16N   05-JAN-1970 00:00     ...     ...   27.77   27.77
     2       2000             105W     14.5N   07-JAN-1970 00:00     ...     ...   25.08   25.08
     2       2000             109W       15N   09-JAN-1970 00:00   25.08   25.08   25.08   25.08
     2       2000             101W     15.6N   11-JAN-1970 00:00   24.01   24.01   24.01   24.01
     2       2000             108W       16N   13-JAN-1970 00:00   23.53   23.53   23.53   23.53
     2       2000             106W       17N   15-JAN-1970 00:00     ...     ...   23.53   23.53
     2       2000             105W     17.2N   17-JAN-1970 00:00     ...     ...     ...   23.53
 
     3       3000             138W       25N   02-JAN-1970 00:00     ...     ...   23.41   23.41
     3       3000             136W     23.6N   04-JAN-1970 00:00   23.41   23.41   23.41   23.41
     3       3000             135W       23N   08-JAN-1970 00:00     ...     ...   22.23   22.23
     3       3000             139W     22.5N   13-JAN-1970 00:00   21.05   21.05   21.05   21.05
     3       3000             129W     21.1N   20-JAN-1970 00:00   22.27   22.27   22.27   22.27
 
     4       4000             116W       18N   02-JAN-1970 00:00   37.77   37.77   37.77   37.77
     4       4000             116W       18N   03-JAN-1970 00:00     ...     ...   37.77   37.77
     4       4000             116W       18N   04-JAN-1970 00:00     ...     ...     ...   37.77
     4       4000             116W       18N   05-JAN-1970 00:00     ...     ...     ...   23.53
     4       4000             116W       18N   06-JAN-1970 00:00     ...     ...   23.53   23.53
     4       4000             116W       18N   07-JAN-1970 00:00   23.53   23.53   23.53   23.53
     4       4000             116W       18N   08-JAN-1970 00:00   22.64   22.64   22.64   22.64
     4       4000             116W       18N   09-JAN-1970 00:00   21.64   21.64   21.64   21.64
 
use/feature=none simple_traj_dsg
list sstgap, sstgap[x=@fln], sstgap[x=@fav], sstgap[x=@fnr]
             DATA SET: ./data/simple_traj_dsg.nc
             X: 0.5 to 26.5
 Column  1: SSTGAP is IF SST GT 20 THEN SST
 Column  2: SSTGAP[X=@FLN:1] is IF SST GT 20 THEN SST (linear-filled by 1 pts on X)
 Column  3: SSTGAP[X=@FAV:3] is IF SST GT 20 THEN SST (ave-filled by 3 pts on X)
 Column  4: SSTGAP[X=@FNR:1] is IF SST GT 20 THEN SST (nearest-filled by 1 pts on X)
          SSTGAP  SSTGAP SSTGAP SSTGAP
1    /  1:  24.41  24.41  24.41  24.41
2    /  2:  25.22  25.22  25.22  25.22
3    /  3:   ....  24.59  24.59  24.59
4    /  4:  23.97  23.97  23.97  23.97
5    /  5:  28.03  28.03  28.03  28.03
6    /  6:  27.77  27.77  27.77  27.77
7    /  7:   ....  26.87  27.77  27.77
8    /  8:   ....  25.98  25.08  25.08
9    /  9:  25.08  25.08  25.08  25.08
10   / 10:  24.01  24.01  24.01  24.01
11   / 11:  23.53  23.53  23.53  23.53
12   / 12:   ....  23.50  23.53  23.53
13   / 13:   ....  23.47   ....  23.47
14   / 14:   ....  23.44  23.41  23.41
15   / 15:  23.41  23.41  23.41  23.41
16   / 16:   ....  22.23  22.23  22.23
17   / 17:  21.05  21.05  21.05  21.05
18   / 18:  22.27  22.27  22.27  22.27
19   / 19:  37.77  37.77  37.77  37.77
20   / 20:   ....  34.92  37.77  37.77
21   / 21:   ....  32.07   ....  37.77
22   / 22:   ....  29.23   ....  23.53
23   / 23:   ....  26.38  23.53  23.53
24   / 24:  23.53  23.53  23.53  23.53
25   / 25:  22.64  22.64  22.64  22.64
26   / 26:  21.64  21.64  21.64  21.64
 
! In T
 
use DSG_ERDDAP_Tao5daySst
 
let miss = if t_25 gt 28.4 then t_25
list/m=2/t=15-jan-2017:15-mar-2017  t_25, miss, miss[t=@fln], miss[t=@fav], miss[t=@fnr]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : TIME: 15-JAN-2017 12:00 to 14-MAR-2017 12:00 (nearest-filled by 1 pts)
              E (instance): 2
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C)
 MISS       is IF T_25 GT 28.4 THEN T_25
 MISS       is IF T_25 GT 28.4 THEN T_25 (linear-filled by 1 pts, each Timeseries-id)
 MISS       is IF T_25 GT 28.4 THEN T_25 (ave-filled by 3 pts, each Timeseries-id)
 MISS       is IF T_25 GT 28.4 THEN T_25 (nearest-filled by 1 pts, each Timeseries-id)
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME        T_25    MISS    MISS    MISS    MISS
 
     2            0n10w        10W         0       1   15-JAN-2017 12:00   27.72     ...     ...     ...   28.71
     2            0n10w        10W         0       1   20-JAN-2017 12:00   28.01     ...     ...   28.71   28.71
     2            0n10w        10W         0       1   25-JAN-2017 12:00   28.71   28.71   28.71   28.71   28.71
     2            0n10w        10W         0       1   30-JAN-2017 12:00   28.94   28.94   28.94   28.94   28.94
     2            0n10w        10W         0       1   04-FEB-2017 12:00   28.48   28.48   28.48   28.48   28.48
     2            0n10w        10W         0       1   09-FEB-2017 12:00   28.23     ...   28.55   28.48   28.48
     2            0n10w        10W         0       1   14-FEB-2017 12:00   28.12     ...   28.61   28.67   28.67
     2            0n10w        10W         0       1   19-FEB-2017 12:00   28.67   28.67   28.67   28.67   28.67
     2            0n10w        10W         0       1   24-FEB-2017 12:00   28.13     ...   28.60   28.67   28.67
     2            0n10w        10W         0       1   01-MAR-2017 12:00   28.04     ...   28.53     ...   28.67
     2            0n10w        10W         0       1   02-MAR-2017 12:00   28.04     ...   28.51     ...   28.67
     2            0n10w        10W         0       1   03-MAR-2017 12:00   28.10     ...   28.50     ...   28.56
     2            0n10w        10W         0       1   04-MAR-2017 12:00   28.20     ...   28.48     ...   28.44
     2            0n10w        10W         0       1   05-MAR-2017 12:00   28.25     ...   28.47     ...   28.44
     2            0n10w        10W         0       1   06-MAR-2017 12:00   28.32     ...   28.45   28.44   28.44
     2            0n10w        10W         0       1   07-MAR-2017 12:00   28.44   28.44   28.44   28.44   28.44
     2            0n10w        10W         0       1   08-MAR-2017 12:00   28.49   28.49   28.49   28.49   28.49
     2            0n10w        10W         0       1   09-MAR-2017 12:00   28.57   28.57   28.57   28.57   28.57
     2            0n10w        10W         0       1   10-MAR-2017 12:00   28.70   28.70   28.70   28.70   28.70
     2            0n10w        10W         0       1   11-MAR-2017 12:00   28.80   28.80   28.80   28.80   28.80
     2            0n10w        10W         0       1   12-MAR-2017 12:00   28.86   28.86   28.86   28.86   28.86
     2            0n10w        10W         0       1   13-MAR-2017 12:00   29.07   29.07   29.07   29.07   29.07
     2            0n10w        10W         0       1   14-MAR-2017 12:00   29.21   29.21   29.21   29.21   29.21
 
! In Z
! Write computed var in DSG netCDF file
 
use profile_dsg
let/like=sal nobig = if sal le 35 then sal
 
save/clobber/file=a.nc sal
save/append/file=a.nc nobig
can data profile_dsg; cancel var/all
 
use a
list/m=3 nobig, nobig[z=@fln]
   DATA SET: ./a.nc
   SUBSET   : E (instance): 3
 PROFILE    is Profile-id
 NOBIG      is sal
 NOBIG      is sal (linear-filled by 1 pts, each Profile-id)
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME       NOBIG   NOBIG
 
     3       3                121W     38.8N 33.2111   12-AUG-2009 00:00   34.83   34.83
     3       3                121W     38.8N 32.2686   12-AUG-2009 00:00   34.82   34.82
     3       3                121W     38.8N  30.491   12-AUG-2009 00:00     ...   34.44
     3       3                121W     38.8N 26.6257   12-AUG-2009 00:00     ...   33.63
     3       3                121W     38.8N  23.495   12-AUG-2009 00:00   32.96   32.96
     3       3                121W     38.8N 20.9152   12-AUG-2009 00:00   32.83   32.83
     3       3                121W     38.8N 17.9293   12-AUG-2009 00:00   32.70   32.70
     3       3                121W     38.8N 14.8822   12-AUG-2009 00:00   32.63   32.63
     3       3                121W     38.8N 11.8737   12-AUG-2009 00:00   32.47   32.47
     3       3                121W     38.8N  8.8551   12-AUG-2009 00:00   32.45   32.45
     3       3                121W     38.8N   5.823   12-AUG-2009 00:00   32.41   32.41
     3       3                121W     38.8N  3.7747   12-AUG-2009 00:00   32.38   32.38
     3       3                121W     38.8N    2.12   12-AUG-2009 00:00   32.38   32.38
plot /thick/line/sym nobig
plot /thick/line/sym nobig[z=@fln]
 
use WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d
list/m=20:21 pco2, pco2[z=@fav], pco2[z=@fln], pco2[z=@fnr]
   DATA SET: ./data/WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc
   West Coast Carbon cruises
   SUBSET   : E (instance): 20 to 21
 PROFILE    is Profile-id
 PCO2       is PCO2
 PCO2       is PCO2 (ave-filled by 3 pts, each Profile-id)
 PCO2       is PCO2 (linear-filled by 1 pts, each Profile-id)
 PCO2       is PCO2 (nearest-filled by 1 pts, each Profile-id)
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME        PCO2    PCO2    PCO2    PCO2
 
    20       89            117.77W    33.48N   67.96   30-AUG-2011 16:47   619.0   619.0   619.0   619.0
    20       89            117.77W    33.48N   68.21   30-AUG-2011 16:47     ...   608.4   619.6   608.4
    20       89            117.77W    33.48N   59.95   30-AUG-2011 16:47   597.8   597.8   597.8   597.8
    20       89            117.77W    33.48N   49.87   30-AUG-2011 16:47   570.7   570.7   570.7   570.7
    20       89            117.77W    33.48N   40.18   30-AUG-2011 16:47   578.0   578.0   578.0   578.0
    20       89            117.77W    33.48N   29.87   30-AUG-2011 16:47   471.3   471.3   471.3   471.3
    20       89            117.77W    33.48N   29.63   30-AUG-2011 16:47     ...   427.9   469.2   427.9
    20       89            117.77W    33.48N   19.83   30-AUG-2011 16:47   384.5   384.5   384.5   384.5
    20       89            117.77W    33.48N   14.86   30-AUG-2011 16:47   362.0   362.0   362.0   362.0
    20       89            117.77W    33.48N    9.92   30-AUG-2011 16:47   362.5   362.5   362.5   362.5
    20       89            117.77W    33.48N    2.94   30-AUG-2011 16:47   379.3   379.3   379.3   379.3
    20       89            117.77W    33.48N    3.01   30-AUG-2011 16:47     ...   379.3     ...   379.3
 
    21       90            117.75W    33.49N   31.62   30-AUG-2011 18:06   495.3   495.3   495.3   495.3
    21       90            117.75W    33.49N   31.63   30-AUG-2011 18:06     ...   465.0   495.4   465.0
    21       90            117.75W    33.49N   19.81   30-AUG-2011 18:06   434.7   434.7   434.7   434.7
    21       90            117.75W    33.49N   19.75   30-AUG-2011 18:06     ...   409.2   434.1   409.2
    21       90            117.75W    33.49N   14.87   30-AUG-2011 18:06   383.8   383.8   383.8   383.8
    21       90            117.75W    33.49N   10.41   30-AUG-2011 18:06   383.1   383.1   383.1   383.1
    21       90            117.75W    33.49N    3.08   30-AUG-2011 18:06   372.4   372.4   372.4   372.4
    21       90            117.75W    33.49N    2.94   30-AUG-2011 18:06     ...   372.4     ...   372.4
 
 
!!!!!!!!!!!!
! SMOOTHERS
 
use simple_traj_dsg
list sst, sst[x=@sbx], sst[x=@swl], sst[x=@shn], sst[x=@spz]
             DATA SET: ./data/simple_traj_dsg.nc
             X: 0.5 to 26.5
 Column  1: SST is Temperature (Degrees C)
 Column  2: SST[X=@SBX:3] is Temperature (Degrees C)(box smoothed by 3 pts on X)
 Column  3: SST[X=@SWL:3] is Temperature (Degrees C)(Welch smoothed by 3 pts on X)
 Column  4: SST[X=@SHN:3] is Temperature (Degrees C)(Hanning smoothed by 3 pts on X)
 Column  5: SST[X=@SPZ:3] is Temperature (Degrees C)(Parzen smoothed by 3 pts on X)
             SST    SST    SST    SST    SST
1    /  1:  24.41   ....   ....   ....   ....
2    /  2:  25.22  20.85  21.29  21.94  21.94
3    /  3:  12.92  20.70  19.92  18.76  18.76
4    /  4:  23.97  21.64  21.87  22.22  22.22
5    /  5:  28.03  26.59  26.73  26.95  26.95
6    /  6:  27.77  27.27  27.32  27.40  27.40
7    /  7:  26.02  26.62  26.56  26.47  26.47
8    /  8:  26.07  25.72  25.76  25.81  25.81
9    /  9:  25.08  25.05  25.06  25.06  25.06
10   / 10:  24.01  24.21  24.19  24.16  24.16
11   / 11:  23.53  23.39  23.41  23.43  23.43
12   / 12:  22.64  22.60  22.61  22.61  22.61
13   / 13:  21.64  22.56  22.47  22.33  22.33
14   / 14:  23.41  21.27  21.49  21.81  21.81
15   / 15:  18.77  20.05  19.92  19.73  19.73
16   / 16:  17.97  19.26  19.13  18.94  18.94
17   / 17:  21.05  20.43  20.49  20.59  20.59
18   / 18:  22.27  23.70  23.55  23.34  23.34
19   / 19:  27.77  25.35  25.59  25.96  25.96
20   / 20:  26.02  26.62  26.56  26.47  26.47
21   / 21:  26.07  25.72  25.76  25.81  25.81
22   / 22:  25.08  25.05  25.06  25.06  25.06
23   / 23:  24.01  24.21  24.19  24.16  24.16
24   / 24:  23.53  23.39  23.41  23.43  23.43
25   / 25:  22.64  22.60  22.61  22.61  22.61
26   / 26:  21.64   ....   ....   ....   ....
 
use DSG_ERDDAP_Tao5daySst
list/m=62  t_25, t_25[t=@sbx], t_25[t=@swl], t_25[t=@shn], t_25[t=@spz]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 62
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C)
 T_25       is Sea Surface Temperature (degree_C) (box smoothed by 3 pts, each Timeseries-id)
 T_25       is Sea Surface Temperature (degree_C) (Welch smoothed by 3 pts, each Timeseries-id)
 T_25       is Sea Surface Temperature (degree_C) (Hanning smoothed by 3 pts, each Timeseries-id)
 T_25       is Sea Surface Temperature (degree_C) (Parzen smoothed by 3 pts, each Timeseries-id)
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME        T_25    T_25    T_25    T_25    T_25
 
    62            8n95w        95W        8N       1   15-JAN-2017 12:00   26.02     ...     ...     ...     ...
    62            8n95w        95W        8N       1   20-JAN-2017 12:00   26.30   26.33   26.32   26.32   26.32
    62            8n95w        95W        8N       1   25-JAN-2017 12:00   26.66   26.60   26.60   26.61   26.61
    62            8n95w        95W        8N       1   30-JAN-2017 12:00   26.83   26.72   26.73   26.75   26.75
    62            8n95w        95W        8N       1   04-FEB-2017 12:00   26.67   26.71   26.71   26.70   26.70
    62            8n95w        95W        8N       1   09-FEB-2017 12:00   26.64   26.67   26.67   26.66   26.66
    62            8n95w        95W        8N       1   14-FEB-2017 12:00   26.71   26.73   26.73   26.72   26.72
    62            8n95w        95W        8N       1   19-FEB-2017 12:00   26.83   27.03   27.01   26.98   26.98
    62            8n95w        95W        8N       1   24-FEB-2017 12:00   27.53     ...     ...     ...     ...
 
 
use DSG_ERDDAP_Tao5daySst
plot/m=2/thick t_25
plot/over/color=red/thick/m=2/nolab t_25[t=@sbx]
plot/over/color=blue/thick/m=2/nolab t_25[t=@swl]
plot/over/color=green/thick=3/m=2/nolab t_25[t=@shn]
plot/over/color=black/line/sym=19/siz=.12/m=2/nolab t_25[t=@spz]
 
use WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d
list/m=1 pco2, pco2[z=@sbx], pco2[z=@swl], pco2[z=@shn]
   DATA SET: ./data/WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc
   West Coast Carbon cruises
   SUBSET   : E (instance): 1
 PROFILE    is Profile-id
 PCO2       is PCO2
 PCO2       is PCO2 (box smoothed by 3 pts, each Profile-id)
 PCO2       is PCO2 (Welch smoothed by 3 pts, each Profile-id)
 PCO2       is PCO2 (Hanning smoothed by 3 pts, each Profile-id)
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME        PCO2    PCO2    PCO2    PCO2
 
     1       70            122.43W    36.52N 2199.8201 25-AUG-2011 11:46    750.     ...     ...     ...
     1       70            122.43W    36.52N 2199.8899 25-AUG-2011 11:46     ...     ...     ...     ...
     1       70            122.43W    36.52N 2000.84   25-AUG-2011 11:46    784.     ...     ...     ...
     1       70            122.43W    36.52N 1750.47   25-AUG-2011 11:46    846.    867.    865.    862.
     1       70            122.43W    36.52N 1500.8199 25-AUG-2011 11:46    973.    971.    971.    972.
     1       70            122.43W    36.52N 1250.96   25-AUG-2011 11:46   1096.   1099.   1099.   1098.
     1       70            122.43W    36.52N  999.52   25-AUG-2011 11:46   1229.   1194.   1197.   1203.
     1       70            122.43W    36.52N  801.53   25-AUG-2011 11:46   1257.   1262.   1261.   1261.
     1       70            122.43W    36.52N  599.99   25-AUG-2011 11:46   1300.   1270.   1273.   1278.
     1       70            122.43W    36.52N  500.09   25-AUG-2011 11:46   1254.   1261.   1260.   1259.
     1       70            122.43W    36.52N  400.28   25-AUG-2011 11:46   1228.   1229.   1229.   1229.
     1       70            122.43W    36.52N  299.89   25-AUG-2011 11:46   1204.   1178.   1181.   1185.
     1       70            122.43W    36.52N   201.1   25-AUG-2011 11:46   1103.   1097.   1097.   1098.
     1       70            122.43W    36.52N  101.44   25-AUG-2011 11:46    984.   1001.    999.    997.
     1       70            122.43W    36.52N    80.8   25-AUG-2011 11:46    916.    932.    930.    928.
     1       70            122.43W    36.52N   59.83   25-AUG-2011 11:46    896.    892.    892.    893.
     1       70            122.43W    36.52N    50.1   25-AUG-2011 11:46    863.    854.    855.    856.
     1       70            122.43W    36.52N   39.66   25-AUG-2011 11:46    802.    777.    779.    783.
     1       70            122.43W    36.52N   30.14   25-AUG-2011 11:46    666.    641.    644.    648.
     1       70            122.43W    36.52N   20.23   25-AUG-2011 11:46    456.    499.    494.    488.
     1       70            122.43W    36.52N   10.29   25-AUG-2011 11:46    374.     ...     ...     ...
     1       70            122.43W    36.52N   10.19   25-AUG-2011 11:46     ...     ...     ...     ...
     1       70            122.43W    36.52N    4.01   25-AUG-2011 11:46     ...     ...     ...     ...
     1       70            122.43W    36.52N       4   25-AUG-2011 11:46    370.     ...     ...     ...
 
 
!!!!!!!!!!!!
! DIFFERENCES
 
use simple_traj_dsg
list sst, sst[x=@ddc], sst[x=@ddb], sst[x=@ddf]
             DATA SET: ./data/simple_traj_dsg.nc
             X: 0.5 to 26.5
 Column  1: SST is Temperature (Degrees C)
 Column  2: SST[X=@DDC] is Temperature (Degrees C)(centered derivative on X)
 Column  3: SST[X=@DDB] is Temperature (Degrees C)(backwards derivative on X)
 Column  4: SST[X=@DDF] is Temperature (Degrees C)(forward derivative on X)
             SST    SST    SST    SST
1    /  1:  24.41   ....   ....   0.81
2    /  2:  25.22 -5.745   0.81 -12.30
3    /  3:  12.92 -0.625 -12.30  11.05
4    /  4:  23.97  7.555  11.05   4.06
5    /  5:  28.03  1.900   4.06  -0.26
6    /  6:  27.77 -1.005  -0.26  -1.75
7    /  7:  26.02 -0.850  -1.75   0.05
8    /  8:  26.07 -0.470   0.05  -0.99
9    /  9:  25.08 -1.030  -0.99  -1.07
10   / 10:  24.01 -0.775  -1.07  -0.48
11   / 11:  23.53 -0.685  -0.48  -0.89
12   / 12:  22.64 -0.945  -0.89  -1.00
13   / 13:  21.64  0.385  -1.00   1.77
14   / 14:  23.41 -1.435   1.77  -4.64
15   / 15:  18.77 -2.720  -4.64  -0.80
16   / 16:  17.97  1.140  -0.80   3.08
17   / 17:  21.05  2.150   3.08   1.22
18   / 18:  22.27  3.360   1.22   5.50
19   / 19:  27.77  1.875   5.50  -1.75
20   / 20:  26.02 -0.850  -1.75   0.05
21   / 21:  26.07 -0.470   0.05  -0.99
22   / 22:  25.08 -1.030  -0.99  -1.07
23   / 23:  24.01 -0.775  -1.07  -0.48
24   / 24:  23.53 -0.685  -0.48  -0.89
25   / 25:  22.64 -0.945  -0.89  -1.00
26   / 26:  21.64   ....  -1.00   ....
 
use DSG_ERDDAP_Tao5daySst
list/m=62  t_25, t_25[t=@ddc], t_25[t=@ddb], t_25[t=@ddf]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 62
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C)
 T_25       is Sea Surface Temperature (degree_C) (centered derivative, each Timeseries-id)
 T_25       is Sea Surface Temperature (degree_C) (backwards derivative, each Timeseries-id)
 T_25       is Sea Surface Temperature (degree_C) (forward derivative, each Timeseries-id)
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME        T_25       T_25       T_25       T_25
 
    62            8n95w        95W        8N       1   15-JAN-2017 12:00   26.02        ...        ...  6.317E-07
    62            8n95w        95W        8N       1   20-JAN-2017 12:00   26.30  1.484E-06  6.317E-07  8.525E-07
    62            8n95w        95W        8N       1   25-JAN-2017 12:00   26.66  1.241E-06  8.525E-07  3.887E-07
    62            8n95w        95W        8N       1   30-JAN-2017 12:00   26.83  2.499E-09  3.887E-07 -3.862E-07
    62            8n95w        95W        8N       1   04-FEB-2017 12:00   26.67 -4.444E-07 -3.862E-07 -5.819E-08
    62            8n95w        95W        8N       1   09-FEB-2017 12:00   26.64  1.028E-07 -5.819E-08  1.610E-07
    62            8n95w        95W        8N       1   14-FEB-2017 12:00   26.71  4.446E-07  1.610E-07  2.837E-07
    62            8n95w        95W        8N       1   19-FEB-2017 12:00   26.83  1.908E-06  2.837E-07  1.624E-06
    62            8n95w        95W        8N       1   24-FEB-2017 12:00   27.53        ...  1.624E-06        ...
 
 
use WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d
list/m=3:4 pco2, pco2[z=@ddc], pco2[z=@ddb], pco2[z=@ddf]
   DATA SET: ./data/WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc
   West Coast Carbon cruises
   SUBSET   : E (instance): 3 to 4
 PROFILE    is Profile-id
 PCO2       is PCO2
 PCO2       is PCO2 (centered derivative, each Profile-id)
 PCO2       is PCO2 (backwards derivative, each Profile-id)
 PCO2       is PCO2 (forward derivative, each Profile-id)
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME        PCO2    PCO2    PCO2    PCO2
 
     3       72            122.02W    36.71N  369.49   25-AUG-2011 19:23   1216.     ...     ...     ...
     3       72            122.02W    36.71N  369.55   25-AUG-2011 19:23     ...    1.78     ...     ...
     3       72            122.02W    36.71N  350.73   25-AUG-2011 19:23   1233.     ...     ...   -0.95
     3       72            122.02W    36.71N  299.85   25-AUG-2011 19:23   1200.   -0.67   -0.44   -0.23
     3       72            122.02W    36.71N   199.7   25-AUG-2011 19:23   1182.   -2.45   -0.24   -2.21
     3       72            122.02W    36.71N     150   25-AUG-2011 19:23   1016.   -4.61   -4.45   -0.16
     3       72            122.02W    36.71N   125.1   25-AUG-2011 19:23   1010.   -3.07   -0.24   -2.83
     3       72            122.02W    36.71N  100.37   25-AUG-2011 19:23    940.   -7.05   -3.12   -3.93
     3       72            122.02W    36.71N   80.05   25-AUG-2011 19:23    851.   -7.45   -4.39   -3.06
     3       72            122.02W    36.71N   60.04   25-AUG-2011 19:23    790.  -10.11   -3.08   -7.03
     3       72            122.02W    36.71N   40.05   25-AUG-2011 19:23    649.  -19.20   -7.02  -12.18
     3       72            122.02W    36.71N      20   25-AUG-2011 19:23    405.     ...  -24.40     ...
     3       72            122.02W    36.71N   20.06   25-AUG-2011 19:23     ...   -7.16     ...     ...
     3       72            122.02W    36.71N   15.27   25-AUG-2011 19:23    388.     ...     ...   -5.56
     3       72            122.02W    36.71N   10.11   25-AUG-2011 19:23    361.   -9.12   -4.77   -4.35
     3       72            122.02W    36.71N    3.68   25-AUG-2011 19:23    335.     ...   -7.88     ...
     3       72            122.02W    36.71N    3.71   25-AUG-2011 19:23     ...     ...     ...     ...
 
     4       73            121.97W    36.74N  112.36   25-AUG-2011 22:03   1024.     ...     ...     ...
     4       73            121.97W    36.74N  112.26   25-AUG-2011 22:03     ...  -18.46     ...     ...
     4       73            121.97W    36.74N   99.61   25-AUG-2011 22:03    906.     ...     ...   -3.68
     4       73            121.97W    36.74N   79.97   25-AUG-2011 22:03    847.   -7.14   -3.02   -4.12
     4       73            121.97W    36.74N   60.21   25-AUG-2011 22:03    766.   -5.42   -5.46    0.04
     4       73            121.97W    36.74N   50.23   25-AUG-2011 22:03    766.   -8.78    0.06   -8.84
     4       73            121.97W    36.74N   40.42   25-AUG-2011 22:03    679.  -13.95   -8.71   -5.25
     4       73            121.97W    36.74N   30.14   25-AUG-2011 22:03    626.  -24.31   -5.16  -19.16
     4       73            121.97W    36.74N   19.98   25-AUG-2011 22:03    430.  -32.64  -25.73   -6.92
     4       73            121.97W    36.74N   14.92   25-AUG-2011 22:03    378.     ...  -21.05     ...
     4       73            121.97W    36.74N   14.98   25-AUG-2011 22:03     ...  -16.85     ...     ...
     4       73            121.97W    36.74N   10.02   25-AUG-2011 22:03    336.     ...     ...    2.14
     4       73            121.97W    36.74N    3.06   25-AUG-2011 22:03    349.     ...    3.64     ...
     4       73            121.97W    36.74N    3.01   25-AUG-2011 22:03     ...     ...     ...     ...
 
cancel data/all
 
 
!!!!!!!!!!!!
! AVERAGES and  INTEGRALS
 
! trajectory
use simple_traj_dsg.nc
 
list sst[x=@ave]
   DATA SET: ./data/simple_traj_dsg.nc
 ID         is Trajectory-id
 SST        is Temperature (Degrees C) (averaged, each Trajectory-id)
    FEATURE  ID             SST
     1       1000         23.78
     2       2000         24.78
     3       3000         21.11
     4       4000           ...
list sst[x=@sum] , sst[x=@sum]/rowsize
   DATA SET: ./data/simple_traj_dsg.nc
 ID         is Trajectory-id
 SST        is Temperature (Degrees C) (summed, each Trajectory-id)
 EX#2       is SST[X=@SUM]/ROWSIZE
    FEATURE  ID             SST    EX#2
     1       1000         114.5   22.91
     2       2000         196.8   24.59
     3       3000         103.5   20.69
     4       4000         196.8   24.59
 
list/m=3 sst[x=@iin], sst[x=@rsum]
   DATA SET: ./data/simple_traj_dsg.nc
   SUBSET   : E (instance): 3
 ID         is Trajectory-id
 SST        is Temperature (Degrees C) (indef. integ., each Trajectory-id)
 SST        is Temperature (Degrees C) (running sum, each Trajectory-id)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME            SST     SST
 
     3       3000             138W       25N   02-JAN-1970 00:00  5.983E+06    23.4
     3       3000             136W     23.6N   04-JAN-1970 00:00  1.078E+07    42.2
     3       3000             135W       23N   08-JAN-1970 00:00  1.297E+07    60.1
     3       3000             139W     22.5N   13-JAN-1970 00:00  2.169E+07    81.2
     3       3000             129W     21.1N   20-JAN-1970 00:00  2.981E+07   103.5
 
list rowsize[e=@sum]
   DATA SET: ./data/simple_traj_dsg.nc
 ID         is Trajectory-id
 ROWSIZE    is Number of Observations for this Trajectory
    FEATURE  ID         ROWSIZE
     1                    26.00
 
use profile_dsg
list sal[z=@ave]
   DATA SET: ./data/profile_dsg.nc
 PROFILE    is Profile-id
 SAL        is sal (averaged, each Profile-id)
    FEATURE  PROFILE     LONGITUDE  LATITUDE            TIME         SAL
     1       1             123.14W     41.3N   13-AUG-2009 00:00   33.54
     2       2              120.4W    44.11N   13-AUG-2009 12:58   34.12
     3       3                121W     38.8N   12-AUG-2009 00:00   33.32
list sal[z=@sum], sal[z=@sum]/rowsize
   DATA SET: ./data/profile_dsg.nc
 PROFILE    is Profile-id
 SAL        is sal (summed, each Profile-id)
 EX#2       is SAL[Z=@SUM]/ROWSIZE
    FEATURE  PROFILE     LONGITUDE  LATITUDE            TIME         SAL    EX#2
     1       1             123.14W     41.3N   13-AUG-2009 00:00   268.4   33.55
     2       2              120.4W    44.11N   13-AUG-2009 12:58   443.1   34.08
     3       3                121W     38.8N   12-AUG-2009 00:00   433.8   33.37
list sal[z=@din]
   DATA SET: ./data/profile_dsg.nc
 PROFILE    is Profile-id
 SAL        is sal (integrated, each Profile-id)
    FEATURE  PROFILE     LONGITUDE  LATITUDE            TIME         SAL
     1       1             123.14W     41.3N   13-AUG-2009 00:00   1117.
     2       2              120.4W    44.11N   13-AUG-2009 12:58   1105.
     3       3                121W     38.8N   12-AUG-2009 00:00   1079.
list sal, sal[z=@iin], sal[z=@rsum]
   DATA SET: ./data/profile_dsg.nc
 PROFILE    is Profile-id
 SAL        is sal
 SAL        is sal (indef. integ., each Profile-id)
 SAL        is sal (running sum, each Profile-id)
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME         SAL     SAL     SAL
 
     1       1             123.14W     41.3N 33.2111   13-AUG-2009 00:00   33.68     54.    33.7
     1       1             123.14W     41.3N 31.5953   13-AUG-2009 00:00   33.68    193.    67.4
     1       1             123.14W     41.3N 24.9692   13-AUG-2009 00:00   33.61    379.   101.0
     1       1             123.14W     41.3N 20.5466   13-AUG-2009 00:00   33.55    541.   134.5
     1       1             123.14W     41.3N  15.312   13-AUG-2009 00:00   33.50    715.   168.0
     1       1             123.14W     41.3N 10.1546   13-AUG-2009 00:00   33.47    888.   201.5
     1       1             123.14W     41.3N  4.9567   13-AUG-2009 00:00   33.46   1023.   234.9
     1       1             123.14W     41.3N    2.12   13-AUG-2009 00:00   33.44   1117.   268.4
 
     2       2              120.4W    44.11N 33.2111   13-AUG-2009 12:58   34.71     33.    34.7
     2       2              120.4W    44.11N 32.2686   13-AUG-2009 12:58   34.41     80.    69.1
     2       2              120.4W    44.11N  30.491   13-AUG-2009 12:58   34.28    176.   103.4
     2       2              120.4W    44.11N 26.6257   13-AUG-2009 12:58   34.28    296.   137.7
     2       2              120.4W    44.11N  23.495   13-AUG-2009 12:58   34.25    394.   171.9
     2       2              120.4W    44.11N 20.9152   13-AUG-2009 12:58   34.19    489.   206.1
     2       2              120.4W    44.11N 17.9293   13-AUG-2009 12:58   34.31    593.   240.4
     2       2              120.4W    44.11N 14.8822   13-AUG-2009 12:58   34.30    696.   274.7
     2       2              120.4W    44.11N 11.8737   13-AUG-2009 12:58   34.29    800.   309.0
     2       2              120.4W    44.11N  8.8551   13-AUG-2009 12:58   34.21    903.   343.2
     2       2              120.4W    44.11N   5.823   13-AUG-2009 12:58   34.11    990.   377.3
     2       2              120.4W    44.11N  3.7747   13-AUG-2009 12:58   32.94   1051.   410.3
     2       2              120.4W    44.11N    2.12   13-AUG-2009 12:58   32.78   1105.   443.1
 
     3       3                121W     38.8N 33.2111   12-AUG-2009 00:00   34.83     33.    34.8
     3       3                121W     38.8N 32.2686   12-AUG-2009 00:00   34.82     80.    69.7
     3       3                121W     38.8N  30.491   12-AUG-2009 00:00   35.63    181.   105.3
     3       3                121W     38.8N 26.6257   12-AUG-2009 00:00   35.32    304.   140.6
     3       3                121W     38.8N  23.495   12-AUG-2009 00:00   32.96    398.   173.6
     3       3                121W     38.8N 20.9152   12-AUG-2009 00:00   32.83    490.   206.4
     3       3                121W     38.8N 17.9293   12-AUG-2009 00:00   32.70    588.   239.1
     3       3                121W     38.8N 14.8822   12-AUG-2009 00:00   32.63    687.   271.7
     3       3                121W     38.8N 11.8737   12-AUG-2009 00:00   32.47    785.   304.2
     3       3                121W     38.8N  8.8551   12-AUG-2009 00:00   32.45    883.   336.6
     3       3                121W     38.8N   5.823   12-AUG-2009 00:00   32.41    966.   369.1
     3       3                121W     38.8N  3.7747   12-AUG-2009 00:00   32.38   1026.   401.4
     3       3                121W     38.8N    2.12   12-AUG-2009 00:00   32.38   1079.   433.8
 
 
list sal, sal[z=@iin], sal[z=@rsum]
   DATA SET: ./data/profile_dsg.nc
 PROFILE    is Profile-id
 SAL        is sal
 SAL        is sal (indef. integ., each Profile-id)
 SAL        is sal (running sum, each Profile-id)
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME         SAL     SAL     SAL
 
     1       1             123.14W     41.3N 33.2111   13-AUG-2009 00:00   33.68     54.    33.7
     1       1             123.14W     41.3N 31.5953   13-AUG-2009 00:00   33.68    193.    67.4
     1       1             123.14W     41.3N 24.9692   13-AUG-2009 00:00   33.61    379.   101.0
     1       1             123.14W     41.3N 20.5466   13-AUG-2009 00:00   33.55    541.   134.5
     1       1             123.14W     41.3N  15.312   13-AUG-2009 00:00   33.50    715.   168.0
     1       1             123.14W     41.3N 10.1546   13-AUG-2009 00:00   33.47    888.   201.5
     1       1             123.14W     41.3N  4.9567   13-AUG-2009 00:00   33.46   1023.   234.9
     1       1             123.14W     41.3N    2.12   13-AUG-2009 00:00   33.44   1117.   268.4
 
     2       2              120.4W    44.11N 33.2111   13-AUG-2009 12:58   34.71     33.    34.7
     2       2              120.4W    44.11N 32.2686   13-AUG-2009 12:58   34.41     80.    69.1
     2       2              120.4W    44.11N  30.491   13-AUG-2009 12:58   34.28    176.   103.4
     2       2              120.4W    44.11N 26.6257   13-AUG-2009 12:58   34.28    296.   137.7
     2       2              120.4W    44.11N  23.495   13-AUG-2009 12:58   34.25    394.   171.9
     2       2              120.4W    44.11N 20.9152   13-AUG-2009 12:58   34.19    489.   206.1
     2       2              120.4W    44.11N 17.9293   13-AUG-2009 12:58   34.31    593.   240.4
     2       2              120.4W    44.11N 14.8822   13-AUG-2009 12:58   34.30    696.   274.7
     2       2              120.4W    44.11N 11.8737   13-AUG-2009 12:58   34.29    800.   309.0
     2       2              120.4W    44.11N  8.8551   13-AUG-2009 12:58   34.21    903.   343.2
     2       2              120.4W    44.11N   5.823   13-AUG-2009 12:58   34.11    990.   377.3
     2       2              120.4W    44.11N  3.7747   13-AUG-2009 12:58   32.94   1051.   410.3
     2       2              120.4W    44.11N    2.12   13-AUG-2009 12:58   32.78   1105.   443.1
 
     3       3                121W     38.8N 33.2111   12-AUG-2009 00:00   34.83     33.    34.8
     3       3                121W     38.8N 32.2686   12-AUG-2009 00:00   34.82     80.    69.7
     3       3                121W     38.8N  30.491   12-AUG-2009 00:00   35.63    181.   105.3
     3       3                121W     38.8N 26.6257   12-AUG-2009 00:00   35.32    304.   140.6
     3       3                121W     38.8N  23.495   12-AUG-2009 00:00   32.96    398.   173.6
     3       3                121W     38.8N 20.9152   12-AUG-2009 00:00   32.83    490.   206.4
     3       3                121W     38.8N 17.9293   12-AUG-2009 00:00   32.70    588.   239.1
     3       3                121W     38.8N 14.8822   12-AUG-2009 00:00   32.63    687.   271.7
     3       3                121W     38.8N 11.8737   12-AUG-2009 00:00   32.47    785.   304.2
     3       3                121W     38.8N  8.8551   12-AUG-2009 00:00   32.45    883.   336.6
     3       3                121W     38.8N   5.823   12-AUG-2009 00:00   32.41    966.   369.1
     3       3                121W     38.8N  3.7747   12-AUG-2009 00:00   32.38   1026.   401.4
     3       3                121W     38.8N    2.12   12-AUG-2009 00:00   32.38   1079.   433.8
 
let s_ave = sal[z=@ave]
list s_ave[e=@sum]
   DATA SET: ./data/profile_dsg.nc
 PROFILE    is Profile-id
 S_AVE      is SAL[Z=@AVE]
    FEATURE  PROFILE      S_AVE
     1                    101.0
 
use DSG_ERDDAP_Tao5daySst
sh dat
     currently SET data sets:
    1> ./data/simple_traj_dsg.nc
       DSG Feature type Trajectory
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:4       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:4       ...
 LONS     longitude                      tot 26      ...       ...       ...       1:4       ...
 LATS     latitude                       tot 26      ...       ...       ...       1:4       ...
 TIME     Centered Time                  tot 26      ...       ...       ...       1:4       ...
 SST      Temperature                    tot 26      ...       ...       ...       1:4       ...
 SSTGAP   IF SST GT 20 THEN SST          tot 26      ...       ...       ...       1:4       ...
 
    2> ./data/profile_dsg.nc
       DSG Feature type Profile
 name     title                             I         J         K         L         M         N
 ROWSIZE  number of obs for this profile   ...       ...       ...       ...       1:3       ...
 PROFILE  profile ID: Cruise and Station   ...       ...       ...       ...       1:3       ...
 TIME     time                             ...       ...       ...       ...       1:3       ...
 LATITUDE station latitude                 ...       ...       ...       ...       1:3       ...
 LONGITUDE
          station longitude                ...       ...       ...       ...       1:3       ...
 POT_TEMP_DEGC
          pot_temp_degc                    ...       ...     tot 34      ...       1:3       ...
 SAL      sal                              ...       ...     tot 34      ...       1:3       ...
 DEPTH    DEPTH_M                          ...       ...     tot 34      ...       1:3       ...
 
    3> ./data/DSG_ERDDAP_Tao5daySst.nc  (default)
       DSG Feature type Timeseries
 name     title                             I         J         K         L         M         N
 ARRAY    Array                            ...       ...       ...       ...       1:70      ...
 STATION  Station                          ...       ...       ...       ...       1:70      ...
 WMO_PLATFORM_CODE
          WMO Platform Code                ...       ...       ...       ...       1:70      ...
 LONGITUDE
          Nominal Longitude                ...       ...       ...       ...       1:70      ...
 LATITUDE Nominal Latitude                 ...       ...       ...       ...       1:70      ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:70      ...
 TIME     Centered Time                    ...       ...       ...     tot 2376    1:70      ...
 DEPTH    Depth                            ...       ...       ...     tot 2376    1:70      ...
 T_25     Sea Surface Temperature          ...       ...       ...     tot 2376    1:70      ...
 QT_5025  Sea Surface Temperature Quality  ...       ...       ...     tot 2376    1:70      ...
 ST_6025  Sea Surface Temperature Source   ...       ...       ...     tot 2376    1:70      ...
 STR_TEMP FLOATSTR(T_25, "(F5.2)")         ...       ...       ...     tot 2376    1:70      ...
 
list/m=1:5 t_25[T=@ave]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 1 to 5
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C) (averaged, each Timeseries-id)
    FEATURE  STATION     LONGITUDE  LATITUDE    T_25
     1             0n0e         0E         0   29.20
     2            0n10w        10W         0   28.64
     3           0n110w       110W         0   26.11
     4           0n125w       125W         0   26.19
     5           0n140w       140W         0   26.23
list/m=1:5 t_25[T=@sum], t_25[T=@sum]/rowsize
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 1 to 5
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C) (summed, each Timeseries-id)
 EX#2       is T_25[T=@SUM]/ROWSIZE
    FEATURE  STATION     LONGITUDE  LATITUDE    T_25    EX#2
     1             0n0e         0E         0   1084.   29.30
     2            0n10w        10W         0   1062.   28.71
     3           0n110w       110W         0    608.   24.32
     4           0n125w       125W         0    969.   26.20
     5           0n140w       140W         0    975.   26.34
list/m=1:5 t_25[T=@din]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 1 to 5
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C) (integrated, each Timeseries-id)
    FEATURE  STATION     LONGITUDE  LATITUDE       T_25
     1             0n0e         0E         0  2.548E+08
     2            0n10w        10W         0  2.499E+08
     3           0n110w       110W         0  1.399E+08
     4           0n125w       125W         0  2.286E+08
     5           0n140w       140W         0  2.289E+08
list/m=30:31/t=1-jan-2017:15-feb-2017 t_25, t_25[t=@rsum], t_25[t=@iin]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : TIME: 15-JAN-2017 12:00 to 14-FEB-2017 12:00 (indef. integ.)
              E (instance): 30 to 31
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C)
 T_25       is Sea Surface Temperature (degree_C) (running sum, each Timeseries-id)
 T_25       is Sea Surface Temperature (degree_C) (indef. integ., each Timeseries-id)
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME        T_25    T_25       T_25
 
    30           2n155w       155W        2N       1   15-JAN-2017 12:00   25.75     26.  1.112E+07
    30           2n155w       155W        2N       1   20-JAN-2017 12:00   26.26     52.  2.247E+07
    30           2n155w       155W        2N       1   25-JAN-2017 12:00   26.44     78.  3.389E+07
    30           2n155w       155W        2N       1   30-JAN-2017 12:00   26.54    105.  4.535E+07
    30           2n155w       155W        2N       1   04-FEB-2017 12:00   26.58    132.  5.683E+07
    30           2n155w       155W        2N       1   09-FEB-2017 12:00   26.87    158.  6.844E+07
    30           2n155w       155W        2N       1   14-FEB-2017 12:00   26.79    185.  8.001E+07
 
    31           2n170w       170W        2N       1   15-JAN-2017 12:00   26.99     27.  1.166E+07
    31           2n170w       170W        2N       1   20-JAN-2017 12:00   27.41     54.  2.350E+07
    31           2n170w       170W        2N       1   25-JAN-2017 12:00   27.44     82.  3.536E+07
    31           2n170w       170W        2N       1   30-JAN-2017 12:00   26.85    109.  4.696E+07
 
 
cancel data/all
 
 
!!!!!!!!!!!!
! WEIGHTS
! @WGT weights for ave, integration
 
use simple_traj_dsg
list sst[x=@wgt], 1000* earth_distance(lons, lats)
   DATA SET: ./data/simple_traj_dsg.nc
 ID         is Trajectory-id
 SST        is Temperature (Degrees C) (weights for avg,int, each Trajectory-id)
 EX#2       is 1000* EARTH_DISTANCE(LONS, LATS)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME          SST      EX#2
 
     1       1000              98W       20N   02-JAN-1970 12:00  236130.        0.
     1       1000              96W       21N   03-JAN-1970 12:00  236130.   236130.
     1       1000              95W     22.3N   04-JAN-1970 12:00  177703.   177703.
     1       1000              99W       23N   05-JAN-1970 12:00  417788.   417788.
     1       1000              90W       21N   06-JAN-1970 12:00  320255.   953993.
 
     2       2000             108W       15N   03-JAN-1970 00:00  241436.  2015347.
     2       2000             106W       16N   05-JAN-1970 00:00  241436.   241436.
     2       2000             105W     14.5N   07-JAN-1970 00:00  198319.   198319.
     2       2000             109W       15N   09-JAN-1970 00:00  433707.   433707.
     2       2000             101W     15.6N   11-JAN-1970 00:00  276544.   860595.
     2       2000             108W       16N   13-JAN-1970 00:00  276544.   750263.
     2       2000             106W       17N   15-JAN-1970 00:00  240487.   240487.
     2       2000             105W     17.2N   17-JAN-1970 00:00  108584.   108584.
 
     3       3000             138W       25N   02-JAN-1970 00:00  255570.  3521817.
     3       3000             136W     23.6N   04-JAN-1970 00:00  255570.   255570.
     3       3000             135W       23N   08-JAN-1970 00:00  121991.   121991.
     3       3000             139W     22.5N   13-JAN-1970 00:00  413926.   413926.
     3       3000             129W     21.1N   20-JAN-1970 00:00  364752.  1043916.
 
     4       4000             116W       18N   02-JAN-1970 00:00       0.  1404639.
     4       4000             116W       18N   03-JAN-1970 00:00       0.        0.
     4       4000             116W       18N   04-JAN-1970 00:00       0.        0.
     4       4000             116W       18N   05-JAN-1970 00:00       0.        0.
     4       4000             116W       18N   06-JAN-1970 00:00       0.        0.
     4       4000             116W       18N   07-JAN-1970 00:00       0.        0.
     4       4000             116W       18N   08-JAN-1970 00:00       0.        0.
     4       4000             116W       18N   09-JAN-1970 00:00       0.        0.
 
list sst[x=@ave]
   DATA SET: ./data/simple_traj_dsg.nc
 ID         is Trajectory-id
 SST        is Temperature (Degrees C) (averaged, each Trajectory-id)
    FEATURE  ID             SST
     1       1000         23.78
     2       2000         24.78
     3       3000         21.11
     4       4000           ...
 
cancel data/all
! note variable "time" doesn't have a missing-data flag so the last column
! for some reason shows NaN at the end of this listing.
use DSG_ERDDAP_Tao5daySst
list/m=62  t_25, t_25[t=@wgt], time[t=@ddf]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 62
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C)
 T_25       is Sea Surface Temperature (degree_C) (weights for avg,int, each Timeseries-id)
 TIME       is Centered Time (seconds since 1970-01-01T00:00:00Z) (forward derivative, each Timeseries-id)
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME        T_25     T_25    TIME
 
    62            8n95w        95W        8N       1   15-JAN-2017 12:00   26.02  432000.   1.000
    62            8n95w        95W        8N       1   20-JAN-2017 12:00   26.30  432000.   1.000
    62            8n95w        95W        8N       1   25-JAN-2017 12:00   26.66  432000.   1.000
    62            8n95w        95W        8N       1   30-JAN-2017 12:00   26.83  432000.   1.000
    62            8n95w        95W        8N       1   04-FEB-2017 12:00   26.67  432000.   1.000
    62            8n95w        95W        8N       1   09-FEB-2017 12:00   26.64  432000.   1.000
    62            8n95w        95W        8N       1   14-FEB-2017 12:00   26.71  432000.   1.000
    62            8n95w        95W        8N       1   19-FEB-2017 12:00   26.83  432000.   1.000
    62            8n95w        95W        8N       1   24-FEB-2017 12:00   27.53  432000.     NaN
 
use WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d
list/m=3:4 pco2, pco2[z=@wgt], press_db[z=@ddf]
   DATA SET: ./data/WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc
   West Coast Carbon cruises
   SUBSET   : E (instance): 3 to 4
 PROFILE    is Profile-id
 PCO2       is PCO2
 PCO2       is PCO2 (weights for avg,int, each Profile-id)
 PRESS_DB   is PRESS_DB (forward derivative, each Profile-id)
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME        PCO2    PCO2 PRESS_DB
 
     3       72            122.02W    36.71N  369.49   25-AUG-2011 19:23   1216.    0.06   1.000
     3       72            122.02W    36.71N  369.55   25-AUG-2011 19:23     ...    9.38  -2.006
     3       72            122.02W    36.71N  350.73   25-AUG-2011 19:23   1233.   34.85  -1.460
     3       72            122.02W    36.71N  299.85   25-AUG-2011 19:23   1200.   75.52  -1.326
     3       72            122.02W    36.71N   199.7   25-AUG-2011 19:23   1182.   74.93  -0.663
     3       72            122.02W    36.71N     150   25-AUG-2011 19:23   1016.   37.30  -0.668
     3       72            122.02W    36.71N   125.1   25-AUG-2011 19:23   1010.   24.81  -0.997
     3       72            122.02W    36.71N  100.37   25-AUG-2011 19:23    940.   22.52  -0.902
     3       72            122.02W    36.71N   80.05   25-AUG-2011 19:23    851.   20.17  -0.992
     3       72            122.02W    36.71N   60.04   25-AUG-2011 19:23    790.   20.00  -0.999
     3       72            122.02W    36.71N   40.05   25-AUG-2011 19:23    649.   20.02  -1.001
     3       72            122.02W    36.71N      20   25-AUG-2011 19:23    405.    9.99   0.006
     3       72            122.02W    36.71N   20.06   25-AUG-2011 19:23     ...    2.36  -2.025
     3       72            122.02W    36.71N   15.27   25-AUG-2011 19:23    388.    4.97  -1.037
     3       72            122.02W    36.71N   10.11   25-AUG-2011 19:23    361.    5.80  -1.110
     3       72            122.02W    36.71N    3.68   25-AUG-2011 19:23    335.    3.20   0.009
     3       72            122.02W    36.71N    3.71   25-AUG-2011 19:23     ...    0.03     ...
 
     4       73            121.97W    36.74N  112.36   25-AUG-2011 22:03   1024.    0.10  -1.000
     4       73            121.97W    36.74N  112.26   25-AUG-2011 22:03     ...    6.38  -1.984
     4       73            121.97W    36.74N   99.61   25-AUG-2011 22:03    906.   16.15  -1.216
     4       73            121.97W    36.74N   79.97   25-AUG-2011 22:03    847.   19.70  -1.003
     4       73            121.97W    36.74N   60.21   25-AUG-2011 22:03    766.   14.87  -0.671
     4       73            121.97W    36.74N   50.23   25-AUG-2011 22:03    766.    9.90  -0.991
     4       73            121.97W    36.74N   40.42   25-AUG-2011 22:03    679.   10.05  -1.023
     4       73            121.97W    36.74N   30.14   25-AUG-2011 22:03    626.   10.22  -0.994
     4       73            121.97W    36.74N   19.98   25-AUG-2011 22:03    430.    7.61  -0.665
     4       73            121.97W    36.74N   14.92   25-AUG-2011 22:03    378.    2.50   0.024
     4       73            121.97W    36.74N   14.98   25-AUG-2011 22:03     ...    2.45  -2.024
     4       73            121.97W    36.74N   10.02   25-AUG-2011 22:03    336.    5.96  -1.168
     4       73            121.97W    36.74N    3.06   25-AUG-2011 22:03    349.    3.51  -0.014
     4       73            121.97W    36.74N    3.01   25-AUG-2011 22:03     ...    0.05     ...
 
cancel data/all
 
!!!!!!!!!!!!
! EVENT MASK
 
use simple_traj_dsg
list sst, sst[x=@evn:20], sst[x=@evn:24]
   DATA SET: ./data/simple_traj_dsg.nc
 ID         is Trajectory-id
 SST        is Temperature (Degrees C)
 SST        is Temperature (Degrees C) (event mask of 20, each Trajectory-id)
 SST        is Temperature (Degrees C) (event mask of 24, each Trajectory-id)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME         SST     SST     SST
 
     1       1000              98W       20N   02-JAN-1970 12:00   24.41   0.000   0.000
     1       1000              96W       21N   03-JAN-1970 12:00   25.22   0.000   0.000
     1       1000              95W     22.3N   04-JAN-1970 12:00   12.92   1.000   1.000
     1       1000              99W       23N   05-JAN-1970 12:00   23.97   2.000   1.000
     1       1000              90W       21N   06-JAN-1970 12:00   28.03   2.000   2.000
 
     2       2000             108W       15N   03-JAN-1970 00:00   27.77   0.000   0.000
     2       2000             106W       16N   05-JAN-1970 00:00   26.02   0.000   0.000
     2       2000             105W     14.5N   07-JAN-1970 00:00   26.07   0.000   0.000
     2       2000             109W       15N   09-JAN-1970 00:00   25.08   0.000   0.000
     2       2000             101W     15.6N   11-JAN-1970 00:00   24.01   0.000   0.000
     2       2000             108W       16N   13-JAN-1970 00:00   23.53   0.000   1.000
     2       2000             106W       17N   15-JAN-1970 00:00   22.64   0.000   1.000
     2       2000             105W     17.2N   17-JAN-1970 00:00   21.64   0.000   1.000
 
     3       3000             138W       25N   02-JAN-1970 00:00   23.41   0.000   0.000
     3       3000             136W     23.6N   04-JAN-1970 00:00   18.77   1.000   0.000
     3       3000             135W       23N   08-JAN-1970 00:00   17.97   1.000   0.000
     3       3000             139W     22.5N   13-JAN-1970 00:00   21.05   2.000   0.000
     3       3000             129W     21.1N   20-JAN-1970 00:00   22.27   2.000   0.000
 
     4       4000             116W       18N   02-JAN-1970 00:00   27.77   0.000   0.000
     4       4000             116W       18N   03-JAN-1970 00:00   26.02   0.000   0.000
     4       4000             116W       18N   04-JAN-1970 00:00   26.07   0.000   0.000
     4       4000             116W       18N   05-JAN-1970 00:00   25.08   0.000   0.000
     4       4000             116W       18N   06-JAN-1970 00:00   24.01   0.000   0.000
     4       4000             116W       18N   07-JAN-1970 00:00   23.53   0.000   1.000
     4       4000             116W       18N   08-JAN-1970 00:00   22.64   0.000   1.000
     4       4000             116W       18N   09-JAN-1970 00:00   21.64   0.000   1.000
 
use DSG_ERDDAP_Tao5daySst.nc
let/title="Where station is 5n155w, 8n95w"  mask = element_index_str (station, {"5n155w", "8n95w"})
set data/fmask=mask DSG_ERDDAP_Tao5daySst
list t_25, t_25[t=@evn:27.4]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
Mask on features has been set: Where station is 5n155w, 8n95w
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C)
 T_25       is Sea Surface Temperature (degree_C) (event mask of 27.4, each Timeseries-id)
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME        T_25    T_25
 
    46           5n155w       155W        5N       1   15-JAN-2017 12:00   27.37   0.000
    46           5n155w       155W        5N       1   20-JAN-2017 12:00   27.32   0.000
    46           5n155w       155W        5N       1   25-JAN-2017 12:00   27.35   0.000
    46           5n155w       155W        5N       1   30-JAN-2017 12:00   27.70   1.000
    46           5n155w       155W        5N       1   04-FEB-2017 12:00   27.63   1.000
    46           5n155w       155W        5N       1   09-FEB-2017 12:00   27.45   1.000
    46           5n155w       155W        5N       1   14-FEB-2017 12:00   27.02   2.000
    46           5n155w       155W        5N       1   19-FEB-2017 12:00   27.00   2.000
 
    62            8n95w        95W        8N       1   15-JAN-2017 12:00   26.02   0.000
    62            8n95w        95W        8N       1   20-JAN-2017 12:00   26.30   0.000
    62            8n95w        95W        8N       1   25-JAN-2017 12:00   26.66   0.000
    62            8n95w        95W        8N       1   30-JAN-2017 12:00   26.83   0.000
    62            8n95w        95W        8N       1   04-FEB-2017 12:00   26.67   0.000
    62            8n95w        95W        8N       1   09-FEB-2017 12:00   26.64   0.000
    62            8n95w        95W        8N       1   14-FEB-2017 12:00   26.71   0.000
    62            8n95w        95W        8N       1   19-FEB-2017 12:00   26.83   0.000
    62            8n95w        95W        8N       1   24-FEB-2017 12:00   27.53   1.000
 
 
use WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d
list/m=3:4 pco2, pco2[z=@evn:1000], pco2[z=@evn:500]
   DATA SET: ./data/WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc
   West Coast Carbon cruises
   SUBSET   : E (instance): 3 to 4
 PROFILE    is Profile-id
 PCO2       is PCO2
 PCO2       is PCO2 (event mask of 1000, each Profile-id)
 PCO2       is PCO2 (event mask of 500, each Profile-id)
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME        PCO2    PCO2    PCO2
 
     3       72            122.02W    36.71N  369.49   25-AUG-2011 19:23   1216.   0.000   0.000
     3       72            122.02W    36.71N  369.55   25-AUG-2011 19:23     ...   0.000   0.000
     3       72            122.02W    36.71N  350.73   25-AUG-2011 19:23   1233.   0.000   0.000
     3       72            122.02W    36.71N  299.85   25-AUG-2011 19:23   1200.   0.000   0.000
     3       72            122.02W    36.71N   199.7   25-AUG-2011 19:23   1182.   0.000   0.000
     3       72            122.02W    36.71N     150   25-AUG-2011 19:23   1016.   0.000   0.000
     3       72            122.02W    36.71N   125.1   25-AUG-2011 19:23   1010.   0.000   0.000
     3       72            122.02W    36.71N  100.37   25-AUG-2011 19:23    940.   1.000   0.000
     3       72            122.02W    36.71N   80.05   25-AUG-2011 19:23    851.   1.000   0.000
     3       72            122.02W    36.71N   60.04   25-AUG-2011 19:23    790.   1.000   0.000
     3       72            122.02W    36.71N   40.05   25-AUG-2011 19:23    649.   1.000   0.000
     3       72            122.02W    36.71N      20   25-AUG-2011 19:23    405.   1.000   1.000
     3       72            122.02W    36.71N   20.06   25-AUG-2011 19:23     ...   1.000   1.000
     3       72            122.02W    36.71N   15.27   25-AUG-2011 19:23    388.   1.000   1.000
     3       72            122.02W    36.71N   10.11   25-AUG-2011 19:23    361.   1.000   1.000
     3       72            122.02W    36.71N    3.68   25-AUG-2011 19:23    335.   1.000   1.000
     3       72            122.02W    36.71N    3.71   25-AUG-2011 19:23     ...   1.000   1.000
 
     4       73            121.97W    36.74N  112.36   25-AUG-2011 22:03   1024.   0.000   0.000
     4       73            121.97W    36.74N  112.26   25-AUG-2011 22:03     ...   0.000   0.000
     4       73            121.97W    36.74N   99.61   25-AUG-2011 22:03    906.   0.000   0.000
     4       73            121.97W    36.74N   79.97   25-AUG-2011 22:03    847.   0.000   0.000
     4       73            121.97W    36.74N   60.21   25-AUG-2011 22:03    766.   0.000   0.000
     4       73            121.97W    36.74N   50.23   25-AUG-2011 22:03    766.   0.000   0.000
     4       73            121.97W    36.74N   40.42   25-AUG-2011 22:03    679.   0.000   0.000
     4       73            121.97W    36.74N   30.14   25-AUG-2011 22:03    626.   0.000   0.000
     4       73            121.97W    36.74N   19.98   25-AUG-2011 22:03    430.   0.000   1.000
     4       73            121.97W    36.74N   14.92   25-AUG-2011 22:03    378.   0.000   1.000
     4       73            121.97W    36.74N   14.98   25-AUG-2011 22:03     ...   0.000   1.000
     4       73            121.97W    36.74N   10.02   25-AUG-2011 22:03    336.   0.000   1.000
     4       73            121.97W    36.74N    3.06   25-AUG-2011 22:03    349.   0.000   1.000
     4       73            121.97W    36.74N    3.01   25-AUG-2011 22:03     ...   0.000   1.000
 
 
!!!!!!!!!!!!
! CIA, CIB, CDA, CDB not implemented at this time.
! issue a note and just do the operation on the full list
 
use simple_traj_dsg
list sstgap, sstgap[x=@cda],  sstgap[x=@cdb],  sstgap[x=@cia],  sstgap[x=@cib]
   DATA SET: ./data/simple_traj_dsg.nc
 ID         is Trajectory-id
 SSTGAP     is IF SST GT 20 THEN SST
 SSTGAP     is IF SST GT 20 THEN SST (closest dist above by 1 pts)
 SSTGAP     is IF SST GT 20 THEN SST (closest dist below by 1 pts)
 SSTGAP     is IF SST GT 20 THEN SST (closest index above by 1 pts)
 SSTGAP     is IF SST GT 20 THEN SST (closest index below by 1 pts)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME      SSTGAP  SSTGAP  SSTGAP  SSTGAP  SSTGAP
 
     1       1000              98W       20N   02-JAN-1970 12:00   24.41   0.000   0.000   0.000   0.000
     1       1000              96W       21N   03-JAN-1970 12:00   25.22   0.000   0.000   0.000   0.000
     1       1000              95W     22.3N   04-JAN-1970 12:00     ...   1.960   1.960   1.000   1.000
     1       1000              99W       23N   05-JAN-1970 12:00   23.97   0.000   0.000   0.000   0.000
     1       1000              90W       21N   06-JAN-1970 12:00   28.03   0.000   0.000   0.000   0.000
 
     2       2000             108W       15N   03-JAN-1970 00:00   27.77   0.000   0.000   0.000   0.000
     2       2000             106W       16N   05-JAN-1970 00:00     ...   3.920   1.960   2.000   1.000
     2       2000             105W     14.5N   07-JAN-1970 00:00     ...   1.960   3.920   1.000   2.000
     2       2000             109W       15N   09-JAN-1970 00:00   25.08   0.000   0.000   0.000   0.000
     2       2000             101W     15.6N   11-JAN-1970 00:00   24.01   0.000   0.000   0.000   0.000
     2       2000             108W       16N   13-JAN-1970 00:00   23.53   0.000   0.000   0.000   0.000
     2       2000             106W       17N   15-JAN-1970 00:00     ...   5.880   1.960   3.000   1.000
     2       2000             105W     17.2N   17-JAN-1970 00:00     ...   3.920   3.920   2.000   2.000
 
     3       3000             138W       25N   02-JAN-1970 00:00     ...   1.960   5.880   1.000   3.000
     3       3000             136W     23.6N   04-JAN-1970 00:00   23.41   0.000   0.000   0.000   0.000
     3       3000             135W       23N   08-JAN-1970 00:00     ...   1.960   1.960   1.000   1.000
     3       3000             139W     22.5N   13-JAN-1970 00:00   21.05   0.000   0.000   0.000   0.000
     3       3000             129W     21.1N   20-JAN-1970 00:00   22.27   0.000   0.000   0.000   0.000
 
     4       4000             116W       18N   02-JAN-1970 00:00   37.77   0.000   0.000   0.000   0.000
     4       4000             116W       18N   03-JAN-1970 00:00     ...   7.840   1.960   4.000   1.000
     4       4000             116W       18N   04-JAN-1970 00:00     ...   5.880   3.920   3.000   2.000
     4       4000             116W       18N   05-JAN-1970 00:00     ...   3.920   5.880   2.000   3.000
     4       4000             116W       18N   06-JAN-1970 00:00     ...   1.960   7.840   1.000   4.000
     4       4000             116W       18N   07-JAN-1970 00:00   23.53   0.000   0.000   0.000   0.000
     4       4000             116W       18N   08-JAN-1970 00:00   22.64   0.000   0.000   0.000   0.000
     4       4000             116W       18N   09-JAN-1970 00:00   21.64   0.000   0.000   0.000   0.000
 
*** Running ferret script: bn_dsg_one_e_val.jnl
! bn_dsg_one_e_val.jnl
!
! Return a feature-variable at a specific M.
! earlier versions listed the value at m=1
! in the grave-accent returns.
 
use DSG_ERDDAP_Tao5daySst
 
list/m=1:6 station, rowsize
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 1 to 6
 STATION    is Timeseries-id
 STATION    is Station
 ROWSIZE    is Number of Observations for this TimeSeries
    FEATURE  STATION     LONGITUDE  LATITUDE STATION ROWSIZE
     1             0n0e         0E         0  "0n0e"   37.00
     2            0n10w        10W         0 "0n10w"   37.00
     3           0n110w       110W         0 "0n110w"  25.00
     4           0n125w       125W         0 "0n125w"  37.00
     5           0n140w       140W         0 "0n140w"  37.00
     6           0n155w       155W         0 "0n155w"  37.00
list/m=6 station
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 6
 STATION    is Timeseries-id
 STATION    is Station
    FEATURE  STATION     LONGITUDE  LATITUDE STATION
     6           0n155w       155W         0 "0n155w"
 
 
! Previous versions listed the value at m=1.
 
say `station[m=3]` `station[e=3]`
 !-> MESSAGE/CONTINUE 0n110w 0n110w
0n110w 0n110w
say `station[m=5]` `station[e=5]`
 !-> MESSAGE/CONTINUE 0n140w 0n140w
0n140w 0n140w
 
say `station[m=3]` `longitude[m=3]` `rowsize[m=3]`
 !-> MESSAGE/CONTINUE 0n110w 250 25
0n110w 250 25
*** Running ferret script: bn_dsg_list_comma_tab.jnl
! bn_dsg_list_comma_tab
! Tests of comma- and tab-separated output from DSG datasets
! 5/30/2019
 
use dsg_cross_dateline
 
! default listing makes the big header
! and includes coordinate and feature info
 
list/format=comma temp, lons
             DATA SET: ./data/dsg_cross_dateline.nc
 Column  1: ID is Trajectory-id
 Column  2: TIME
 Column  3: LONGITUDE (degrees_east)
 Column  4: LATITUDE (degrees_north)
 Column  5: TEMP is Temperature (Degrees C)    BAD FLAG : -1.E+34
 Column  6: LONS is longitude (degrees_east)    BAD FLAG : -1.E+34
ID,TIME,LONGITUDE,LATITUDE,TEMP,LONS
096U20160108,09-FEB-2017 12:00,172E,20S,28.08,172
096U20160108,14-FEB-2017 12:00,174W,10S,28.2,-174
096U20160108,19-FEB-2017 12:00,175E,30N,29.01,175
096U20160108,24-FEB-2017 12:00,171W,40N,29.24,-171
096U20160108,01-MAR-2017 12:00,174W,20S,29.14,-174
A 2017 01 14,02-MAR-2017 12:00,150E,15S,29.57,150
A 2017 01 14,03-MAR-2017 12:00,170W,20N,29.26,-170
A 2017 01 14,04-MAR-2017 12:00,120E,10N,28.53,120
09AR20151209,05-MAR-2017 12:00,102E,10N,28.97,102
09AR20151209,06-MAR-2017 12:00,100E,20N,28.03,100
09AR20151209,07-MAR-2017 12:00,123E,30N,27.77,123
09AR20151209,08-MAR-2017 12:00,100E,40N,26.91,100
09AR20151209,09-MAR-2017 12:00,110E,50N,26.07,110
 
! subset in longitude
list/format=comma/x=0:180 temp, lons
             DATA SET: ./data/dsg_cross_dateline.nc
 Column  1: ID is Trajectory-id
 Column  2: TIME
 Column  3: LONGITUDE (degrees_east)
 Column  4: LATITUDE (degrees_north)
 Column  5: TEMP is Temperature (Degrees C)    BAD FLAG : -1.E+34
 Column  6: LONS is longitude (degrees_east)    BAD FLAG : -1.E+34
ID,TIME,LONGITUDE,LATITUDE,TEMP,LONS
096U20160108,09-FEB-2017 12:00,172E,20S,28.08,172
096U20160108,19-FEB-2017 12:00,175E,30N,29.01,175
A 2017 01 14,02-MAR-2017 12:00,150E,15S,29.57,150
A 2017 01 14,04-MAR-2017 12:00,120E,10N,28.53,120
09AR20151209,05-MAR-2017 12:00,102E,10N,28.97,102
09AR20151209,06-MAR-2017 12:00,100E,20N,28.03,100
09AR20151209,07-MAR-2017 12:00,123E,30N,27.77,123
09AR20151209,08-MAR-2017 12:00,100E,40N,26.91,100
09AR20151209,09-MAR-2017 12:00,110E,50N,26.07,110
list/x=0:180/m=2:3/form=comma temp, lons
             DATA SET: ./data/dsg_cross_dateline.nc
 Column  1: ID is Trajectory-id
 Column  2: TIME
 Column  3: LONGITUDE (degrees_east)
 Column  4: LATITUDE (degrees_north)
 Column  5: TEMP is Temperature (Degrees C)    BAD FLAG : -1.E+34
 Column  6: LONS is longitude (degrees_east)    BAD FLAG : -1.E+34
ID,TIME,LONGITUDE,LATITUDE,TEMP,LONS
A 2017 01 14,02-MAR-2017 12:00,150E,15S,29.57,150
A 2017 01 14,04-MAR-2017 12:00,120E,10N,28.53,120
09AR20151209,05-MAR-2017 12:00,102E,10N,28.97,102
09AR20151209,06-MAR-2017 12:00,100E,20N,28.03,100
09AR20151209,07-MAR-2017 12:00,123E,30N,27.77,123
09AR20151209,08-MAR-2017 12:00,100E,40N,26.91,100
09AR20151209,09-MAR-2017 12:00,110E,50N,26.07,110
 
! when coordinate variables are specified they are unformatted.
list/x=0:180/m=2:3/form=comma lons, lats, time, temp
             DATA SET: ./data/dsg_cross_dateline.nc
 Column  1: ID is Trajectory-id
 Column  2: TIME
 Column  3: LONGITUDE (degrees_east)
 Column  4: LATITUDE (degrees_north)
 Column  5: LONS is longitude (degrees_east)    BAD FLAG : -1.E+34
 Column  6: LATS is latitude (degrees_north)    BAD FLAG : -1.E+34
 Column  7: TIME is Centered Time (seconds since 1970-01-01T00:00:00Z)    BAD FLAG : NaN
 Column  8: TEMP is Temperature (Degrees C)    BAD FLAG : -1.E+34
ID,TIME,LONGITUDE,LATITUDE,LONS,LATS,TIME,TEMP
A 2017 01 14,02-MAR-2017 12:00,150E,15S,150,-15,1488456000,29.57
A 2017 01 14,04-MAR-2017 12:00,120E,10N,120,10,1488628800,28.53
09AR20151209,05-MAR-2017 12:00,102E,10N,102,10,1488715200,28.97
09AR20151209,06-MAR-2017 12:00,100E,20N,100,20,1488801600,28.03
09AR20151209,07-MAR-2017 12:00,123E,30N,123,30,1488888000,27.77
09AR20151209,08-MAR-2017 12:00,100E,40N,100,40,1488974400,26.91
09AR20151209,09-MAR-2017 12:00,110E,50N,110,50,1489060800,26.07
 
! /nohead removes all the header except one line with column names
list/x=0:180/m=2:3/form=comma/nohead temp, lats
ID,TIME,LONGITUDE,LATITUDE,TEMP,LATS
A 2017 01 14,02-MAR-2017 12:00,150E,15S,29.57,-15
A 2017 01 14,04-MAR-2017 12:00,120E,10N,28.53,10
09AR20151209,05-MAR-2017 12:00,102E,10N,28.97,10
09AR20151209,06-MAR-2017 12:00,100E,20N,28.03,20
09AR20151209,07-MAR-2017 12:00,123E,30N,27.77,30
09AR20151209,08-MAR-2017 12:00,100E,40N,26.91,40
09AR20151209,09-MAR-2017 12:00,110E,50N,26.07,50
 
! /norow removes the coordinate data
list/x=0:180/m=2:3/form=comma/norow temp, lons
             DATA SET: ./data/dsg_cross_dateline.nc
 Column  1: TEMP is Temperature (Degrees C)    BAD FLAG : -1.E+34
 Column  2: LONS is longitude (degrees_east)    BAD FLAG : -1.E+34
TEMP,LONS
 29.57,150
 28.53,120
 28.97,102
 28.03,100
 27.77,123
 26.91,100
 26.07,110
 
! /norow and /nohead.
list/x=0:180/m=2:3/form=comma/norow/nohead  lons, lats, time, temp
LONS,LATS,TIME,TEMP
 150,-15,1488456000,29.57
 120,10,1488628800,28.53
 102,10,1488715200,28.97
 100,20,1488801600,28.03
 123,30,1488888000,27.77
 100,40,1488974400,26.91
 110,50,1489060800,26.07
 
! tab formats
list/format=tab temp, lons
             DATA SET: ./data/dsg_cross_dateline.nc
 Column  1: ID is Trajectory-id
 Column  2: TIME
 Column  3: LONGITUDE (degrees_east)
 Column  4: LATITUDE (degrees_north)
 Column  5: TEMP is Temperature (Degrees C)    BAD FLAG : -1.E+34
 Column  6: LONS is longitude (degrees_east)    BAD FLAG : -1.E+34
ID	TIME	LONGITUDE	LATITUDE	TEMP	LONS
096U20160108	09-FEB-2017 12:00	172E	20S	28.08	172
096U20160108	14-FEB-2017 12:00	174W	10S	28.2	-174
096U20160108	19-FEB-2017 12:00	175E	30N	29.01	175
096U20160108	24-FEB-2017 12:00	171W	40N	29.24	-171
096U20160108	01-MAR-2017 12:00	174W	20S	29.14	-174
A 2017 01 14	02-MAR-2017 12:00	150E	15S	29.57	150
A 2017 01 14	03-MAR-2017 12:00	170W	20N	29.26	-170
A 2017 01 14	04-MAR-2017 12:00	120E	10N	28.53	120
09AR20151209	05-MAR-2017 12:00	102E	10N	28.97	102
09AR20151209	06-MAR-2017 12:00	100E	20N	28.03	100
09AR20151209	07-MAR-2017 12:00	123E	30N	27.77	123
09AR20151209	08-MAR-2017 12:00	100E	40N	26.91	100
09AR20151209	09-MAR-2017 12:00	110E	50N	26.07	110
 
! subset in longitude
list/format=tab/x=0:180 temp, lons
             DATA SET: ./data/dsg_cross_dateline.nc
 Column  1: ID is Trajectory-id
 Column  2: TIME
 Column  3: LONGITUDE (degrees_east)
 Column  4: LATITUDE (degrees_north)
 Column  5: TEMP is Temperature (Degrees C)    BAD FLAG : -1.E+34
 Column  6: LONS is longitude (degrees_east)    BAD FLAG : -1.E+34
ID	TIME	LONGITUDE	LATITUDE	TEMP	LONS
096U20160108	09-FEB-2017 12:00	172E	20S	28.08	172
096U20160108	19-FEB-2017 12:00	175E	30N	29.01	175
A 2017 01 14	02-MAR-2017 12:00	150E	15S	29.57	150
A 2017 01 14	04-MAR-2017 12:00	120E	10N	28.53	120
09AR20151209	05-MAR-2017 12:00	102E	10N	28.97	102
09AR20151209	06-MAR-2017 12:00	100E	20N	28.03	100
09AR20151209	07-MAR-2017 12:00	123E	30N	27.77	123
09AR20151209	08-MAR-2017 12:00	100E	40N	26.91	100
09AR20151209	09-MAR-2017 12:00	110E	50N	26.07	110
list/x=0:180/m=2:3/form=tab temp, lons
             DATA SET: ./data/dsg_cross_dateline.nc
 Column  1: ID is Trajectory-id
 Column  2: TIME
 Column  3: LONGITUDE (degrees_east)
 Column  4: LATITUDE (degrees_north)
 Column  5: TEMP is Temperature (Degrees C)    BAD FLAG : -1.E+34
 Column  6: LONS is longitude (degrees_east)    BAD FLAG : -1.E+34
ID	TIME	LONGITUDE	LATITUDE	TEMP	LONS
A 2017 01 14	02-MAR-2017 12:00	150E	15S	29.57	150
A 2017 01 14	04-MAR-2017 12:00	120E	10N	28.53	120
09AR20151209	05-MAR-2017 12:00	102E	10N	28.97	102
09AR20151209	06-MAR-2017 12:00	100E	20N	28.03	100
09AR20151209	07-MAR-2017 12:00	123E	30N	27.77	123
09AR20151209	08-MAR-2017 12:00	100E	40N	26.91	100
09AR20151209	09-MAR-2017 12:00	110E	50N	26.07	110
 
! when coordinate variables are specified they are unformatted.
list/x=0:180/m=2:3/form=tab lons, lats, time, temp
             DATA SET: ./data/dsg_cross_dateline.nc
 Column  1: ID is Trajectory-id
 Column  2: TIME
 Column  3: LONGITUDE (degrees_east)
 Column  4: LATITUDE (degrees_north)
 Column  5: LONS is longitude (degrees_east)    BAD FLAG : -1.E+34
 Column  6: LATS is latitude (degrees_north)    BAD FLAG : -1.E+34
 Column  7: TIME is Centered Time (seconds since 1970-01-01T00:00:00Z)    BAD FLAG : NaN
 Column  8: TEMP is Temperature (Degrees C)    BAD FLAG : -1.E+34
ID	TIME	LONGITUDE	LATITUDE	LONS	LATS	TIME	TEMP
A 2017 01 14	02-MAR-2017 12:00	150E	15S	150	-15	1488456000	29.57
A 2017 01 14	04-MAR-2017 12:00	120E	10N	120	10	1488628800	28.53
09AR20151209	05-MAR-2017 12:00	102E	10N	102	10	1488715200	28.97
09AR20151209	06-MAR-2017 12:00	100E	20N	100	20	1488801600	28.03
09AR20151209	07-MAR-2017 12:00	123E	30N	123	30	1488888000	27.77
09AR20151209	08-MAR-2017 12:00	100E	40N	100	40	1488974400	26.91
09AR20151209	09-MAR-2017 12:00	110E	50N	110	50	1489060800	26.07
 
! /nohead removes all the header except one line with column names
list/x=0:180/m=2:3/form=tab/nohead temp, lons
ID	TIME	LONGITUDE	LATITUDE	TEMP	LONS
A 2017 01 14	02-MAR-2017 12:00	150E	15S	29.57	150
A 2017 01 14	04-MAR-2017 12:00	120E	10N	28.53	120
09AR20151209	05-MAR-2017 12:00	102E	10N	28.97	102
09AR20151209	06-MAR-2017 12:00	100E	20N	28.03	100
09AR20151209	07-MAR-2017 12:00	123E	30N	27.77	123
09AR20151209	08-MAR-2017 12:00	100E	40N	26.91	100
09AR20151209	09-MAR-2017 12:00	110E	50N	26.07	110
 
! /norow removes the coordinate data
list/x=0:180/m=2:3/form=tab/norow temp, lons
             DATA SET: ./data/dsg_cross_dateline.nc
 Column  1: TEMP is Temperature (Degrees C)    BAD FLAG : -1.E+34
 Column  2: LONS is longitude (degrees_east)    BAD FLAG : -1.E+34
TEMP	LONS
 29.57	150
 28.53	120
 28.97	102
 28.03	100
 27.77	123
 26.91	100
 26.07	110
 
! /norow and /nohead.
list/x=0:180/m=2:3/form=tab/norow/nohead  lons, lats, time, temp
LONS	LATS	TIME	TEMP
 150	-15	1488456000	29.57
 120	10	1488628800	28.53
 102	10	1488715200	28.97
 100	20	1488801600	28.03
 123	30	1488888000	27.77
 100	40	1488974400	26.91
 110	50	1489060800	26.07
 
 
! Test profile data, automatically include depth in the coordinates
 
use profile_dsg
let pmask = {1,,1}
set data/fmask=pmask profile_dsg
list/form=comma sal, pot_temp_degc
             DATA SET: ./data/profile_dsg.nc
 Column  1: PROFILE is Profile-id
 Column  2: TIME
 Column  3: LONGITUDE (degrees_east)
 Column  4: LATITUDE (degrees_north)
 Column  5: DEPTH (m)
 Column  6: SAL           is sal    BAD FLAG : -999
 Column  7: POT_TEMP_DEGC is pot_temp_degc    BAD FLAG : -999
PROFILE,TIME,LONGITUDE,LATITUDE,DEPTH (m),SAL,POT_TEMP_DEGC
1,13-AUG-2009 00:00,123.14W,41.3N,33.2111,33.68067932128906,8.648105621337891
1,13-AUG-2009 00:00,123.14W,41.3N,31.5953,33.6773796081543,8.652873992919922
1,13-AUG-2009 00:00,123.14W,41.3N,24.9692,33.60728073120117,-999
1,13-AUG-2009 00:00,123.14W,41.3N,20.5466,33.54837036132812,8.971604347229004
1,13-AUG-2009 00:00,123.14W,41.3N,15.312,33.49597930908203,9.0455904006958
1,13-AUG-2009 00:00,123.14W,41.3N,10.1546,33.4687385559082,9.458066940307617
1,13-AUG-2009 00:00,123.14W,41.3N,4.9567,33.45804977416992,10.60527038574219
1,13-AUG-2009 00:00,123.14W,41.3N,2.12,33.43600845336914,11.47130012512207
3,12-AUG-2009 00:00,121W,38.8N,33.2111,34.83100128173828,8.435639381408691
3,12-AUG-2009 00:00,121W,38.8N,32.2686,34.8194694519043,8.595584869384766
3,12-AUG-2009 00:00,121W,38.8N,30.491,35.6285514831543,9.048553466796875
3,12-AUG-2009 00:00,121W,38.8N,26.6257,35.32197952270508,8.679335594177246
3,12-AUG-2009 00:00,121W,38.8N,23.495,32.96345138549805,8.829413414001465
3,12-AUG-2009 00:00,121W,38.8N,20.9152,32.83121871948242,-999
3,12-AUG-2009 00:00,121W,38.8N,17.9293,32.70352935791016,-999
3,12-AUG-2009 00:00,121W,38.8N,14.8822,32.62794876098633,-999
3,12-AUG-2009 00:00,121W,38.8N,11.8737,32.47484970092773,15.86264991760254
3,12-AUG-2009 00:00,121W,38.8N,8.8551,32.4465217590332,16.20255088806152
3,12-AUG-2009 00:00,121W,38.8N,5.823,32.41252899169922,16.4692497253418
3,12-AUG-2009 00:00,121W,38.8N,3.7747,32.38262176513672,16.81428909301758
3,12-AUG-2009 00:00,121W,38.8N,2.12,32.38262176513672,16.81428909301758
 
*** Running ferret script: bn_dsg_if_exprns.jnl
! bn_dsg_if_exprns.jnl
! Test computing expressions with IF
! ACM 7/11/19
 
! The data has a lot of missing values. Make sure those are handled
! correctly
 
use uwnd_dsg.nc
 
! Defining masks  IF condition THEN 1
 
let ugt = if uwnd_abs gt 6.   then 1
let uge = if uwnd_abs ge 6.76 then 1
list uwnd_abs, ugt, uge
   DATA SET: ./data/uwnd_dsg.nc
 TRAJECTORY is Trajectory-id
 UWND_ABS   is Eastward wind magnitude (m s-1)
 UGT        is IF UWND_ABS GT 6.   THEN 1
 UGE        is IF UWND_ABS GE 6.76 THEN 1
    FEATURE  TRAJECTORY  LONGITUDE  LATITUDE            TIME     UWND_ABS    UGT     UGE
 
     1           1002.0        98W       20N   22-AUG-2017 07:34   5.800     ...     ...
     1           1002.0        96W       21N   22-AUG-2017 07:35   5.350     ...     ...
     1           1002.0        95W     22.3N   22-AUG-2017 07:36     ...     ...     ...
     1           1002.0        99W       23N   22-AUG-2017 07:37     ...     ...     ...
     1           1002.0        90W       21N   22-AUG-2017 07:38     ...     ...     ...
     1           1002.0       108W       15N   22-AUG-2017 07:39   6.710   1.000     ...
     1           1002.0       106W       16N   22-AUG-2017 07:40   6.100   1.000     ...
     1           1002.0       105W     14.5N   22-AUG-2017 07:41     ...     ...     ...
     1           1002.0       109W       15N   22-AUG-2017 07:42     ...     ...     ...
     1           1002.0       101W     15.6N   22-AUG-2017 07:43     ...     ...     ...
     1           1002.0       108W       16N   22-AUG-2017 07:44   6.270   1.000     ...
     1           1002.0       106W       17N   22-AUG-2017 07:45   6.760   1.000   1.000
     1           1002.0       105W     17.2N   22-AUG-2017 07:46   7.350   1.000   1.000
     1           1002.0       138W       25N   22-AUG-2017 07:47   7.120   1.000   1.000
     1           1002.0       136W     23.6N   22-AUG-2017 07:48     ...     ...     ...
 
let ult = if uwnd_abs LT 6.   then 1
let ule = if uwnd_abs LE 6.76 then 1
list uwnd_abs, ult, ule
   DATA SET: ./data/uwnd_dsg.nc
 TRAJECTORY is Trajectory-id
 UWND_ABS   is Eastward wind magnitude (m s-1)
 ULT        is IF UWND_ABS LT 6.   THEN 1
 ULE        is IF UWND_ABS LE 6.76 THEN 1
    FEATURE  TRAJECTORY  LONGITUDE  LATITUDE            TIME     UWND_ABS    ULT     ULE
 
     1           1002.0        98W       20N   22-AUG-2017 07:34   5.800   1.000   1.000
     1           1002.0        96W       21N   22-AUG-2017 07:35   5.350   1.000   1.000
     1           1002.0        95W     22.3N   22-AUG-2017 07:36     ...     ...     ...
     1           1002.0        99W       23N   22-AUG-2017 07:37     ...     ...     ...
     1           1002.0        90W       21N   22-AUG-2017 07:38     ...     ...     ...
     1           1002.0       108W       15N   22-AUG-2017 07:39   6.710     ...   1.000
     1           1002.0       106W       16N   22-AUG-2017 07:40   6.100     ...   1.000
     1           1002.0       105W     14.5N   22-AUG-2017 07:41     ...     ...     ...
     1           1002.0       109W       15N   22-AUG-2017 07:42     ...     ...     ...
     1           1002.0       101W     15.6N   22-AUG-2017 07:43     ...     ...     ...
     1           1002.0       108W       16N   22-AUG-2017 07:44   6.270     ...   1.000
     1           1002.0       106W       17N   22-AUG-2017 07:45   6.760     ...   1.000
     1           1002.0       105W     17.2N   22-AUG-2017 07:46   7.350     ...     ...
     1           1002.0       138W       25N   22-AUG-2017 07:47   7.120     ...     ...
     1           1002.0       136W     23.6N   22-AUG-2017 07:48     ...     ...     ...
 
let une = if uwnd_abs NE 6.76 then 1
let ueq = if uwnd_abs EQ 6.76 then 1
list uwnd_abs, une, ueq
   DATA SET: ./data/uwnd_dsg.nc
 TRAJECTORY is Trajectory-id
 UWND_ABS   is Eastward wind magnitude (m s-1)
 UNE        is IF UWND_ABS NE 6.76 THEN 1
 UEQ        is IF UWND_ABS EQ 6.76 THEN 1
    FEATURE  TRAJECTORY  LONGITUDE  LATITUDE            TIME     UWND_ABS    UNE     UEQ
 
     1           1002.0        98W       20N   22-AUG-2017 07:34   5.800   1.000     ...
     1           1002.0        96W       21N   22-AUG-2017 07:35   5.350   1.000     ...
     1           1002.0        95W     22.3N   22-AUG-2017 07:36     ...     ...     ...
     1           1002.0        99W       23N   22-AUG-2017 07:37     ...     ...     ...
     1           1002.0        90W       21N   22-AUG-2017 07:38     ...     ...     ...
     1           1002.0       108W       15N   22-AUG-2017 07:39   6.710   1.000     ...
     1           1002.0       106W       16N   22-AUG-2017 07:40   6.100   1.000     ...
     1           1002.0       105W     14.5N   22-AUG-2017 07:41     ...     ...     ...
     1           1002.0       109W       15N   22-AUG-2017 07:42     ...     ...     ...
     1           1002.0       101W     15.6N   22-AUG-2017 07:43     ...     ...     ...
     1           1002.0       108W       16N   22-AUG-2017 07:44   6.270   1.000     ...
     1           1002.0       106W       17N   22-AUG-2017 07:45   6.760     ...   1.000
     1           1002.0       105W     17.2N   22-AUG-2017 07:46   7.350   1.000     ...
     1           1002.0       138W       25N   22-AUG-2017 07:47   7.120   1.000     ...
     1           1002.0       136W     23.6N   22-AUG-2017 07:48     ...     ...     ...
 
 
! Now with ELSE another-variable
 
let ugt = if uwnd_abs gt 6    then uwnd_abs else uwnd_mean
let uge = if uwnd_abs ge 6.27 then uwnd_abs else uwnd_mean
list uwnd_abs, ugt, uge
   DATA SET: ./data/uwnd_dsg.nc
 TRAJECTORY is Trajectory-id
 UWND_ABS   is Eastward wind magnitude (m s-1)
 UGT        is IF UWND_ABS GT 6    THEN UWND_ABS ELSE UWND_MEAN
 UGE        is IF UWND_ABS GE 6.27 THEN UWND_ABS ELSE UWND_MEAN
    FEATURE  TRAJECTORY  LONGITUDE  LATITUDE            TIME     UWND_ABS    UGT     UGE
 
     1           1002.0        98W       20N   22-AUG-2017 07:34   5.800  -5.800  -5.800
     1           1002.0        96W       21N   22-AUG-2017 07:35   5.350  -5.350  -5.350
     1           1002.0        95W     22.3N   22-AUG-2017 07:36     ...     ...     ...
     1           1002.0        99W       23N   22-AUG-2017 07:37     ...     ...     ...
     1           1002.0        90W       21N   22-AUG-2017 07:38     ...     ...     ...
     1           1002.0       108W       15N   22-AUG-2017 07:39   6.710   6.710   6.710
     1           1002.0       106W       16N   22-AUG-2017 07:40   6.100   6.100  -6.100
     1           1002.0       105W     14.5N   22-AUG-2017 07:41     ...     ...     ...
     1           1002.0       109W       15N   22-AUG-2017 07:42     ...     ...     ...
     1           1002.0       101W     15.6N   22-AUG-2017 07:43     ...     ...     ...
     1           1002.0       108W       16N   22-AUG-2017 07:44   6.270   6.270   6.270
     1           1002.0       106W       17N   22-AUG-2017 07:45   6.760   6.760   6.760
     1           1002.0       105W     17.2N   22-AUG-2017 07:46   7.350   7.350   7.350
     1           1002.0       138W       25N   22-AUG-2017 07:47   7.120   7.120   7.120
     1           1002.0       136W     23.6N   22-AUG-2017 07:48     ...     ...     ...
 
let ult = if uwnd_abs LT 6    then uwnd_abs else uwnd_mean
let ule = if uwnd_abs LE 6.27 then uwnd_abs else uwnd_mean
list uwnd_abs, ult, ule
   DATA SET: ./data/uwnd_dsg.nc
 TRAJECTORY is Trajectory-id
 UWND_ABS   is Eastward wind magnitude (m s-1)
 ULT        is IF UWND_ABS LT 6    THEN UWND_ABS ELSE UWND_MEAN
 ULE        is IF UWND_ABS LE 6.27 THEN UWND_ABS ELSE UWND_MEAN
    FEATURE  TRAJECTORY  LONGITUDE  LATITUDE            TIME     UWND_ABS    ULT     ULE
 
     1           1002.0        98W       20N   22-AUG-2017 07:34   5.800   5.800   5.800
     1           1002.0        96W       21N   22-AUG-2017 07:35   5.350   5.350   5.350
     1           1002.0        95W     22.3N   22-AUG-2017 07:36     ...     ...     ...
     1           1002.0        99W       23N   22-AUG-2017 07:37     ...     ...     ...
     1           1002.0        90W       21N   22-AUG-2017 07:38     ...     ...     ...
     1           1002.0       108W       15N   22-AUG-2017 07:39   6.710  -6.710  -6.710
     1           1002.0       106W       16N   22-AUG-2017 07:40   6.100  -6.100   6.100
     1           1002.0       105W     14.5N   22-AUG-2017 07:41     ...     ...     ...
     1           1002.0       109W       15N   22-AUG-2017 07:42     ...     ...     ...
     1           1002.0       101W     15.6N   22-AUG-2017 07:43     ...     ...     ...
     1           1002.0       108W       16N   22-AUG-2017 07:44   6.270  -6.270   6.270
     1           1002.0       106W       17N   22-AUG-2017 07:45   6.760  -6.760  -6.760
     1           1002.0       105W     17.2N   22-AUG-2017 07:46   7.350  -7.350  -7.350
     1           1002.0       138W       25N   22-AUG-2017 07:47   7.120  -7.120  -7.120
     1           1002.0       136W     23.6N   22-AUG-2017 07:48     ...     ...     ...
 
let une = if uwnd_abs NE 5.8 then uwnd_abs else uwnd_mean
let ueq = if uwnd_abs EQ 5.8 then uwnd_abs else uwnd_mean
list uwnd_abs, une, ueq
   DATA SET: ./data/uwnd_dsg.nc
 TRAJECTORY is Trajectory-id
 UWND_ABS   is Eastward wind magnitude (m s-1)
 UNE        is IF UWND_ABS NE 5.8 THEN UWND_ABS ELSE UWND_MEAN
 UEQ        is IF UWND_ABS EQ 5.8 THEN UWND_ABS ELSE UWND_MEAN
    FEATURE  TRAJECTORY  LONGITUDE  LATITUDE            TIME     UWND_ABS    UNE     UEQ
 
     1           1002.0        98W       20N   22-AUG-2017 07:34   5.800  -5.800   5.800
     1           1002.0        96W       21N   22-AUG-2017 07:35   5.350   5.350  -5.350
     1           1002.0        95W     22.3N   22-AUG-2017 07:36     ...     ...     ...
     1           1002.0        99W       23N   22-AUG-2017 07:37     ...     ...     ...
     1           1002.0        90W       21N   22-AUG-2017 07:38     ...     ...     ...
     1           1002.0       108W       15N   22-AUG-2017 07:39   6.710   6.710  -6.710
     1           1002.0       106W       16N   22-AUG-2017 07:40   6.100   6.100  -6.100
     1           1002.0       105W     14.5N   22-AUG-2017 07:41     ...     ...     ...
     1           1002.0       109W       15N   22-AUG-2017 07:42     ...     ...     ...
     1           1002.0       101W     15.6N   22-AUG-2017 07:43     ...     ...     ...
     1           1002.0       108W       16N   22-AUG-2017 07:44   6.270   6.270  -6.270
     1           1002.0       106W       17N   22-AUG-2017 07:45   6.760   6.760  -6.760
     1           1002.0       105W     17.2N   22-AUG-2017 07:46   7.350   7.350  -7.350
     1           1002.0       138W       25N   22-AUG-2017 07:47   7.120   7.120  -7.120
     1           1002.0       136W     23.6N   22-AUG-2017 07:48     ...     ...     ...
 
! expressions that replace missing data with a constant or variable
 
let valid_else_100 = if uwnd_abs then uwnd_abs else 100
let valid_else_lon = if uwnd_abs then uwnd_abs else longitude
let eqval_else_100 = if uwnd_abs eq 5.8 then uwnd_abs else 100
list uwnd_abs, valid_else_100, valid_else_lon, eqval_else_100
   DATA SET: ./data/uwnd_dsg.nc
 TRAJECTORY     is Trajectory-id
 UWND_ABS       is Eastward wind magnitude (m s-1)
 VALID_ELSE_100 is IF UWND_ABS THEN UWND_ABS ELSE 100
 VALID_ELSE_LON is IF UWND_ABS THEN UWND_ABS ELSE LONGITUDE
 EQVAL_ELSE_100 is IF UWND_ABS EQ 5.8 THEN UWND_ABS ELSE 100
    FEATURE  TRAJECTORY  LONGITUDE  LATITUDE            TIME     UWND_AB VALID_E VALID_E EQVAL_ELSE_100
 
     1           1002.0        98W       20N   22-AUG-2017 07:34   5.800     5.8     5.8     5.8
     1           1002.0        96W       21N   22-AUG-2017 07:35   5.350     5.3     5.3   100.0
     1           1002.0        95W     22.3N   22-AUG-2017 07:36     ...   100.0   265.0   100.0
     1           1002.0        99W       23N   22-AUG-2017 07:37     ...   100.0   261.0   100.0
     1           1002.0        90W       21N   22-AUG-2017 07:38     ...   100.0   270.0   100.0
     1           1002.0       108W       15N   22-AUG-2017 07:39   6.710     6.7     6.7   100.0
     1           1002.0       106W       16N   22-AUG-2017 07:40   6.100     6.1     6.1   100.0
     1           1002.0       105W     14.5N   22-AUG-2017 07:41     ...   100.0   255.0   100.0
     1           1002.0       109W       15N   22-AUG-2017 07:42     ...   100.0   251.0   100.0
     1           1002.0       101W     15.6N   22-AUG-2017 07:43     ...   100.0   259.0   100.0
     1           1002.0       108W       16N   22-AUG-2017 07:44   6.270     6.3     6.3   100.0
     1           1002.0       106W       17N   22-AUG-2017 07:45   6.760     6.8     6.8   100.0
     1           1002.0       105W     17.2N   22-AUG-2017 07:46   7.350     7.3     7.3   100.0
     1           1002.0       138W       25N   22-AUG-2017 07:47   7.120     7.1     7.1   100.0
     1           1002.0       136W     23.6N   22-AUG-2017 07:48     ...   100.0   224.0   100.0
 
*** Running ferret script: bn_dsg_subset.jnl
! bn_dsg_subset.jnl
! 7/24/2019 ACM
! testing subsetting in Time, space.  Particularly that a time subset
! is correctly done on non-timeseries dsg dataset.
! More tests for timeseries data are in bn_dsg_tseries
 
use dsg_cross_prime.nc
 
! Subset trajectory data in time then in lon/ time
list sst
   DATA SET: ./data/dsg_cross_prime.nc
 ID         is Trajectory-id
 SST        is Temperature (Degrees C)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME         SST
 
     1       1000               6W       20S   09-FEB-2017 12:00   24.41
     1       1000               2E       10S   14-FEB-2017 12:00   25.22
     1       1000               5W       30N   19-FEB-2017 12:00   25.92
     1       1000               3E       40N   24-FEB-2017 12:00   28.97
     1       1000               1E       20S   01-MAR-2017 12:00   28.03
 
     2       2000              70W       15S   02-MAR-2017 12:00   27.77
     2       2000              20E       20N   03-MAR-2017 12:00   26.91
     2       2000              30E       10N   04-MAR-2017 12:00   26.07
     2       2000              60W       15S   05-MAR-2017 12:00   25.08
     2       2000              50W       20N   06-MAR-2017 12:00   24.01
     2       2000              10W       10N   07-MAR-2017 12:00   23.53
     2       2000              50W       15S   08-MAR-2017 12:00   22.64
     2       2000               5E       20N   09-MAR-2017 12:00   21.64
 
     3       3000              15W       15S   10-MAR-2017 12:00   23.41
     3       3000               5W       25S   11-MAR-2017 12:00   20.77
     3       3000               1E       35S   12-MAR-2017 12:00   19.97
     3       3000               5E       45S   13-MAR-2017 12:00   19.05
     3       3000              10E       55S   14-MAR-2017 12:00   18.27
list/t=1-mar-2017:14-mar-2017 sst
   DATA SET: ./data/dsg_cross_prime.nc
   SUBSET   : TIME: 01-MAR-2017 12:00 to 13-MAR-2017 12:00 JULIAN
 ID         is Trajectory-id
 SST        is Temperature (Degrees C)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME         SST
 
     1       1000               1E       20S   01-MAR-2017 12:00   28.03
 
     2       2000              70W       15S   02-MAR-2017 12:00   27.77
     2       2000              20E       20N   03-MAR-2017 12:00   26.91
     2       2000              30E       10N   04-MAR-2017 12:00   26.07
     2       2000              60W       15S   05-MAR-2017 12:00   25.08
     2       2000              50W       20N   06-MAR-2017 12:00   24.01
     2       2000              10W       10N   07-MAR-2017 12:00   23.53
     2       2000              50W       15S   08-MAR-2017 12:00   22.64
     2       2000               5E       20N   09-MAR-2017 12:00   21.64
 
     3       3000              15W       15S   10-MAR-2017 12:00   23.41
     3       3000               5W       25S   11-MAR-2017 12:00   20.77
     3       3000               1E       35S   12-MAR-2017 12:00   19.97
     3       3000               5E       45S   13-MAR-2017 12:00   19.05
list/y=-20:0/t=1-mar-2017:14-mar-2017 sst
   DATA SET: ./data/dsg_cross_prime.nc
   SUBSET   : LATITUDE: 20S to 15S
              TIME: 01-MAR-2017 12:00 to 10-MAR-2017 12:00 JULIAN
 ID         is Trajectory-id
 SST        is Temperature (Degrees C)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME         SST
 
     1       1000               1E       20S   01-MAR-2017 12:00   28.03
 
     2       2000              70W       15S   02-MAR-2017 12:00   27.77
     2       2000              60W       15S   05-MAR-2017 12:00   25.08
     2       2000              50W       15S   08-MAR-2017 12:00   22.64
 
     3       3000              15W       15S   10-MAR-2017 12:00   23.41
 
! subset profile data in z, in z/ time, in lon/lat/z
use profile_dsg
list/z=5:20 sal, pot_temp_degc
   DATA SET: ./data/profile_dsg.nc
   SUBSET   : DEPTH (m): 5.823 to 17.9293
 PROFILE       is Profile-id
 SAL           is sal
 POT_TEMP_DEGC is pot_temp_degc
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME         SAL POT_TEMP_DEGC
 
     1       1             123.14W     41.3N  15.312   13-AUG-2009 00:00   33.50    9.05
     1       1             123.14W     41.3N 10.1546   13-AUG-2009 00:00   33.47    9.46
 
     2       2              120.4W    44.11N 17.9293   13-AUG-2009 12:58   34.31   11.03
     2       2              120.4W    44.11N 14.8822   13-AUG-2009 12:58   34.30   11.38
     2       2              120.4W    44.11N 11.8737   13-AUG-2009 12:58   34.29   11.88
     2       2              120.4W    44.11N  8.8551   13-AUG-2009 12:58   34.21   12.15
     2       2              120.4W    44.11N   5.823   13-AUG-2009 12:58   34.11   12.68
 
     3       3                121W     38.8N 17.9293   12-AUG-2009 00:00   32.70     ...
     3       3                121W     38.8N 14.8822   12-AUG-2009 00:00   32.63     ...
     3       3                121W     38.8N 11.8737   12-AUG-2009 00:00   32.47   15.86
     3       3                121W     38.8N  8.8551   12-AUG-2009 00:00   32.45   16.20
     3       3                121W     38.8N   5.823   12-AUG-2009 00:00   32.41   16.47
list/z=0:15/x=-121:-120 sal
   DATA SET: ./data/profile_dsg.nc
   SUBSET   : LONGITUDE: 121W(-121) to 120.4W(-120.4)
              DEPTH (m): 2.12 to 14.8822
 PROFILE    is Profile-id
 SAL        is sal
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME         SAL
 
     2       2              120.4W    44.11N 14.8822   13-AUG-2009 12:58   34.30
     2       2              120.4W    44.11N 11.8737   13-AUG-2009 12:58   34.29
     2       2              120.4W    44.11N  8.8551   13-AUG-2009 12:58   34.21
     2       2              120.4W    44.11N   5.823   13-AUG-2009 12:58   34.11
     2       2              120.4W    44.11N  3.7747   13-AUG-2009 12:58   32.94
     2       2              120.4W    44.11N    2.12   13-AUG-2009 12:58   32.78
 
     3       3                121W     38.8N 14.8822   12-AUG-2009 00:00   32.63
     3       3                121W     38.8N 11.8737   12-AUG-2009 00:00   32.47
     3       3                121W     38.8N  8.8551   12-AUG-2009 00:00   32.45
     3       3                121W     38.8N   5.823   12-AUG-2009 00:00   32.41
     3       3                121W     38.8N  3.7747   12-AUG-2009 00:00   32.38
     3       3                121W     38.8N    2.12   12-AUG-2009 00:00   32.38
 
*** Running ferret script: bn_regrid_to_dsg_prof.jnl
! bn_regrid_to_dsg_prof.jnl
! test regridding to a DSG profile grid
!
! Create gridded data file: values are based on z-values
 
define axis/t=11-aug-2009:14-aug-2009:6/units=hours tfake
define axis/x=-124:-120:0.5/units=degrees_east/modulo xfake
define axis/y=35:45:0.5/units=degrees_north yfake
define axis/z=1:35:2/depth/unit=meters zfake
define grid/x=xfake/y=yfake/z=zfake/t=tfake gfake
let/title="z from the grid" zz =2 + z[g=gfake] + 0*(x[g=gfake]+y[g=gfake]+t[g=gfake])
save/clobber/file=fake_model_temp.nc/outtype=float zz
cancel variables/all
 
! ******
! demonstrate regridding model data to DSG using file data
 
! profile data where depths in each profile are listed
! from deepest to shallowest
 
use  profile_dsg_downup
USE fake_model_temp.nc
list /i=1/j=1/l=1 zz
             VARIABLE : z from the grid
             FILENAME : fake_model_temp.nc
             SUBSET   : 18 points (DEPTH (m))
             LONGITUDE: 124W(-124)
             LATITUDE : 35N
             TIME     : 11-AUG-2009 00:00
              124W   
                1
 1     /  1:   3.00
 3     /  2:   5.00
 5     /  3:   7.00
 7     /  4:   9.00
 9     /  5:  11.00
 11    /  6:  13.00
 13    /  7:  15.00
 15    /  8:  17.00
 17    /  9:  19.00
 19    / 10:  21.00
 21    / 11:  23.00
 23    / 12:  25.00
 25    / 13:  27.00
 27    / 14:  29.00
 29    / 15:  31.00
 31    / 16:  33.00
 33    / 17:  35.00
 35    / 18:  37.00
 
! Regrid gridded data to grid of profile dataset
list zz[d=fake_model_temp,g=temp[d=1]]
   DATA SET: ./data/profile_dsg_downup.nc
 PROFILE    is Profile-id
 ZZ         is z from the grid  (regrid: to Profile DSG grid)
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME          ZZ
 
     1       1             123.14W     41.3N 33.2111   13-AUG-2009 00:00   35.00
     1       1             123.14W     41.3N 31.5953   13-AUG-2009 00:00   33.00
     1       1             123.14W     41.3N 24.9692   13-AUG-2009 00:00   27.00
     1       1             123.14W     41.3N 20.5466   13-AUG-2009 00:00   23.00
     1       1             123.14W     41.3N  15.312   13-AUG-2009 00:00   17.00
     1       1             123.14W     41.3N 10.1546   13-AUG-2009 00:00   13.00
     1       1             123.14W     41.3N  4.9567   13-AUG-2009 00:00    7.00
     1       1             123.14W     41.3N    2.12   13-AUG-2009 00:00    5.00
 
     2       2              120.4W    44.11N 33.2111   13-AUG-2009 12:58   35.00
     2       2              120.4W    44.11N 32.2686   13-AUG-2009 12:58   35.00
     2       2              120.4W    44.11N  30.491   13-AUG-2009 12:58   33.00
     2       2              120.4W    44.11N 26.6257   13-AUG-2009 12:58   29.00
     2       2              120.4W    44.11N  23.495   13-AUG-2009 12:58   25.00
     2       2              120.4W    44.11N 20.9152   13-AUG-2009 12:58   23.00
     2       2              120.4W    44.11N 17.9293   13-AUG-2009 12:58   19.00
     2       2              120.4W    44.11N 14.8822   13-AUG-2009 12:58   17.00
     2       2              120.4W    44.11N 11.8737   13-AUG-2009 12:58   13.00
     2       2              120.4W    44.11N  8.8551   13-AUG-2009 12:58   11.00
     2       2              120.4W    44.11N   5.823   13-AUG-2009 12:58    7.00
     2       2              120.4W    44.11N  3.7747   13-AUG-2009 12:58    5.00
     2       2              120.4W    44.11N    2.12   13-AUG-2009 12:58    5.00
 
     3       3                121W     38.8N  23.495   12-AUG-2009 00:00   25.00
     3       3                121W     38.8N 20.9152   12-AUG-2009 00:00   23.00
     3       3                121W     38.8N 17.9293   12-AUG-2009 00:00   19.00
     3       3                121W     38.8N 14.8822   12-AUG-2009 00:00   17.00
     3       3                121W     38.8N 11.8737   12-AUG-2009 00:00   13.00
     3       3                121W     38.8N  8.8551   12-AUG-2009 00:00   11.00
     3       3                121W     38.8N   5.823   12-AUG-2009 00:00    7.00
     3       3                121W     38.8N  3.7747   12-AUG-2009 00:00    5.00
     3       3                121W     38.8N    2.12   12-AUG-2009 00:00    5.00
 
cancel data/all
 
 
! profile data where depths in each profile are listed
! from shallowest to deepest
 
use  profile_dsg_updown
USE fake_model_temp.nc
 
! Regrid gridded data to grid of profile dataset
list zz[d=fake_model_temp,g=temp[d=1]]
   DATA SET: ./data/profile_dsg_updown.nc
 PROFILE    is Profile-id
 ZZ         is z from the grid  (regrid: to Profile DSG grid)
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME          ZZ
 
     1       1             123.14W     41.3N    2.12   13-AUG-2009 00:00    5.00
     1       1             123.14W     41.3N    4.96   13-AUG-2009 00:00    7.00
     1       1             123.14W     41.3N   10.15   13-AUG-2009 00:00   13.00
     1       1             123.14W     41.3N   15.31   13-AUG-2009 00:00   17.00
     1       1             123.14W     41.3N   20.55   13-AUG-2009 00:00   23.00
     1       1             123.14W     41.3N   24.97   13-AUG-2009 00:00   27.00
     1       1             123.14W     41.3N    31.6   13-AUG-2009 00:00   33.00
     1       1             123.14W     41.3N   33.21   13-AUG-2009 00:00   35.00
 
     2       2              120.4W    44.11N    2.12   13-AUG-2009 12:58    5.00
     2       2              120.4W    44.11N    3.77   13-AUG-2009 12:58    5.00
     2       2              120.4W    44.11N    5.82   13-AUG-2009 12:58    7.00
     2       2              120.4W    44.11N    8.86   13-AUG-2009 12:58   11.00
     2       2              120.4W    44.11N   11.87   13-AUG-2009 12:58   13.00
     2       2              120.4W    44.11N   14.88   13-AUG-2009 12:58   17.00
     2       2              120.4W    44.11N   17.93   13-AUG-2009 12:58   19.00
     2       2              120.4W    44.11N   20.92   13-AUG-2009 12:58   23.00
     2       2              120.4W    44.11N    23.5   13-AUG-2009 12:58   25.00
     2       2              120.4W    44.11N   26.63   13-AUG-2009 12:58   29.00
     2       2              120.4W    44.11N   30.49   13-AUG-2009 12:58   33.00
     2       2              120.4W    44.11N   32.27   13-AUG-2009 12:58   35.00
     2       2              120.4W    44.11N   33.21   13-AUG-2009 12:58   35.00
 
     3       3                121W     38.8N    2.12   12-AUG-2009 00:00    5.00
     3       3                121W     38.8N    3.77   12-AUG-2009 00:00    5.00
     3       3                121W     38.8N    5.82   12-AUG-2009 00:00    7.00
     3       3                121W     38.8N    8.86   12-AUG-2009 00:00   11.00
     3       3                121W     38.8N   11.87   12-AUG-2009 00:00   13.00
     3       3                121W     38.8N   14.88   12-AUG-2009 00:00   17.00
     3       3                121W     38.8N   17.93   12-AUG-2009 00:00   19.00
     3       3                121W     38.8N   20.92   12-AUG-2009 00:00   23.00
     3       3                121W     38.8N    23.5   12-AUG-2009 00:00   25.00
 
*** Running ferret script: bn_regrid_to_dsg_traj.jnl
! bn_regrid_to_dsg_traj.jnl
 
! Create gridded data file: values are based on latitude/longitudes
! test regridding to a DSG trajectory grid
! Change def of gridded data for more variation
 
define axis/t=17-may-2019:20-may-2019:1/units=hours tfake
define axis/x=-168:-165:0.2/units=degrees_east xfake
define axis/y=54:57:0.2/units=degrees_north yfake
define grid/x=xfake/y=yfake/t=tfake gfake
let/title="Gridded Temperature"/Units="Degrees_C" temp = 2*y[g=gfake] + 0.8*x[g=gfake] + 0*t[g=gfake]
save/clobber/file=fake_model_temp.nc/outtype=float temp
can var/all
 
use sail_2019.nc
use fake_model_temp.nc
 
set v ul
plot/thick temp[d=2,g=temp_ctd_rbr_mean[d=1]]
LET/title="Temp regridded from gridded to DSG" temp_from_grid = temp[d=2,g=temp_ctd_rbr_mean[d=1]]
 
set v ur
plot/thick temp_from_grid
 
! test modulo in X
define axis/t=17-may-2019:20-may-2019:1/units=hours tfake
define axis/x=192:195:0.2/units=degrees_east xfake
define axis/y=54:57:0.2/units=degrees_north yfake
define grid/x=xfake/y=yfake/t=tfake gfake
let/title="Gridded Temperature"/Units="Degrees_C" temp = 2*y[g=gfake] + 0.8*x[g=gfake] + 0*t[g=gfake]
save/clobber/file=fake_model_temp.nc/outtype=float temp
can var/all
 
cancel data/all
! make sure to use the new one
use sail_2019.nc
use fake_model_temp.nc
 
say `temp,r=size`
 !-> MESSAGE/CONTINUE 18688
18688
 
set v ll
plot/thick/title="Modulo Longitudes" temp[d=2,g=temp_ctd_rbr_mean[d=1]]
 
set v lr
LET/title="Regrid to DSG w/ moduloing" temp_from_grid = temp[d=2,g=temp_ctd_rbr_mean[d=1]]
plot/thick temp_from_grid
frame/file=regrid_to_dsg_traj.gif
 
! finer grid, do we get scatter/gather?
can dat/all
define symbol save_mem = ($ferret_memory)
 !-> define symbol save_mem = 62.5
set mem/siz=2mb
 
use sail_2019.nc
 
define axis/t=17-may-2019:20-may-2019:1/units=minutes tbig
 
define axis/x=0:359:.5/unit=degrees/modulo xbig
define axis/y=54:57:0.2/units=degrees_north ybig
define grid/x=xbig/y=ybig/t=tbig gbig
let big_temp = 2*y[g=gbig] + 0*(x[g=gbig]+t[g=gbig])
 
say `big_temp,r=size`
 !-> MESSAGE/CONTINUE 49708784
49708784
 
load big_temp[g=temp_ctd_rbr_mean[d=1]]
show mem/diag
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        BIG_TEMP       T              2426           1
    Total table slots: 500
    Free table slots: 497
    Un-cached variables: 0
    SET MEMORY/MAX: 2 Mb   (250000 words)
    Peak demand: 407.62 Kb
    Current cache: 493.55 Kb
 
set mem/siz=($save_mem)
 !-> set mem/siz=62.5
 
 
! Finally, trajectory datasets can have depths.
! Synthesize a depth variable in a trajectory dataset.
sp cp data/sail_2019.nc sail_copy.nc
use sail_2019.nc
 
! Good test of a dsg-variable made up of several expressions
let/units=meters/title="Depth synthesized" depth = 1 + 3*(if temp_ctd_rbr_mean then temp_ctd_rbr_mean-6 else .2)
define attribute/output depth.axis = "Z"
set attribute/output depth.axis
save/append/file=sail_copy.nc depth
 
can dat/all; use sail_copy
show dat
     currently SET data sets:
    1> ./sail_copy.nc  (default)
       DSG Feature type Trajectory
 name     title                             I         J         K         L         M         N
 TRAJECTORY
          Trajectory/Drone ID              ...       ...       ...       ...       1:2       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:2       ...
 LONGITUDE
          longitude                      tot 116     ...       ...       ...       1:2       ...
 LATITUDE latitude                       tot 116     ...       ...       ...       1:2       ...
 TIME     time in seconds                tot 116     ...       ...       ...       1:2       ...
 TEMP_CTD_RBR_MEAN
          Seawater temperature RBR       tot 116     ...       ...       ...       1:2       ...
 DEPTH    Depth synthesized              tot 116     ...       ...       ...       1:2       ...
 
show att depth
     attributes for user-defined variables
 depth.long_name = Depth synthesized 
 depth.units = meters 
 depth.missing_value = -1.E+34
 depth.axis = Z 
 
 
! make a 4D grid on the region.
define axis/t=17-may-2019:20-may-2019:1/units=hours tfake
define axis/x=-168:-165:0.2/units=degrees_east xfake
define axis/y=54:57:0.2/units=degrees_north yfake
define axis/y=54:57:0.2/units=degrees_north yfake
define grid/x=xfake/y=yfake/t=tfake gfake
define axis/z=1:5:.5/units=meters zfake
define grid/x=xfake/y=yfake/t=tfake/z=zfake gfake
let/title="Gridded Temperature"/Units="Degrees_C" temp = 2*y[g=gfake] + 0.8*x[g=gfake] + 0.2*z[gz=zfake] + 0*t[g=gfake]
save/clobber/file=fake_model_temp.nc/outtype=float temp
can var/all
 
use sail_copy.nc
 
use fake_model_temp
sh dat
     currently SET data sets:
    1> ./sail_copy.nc
       DSG Feature type Trajectory
 name     title                             I         J         K         L         M         N
 TRAJECTORY
          Trajectory/Drone ID              ...       ...       ...       ...       1:2       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:2       ...
 LONGITUDE
          longitude                      tot 116     ...       ...       ...       1:2       ...
 LATITUDE latitude                       tot 116     ...       ...       ...       1:2       ...
 TIME     time in seconds                tot 116     ...       ...       ...       1:2       ...
 TEMP_CTD_RBR_MEAN
          Seawater temperature RBR       tot 116     ...       ...       ...       1:2       ...
 DEPTH    Depth synthesized              tot 116     ...       ...       ...       1:2       ...
 
    2> ./fake_model_temp.nc  (default)
 
 name     title                             I         J         K         L
 TEMP     Gridded Temperature              1:16      1:16      1:9       1:73
 
LET/title="Temp regridded from gridded to DSG" temp_from_grid = temp[d=2,g=temp_ctd_rbr_mean[d=1]]
save/clobber/file=sample_xyzt_to_traj.nc temp_from_grid
 
 
sp rm sail_copy.nc
*** Running ferret script: bn_dsg_save_uvars.jnl
! bn_dsg_save_uvars.jnl
! tests of SAVEing user-defined variables to netCDF
! 8/13/2019 ACM
 
! Create gridded data file: values are based on latitude/longitudes
! test regridding to a DSG trajectory grid
 
define axis/t=17-may-2019:20-may-2019:1/units=hours tfake
define axis/x=-168:-165:0.2/units=degrees_east xfake
define axis/y=54:57:0.2/units=degrees_north yfake
define grid/x=xfake/y=yfake/t=tfake gfake
let/title="Gridded Temperature"/Units="Degrees_C" temp = y[g=gfake] + 0.1*x[g=gfake] + 0*t[g=gfake]
save/clobber/file=fake_model_temp.nc/outtype=float temp
can var/all
 
sp cp data/sail_2019.nc sail_copy.nc
use sail_2019.nc
use fake_model_temp.nc
 
 
LET/title="Temp regridded from gridded to DSG" temp_from_grid = temp[d=2,g=temp_ctd_rbr_mean[d=1]]
save/append/file=sail_copy.nc temp_from_grid
can data/all; can var/all
 
 
use sail_copy.nc
show data
     currently SET data sets:
    1> ./sail_copy.nc  (default)
       DSG Feature type Trajectory
 name     title                             I         J         K         L         M         N
 TRAJECTORY
          Trajectory/Drone ID              ...       ...       ...       ...       1:2       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:2       ...
 LONGITUDE
          longitude                      tot 116     ...       ...       ...       1:2       ...
 LATITUDE latitude                       tot 116     ...       ...       ...       1:2       ...
 TIME     time in seconds                tot 116     ...       ...       ...       1:2       ...
 TEMP_CTD_RBR_MEAN
          Seawater temperature RBR       tot 116     ...       ...       ...       1:2       ...
 TEMP_FROM_GRID
          Temp regridded from gridded to tot 116     ...       ...       ...       1:2       ...
 
plot/thick temp_ctd_rbr_mean - temp_from_grid
 
can data/all; can var/all
 
 
! Write just a user-var defined on dsg grid to a file.
 
use sail_2019.nc
use fake_model_temp.nc
LET/title="Temp regridded from gridded to DSG" temp_from_grid = temp[d=2,g=temp_ctd_rbr_mean[d=1]]
save/clobber/file=sail_copy.nc temp_from_grid
can data/all; can var/all
 
use sail_copy
show data
     currently SET data sets:
    1> ./sail_copy.nc  (default)
       DSG Feature type Trajectory
 name     title                             I         J         K         L         M         N
 TRAJECTORY
          Trajectory/Drone ID              ...       ...       ...       ...       1:2       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:2       ...
 LONGITUDE
          longitude                      tot 116     ...       ...       ...       1:2       ...
 LATITUDE latitude                       tot 116     ...       ...       ...       1:2       ...
 TIME     time in seconds                tot 116     ...       ...       ...       1:2       ...
 TEMP_FROM_GRID
          Temp regridded from gridded to tot 116     ...       ...       ...       1:2       ...
 
 
can data/all; can var/all
 
 
 
! Write subsets of our user-var regrid to dsg-grid
 
use sail_2019.nc
use fake_model_temp.nc
LET/title="Temp regridded from gridded to DSG" temp_from_grid = temp[d=2,g=temp_ctd_rbr_mean[d=1]]
save/clobber/file=sail_copy.nc/e=2 temp_from_grid
can dat/all; can var/all
 
use sail_copy
show data
     currently SET data sets:
    1> ./sail_copy.nc  (default)
       DSG Feature type Trajectory
 name     title                             I         J         K         L         M         N
 TRAJECTORY
          Trajectory/Drone ID              ...       ...       ...       ...       1:1       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:1       ...
 LONGITUDE
          longitude                      tot 58      ...       ...       ...       1:1       ...
 LATITUDE latitude                       tot 58      ...       ...       ...       1:1       ...
 TIME     time in seconds                tot 58      ...       ...       ...       1:1       ...
 TEMP_FROM_GRID
          Temp regridded from gridded to tot 58      ...       ...       ...       1:1       ...
 
 
 
can data/all; can var/all
 
! subset by masking
 
use sail_2019.nc
use fake_model_temp.nc
LET temp_from_grid = temp[d=2,g=temp_ctd_rbr_mean[d=1]]
save/clobber/file=sail_copy.nc/y=55:56 temp_from_grid
can data/all; can var/all
 
use sail_copy.nc
 
show data
     currently SET data sets:
    1> ./sail_copy.nc  (default)
       DSG Feature type Trajectory
 name     title                             I         J         K         L         M         N
 TRAJECTORY
          Trajectory/Drone ID              ...       ...       ...       ...       1:2       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:2       ...
 LONGITUDE
          longitude                      tot 94      ...       ...       ...       1:2       ...
 LATITUDE latitude                       tot 94      ...       ...       ...       1:2       ...
 TIME     time in seconds                tot 94      ...       ...       ...       1:2       ...
 TEMP_FROM_GRID
          TEMP[D=2,G=TEMP_CTD_RBR_MEAN[D=tot 94      ...       ...       ...       1:2       ...
 
 
! Make a plot of the original data and the subset with fake-data values
 
use sail_2019
plot/thick/pal=rnb2 temp_ctd_rbr_mean
use sail_copy
plot/over/sym=19/siz=0.12/pal=grayscale/key=horiz temp_from_grid
 
can data/all; can var/all
 
!  Treat the feature-data as a timeseries.  SAVE writes timeseries data
 
use/feature=time sail_2019.nc
save/clobber/file=a.nc/t="18-may-2019:12:00":"19-may-2019:00:00"  temp_ctd_rbr_mean
can dat/all; can var/all
 
use a.nc
show dat/att
     currently SET data sets:
    1> ./a.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        22   T       FERRET V7.6  DD-MON-YY
                                 Conventions     CHAR        6    F       CF-1.6
                                 featureType     CHAR        10   F       Timeseries
  
 trajectory            CHAR      long_name       CHAR        19   T       Trajectory/Drone ID
                                 cf_role         CHAR        13   F       trajectory_id
  
 rowSize               INT       long_name       CHAR        42   T       Number of Observations for this Timeseries
                                 sample_dimension
                                                 CHAR        3    F       obs
                                 actual_range    INT         2    F       12 13
  
 longitude             FLOAT     axis            CHAR        1    T       X
                                 history         CHAR        166  T       From /home/data/saildrone/saildrone_arctic_2019/daily_files/1041/saildrone-gen_5-Arctic-NOAA-2019-sd1041-20190806T140000-20190806T155959-1_minutes-v1.1565109042999.nc
                                 long_name       CHAR        9    T       longitude
                                 units           CHAR        12   T       degrees_east
                                 actual_range    FLOAT       2    F       -166.848 -166.0383
  
 latitude              FLOAT     axis            CHAR        1    T       Y
                                 history         CHAR        166  T       From /home/data/saildrone/saildrone_arctic_2019/daily_files/1041/saildrone-gen_5-Arctic-NOAA-2019-sd1041-20190806T140000-20190806T155959-1_minutes-v1.1565109042999.nc
                                 long_name       CHAR        8    T       latitude
                                 units           CHAR        13   T       degrees_north
                                 actual_range    FLOAT       2    F       54.73905 55.70537
  
 time                  DOUBLE    axis            CHAR        1    T       T
                                 calendar        CHAR        9    T       gregorian
                                 history         CHAR        166  T       From /home/data/saildrone/saildrone_arctic_2019/daily_files/1041/saildrone-gen_5-Arctic-NOAA-2019-sd1041-20190806T140000-20190806T155959-1_minutes-v1.1565109042999.nc
                                 long_name       CHAR        15   T       time in seconds
                                 time_origin     CHAR        20   T       01-JAN-1970 00:00:00
                                 units           CHAR        34   T       seconds since 1970-01-01T00:00:00Z
                                 actual_range    DOUBLE      2    F       1.558102E+09 1.558307E+09
  
 temp_ctd_rbr_mean     FLOAT     _FillValue      FLOAT       1    T       -1.E+34
                                 history         CHAR        166  T       From /home/data/saildrone/saildrone_arctic_2019/daily_files/1041/saildrone-gen_5-Arctic-NOAA-2019-sd1041-20190806T140000-20190806T155959-1_minutes-v1.1565109042999.nc
                                 long_name       CHAR        24   T       Seawater temperature RBR
                                 units           CHAR        8    T       degree_C
  
list temp_ctd_rbr_mean
   DATA SET: ./a.nc
 TRAJECTORY        is Timeseries-id
 TEMP_CTD_RBR_MEAN is Seawater temperature RBR (degree_C)
    FEATURE  TRAJECTORY  LONGITUDE  LATITUDE            TIME     TEMP_CTD_RBR_MEAN
 
     1           1033.0  166.4651W   55.279N   18-MAY-2019 12:00   6.817
     1           1033.0  166.4972W   55.304N   18-MAY-2019 13:00   6.598
     1           1033.0  166.5211W   55.345N   18-MAY-2019 14:00   6.549
     1           1033.0  166.5329W   55.379N   18-MAY-2019 15:00   6.563
     1           1033.0  166.5562W   55.382N   18-MAY-2019 16:00   6.540
     1           1033.0  166.5761W   55.401N   18-MAY-2019 17:00   6.599
     1           1033.0  166.6011W   55.419N   18-MAY-2019 18:00   6.507
     1           1033.0    166.61W   55.436N   18-MAY-2019 19:00   6.527
     1           1033.0   166.625W   55.451N   18-MAY-2019 20:00   6.549
     1           1033.0  166.6535W   55.467N   18-MAY-2019 21:00   6.616
     1           1033.0  166.6732W   55.491N   18-MAY-2019 22:00   6.599
     1           1033.0  166.6882W   55.515N   18-MAY-2019 23:00   6.608
     1           1033.0  166.7057W   55.538N   19-MAY-2019 00:00   6.586
 
     2           1034.0  166.5074W   55.334N   18-MAY-2019 12:59   6.582
     2           1034.0  166.5316W   55.374N   18-MAY-2019 13:59   6.561
     2           1034.0  166.5482W   55.396N   18-MAY-2019 14:59   6.591
     2           1034.0  166.5717W   55.409N   18-MAY-2019 15:59   6.581
     2           1034.0  166.5842W   55.435N   18-MAY-2019 16:59   6.491
     2           1034.0  166.6096W    55.45N   18-MAY-2019 17:59   6.508
     2           1034.0  166.6174W   55.469N   18-MAY-2019 18:59   6.592
     2           1034.0  166.6393W   55.485N   18-MAY-2019 19:59   6.553
     2           1034.0  166.6653W   55.502N   18-MAY-2019 20:59   6.512
     2           1034.0  166.6846W   55.524N   18-MAY-2019 21:59   6.474
     2           1034.0  166.7024W   55.552N   18-MAY-2019 22:59   6.501
     2           1034.0   166.722W   55.577N   18-MAY-2019 23:59     ...
 
! Intentional errors
set mode ignore
 
! Save a subset and try to append to that  - nfeatures or nobs don't match
! should be an error
 
use sail_2019.nc
save/clobber/e=2/file=sail_copy.nc temp_ctd_rbr_mean
can data/all; can var/all
 
! Now try appending data from the original set to the subset-dataset -
! nfeatures doesn't match
 
use sail_2019.nc
 
use fake_model_temp.nc
LET/title="Temp regridded from gridded to DSG" temp_from_grid = temp[d=2,g=temp_ctd_rbr_mean[d=1]]
save/append/file=sail_copy.nc temp_from_grid
 
can data/all; can var/all
 
 
! Save a subset in the obs direction and try to append to that  - nobs does't match
 
 
use sail_2019.nc
save/clobber/x=-166.8:-166.2/file=sail_copy.nc temp_ctd_rbr_mean
can data/all; can var/all
 
use sail_2019.nc
 
use fake_model_temp.nc
LET/title="Temp regridded from gridded to DSG" temp_from_grid = temp[d=2,g=temp_ctd_rbr_mean[d=1]]
save/append/file=sail_copy.nc temp_from_grid
 
 
can data/all; can var/all
 
!Try to append a subset to the full data, again nobs/nfeatures mismatches
 
 
sp cp data/sail_2019.nc sail_copy.nc
 
use sail_2019.nc
 
use fake_model_temp.nc
LET/title="Temp regridded from gridded to DSG" temp_from_grid = temp[d=2,g=temp_ctd_rbr_mean[d=1]]
save/append/e=2/file=sail_copy.nc temp_from_grid
 
can data/all; can var/all
 
! Try to append timeseries data to a trajectory dataset
 
sp cp data/sail_2019.nc sail_copy.nc
 
! Write a dsg file of type timeseries
 
use/feature=timeseries sail_2019
set variable/name=my_temp_data temp_ctd_rbr_mean
save/clobber/file=a.nc my_temp_data
 
cancel data/all
 
! try to append timeseries data to trajectory dataset
use a.nc
save/append/file=sail_copy.nc my_temp_data
 
 
sp rm sail_copy.nc
set mode/last ignore
*** Running ferret script: bn_dsg_point_data.jnl
! bn_dsg_point_data.jnl
!  Testing use of DSG Point-type dataset
!  This data type does not have a Rowsize or a Feature-ID variable
 
! 1/15/2020 ACM
 
use dsg_point_data
show data
     currently SET data sets:
    1> ./data/dsg_point_data.nc  (default)
       DSG Feature type Point
 name     title                             I         J         K         L         M         N
 LONS     longitude                        ...       ...       ...       ...     tot 26      ...
 LATS     latitude                         ...       ...       ...       ...     tot 26      ...
 DEPTH    Depth                            ...       ...       ...       ...     tot 26      ...
 TIME     time                             ...       ...       ...       ...     tot 26      ...
 SST      Temperature                      ...       ...       ...       ...     tot 26      ...
 
list sst
   DATA SET: ./data/dsg_point_data.nc
 SST        is Temperature (Degrees C)
    FEATURE              LONGITUDE  LATITUDE   DEPTH            TIME         SST
     1                         98W       20N       0   02-JAN-1970 12:00   24.41
     2                         96W       21N       0   03-JAN-1970 12:00   25.22
     3                         95W     22.3N       0   04-JAN-1970 12:00   12.92
     4                         99W       23N       0   05-JAN-1970 12:00   23.97
     5                         90W       21N       0   06-JAN-1970 12:00   28.03
     6                        108W       15N       0   03-JAN-1970 00:00   27.77
     7                        106W       16N       0   05-JAN-1970 00:00   26.02
     8                        105W     14.5N       0   07-JAN-1970 00:00   26.07
     9                        109W       15N       0   09-JAN-1970 00:00   25.08
    10                        101W     15.6N       0   11-JAN-1970 00:00   24.01
    11                        108W       16N       0   13-JAN-1970 00:00   23.53
    12                        106W       17N       0   15-JAN-1970 00:00   22.64
    13                        105W     17.2N       0   17-JAN-1970 00:00   21.64
    14                        138W       25N       0   02-JAN-1970 00:00   23.41
    15                        136W     23.6N       0   04-JAN-1970 00:00   18.77
    16                        135W       23N       0   08-JAN-1970 00:00   17.97
    17                        139W     22.5N       0   13-JAN-1970 00:00   21.05
    18                        129W     21.1N       0   20-JAN-1970 00:00   22.27
    19                        116W       18N       0   02-JAN-1970 00:00   27.77
    20                        116W       18N       0   03-JAN-1970 00:00   26.02
    21                        116W       18N       0   04-JAN-1970 00:00   26.07
    22                        116W       18N       0   05-JAN-1970 00:00   25.08
    23                        116W       18N       0   06-JAN-1970 00:00   24.01
    24                        116W       18N       0   07-JAN-1970 00:00   23.53
    25                        116W       18N       0   08-JAN-1970 00:00   22.64
    26                        116W       18N       0   09-JAN-1970 00:00   21.64
 
! constrain by location
list/y=20:25 sst
   DATA SET: ./data/dsg_point_data.nc
   SUBSET   : LATITUDE: 20N to 25N
 SST        is Temperature (Degrees C)
    FEATURE              LONGITUDE  LATITUDE   DEPTH            TIME         SST
     1                         98W       20N       0   02-JAN-1970 12:00   24.41
     2                         96W       21N       0   03-JAN-1970 12:00   25.22
     3                         95W     22.3N       0   04-JAN-1970 12:00   12.92
     4                         99W       23N       0   05-JAN-1970 12:00   23.97
     5                         90W       21N       0   06-JAN-1970 12:00   28.03
    14                        138W       25N       0   02-JAN-1970 00:00   23.41
    15                        136W     23.6N       0   04-JAN-1970 00:00   18.77
    16                        135W       23N       0   08-JAN-1970 00:00   17.97
    17                        139W     22.5N       0   13-JAN-1970 00:00   21.05
    18                        129W     21.1N       0   20-JAN-1970 00:00   22.27
 
! mask based on data
let sstmask = if sst lt 20 then 1
set data/fmask=sstmask 1
list sst
   DATA SET: ./data/dsg_point_data.nc
Mask on features has been set: IF SST LT 20 THEN 1
 SST        is Temperature (Degrees C)
    FEATURE              LONGITUDE  LATITUDE   DEPTH            TIME         SST
     3                         95W     22.3N       0   04-JAN-1970 12:00   12.92
    15                        136W     23.6N       0   04-JAN-1970 00:00   18.77
    16                        135W       23N       0   08-JAN-1970 00:00   17.97
cancel data/fmask 1
 
! Define another mask
let mms = _m[ge=sst]
let emask = if (mod(mms,3) eq 1 then 1)
set data/fmask = emask 1
list sst
   DATA SET: ./data/dsg_point_data.nc
Mask on features has been set: IF (MOD(MMS,3) EQ 1 THEN 1)
 SST        is Temperature (Degrees C)
    FEATURE              LONGITUDE  LATITUDE   DEPTH            TIME         SST
     1                         98W       20N       0   02-JAN-1970 12:00   24.41
     4                         99W       23N       0   05-JAN-1970 12:00   23.97
     7                        106W       16N       0   05-JAN-1970 00:00   26.02
    10                        101W     15.6N       0   11-JAN-1970 00:00   24.01
    13                        105W     17.2N       0   17-JAN-1970 00:00   21.64
    16                        135W       23N       0   08-JAN-1970 00:00   17.97
    19                        116W       18N       0   02-JAN-1970 00:00   27.77
    22                        116W       18N       0   05-JAN-1970 00:00   25.08
    25                        116W       18N       0   08-JAN-1970 00:00   22.64
cancel data/fmask 1
 
! The native plot for point data is ribbon plot as symbols
! Test some plot qualifiers
plot/thick/sym=26/palette=rnb2/key=horiz sst
 
frame/file=dsg_points_plot.gif
 
! Plot the masked data - auto label created
 
 
! Define another mask
let mms = _m[ge=sst]
let emask = if (mod(mms,2) eq 1 then 1)
set data/fmask = emask 1
 
cancel symbol lab*
plot /thick sst
show symbol lab*
LAB1 = "Z (meters) : 0"
LABNUM_Z = "1"
LAB2 = "TIME : 02-JAN-1970 00:00 to 20-JAN-1970 00:00"
LABNUM_T = "2"
LAB3 = "E (instance) : Subset, IF (MOD(MMS,2) EQ 1 THEN 1)"
LABNUM_E = "3"
LAB4 = "DATA SET: dsg_point_data"
LABNUM_DSET = "4"
LABY = "Latitude (degrees_north)"
LABX = "Longitude (degrees_east)"
LABTIT = "Colored by Temperature (Degrees C)"
 
! regrid from/ to rectangular grid
cancel data/fmask 1
 
define axis/t=2-jan-1970:20-jan-1970:6/units=hours tfake
define axis/x=-140:90:0.5/units=degrees_east xfake
define axis/y=12:25:0.5/units=degrees_north yfake
define grid/x=xfake/y=yfake/t=tfake gfake
let/title="Gridded Variable"  vari = 2*y[g=gfake] + 0.8*abs(x[g=gfake]) + 0.1*l[g=gfake]
save/clobber/file=fake_model_vari.nc/outtype=float vari
can var/all
 
use dsg_point_data
use fake_model_vari.nc
show dat
     currently SET data sets:
    1> ./data/dsg_point_data.nc
       DSG Feature type Point
 name     title                             I         J         K         L         M         N
 LONS     longitude                        ...       ...       ...       ...     tot 26      ...
 LATS     latitude                         ...       ...       ...       ...     tot 26      ...
 DEPTH    Depth                            ...       ...       ...       ...     tot 26      ...
 TIME     time                             ...       ...       ...       ...     tot 26      ...
 SST      Temperature                      ...       ...       ...       ...     tot 26      ...
 
    2> ./fake_model_vari.nc  (default)
 
 name     title                             I         J         K         L
 VARI     Gridded Variable                 1:461     1:27      ...       1:73
 
 
! Regrid gridded data to grid of points (sample at points)
list vari[d=2, g=sst[d=1]]
   DATA SET: ./data/dsg_point_data.nc
 VARI       is Gridded Variable  (regrid: to Point DSG grid)
    FEATURE              LONGITUDE  LATITUDE   DEPTH            TIME        VARI
     1                         98W       20N       0   02-JAN-1970 12:00   118.7
     2                         96W       21N       0   03-JAN-1970 12:00   119.5
     3                         95W     22.3N       0   04-JAN-1970 12:00   122.1
     4                         99W       23N       0   05-JAN-1970 12:00   126.7
     5                         90W       21N       0   06-JAN-1970 12:00   115.9
     6                        108W       15N       0   03-JAN-1970 00:00   116.9
     7                        106W       16N       0   05-JAN-1970 00:00   118.1
     8                        105W     14.5N       0   07-JAN-1970 00:00   115.1
     9                        109W       15N       0   09-JAN-1970 00:00   120.1
    10                        101W     15.6N       0   11-JAN-1970 00:00   115.5
    11                        108W       16N       0   13-JAN-1970 00:00   122.9
    12                        106W       17N       0   15-JAN-1970 00:00   124.1
    13                        105W     17.2N       0   17-JAN-1970 00:00   124.1
    14                        138W       25N       0   02-JAN-1970 00:00   160.5
    15                        136W     23.6N       0   04-JAN-1970 00:00   156.7
    16                        135W       23N       0   08-JAN-1970 00:00   156.5
    17                        139W     22.5N       0   13-JAN-1970 00:00   160.7
    18                        129W     21.1N       0   20-JAN-1970 00:00   152.5
    19                        116W       18N       0   02-JAN-1970 00:00   128.9
    20                        116W       18N       0   03-JAN-1970 00:00   129.3
    21                        116W       18N       0   04-JAN-1970 00:00   129.7
    22                        116W       18N       0   05-JAN-1970 00:00   130.1
    23                        116W       18N       0   06-JAN-1970 00:00   130.5
    24                        116W       18N       0   07-JAN-1970 00:00   130.9
    25                        116W       18N       0   08-JAN-1970 00:00   131.3
    26                        116W       18N       0   09-JAN-1970 00:00   131.7
 
! list the point data gridded to the grid of vari
!  or now this is an error: could implement a gridding-by-binning
 
set mode ignore
load sst[d=1,g=vari[d=2]]
 
cancel data/all
sp rm fake_model_vari.nc
*** Running ferret script: bn_dsg_show_grid.jnl
! bn_dsg_show_grid.jnl
! 3/10/2020 SHOW GRID for dsg data summarizes the coordinate ranges
!           along with showing the simple grid obs-vs-E
 
! Profile data
use profile_dsg
show data
     currently SET data sets:
    1> ./data/profile_dsg.nc  (default)
       DSG Feature type Profile
 name     title                             I         J         K         L         M         N
 ROWSIZE  number of obs for this profile   ...       ...       ...       ...       1:3       ...
 PROFILE  profile ID: Cruise and Station   ...       ...       ...       ...       1:3       ...
 TIME     time                             ...       ...       ...       ...       1:3       ...
 LATITUDE station latitude                 ...       ...       ...       ...       1:3       ...
 LONGITUDE
          station longitude                ...       ...       ...       ...       1:3       ...
 POT_TEMP_DEGC
          pot_temp_degc                    ...       ...     tot 34      ...       1:3       ...
 SAL      sal                              ...       ...     tot 34      ...       1:3       ...
 DEPTH    DEPTH_M                          ...       ...     tot 34      ...       1:3       ...
 
show grid sal
    GRID (G###)
 DSG Feature type Profile
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 FEATURE_Z DEPTH (m)           34 r-  2.12                 33.211              Variable lengths
 normal    T
 FEATURES  E (instance)         3 r   1                    3                   full
 normal    F
 
Dataset coordinates:
  longitude range: 123.14W to 120.4W
  latitude range: 38.8N to 44.11N
  depth range: 2.12 to 33.2111
  time range: 12-AUG-2009 00:00 to 13-AUG-2009 12:58
 
can dat/all
 
! Trajectory data
use sail_2019
show data
     currently SET data sets:
    1> ./data/sail_2019.nc  (default)
       DSG Feature type Trajectory
 name     title                             I         J         K         L         M         N
 TRAJECTORY
          Trajectory/Drone ID              ...       ...       ...       ...       1:2       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:2       ...
 LONGITUDE
          longitude                      tot 116     ...       ...       ...       1:2       ...
 LATITUDE latitude                       tot 116     ...       ...       ...       1:2       ...
 TIME     time in seconds                tot 116     ...       ...       ...       1:2       ...
 TEMP_CTD_RBR_MEAN
          Seawater temperature RBR       tot 116     ...       ...       ...       1:2       ...
 
show grid temp_ctd_rbr_mean
    GRID (G###)
 DSG Feature type Trajectory
 name       axis              # pts   start                end                 subset
 FEATURE_X LONGITUDE          116 r   166.85W(-166.85)     166.04W(-166.04)    Variable lengths
 normal    Y
 normal    Z
 normal    T
 FEATURES  E (instance)         2 r   1                    2                   full
 normal    F
 
Dataset coordinates:
  longitude range: 166.84801W(-166.84801) to 166.0383W(-166.0383)
  latitude range: 54.73905N to 55.70537N
  time range: 17-MAY-2019 14:00 to 19-MAY-2019 23:00
 
can dat/all
 
! Trajectory data as timeseries
use /feature=time simple_traj_dsg
show data
     currently SET data sets:
    1> ./data/simple_traj_dsg.nc  (default)
       DSG Feature type Timeseries
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:4       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:4       ...
 LONS     longitude                        ...       ...       ...     tot 26      1:4       ...
 LATS     latitude                         ...       ...       ...     tot 26      1:4       ...
 TIME     Centered Time                    ...       ...       ...     tot 26      1:4       ...
 SST      Temperature                      ...       ...       ...     tot 26      1:4       ...
 SSTGAP   IF SST GT 20 THEN SST            ...       ...       ...     tot 26      1:4       ...
 
show grid sst
    GRID (G###)
 DSG Feature type Timeseries
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 FEATURE_T TIME                26 r   02-JAN-1970 00:00    20-JAN-1970 00:00   Variable lengths
 FEATURES  E (instance)         4 r   1                    4                   full
 normal    F
 
Dataset coordinates:
  longitude range: 139W to 90W
  latitude range: 14.5N to 25N
  time range: 02-JAN-1970 00:00 to 20-JAN-1970 00:00
 
 
! Timeseries data
use DSG_ERDDAP_Tao5daySst
show data
     currently SET data sets:
    1> ./data/simple_traj_dsg.nc
       DSG Feature type Timeseries
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:4       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:4       ...
 LONS     longitude                        ...       ...       ...     tot 26      1:4       ...
 LATS     latitude                         ...       ...       ...     tot 26      1:4       ...
 TIME     Centered Time                    ...       ...       ...     tot 26      1:4       ...
 SST      Temperature                      ...       ...       ...     tot 26      1:4       ...
 SSTGAP   IF SST GT 20 THEN SST            ...       ...       ...     tot 26      1:4       ...
 
    2> ./data/DSG_ERDDAP_Tao5daySst.nc  (default)
       DSG Feature type Timeseries
 name     title                             I         J         K         L         M         N
 ARRAY    Array                            ...       ...       ...       ...       1:70      ...
 STATION  Station                          ...       ...       ...       ...       1:70      ...
 WMO_PLATFORM_CODE
          WMO Platform Code                ...       ...       ...       ...       1:70      ...
 LONGITUDE
          Nominal Longitude                ...       ...       ...       ...       1:70      ...
 LATITUDE Nominal Latitude                 ...       ...       ...       ...       1:70      ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:70      ...
 TIME     Centered Time                    ...       ...       ...     tot 2376    1:70      ...
 DEPTH    Depth                            ...       ...       ...     tot 2376    1:70      ...
 T_25     Sea Surface Temperature          ...       ...       ...     tot 2376    1:70      ...
 QT_5025  Sea Surface Temperature Quality  ...       ...       ...     tot 2376    1:70      ...
 ST_6025  Sea Surface Temperature Source   ...       ...       ...     tot 2376    1:70      ...
 STR_TEMP FLOATSTR(T_25, "(F5.2)")         ...       ...       ...     tot 2376    1:70      ...
 
show grid t_25
    GRID (G###)
 DSG Feature type Timeseries
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 FEATURE_T1 TIME             2376 r   15-JAN-2017 12:00    21-APR-2017 12:00   Variable lengths
 FEATURES1 E (instance)        70 r   1                    70                  full
 normal    F
 
Dataset coordinates:
  longitude range: 0E to 10W
  latitude range: 19S to 21N
  depth range: 1 to 1.5
  time range: 15-JAN-2017 12:00 to 21-APR-2017 12:00
 
can dat/all
 
! Point data
use dsg_point_data
show data
     currently SET data sets:
    1> ./data/dsg_point_data.nc  (default)
       DSG Feature type Point
 name     title                             I         J         K         L         M         N
 LONS     longitude                        ...       ...       ...       ...     tot 26      ...
 LATS     latitude                         ...       ...       ...       ...     tot 26      ...
 DEPTH    Depth                            ...       ...       ...       ...     tot 26      ...
 TIME     time                             ...       ...       ...       ...     tot 26      ...
 SST      Temperature                      ...       ...       ...       ...     tot 26      ...
 
show grid sst
    GRID (G###)
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 normal    T
 FEATURES  E (instance)        26 r   1                    26                  full
 normal    F
can dat/all
 
! /FEATURE=none, grids are just the 1-D axes
 
use/feature=none DSG_ERDDAP_Tao5daySst
show data
     currently SET data sets:
    1> ./data/DSG_ERDDAP_Tao5daySst.nc  (default)
 name     title                             I         J         K         L         M         N
 ARRAY    Array                            ...       ...       ...       ...       1:70      ...
 STATION  Station                          ...       ...       ...       ...       1:70      ...
 WMO_PLATFORM_CODE
          WMO Platform Code                ...       ...       ...       ...       1:70      ...
 LONGITUDE
          Nominal Longitude                ...       ...       ...       ...       1:70      ...
 LATITUDE Nominal Latitude                 ...       ...       ...       ...       1:70      ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:70      ...
 TIME     Centered Time                    1:2376    ...       ...       ...       ...       ...
 DEPTH    Depth                            1:2376    ...       ...       ...       ...       ...
 T_25     Sea Surface Temperature          1:2376    ...       ...       ...       ...       ...
 QT_5025  Sea Surface Temperature Quality  1:2376    ...       ...       ...       ...       ...
 ST_6025  Sea Surface Temperature Source   1:2376    ...       ...       ...       ...       ...
 STR_TEMP FLOATSTR(T_25, "(F5.2)")         1:2376    ...       ...       ...       ...       ...
 
show grid t_25
    GRID GNV2
 name       axis              # pts   start                end                 subset
 OBS       X                 2376 r   1                    2376                full
 normal    Y
 normal    Z
 normal    T
show grid array
    GRID GNV1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 normal    T
 TIMESERIES E                  70 r   1                    70                  full
 normal    F
can dat/all
 
*** Running ferret script: bn_dsg_no_data.jnl
! bn_dsg_no_data.jnl
! Test plots when the constraints result in no features
! lying within the locations/times selected.
! A blank plot is drawn; for map plots the axes are the
! requested XY region; for time and profile plots the
! independent axis range is what's in the dataset.
! 3/25/20 ACM
 
! profile data
set view ul
use profile_dsg.nc
list/x=-122:-121.5 sal
   DATA SET: ./data/profile_dsg.nc
   SUBSET   : LONGITUDE: 122W(-122) to 121.5W(-121.5)
 PROFILE    is Profile-id
 SAL        is sal
    FEATURE  PROFILE     LONGITUDE  LATITUDE   DEPTH            TIME         SAL
plot/x=-122:-121.5 sal
 
cancel data/all
! timeseries data
 
set view ur
use DSG_ERDDAP_Tao5daySst.nc
list/x=0:40/y=10:20 t_25
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : LONGITUDE: 0E to 40E
              LATITUDE: 10N to 20N
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C)
    FEATURE  STATION     LONGITUDE  LATITUDE   DEPTH            TIME        T_25
plot/x=0:40/y=10:20 t_25
 
cancel data/all
! trajectory data
 
set view ll
! moduloing
use dsg_cross_prime
list/x=290:330/y=-50:-30 sst
   DATA SET: ./data/dsg_cross_prime.nc
   SUBSET   : LONGITUDE: 70W to 30W
              LATITUDE: 50S to 30S
 ID         is Trajectory-id
 SST        is Temperature (Degrees C)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME         SST
 
plot/x=-70:-30/y=-50:-30 sst
 
 
cancel data/all
! point data
 
set view lr
use dsg_point_data.nc
list/x=-125:-115/y=21:25 sst
   DATA SET: ./data/dsg_point_data.nc
   SUBSET   : LONGITUDE: 139W to 115W(-115)
              LATITUDE: 21N to 25N
 SST        is Temperature (Degrees C)
    FEATURE              LONGITUDE  LATITUDE   DEPTH            TIME         SST
plot/x=-125:-115/y=21:25 sst
 
frame/file=dsg_no_feature_found.gif
*** Running ferret script: bn_dsg_orth_labels.jnl
! bn_dsg_orth_labels.jnl
! If we plot with a constraint on coordinates, the labels in the upper
! left that show the region orthogonal to the plotreflect the subset
! of data that is shown. (This applies to commands other than plots too.)
! 3/2020 ACM
 
use profile_dsg
plot/thick sal
say ($lab($labnum_x)), ($lab($labnum_y))
 !-> MESSAGE/CONTINUE LONGITUDE : 123.14W(-123.14) to 120.4W(-120.4), LATITUDE : 38.8N to 44.11N
LONGITUDE : 123.14W(-123.14) to 120.4W(-120.4), LATITUDE : 38.8N to 44.11N
say ($lab($labnum_t)), ($lab($labnum_e))
 !-> MESSAGE/CONTINUE TIME : 12-AUG-2009 00:00 to 13-AUG-2009 12:58, E (instance) : 1 to 3
TIME : 12-AUG-2009 00:00 to 13-AUG-2009 12:58, E (instance) : 1 to 3
 
! Constrain in X; the XYTE ranges shown in the upper left show the
! coordinate range of the data actually shown.
 
plot/x=-122:-118 sal
say ($lab($labnum_x)), ($lab($labnum_y))
 !-> MESSAGE/CONTINUE LONGITUDE : 121W(-121) to 120.4W(-120.4), LATITUDE : 38.8N to 44.11N
LONGITUDE : 121W(-121) to 120.4W(-120.4), LATITUDE : 38.8N to 44.11N
say ($lab($labnum_t)), ($lab($labnum_e))
 !-> MESSAGE/CONTINUE TIME : 12-AUG-2009 00:00 to 13-AUG-2009 12:58, E (instance) : 2 to 3
TIME : 12-AUG-2009 00:00 to 13-AUG-2009 12:58, E (instance) : 2 to 3
 
cancel data/all
 
! Trajectory data
 
use simple_traj_dsg.nc
plot/thick sst
say ($lab($labnum_t)), ($lab($labnum_e))
 !-> MESSAGE/CONTINUE TIME : 02-JAN-1970 00:00 to 20-JAN-1970 00:00, E (instance) : 1 to 4
TIME : 02-JAN-1970 00:00 to 20-JAN-1970 00:00, E (instance) : 1 to 4
 
! Now constrain in XY, time range for the data ends 17-jan, e-range constrained
plot/x=-115:-90/y=14:22 sst
say ($lab($labnum_t)), ($lab($labnum_e))
 !-> MESSAGE/CONTINUE TIME : 02-JAN-1970 12:00 to 17-JAN-1970 00:00, E (instance) : 1 to 2
TIME : 02-JAN-1970 12:00 to 17-JAN-1970 00:00, E (instance) : 1 to 2
 
cancel data/all
 
! Timeseries plots
use simple_timeseries_dsg
plot/thick/line/sym sst
say ($lab($labnum_x)), ($lab($labnum_y))
 !-> MESSAGE/CONTINUE LONGITUDE : 116W to 90W, LATITUDE : 15N to 23N
LONGITUDE : 116W to 90W, LATITUDE : 15N to 23N
say ($lab($labnum_e))
 !-> MESSAGE/CONTINUE E (instance) : 1 to 4
E (instance) : 1 to 4
 
! Subset in time, the lon-lat range is smaller
! ( the e range remains the same, plot has features 1, 3, 4)
plot/thick/line/sym/t=1-jan-2015:10-jan-2015 sst
say ($lab($labnum_x)), ($lab($labnum_y))
 !-> MESSAGE/CONTINUE LONGITUDE : 116W to 98W, LATITUDE : 15N to 20N
LONGITUDE : 116W to 98W, LATITUDE : 15N to 20N
say ($lab($labnum_e))
 !-> MESSAGE/CONTINUE E (instance) : 1 to 4
E (instance) : 1 to 4
 
cancel data/all
 
! or with use/feature=time on traj set
 
use/feature=time simple_traj_dsg
plot sst
say ($lab($labnum_x)), ($lab($labnum_y))
 !-> MESSAGE/CONTINUE LONGITUDE : 139W to 90W, LATITUDE : 14.5N to 25N
LONGITUDE : 139W to 90W, LATITUDE : 14.5N to 25N
 
! Lon range changes
plot/t=1-jan-1970:10-jan-1970 sst
say ($lab($labnum_x)), ($lab($labnum_y))
 !-> MESSAGE/CONTINUE LONGITUDE : 138W to 90W, LATITUDE : 14.5N to 25N
LONGITUDE : 138W to 90W, LATITUDE : 14.5N to 25N
 
cancel data/all
 
! Point data
 
use dsg_point_data.nc
plot/thick sst
say ($lab($labnum_t))
 !-> MESSAGE/CONTINUE TIME : 02-JAN-1970 00:00 to 20-JAN-1970 00:00
TIME : 02-JAN-1970 00:00 to 20-JAN-1970 00:00
 
! time should end 17-jan
plot/thick/x=-112:-90 sst
say ($lab($labnum_t))
 !-> MESSAGE/CONTINUE TIME : 02-JAN-1970 12:00 to 17-JAN-1970 00:00
TIME : 02-JAN-1970 12:00 to 17-JAN-1970 00:00
*** Running ferret script: bn_dsg_fcn_of_instance.jnl
! bn_dsg_fcn_of_instance.jnl
!  Test STRINDEX function applied to a
!  variable on a DSG instance variable.
!  4/2/2020  ACM
 
use sail_2019.nc
list strindex(trajectory, "4"), trajectory
   DATA SET: ./data/sail_2019.nc
 TRAJECTORY is Trajectory-id
 EX#1       is STRINDEX(TRAJECTORY, "4")
 TRAJECTORY is Trajectory/Drone ID
    FEATURE  TRAJECTORY    EX#1 TRAJECTORY
     1           1033.0   0.000 "1033.0"
     2           1034.0   4.000 "1034.0"
 
can data/all
use DSG_ERDDAP_Tao5daySst.nc
sh dat
     currently SET data sets:
    1> ./data/DSG_ERDDAP_Tao5daySst.nc  (default)
       DSG Feature type Timeseries
 name     title                             I         J         K         L         M         N
 ARRAY    Array                            ...       ...       ...       ...       1:70      ...
 STATION  Station                          ...       ...       ...       ...       1:70      ...
 WMO_PLATFORM_CODE
          WMO Platform Code                ...       ...       ...       ...       1:70      ...
 LONGITUDE
          Nominal Longitude                ...       ...       ...       ...       1:70      ...
 LATITUDE Nominal Latitude                 ...       ...       ...       ...       1:70      ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:70      ...
 TIME     Centered Time                    ...       ...       ...     tot 2376    1:70      ...
 DEPTH    Depth                            ...       ...       ...     tot 2376    1:70      ...
 T_25     Sea Surface Temperature          ...       ...       ...     tot 2376    1:70      ...
 QT_5025  Sea Surface Temperature Quality  ...       ...       ...     tot 2376    1:70      ...
 ST_6025  Sea Surface Temperature Source   ...       ...       ...     tot 2376    1:70      ...
 STR_TEMP FLOATSTR(T_25, "(F5.2)")         ...       ...       ...     tot 2376    1:70      ...
 
let test = if strindex(station, "140w") GT 0 then 1
list station, test
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
 STATION    is Timeseries-id
 STATION    is Station
 TEST       is IF STRINDEX(STATION, "140w") GT 0 THEN 1
    FEATURE  STATION     LONGITUDE  LATITUDE STATION    TEST
     1             0n0e         0E         0  "0n0e"     ...
     2            0n10w        10W         0 "0n10w"     ...
     3           0n110w       110W         0 "0n110w"    ...
     4           0n125w       125W         0 "0n125w"    ...
     5           0n140w       140W         0 "0n140w"  1.000
     6           0n155w       155W         0 "0n155w"    ...
     7           0n156e       156E         0 "0n156e"    ...
     8           0n165e       165E         0 "0n165e"    ...
     9           0n170w       170W         0 "0n170w"    ...
    10            0n23w        23W         0 "0n23w"     ...
    11            0n67e        67E         0 "0n67e"     ...
    12          0n80.5e      80.5E         0 "0n80.5e"   ...
    13            0n90e        90E         0 "0n90e"     ...
    14            0n95w        95W         0 "0n95w"     ...
    15          1.5n67e        67E      1.5N "1.5n67e"   ...
    16          1.5s67e        67E      1.5S "1.5s67e"   ...
    17        1.5s80.5e      80.5E      1.5S "1.5s80.5e" ...
    18           10s10w        10W       10S "10s10w"    ...
    19           12n23w        23W       12N "12n23w"    ...
    20           12n90e        90E       12N "12n90e"    ...
    21         12s80.5e      80.5E       12S "12s80.5e"  ...
    22           12s93e        93E       12S "12s93e"    ...
    23           14s32w        32W       14S "14s32w"    ...
    24           15n90e        90E       15N "15n90e"    ...
    25           19s34w        34W       19S "19s34w"    ...
    26           20n38w        38W       20N "20n38w"    ...
    27           21n23w        23W       21N "21n23w"    ...
    28           2n125w       125W        2N "2n125w"    ...
    29           2n140w       140W        2N "2n140w"  1.000
    30           2n155w       155W        2N "2n155w"    ...
    31           2n170w       170W        2N "2n170w"    ...
    32           2n180w       180E        2N "2n180w"    ...
    33           2s110w       110W        2S "2s110w"    ...
    34           2s125w       125W        2S "2s125w"    ...
    35           2s140w       140W        2S "2s140w"  1.000
    36           2s155w       155W        2S "2s155w"    ...
    37           2s165e       165E        2S "2s165e"    ...
    38           2s170w       170W        2S "2s170w"    ...
    39           2s180w       180E        2S "2s180w"    ...
    40            4n23w        23W        4N "4n23w"     ...
    41            4n90e        90E        4N "4n90e"     ...
    42            4s57e        57E        4S "4s57e"     ...
    43          4s80.5e      80.5E        4S "4s80.5e"   ...
    44           5n125w       125W        5N "5n125w"    ...
    45           5n140w       140W        5N "5n140w"  1.000
    46           5n155w       155W        5N "5n155w"    ...
    47           5n165e       165E        5N "5n165e"    ...
    48           5n170w       170W        5N "5n170w"    ...
    49           5n180w       180E        5N "5n180w"    ...
    50           5s125w       125W        5S "5s125w"    ...
    51           5s140w       140W        5S "5s140w"  1.000
    52           5s155w       155W        5S "5s155w"    ...
    53           5s170w       170W        5S "5s170w"    ...
    54           5s180w       180E        5S "5s180w"    ...
    55            5s95e        95E        5S "5s95e"     ...
    56            6s10w        10W        6S "6s10w"     ...
    57             6s8e         8E        6S  "6s8e"     ...
    58           8n125w       125W        8N "8n125w"    ...
    59           8n137e       137E        8N "8n137e"    ...
    60           8n180w       180E        8N "8n180w"    ...
    61            8n90e        90E        8N "8n90e"     ...
    62            8n95w        95W        8N "8n95w"     ...
    63           8s125w       125W        8S "8s125w"    ...
    64           8s155w       155W        8S "8s155w"    ...
    65           8s165e       165E        8S "8s165e"    ...
    66           8s170w       170W        8S "8s170w"    ...
    67           8s180w       180E        8S "8s180w"    ...
    68            8s55e        55E        8S "8s55e"     ...
    69            8s95e        95E        8S "8s95e"     ...
    70           9n140w       140W        9N "9n140w"  1.000
 
! Define a mask on these stations and list their locations
 
let mask = if strindex(station, "140w") GT 0 then 1
set data/fmask=mask 1
list longitude, latitude
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
Mask on features has been set: IF STRINDEX(STATION, "140w") GT 0 THEN 1
 STATION    is Timeseries-id
 LONGITUDE  is Nominal Longitude (degrees_east)
 LATITUDE   is Nominal Latitude (degrees_north)
    FEATURE  STATION     LONGITUDE  LATITUDE LONGITU LATITUDE
     5           0n140w       140W         0   220.0   0.000
    29           2n140w       140W        2N   220.0   2.000
    35           2s140w       140W        2S   220.0  -2.000
    45           5n140w       140W        5N   220.0   5.000
    51           5s140w       140W        5S   220.0  -5.000
    70           9n140w       140W        9N   220.0   9.000
 
can data/all
use profile_dsg_names.nc
list strindex(profile, "location"), profile
   DATA SET: ./data/profile_dsg_names.nc
 PROFILE    is Profile-id
 EX#1       is STRINDEX(PROFILE, "location")
 PROFILE    is profile ID: Cruise and Station
    FEATURE  PROFILE     LONGITUDE  LATITUDE            TIME        EX#1 PROFILE
     1        station_1    123.14W     41.3N   13-AUG-2009 00:00   0.000 "station_1"
     2       location_2     120.4W    44.11N   13-AUG-2009 12:58   1.000 "location_2"
     3       location_3       121W     38.8N   12-AUG-2009 00:00   1.000 "location_3"
     4        station_4     122.2W     36.1N   14-AUG-2009 16:45   0.000 "station_4"
     5        station_5     119.1W     41.2N   15-AUG-2009 01:05   0.000 "station_5"
 
can data/all
use dsg_points_w_strings
let mask = if strindex(pointstr, "d") gt 0 then 1
list mask, pointstr
   DATA SET: ./data/dsg_points_w_strings.nc
 MASK       is IF STRINDEX(POINTSTR, "d") GT 0 THEN 1
 POINTSTR   is description
    FEATURE              LONGITUDE  LATITUDE   DEPTH            TIME        MASK POINTSTR
     1                         98W       20N       0   02-JAN-1970 12:00     ...   "the"
     2                         96W       21N       0   03-JAN-1970 12:00     ... "quick"
     3                         95W     22.3N       0   04-JAN-1970 12:00     ... "brown"
     4                         99W       23N       0   05-JAN-1970 12:00     ...   "fox"
     5                         90W       21N       0   06-JAN-1970 12:00   1.000 "jumped"
     6                        108W       15N       0   03-JAN-1970 00:00     ...  "over"
     7                        106W       16N       0   05-JAN-1970 00:00     ...   "the"
     8                        105W     14.5N       0   07-JAN-1970 00:00     ...  "lazy"
     9                        109W       15N       0   09-JAN-1970 00:00   1.000   "dog"
    10                        101W     15.6N       0   11-JAN-1970 00:00     ...    "an"
    11                        108W       16N       0   13-JAN-1970 00:00     ... "apple"
    12                        106W       17N       0   15-JAN-1970 00:00     ...     "a"
    13                        105W     17.2N       0   17-JAN-1970 00:00   1.000   "day"
    14                        138W       25N       0   02-JAN-1970 00:00     ... "keeps"
    15                        136W     23.6N       0   04-JAN-1970 00:00     ...   "the"
    16                        135W       23N       0   08-JAN-1970 00:00   1.000 "doctor"
    17                        139W     22.5N       0   13-JAN-1970 00:00     ...  "away"
    18                        129W     21.1N       0   20-JAN-1970 00:00     ...     "a"
    19                        116W       18N       0   02-JAN-1970 00:00     ... "stitch"
    20                        116W       18N       0   03-JAN-1970 00:00     ...    "in"
    21                        116W       18N       0   04-JAN-1970 00:00     ...  "time"
    22                        116W       18N       0   05-JAN-1970 00:00     ... "saves"
    23                        116W       18N       0   06-JAN-1970 00:00     ...  "nine"
    24                        116W       18N       0   07-JAN-1970 00:00   1.000  "wild"
    25                        116W       18N       0   08-JAN-1970 00:00     ... "goose"
    26                        116W       18N       0   09-JAN-1970 00:00     ... "chase"
 
set data/fmask=mask 1
list pointstr, sst
   DATA SET: ./data/dsg_points_w_strings.nc
Mask on features has been set: IF STRINDEX(POINTSTR, "d") GT 0 THEN 1
 POINTSTR   is description
 SST        is Temperature (Degrees C)
    FEATURE              LONGITUDE  LATITUDE   DEPTH            TIME     POINTSTR    SST
     5                         90W       21N       0   06-JAN-1970 12:00 "jumped"  28.03
     9                        109W       15N       0   09-JAN-1970 00:00   "dog"   25.08
    13                        105W     17.2N       0   17-JAN-1970 00:00   "day"   21.64
    16                        135W       23N       0   08-JAN-1970 00:00 "doctor"  17.97
    24                        116W       18N       0   07-JAN-1970 00:00  "wild"   23.53
*** Running ferret script: bn751_bug_fixes.jnl
! bn751_bug_fixes.jnl
! test various fixes that went into version 7.51
! 4/19 *acm*
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err75_grave_parsing
! err75_grave_parsing
! 4/29/19 ACM
! See issue 1927. Error parsing the grave-accent expr
! when a previous command had qualifiers
 
let obs_yr1 = 1880
let obs_yr2 = 2014
 
! This succeeded
let/title="Observations (`obs_yr1`-`obs_yr2`)"/unit="#C" ts_obs = sst
 !-> DEFINE VARIABLE/title="Observations (1880-2014)"/unit="#C" ts_obs = sst
 
let obs_yr1 = 1880
let obs_yr2 = 2014
def ax/t=1-jan-1880:1-jan-2015:`1/12`/unit=years/edge/cal=noleap tax_hist
 !-> def ax/t=1-jan-1880:1-jan-2015:0.08333333333333333/unit=years/edge/cal=noleap tax_hist
 
! This failed with a syntax error
let/title="Observations (`obs_yr1`-`obs_yr2`)"/unit="#C" ts_obs = sst
 !-> DEFINE VARIABLE/title="Observations (1880-2014)"/unit="#C" ts_obs = sst
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err75_tm_fmt_ints
! err75_tm_fmt_ints
! 5/06/19 KMS
! See issue 1929. Integer overflow in tm_fmt.F and tm_fmt_user.F
 
! This succeeded
say `2.2100001 * 1e8`
 !-> MESSAGE/CONTINUE 221000010
221000010
 
! This crashed the program (undetected integer overflow when represented as an integer)
say `2.2100001 * 1e9`
 !-> MESSAGE/CONTINUE 2210000100
2210000100
 
! Try some other variants
say `2.2100001 * 1e12`
 !-> MESSAGE/CONTINUE 2210000100000
2210000100000
say `2.2100001 * 1e-2`
 !-> MESSAGE/CONTINUE 0.022100001
0.022100001
say `2.00`
 !-> MESSAGE/CONTINUE 2
2
say `2.`
 !-> MESSAGE/CONTINUE 2
2
 
! Add even more magnitudes
say `2.2100001 * 1e13`
 !-> MESSAGE/CONTINUE 22100001000000
22100001000000
say `2.2100001 * 1e16`
 !-> MESSAGE/CONTINUE 2.2100001E+16
2.2100001E+16
say `2.2100001 * 1e19`
 !-> MESSAGE/CONTINUE 2.2100001E+19
2.2100001E+19
 
say `-2.2100001 * 1e13`
 !-> MESSAGE/CONTINUE -22100001000000
-22100001000000
say `-2.2100001 * 1e-13`
 !-> MESSAGE/CONTINUE -2.2100001E-13
-2.2100001E-13
say `-2.2100001 * 1e-8`
 !-> MESSAGE/CONTINUE -2.2100001E-08
-2.2100001E-08
say `-2.2100001 * 1e-5`
 !-> MESSAGE/CONTINUE -0.000022100001
-0.000022100001
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err75_listings_conformable
! err75_listings_conformable.jnl
! issue 1932  5/16/2019
!
! listing 1-D yvar, xvar, along with a 2-D variable twoDvar got the data in
! twoDvar wrong, when the yvar is listed first; this triggers the listing
! to be done with Y varying fastest, but the data wasn't permuted to do that.
 
let var = 100*{1,,3,4,,6,7,8,,10,11,12}
define axis/x=1:4:1 xaxis
define axis/y=1:3:1 yaxis
let xyvar = x[gx=xaxis] + y[gy=yaxis]
let testvar = reshape (var, xyvar)
list testvar
             VARIABLE : RESHAPE (VAR, XYVAR)
             SUBSET   : 4 by 3 points (X-Y)
             1      2      3      4    
             1      2      3      4
 1   / 1:   100.   ....   300.   400.
 2   / 2:   ....   600.   700.   800.
 3   / 3:   ....  1000.  1100.  1200.
 
! this is ok x varying fastest in the 3-var listing
list x[gx=testvar], y[gy=testvar], testvar
             X: 0.5 to 4.5
             Y: 0.5 to 3.5
 Column  1: X is X (axis XAXIS)
 Column  2: Y is Y (axis YAXIS)
 Column  3: TESTVAR is RESHAPE (VAR, XYVAR)
             X     Y   TESTVAR
 ---- J:1 Y:   1
1   / 1:  1.000  1.000    100.
2   / 2:  2.000  1.000    ....
3   / 3:  3.000  1.000    300.
4   / 4:  4.000  1.000    400.
 ---- J:2 Y:   2
1   / 1:  1.000  2.000    ....
2   / 2:  2.000  2.000    600.
3   / 3:  3.000  2.000    700.
4   / 4:  4.000  2.000    800.
 ---- J:3 Y:   3
1   / 1:  1.000  3.000    ....
2   / 2:  2.000  3.000   1000.
3   / 3:  3.000  3.000   1100.
4   / 4:  4.000  3.000   1200.
 
! This was wrong, y varying fastest in the 3-var listing
list y[gy=testvar], x[gx=testvar], testvar
             Y: 0.5 to 3.5
             X: 0.5 to 4.5
 Column  1: Y is Y (axis YAXIS)
 Column  2: X is X (axis XAXIS)
 Column  3: TESTVAR is RESHAPE (VAR, XYVAR)
             Y     X   TESTVAR
 ---- I:1 X:   1
1   / 1:  1.000  1.000    100.
2   / 2:  2.000  1.000    ....
3   / 3:  3.000  1.000    ....
 ---- I:2 X:   2
1   / 1:  1.000  2.000    ....
2   / 2:  2.000  2.000    600.
3   / 3:  3.000  2.000   1000.
 ---- I:3 X:   3
1   / 1:  1.000  3.000    300.
2   / 2:  2.000  3.000    700.
3   / 3:  3.000  3.000   1100.
 ---- I:4 X:   4
1   / 1:  1.000  4.000    400.
2   / 2:  2.000  4.000    800.
3   / 3:  3.000  4.000   1200.
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err75_time_origin
! err75_time_origin.jnl
! test of time_origin attribute value on an time axis
 
LET ii = _I[I=1:24]
LET offset1970 = DAYS1900(1970,1,1)
LET month = MOD(ii-1,12)+1
LET year = 1970 + INT((ii-1)/12)
 
DEFINE AXIS/T0="1-JAN-1970"/EDGES/UNITS=days tmnth = DAYS1900(year,month,1) - offset1970
LET mytime = _T[GT=tmnth]
show axis tmnth
 name       axis              # pts   start                end
 TMNTH     TIME                23 i   16-JAN-1970 12:00    16-NOV-1971 00:00
T0 = 1-JAN-1970
   Axis span (to cell edges) = 699
SAVE /FILE=time_origin_1.nc /CLOBBER mytime
CAN VAR mytime
CAN AXIS tmnth
 
SPAWN ncdump time_origin_1.nc  | grep -i tmnth
	TMNTH = UNLIMITED ; // (23 currently)
	double TMNTH(TMNTH) ;
		TMNTH:units = "days since 1970-01-01" ;
		TMNTH:axis = "T" ;
		TMNTH:bounds = "TMNTH_bnds" ;
		TMNTH:time_origin = "01-JAN-1970" ;
		TMNTH:standard_name = "time" ;
	double TMNTH_bnds(TMNTH, bnds) ;
	double MYTIME(TMNTH) ;
		MYTIME:long_name = "_T[GT=TMNTH]" ;
 TMNTH = 15.5, 45, 74.5, 105, 135.5, 166, 196.5, 227.5, 258, 288.5, 319, 
 TMNTH_bnds =
 
DEFINE AXIS/T0="01-JAN-1970"/EDGES/UNITS=days tmnth = DAYS1900(year,month,1) - offset1970
show axis tmnth
 name       axis              # pts   start                end
 TMNTH     TIME                23 i   16-JAN-1970 12:00    16-NOV-1971 00:00
T0 = 01-JAN-1970
   Axis span (to cell edges) = 699
 
LET mytime = _T[GT=tmnth]
SAVE /FILE=time_origin_01.nc /CLOBBER mytime
CAN VAR mytime
CAN AXIS tmnth
 
SPAWN ncdump time_origin_01.nc  | grep -i tmnth
	TMNTH = UNLIMITED ; // (23 currently)
	double TMNTH(TMNTH) ;
		TMNTH:units = "days since 1970-01-01" ;
		TMNTH:axis = "T" ;
		TMNTH:bounds = "TMNTH_bnds" ;
		TMNTH:time_origin = "01-JAN-1970" ;
		TMNTH:standard_name = "time" ;
	double TMNTH_bnds(TMNTH, bnds) ;
	double MYTIME(TMNTH) ;
		MYTIME:long_name = "_T[GT=TMNTH]" ;
 TMNTH = 15.5, 45, 74.5, 105, 135.5, 166, 196.5, 227.5, 258, 288.5, 319, 
 TMNTH_bnds =
 
! or can define the axis with the time origin in ISO time
DEFINE AXIS/T0="1970-01-01"/EDGES/UNITS=days tmnth = DAYS1900(year,month,1) - offset1970
show axis tmnth
 name       axis              # pts   start                end
 TMNTH     TIME                23 i   16-JAN-1970 12:00    16-NOV-1971 00:00
T0 = 01-JAN-1970
   Axis span (to cell edges) = 699
 
LET mytime = _T[GT=tmnth]
SAVE /FILE=time_origin_01.nc /CLOBBER mytime
CAN VAR mytime
CAN AXIS tmnth
 
SPAWN ncdump time_origin_01.nc  | grep -i tmnth
	TMNTH = UNLIMITED ; // (23 currently)
	double TMNTH(TMNTH) ;
		TMNTH:units = "days since 1970-01-01" ;
		TMNTH:axis = "T" ;
		TMNTH:bounds = "TMNTH_bnds" ;
		TMNTH:time_origin = "01-JAN-1970" ;
		TMNTH:standard_name = "time" ;
	double TMNTH_bnds(TMNTH, bnds) ;
	double MYTIME(TMNTH) ;
		MYTIME:long_name = "_T[GT=TMNTH]" ;
 TMNTH = 15.5, 45, 74.5, 105, 135.5, 166, 196.5, 227.5, 258, 288.5, 319, 
 TMNTH_bnds =
 
 
! and/or can output the time string in iso time
 
DEFINE AXIS/T0="01-JAN-1970"/EDGES/UNITS=days tmnth = DAYS1900(year,month,1) - offset1970
show axis tmnth
 name       axis              # pts   start                end
 TMNTH     TIME                23 i   16-JAN-1970 12:00    16-NOV-1971 00:00
T0 = 01-JAN-1970
   Axis span (to cell edges) = 699
 
LET mytime = _T[GT=tmnth]
SET MODE DATE:ISO
SAVE /FILE=time_origin_01.nc /CLOBBER mytime
CAN VAR mytime
CAN AXIS tmnth
 
SPAWN ncdump time_origin_01.nc | grep -i tmnth
	TMNTH = UNLIMITED ; // (23 currently)
	double TMNTH(TMNTH) ;
		TMNTH:units = "days since 1970-01-01" ;
		TMNTH:axis = "T" ;
		TMNTH:bounds = "TMNTH_bnds" ;
		TMNTH:time_origin = "1970-01-01" ;
		TMNTH:standard_name = "time" ;
	double TMNTH_bnds(TMNTH, bnds) ;
	double MYTIME(TMNTH) ;
		MYTIME:long_name = "_T[GT=TMNTH]" ;
 TMNTH = 15.5, 45, 74.5, 105, 135.5, 166, 196.5, 227.5, 258, 288.5, 319, 
 TMNTH_bnds =
 
 
CAN VAR year, month, offset1970, ii
CANCEL MODE DATE
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err75_packed_no_missing
! err75_packed_no_missing.jnl
!
! 5/24/2019: ticket 1935
!
! The data is packed with a _FillValue of -32767s and no missing_value.
! The fourth value is a valid value of 0, which unpacks to 180.
! previously the scaling treated the variable as if it had a missing_value
! of 0 and _Fillvalue of -32767s and so put bad-flag into the 4th location.
!
! In the file, item 4 is 0
sp ncdump -v var data/packed_no_missflag.nc
netcdf packed_no_missflag {
dimensions:
	time = UNLIMITED ; // (1 currently)
	latitude = 11 ;
	longitude = 1 ;
variables:
	short var(time, latitude, longitude) ;
		var:long_name = "Mean primary swell wave direction from" ;
		var:units = "degree" ;
		var:add_offset = 180. ;
		var:scale_factor = 0.01 ;
		var:_FillValue = -32767s ;
		var:standard_name = "sea_surface_primary_swell_wave_from_direction" ;
		var:cell_methods = "time:point area:mean" ;
		var:type_of_analysis = "spectral analysis" ;
		var:WMO_code = 107 ;
	float latitude(latitude) ;
		latitude:standard_name = "latitude" ;
		latitude:long_name = "latitude coordinate" ;
		latitude:units = "degrees_north" ;
		latitude:axis = "Y" ;
		latitude:step = 0.2 ;
	float longitude(longitude) ;
		longitude:standard_name = "longitude" ;
		longitude:long_name = "longitude coordinate" ;
		longitude:units = "degrees_east" ;
		longitude:axis = "X" ;
		longitude:step = 0.2 ;
	double time(time) ;
		time:standard_name = "time" ;
		time:long_name = "time" ;
		time:units = "hours since 1950-1-1 00:00:00" ;
		time:calendar = "standard" ;
		time:axis = "T" ;
		time:step = 3 ;

// global attributes:
		:CDI = "Climate Data Interface version 1.7.2 (http://mpimet.mpg.de/cdi)" ;
		:Conventions = "CF-1.6" ;
		:CDO = "Climate Data Operators version 1.7.2 (http://mpimet.mpg.de/cdo)" ;
data:

 var =
  _,
  _,
  1341,
  535,
  0,
  -247,
  66,
  150,
  -129,
  -277,
  771 ;
}
 
! When unpacked, 0 should become 180.  Previously it was set to missing.
use packed_no_missflag.nc
list var
             VARIABLE : Mean primary swell wave direction from (degree)
             FILENAME : packed_no_missflag.nc
             SUBSET   : 11 points (LATITUDE)
             LONGITUDE: 18E
             TIME     : 21-AUG-2014 21:00
                18E   
                 1
 60N    / 11:   ....
 59.8N  / 10:   ....
 59.6N  /  9:  193.4
 59.4N  /  8:  185.3
 59.2N  /  7:  180.0
 59N    /  6:  177.5
 58.8N  /  5:  180.7
 58.6N  /  4:  181.5
 58.4N  /  3:  178.7
 58.2N  /  2:  177.2
 58N    /  1:  187.7
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err75_poly_modulo
! err75_poly_modulo.jnl
! issue 1937 overlays of polygon plots with modulo
 
use coads_climatology
let var =  sst - 16
 
! save just one timestep
save/clobber/L=1/y=30:60/file=a.nc var
cancel data/all
cancel var/all
use a
 
let yvar = ysequence(var)
!=======================================
! Create bounds of cells
let lon_LL =  ysequence(var*0+xboxlo[g=var])
let lon_UL =  ysequence(var*0+xboxlo[g=var])
let lon_UR =  ysequence(var*0+xboxhi[g=var])
let lon_LR =  ysequence(var*0+xboxhi[g=var])
let lon_bounds0 = xcat(lon_LL,lon_UL)
let lon_bounds1 = xcat(lon_bounds0,lon_UR)
let lon_bounds  = xcat(lon_bounds1,lon_LR)
let/units=degrees_east/title=LONGITUDE ylon = lon_bounds
!=======================================
! Create bounds of cells
let lat_LL =  ysequence(var*0+yboxlo[g=var])
let lat_UL =  ysequence(var*0+yboxhi[g=var])
let lat_UR =  ysequence(var*0+yboxhi[g=var])
let lat_LR =  ysequence(var*0+yboxlo[g=var])
let lat_bounds0 = xcat(lat_LL,lat_UL)
let lat_bounds1 = xcat(lat_bounds0,lat_UR)
let lat_bounds  = xcat(lat_bounds1,lat_LR)
let/units=degrees_north/title=LATITUDE ylat = lat_bounds
 
! This plot is ok, uses levels computed on all the data,
! The overlay recomputes the same levels with all the data and plots the same key
!  polygon/modulo/hlim=-10:60/vlim=30:60/line/fill/pal=rainbow/lev=25 ylon, ylat, yvar; set win/new
 
! Here the overlay plot triggered by the /MODULO did not apply the specified levels
! but just computed levels from the data and also drew the key for those new levels.
polygon/modulo/hlim=-10:60/vlim=30:60/line/fill/pal=rainbow/lev=(-5,0,1)(0,2.6,0.2) ylon, ylat, yvar
frame/file=poly_modulo_levels.gif
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err75_longname_cr
! err75_longname_cr.jnl
! This dataset has DOS-style control character at the end of the
! long_name long_name for variable dissolved_o2.  It garbled the listing
!
 
! Note the long_name attribute on dissolved_o2
! Also note newlines in the long_name for nitrite and in the global history attribute.
! Those are ok. This is often seen in the history attribute.
 
sp ncdump -h data/bad_longname.nc
netcdf bad_longname {
dimensions:
	obs = 4 ;
	id_strlen = 10 ;
variables:
	float depth(obs) ;
		depth:long_name = "Depth" ;
		depth:positive = "down" ;
		depth:standard_name = "depth" ;
		depth:units = "m" ;
	float nitrite(obs) ;
		nitrite:_FillValue = -1.e+34f ;
		nitrite:long_name = "NO2\n",
			"A two-line long_name" ;
		nitrite:missing_value = -1.e+34f ;
		nitrite:standard_name = "mole_concentration_of_nitrite_in_sea_water" ;
		nitrite:units = "micromoles/kg" ;
	float dissolved_o2(obs) ;
		dissolved_o2:_FillValue = -1.e+34f ;
		dissolved_o2:long_name = "Dissolved Oxygen Concentration 1 mMoles/kg\r" ;
		dissolved_o2:missing_value = -1.e+34f ;
		dissolved_o2:standard_name = "mole_concentration_of_dissolved_molecular_oxygen_in_sea_water" ;
		dissolved_o2:units = "micromoles/kg" ;

// global attributes:
		:history = "FERRET V7  13-Jun-16\n",
			"2019-05-31T21:51:27Z (local files)\n",
			"2019-05-31T21:51:27Z http://dunkel.pmel.noaa.gov:9290/erddap/tabledap/ChukchiSea_454a_037a_fcf4.nc" ;
		:INST_TYPE = "Sea-Bird CTD SBE911" ;
		:institution = "PMEL EcoFOCI" ;
}
 
use bad_longname.nc
 
! Previously the header lines describing the variables said this, with the
! second line garbled:
!
!  Column  1: DEPTH is Depth (m)
!  (micromoles/kg)OLVED_O2 is Dissolved Oxygen Concentration 1 mMoles/kg
!  Column  3: NITRITE is NO2
!  A two-line long_name (micromoles/kg)
 
 
list depth, dissolved_o2, nitrite
             DATA SET: ./data/bad_longname.nc
             X: 0.5 to 4.5
 Column  1: DEPTH is Depth (m)
 Column  2: DISSOLVED_O2 is Dissolved Oxygen Concentration 1 mMoles/kg (micromoles/kg)
 Column  3: NITRITE is NO2
A two-line long_name (micromoles/kg)
         DEPTH  DISSOLV NITRITE
1   / 1:  0.000   296.6  0.0098
2   / 2:  1.000   296.6    ....
3   / 3:  2.000   296.6  0.2251
4   / 4:  3.000   296.7  0.1566
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err75_vlimits
! err75_vlimits.jnl
! issue 1940.  The /vlimits were translated as dates for variables on a
! time axis.  Incorrect attempt to translate the date as an iso-8601 date
!
! The plot succeeded but issued an error
! **TMAP ERR: error in time line definition 1 is not valid in this calendar
 
use coads_vwnd.cdf
plot/i=90/j=65/vlim=-10:1.99E-2 vwnd
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err75_reversed_axis
! err75_z_reversed.jnl
! Issue 1941
 
! The file has the z-axis reversed, z listed in order 1000, 900, ...
! The file also has 2-D bounds variables in the lon, lat direction
! so grid formation needs to handle the nvert dimension.
 
! make an identical copy of the file and open both
 
sp cp data/z_reversed.nc z_copy.nc
 
! This listing is correct
use z_reversed
list q
             VARIABLE : Q
             FILENAME : z_reversed.nc
             SUBSET   : 6 points (Z)
 500    / 1:  6.000
 600    / 2:  5.000
 700    / 3:  4.000
 800    / 4:  3.000
 900    / 5:  2.000
 1000   / 6:  1.000
 
! This listing was incorrect, listed q=1,2,3,4,5,6
use z_copy
list q
             VARIABLE : Q
             FILENAME : z_copy.nc
             SUBSET   : 6 points (Z)
 500    / 1:  6.000
 600    / 2:  5.000
 700    / 3:  4.000
 800    / 4:  3.000
 900    / 5:  2.000
 1000   / 6:  1.000
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err75_grave_numbers
! err75_grave_numbers
 
! 1.23456790123456789 with E from -16 to 16, p from -16 to 16
 
say `1.234567890123456789E-16,p=-16`
 !-> MESSAGE/CONTINUE 0.0000000000000001
0.0000000000000001
say `1.234567890123456789E-16,p=-15`
 !-> MESSAGE/CONTINUE 0.000000000000000
0.000000000000000
say `1.234567890123456789E-16,p=-14`
 !-> MESSAGE/CONTINUE 0.00000000000000
0.00000000000000
say `1.234567890123456789E-16,p=-13`
 !-> MESSAGE/CONTINUE 0.0000000000000
0.0000000000000
say `1.234567890123456789E-16,p=-12`
 !-> MESSAGE/CONTINUE 0.000000000000
0.000000000000
say `1.234567890123456789E-16,p=-11`
 !-> MESSAGE/CONTINUE 0.00000000000
0.00000000000
say `1.234567890123456789E-16,p=-10`
 !-> MESSAGE/CONTINUE 0.0000000000
0.0000000000
say `1.234567890123456789E-16,p=-9`
 !-> MESSAGE/CONTINUE 0.000000000
0.000000000
say `1.234567890123456789E-16,p=-8`
 !-> MESSAGE/CONTINUE 0.00000000
0.00000000
say `1.234567890123456789E-16,p=-7`
 !-> MESSAGE/CONTINUE 0.0000000
0.0000000
say `1.234567890123456789E-16,p=-6`
 !-> MESSAGE/CONTINUE 0.000000
0.000000
say `1.234567890123456789E-16,p=-5`
 !-> MESSAGE/CONTINUE 0.00000
0.00000
say `1.234567890123456789E-16,p=-4`
 !-> MESSAGE/CONTINUE 0.0000
0.0000
say `1.234567890123456789E-16,p=-3`
 !-> MESSAGE/CONTINUE 0.000
0.000
say `1.234567890123456789E-16,p=-2`
 !-> MESSAGE/CONTINUE 0.00
0.00
say `1.234567890123456789E-16,p=-1`
 !-> MESSAGE/CONTINUE 0.0
0.0
say `1.234567890123456789E-16,p=0`
 !-> MESSAGE/CONTINUE 0
0
say `1.234567890123456789E-16,p=1`
 !-> MESSAGE/CONTINUE 1.E-16
1.E-16
say `1.234567890123456789E-16,p=2`
 !-> MESSAGE/CONTINUE 1.2E-16
1.2E-16
say `1.234567890123456789E-16,p=3`
 !-> MESSAGE/CONTINUE 1.23E-16
1.23E-16
say `1.234567890123456789E-16,p=4`
 !-> MESSAGE/CONTINUE 1.235E-16
1.235E-16
say `1.234567890123456789E-16,p=5`
 !-> MESSAGE/CONTINUE 1.2346E-16
1.2346E-16
say `1.234567890123456789E-16,p=6`
 !-> MESSAGE/CONTINUE 1.23457E-16
1.23457E-16
say `1.234567890123456789E-16,p=7`
 !-> MESSAGE/CONTINUE 1.234568E-16
1.234568E-16
say `1.234567890123456789E-16,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E-16
1.2345679E-16
say `1.234567890123456789E-16,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E-16
1.23456789E-16
say `1.234567890123456789E-16,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E-16
1.23456789E-16
say `1.234567890123456789E-16,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901E-16
1.2345678901E-16
say `1.234567890123456789E-16,p=12`
 !-> MESSAGE/CONTINUE 1.23456789012E-16
1.23456789012E-16
say `1.234567890123456789E-16,p=13`
 !-> MESSAGE/CONTINUE 1.234567890123E-16
1.234567890123E-16
say `1.234567890123456789E-16,p=14`
 !-> MESSAGE/CONTINUE 1.2345678901235E-16
1.2345678901235E-16
say `1.234567890123456789E-16,p=15`
 !-> MESSAGE/CONTINUE 1.23456789012346E-16
1.23456789012346E-16
say `1.234567890123456789E-16,p=16`
 !-> MESSAGE/CONTINUE 1.234567890123457E-16
1.234567890123457E-16
 
say `1.234567890123456789E-15,p=-16`
 !-> MESSAGE/CONTINUE 0.0000000000000012
0.0000000000000012
say `1.234567890123456789E-15,p=-15`
 !-> MESSAGE/CONTINUE 0.000000000000001
0.000000000000001
say `1.234567890123456789E-15,p=-14`
 !-> MESSAGE/CONTINUE 0.00000000000000
0.00000000000000
say `1.234567890123456789E-15,p=-13`
 !-> MESSAGE/CONTINUE 0.0000000000000
0.0000000000000
say `1.234567890123456789E-15,p=-12`
 !-> MESSAGE/CONTINUE 0.000000000000
0.000000000000
say `1.234567890123456789E-15,p=-11`
 !-> MESSAGE/CONTINUE 0.00000000000
0.00000000000
say `1.234567890123456789E-15,p=-10`
 !-> MESSAGE/CONTINUE 0.0000000000
0.0000000000
say `1.234567890123456789E-15,p=-9`
 !-> MESSAGE/CONTINUE 0.000000000
0.000000000
say `1.234567890123456789E-15,p=-8`
 !-> MESSAGE/CONTINUE 0.00000000
0.00000000
say `1.234567890123456789E-15,p=-7`
 !-> MESSAGE/CONTINUE 0.0000000
0.0000000
say `1.234567890123456789E-15,p=-6`
 !-> MESSAGE/CONTINUE 0.000000
0.000000
say `1.234567890123456789E-15,p=-5`
 !-> MESSAGE/CONTINUE 0.00000
0.00000
say `1.234567890123456789E-15,p=-4`
 !-> MESSAGE/CONTINUE 0.0000
0.0000
say `1.234567890123456789E-15,p=-3`
 !-> MESSAGE/CONTINUE 0.000
0.000
say `1.234567890123456789E-15,p=-2`
 !-> MESSAGE/CONTINUE 0.00
0.00
say `1.234567890123456789E-15,p=-1`
 !-> MESSAGE/CONTINUE 0.0
0.0
say `1.234567890123456789E-15,p=0`
 !-> MESSAGE/CONTINUE 0
0
say `1.234567890123456789E-15,p=1`
 !-> MESSAGE/CONTINUE 1.E-15
1.E-15
say `1.234567890123456789E-15,p=2`
 !-> MESSAGE/CONTINUE 1.2E-15
1.2E-15
say `1.234567890123456789E-15,p=3`
 !-> MESSAGE/CONTINUE 1.23E-15
1.23E-15
say `1.234567890123456789E-15,p=4`
 !-> MESSAGE/CONTINUE 1.235E-15
1.235E-15
say `1.234567890123456789E-15,p=5`
 !-> MESSAGE/CONTINUE 1.2346E-15
1.2346E-15
say `1.234567890123456789E-15,p=6`
 !-> MESSAGE/CONTINUE 1.23457E-15
1.23457E-15
say `1.234567890123456789E-15,p=7`
 !-> MESSAGE/CONTINUE 1.234568E-15
1.234568E-15
say `1.234567890123456789E-15,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E-15
1.2345679E-15
say `1.234567890123456789E-15,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E-15
1.23456789E-15
say `1.234567890123456789E-15,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E-15
1.23456789E-15
say `1.234567890123456789E-15,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901E-15
1.2345678901E-15
say `1.234567890123456789E-15,p=12`
 !-> MESSAGE/CONTINUE 1.23456789012E-15
1.23456789012E-15
say `1.234567890123456789E-15,p=13`
 !-> MESSAGE/CONTINUE 1.234567890123E-15
1.234567890123E-15
say `1.234567890123456789E-15,p=14`
 !-> MESSAGE/CONTINUE 1.2345678901235E-15
1.2345678901235E-15
say `1.234567890123456789E-15,p=15`
 !-> MESSAGE/CONTINUE 1.23456789012346E-15
1.23456789012346E-15
say `1.234567890123456789E-15,p=16`
 !-> MESSAGE/CONTINUE 1.234567890123457E-15
1.234567890123457E-15
 
say `1.234567890123456789E-14,p=-16`
 !-> MESSAGE/CONTINUE 0.0000000000000123
0.0000000000000123
say `1.234567890123456789E-14,p=-15`
 !-> MESSAGE/CONTINUE 0.000000000000012
0.000000000000012
say `1.234567890123456789E-14,p=-14`
 !-> MESSAGE/CONTINUE 0.00000000000001
0.00000000000001
say `1.234567890123456789E-14,p=-13`
 !-> MESSAGE/CONTINUE 0.0000000000000
0.0000000000000
say `1.234567890123456789E-14,p=-12`
 !-> MESSAGE/CONTINUE 0.000000000000
0.000000000000
say `1.234567890123456789E-14,p=-11`
 !-> MESSAGE/CONTINUE 0.00000000000
0.00000000000
say `1.234567890123456789E-14,p=-10`
 !-> MESSAGE/CONTINUE 0.0000000000
0.0000000000
say `1.234567890123456789E-14,p=-9`
 !-> MESSAGE/CONTINUE 0.000000000
0.000000000
say `1.234567890123456789E-14,p=-8`
 !-> MESSAGE/CONTINUE 0.00000000
0.00000000
say `1.234567890123456789E-14,p=-7`
 !-> MESSAGE/CONTINUE 0.0000000
0.0000000
say `1.234567890123456789E-14,p=-6`
 !-> MESSAGE/CONTINUE 0.000000
0.000000
say `1.234567890123456789E-14,p=-5`
 !-> MESSAGE/CONTINUE 0.00000
0.00000
say `1.234567890123456789E-14,p=-4`
 !-> MESSAGE/CONTINUE 0.0000
0.0000
say `1.234567890123456789E-14,p=-3`
 !-> MESSAGE/CONTINUE 0.000
0.000
say `1.234567890123456789E-14,p=-2`
 !-> MESSAGE/CONTINUE 0.00
0.00
say `1.234567890123456789E-14,p=-1`
 !-> MESSAGE/CONTINUE 0.0
0.0
say `1.234567890123456789E-14,p=0`
 !-> MESSAGE/CONTINUE 0
0
say `1.234567890123456789E-14,p=1`
 !-> MESSAGE/CONTINUE 1.E-14
1.E-14
say `1.234567890123456789E-14,p=2`
 !-> MESSAGE/CONTINUE 1.2E-14
1.2E-14
say `1.234567890123456789E-14,p=3`
 !-> MESSAGE/CONTINUE 1.23E-14
1.23E-14
say `1.234567890123456789E-14,p=4`
 !-> MESSAGE/CONTINUE 1.235E-14
1.235E-14
say `1.234567890123456789E-14,p=5`
 !-> MESSAGE/CONTINUE 1.2346E-14
1.2346E-14
say `1.234567890123456789E-14,p=6`
 !-> MESSAGE/CONTINUE 1.23457E-14
1.23457E-14
say `1.234567890123456789E-14,p=7`
 !-> MESSAGE/CONTINUE 1.234568E-14
1.234568E-14
say `1.234567890123456789E-14,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E-14
1.2345679E-14
say `1.234567890123456789E-14,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E-14
1.23456789E-14
say `1.234567890123456789E-14,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E-14
1.23456789E-14
say `1.234567890123456789E-14,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901E-14
1.2345678901E-14
say `1.234567890123456789E-14,p=12`
 !-> MESSAGE/CONTINUE 1.23456789012E-14
1.23456789012E-14
say `1.234567890123456789E-14,p=13`
 !-> MESSAGE/CONTINUE 1.234567890123E-14
1.234567890123E-14
say `1.234567890123456789E-14,p=14`
 !-> MESSAGE/CONTINUE 1.2345678901235E-14
1.2345678901235E-14
say `1.234567890123456789E-14,p=15`
 !-> MESSAGE/CONTINUE 1.23456789012346E-14
1.23456789012346E-14
say `1.234567890123456789E-14,p=16`
 !-> MESSAGE/CONTINUE 1.234567890123457E-14
1.234567890123457E-14
 
say `1.234567890123456789E-13,p=-16`
 !-> MESSAGE/CONTINUE 0.0000000000001235
0.0000000000001235
say `1.234567890123456789E-13,p=-15`
 !-> MESSAGE/CONTINUE 0.000000000000123
0.000000000000123
say `1.234567890123456789E-13,p=-14`
 !-> MESSAGE/CONTINUE 0.00000000000012
0.00000000000012
say `1.234567890123456789E-13,p=-13`
 !-> MESSAGE/CONTINUE 0.0000000000001
0.0000000000001
say `1.234567890123456789E-13,p=-12`
 !-> MESSAGE/CONTINUE 0.000000000000
0.000000000000
say `1.234567890123456789E-13,p=-11`
 !-> MESSAGE/CONTINUE 0.00000000000
0.00000000000
say `1.234567890123456789E-13,p=-10`
 !-> MESSAGE/CONTINUE 0.0000000000
0.0000000000
say `1.234567890123456789E-13,p=-9`
 !-> MESSAGE/CONTINUE 0.000000000
0.000000000
say `1.234567890123456789E-13,p=-8`
 !-> MESSAGE/CONTINUE 0.00000000
0.00000000
say `1.234567890123456789E-13,p=-7`
 !-> MESSAGE/CONTINUE 0.0000000
0.0000000
say `1.234567890123456789E-13,p=-6`
 !-> MESSAGE/CONTINUE 0.000000
0.000000
say `1.234567890123456789E-13,p=-5`
 !-> MESSAGE/CONTINUE 0.00000
0.00000
say `1.234567890123456789E-13,p=-4`
 !-> MESSAGE/CONTINUE 0.0000
0.0000
say `1.234567890123456789E-13,p=-3`
 !-> MESSAGE/CONTINUE 0.000
0.000
say `1.234567890123456789E-13,p=-2`
 !-> MESSAGE/CONTINUE 0.00
0.00
say `1.234567890123456789E-13,p=-1`
 !-> MESSAGE/CONTINUE 0.0
0.0
say `1.234567890123456789E-13,p=0`
 !-> MESSAGE/CONTINUE 0
0
say `1.234567890123456789E-13,p=1`
 !-> MESSAGE/CONTINUE 1.E-13
1.E-13
say `1.234567890123456789E-13,p=2`
 !-> MESSAGE/CONTINUE 1.2E-13
1.2E-13
say `1.234567890123456789E-13,p=3`
 !-> MESSAGE/CONTINUE 1.23E-13
1.23E-13
say `1.234567890123456789E-13,p=4`
 !-> MESSAGE/CONTINUE 1.235E-13
1.235E-13
say `1.234567890123456789E-13,p=5`
 !-> MESSAGE/CONTINUE 1.2346E-13
1.2346E-13
say `1.234567890123456789E-13,p=6`
 !-> MESSAGE/CONTINUE 1.23457E-13
1.23457E-13
say `1.234567890123456789E-13,p=7`
 !-> MESSAGE/CONTINUE 1.234568E-13
1.234568E-13
say `1.234567890123456789E-13,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E-13
1.2345679E-13
say `1.234567890123456789E-13,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E-13
1.23456789E-13
say `1.234567890123456789E-13,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E-13
1.23456789E-13
say `1.234567890123456789E-13,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901E-13
1.2345678901E-13
say `1.234567890123456789E-13,p=12`
 !-> MESSAGE/CONTINUE 1.23456789012E-13
1.23456789012E-13
say `1.234567890123456789E-13,p=13`
 !-> MESSAGE/CONTINUE 1.234567890123E-13
1.234567890123E-13
say `1.234567890123456789E-13,p=14`
 !-> MESSAGE/CONTINUE 1.2345678901235E-13
1.2345678901235E-13
say `1.234567890123456789E-13,p=15`
 !-> MESSAGE/CONTINUE 1.23456789012346E-13
1.23456789012346E-13
say `1.234567890123456789E-13,p=16`
 !-> MESSAGE/CONTINUE 1.234567890123457E-13
1.234567890123457E-13
 
say `1.234567890123456789E-12,p=-16`
 !-> MESSAGE/CONTINUE 0.0000000000012346
0.0000000000012346
say `1.234567890123456789E-12,p=-15`
 !-> MESSAGE/CONTINUE 0.000000000001235
0.000000000001235
say `1.234567890123456789E-12,p=-14`
 !-> MESSAGE/CONTINUE 0.00000000000123
0.00000000000123
say `1.234567890123456789E-12,p=-13`
 !-> MESSAGE/CONTINUE 0.0000000000012
0.0000000000012
say `1.234567890123456789E-12,p=-12`
 !-> MESSAGE/CONTINUE 0.000000000001
0.000000000001
say `1.234567890123456789E-12,p=-11`
 !-> MESSAGE/CONTINUE 0.00000000000
0.00000000000
say `1.234567890123456789E-12,p=-10`
 !-> MESSAGE/CONTINUE 0.0000000000
0.0000000000
say `1.234567890123456789E-12,p=-9`
 !-> MESSAGE/CONTINUE 0.000000000
0.000000000
say `1.234567890123456789E-12,p=-8`
 !-> MESSAGE/CONTINUE 0.00000000
0.00000000
say `1.234567890123456789E-12,p=-7`
 !-> MESSAGE/CONTINUE 0.0000000
0.0000000
say `1.234567890123456789E-12,p=-6`
 !-> MESSAGE/CONTINUE 0.000000
0.000000
say `1.234567890123456789E-12,p=-5`
 !-> MESSAGE/CONTINUE 0.00000
0.00000
say `1.234567890123456789E-12,p=-4`
 !-> MESSAGE/CONTINUE 0.0000
0.0000
say `1.234567890123456789E-12,p=-3`
 !-> MESSAGE/CONTINUE 0.000
0.000
say `1.234567890123456789E-12,p=-2`
 !-> MESSAGE/CONTINUE 0.00
0.00
say `1.234567890123456789E-12,p=-1`
 !-> MESSAGE/CONTINUE 0.0
0.0
say `1.234567890123456789E-12,p=0`
 !-> MESSAGE/CONTINUE 0
0
say `1.234567890123456789E-12,p=1`
 !-> MESSAGE/CONTINUE 1.E-12
1.E-12
say `1.234567890123456789E-12,p=2`
 !-> MESSAGE/CONTINUE 1.2E-12
1.2E-12
say `1.234567890123456789E-12,p=3`
 !-> MESSAGE/CONTINUE 1.23E-12
1.23E-12
say `1.234567890123456789E-12,p=4`
 !-> MESSAGE/CONTINUE 1.235E-12
1.235E-12
say `1.234567890123456789E-12,p=5`
 !-> MESSAGE/CONTINUE 1.2346E-12
1.2346E-12
say `1.234567890123456789E-12,p=6`
 !-> MESSAGE/CONTINUE 1.23457E-12
1.23457E-12
say `1.234567890123456789E-12,p=7`
 !-> MESSAGE/CONTINUE 1.234568E-12
1.234568E-12
say `1.234567890123456789E-12,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E-12
1.2345679E-12
say `1.234567890123456789E-12,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E-12
1.23456789E-12
say `1.234567890123456789E-12,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E-12
1.23456789E-12
say `1.234567890123456789E-12,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901E-12
1.2345678901E-12
say `1.234567890123456789E-12,p=12`
 !-> MESSAGE/CONTINUE 1.23456789012E-12
1.23456789012E-12
say `1.234567890123456789E-12,p=13`
 !-> MESSAGE/CONTINUE 1.234567890123E-12
1.234567890123E-12
say `1.234567890123456789E-12,p=14`
 !-> MESSAGE/CONTINUE 1.2345678901235E-12
1.2345678901235E-12
say `1.234567890123456789E-12,p=15`
 !-> MESSAGE/CONTINUE 1.23456789012346E-12
1.23456789012346E-12
say `1.234567890123456789E-12,p=16`
 !-> MESSAGE/CONTINUE 1.234567890123457E-12
1.234567890123457E-12
 
say `1.234567890123456789E-11,p=-16`
 !-> MESSAGE/CONTINUE 0.0000000000123457
0.0000000000123457
say `1.234567890123456789E-11,p=-15`
 !-> MESSAGE/CONTINUE 0.000000000012346
0.000000000012346
say `1.234567890123456789E-11,p=-14`
 !-> MESSAGE/CONTINUE 0.00000000001235
0.00000000001235
say `1.234567890123456789E-11,p=-13`
 !-> MESSAGE/CONTINUE 0.0000000000123
0.0000000000123
say `1.234567890123456789E-11,p=-12`
 !-> MESSAGE/CONTINUE 0.000000000012
0.000000000012
say `1.234567890123456789E-11,p=-11`
 !-> MESSAGE/CONTINUE 0.00000000001
0.00000000001
say `1.234567890123456789E-11,p=-10`
 !-> MESSAGE/CONTINUE 0.0000000000
0.0000000000
say `1.234567890123456789E-11,p=-9`
 !-> MESSAGE/CONTINUE 0.000000000
0.000000000
say `1.234567890123456789E-11,p=-8`
 !-> MESSAGE/CONTINUE 0.00000000
0.00000000
say `1.234567890123456789E-11,p=-7`
 !-> MESSAGE/CONTINUE 0.0000000
0.0000000
say `1.234567890123456789E-11,p=-6`
 !-> MESSAGE/CONTINUE 0.000000
0.000000
say `1.234567890123456789E-11,p=-5`
 !-> MESSAGE/CONTINUE 0.00000
0.00000
say `1.234567890123456789E-11,p=-4`
 !-> MESSAGE/CONTINUE 0.0000
0.0000
say `1.234567890123456789E-11,p=-3`
 !-> MESSAGE/CONTINUE 0.000
0.000
say `1.234567890123456789E-11,p=-2`
 !-> MESSAGE/CONTINUE 0.00
0.00
say `1.234567890123456789E-11,p=-1`
 !-> MESSAGE/CONTINUE 0.0
0.0
say `1.234567890123456789E-11,p=0`
 !-> MESSAGE/CONTINUE 0
0
say `1.234567890123456789E-11,p=1`
 !-> MESSAGE/CONTINUE 1.E-11
1.E-11
say `1.234567890123456789E-11,p=2`
 !-> MESSAGE/CONTINUE 1.2E-11
1.2E-11
say `1.234567890123456789E-11,p=3`
 !-> MESSAGE/CONTINUE 1.23E-11
1.23E-11
say `1.234567890123456789E-11,p=4`
 !-> MESSAGE/CONTINUE 1.235E-11
1.235E-11
say `1.234567890123456789E-11,p=5`
 !-> MESSAGE/CONTINUE 1.2346E-11
1.2346E-11
say `1.234567890123456789E-11,p=6`
 !-> MESSAGE/CONTINUE 1.23457E-11
1.23457E-11
say `1.234567890123456789E-11,p=7`
 !-> MESSAGE/CONTINUE 1.234568E-11
1.234568E-11
say `1.234567890123456789E-11,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E-11
1.2345679E-11
say `1.234567890123456789E-11,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E-11
1.23456789E-11
say `1.234567890123456789E-11,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E-11
1.23456789E-11
say `1.234567890123456789E-11,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901E-11
1.2345678901E-11
say `1.234567890123456789E-11,p=12`
 !-> MESSAGE/CONTINUE 1.23456789012E-11
1.23456789012E-11
say `1.234567890123456789E-11,p=13`
 !-> MESSAGE/CONTINUE 1.234567890123E-11
1.234567890123E-11
say `1.234567890123456789E-11,p=14`
 !-> MESSAGE/CONTINUE 1.2345678901235E-11
1.2345678901235E-11
say `1.234567890123456789E-11,p=15`
 !-> MESSAGE/CONTINUE 1.23456789012346E-11
1.23456789012346E-11
say `1.234567890123456789E-11,p=16`
 !-> MESSAGE/CONTINUE 1.234567890123457E-11
1.234567890123457E-11
 
say `1.234567890123456789E-10,p=-16`
 !-> MESSAGE/CONTINUE 0.0000000001234568
0.0000000001234568
say `1.234567890123456789E-10,p=-15`
 !-> MESSAGE/CONTINUE 0.000000000123457
0.000000000123457
say `1.234567890123456789E-10,p=-14`
 !-> MESSAGE/CONTINUE 0.00000000012346
0.00000000012346
say `1.234567890123456789E-10,p=-13`
 !-> MESSAGE/CONTINUE 0.0000000001235
0.0000000001235
say `1.234567890123456789E-10,p=-12`
 !-> MESSAGE/CONTINUE 0.000000000123
0.000000000123
say `1.234567890123456789E-10,p=-11`
 !-> MESSAGE/CONTINUE 0.00000000012
0.00000000012
say `1.234567890123456789E-10,p=-10`
 !-> MESSAGE/CONTINUE 0.0000000001
0.0000000001
say `1.234567890123456789E-10,p=-9`
 !-> MESSAGE/CONTINUE 0.000000000
0.000000000
say `1.234567890123456789E-10,p=-8`
 !-> MESSAGE/CONTINUE 0.00000000
0.00000000
say `1.234567890123456789E-10,p=-7`
 !-> MESSAGE/CONTINUE 0.0000000
0.0000000
say `1.234567890123456789E-10,p=-6`
 !-> MESSAGE/CONTINUE 0.000000
0.000000
say `1.234567890123456789E-10,p=-5`
 !-> MESSAGE/CONTINUE 0.00000
0.00000
say `1.234567890123456789E-10,p=-4`
 !-> MESSAGE/CONTINUE 0.0000
0.0000
say `1.234567890123456789E-10,p=-3`
 !-> MESSAGE/CONTINUE 0.000
0.000
say `1.234567890123456789E-10,p=-2`
 !-> MESSAGE/CONTINUE 0.00
0.00
say `1.234567890123456789E-10,p=-1`
 !-> MESSAGE/CONTINUE 0.0
0.0
say `1.234567890123456789E-10,p=0`
 !-> MESSAGE/CONTINUE 0
0
say `1.234567890123456789E-10,p=1`
 !-> MESSAGE/CONTINUE 1.E-10
1.E-10
say `1.234567890123456789E-10,p=2`
 !-> MESSAGE/CONTINUE 1.2E-10
1.2E-10
say `1.234567890123456789E-10,p=3`
 !-> MESSAGE/CONTINUE 1.23E-10
1.23E-10
say `1.234567890123456789E-10,p=4`
 !-> MESSAGE/CONTINUE 1.235E-10
1.235E-10
say `1.234567890123456789E-10,p=5`
 !-> MESSAGE/CONTINUE 1.2346E-10
1.2346E-10
say `1.234567890123456789E-10,p=6`
 !-> MESSAGE/CONTINUE 1.23457E-10
1.23457E-10
say `1.234567890123456789E-10,p=7`
 !-> MESSAGE/CONTINUE 1.234568E-10
1.234568E-10
say `1.234567890123456789E-10,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E-10
1.2345679E-10
say `1.234567890123456789E-10,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E-10
1.23456789E-10
say `1.234567890123456789E-10,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E-10
1.23456789E-10
say `1.234567890123456789E-10,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901E-10
1.2345678901E-10
say `1.234567890123456789E-10,p=12`
 !-> MESSAGE/CONTINUE 1.23456789012E-10
1.23456789012E-10
say `1.234567890123456789E-10,p=13`
 !-> MESSAGE/CONTINUE 1.234567890123E-10
1.234567890123E-10
say `1.234567890123456789E-10,p=14`
 !-> MESSAGE/CONTINUE 1.2345678901235E-10
1.2345678901235E-10
say `1.234567890123456789E-10,p=15`
 !-> MESSAGE/CONTINUE 1.23456789012346E-10
1.23456789012346E-10
say `1.234567890123456789E-10,p=16`
 !-> MESSAGE/CONTINUE 1.234567890123457E-10
1.234567890123457E-10
 
say `1.234567890123456789E-9,p=-16`
 !-> MESSAGE/CONTINUE 0.0000000012345679
0.0000000012345679
say `1.234567890123456789E-9,p=-15`
 !-> MESSAGE/CONTINUE 0.000000001234568
0.000000001234568
say `1.234567890123456789E-9,p=-14`
 !-> MESSAGE/CONTINUE 0.00000000123457
0.00000000123457
say `1.234567890123456789E-9,p=-13`
 !-> MESSAGE/CONTINUE 0.0000000012346
0.0000000012346
say `1.234567890123456789E-9,p=-12`
 !-> MESSAGE/CONTINUE 0.000000001235
0.000000001235
say `1.234567890123456789E-9,p=-11`
 !-> MESSAGE/CONTINUE 0.00000000123
0.00000000123
say `1.234567890123456789E-9,p=-10`
 !-> MESSAGE/CONTINUE 0.0000000012
0.0000000012
say `1.234567890123456789E-9,p=-9`
 !-> MESSAGE/CONTINUE 0.000000001
0.000000001
say `1.234567890123456789E-9,p=-8`
 !-> MESSAGE/CONTINUE 0.00000000
0.00000000
say `1.234567890123456789E-9,p=-7`
 !-> MESSAGE/CONTINUE 0.0000000
0.0000000
say `1.234567890123456789E-9,p=-6`
 !-> MESSAGE/CONTINUE 0.000000
0.000000
say `1.234567890123456789E-9,p=-5`
 !-> MESSAGE/CONTINUE 0.00000
0.00000
say `1.234567890123456789E-9,p=-4`
 !-> MESSAGE/CONTINUE 0.0000
0.0000
say `1.234567890123456789E-9,p=-3`
 !-> MESSAGE/CONTINUE 0.000
0.000
say `1.234567890123456789E-9,p=-2`
 !-> MESSAGE/CONTINUE 0.00
0.00
say `1.234567890123456789E-9,p=-1`
 !-> MESSAGE/CONTINUE 0.0
0.0
say `1.234567890123456789E-9,p=0`
 !-> MESSAGE/CONTINUE 0
0
say `1.234567890123456789E-9,p=1`
 !-> MESSAGE/CONTINUE 1.E-09
1.E-09
say `1.234567890123456789E-9,p=2`
 !-> MESSAGE/CONTINUE 1.2E-09
1.2E-09
say `1.234567890123456789E-9,p=3`
 !-> MESSAGE/CONTINUE 1.23E-09
1.23E-09
say `1.234567890123456789E-9,p=4`
 !-> MESSAGE/CONTINUE 1.235E-09
1.235E-09
say `1.234567890123456789E-9,p=5`
 !-> MESSAGE/CONTINUE 1.2346E-09
1.2346E-09
say `1.234567890123456789E-9,p=6`
 !-> MESSAGE/CONTINUE 1.23457E-09
1.23457E-09
say `1.234567890123456789E-9,p=7`
 !-> MESSAGE/CONTINUE 1.234568E-09
1.234568E-09
say `1.234567890123456789E-9,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E-09
1.2345679E-09
say `1.234567890123456789E-9,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E-09
1.23456789E-09
say `1.234567890123456789E-9,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E-09
1.23456789E-09
say `1.234567890123456789E-9,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901E-09
1.2345678901E-09
say `1.234567890123456789E-9,p=12`
 !-> MESSAGE/CONTINUE 1.23456789012E-09
1.23456789012E-09
say `1.234567890123456789E-9,p=13`
 !-> MESSAGE/CONTINUE 1.234567890123E-09
1.234567890123E-09
say `1.234567890123456789E-9,p=14`
 !-> MESSAGE/CONTINUE 1.2345678901235E-09
1.2345678901235E-09
say `1.234567890123456789E-9,p=15`
 !-> MESSAGE/CONTINUE 1.23456789012346E-09
1.23456789012346E-09
say `1.234567890123456789E-9,p=16`
 !-> MESSAGE/CONTINUE 1.234567890123457E-09
1.234567890123457E-09
 
say `1.234567890123456789E-8,p=-16`
 !-> MESSAGE/CONTINUE 0.0000000123456789
0.0000000123456789
say `1.234567890123456789E-8,p=-15`
 !-> MESSAGE/CONTINUE 0.000000012345679
0.000000012345679
say `1.234567890123456789E-8,p=-14`
 !-> MESSAGE/CONTINUE 0.00000001234568
0.00000001234568
say `1.234567890123456789E-8,p=-13`
 !-> MESSAGE/CONTINUE 0.0000000123457
0.0000000123457
say `1.234567890123456789E-8,p=-12`
 !-> MESSAGE/CONTINUE 0.000000012346
0.000000012346
say `1.234567890123456789E-8,p=-11`
 !-> MESSAGE/CONTINUE 0.00000001235
0.00000001235
say `1.234567890123456789E-8,p=-10`
 !-> MESSAGE/CONTINUE 0.0000000123
0.0000000123
say `1.234567890123456789E-8,p=-9`
 !-> MESSAGE/CONTINUE 0.000000012
0.000000012
say `1.234567890123456789E-8,p=-8`
 !-> MESSAGE/CONTINUE 0.00000001
0.00000001
say `1.234567890123456789E-8,p=-7`
 !-> MESSAGE/CONTINUE 0.0000000
0.0000000
say `1.234567890123456789E-8,p=-6`
 !-> MESSAGE/CONTINUE 0.000000
0.000000
say `1.234567890123456789E-8,p=-5`
 !-> MESSAGE/CONTINUE 0.00000
0.00000
say `1.234567890123456789E-8,p=-4`
 !-> MESSAGE/CONTINUE 0.0000
0.0000
say `1.234567890123456789E-8,p=-3`
 !-> MESSAGE/CONTINUE 0.000
0.000
say `1.234567890123456789E-8,p=-2`
 !-> MESSAGE/CONTINUE 0.00
0.00
say `1.234567890123456789E-8,p=-1`
 !-> MESSAGE/CONTINUE 0.0
0.0
say `1.234567890123456789E-8,p=0`
 !-> MESSAGE/CONTINUE 0
0
say `1.234567890123456789E-8,p=1`
 !-> MESSAGE/CONTINUE 1.E-08
1.E-08
say `1.234567890123456789E-8,p=2`
 !-> MESSAGE/CONTINUE 1.2E-08
1.2E-08
say `1.234567890123456789E-8,p=3`
 !-> MESSAGE/CONTINUE 1.23E-08
1.23E-08
say `1.234567890123456789E-8,p=4`
 !-> MESSAGE/CONTINUE 1.235E-08
1.235E-08
say `1.234567890123456789E-8,p=5`
 !-> MESSAGE/CONTINUE 1.2346E-08
1.2346E-08
say `1.234567890123456789E-8,p=6`
 !-> MESSAGE/CONTINUE 1.23457E-08
1.23457E-08
say `1.234567890123456789E-8,p=7`
 !-> MESSAGE/CONTINUE 1.234568E-08
1.234568E-08
say `1.234567890123456789E-8,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E-08
1.2345679E-08
say `1.234567890123456789E-8,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E-08
1.23456789E-08
say `1.234567890123456789E-8,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E-08
1.23456789E-08
say `1.234567890123456789E-8,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901E-08
1.2345678901E-08
say `1.234567890123456789E-8,p=12`
 !-> MESSAGE/CONTINUE 1.23456789012E-08
1.23456789012E-08
say `1.234567890123456789E-8,p=13`
 !-> MESSAGE/CONTINUE 1.234567890123E-08
1.234567890123E-08
say `1.234567890123456789E-8,p=14`
 !-> MESSAGE/CONTINUE 1.2345678901235E-08
1.2345678901235E-08
say `1.234567890123456789E-8,p=15`
 !-> MESSAGE/CONTINUE 1.23456789012346E-08
1.23456789012346E-08
say `1.234567890123456789E-8,p=16`
 !-> MESSAGE/CONTINUE 1.234567890123457E-08
1.234567890123457E-08
 
say `1.234567890123456789E-7,p=-16`
 !-> MESSAGE/CONTINUE 0.0000001234567890
0.0000001234567890
say `1.234567890123456789E-7,p=-15`
 !-> MESSAGE/CONTINUE 0.000000123456789
0.000000123456789
say `1.234567890123456789E-7,p=-14`
 !-> MESSAGE/CONTINUE 0.00000012345679
0.00000012345679
say `1.234567890123456789E-7,p=-13`
 !-> MESSAGE/CONTINUE 0.0000001234568
0.0000001234568
say `1.234567890123456789E-7,p=-12`
 !-> MESSAGE/CONTINUE 0.000000123457
0.000000123457
say `1.234567890123456789E-7,p=-11`
 !-> MESSAGE/CONTINUE 0.00000012346
0.00000012346
say `1.234567890123456789E-7,p=-10`
 !-> MESSAGE/CONTINUE 0.0000001235
0.0000001235
say `1.234567890123456789E-7,p=-9`
 !-> MESSAGE/CONTINUE 0.000000123
0.000000123
say `1.234567890123456789E-7,p=-8`
 !-> MESSAGE/CONTINUE 0.00000012
0.00000012
say `1.234567890123456789E-7,p=-7`
 !-> MESSAGE/CONTINUE 0.0000001
0.0000001
say `1.234567890123456789E-7,p=-6`
 !-> MESSAGE/CONTINUE 0.000000
0.000000
say `1.234567890123456789E-7,p=-5`
 !-> MESSAGE/CONTINUE 0.00000
0.00000
say `1.234567890123456789E-7,p=-4`
 !-> MESSAGE/CONTINUE 0.0000
0.0000
say `1.234567890123456789E-7,p=-3`
 !-> MESSAGE/CONTINUE 0.000
0.000
say `1.234567890123456789E-7,p=-2`
 !-> MESSAGE/CONTINUE 0.00
0.00
say `1.234567890123456789E-7,p=-1`
 !-> MESSAGE/CONTINUE 0.0
0.0
say `1.234567890123456789E-7,p=0`
 !-> MESSAGE/CONTINUE 0
0
say `1.234567890123456789E-7,p=1`
 !-> MESSAGE/CONTINUE 1.E-07
1.E-07
say `1.234567890123456789E-7,p=2`
 !-> MESSAGE/CONTINUE 1.2E-07
1.2E-07
say `1.234567890123456789E-7,p=3`
 !-> MESSAGE/CONTINUE 1.23E-07
1.23E-07
say `1.234567890123456789E-7,p=4`
 !-> MESSAGE/CONTINUE 1.235E-07
1.235E-07
say `1.234567890123456789E-7,p=5`
 !-> MESSAGE/CONTINUE 1.2346E-07
1.2346E-07
say `1.234567890123456789E-7,p=6`
 !-> MESSAGE/CONTINUE 1.23457E-07
1.23457E-07
say `1.234567890123456789E-7,p=7`
 !-> MESSAGE/CONTINUE 1.234568E-07
1.234568E-07
say `1.234567890123456789E-7,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E-07
1.2345679E-07
say `1.234567890123456789E-7,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E-07
1.23456789E-07
say `1.234567890123456789E-7,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E-07
1.23456789E-07
say `1.234567890123456789E-7,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901E-07
1.2345678901E-07
say `1.234567890123456789E-7,p=12`
 !-> MESSAGE/CONTINUE 1.23456789012E-07
1.23456789012E-07
say `1.234567890123456789E-7,p=13`
 !-> MESSAGE/CONTINUE 1.234567890123E-07
1.234567890123E-07
say `1.234567890123456789E-7,p=14`
 !-> MESSAGE/CONTINUE 1.2345678901235E-07
1.2345678901235E-07
say `1.234567890123456789E-7,p=15`
 !-> MESSAGE/CONTINUE 1.23456789012346E-07
1.23456789012346E-07
say `1.234567890123456789E-7,p=16`
 !-> MESSAGE/CONTINUE 1.234567890123457E-07
1.234567890123457E-07
 
say `1.234567890123456789E-6,p=-16`
 !-> MESSAGE/CONTINUE 0.0000012345678901
0.0000012345678901
say `1.234567890123456789E-6,p=-15`
 !-> MESSAGE/CONTINUE 0.000001234567890
0.000001234567890
say `1.234567890123456789E-6,p=-14`
 !-> MESSAGE/CONTINUE 0.00000123456789
0.00000123456789
say `1.234567890123456789E-6,p=-13`
 !-> MESSAGE/CONTINUE 0.0000012345679
0.0000012345679
say `1.234567890123456789E-6,p=-12`
 !-> MESSAGE/CONTINUE 0.000001234568
0.000001234568
say `1.234567890123456789E-6,p=-11`
 !-> MESSAGE/CONTINUE 0.00000123457
0.00000123457
say `1.234567890123456789E-6,p=-10`
 !-> MESSAGE/CONTINUE 0.0000012346
0.0000012346
say `1.234567890123456789E-6,p=-9`
 !-> MESSAGE/CONTINUE 0.000001235
0.000001235
say `1.234567890123456789E-6,p=-8`
 !-> MESSAGE/CONTINUE 0.00000123
0.00000123
say `1.234567890123456789E-6,p=-7`
 !-> MESSAGE/CONTINUE 0.0000012
0.0000012
say `1.234567890123456789E-6,p=-6`
 !-> MESSAGE/CONTINUE 0.000001
0.000001
say `1.234567890123456789E-6,p=-5`
 !-> MESSAGE/CONTINUE 0.00000
0.00000
say `1.234567890123456789E-6,p=-4`
 !-> MESSAGE/CONTINUE 0.0000
0.0000
say `1.234567890123456789E-6,p=-3`
 !-> MESSAGE/CONTINUE 0.000
0.000
say `1.234567890123456789E-6,p=-2`
 !-> MESSAGE/CONTINUE 0.00
0.00
say `1.234567890123456789E-6,p=-1`
 !-> MESSAGE/CONTINUE 0.0
0.0
say `1.234567890123456789E-6,p=0`
 !-> MESSAGE/CONTINUE 0
0
say `1.234567890123456789E-6,p=1`
 !-> MESSAGE/CONTINUE 1.E-06
1.E-06
say `1.234567890123456789E-6,p=2`
 !-> MESSAGE/CONTINUE 1.2E-06
1.2E-06
say `1.234567890123456789E-6,p=3`
 !-> MESSAGE/CONTINUE 1.23E-06
1.23E-06
say `1.234567890123456789E-6,p=4`
 !-> MESSAGE/CONTINUE 1.235E-06
1.235E-06
say `1.234567890123456789E-6,p=5`
 !-> MESSAGE/CONTINUE 1.2346E-06
1.2346E-06
say `1.234567890123456789E-6,p=6`
 !-> MESSAGE/CONTINUE 1.23457E-06
1.23457E-06
say `1.234567890123456789E-6,p=7`
 !-> MESSAGE/CONTINUE 1.234568E-06
1.234568E-06
say `1.234567890123456789E-6,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E-06
1.2345679E-06
say `1.234567890123456789E-6,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E-06
1.23456789E-06
say `1.234567890123456789E-6,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E-06
1.23456789E-06
say `1.234567890123456789E-6,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901E-06
1.2345678901E-06
say `1.234567890123456789E-6,p=12`
 !-> MESSAGE/CONTINUE 1.23456789012E-06
1.23456789012E-06
say `1.234567890123456789E-6,p=13`
 !-> MESSAGE/CONTINUE 1.234567890123E-06
1.234567890123E-06
say `1.234567890123456789E-6,p=14`
 !-> MESSAGE/CONTINUE 1.2345678901235E-06
1.2345678901235E-06
say `1.234567890123456789E-6,p=15`
 !-> MESSAGE/CONTINUE 1.23456789012346E-06
1.23456789012346E-06
say `1.234567890123456789E-6,p=16`
 !-> MESSAGE/CONTINUE 1.234567890123457E-06
1.234567890123457E-06
 
say `1.234567890123456789E-5,p=-16`
 !-> MESSAGE/CONTINUE 0.0000123456789012
0.0000123456789012
say `1.234567890123456789E-5,p=-15`
 !-> MESSAGE/CONTINUE 0.000012345678901
0.000012345678901
say `1.234567890123456789E-5,p=-14`
 !-> MESSAGE/CONTINUE 0.00001234567890
0.00001234567890
say `1.234567890123456789E-5,p=-13`
 !-> MESSAGE/CONTINUE 0.0000123456789
0.0000123456789
say `1.234567890123456789E-5,p=-12`
 !-> MESSAGE/CONTINUE 0.000012345679
0.000012345679
say `1.234567890123456789E-5,p=-11`
 !-> MESSAGE/CONTINUE 0.00001234568
0.00001234568
say `1.234567890123456789E-5,p=-10`
 !-> MESSAGE/CONTINUE 0.0000123457
0.0000123457
say `1.234567890123456789E-5,p=-9`
 !-> MESSAGE/CONTINUE 0.000012346
0.000012346
say `1.234567890123456789E-5,p=-8`
 !-> MESSAGE/CONTINUE 0.00001235
0.00001235
say `1.234567890123456789E-5,p=-7`
 !-> MESSAGE/CONTINUE 0.0000123
0.0000123
say `1.234567890123456789E-5,p=-6`
 !-> MESSAGE/CONTINUE 0.000012
0.000012
say `1.234567890123456789E-5,p=-5`
 !-> MESSAGE/CONTINUE 0.00001
0.00001
say `1.234567890123456789E-5,p=-4`
 !-> MESSAGE/CONTINUE 0.0000
0.0000
say `1.234567890123456789E-5,p=-3`
 !-> MESSAGE/CONTINUE 0.000
0.000
say `1.234567890123456789E-5,p=-2`
 !-> MESSAGE/CONTINUE 0.00
0.00
say `1.234567890123456789E-5,p=-1`
 !-> MESSAGE/CONTINUE 0.0
0.0
say `1.234567890123456789E-5,p=0`
 !-> MESSAGE/CONTINUE 0
0
say `1.234567890123456789E-5,p=1`
 !-> MESSAGE/CONTINUE 1.E-05
1.E-05
say `1.234567890123456789E-5,p=2`
 !-> MESSAGE/CONTINUE 1.2E-05
1.2E-05
say `1.234567890123456789E-5,p=3`
 !-> MESSAGE/CONTINUE 1.23E-05
1.23E-05
say `1.234567890123456789E-5,p=4`
 !-> MESSAGE/CONTINUE 1.235E-05
1.235E-05
say `1.234567890123456789E-5,p=5`
 !-> MESSAGE/CONTINUE 1.2346E-05
1.2346E-05
say `1.234567890123456789E-5,p=6`
 !-> MESSAGE/CONTINUE 1.23457E-05
1.23457E-05
say `1.234567890123456789E-5,p=7`
 !-> MESSAGE/CONTINUE 1.234568E-05
1.234568E-05
say `1.234567890123456789E-5,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E-05
1.2345679E-05
say `1.234567890123456789E-5,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E-05
1.23456789E-05
say `1.234567890123456789E-5,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E-05
1.23456789E-05
say `1.234567890123456789E-5,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901E-05
1.2345678901E-05
say `1.234567890123456789E-5,p=12`
 !-> MESSAGE/CONTINUE 1.23456789012E-05
1.23456789012E-05
say `1.234567890123456789E-5,p=13`
 !-> MESSAGE/CONTINUE 1.234567890123E-05
1.234567890123E-05
say `1.234567890123456789E-5,p=14`
 !-> MESSAGE/CONTINUE 1.2345678901235E-05
1.2345678901235E-05
say `1.234567890123456789E-5,p=15`
 !-> MESSAGE/CONTINUE 1.23456789012346E-05
1.23456789012346E-05
say `1.234567890123456789E-5,p=16`
 !-> MESSAGE/CONTINUE 1.234567890123457E-05
1.234567890123457E-05
 
say `1.234567890123456789E-4,p=-16`
 !-> MESSAGE/CONTINUE 0.0001234567890123
0.0001234567890123
say `1.234567890123456789E-4,p=-15`
 !-> MESSAGE/CONTINUE 0.000123456789012
0.000123456789012
say `1.234567890123456789E-4,p=-14`
 !-> MESSAGE/CONTINUE 0.00012345678901
0.00012345678901
say `1.234567890123456789E-4,p=-13`
 !-> MESSAGE/CONTINUE 0.0001234567890
0.0001234567890
say `1.234567890123456789E-4,p=-12`
 !-> MESSAGE/CONTINUE 0.000123456789
0.000123456789
say `1.234567890123456789E-4,p=-11`
 !-> MESSAGE/CONTINUE 0.00012345679
0.00012345679
say `1.234567890123456789E-4,p=-10`
 !-> MESSAGE/CONTINUE 0.0001234568
0.0001234568
say `1.234567890123456789E-4,p=-9`
 !-> MESSAGE/CONTINUE 0.000123457
0.000123457
say `1.234567890123456789E-4,p=-8`
 !-> MESSAGE/CONTINUE 0.00012346
0.00012346
say `1.234567890123456789E-4,p=-7`
 !-> MESSAGE/CONTINUE 0.0001235
0.0001235
say `1.234567890123456789E-4,p=-6`
 !-> MESSAGE/CONTINUE 0.000123
0.000123
say `1.234567890123456789E-4,p=-5`
 !-> MESSAGE/CONTINUE 0.00012
0.00012
say `1.234567890123456789E-4,p=-4`
 !-> MESSAGE/CONTINUE 0.0001
0.0001
say `1.234567890123456789E-4,p=-3`
 !-> MESSAGE/CONTINUE 0.000
0.000
say `1.234567890123456789E-4,p=-2`
 !-> MESSAGE/CONTINUE 0.00
0.00
say `1.234567890123456789E-4,p=-1`
 !-> MESSAGE/CONTINUE 0.0
0.0
say `1.234567890123456789E-4,p=0`
 !-> MESSAGE/CONTINUE 0
0
say `1.234567890123456789E-4,p=1`
 !-> MESSAGE/CONTINUE 1.E-04
1.E-04
say `1.234567890123456789E-4,p=2`
 !-> MESSAGE/CONTINUE 1.2E-04
1.2E-04
say `1.234567890123456789E-4,p=3`
 !-> MESSAGE/CONTINUE 1.23E-04
1.23E-04
say `1.234567890123456789E-4,p=4`
 !-> MESSAGE/CONTINUE 1.235E-04
1.235E-04
say `1.234567890123456789E-4,p=5`
 !-> MESSAGE/CONTINUE 1.2346E-04
1.2346E-04
say `1.234567890123456789E-4,p=6`
 !-> MESSAGE/CONTINUE 1.23457E-04
1.23457E-04
say `1.234567890123456789E-4,p=7`
 !-> MESSAGE/CONTINUE 1.234568E-04
1.234568E-04
say `1.234567890123456789E-4,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E-04
1.2345679E-04
say `1.234567890123456789E-4,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E-04
1.23456789E-04
say `1.234567890123456789E-4,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E-04
1.23456789E-04
say `1.234567890123456789E-4,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901E-04
1.2345678901E-04
say `1.234567890123456789E-4,p=12`
 !-> MESSAGE/CONTINUE 1.23456789012E-04
1.23456789012E-04
say `1.234567890123456789E-4,p=13`
 !-> MESSAGE/CONTINUE 1.234567890123E-04
1.234567890123E-04
say `1.234567890123456789E-4,p=14`
 !-> MESSAGE/CONTINUE 1.2345678901235E-04
1.2345678901235E-04
say `1.234567890123456789E-4,p=15`
 !-> MESSAGE/CONTINUE 1.23456789012346E-04
1.23456789012346E-04
say `1.234567890123456789E-4,p=16`
 !-> MESSAGE/CONTINUE 1.234567890123457E-04
1.234567890123457E-04
 
say `1.234567890123456789E-3,p=-16`
 !-> MESSAGE/CONTINUE 0.0012345678901235
0.0012345678901235
say `1.234567890123456789E-3,p=-15`
 !-> MESSAGE/CONTINUE 0.001234567890123
0.001234567890123
say `1.234567890123456789E-3,p=-14`
 !-> MESSAGE/CONTINUE 0.00123456789012
0.00123456789012
say `1.234567890123456789E-3,p=-13`
 !-> MESSAGE/CONTINUE 0.0012345678901
0.0012345678901
say `1.234567890123456789E-3,p=-12`
 !-> MESSAGE/CONTINUE 0.001234567890
0.001234567890
say `1.234567890123456789E-3,p=-11`
 !-> MESSAGE/CONTINUE 0.00123456789
0.00123456789
say `1.234567890123456789E-3,p=-10`
 !-> MESSAGE/CONTINUE 0.0012345679
0.0012345679
say `1.234567890123456789E-3,p=-9`
 !-> MESSAGE/CONTINUE 0.001234568
0.001234568
say `1.234567890123456789E-3,p=-8`
 !-> MESSAGE/CONTINUE 0.00123457
0.00123457
say `1.234567890123456789E-3,p=-7`
 !-> MESSAGE/CONTINUE 0.0012346
0.0012346
say `1.234567890123456789E-3,p=-6`
 !-> MESSAGE/CONTINUE 0.001235
0.001235
say `1.234567890123456789E-3,p=-5`
 !-> MESSAGE/CONTINUE 0.00123
0.00123
say `1.234567890123456789E-3,p=-4`
 !-> MESSAGE/CONTINUE 0.0012
0.0012
say `1.234567890123456789E-3,p=-3`
 !-> MESSAGE/CONTINUE 0.001
0.001
say `1.234567890123456789E-3,p=-2`
 !-> MESSAGE/CONTINUE 0.00
0.00
say `1.234567890123456789E-3,p=-1`
 !-> MESSAGE/CONTINUE 0.0
0.0
say `1.234567890123456789E-3,p=0`
 !-> MESSAGE/CONTINUE 0
0
say `1.234567890123456789E-3,p=1`
 !-> MESSAGE/CONTINUE 1.E-03
1.E-03
say `1.234567890123456789E-3,p=2`
 !-> MESSAGE/CONTINUE 1.2E-03
1.2E-03
say `1.234567890123456789E-3,p=3`
 !-> MESSAGE/CONTINUE 0.00123
0.00123
say `1.234567890123456789E-3,p=4`
 !-> MESSAGE/CONTINUE 0.001235
0.001235
say `1.234567890123456789E-3,p=5`
 !-> MESSAGE/CONTINUE 0.0012346
0.0012346
say `1.234567890123456789E-3,p=6`
 !-> MESSAGE/CONTINUE 0.00123457
0.00123457
say `1.234567890123456789E-3,p=7`
 !-> MESSAGE/CONTINUE 0.001234568
0.001234568
say `1.234567890123456789E-3,p=8`
 !-> MESSAGE/CONTINUE 0.0012345679
0.0012345679
say `1.234567890123456789E-3,p=9`
 !-> MESSAGE/CONTINUE 0.00123456789
0.00123456789
say `1.234567890123456789E-3,p=10`
 !-> MESSAGE/CONTINUE 0.00123456789
0.00123456789
say `1.234567890123456789E-3,p=11`
 !-> MESSAGE/CONTINUE 0.0012345678901
0.0012345678901
say `1.234567890123456789E-3,p=12`
 !-> MESSAGE/CONTINUE 0.00123456789012
0.00123456789012
say `1.234567890123456789E-3,p=13`
 !-> MESSAGE/CONTINUE 0.001234567890123
0.001234567890123
say `1.234567890123456789E-3,p=14`
 !-> MESSAGE/CONTINUE 0.0012345678901235
0.0012345678901235
say `1.234567890123456789E-3,p=15`
 !-> MESSAGE/CONTINUE 0.00123456789012346
0.00123456789012346
say `1.234567890123456789E-3,p=16`
 !-> MESSAGE/CONTINUE 0.001234567890123457
0.001234567890123457
 
say `1.234567890123456789E-2,p=-16`
 !-> MESSAGE/CONTINUE 0.0123456789012346
0.0123456789012346
say `1.234567890123456789E-2,p=-15`
 !-> MESSAGE/CONTINUE 0.012345678901235
0.012345678901235
say `1.234567890123456789E-2,p=-14`
 !-> MESSAGE/CONTINUE 0.01234567890123
0.01234567890123
say `1.234567890123456789E-2,p=-13`
 !-> MESSAGE/CONTINUE 0.0123456789012
0.0123456789012
say `1.234567890123456789E-2,p=-12`
 !-> MESSAGE/CONTINUE 0.012345678901
0.012345678901
say `1.234567890123456789E-2,p=-11`
 !-> MESSAGE/CONTINUE 0.01234567890
0.01234567890
say `1.234567890123456789E-2,p=-10`
 !-> MESSAGE/CONTINUE 0.0123456789
0.0123456789
say `1.234567890123456789E-2,p=-9`
 !-> MESSAGE/CONTINUE 0.012345679
0.012345679
say `1.234567890123456789E-2,p=-8`
 !-> MESSAGE/CONTINUE 0.01234568
0.01234568
say `1.234567890123456789E-2,p=-7`
 !-> MESSAGE/CONTINUE 0.0123457
0.0123457
say `1.234567890123456789E-2,p=-6`
 !-> MESSAGE/CONTINUE 0.012346
0.012346
say `1.234567890123456789E-2,p=-5`
 !-> MESSAGE/CONTINUE 0.01235
0.01235
say `1.234567890123456789E-2,p=-4`
 !-> MESSAGE/CONTINUE 0.0123
0.0123
say `1.234567890123456789E-2,p=-3`
 !-> MESSAGE/CONTINUE 0.012
0.012
say `1.234567890123456789E-2,p=-2`
 !-> MESSAGE/CONTINUE 0.01
0.01
say `1.234567890123456789E-2,p=-1`
 !-> MESSAGE/CONTINUE 0.0
0.0
say `1.234567890123456789E-2,p=0`
 !-> MESSAGE/CONTINUE 0
0
say `1.234567890123456789E-2,p=1`
 !-> MESSAGE/CONTINUE 1.E-02
1.E-02
say `1.234567890123456789E-2,p=2`
 !-> MESSAGE/CONTINUE 1.2E-02
1.2E-02
say `1.234567890123456789E-2,p=3`
 !-> MESSAGE/CONTINUE 0.0123
0.0123
say `1.234567890123456789E-2,p=4`
 !-> MESSAGE/CONTINUE 0.01235
0.01235
say `1.234567890123456789E-2,p=5`
 !-> MESSAGE/CONTINUE 0.012346
0.012346
say `1.234567890123456789E-2,p=6`
 !-> MESSAGE/CONTINUE 0.0123457
0.0123457
say `1.234567890123456789E-2,p=7`
 !-> MESSAGE/CONTINUE 0.01234568
0.01234568
say `1.234567890123456789E-2,p=8`
 !-> MESSAGE/CONTINUE 0.012345679
0.012345679
say `1.234567890123456789E-2,p=9`
 !-> MESSAGE/CONTINUE 0.0123456789
0.0123456789
say `1.234567890123456789E-2,p=10`
 !-> MESSAGE/CONTINUE 0.0123456789
0.0123456789
say `1.234567890123456789E-2,p=11`
 !-> MESSAGE/CONTINUE 0.012345678901
0.012345678901
say `1.234567890123456789E-2,p=12`
 !-> MESSAGE/CONTINUE 0.0123456789012
0.0123456789012
say `1.234567890123456789E-2,p=13`
 !-> MESSAGE/CONTINUE 0.01234567890123
0.01234567890123
say `1.234567890123456789E-2,p=14`
 !-> MESSAGE/CONTINUE 0.012345678901235
0.012345678901235
say `1.234567890123456789E-2,p=15`
 !-> MESSAGE/CONTINUE 0.0123456789012346
0.0123456789012346
say `1.234567890123456789E-2,p=16`
 !-> MESSAGE/CONTINUE 0.01234567890123457
0.01234567890123457
 
say `1.234567890123456789E-1,p=-16`
 !-> MESSAGE/CONTINUE 0.1234567890123457
0.1234567890123457
say `1.234567890123456789E-1,p=-15`
 !-> MESSAGE/CONTINUE 0.123456789012346
0.123456789012346
say `1.234567890123456789E-1,p=-14`
 !-> MESSAGE/CONTINUE 0.12345678901235
0.12345678901235
say `1.234567890123456789E-1,p=-13`
 !-> MESSAGE/CONTINUE 0.1234567890123
0.1234567890123
say `1.234567890123456789E-1,p=-12`
 !-> MESSAGE/CONTINUE 0.123456789012
0.123456789012
say `1.234567890123456789E-1,p=-11`
 !-> MESSAGE/CONTINUE 0.12345678901
0.12345678901
say `1.234567890123456789E-1,p=-10`
 !-> MESSAGE/CONTINUE 0.1234567890
0.1234567890
say `1.234567890123456789E-1,p=-9`
 !-> MESSAGE/CONTINUE 0.123456789
0.123456789
say `1.234567890123456789E-1,p=-8`
 !-> MESSAGE/CONTINUE 0.12345679
0.12345679
say `1.234567890123456789E-1,p=-7`
 !-> MESSAGE/CONTINUE 0.1234568
0.1234568
say `1.234567890123456789E-1,p=-6`
 !-> MESSAGE/CONTINUE 0.123457
0.123457
say `1.234567890123456789E-1,p=-5`
 !-> MESSAGE/CONTINUE 0.12346
0.12346
say `1.234567890123456789E-1,p=-4`
 !-> MESSAGE/CONTINUE 0.1235
0.1235
say `1.234567890123456789E-1,p=-3`
 !-> MESSAGE/CONTINUE 0.123
0.123
say `1.234567890123456789E-1,p=-2`
 !-> MESSAGE/CONTINUE 0.12
0.12
say `1.234567890123456789E-1,p=-1`
 !-> MESSAGE/CONTINUE 0.1
0.1
say `1.234567890123456789E-1,p=0`
 !-> MESSAGE/CONTINUE 0
0
say `1.234567890123456789E-1,p=1`
 !-> MESSAGE/CONTINUE 0.1
0.1
say `1.234567890123456789E-1,p=2`
 !-> MESSAGE/CONTINUE 0.12
0.12
say `1.234567890123456789E-1,p=3`
 !-> MESSAGE/CONTINUE 0.123
0.123
say `1.234567890123456789E-1,p=4`
 !-> MESSAGE/CONTINUE 0.1235
0.1235
say `1.234567890123456789E-1,p=5`
 !-> MESSAGE/CONTINUE 0.12346
0.12346
say `1.234567890123456789E-1,p=6`
 !-> MESSAGE/CONTINUE 0.123457
0.123457
say `1.234567890123456789E-1,p=7`
 !-> MESSAGE/CONTINUE 0.1234568
0.1234568
say `1.234567890123456789E-1,p=8`
 !-> MESSAGE/CONTINUE 0.12345679
0.12345679
say `1.234567890123456789E-1,p=9`
 !-> MESSAGE/CONTINUE 0.123456789
0.123456789
say `1.234567890123456789E-1,p=10`
 !-> MESSAGE/CONTINUE 0.123456789
0.123456789
say `1.234567890123456789E-1,p=11`
 !-> MESSAGE/CONTINUE 0.12345678901
0.12345678901
say `1.234567890123456789E-1,p=12`
 !-> MESSAGE/CONTINUE 0.123456789012
0.123456789012
say `1.234567890123456789E-1,p=13`
 !-> MESSAGE/CONTINUE 0.1234567890123
0.1234567890123
say `1.234567890123456789E-1,p=14`
 !-> MESSAGE/CONTINUE 0.12345678901235
0.12345678901235
say `1.234567890123456789E-1,p=15`
 !-> MESSAGE/CONTINUE 0.123456789012346
0.123456789012346
say `1.234567890123456789E-1,p=16`
 !-> MESSAGE/CONTINUE 0.1234567890123457
0.1234567890123457
 
say `1.234567890123456789,p=-16`
 !-> MESSAGE/CONTINUE 1.2345678901234567
1.2345678901234567
say `1.234567890123456789,p=-15`
 !-> MESSAGE/CONTINUE 1.234567890123457
1.234567890123457
say `1.234567890123456789,p=-14`
 !-> MESSAGE/CONTINUE 1.23456789012346
1.23456789012346
say `1.234567890123456789,p=-13`
 !-> MESSAGE/CONTINUE 1.2345678901235
1.2345678901235
say `1.234567890123456789,p=-12`
 !-> MESSAGE/CONTINUE 1.234567890123
1.234567890123
say `1.234567890123456789,p=-11`
 !-> MESSAGE/CONTINUE 1.23456789012
1.23456789012
say `1.234567890123456789,p=-10`
 !-> MESSAGE/CONTINUE 1.2345678901
1.2345678901
say `1.234567890123456789,p=-9`
 !-> MESSAGE/CONTINUE 1.234567890
1.234567890
say `1.234567890123456789,p=-8`
 !-> MESSAGE/CONTINUE 1.23456789
1.23456789
say `1.234567890123456789,p=-7`
 !-> MESSAGE/CONTINUE 1.2345679
1.2345679
say `1.234567890123456789,p=-6`
 !-> MESSAGE/CONTINUE 1.234568
1.234568
say `1.234567890123456789,p=-5`
 !-> MESSAGE/CONTINUE 1.23457
1.23457
say `1.234567890123456789,p=-4`
 !-> MESSAGE/CONTINUE 1.2346
1.2346
say `1.234567890123456789,p=-3`
 !-> MESSAGE/CONTINUE 1.235
1.235
say `1.234567890123456789,p=-2`
 !-> MESSAGE/CONTINUE 1.23
1.23
say `1.234567890123456789,p=-1`
 !-> MESSAGE/CONTINUE 1.2
1.2
say `1.234567890123456789,p=0`
 !-> MESSAGE/CONTINUE 1
1
say `1.234567890123456789,p=1`
 !-> MESSAGE/CONTINUE 1
1
say `1.234567890123456789,p=2`
 !-> MESSAGE/CONTINUE 1.2
1.2
say `1.234567890123456789,p=3`
 !-> MESSAGE/CONTINUE 1.23
1.23
say `1.234567890123456789,p=4`
 !-> MESSAGE/CONTINUE 1.235
1.235
say `1.234567890123456789,p=5`
 !-> MESSAGE/CONTINUE 1.2346
1.2346
say `1.234567890123456789,p=6`
 !-> MESSAGE/CONTINUE 1.23457
1.23457
say `1.234567890123456789,p=7`
 !-> MESSAGE/CONTINUE 1.234568
1.234568
say `1.234567890123456789,p=8`
 !-> MESSAGE/CONTINUE 1.2345679
1.2345679
say `1.234567890123456789,p=9`
 !-> MESSAGE/CONTINUE 1.23456789
1.23456789
say `1.234567890123456789,p=10`
 !-> MESSAGE/CONTINUE 1.23456789
1.23456789
say `1.234567890123456789,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901
1.2345678901
say `1.234567890123456789,p=12`
 !-> MESSAGE/CONTINUE 1.23456789012
1.23456789012
say `1.234567890123456789,p=13`
 !-> MESSAGE/CONTINUE 1.234567890123
1.234567890123
say `1.234567890123456789,p=14`
 !-> MESSAGE/CONTINUE 1.2345678901235
1.2345678901235
say `1.234567890123456789,p=15`
 !-> MESSAGE/CONTINUE 1.23456789012346
1.23456789012346
say `1.234567890123456789,p=16`
 !-> MESSAGE/CONTINUE 1.234567890123457
1.234567890123457
 
say `1.234567890123456789E1,p=-16`
 !-> MESSAGE/CONTINUE 12.34567890123457
12.34567890123457
say `1.234567890123456789E1,p=-15`
 !-> MESSAGE/CONTINUE 12.345678901234567
12.345678901234567
say `1.234567890123456789E1,p=-14`
 !-> MESSAGE/CONTINUE 12.34567890123457
12.34567890123457
say `1.234567890123456789E1,p=-13`
 !-> MESSAGE/CONTINUE 12.3456789012346
12.3456789012346
say `1.234567890123456789E1,p=-12`
 !-> MESSAGE/CONTINUE 12.345678901235
12.345678901235
say `1.234567890123456789E1,p=-11`
 !-> MESSAGE/CONTINUE 12.34567890123
12.34567890123
say `1.234567890123456789E1,p=-10`
 !-> MESSAGE/CONTINUE 12.3456789012
12.3456789012
say `1.234567890123456789E1,p=-9`
 !-> MESSAGE/CONTINUE 12.345678901
12.345678901
say `1.234567890123456789E1,p=-8`
 !-> MESSAGE/CONTINUE 12.34567890
12.34567890
say `1.234567890123456789E1,p=-7`
 !-> MESSAGE/CONTINUE 12.3456789
12.3456789
say `1.234567890123456789E1,p=-6`
 !-> MESSAGE/CONTINUE 12.345679
12.345679
say `1.234567890123456789E1,p=-5`
 !-> MESSAGE/CONTINUE 12.34568
12.34568
say `1.234567890123456789E1,p=-4`
 !-> MESSAGE/CONTINUE 12.3457
12.3457
say `1.234567890123456789E1,p=-3`
 !-> MESSAGE/CONTINUE 12.346
12.346
say `1.234567890123456789E1,p=-2`
 !-> MESSAGE/CONTINUE 12.35
12.35
say `1.234567890123456789E1,p=-1`
 !-> MESSAGE/CONTINUE 12.3
12.3
say `1.234567890123456789E1,p=0`
 !-> MESSAGE/CONTINUE 12
12
say `1.234567890123456789E1,p=1`
 !-> MESSAGE/CONTINUE 1.E+01
1.E+01
say `1.234567890123456789E1,p=2`
 !-> MESSAGE/CONTINUE 12
12
say `1.234567890123456789E1,p=3`
 !-> MESSAGE/CONTINUE 12.3
12.3
say `1.234567890123456789E1,p=4`
 !-> MESSAGE/CONTINUE 12.35
12.35
say `1.234567890123456789E1,p=5`
 !-> MESSAGE/CONTINUE 12.346
12.346
say `1.234567890123456789E1,p=6`
 !-> MESSAGE/CONTINUE 12.3457
12.3457
say `1.234567890123456789E1,p=7`
 !-> MESSAGE/CONTINUE 12.34568
12.34568
say `1.234567890123456789E1,p=8`
 !-> MESSAGE/CONTINUE 12.345679
12.345679
say `1.234567890123456789E1,p=9`
 !-> MESSAGE/CONTINUE 12.3456789
12.3456789
say `1.234567890123456789E1,p=10`
 !-> MESSAGE/CONTINUE 12.3456789
12.3456789
say `1.234567890123456789E1,p=11`
 !-> MESSAGE/CONTINUE 12.345678901
12.345678901
say `1.234567890123456789E1,p=12`
 !-> MESSAGE/CONTINUE 12.3456789012
12.3456789012
say `1.234567890123456789E1,p=13`
 !-> MESSAGE/CONTINUE 12.34567890123
12.34567890123
say `1.234567890123456789E1,p=14`
 !-> MESSAGE/CONTINUE 12.345678901235
12.345678901235
say `1.234567890123456789E1,p=15`
 !-> MESSAGE/CONTINUE 12.3456789012346
12.3456789012346
say `1.234567890123456789E1,p=16`
 !-> MESSAGE/CONTINUE 12.34567890123457
12.34567890123457
 
say `1.234567890123456789E2,p=-16`
 !-> MESSAGE/CONTINUE 123.4567890123457
123.4567890123457
say `1.234567890123456789E2,p=-15`
 !-> MESSAGE/CONTINUE 123.4567890123457
123.4567890123457
say `1.234567890123456789E2,p=-14`
 !-> MESSAGE/CONTINUE 123.45678901234568
123.45678901234568
say `1.234567890123456789E2,p=-13`
 !-> MESSAGE/CONTINUE 123.4567890123457
123.4567890123457
say `1.234567890123456789E2,p=-12`
 !-> MESSAGE/CONTINUE 123.456789012346
123.456789012346
say `1.234567890123456789E2,p=-11`
 !-> MESSAGE/CONTINUE 123.45678901235
123.45678901235
say `1.234567890123456789E2,p=-10`
 !-> MESSAGE/CONTINUE 123.4567890123
123.4567890123
say `1.234567890123456789E2,p=-9`
 !-> MESSAGE/CONTINUE 123.456789012
123.456789012
say `1.234567890123456789E2,p=-8`
 !-> MESSAGE/CONTINUE 123.45678901
123.45678901
say `1.234567890123456789E2,p=-7`
 !-> MESSAGE/CONTINUE 123.4567890
123.4567890
say `1.234567890123456789E2,p=-6`
 !-> MESSAGE/CONTINUE 123.456789
123.456789
say `1.234567890123456789E2,p=-5`
 !-> MESSAGE/CONTINUE 123.45679
123.45679
say `1.234567890123456789E2,p=-4`
 !-> MESSAGE/CONTINUE 123.4568
123.4568
say `1.234567890123456789E2,p=-3`
 !-> MESSAGE/CONTINUE 123.457
123.457
say `1.234567890123456789E2,p=-2`
 !-> MESSAGE/CONTINUE 123.46
123.46
say `1.234567890123456789E2,p=-1`
 !-> MESSAGE/CONTINUE 123.5
123.5
say `1.234567890123456789E2,p=0`
 !-> MESSAGE/CONTINUE 123
123
say `1.234567890123456789E2,p=1`
 !-> MESSAGE/CONTINUE 1.E+02
1.E+02
say `1.234567890123456789E2,p=2`
 !-> MESSAGE/CONTINUE 1.2E+02
1.2E+02
say `1.234567890123456789E2,p=3`
 !-> MESSAGE/CONTINUE 123
123
say `1.234567890123456789E2,p=4`
 !-> MESSAGE/CONTINUE 123.5
123.5
say `1.234567890123456789E2,p=5`
 !-> MESSAGE/CONTINUE 123.46
123.46
say `1.234567890123456789E2,p=6`
 !-> MESSAGE/CONTINUE 123.457
123.457
say `1.234567890123456789E2,p=7`
 !-> MESSAGE/CONTINUE 123.4568
123.4568
say `1.234567890123456789E2,p=8`
 !-> MESSAGE/CONTINUE 123.45679
123.45679
say `1.234567890123456789E2,p=9`
 !-> MESSAGE/CONTINUE 123.456789
123.456789
say `1.234567890123456789E2,p=10`
 !-> MESSAGE/CONTINUE 123.456789
123.456789
say `1.234567890123456789E2,p=11`
 !-> MESSAGE/CONTINUE 123.45678901
123.45678901
say `1.234567890123456789E2,p=12`
 !-> MESSAGE/CONTINUE 123.456789012
123.456789012
say `1.234567890123456789E2,p=13`
 !-> MESSAGE/CONTINUE 123.4567890123
123.4567890123
say `1.234567890123456789E2,p=14`
 !-> MESSAGE/CONTINUE 123.45678901235
123.45678901235
say `1.234567890123456789E2,p=15`
 !-> MESSAGE/CONTINUE 123.456789012346
123.456789012346
say `1.234567890123456789E2,p=16`
 !-> MESSAGE/CONTINUE 123.4567890123457
123.4567890123457
 
say `1.234567890123456789E3,p=-16`
 !-> MESSAGE/CONTINUE 1234.567890123457
1234.567890123457
say `1.234567890123456789E3,p=-15`
 !-> MESSAGE/CONTINUE 1234.567890123457
1234.567890123457
say `1.234567890123456789E3,p=-14`
 !-> MESSAGE/CONTINUE 1234.567890123457
1234.567890123457
say `1.234567890123456789E3,p=-13`
 !-> MESSAGE/CONTINUE 1234.5678901234569
1234.5678901234569
say `1.234567890123456789E3,p=-12`
 !-> MESSAGE/CONTINUE 1234.567890123457
1234.567890123457
say `1.234567890123456789E3,p=-11`
 !-> MESSAGE/CONTINUE 1234.56789012346
1234.56789012346
say `1.234567890123456789E3,p=-10`
 !-> MESSAGE/CONTINUE 1234.5678901235
1234.5678901235
say `1.234567890123456789E3,p=-9`
 !-> MESSAGE/CONTINUE 1234.567890123
1234.567890123
say `1.234567890123456789E3,p=-8`
 !-> MESSAGE/CONTINUE 1234.56789012
1234.56789012
say `1.234567890123456789E3,p=-7`
 !-> MESSAGE/CONTINUE 1234.5678901
1234.5678901
say `1.234567890123456789E3,p=-6`
 !-> MESSAGE/CONTINUE 1234.567890
1234.567890
say `1.234567890123456789E3,p=-5`
 !-> MESSAGE/CONTINUE 1234.56789
1234.56789
say `1.234567890123456789E3,p=-4`
 !-> MESSAGE/CONTINUE 1234.5679
1234.5679
say `1.234567890123456789E3,p=-3`
 !-> MESSAGE/CONTINUE 1234.568
1234.568
say `1.234567890123456789E3,p=-2`
 !-> MESSAGE/CONTINUE 1234.57
1234.57
say `1.234567890123456789E3,p=-1`
 !-> MESSAGE/CONTINUE 1234.6
1234.6
say `1.234567890123456789E3,p=0`
 !-> MESSAGE/CONTINUE 1235
1235
say `1.234567890123456789E3,p=1`
 !-> MESSAGE/CONTINUE 1.E+03
1.E+03
say `1.234567890123456789E3,p=2`
 !-> MESSAGE/CONTINUE 1.2E+03
1.2E+03
say `1.234567890123456789E3,p=3`
 !-> MESSAGE/CONTINUE 1.23E+03
1.23E+03
say `1.234567890123456789E3,p=4`
 !-> MESSAGE/CONTINUE 1235
1235
say `1.234567890123456789E3,p=5`
 !-> MESSAGE/CONTINUE 1234.6
1234.6
say `1.234567890123456789E3,p=6`
 !-> MESSAGE/CONTINUE 1234.57
1234.57
say `1.234567890123456789E3,p=7`
 !-> MESSAGE/CONTINUE 1234.568
1234.568
say `1.234567890123456789E3,p=8`
 !-> MESSAGE/CONTINUE 1234.5679
1234.5679
say `1.234567890123456789E3,p=9`
 !-> MESSAGE/CONTINUE 1234.56789
1234.56789
say `1.234567890123456789E3,p=10`
 !-> MESSAGE/CONTINUE 1234.56789
1234.56789
say `1.234567890123456789E3,p=11`
 !-> MESSAGE/CONTINUE 1234.5678901
1234.5678901
say `1.234567890123456789E3,p=12`
 !-> MESSAGE/CONTINUE 1234.56789012
1234.56789012
say `1.234567890123456789E3,p=13`
 !-> MESSAGE/CONTINUE 1234.567890123
1234.567890123
say `1.234567890123456789E3,p=14`
 !-> MESSAGE/CONTINUE 1234.5678901235
1234.5678901235
say `1.234567890123456789E3,p=15`
 !-> MESSAGE/CONTINUE 1234.56789012346
1234.56789012346
say `1.234567890123456789E3,p=16`
 !-> MESSAGE/CONTINUE 1234.567890123457
1234.567890123457
 
say `1.234567890123456789E4,p=-16`
 !-> MESSAGE/CONTINUE 12345.67890123457
12345.67890123457
say `1.234567890123456789E4,p=-15`
 !-> MESSAGE/CONTINUE 12345.67890123457
12345.67890123457
say `1.234567890123456789E4,p=-14`
 !-> MESSAGE/CONTINUE 12345.67890123457
12345.67890123457
say `1.234567890123456789E4,p=-13`
 !-> MESSAGE/CONTINUE 12345.67890123457
12345.67890123457
say `1.234567890123456789E4,p=-12`
 !-> MESSAGE/CONTINUE 12345.678901234567
12345.678901234567
say `1.234567890123456789E4,p=-11`
 !-> MESSAGE/CONTINUE 12345.67890123457
12345.67890123457
say `1.234567890123456789E4,p=-10`
 !-> MESSAGE/CONTINUE 12345.6789012346
12345.6789012346
say `1.234567890123456789E4,p=-9`
 !-> MESSAGE/CONTINUE 12345.678901235
12345.678901235
say `1.234567890123456789E4,p=-8`
 !-> MESSAGE/CONTINUE 12345.67890123
12345.67890123
say `1.234567890123456789E4,p=-7`
 !-> MESSAGE/CONTINUE 12345.6789012
12345.6789012
say `1.234567890123456789E4,p=-6`
 !-> MESSAGE/CONTINUE 12345.678901
12345.678901
say `1.234567890123456789E4,p=-5`
 !-> MESSAGE/CONTINUE 12345.67890
12345.67890
say `1.234567890123456789E4,p=-4`
 !-> MESSAGE/CONTINUE 12345.6789
12345.6789
say `1.234567890123456789E4,p=-3`
 !-> MESSAGE/CONTINUE 12345.679
12345.679
say `1.234567890123456789E4,p=-2`
 !-> MESSAGE/CONTINUE 12345.68
12345.68
say `1.234567890123456789E4,p=-1`
 !-> MESSAGE/CONTINUE 12345.7
12345.7
say `1.234567890123456789E4,p=0`
 !-> MESSAGE/CONTINUE 12346
12346
say `1.234567890123456789E4,p=1`
 !-> MESSAGE/CONTINUE 1.E+04
1.E+04
say `1.234567890123456789E4,p=2`
 !-> MESSAGE/CONTINUE 1.2E+04
1.2E+04
say `1.234567890123456789E4,p=3`
 !-> MESSAGE/CONTINUE 1.23E+04
1.23E+04
say `1.234567890123456789E4,p=4`
 !-> MESSAGE/CONTINUE 1.235E+04
1.235E+04
say `1.234567890123456789E4,p=5`
 !-> MESSAGE/CONTINUE 12346
12346
say `1.234567890123456789E4,p=6`
 !-> MESSAGE/CONTINUE 12345.7
12345.7
say `1.234567890123456789E4,p=7`
 !-> MESSAGE/CONTINUE 12345.68
12345.68
say `1.234567890123456789E4,p=8`
 !-> MESSAGE/CONTINUE 12345.679
12345.679
say `1.234567890123456789E4,p=9`
 !-> MESSAGE/CONTINUE 12345.6789
12345.6789
say `1.234567890123456789E4,p=10`
 !-> MESSAGE/CONTINUE 12345.6789
12345.6789
say `1.234567890123456789E4,p=11`
 !-> MESSAGE/CONTINUE 12345.678901
12345.678901
say `1.234567890123456789E4,p=12`
 !-> MESSAGE/CONTINUE 12345.6789012
12345.6789012
say `1.234567890123456789E4,p=13`
 !-> MESSAGE/CONTINUE 12345.67890123
12345.67890123
say `1.234567890123456789E4,p=14`
 !-> MESSAGE/CONTINUE 12345.678901235
12345.678901235
say `1.234567890123456789E4,p=15`
 !-> MESSAGE/CONTINUE 12345.6789012346
12345.6789012346
say `1.234567890123456789E4,p=16`
 !-> MESSAGE/CONTINUE 12345.67890123457
12345.67890123457
 
say `1.234567890123456789E5,p=-16`
 !-> MESSAGE/CONTINUE 123456.7890123457
123456.7890123457
say `1.234567890123456789E5,p=-15`
 !-> MESSAGE/CONTINUE 123456.7890123457
123456.7890123457
say `1.234567890123456789E5,p=-14`
 !-> MESSAGE/CONTINUE 123456.7890123457
123456.7890123457
say `1.234567890123456789E5,p=-13`
 !-> MESSAGE/CONTINUE 123456.7890123457
123456.7890123457
say `1.234567890123456789E5,p=-12`
 !-> MESSAGE/CONTINUE 123456.7890123457
123456.7890123457
say `1.234567890123456789E5,p=-11`
 !-> MESSAGE/CONTINUE 123456.78901234567
123456.78901234567
say `1.234567890123456789E5,p=-10`
 !-> MESSAGE/CONTINUE 123456.7890123457
123456.7890123457
say `1.234567890123456789E5,p=-9`
 !-> MESSAGE/CONTINUE 123456.789012346
123456.789012346
say `1.234567890123456789E5,p=-8`
 !-> MESSAGE/CONTINUE 123456.78901235
123456.78901235
say `1.234567890123456789E5,p=-7`
 !-> MESSAGE/CONTINUE 123456.7890123
123456.7890123
say `1.234567890123456789E5,p=-6`
 !-> MESSAGE/CONTINUE 123456.789012
123456.789012
say `1.234567890123456789E5,p=-5`
 !-> MESSAGE/CONTINUE 123456.78901
123456.78901
say `1.234567890123456789E5,p=-4`
 !-> MESSAGE/CONTINUE 123456.7890
123456.7890
say `1.234567890123456789E5,p=-3`
 !-> MESSAGE/CONTINUE 123456.789
123456.789
say `1.234567890123456789E5,p=-2`
 !-> MESSAGE/CONTINUE 123456.79
123456.79
say `1.234567890123456789E5,p=-1`
 !-> MESSAGE/CONTINUE 123456.8
123456.8
say `1.234567890123456789E5,p=0`
 !-> MESSAGE/CONTINUE 123457
123457
say `1.234567890123456789E5,p=1`
 !-> MESSAGE/CONTINUE 1.E+05
1.E+05
say `1.234567890123456789E5,p=2`
 !-> MESSAGE/CONTINUE 1.2E+05
1.2E+05
say `1.234567890123456789E5,p=3`
 !-> MESSAGE/CONTINUE 1.23E+05
1.23E+05
say `1.234567890123456789E5,p=4`
 !-> MESSAGE/CONTINUE 1.235E+05
1.235E+05
say `1.234567890123456789E5,p=5`
 !-> MESSAGE/CONTINUE 1.2346E+05
1.2346E+05
say `1.234567890123456789E5,p=6`
 !-> MESSAGE/CONTINUE 123457
123457
say `1.234567890123456789E5,p=7`
 !-> MESSAGE/CONTINUE 123456.8
123456.8
say `1.234567890123456789E5,p=8`
 !-> MESSAGE/CONTINUE 123456.79
123456.79
say `1.234567890123456789E5,p=9`
 !-> MESSAGE/CONTINUE 123456.789
123456.789
say `1.234567890123456789E5,p=10`
 !-> MESSAGE/CONTINUE 123456.789
123456.789
say `1.234567890123456789E5,p=11`
 !-> MESSAGE/CONTINUE 123456.78901
123456.78901
say `1.234567890123456789E5,p=12`
 !-> MESSAGE/CONTINUE 123456.789012
123456.789012
say `1.234567890123456789E5,p=13`
 !-> MESSAGE/CONTINUE 123456.7890123
123456.7890123
say `1.234567890123456789E5,p=14`
 !-> MESSAGE/CONTINUE 123456.78901235
123456.78901235
say `1.234567890123456789E5,p=15`
 !-> MESSAGE/CONTINUE 123456.789012346
123456.789012346
say `1.234567890123456789E5,p=16`
 !-> MESSAGE/CONTINUE 123456.7890123457
123456.7890123457
 
say `1.234567890123456789E6,p=-16`
 !-> MESSAGE/CONTINUE 1234567.890123457
1234567.890123457
say `1.234567890123456789E6,p=-15`
 !-> MESSAGE/CONTINUE 1234567.890123457
1234567.890123457
say `1.234567890123456789E6,p=-14`
 !-> MESSAGE/CONTINUE 1234567.890123457
1234567.890123457
say `1.234567890123456789E6,p=-13`
 !-> MESSAGE/CONTINUE 1234567.890123457
1234567.890123457
say `1.234567890123456789E6,p=-12`
 !-> MESSAGE/CONTINUE 1234567.890123457
1234567.890123457
say `1.234567890123456789E6,p=-11`
 !-> MESSAGE/CONTINUE 1234567.890123457
1234567.890123457
say `1.234567890123456789E6,p=-10`
 !-> MESSAGE/CONTINUE 1234567.8901234567
1234567.8901234567
say `1.234567890123456789E6,p=-9`
 !-> MESSAGE/CONTINUE 1234567.890123457
1234567.890123457
say `1.234567890123456789E6,p=-8`
 !-> MESSAGE/CONTINUE 1234567.89012346
1234567.89012346
say `1.234567890123456789E6,p=-7`
 !-> MESSAGE/CONTINUE 1234567.8901235
1234567.8901235
say `1.234567890123456789E6,p=-6`
 !-> MESSAGE/CONTINUE 1234567.890123
1234567.890123
say `1.234567890123456789E6,p=-5`
 !-> MESSAGE/CONTINUE 1234567.89012
1234567.89012
say `1.234567890123456789E6,p=-4`
 !-> MESSAGE/CONTINUE 1234567.8901
1234567.8901
say `1.234567890123456789E6,p=-3`
 !-> MESSAGE/CONTINUE 1234567.890
1234567.890
say `1.234567890123456789E6,p=-2`
 !-> MESSAGE/CONTINUE 1234567.89
1234567.89
say `1.234567890123456789E6,p=-1`
 !-> MESSAGE/CONTINUE 1234567.9
1234567.9
say `1.234567890123456789E6,p=0`
 !-> MESSAGE/CONTINUE 1234568
1234568
say `1.234567890123456789E6,p=1`
 !-> MESSAGE/CONTINUE 1.E+06
1.E+06
say `1.234567890123456789E6,p=2`
 !-> MESSAGE/CONTINUE 1.2E+06
1.2E+06
say `1.234567890123456789E6,p=3`
 !-> MESSAGE/CONTINUE 1.23E+06
1.23E+06
say `1.234567890123456789E6,p=4`
 !-> MESSAGE/CONTINUE 1.235E+06
1.235E+06
say `1.234567890123456789E6,p=5`
 !-> MESSAGE/CONTINUE 1.2346E+06
1.2346E+06
say `1.234567890123456789E6,p=6`
 !-> MESSAGE/CONTINUE 1.23457E+06
1.23457E+06
say `1.234567890123456789E6,p=7`
 !-> MESSAGE/CONTINUE 1234568
1234568
say `1.234567890123456789E6,p=8`
 !-> MESSAGE/CONTINUE 1234567.9
1234567.9
say `1.234567890123456789E6,p=9`
 !-> MESSAGE/CONTINUE 1234567.89
1234567.89
say `1.234567890123456789E6,p=10`
 !-> MESSAGE/CONTINUE 1234567.89
1234567.89
say `1.234567890123456789E6,p=11`
 !-> MESSAGE/CONTINUE 1234567.8901
1234567.8901
say `1.234567890123456789E6,p=12`
 !-> MESSAGE/CONTINUE 1234567.89012
1234567.89012
say `1.234567890123456789E6,p=13`
 !-> MESSAGE/CONTINUE 1234567.890123
1234567.890123
say `1.234567890123456789E6,p=14`
 !-> MESSAGE/CONTINUE 1234567.8901235
1234567.8901235
say `1.234567890123456789E6,p=15`
 !-> MESSAGE/CONTINUE 1234567.89012346
1234567.89012346
say `1.234567890123456789E6,p=16`
 !-> MESSAGE/CONTINUE 1234567.890123457
1234567.890123457
 
say `1.234567890123456789E7,p=-16`
 !-> MESSAGE/CONTINUE 12345678.90123457
12345678.90123457
say `1.234567890123456789E7,p=-15`
 !-> MESSAGE/CONTINUE 12345678.90123457
12345678.90123457
say `1.234567890123456789E7,p=-14`
 !-> MESSAGE/CONTINUE 12345678.90123457
12345678.90123457
say `1.234567890123456789E7,p=-13`
 !-> MESSAGE/CONTINUE 12345678.90123457
12345678.90123457
say `1.234567890123456789E7,p=-12`
 !-> MESSAGE/CONTINUE 12345678.90123457
12345678.90123457
say `1.234567890123456789E7,p=-11`
 !-> MESSAGE/CONTINUE 12345678.90123457
12345678.90123457
say `1.234567890123456789E7,p=-10`
 !-> MESSAGE/CONTINUE 12345678.90123457
12345678.90123457
say `1.234567890123456789E7,p=-9`
 !-> MESSAGE/CONTINUE 12345678.901234567
12345678.901234567
say `1.234567890123456789E7,p=-8`
 !-> MESSAGE/CONTINUE 12345678.90123457
12345678.90123457
say `1.234567890123456789E7,p=-7`
 !-> MESSAGE/CONTINUE 12345678.9012346
12345678.9012346
say `1.234567890123456789E7,p=-6`
 !-> MESSAGE/CONTINUE 12345678.901235
12345678.901235
say `1.234567890123456789E7,p=-5`
 !-> MESSAGE/CONTINUE 12345678.90123
12345678.90123
say `1.234567890123456789E7,p=-4`
 !-> MESSAGE/CONTINUE 12345678.9012
12345678.9012
say `1.234567890123456789E7,p=-3`
 !-> MESSAGE/CONTINUE 12345678.901
12345678.901
say `1.234567890123456789E7,p=-2`
 !-> MESSAGE/CONTINUE 12345678.90
12345678.90
say `1.234567890123456789E7,p=-1`
 !-> MESSAGE/CONTINUE 12345678.9
12345678.9
say `1.234567890123456789E7,p=0`
 !-> MESSAGE/CONTINUE 12345679
12345679
say `1.234567890123456789E7,p=1`
 !-> MESSAGE/CONTINUE 1.E+07
1.E+07
say `1.234567890123456789E7,p=2`
 !-> MESSAGE/CONTINUE 1.2E+07
1.2E+07
say `1.234567890123456789E7,p=3`
 !-> MESSAGE/CONTINUE 1.23E+07
1.23E+07
say `1.234567890123456789E7,p=4`
 !-> MESSAGE/CONTINUE 1.235E+07
1.235E+07
say `1.234567890123456789E7,p=5`
 !-> MESSAGE/CONTINUE 1.2346E+07
1.2346E+07
say `1.234567890123456789E7,p=6`
 !-> MESSAGE/CONTINUE 1.23457E+07
1.23457E+07
say `1.234567890123456789E7,p=7`
 !-> MESSAGE/CONTINUE 1.234568E+07
1.234568E+07
say `1.234567890123456789E7,p=8`
 !-> MESSAGE/CONTINUE 12345679
12345679
say `1.234567890123456789E7,p=9`
 !-> MESSAGE/CONTINUE 12345678.9
12345678.9
say `1.234567890123456789E7,p=10`
 !-> MESSAGE/CONTINUE 12345678.9
12345678.9
say `1.234567890123456789E7,p=11`
 !-> MESSAGE/CONTINUE 12345678.901
12345678.901
say `1.234567890123456789E7,p=12`
 !-> MESSAGE/CONTINUE 12345678.9012
12345678.9012
say `1.234567890123456789E7,p=13`
 !-> MESSAGE/CONTINUE 12345678.90123
12345678.90123
say `1.234567890123456789E7,p=14`
 !-> MESSAGE/CONTINUE 12345678.901235
12345678.901235
say `1.234567890123456789E7,p=15`
 !-> MESSAGE/CONTINUE 12345678.9012346
12345678.9012346
say `1.234567890123456789E7,p=16`
 !-> MESSAGE/CONTINUE 12345678.90123457
12345678.90123457
 
say `1.234567890123456789E8,p=-16`
 !-> MESSAGE/CONTINUE 123456789.0123457
123456789.0123457
say `1.234567890123456789E8,p=-15`
 !-> MESSAGE/CONTINUE 123456789.0123457
123456789.0123457
say `1.234567890123456789E8,p=-14`
 !-> MESSAGE/CONTINUE 123456789.0123457
123456789.0123457
say `1.234567890123456789E8,p=-13`
 !-> MESSAGE/CONTINUE 123456789.0123457
123456789.0123457
say `1.234567890123456789E8,p=-12`
 !-> MESSAGE/CONTINUE 123456789.0123457
123456789.0123457
say `1.234567890123456789E8,p=-11`
 !-> MESSAGE/CONTINUE 123456789.0123457
123456789.0123457
say `1.234567890123456789E8,p=-10`
 !-> MESSAGE/CONTINUE 123456789.0123457
123456789.0123457
say `1.234567890123456789E8,p=-9`
 !-> MESSAGE/CONTINUE 123456789.0123457
123456789.0123457
say `1.234567890123456789E8,p=-8`
 !-> MESSAGE/CONTINUE 123456789.01234567
123456789.01234567
say `1.234567890123456789E8,p=-7`
 !-> MESSAGE/CONTINUE 123456789.0123457
123456789.0123457
say `1.234567890123456789E8,p=-6`
 !-> MESSAGE/CONTINUE 123456789.012346
123456789.012346
say `1.234567890123456789E8,p=-5`
 !-> MESSAGE/CONTINUE 123456789.01235
123456789.01235
say `1.234567890123456789E8,p=-4`
 !-> MESSAGE/CONTINUE 123456789.0123
123456789.0123
say `1.234567890123456789E8,p=-3`
 !-> MESSAGE/CONTINUE 123456789.012
123456789.012
say `1.234567890123456789E8,p=-2`
 !-> MESSAGE/CONTINUE 123456789.01
123456789.01
say `1.234567890123456789E8,p=-1`
 !-> MESSAGE/CONTINUE 123456789.0
123456789.0
say `1.234567890123456789E8,p=0`
 !-> MESSAGE/CONTINUE 123456789
123456789
say `1.234567890123456789E8,p=1`
 !-> MESSAGE/CONTINUE 1.E+08
1.E+08
say `1.234567890123456789E8,p=2`
 !-> MESSAGE/CONTINUE 1.2E+08
1.2E+08
say `1.234567890123456789E8,p=3`
 !-> MESSAGE/CONTINUE 1.23E+08
1.23E+08
say `1.234567890123456789E8,p=4`
 !-> MESSAGE/CONTINUE 1.235E+08
1.235E+08
say `1.234567890123456789E8,p=5`
 !-> MESSAGE/CONTINUE 1.2346E+08
1.2346E+08
say `1.234567890123456789E8,p=6`
 !-> MESSAGE/CONTINUE 1.23457E+08
1.23457E+08
say `1.234567890123456789E8,p=7`
 !-> MESSAGE/CONTINUE 1.234568E+08
1.234568E+08
say `1.234567890123456789E8,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E+08
1.2345679E+08
say `1.234567890123456789E8,p=9`
 !-> MESSAGE/CONTINUE 123456789
123456789
say `1.234567890123456789E8,p=10`
 !-> MESSAGE/CONTINUE 123456789
123456789
say `1.234567890123456789E8,p=11`
 !-> MESSAGE/CONTINUE 123456789.01
123456789.01
say `1.234567890123456789E8,p=12`
 !-> MESSAGE/CONTINUE 123456789.012
123456789.012
say `1.234567890123456789E8,p=13`
 !-> MESSAGE/CONTINUE 123456789.0123
123456789.0123
say `1.234567890123456789E8,p=14`
 !-> MESSAGE/CONTINUE 123456789.01235
123456789.01235
say `1.234567890123456789E8,p=15`
 !-> MESSAGE/CONTINUE 123456789.012346
123456789.012346
say `1.234567890123456789E8,p=16`
 !-> MESSAGE/CONTINUE 123456789.0123457
123456789.0123457
 
say `1.234567890123456789E9,p=-16`
 !-> MESSAGE/CONTINUE 1234567890.123457
1234567890.123457
say `1.234567890123456789E9,p=-15`
 !-> MESSAGE/CONTINUE 1234567890.123457
1234567890.123457
say `1.234567890123456789E9,p=-14`
 !-> MESSAGE/CONTINUE 1234567890.123457
1234567890.123457
say `1.234567890123456789E9,p=-13`
 !-> MESSAGE/CONTINUE 1234567890.123457
1234567890.123457
say `1.234567890123456789E9,p=-12`
 !-> MESSAGE/CONTINUE 1234567890.123457
1234567890.123457
say `1.234567890123456789E9,p=-11`
 !-> MESSAGE/CONTINUE 1234567890.123457
1234567890.123457
say `1.234567890123456789E9,p=-10`
 !-> MESSAGE/CONTINUE 1234567890.123457
1234567890.123457
say `1.234567890123456789E9,p=-9`
 !-> MESSAGE/CONTINUE 1234567890.123457
1234567890.123457
say `1.234567890123456789E9,p=-8`
 !-> MESSAGE/CONTINUE 1234567890.123457
1234567890.123457
say `1.234567890123456789E9,p=-7`
 !-> MESSAGE/CONTINUE 1234567890.1234567
1234567890.1234567
say `1.234567890123456789E9,p=-6`
 !-> MESSAGE/CONTINUE 1234567890.123457
1234567890.123457
say `1.234567890123456789E9,p=-5`
 !-> MESSAGE/CONTINUE 1234567890.12346
1234567890.12346
say `1.234567890123456789E9,p=-4`
 !-> MESSAGE/CONTINUE 1234567890.1235
1234567890.1235
say `1.234567890123456789E9,p=-3`
 !-> MESSAGE/CONTINUE 1234567890.123
1234567890.123
say `1.234567890123456789E9,p=-2`
 !-> MESSAGE/CONTINUE 1234567890.12
1234567890.12
say `1.234567890123456789E9,p=-1`
 !-> MESSAGE/CONTINUE 1234567890.1
1234567890.1
say `1.234567890123456789E9,p=0`
 !-> MESSAGE/CONTINUE 1234567890
1234567890
say `1.234567890123456789E9,p=1`
 !-> MESSAGE/CONTINUE 1.E+09
1.E+09
say `1.234567890123456789E9,p=2`
 !-> MESSAGE/CONTINUE 1.2E+09
1.2E+09
say `1.234567890123456789E9,p=3`
 !-> MESSAGE/CONTINUE 1.23E+09
1.23E+09
say `1.234567890123456789E9,p=4`
 !-> MESSAGE/CONTINUE 1.235E+09
1.235E+09
say `1.234567890123456789E9,p=5`
 !-> MESSAGE/CONTINUE 1.2346E+09
1.2346E+09
say `1.234567890123456789E9,p=6`
 !-> MESSAGE/CONTINUE 1.23457E+09
1.23457E+09
say `1.234567890123456789E9,p=7`
 !-> MESSAGE/CONTINUE 1.234568E+09
1.234568E+09
say `1.234567890123456789E9,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E+09
1.2345679E+09
say `1.234567890123456789E9,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E+09
1.23456789E+09
say `1.234567890123456789E9,p=10`
 !-> MESSAGE/CONTINUE 1234567890
1234567890
say `1.234567890123456789E9,p=11`
 !-> MESSAGE/CONTINUE 1234567890.1
1234567890.1
say `1.234567890123456789E9,p=12`
 !-> MESSAGE/CONTINUE 1234567890.12
1234567890.12
say `1.234567890123456789E9,p=13`
 !-> MESSAGE/CONTINUE 1234567890.123
1234567890.123
say `1.234567890123456789E9,p=14`
 !-> MESSAGE/CONTINUE 1234567890.1235
1234567890.1235
say `1.234567890123456789E9,p=15`
 !-> MESSAGE/CONTINUE 1234567890.12346
1234567890.12346
say `1.234567890123456789E9,p=16`
 !-> MESSAGE/CONTINUE 1234567890.123457
1234567890.123457
 
say `1.234567890123456789E10,p=-16`
 !-> MESSAGE/CONTINUE 12345678901.23457
12345678901.23457
say `1.234567890123456789E10,p=-15`
 !-> MESSAGE/CONTINUE 12345678901.23457
12345678901.23457
say `1.234567890123456789E10,p=-14`
 !-> MESSAGE/CONTINUE 12345678901.23457
12345678901.23457
say `1.234567890123456789E10,p=-13`
 !-> MESSAGE/CONTINUE 12345678901.23457
12345678901.23457
say `1.234567890123456789E10,p=-12`
 !-> MESSAGE/CONTINUE 12345678901.23457
12345678901.23457
say `1.234567890123456789E10,p=-11`
 !-> MESSAGE/CONTINUE 12345678901.23457
12345678901.23457
say `1.234567890123456789E10,p=-10`
 !-> MESSAGE/CONTINUE 12345678901.23457
12345678901.23457
say `1.234567890123456789E10,p=-9`
 !-> MESSAGE/CONTINUE 12345678901.23457
12345678901.23457
say `1.234567890123456789E10,p=-8`
 !-> MESSAGE/CONTINUE 12345678901.23457
12345678901.23457
say `1.234567890123456789E10,p=-7`
 !-> MESSAGE/CONTINUE 12345678901.23457
12345678901.23457
say `1.234567890123456789E10,p=-6`
 !-> MESSAGE/CONTINUE 12345678901.234568
12345678901.234568
say `1.234567890123456789E10,p=-5`
 !-> MESSAGE/CONTINUE 12345678901.23457
12345678901.23457
say `1.234567890123456789E10,p=-4`
 !-> MESSAGE/CONTINUE 12345678901.2346
12345678901.2346
say `1.234567890123456789E10,p=-3`
 !-> MESSAGE/CONTINUE 12345678901.235
12345678901.235
say `1.234567890123456789E10,p=-2`
 !-> MESSAGE/CONTINUE 12345678901.23
12345678901.23
say `1.234567890123456789E10,p=-1`
 !-> MESSAGE/CONTINUE 12345678901.2
12345678901.2
say `1.234567890123456789E10,p=0`
 !-> MESSAGE/CONTINUE 12345678901
12345678901
say `1.234567890123456789E10,p=1`
 !-> MESSAGE/CONTINUE 1.E+10
1.E+10
say `1.234567890123456789E10,p=2`
 !-> MESSAGE/CONTINUE 1.2E+10
1.2E+10
say `1.234567890123456789E10,p=3`
 !-> MESSAGE/CONTINUE 1.23E+10
1.23E+10
say `1.234567890123456789E10,p=4`
 !-> MESSAGE/CONTINUE 1.235E+10
1.235E+10
say `1.234567890123456789E10,p=5`
 !-> MESSAGE/CONTINUE 1.2346E+10
1.2346E+10
say `1.234567890123456789E10,p=6`
 !-> MESSAGE/CONTINUE 1.23457E+10
1.23457E+10
say `1.234567890123456789E10,p=7`
 !-> MESSAGE/CONTINUE 1.234568E+10
1.234568E+10
say `1.234567890123456789E10,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E+10
1.2345679E+10
say `1.234567890123456789E10,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E+10
1.23456789E+10
say `1.234567890123456789E10,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E+10
1.23456789E+10
say `1.234567890123456789E10,p=11`
 !-> MESSAGE/CONTINUE 12345678901
12345678901
say `1.234567890123456789E10,p=12`
 !-> MESSAGE/CONTINUE 12345678901.2
12345678901.2
say `1.234567890123456789E10,p=13`
 !-> MESSAGE/CONTINUE 12345678901.23
12345678901.23
say `1.234567890123456789E10,p=14`
 !-> MESSAGE/CONTINUE 12345678901.235
12345678901.235
say `1.234567890123456789E10,p=15`
 !-> MESSAGE/CONTINUE 12345678901.2346
12345678901.2346
say `1.234567890123456789E10,p=16`
 !-> MESSAGE/CONTINUE 12345678901.23457
12345678901.23457
 
say `1.234567890123456789E11,p=-16`
 !-> MESSAGE/CONTINUE 123456789012.3457
123456789012.3457
say `1.234567890123456789E11,p=-15`
 !-> MESSAGE/CONTINUE 123456789012.3457
123456789012.3457
say `1.234567890123456789E11,p=-14`
 !-> MESSAGE/CONTINUE 123456789012.3457
123456789012.3457
say `1.234567890123456789E11,p=-13`
 !-> MESSAGE/CONTINUE 123456789012.3457
123456789012.3457
say `1.234567890123456789E11,p=-12`
 !-> MESSAGE/CONTINUE 123456789012.3457
123456789012.3457
say `1.234567890123456789E11,p=-11`
 !-> MESSAGE/CONTINUE 123456789012.3457
123456789012.3457
say `1.234567890123456789E11,p=-10`
 !-> MESSAGE/CONTINUE 123456789012.3457
123456789012.3457
say `1.234567890123456789E11,p=-9`
 !-> MESSAGE/CONTINUE 123456789012.3457
123456789012.3457
say `1.234567890123456789E11,p=-8`
 !-> MESSAGE/CONTINUE 123456789012.3457
123456789012.3457
say `1.234567890123456789E11,p=-7`
 !-> MESSAGE/CONTINUE 123456789012.3457
123456789012.3457
say `1.234567890123456789E11,p=-6`
 !-> MESSAGE/CONTINUE 123456789012.3457
123456789012.3457
say `1.234567890123456789E11,p=-5`
 !-> MESSAGE/CONTINUE 123456789012.34567
123456789012.34567
say `1.234567890123456789E11,p=-4`
 !-> MESSAGE/CONTINUE 123456789012.3457
123456789012.3457
say `1.234567890123456789E11,p=-3`
 !-> MESSAGE/CONTINUE 123456789012.346
123456789012.346
say `1.234567890123456789E11,p=-2`
 !-> MESSAGE/CONTINUE 123456789012.35
123456789012.35
say `1.234567890123456789E11,p=-1`
 !-> MESSAGE/CONTINUE 123456789012.3
123456789012.3
say `1.234567890123456789E11,p=0`
 !-> MESSAGE/CONTINUE 123456789012
123456789012
say `1.234567890123456789E11,p=1`
 !-> MESSAGE/CONTINUE 1.E+11
1.E+11
say `1.234567890123456789E11,p=2`
 !-> MESSAGE/CONTINUE 1.2E+11
1.2E+11
say `1.234567890123456789E11,p=3`
 !-> MESSAGE/CONTINUE 1.23E+11
1.23E+11
say `1.234567890123456789E11,p=4`
 !-> MESSAGE/CONTINUE 1.235E+11
1.235E+11
say `1.234567890123456789E11,p=5`
 !-> MESSAGE/CONTINUE 1.2346E+11
1.2346E+11
say `1.234567890123456789E11,p=6`
 !-> MESSAGE/CONTINUE 1.23457E+11
1.23457E+11
say `1.234567890123456789E11,p=7`
 !-> MESSAGE/CONTINUE 1.234568E+11
1.234568E+11
say `1.234567890123456789E11,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E+11
1.2345679E+11
say `1.234567890123456789E11,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E+11
1.23456789E+11
say `1.234567890123456789E11,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E+11
1.23456789E+11
say `1.234567890123456789E11,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901E+11
1.2345678901E+11
say `1.234567890123456789E11,p=12`
 !-> MESSAGE/CONTINUE 123456789012
123456789012
say `1.234567890123456789E11,p=13`
 !-> MESSAGE/CONTINUE 123456789012.3
123456789012.3
say `1.234567890123456789E11,p=14`
 !-> MESSAGE/CONTINUE 123456789012.35
123456789012.35
say `1.234567890123456789E11,p=15`
 !-> MESSAGE/CONTINUE 123456789012.346
123456789012.346
say `1.234567890123456789E11,p=16`
 !-> MESSAGE/CONTINUE 123456789012.3457
123456789012.3457
 
say `1.234567890123456789E12,p=-16`
 !-> MESSAGE/CONTINUE 1234567890123.457
1234567890123.457
say `1.234567890123456789E12,p=-15`
 !-> MESSAGE/CONTINUE 1234567890123.457
1234567890123.457
say `1.234567890123456789E12,p=-14`
 !-> MESSAGE/CONTINUE 1234567890123.457
1234567890123.457
say `1.234567890123456789E12,p=-13`
 !-> MESSAGE/CONTINUE 1234567890123.457
1234567890123.457
say `1.234567890123456789E12,p=-12`
 !-> MESSAGE/CONTINUE 1234567890123.457
1234567890123.457
say `1.234567890123456789E12,p=-11`
 !-> MESSAGE/CONTINUE 1234567890123.457
1234567890123.457
say `1.234567890123456789E12,p=-10`
 !-> MESSAGE/CONTINUE 1234567890123.457
1234567890123.457
say `1.234567890123456789E12,p=-9`
 !-> MESSAGE/CONTINUE 1234567890123.457
1234567890123.457
say `1.234567890123456789E12,p=-8`
 !-> MESSAGE/CONTINUE 1234567890123.457
1234567890123.457
say `1.234567890123456789E12,p=-7`
 !-> MESSAGE/CONTINUE 1234567890123.457
1234567890123.457
say `1.234567890123456789E12,p=-6`
 !-> MESSAGE/CONTINUE 1234567890123.457
1234567890123.457
say `1.234567890123456789E12,p=-5`
 !-> MESSAGE/CONTINUE 1234567890123.457
1234567890123.457
say `1.234567890123456789E12,p=-4`
 !-> MESSAGE/CONTINUE 1234567890123.4568
1234567890123.4568
say `1.234567890123456789E12,p=-3`
 !-> MESSAGE/CONTINUE 1234567890123.457
1234567890123.457
say `1.234567890123456789E12,p=-2`
 !-> MESSAGE/CONTINUE 1234567890123.46
1234567890123.46
say `1.234567890123456789E12,p=-1`
 !-> MESSAGE/CONTINUE 1234567890123.5
1234567890123.5
say `1.234567890123456789E12,p=0`
 !-> MESSAGE/CONTINUE 1234567890123
1234567890123
say `1.234567890123456789E12,p=1`
 !-> MESSAGE/CONTINUE 1.E+12
1.E+12
say `1.234567890123456789E12,p=2`
 !-> MESSAGE/CONTINUE 1.2E+12
1.2E+12
say `1.234567890123456789E12,p=3`
 !-> MESSAGE/CONTINUE 1.23E+12
1.23E+12
say `1.234567890123456789E12,p=4`
 !-> MESSAGE/CONTINUE 1.235E+12
1.235E+12
say `1.234567890123456789E12,p=5`
 !-> MESSAGE/CONTINUE 1.2346E+12
1.2346E+12
say `1.234567890123456789E12,p=6`
 !-> MESSAGE/CONTINUE 1.23457E+12
1.23457E+12
say `1.234567890123456789E12,p=7`
 !-> MESSAGE/CONTINUE 1.234568E+12
1.234568E+12
say `1.234567890123456789E12,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E+12
1.2345679E+12
say `1.234567890123456789E12,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E+12
1.23456789E+12
say `1.234567890123456789E12,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E+12
1.23456789E+12
say `1.234567890123456789E12,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901E+12
1.2345678901E+12
say `1.234567890123456789E12,p=12`
 !-> MESSAGE/CONTINUE 1.23456789012E+12
1.23456789012E+12
say `1.234567890123456789E12,p=13`
 !-> MESSAGE/CONTINUE 1234567890123
1234567890123
say `1.234567890123456789E12,p=14`
 !-> MESSAGE/CONTINUE 1234567890123.5
1234567890123.5
say `1.234567890123456789E12,p=15`
 !-> MESSAGE/CONTINUE 1234567890123.46
1234567890123.46
say `1.234567890123456789E12,p=16`
 !-> MESSAGE/CONTINUE 1234567890123.457
1234567890123.457
 
say `1.234567890123456789E13,p=-16`
 !-> MESSAGE/CONTINUE 12345678901234.57
12345678901234.57
say `1.234567890123456789E13,p=-15`
 !-> MESSAGE/CONTINUE 12345678901234.57
12345678901234.57
say `1.234567890123456789E13,p=-14`
 !-> MESSAGE/CONTINUE 12345678901234.57
12345678901234.57
say `1.234567890123456789E13,p=-13`
 !-> MESSAGE/CONTINUE 12345678901234.57
12345678901234.57
say `1.234567890123456789E13,p=-12`
 !-> MESSAGE/CONTINUE 12345678901234.57
12345678901234.57
say `1.234567890123456789E13,p=-11`
 !-> MESSAGE/CONTINUE 12345678901234.57
12345678901234.57
say `1.234567890123456789E13,p=-10`
 !-> MESSAGE/CONTINUE 12345678901234.57
12345678901234.57
say `1.234567890123456789E13,p=-9`
 !-> MESSAGE/CONTINUE 12345678901234.57
12345678901234.57
say `1.234567890123456789E13,p=-8`
 !-> MESSAGE/CONTINUE 12345678901234.57
12345678901234.57
say `1.234567890123456789E13,p=-7`
 !-> MESSAGE/CONTINUE 12345678901234.57
12345678901234.57
say `1.234567890123456789E13,p=-6`
 !-> MESSAGE/CONTINUE 12345678901234.57
12345678901234.57
say `1.234567890123456789E13,p=-5`
 !-> MESSAGE/CONTINUE 12345678901234.57
12345678901234.57
say `1.234567890123456789E13,p=-4`
 !-> MESSAGE/CONTINUE 12345678901234.57
12345678901234.57
say `1.234567890123456789E13,p=-3`
 !-> MESSAGE/CONTINUE 12345678901234.568
12345678901234.568
say `1.234567890123456789E13,p=-2`
 !-> MESSAGE/CONTINUE 12345678901234.57
12345678901234.57
say `1.234567890123456789E13,p=-1`
 !-> MESSAGE/CONTINUE 12345678901234.6
12345678901234.6
say `1.234567890123456789E13,p=0`
 !-> MESSAGE/CONTINUE 12345678901235
12345678901235
say `1.234567890123456789E13,p=1`
 !-> MESSAGE/CONTINUE 1.E+13
1.E+13
say `1.234567890123456789E13,p=2`
 !-> MESSAGE/CONTINUE 1.2E+13
1.2E+13
say `1.234567890123456789E13,p=3`
 !-> MESSAGE/CONTINUE 1.23E+13
1.23E+13
say `1.234567890123456789E13,p=4`
 !-> MESSAGE/CONTINUE 1.235E+13
1.235E+13
say `1.234567890123456789E13,p=5`
 !-> MESSAGE/CONTINUE 1.2346E+13
1.2346E+13
say `1.234567890123456789E13,p=6`
 !-> MESSAGE/CONTINUE 1.23457E+13
1.23457E+13
say `1.234567890123456789E13,p=7`
 !-> MESSAGE/CONTINUE 1.234568E+13
1.234568E+13
say `1.234567890123456789E13,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E+13
1.2345679E+13
say `1.234567890123456789E13,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E+13
1.23456789E+13
say `1.234567890123456789E13,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E+13
1.23456789E+13
say `1.234567890123456789E13,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901E+13
1.2345678901E+13
say `1.234567890123456789E13,p=12`
 !-> MESSAGE/CONTINUE 1.23456789012E+13
1.23456789012E+13
say `1.234567890123456789E13,p=13`
 !-> MESSAGE/CONTINUE 1.234567890123E+13
1.234567890123E+13
say `1.234567890123456789E13,p=14`
 !-> MESSAGE/CONTINUE 12345678901235
12345678901235
say `1.234567890123456789E13,p=15`
 !-> MESSAGE/CONTINUE 12345678901234.6
12345678901234.6
say `1.234567890123456789E13,p=16`
 !-> MESSAGE/CONTINUE 12345678901234.57
12345678901234.57
 
say `1.234567890123456789E14,p=-16`
 !-> MESSAGE/CONTINUE 123456789012345.7
123456789012345.7
say `1.234567890123456789E14,p=-15`
 !-> MESSAGE/CONTINUE 123456789012345.7
123456789012345.7
say `1.234567890123456789E14,p=-14`
 !-> MESSAGE/CONTINUE 123456789012345.7
123456789012345.7
say `1.234567890123456789E14,p=-13`
 !-> MESSAGE/CONTINUE 123456789012345.7
123456789012345.7
say `1.234567890123456789E14,p=-12`
 !-> MESSAGE/CONTINUE 123456789012345.7
123456789012345.7
say `1.234567890123456789E14,p=-11`
 !-> MESSAGE/CONTINUE 123456789012345.7
123456789012345.7
say `1.234567890123456789E14,p=-10`
 !-> MESSAGE/CONTINUE 123456789012345.7
123456789012345.7
say `1.234567890123456789E14,p=-9`
 !-> MESSAGE/CONTINUE 123456789012345.7
123456789012345.7
say `1.234567890123456789E14,p=-8`
 !-> MESSAGE/CONTINUE 123456789012345.7
123456789012345.7
say `1.234567890123456789E14,p=-7`
 !-> MESSAGE/CONTINUE 123456789012345.7
123456789012345.7
say `1.234567890123456789E14,p=-6`
 !-> MESSAGE/CONTINUE 123456789012345.7
123456789012345.7
say `1.234567890123456789E14,p=-5`
 !-> MESSAGE/CONTINUE 123456789012345.7
123456789012345.7
say `1.234567890123456789E14,p=-4`
 !-> MESSAGE/CONTINUE 123456789012345.7
123456789012345.7
say `1.234567890123456789E14,p=-3`
 !-> MESSAGE/CONTINUE 123456789012345.7
123456789012345.7
say `1.234567890123456789E14,p=-2`
 !-> MESSAGE/CONTINUE 123456789012345.67
123456789012345.67
say `1.234567890123456789E14,p=-1`
 !-> MESSAGE/CONTINUE 123456789012345.7
123456789012345.7
say `1.234567890123456789E14,p=0`
 !-> MESSAGE/CONTINUE 123456789012346
123456789012346
say `1.234567890123456789E14,p=1`
 !-> MESSAGE/CONTINUE 1.E+14
1.E+14
say `1.234567890123456789E14,p=2`
 !-> MESSAGE/CONTINUE 1.2E+14
1.2E+14
say `1.234567890123456789E14,p=3`
 !-> MESSAGE/CONTINUE 1.23E+14
1.23E+14
say `1.234567890123456789E14,p=4`
 !-> MESSAGE/CONTINUE 1.235E+14
1.235E+14
say `1.234567890123456789E14,p=5`
 !-> MESSAGE/CONTINUE 1.2346E+14
1.2346E+14
say `1.234567890123456789E14,p=6`
 !-> MESSAGE/CONTINUE 1.23457E+14
1.23457E+14
say `1.234567890123456789E14,p=7`
 !-> MESSAGE/CONTINUE 1.234568E+14
1.234568E+14
say `1.234567890123456789E14,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E+14
1.2345679E+14
say `1.234567890123456789E14,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E+14
1.23456789E+14
say `1.234567890123456789E14,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E+14
1.23456789E+14
say `1.234567890123456789E14,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901E+14
1.2345678901E+14
say `1.234567890123456789E14,p=12`
 !-> MESSAGE/CONTINUE 1.23456789012E+14
1.23456789012E+14
say `1.234567890123456789E14,p=13`
 !-> MESSAGE/CONTINUE 1.234567890123E+14
1.234567890123E+14
say `1.234567890123456789E14,p=14`
 !-> MESSAGE/CONTINUE 1.2345678901235E+14
1.2345678901235E+14
say `1.234567890123456789E14,p=15`
 !-> MESSAGE/CONTINUE 123456789012346
123456789012346
say `1.234567890123456789E14,p=16`
 !-> MESSAGE/CONTINUE 123456789012345.7
123456789012345.7
 
say `1.234567890123456789E15,p=-16`
 !-> MESSAGE/CONTINUE 1234567890123457
1234567890123457
say `1.234567890123456789E15,p=-15`
 !-> MESSAGE/CONTINUE 1234567890123457
1234567890123457
say `1.234567890123456789E15,p=-14`
 !-> MESSAGE/CONTINUE 1234567890123457
1234567890123457
say `1.234567890123456789E15,p=-13`
 !-> MESSAGE/CONTINUE 1234567890123457
1234567890123457
say `1.234567890123456789E15,p=-12`
 !-> MESSAGE/CONTINUE 1234567890123457
1234567890123457
say `1.234567890123456789E15,p=-11`
 !-> MESSAGE/CONTINUE 1234567890123457
1234567890123457
say `1.234567890123456789E15,p=-10`
 !-> MESSAGE/CONTINUE 1234567890123457
1234567890123457
say `1.234567890123456789E15,p=-9`
 !-> MESSAGE/CONTINUE 1234567890123457
1234567890123457
say `1.234567890123456789E15,p=-8`
 !-> MESSAGE/CONTINUE 1234567890123457
1234567890123457
say `1.234567890123456789E15,p=-7`
 !-> MESSAGE/CONTINUE 1234567890123457
1234567890123457
say `1.234567890123456789E15,p=-6`
 !-> MESSAGE/CONTINUE 1234567890123457
1234567890123457
say `1.234567890123456789E15,p=-5`
 !-> MESSAGE/CONTINUE 1234567890123457
1234567890123457
say `1.234567890123456789E15,p=-4`
 !-> MESSAGE/CONTINUE 1234567890123457
1234567890123457
say `1.234567890123456789E15,p=-3`
 !-> MESSAGE/CONTINUE 1234567890123457
1234567890123457
say `1.234567890123456789E15,p=-2`
 !-> MESSAGE/CONTINUE 1234567890123457
1234567890123457
say `1.234567890123456789E15,p=-1`
 !-> MESSAGE/CONTINUE 1234567890123456.8
1234567890123456.8
say `1.234567890123456789E15,p=0`
 !-> MESSAGE/CONTINUE 1234567890123457
1234567890123457
say `1.234567890123456789E15,p=1`
 !-> MESSAGE/CONTINUE 1.E+15
1.E+15
say `1.234567890123456789E15,p=2`
 !-> MESSAGE/CONTINUE 1.2E+15
1.2E+15
say `1.234567890123456789E15,p=3`
 !-> MESSAGE/CONTINUE 1.23E+15
1.23E+15
say `1.234567890123456789E15,p=4`
 !-> MESSAGE/CONTINUE 1.235E+15
1.235E+15
say `1.234567890123456789E15,p=5`
 !-> MESSAGE/CONTINUE 1.2346E+15
1.2346E+15
say `1.234567890123456789E15,p=6`
 !-> MESSAGE/CONTINUE 1.23457E+15
1.23457E+15
say `1.234567890123456789E15,p=7`
 !-> MESSAGE/CONTINUE 1.234568E+15
1.234568E+15
say `1.234567890123456789E15,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E+15
1.2345679E+15
say `1.234567890123456789E15,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E+15
1.23456789E+15
say `1.234567890123456789E15,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E+15
1.23456789E+15
say `1.234567890123456789E15,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901E+15
1.2345678901E+15
say `1.234567890123456789E15,p=12`
 !-> MESSAGE/CONTINUE 1.23456789012E+15
1.23456789012E+15
say `1.234567890123456789E15,p=13`
 !-> MESSAGE/CONTINUE 1.234567890123E+15
1.234567890123E+15
say `1.234567890123456789E15,p=14`
 !-> MESSAGE/CONTINUE 1.2345678901235E+15
1.2345678901235E+15
say `1.234567890123456789E15,p=15`
 !-> MESSAGE/CONTINUE 1.23456789012346E+15
1.23456789012346E+15
say `1.234567890123456789E15,p=16`
 !-> MESSAGE/CONTINUE 1234567890123457
1234567890123457
 
say `1.234567890123456789E16,p=-16`
 !-> MESSAGE/CONTINUE 1.234567890123457E+16
1.234567890123457E+16
say `1.234567890123456789E16,p=-15`
 !-> MESSAGE/CONTINUE 1.234567890123457E+16
1.234567890123457E+16
say `1.234567890123456789E16,p=-14`
 !-> MESSAGE/CONTINUE 1.234567890123457E+16
1.234567890123457E+16
say `1.234567890123456789E16,p=-13`
 !-> MESSAGE/CONTINUE 1.234567890123457E+16
1.234567890123457E+16
say `1.234567890123456789E16,p=-12`
 !-> MESSAGE/CONTINUE 1.234567890123457E+16
1.234567890123457E+16
say `1.234567890123456789E16,p=-11`
 !-> MESSAGE/CONTINUE 1.234567890123457E+16
1.234567890123457E+16
say `1.234567890123456789E16,p=-10`
 !-> MESSAGE/CONTINUE 1.234567890123457E+16
1.234567890123457E+16
say `1.234567890123456789E16,p=-9`
 !-> MESSAGE/CONTINUE 1.234567890123457E+16
1.234567890123457E+16
say `1.234567890123456789E16,p=-8`
 !-> MESSAGE/CONTINUE 1.234567890123457E+16
1.234567890123457E+16
say `1.234567890123456789E16,p=-7`
 !-> MESSAGE/CONTINUE 1.234567890123457E+16
1.234567890123457E+16
say `1.234567890123456789E16,p=-6`
 !-> MESSAGE/CONTINUE 1.234567890123457E+16
1.234567890123457E+16
say `1.234567890123456789E16,p=-5`
 !-> MESSAGE/CONTINUE 1.234567890123457E+16
1.234567890123457E+16
say `1.234567890123456789E16,p=-4`
 !-> MESSAGE/CONTINUE 1.234567890123457E+16
1.234567890123457E+16
say `1.234567890123456789E16,p=-3`
 !-> MESSAGE/CONTINUE 1.234567890123457E+16
1.234567890123457E+16
say `1.234567890123456789E16,p=-2`
 !-> MESSAGE/CONTINUE 1.234567890123457E+16
1.234567890123457E+16
say `1.234567890123456789E16,p=-1`
 !-> MESSAGE/CONTINUE 1.234567890123457E+16
1.234567890123457E+16
say `1.234567890123456789E16,p=0`
 !-> MESSAGE/CONTINUE 12345678901234568
12345678901234568
say `1.234567890123456789E16,p=1`
 !-> MESSAGE/CONTINUE 1.E+16
1.E+16
say `1.234567890123456789E16,p=2`
 !-> MESSAGE/CONTINUE 1.2E+16
1.2E+16
say `1.234567890123456789E16,p=3`
 !-> MESSAGE/CONTINUE 1.23E+16
1.23E+16
say `1.234567890123456789E16,p=4`
 !-> MESSAGE/CONTINUE 1.235E+16
1.235E+16
say `1.234567890123456789E16,p=5`
 !-> MESSAGE/CONTINUE 1.2346E+16
1.2346E+16
say `1.234567890123456789E16,p=6`
 !-> MESSAGE/CONTINUE 1.23457E+16
1.23457E+16
say `1.234567890123456789E16,p=7`
 !-> MESSAGE/CONTINUE 1.234568E+16
1.234568E+16
say `1.234567890123456789E16,p=8`
 !-> MESSAGE/CONTINUE 1.2345679E+16
1.2345679E+16
say `1.234567890123456789E16,p=9`
 !-> MESSAGE/CONTINUE 1.23456789E+16
1.23456789E+16
say `1.234567890123456789E16,p=10`
 !-> MESSAGE/CONTINUE 1.23456789E+16
1.23456789E+16
say `1.234567890123456789E16,p=11`
 !-> MESSAGE/CONTINUE 1.2345678901E+16
1.2345678901E+16
say `1.234567890123456789E16,p=12`
 !-> MESSAGE/CONTINUE 1.23456789012E+16
1.23456789012E+16
say `1.234567890123456789E16,p=13`
 !-> MESSAGE/CONTINUE 1.234567890123E+16
1.234567890123E+16
say `1.234567890123456789E16,p=14`
 !-> MESSAGE/CONTINUE 1.2345678901235E+16
1.2345678901235E+16
say `1.234567890123456789E16,p=15`
 !-> MESSAGE/CONTINUE 1.23456789012346E+16
1.23456789012346E+16
say `1.234567890123456789E16,p=16`
 !-> MESSAGE/CONTINUE 1.234567890123457E+16
1.234567890123457E+16
 
! adding lots of insignificant zeros
say `00000000000000000012345678901234567890`
 !-> MESSAGE/CONTINUE 1.234567890123457E+19
1.234567890123457E+19
say `000000000000000000.12345678901234567890`
 !-> MESSAGE/CONTINUE 0.1234567890123457
0.1234567890123457
say `0000.1234567890123456789000000000000000`
 !-> MESSAGE/CONTINUE 0.1234567890123457
0.1234567890123457
 
! other test cases, possibly in other tests
 
say `2.2100001 * 1e8`
 !-> MESSAGE/CONTINUE 221000010
221000010
say `2.2100001 * 1e9`
 !-> MESSAGE/CONTINUE 2210000100
2210000100
say `2.2100001 * 1e9`
 !-> MESSAGE/CONTINUE 2210000100
2210000100
say `2.2100001 * 1e13`
 !-> MESSAGE/CONTINUE 22100001000000
22100001000000
 
say `1.555555551e-9,p=10`
 !-> MESSAGE/CONTINUE 1.555555551E-09
1.555555551E-09
 
say `1234567890123456`
 !-> MESSAGE/CONTINUE 1234567890123456
1234567890123456
say `12345678901234567`
 !-> MESSAGE/CONTINUE 1.234567890123457E+16
1.234567890123457E+16
say `123456789012345678`
 !-> MESSAGE/CONTINUE 1.234567890123457E+17
1.234567890123457E+17
say `1234567890123456789`
 !-> MESSAGE/CONTINUE 1.234567890123457E+18
1.234567890123457E+18
say `12345678901234567890`
 !-> MESSAGE/CONTINUE 1.234567890123457E+19
1.234567890123457E+19
say `123456789012345678901`
 !-> MESSAGE/CONTINUE 1.234567890123457E+20
1.234567890123457E+20
say `1234567890123456789012`
 !-> MESSAGE/CONTINUE 1.234567890123457E+21
1.234567890123457E+21
say `12345678901234567890123`
 !-> MESSAGE/CONTINUE 1.234567890123457E+22
1.234567890123457E+22
say `123456789012345678901234`
 !-> MESSAGE/CONTINUE 1.234567890123457E+23
1.234567890123457E+23
 
say `1e-5,p=-1`
 !-> MESSAGE/CONTINUE 0.0
0.0
say `1e-6,p=-1`
 !-> MESSAGE/CONTINUE 0.0
0.0
say `1e-7,p=-1`
 !-> MESSAGE/CONTINUE 0.0
0.0
say `1e-11,p=-1`
 !-> MESSAGE/CONTINUE 0.0
0.0
 
list/prec=12 {`1 + 0.1`, `1 + 1e-7`, `1 + 1e-8`} - 1
 !-> list/prec=12 {1.1, 1.0000001, 1.00000001} - 1
             VARIABLE : {1.1, 1.0000001, 1.00000001} - 1
             SUBSET   : 3 points (X)
 1   / 1:  0.100000000000
 2   / 2:  0.000000100000
 3   / 3:  0.000000010000
 
list/prec=12 1.000000001,`1.000000001`
 !-> list/prec=12 1.000000001,1.000000001
 Column  1: cnst is constant
 Column  2: cnst is constant
                   cnst       cnst
I / *:     1.00000000100  1.00000000100
 
list/prec=12 0.999999999, `0.999999999`
 !-> list/prec=12 0.999999999, 0.999999999
 Column  1: cnst is constant
 Column  2: cnst is constant
                    cnst        cnst
I / *:     0.999999999000  0.999999999000
list/prec=12 1.000500001,`1.000500001`
 !-> list/prec=12 1.000500001,1.000500001
 Column  1: cnst is constant
 Column  2: cnst is constant
                   cnst       cnst
I / *:     1.00050000100  1.00050000100
 
say `1.55555e8,p=2`
 !-> MESSAGE/CONTINUE 1.6E+08
1.6E+08
say `1.55555e7,p=2`
 !-> MESSAGE/CONTINUE 1.6E+07
1.6E+07
 
say `1.55555e-8,p=2`
 !-> MESSAGE/CONTINUE 1.6E-08
1.6E-08
 
say `1.555555555e-9,p=1`
 !-> MESSAGE/CONTINUE 2.E-09
2.E-09
 
say `1.555555555e-9,p=2`
 !-> MESSAGE/CONTINUE 1.6E-09
1.6E-09
 
say `1.555555555e-9,p=3`
 !-> MESSAGE/CONTINUE 1.56E-09
1.56E-09
 
say `1.555555555e-9,p=4`
 !-> MESSAGE/CONTINUE 1.556E-09
1.556E-09
 
list/nohead/p=16 1234567890123456, `1234567890123456`
 !-> list/nohead/PREC=16 1234567890123456, 1234567890123456
I / *:     1234567890123456.  1234567890123456.
list/nohead/p=16 1234567890123456, `1234567890123456,p=16`
 !-> list/nohead/PREC=16 1234567890123456, 1234567890123456
I / *:     1234567890123456.  1234567890123456.
 
! negative precision: don't do fixed decimal format if it will
! list too many digits
 
say `2.2 * 1e10,p=-5`
 !-> MESSAGE/CONTINUE 22000000000.00000
22000000000.00000
say `2.2 * 1e16,p=-5`
 !-> MESSAGE/CONTINUE 2.2E+16
2.2E+16
say `2.2 * 1e21,p=-5`
 !-> MESSAGE/CONTINUE 2.2E+21
2.2E+21
say `2.2 * 1e41,p=-5`
 !-> MESSAGE/CONTINUE 2.2E+41
2.2E+41
say `2.2 * 1e14,p=-1`
 !-> MESSAGE/CONTINUE 220000000000000.0
220000000000000.0
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err75_set_global_att_out
! err75_set_global_att_out.jnl
! 6/27/2019 Acm
!
! Issue 1942: Previously the second instance of "set att/output=all ."
! in a session caused an error.
 
use WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc
set att/output=all .
save/clobber/file=a.nc prof, time
 
set att/output=all .
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err75_key_labels
! err75_key_labels
! 7/1/2019  issue 1929
! various tests using data at different orders of magnitude.
! some switched back and forth from decimal to scientific notation
! some started adding too many digits.
 
use coads_climatology
 
set v ul
shade/L=1/x=150:220/y=-90:0 sst * 1e-6
set v ur
shade/L=1/x=150:220/y=-90:0 sst * 1e-12
set v ll
shade/L=1/x=150:220/y=-90:0/key=horiz sst * 1e-13
set v lr
shade/L=1/x=150:220/y=-90:0/key=horiz sst * 1e4
 
frame/file=key_labels_magnitude.gif
 
!!!! Remember to update documentation about precision=
! https://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/variables-xpressions/EMBEDDED-XPRESSIONS#_VPINDEXENTRY_576
! Changes here: In the case of a negative precision value, Ferret will again drop terminating zeros to the right of the decimal point.
! It does not drop terminating zero's and for large numbers does not return a decimal string result
!
!
! https://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/variables-xpressions/EMBEDDED-XPRESSIONS#_VPINDEXENTRY_572
! Changes here: [ for p=0] ...This also means that Ferret will always return at least one significant digit:
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err75_scale_missingval
! err75_scale_missingval.jnl
! Ticket 1948: variable with a missing_value flag only
! has zero's mis-handled.
 
! Additionally the values for missing and fill were not initialized,
! so the bug only shows up intermittantly. Reading a scaled var with
! bad=0 causes them to be set to 0 as in a fresh session.
 
let/bad=0 a = 1
define att/output a.scale_factor = 10
save/clobber/file=a.nc a
cancel var a
use a.nc
list a
             VARIABLE : 1
             FILENAME : a.nc
          1.000
cancel data/all
 
! The variable has a missing_value flag but not _FillValue
! The 0 in var was shown as missing
use scale_test
show attributes var1
     attributes for dataset: ./data/scale_test.nc
 VAR1.missing_value = -1.E+34
 VAR1.scale_factor = 1000
 VAR1.long_name = Var with missing_value only 
list var1
             VARIABLE : Var with missing_value only
             FILENAME : scale_test.nc
             SUBSET   : 3 by 2 points (X-Y)
             1      2      3    
             1      2      3
 1   / 1:  1100.     0.  2200.
 2   / 2:  3300.  4400.  4800.
 
! with a _FillValue attribute, it's treated correctly
show attributes var2
     attributes for dataset: ./data/scale_test.nc
 VAR2._FillValue = -1.E+34
 VAR2.scale_factor = 1000
 VAR2.long_name = Var with _FillValue only 
list var2
             VARIABLE : Var with _FillValue only
             FILENAME : scale_test.nc
             SUBSET   : 3 by 2 points (X-Y)
             1      2      3    
             1      2      3
 1   / 1:  1100.     0.  2200.
 2   / 2:  3300.  4400.  4800.
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err75_cancel_var
! err75_cancel_var.jnl
! Ticket 1957: For some combination of definitions,
! the wrong variable is saved to the file at the end of this.
! It stems from the cancel of an existing variable listed
! after a nonexistent variable with CANCEL VAR/NOERR
 
can region
 
let do_vars = {"t_surf_nino3","t_surf_nino4","t_surf_nino12","t_surf_nino34"}
!let do_vars = {"t_surf_nino3","t_surf_nino4","t_surf_nino12"}
let do_products = do_vars
 
let/u="degC" v1_t_surf = f1_sst[t=1-jan-1958:1-jan-2018]
let/u="degC" v1_t_surf_nino12 = v1_t_surf[x=90w:80w@ave,y=10s:0s@ave]
let/u="degC" v1_t_surf_nino3 = v1_t_surf[x=150w:90w@ave,y=5s:5n@ave]
let/u="degC" v1_t_surf_nino34 = v1_t_surf[x=170w:120w@ave,y=5s:5n@ave]
let/u="degC" v1_t_surf_nino4 = v1_t_surf[x=160e:150w@ave,y=5s:5n@ave]
 
use coads_climatology
let/title="ERSST (degC)" f1_sst = 1
 
let v2_do_vars = do_vars
let us_file_prefix = "f2_"
let us_chunkfile_template = " "
 
let pid = `spawn("exec perl -e 'print getppid,0'")`
 !-> DEFINE VARIABLE pid = #####
 
let us_start_yr = 1851
let us_end_yr = 2100
let us_chunklen = 250
 
let us_verbosity = 2
 
let/u="degC"/title="SPEAR" v2_t_surf = f2_t_surf[t=1-jan-1851:1-jan-2101]-273.15
let/u="hPa-1000"/title="SPEAR" v2_ps = f2_ps[t=1-jan-1851:1-jan-2101]/100-1000
let/u="cPa"/title="SPEAR" v2_tau_x = 0-100*f2_tau_x[t=1-jan-1851:1-jan-2101]
let/u="mm/day"/title="SPEAR" v2_precip = 86400*f2_precip[t=1-jan-1851:1-jan-2101]
 
let/u="hPa-1000"/title="SPEAR" v2_ps_darwin = v2_ps[x=130.9e,y=12.4s]
let/u="hPa-1000"/title="SPEAR" v2_ps_tahiti = v2_ps[x=149.6w,y=17.5s]
let/u="degC"/title="SPEAR" v2_t_surf_nino12 = v2_t_surf[x=90w:80w@ave,y=10s:0s@ave]
let/u="degC"/title="SPEAR" v2_t_surf_nino3 = v2_t_surf[x=150w:90w@ave,y=5s:5n@ave]
let/u="degC"/title="SPEAR" v2_t_surf_nino34 = v2_t_surf[x=170w:120w@ave,y=5s:5n@ave]
let/u="degC"/title="SPEAR" v2_t_surf_nino4 = v2_t_surf[x=160e:150w@ave,y=5s:5n@ave]
let/u="degC"/title="SPEAR" v2_t_surf_eeqio = v2_t_surf[x=90e:110e@ave,y=10s:0@ave]
let/u="degC"/title="SPEAR" v2_t_surf_weqio = v2_t_surf[x=50e:70e@ave,y=10s:10n@ave]
let/u="degC"/title="SPEAR" v2_t_surf_eqatl = v2_t_surf[x=22.5w:12.5e@ave,y=7.5s:7.5n@ave]
let/u="degC"/title="SPEAR" v2_t_surf_tnatl = v2_t_surf[x=52.5w:22.5w@ave,y=7.5n:22.5n@ave]
let/u="degC"/title="SPEAR" v2_t_surf_tsatl = v2_t_surf[x=17.5w:7.5e@ave,y=22.5s:7.5s@ave]
 
let/u="cPa"/title="SPEAR" v2_tau_x_nino3 = v2_tau_x[x=150w:90w@ave,y=5s:5n@ave]
let/u="cPa"/title="SPEAR" v2_tau_x_nino4 = v2_tau_x[x=160e:150w@ave,y=5s:5n@ave]
let/u="cPa"/title="SPEAR" v2_tau_x_weqpac = v2_tau_x[x=120e:160e@ave,y=5s:5n@ave]
let/u="cPa"/title="SPEAR" v2_tau_x_eqio = v2_tau_x[x=60e:95e@ave,y=5s:5n@ave]
let/u="cPa"/title="SPEAR" v2_tau_x_eqatl = v2_tau_x[x=40w:5e@ave,y=5s:5n@ave]
 
let/u="mm/day"/title="SPEAR" v2_precip_nino12 = v2_precip[x=90w:80w@ave,y=10s:0s@ave]
let/u="mm/day"/title="SPEAR" v2_precip_nino3 = v2_precip[x=150w:90w@ave,y=5s:5n@ave]
let/u="mm/day"/title="SPEAR" v2_precip_nino34 = v2_precip[x=170w:120w@ave,y=5s:5n@ave]
let/u="mm/day"/title="SPEAR" v2_precip_nino4 = v2_precip[x=160e:150w@ave,y=5s:5n@ave]
let/u="mm/day"/title="SPEAR" v2_precip_weqpac = v2_precip[x=120e:160e@ave,y=5s:5n@ave]
 
let us_f_vars = {"t_surf"}
let us_vprefixes = {"us_fh","us_cfiles","us_vars"}
 
 
let dvl_aux_prefixes = us_vprefixes
let dvl_filename_suffixes = {".nc",".des"}
 
let dvl_f_pre = dvl_aux_prefixes[i=1]
let dvl_c_pre = dvl_aux_prefixes[i=2]
let dvl_v_pre = dvl_aux_prefixes[i=3]
 
let dvl_file_suf = dvl_filename_suffixes[i=1]
let dvl_agg_suf = dvl_filename_suffixes[i=2]
 
let dvl_nvar = 1
 
let dvl_var = "t_surf"
let us_vars1 = {"t_surf"}
 
let us_cfiles1 = {"atmos.185101-210012.t_surf.nc"}
let us_fh1 = {"f2_t_surf.des","us_cfiles1","us_vars1"}
 
let us_fh_list = {"us_fh1"}
 
can var dvl_aux_prefixes dvl_filename_suffixes
can var dvl_f_pre dvl_c_pre dvl_v_pre dvl_file_suf dvl_agg_suf
can var dvl_nvar dvl_var
 
let us_needed_vars = "v2_"+v2_do_vars
let swv_vpre = "v2_"
let swv_targets = us_needed_vars
let swv_altvars = {""}
let swv_fhs = us_fh_list
let swv_fpre = "f2_"
let swv_clobber = 1
let swv_verbosity = 2
 
let svt_vars = swv_targets
let swv_needed =  {"v2_t_surf","v2_t_surf_nino12","v2_t_surf_nino3","v2_t_surf_nino34","v2_t_surf_nino4"}
can var svt_vars
 
let sint_v = {""}
let swv_sel_altvars = {""}
can var sint_v
 
let esa_n = 1
let swv_altvars_todo = 1
can var esa_n
 
let dummy = 1
can var swv_altvars_todo
 
 
! switching the order eliminates the bug!
can var/noerr nonexist_var dummy
!can var/noerr dummy nonexist_var
 
can var v2_precip v2_precip_nino12 v2_precip_nino3 v2_precip_nino34 v2_precip_nino4 v2_precip_weqpac v2_ps v2_ps_darwin v2_ps_tahiti v2_tau_x v2_tau_x_eqatl v2_tau_x_eqio v2_tau_x_nino3 v2_tau_x_nino4 v2_tau_x_weqpac v2_t_surf_eeqio v2_t_surf_eqatl v2_t_surf_tnatl v2_t_surf_tsatl v2_t_surf_weqio
 
let sfp_target_list ={"v2_t_surf","v2_t_surf_nino12","v2_t_surf_nino3","v2_t_surf_nino34","v2_t_surf_nino4"}
 
 
let sfp_fh_list = swv_fhs
let sfp_pre = "f2_"
let sfp_clobber = `swv_clobber`
 !-> DEFINE VARIABLE sfp_clobber = 1
let sfp_verbosity = 2
 
let sfp_wants = {"f2_t_surf"}
 
let sfp_file_status = 0
 
let sfp_filename = sfp_fh[i=1]
let sfp_cfiles = sfp_fh[i=2]
let sfp_has = dncase(sfp_pre + sfp_requestvars)
 
 
let sfp_fh0 = {"us_fh1"}
let sfp_fh = us_fh1
let sfp_num_elements = 3
let sfp_requestvars = {"t_surf"}
 
let sfp_prelen = strlen(sfp_pre)
let sfp_len = strlen(sfp_str)
let sfp_str_noprefix = substring(sfp_str,sfp_prelen+1,sfp_len-sfp_prelen)
 
let sfp_intersect = {""}
let sfp_str = sfp_intersect
 
 
let sfp_fh0 = sfp_fh_list[i=1]
let sfp_fh = us_fh1
let sfp_requestvars = {"t_surf"}
 
let sfp_intersect = {"f2_t_surf"}
 
 
let sfp_file_status = "valid"
 
let f2_t_surf = 1
 
 
can var sfp_wants sfp_file_status sfp_num_elements
can var sfp_fh0 sfp_fh sfp_filename sfp_cfiles sfp_requestvars sfp_has
can var sfp_target_list sfp_fh_list sfp_pre sfp_clobber sfp_verbosity
can var sfp_intersect sfp_prelen sfp_len sfp_str_noprefix
 
let dvsa_ilist = swv_sel_altvars
let dvsa_ilist_n = 1
 
can var dvsa_ilist dvsa_ilist_n
can var swv_needed swv_vpre swv_targets swv_altvars swv_fhs swv_fpre
can var swv_clobber swv_sel_altvars swv_verbosity
can var us_fh1 us_vars1
can var us_cfiles1
can var us_fh_list
can var us_f_vars us_vprefixes
can var us_file_prefix us_chunkfile_template us_start_yr us_end_yr us_chunklen us_verbosity
can var us_needed_vars
 
let prd_do_products = do_products
let prd_print_path = "."
let prd_do_ncfile = 0
let prd_do_statfile = 0
 
let prd_printfile = "`prd_print_path`/tave_spectrum/"+prd_subset+"/0/t_surf_nino3"
 !-> DEFINE VARIABLE prd_printfile = "./tave_spectrum/"+prd_subset+"/0/t_surf_nino3"
let prd_statfile = " "
let prd_ncfile = " "
can var prd_print_path
 
let prd_subset = "tropical_pacific"
 
let/title="NINO3 SST"/u="degC" prd_vname = "t_surf_nino3"
 
let prd_pow_hlim = "0:2.75:.5"
 
 
def ax/t=1-jan-1958:1-jan-2017/np=720/cal=GREGORIAN/unit=yr/edge prd_tax1
let prd_v1 = v1_t_surf_nino3[gt=prd_tax1]
 
def ax/t=1-jan-1851:1-jan-2100/np=3000/cal=JULIAN/unit=yr/edge prd_tax2
let prd_v2 = v2_t_surf_nino3[gt=prd_tax2]
 
let c1ds_statnames = {'din_p2_p7','din_p7_1p4','din_1p4_9','int25_1p4_9','int50_1p4_9','int75_1p4_9'}
let c1ds_statargs  = {'din " " .2:.7 2','din " " .7:1.4 2','din " " 1.4:9 2','intpt .25 1.4:9 2','intpt .5 1.4:9 2','intpt .75 1.4:9 2'}
let c1ds_statmasks = {1,1,1,1,1,1}
 
let gw_tval = t[gt=prd_v1]
let gw_tval_start = gw_tval[l=1]
let gw_tval_end = gw_tval[l=720]
 
def axis/t="57.00312881928521":"115.923077742109"/np=720/unit="YR"/t0="15-JAN-1901"/calendar="GREGORIAN" t_gw_var_reg
 
let app_use_memory = "memory" EQ "memory"
let/title="NINO3 SST"/unit=" " append_var = prd_v1[gt=t_gw_var_reg]
 
can var append_var
can var gw_tval gw_tval_start gw_tval_end
 
let gw_var = 1
 
let gw_dt = 0.0819470777786151
 
let gw_tmpdir = "get_wavelet.tmp"
 
let gd_var = gw_var
can var gd_var
 
def region/default save
can region
let ws_nxd = 1
let ws_nyd = 1
let ws_nzd = 1
let ws_ntd = 720
set region save
 
let/title="number of time points" ntimes =          720
let/title="number of scales" nscales =          140
let/title="starting scale"/unit="YR" s0 =   0.16389415555723019
let/title="scale increment"/unit=octaves dj =    5.0000000000000003E-002
let/title="time increment"/unit="YR" dt =    8.1947077778615096E-002
let/title="delta reconstruction factor" cdelta =   0.77600000000000002
let/title="wavelet energy scale" psi0 =   0.75112554446494251
let/title="timeseries reconstruction factor" rfactor =    1.5113206192113904
 
def axis/depth/z=0:`dj*(nscales-1)`/npoints=`nscales` z_scale_idx
 !-> def axis/depth/z=0:6.95/npoints=140 z_scale_idx
def grid/z=z_scale_idx gw_g_scale
 
let app_use_memory = "memory" EQ "memory"
let string_match = " " EQ "none"
 
let app_max_is_missing = 0
let app_verbose = 0
let app_rigid = 0
let app_ftitle_val = 0
let app_v_in = 1
let/title="scale"/unit=" " append_var = app_v_in
 
! when bug is present, the following command saves the wrong (and nonexistent) variable to the file!
! perhaps related to can var/noerr above?
show var/tree dummy, append_var
   in default dataset coads_climatology
   APPEND_VAR = APP_V_IN
     APP_V_IN = 1
   DUMMY ??			<== UNKNOWN VARIABLE ******
save/clobber/file=a.nc append_var
 
! See what we wrote:
! The file should contain APPEND_VAR, not DUMMY !!
use a.nc
list ..varnames
             VARIABLE : ..VARNAMES
             FILENAME : a.nc
        "APPEND_VAR"
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err751_dsg_fmask
! err751_dsg_fmask.jnl
! 8/20/2019
!  defining a mask based on feature values where
!  the feature-value may be missing
!  Canceling a mask, make sure data in memory not reused.
 
 
use DSG_ERDDAP_Tao5daySst.nc
 
let mask_by_code = if wmo_platform_code EQ 51011 or wmo_platform_code EQ 23003 then 1
list/m=1:20 wmo_platform_code, mask_by_code
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 1 to 20
 STATION           is Timeseries-id
 WMO_PLATFORM_CODE is WMO Platform Code
 MASK_BY_CODE      is IF WMO_PLATFORM_CODE EQ 51011 OR WMO_PLATFORM_CODE EQ 23003 THEN 1
    FEATURE  STATION     LONGITUDE  LATITUDE WMO_PLA MASK_BY_CODE
     1             0n0e         0E         0  13010.     ...
     2            0n10w        10W         0  15002.     ...
     3           0n110w       110W         0  32323.     ...
     4           0n125w       125W         0  51011.   1.000
     5           0n140w       140W         0  51311.     ...
     6           0n155w       155W         0  51023.     ...
     7           0n156e       156E         0  52317.     ...
     8           0n165e       165E         0  52321.     ...
     9           0n170w       170W         0  51010.     ...
    10            0n23w        23W         0  31007.     ...
    11            0n67e        67E         0  23015.     ...
    12          0n80.5e      80.5E         0  23001.     ...
    13            0n90e        90E         0  23004.     ...
    14            0n95w        95W         0  32321.     ...
    15          1.5n67e        67E      1.5N     ...     ...
    16          1.5s67e        67E      1.5S     ...     ...
    17        1.5s80.5e      80.5E      1.5S  23003.   1.000
    18           10s10w        10W       10S  15001.     ...
    19           12n23w        23W       12N  13001.     ...
    20           12n90e        90E       12N  23008.     ...
set data/fmask=mask_by_code 1
list t_25[t=@max]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
Mask on features has been set: IF WMO_PLATFORM_CODE EQ 51011 OR WMO_PLATFORM_CODE EQ 23003 THEN 1
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C) (maximum, each Timeseries-id)
    FEATURE  STATION     LONGITUDE  LATITUDE    T_25
     4           0n125w       125W         0   28.80
    17        1.5s80.5e      80.5E      1.5S   29.94
 
! Now if we cancel the mask check that all features used and listed ok
cancel data/fmask 1
list/m=1:20 t_25[t=@max]
   DATA SET: ./data/DSG_ERDDAP_Tao5daySst.nc
   TAO/TRITON, RAMA, and PIRATA Buoys, 5-Day, 1977-present, Sea Surface Temperature
   SUBSET   : E (instance): 1 to 20
 STATION    is Timeseries-id
 T_25       is Sea Surface Temperature (degree_C) (maximum, each Timeseries-id)
    FEATURE  STATION     LONGITUDE  LATITUDE    T_25
     1             0n0e         0E         0   29.86
     2            0n10w        10W         0   29.64
     3           0n110w       110W         0   27.63
     4           0n125w       125W         0   28.80
     5           0n140w       140W         0   27.36
     6           0n155w       155W         0   28.22
     7           0n156e       156E         0   30.77
     8           0n165e       165E         0   30.40
     9           0n170w       170W         0   27.88
    10            0n23w        23W         0   29.64
    11            0n67e        67E         0   30.44
    12          0n80.5e      80.5E         0   30.14
    13            0n90e        90E         0   29.73
    14            0n95w        95W         0   28.60
    15          1.5n67e        67E      1.5N   30.44
    16          1.5s67e        67E      1.5S   30.48
    17        1.5s80.5e      80.5E      1.5S   29.94
    18           10s10w        10W       10S   27.84
    19           12n23w        23W       12N   25.48
    20           12n90e        90E       12N   30.08
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err751_dsg_constraints
! err751_dsg_constraints
! Tickets 1953, 1954  Correctly applying constraints
! on PLOT command to DSG dataset plots.
 
! Ticket 1953. Y constraints on DSG trajectory ribbon-map plots.
! The data was constrained by /Y= but vertical axis had the
! original full Y range.
 
use simple_traj_dsg
plot/y=20:25 sst
! axis ends should be 20 and 25
show symbol yaxis*
YAXIS_MIN = "20.0000000"
YAXIS_MAX = "25.0000000"
YAXIS_REVERSED = "0"
 
! Ticket 1954. The second PLOT command with /X= giving degrees
! as Degrees-W returned an error. Should be identical.
 
use profile_dsg2.nc
plot/x=-122:-119/thick sal
show symbol *axis*
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "0"
YAXIS_MIN = "2.11999989"
YAXIS_MAX = "33.2111015"
XAXIS_MIN = "32.20000"
XAXIS_MAX = "34.80000"
 
plot/x=122w:119w/thick sal
show symbol *axis*
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "0"
YAXIS_MIN = "2.11999989"
YAXIS_MAX = "33.2111015"
XAXIS_MIN = "32.20000"
XAXIS_MAX = "34.80000"
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err751_set_global_atts
! err751_set_global_atts.jnl
!
! Issue 1955: files with dimensions that are not coords
! handling in grid creation step was incorrect.
! 10/24/2019  ACM
 
use dsg.nc
set att/output=all .
use dsg_cross_dateline.nc
 
! previously issued an error
set att/output=all .
 
cancel data/all
 
use WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc
set att/output=all .
let var = pco2*2
save/clobber/file=a.nc var
can var var
 
use a.nc
 
! previously issued an error
set att/output=all .
sh dat
     currently SET data sets:
    1> ./data/WestCoastCarbon_9d9c_f562_77b5_5f8e_5d19_7b1d.nc
       DSG Feature type Profile
 name     title                             I         J         K         L         M         N
 PROF     Prof                             ...       ...       ...       ...       1:21      ...
 PROFILE  profile ID: Cruise and Station   ...       ...       ...       ...       1:21      ...
 TIME     Time                             ...       ...       ...       ...       1:21      ...
 LATITUDE Latitude                         ...       ...       ...       ...       1:21      ...
 LONGITUDE
          Longitude                        ...       ...       ...       ...       1:21      ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:21      ...
 PRESS_DB PRESS_DB                         ...       ...     tot 373     ...       1:21      ...
 PCO2     PCO2                             ...       ...     tot 373     ...       1:21      ...
 
    2> ./a.nc  (default)
       DSG Feature type Profile
 name     title                             I         J         K         L         M         N
 PROFILE  profile ID: Cruise and Station   ...       ...       ...       ...       1:21      ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:21      ...
 LONGITUDE
          Longitude                        ...       ...       ...       ...       1:21      ...
 LATITUDE Latitude                         ...       ...       ...       ...       1:21      ...
 PRESS_DB PRESS_DB                         ...       ...     tot 373     ...       1:21      ...
 TIME     Time                             ...       ...       ...       ...       1:21      ...
 VAR      PCO2*2                           ...       ...     tot 373     ...       1:21      ...
 
save/clobber/file=a2.nc/z=0:30 var
 
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
 
! Now work with a global attribute by name
use a2.nc
 
show att ..Westernmost_Easting
     attributes for dataset: ./a2.nc
  .Westernmost_Easting = -122.5
set att/output ..Westernmost_Easting
save/clobber/file=a1.nc var
use a1.nc
show att .
     attributes for dataset: ./a1.nc
 ..history = FERRET V7.6  DD-MON-YY 
 ..Conventions = CF-1.6 
 ..Westernmost_Easting = -122.5
 ..featureType = Profile 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err751_show_grid_expr
! err751_show_grid_expr.jnl
! Issue 1961: show grid should say **full** not **compressed** for x,y axes.
! 12/4/2019
 
use coads_climatology
let var =  sst - sst[x=@ave,y=@ave]
! previously this said compressed for the X and Y axes.
show grid var
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
 
! The axes are not compressed...
say `var,return=shape`
 !-> MESSAGE/CONTINUE XYT
XYT
list/x=180/y=0 var
             VARIABLE : SST - SST[X=@AVE,Y=@AVE]
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (TIME)
             LONGITUDE: 179E
             LATITUDE : 1S
                    179E   
                     80
 16-JAN      / 1:  0.0000
 15-FEB      / 2:  0.0000
 17-MAR      / 3:  0.0000
 
! More examples extending the tests in bn_show_uvar_grid
 
use coads_climatology
let test = sst[x=240:320,y=0,t=@ave] + 6
show grid test
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            40 pts
 COADSY    LATITUDE            90 r   89S                  89N                 1 pt
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        compressed
 
! Modulo axes ask for superset
let var = sst[x=0:540,L=1:15] - sst[x=0:540,y=@ave,L=1:15]
show grid var
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            270 pts
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        15 pts
 
let var = sst - sst[x=240,y=@iin,t=@ave]
show grid var
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
 
! Result grid is full grid
let var = sst[L=@ave] - sst[x=@max] - sst[y=0]
show grid var
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
 
! transform on single-point range is equiv. to single-point subset
 
cancel mode interpolate  ! otherwise single-pt range fails
let var = sst - sst[X=30@max]
show grid var
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
 
set mode/last interpolate
let var = sst - sst[X=30:30.1@max]
show grid var
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
 
! dynamic grid
let var = sst[y=-10:10:.1,l=1,x=160e] - sst[y=-10,l=@ave,x=160e]
show grid var
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            1 pt
 (AX###)   LATITUDE           201 r   10S                  10N                 201 pts
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        compressed
 
! striding
let var = sst[i=1:180:3,j=1:90:2] - sst[x=@ave,y=@ave]
show grid var
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
 
! regridding
 
use coads_vwnd
define axis/t=1-jan-1980:31-dec-1982:1/units=days dax
let vwnd_days = vwnd[gt=dax,t=1-jun-1982:15-jul-1982] - vwnd[gt=dax,t=1-jun-1982:15-jul-1982,x=@ave,y=@ave]
sh grid vwnd_days
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 DAX       TIME              1096 r   01-JAN-1980 00:00    31-DEC-1982 00:00   45 pts
 
 
let vwnd_clim = vwnd[gt=month_irreg@mod] - vwnd[gt=month_irreg@mod,x=@ave,y=@ave]
sh grid vwnd_clim[L=4:9]
    GRID (G###)
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 MONTH_IRREG TIME              12mi   16-JAN 12:00         15-DEC 17:49        6 pts
 
can dat/all
use coads_climatology
 
! non-compressing transforms
 
let var = sst[y=@iin] - sst[x=@ave,y=@ave]
show grid var
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
 
let var = sst[y=-30:30@iin] - sst[x=@ave,y=@ave]
show grid var
    GRID GSQ1
 name       axis              # pts   start                end                 subset
 COADSX    LONGITUDE          180mr   21E                  19E(379)            full
 COADSY    LATITUDE            90 r   89S                  89N                 full
 normal    Z
 TIME      TIME                 3mr   16-JAN 06:00         17-MAR 02:58        full
 
use levitus_3d_subset
let var = temp[z=@weq:20] - temp[x=@ave,y=@ave]
show grid var
    GRID GAO1
 name       axis              # pts   start                end                 subset
 XAXLEVITR101_102 LONGITUDE     2mr   120.5E               121.5E              full
 YAXLEVITR41_42 LATITUDE        2 r   49.5S                48.5S               full
 ZAXLEVITR DEPTH (m)           20 i-  0                    5000                full
 normal    T
 
let var = temp[z=1:120@weq:20] - temp[x=@ave,y=@ave]
show grid var
    GRID GAO1
 name       axis              # pts   start                end                 subset
 XAXLEVITR101_102 LONGITUDE     2mr   120.5E               121.5E              full
 YAXLEVITR41_42 LATITUDE        2 r   49.5S                48.5S               full
 ZAXLEVITR DEPTH (m)           20 i-  0                    5000                full
 normal    T
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err75_qual_too_short
! err75_qual_too_short.jnl
! Ticket 1963: Qualifier too short so /T= for /TITLE
! is interpreted as a time spec, but no error msg given
 
! This was the original example. The command was accepted
! with no error but the variable was not defined.
let/t="ttitle" a = sst[d=`1`]
 !-> DEFINE VARIABLE/TITL="ttitle" a = sst[d=1]
show var
 Created by DEFINE VARIABLE:
 >>> Definitions that replace any file variable of same name:
     A = SST[D=1]
         "ttitle"
 
! Test in combination with some other qualifiers
let/t="ttitle"/u="uunits" c= sst[d=`1`]
 !-> DEFINE VARIABLE/TITL="ttitle"/UNIT="uunits" c= sst[d=1]
show var
 Created by DEFINE VARIABLE:
 >>> Definitions that replace any file variable of same name:
     C = SST[D=1]
         "ttitle (uunits)"
     A = SST[D=1]
         "ttitle"
 
! Replace multiple instances
! If multiple instances, the last one is used.
let/t="ttitle"/u="uunits"/t="final title" b = sst[d=`1`]
 !-> DEFINE VARIABLE/TITL="ttitle"/UNIT="uunits"/TITL="final title" b = sst[d=1]
show var
 Created by DEFINE VARIABLE:
 >>> Definitions that replace any file variable of same name:
     B = SST[D=1]
         "final title (uunits)"
     C = SST[D=1]
         "ttitle (uunits)"
     A = SST[D=1]
         "ttitle"
 
! Other commands
! This really is a bug, PLOT has PLOT/T so the qualifier SHOULD be t
! This previously didn't return an error, did nothing.
set mode ignore
let a = x[x=1:10]
plot/t="My New Title" cos(y[y=1:15])* `a[i=@ave]`
 
set mode/last ignore
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err75_chunking
! err75_chunking
! ticket 1964: chunking that ends with a single step, here m=10:10
! gave wrong result
 
! Define a variable in x-y-e and save to a file
use coads_climatology
define axis/x=0:360/npoints=1081/units=degrees_east xaxis
define axis/y=-90:90/npoints=540/units=degrees_north yaxis
 
let ens = randu(_m[m=1:10])
let fvar = sst[L=1,gx=xaxis,gy=yaxis] * ens
save/clobber/file=xye.nc/m=1/mlimits=1:10 fvar
set mem/siz=100
repeat/m=2:10 ( save/append/file=xye.nc fvar)
!-> REPEAT: M=2
!-> REPEAT: M=3
!-> REPEAT: M=4
!-> REPEAT: M=5
!-> REPEAT: M=6
!-> REPEAT: M=7
!-> REPEAT: M=8
!-> REPEAT: M=9
!-> REPEAT: M=10
 
cancel data/all; cancel var/all; cancel memory/all
 
! Now open this file and write out averages over E to files, first a
! user-variable and then the file variable.  The results should be the same.
 
use xye.nc
let ufvar = fvar[d=1]
 
! This memory setting causes ufvar[M=1:10@AVE] to be computed in chunks.
! m=1:3, m=4:6, m=7:9, and the last chunk m=10:10
set mem/siz=15
 
save/clobber/file=tmp-ufvar.nc ufvar[M=1:10@AVE]
show memory/diagnostic
    Last gather
        Variable    Axis   Xform     Chunk    Repeated
        UFVAR          E     AVE         3           1
    Total table slots: 500
    Free table slots: 491
    Un-cached variables: 0
    SET MEMORY/MAX: 120 Mb   (15 megawords)
    Peak demand: 37.36 Mb
    Current cache: 102.74 Mb
 
save/clobber/file=tmp-fvar.nc  fvar[M=1:10@AVE]
show memory/diagnostic
    No split/gather occurred in the last evaluation
    Total table slots: 500
    Free table slots: 492
    Un-cached variables: 0
    SET MEMORY/MAX: 120 Mb   (15 megawords)
    Peak demand: 56.04 Mb
    Current cache: 116.75 Mb
 
cancel data/all; cancel var/all; cancel memory/all
 
! Now look at the difference between these m-averages by plotting them
! averaged over X, they should be identical lines.
 
use tmp-ufvar.nc
use tmp-fvar.nc
 
let diff = fvar[d=2] - ufvar[d=1]
 
 
! should be zero or very,very small
! previously this gave min -.04, max 0.7
 
stat diff
 
             FVAR[D=tmp-fvar] - UFVAR[D=tmp-ufvar]
             LONGITUDE: 0.1667W(-0.1667) to 0.1667E(360.1667)
             LATITUDE: 90.167S to 90.167N
             Z:  N/A
             TIME: 16-JAN 06:00
             E:  N/A
             F:  N/A
             DATA SET: N/A
 
 Total # of data points: 583740 (1081*540*1*1*1*1)
 # flagged as bad  data: 265044
 Minimum value: -7.1054E-15
 Maximum value: 7.1054E-15
 Mean    value: -2.0694E-19 (unweighted average)
 Standard deviation: 1.0942E-15
 
cancel data/all
 
sp rm xye.nc tmp-ufvar.nc tmp-fvar.nc
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err75_interpret_grid
! err75_interpret_grid.jnl
! See ticket 1962, coordinate variables named I and J
! should be given directions x and y then grids can be made
!
!  Dataset from Wei Cheng:
! /home/merlot/ksmith/Tests/Wei/sivol_SImon_CAMS-CSM1-0_historical_r1i1p1f1_gn_197901-201412.nc
! Shortened to 1 timestep and subset in x,y using:
! ncks -d time,431 -d i,300,302 -d j,100,101 /home/merlot/ksmith/Tests/Wei/sivol_SImon_CAMS-CSM1-0_historical_r1i1p1f1_gn_197901-201412.nc my_subset_sivol_SImon_CAMS.nc
! and then use ncdump and ncgen to add non-missing values to variable sivol
 
 
use my_subset_sivol_SImon_CAMS
sh data
     currently SET data sets:
    1> ./data/my_subset_sivol_SImon_CAMS.nc  (default)
 name     title                             I         J         K         L
 LATITUDE latitude                         1:3       1:2       ...       ...
 LONGITUDE
          longitude                        1:3       1:2       ...       ...
 SIVOL    Sea-Ice Volume per Area          1:3       1:2       ...       1:1
 VERTICES_LATITUDE
                                           1:3       1:2       1:4       ...
 VERTICES_LONGITUDE
                                           1:3       1:2       1:4       ...
 
 
 
! Previously could not define grid for sivol
! ...
!            *** NOTE: Could not adjust grid for variable latitude
!            *** NOTE: Axes in grids may be inconsistent.
!            *** NOTE:
!            *** NOTE: Could not adjust grid for variable longitude
!            *** NOTE: Axes in grids may be inconsistent.
!            *** NOTE:
!            *** NOTE: Could not adjust grid for variable sivol
!            *** NOTE: Axes in grids may be inconsistent.
! sh data
!      currently SET data sets:
!     1> ./data/my_subset_sivol_SImon_CAMS.nc  (default)
!  name     title                             I         J         K         L
!  LATITUDE latitude                         ...       ...       1:2       ...
!  LONGITUDE
!           longitude                        ...       ...       1:2       ...
!  SIVOL    Sea-Ice Volume per Area          ...       ...       1:2       ...
!  VERTICES_LATITUDE
!                                            1:4       1:3       1:2       ...
!  VERTICES_LONGITUDE
!                                            1:4       1:3       1:2       ...
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err751_overlay_after_vs
! err751_overlay_after_vs.jnl
! issue 1973
! 4/9/2020
 
! PLOT/VS with variables representing lon,lat
 
let/units=degrees_east xlon = {250,300,320,330,340,350,360}
let/units=degrees_north ylat = {0,10,20,30,40,50,60}
 
! This draws nice lon/lat labeled axes
plot/vs/thick/color=blue/siz=0.2 xlon, ylat
 
! Check the axis ranges
show symbol xax*, yax*
XAXIS_MIN = "250.000000"
XAXIS_MAX = "360.000000"
YAXIS_MIN = "0.00000000"
YAXIS_MAX = "60.0000000"
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "0"
 
! This is like a "go fland" to overlay a map
use coads_climatology
shade/over if missing(sst[L=1],100) eq 100 then 1
 
! Check the axis ranges. For an overlay they should be the
! same as after the PLOT/VS
show symbol xax*, yax*
XAXIS_MIN = "250.000000"
XAXIS_MAX = "360.000000"
YAXIS_MIN = "0.00000000"
YAXIS_MAX = "60.0000000"
XAXIS_REVERSED = "0"
YAXIS_REVERSED = "0"
 
*** Running ferret script: bn_cdf_strlen.jnl
! bn_cdf_strlen.jnl
!  New SAVE/STRLEN= qualifier, when saving user-defined strings to netCDF
!  Also when writing user-defined variable, extend the string length to make
!  room in the string dimension for possible appending.
! See issue #1946
 
let strings = {"abc", "defg", "hijkl", "lmnopq"}
define axis/t=1:4:1 taxis
let tt = t[gt=taxis]
let tstrings = reshape(strings, tt)
let tstrings_long = STRCAT(tstrings, "_1234567890")
 
! Write user-defined variable to netCDF.  Default is to set the
! string-dimension length to the max length of the strings written.
 
save/clobber/file=a.nc tstrings, tstrings_long
sp ncdump a.nc
netcdf a {
dimensions:
	TAXIS = UNLIMITED ; // (4 currently)
	STRING1_6 = 6 ;
	STRING1_17 = 17 ;
variables:
	double TAXIS(TAXIS) ;
		TAXIS:axis = "T" ;
	char TSTRINGS(TAXIS, STRING1_6) ;
		TSTRINGS:long_name = "RESHAPE(STRINGS, TT)" ;
	char TSTRINGS_LONG(TAXIS, STRING1_17) ;
		TSTRINGS_LONG:long_name = "STRCAT(TSTRINGS, \"_1234567890\")" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
data:

 TAXIS = 1, 2, 3, 4 ;

 TSTRINGS =
  "abc",
  "defg",
  "hijkl",
  "lmnopq" ;

 TSTRINGS_LONG =
  "abc_1234567890",
  "defg_1234567890",
  "hijkl_1234567890",
  "lmnopq_1234567890" ;
}
 
! or /STRLEN sets the length
 
save/clobber/file=a.nc/STRLEN=7 tstrings
sp ncdump a.nc
netcdf a {
dimensions:
	TAXIS = UNLIMITED ; // (4 currently)
	STRING1_7 = 7 ;
variables:
	double TAXIS(TAXIS) ;
		TAXIS:axis = "T" ;
	char TSTRINGS(TAXIS, STRING1_7) ;
		TSTRINGS:long_name = "RESHAPE(STRINGS, TT)" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
data:

 TAXIS = 1, 2, 3, 4 ;

 TSTRINGS =
  "abc",
  "defg",
  "hijkl",
  "lmnopq" ;
}
 
! If /STRLEN specified it applies to all string variables
 
save/clobber/file=a.nc/L=1/STRLEN=20 tstrings, tstrings_long
save/append/file=a.nc/L=2:4 tstrings, tstrings_long
 
sp ncdump a.nc
netcdf a {
dimensions:
	TAXIS = UNLIMITED ; // (4 currently)
	STRING1_20 = 20 ;
variables:
	double TAXIS(TAXIS) ;
		TAXIS:axis = "T" ;
	char TSTRINGS(TAXIS, STRING1_20) ;
		TSTRINGS:long_name = "RESHAPE(STRINGS, TT)" ;
	char TSTRINGS_LONG(TAXIS, STRING1_20) ;
		TSTRINGS_LONG:long_name = "STRCAT(TSTRINGS, \"_1234567890\")" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
data:

 TAXIS = 1, 2, 3, 4 ;

 TSTRINGS =
  "abc",
  "defg",
  "hijkl",
  "lmnopq" ;

 TSTRINGS_LONG =
  "abc_1234567890",
  "defg_1234567890",
  "hijkl_1234567890",
  "lmnopq_1234567890" ;
}
 
!
! SAVE/STRLEN can be used when writing data out of netCDF files.
! Note it doesn't change the name of the string dimension
 
use string_on_time.nc
list t_25, str_temp
             DATA SET: ./data/string_on_time.nc
             TIME: 13-JAN-2017 00:00 to 07-MAR-2017 00:00
 Column  1: T_25 is Sea Surface Temperature (degree_C)
 Column  2: STR_TEMP is FLOATSTR(T_25, "(F5.2)")
                      T_25    STR_TEMP
15-JAN-2017 12 /  1:  28.59 "28.59"     
20-JAN-2017 12 /  2:  28.88 "28.88"     
25-JAN-2017 12 /  3:  28.78 "28.78"     
30-JAN-2017 12 /  4:  28.87 "28.87123"  
04-FEB-2017 12 /  5:  28.74 "28.74"     
09-FEB-2017 12 /  6:  28.53 "28.53"     
14-FEB-2017 12 /  7:  28.76 "28.76"     
19-FEB-2017 12 /  8:  29.27 "29.2712345"
24-FEB-2017 12 /  9:  29.15 "29.15"     
01-MAR-2017 12 / 10:  29.03 "29.03"     
02-MAR-2017 12 / 11:  29.13 "29.13"     
03-MAR-2017 12 / 12:  29.19 "29.19"     
04-MAR-2017 12 / 13:  29.25 "29.25"     
05-MAR-2017 12 / 14:  29.25 "29.25"     
06-MAR-2017 12 / 15:  29.21 "29.21"     
save/clobber/file=a.nc/L=1:3/strlen=15 t_25, str_temp
save/append/file=a.nc/L=4:12 t_25, str_temp
sp ncdump a.nc
netcdf a {
dimensions:
	TIME = UNLIMITED ; // (12 currently)
	bnds = 2 ;
	var_strlen = 15 ;
variables:
	double TIME(TIME) ;
		TIME:axis = "T" ;
		TIME:long_name = "Centered Time" ;
		TIME:time_origin = "01-JAN-1970 00:00:00" ;
		TIME:units = "seconds since 1970-01-01 00:00:00" ;
		TIME:history = "From DSG_ERDDAP_Tao5daySst" ;
		TIME:standard_name = "time" ;
		TIME:bounds = "TIME_bnds" ;
	double TIME_bnds(TIME, bnds) ;
	float T_25(TIME) ;
		T_25:missing_value = 1.e+35f ;
		T_25:long_name = "Sea Surface Temperature" ;
		T_25:units = "degree_C" ;
		T_25:history = "From DSG_ERDDAP_Tao5daySst" ;
	char STR_TEMP(TIME, var_strlen) ;
		STR_TEMP:long_name = "FLOATSTR(T_25, \"(F5.2)\")" ;
		STR_TEMP:history = "From Tao5daySst_1b58_1191_8205" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
data:

 TIME = 1484481600, 1484913600, 1485345600, 1485777600, 1486209600, 
    1486641600, 1487073600, 1487505600, 1487937600, 1488369600, 1488456000, 
    1488542400 ;

 TIME_bnds =
  1484265600, 1484697600,
  1484697600, 1485129600,
  1485129600, 1485561600,
  1485561600, 1485993600,
  1485993600, 1486425600,
  1486425600, 1486857600,
  1486857600, 1487289600,
  1487289600, 1487721600,
  1487721600, 1488153600,
  1488153600, 1488412800,
  1488412800, 1488499200,
  1488499200, 1488585600 ;

 T_25 = 28.592, 28.88, 28.776, 28.872, 28.742, 28.53, 28.76, 29.268, 29.15, 
    29.034, 29.126, 29.194 ;

 STR_TEMP =
  "28.59",
  "28.88",
  "28.78",
  "28.87123",
  "28.74",
  "28.53",
  "28.76",
  "29.2712345",
  "29.15",
  "29.03",
  "29.13",
  "29.19" ;
}
 
! /STRLEN is silently ignored writing numeric data.
 
save/clobber/file=a.nc/L=1:10/strlen=15 t_25
sp ncdump a.nc
netcdf a {
dimensions:
	TIME = UNLIMITED ; // (10 currently)
	bnds = 2 ;
variables:
	double TIME(TIME) ;
		TIME:axis = "T" ;
		TIME:long_name = "Centered Time" ;
		TIME:time_origin = "01-JAN-1970 00:00:00" ;
		TIME:units = "seconds since 1970-01-01 00:00:00" ;
		TIME:history = "From DSG_ERDDAP_Tao5daySst" ;
		TIME:standard_name = "time" ;
		TIME:bounds = "TIME_bnds" ;
	double TIME_bnds(TIME, bnds) ;
	float T_25(TIME) ;
		T_25:missing_value = 1.e+35f ;
		T_25:long_name = "Sea Surface Temperature" ;
		T_25:units = "degree_C" ;
		T_25:history = "From DSG_ERDDAP_Tao5daySst" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
data:

 TIME = 1484481600, 1484913600, 1485345600, 1485777600, 1486209600, 
    1486641600, 1487073600, 1487505600, 1487937600, 1488369600 ;

 TIME_bnds =
  1484265600, 1484697600,
  1484697600, 1485129600,
  1485129600, 1485561600,
  1485561600, 1485993600,
  1485993600, 1486425600,
  1486425600, 1486857600,
  1486857600, 1487289600,
  1487289600, 1487721600,
  1487721600, 1488153600,
  1488153600, 1488412800 ;

 T_25 = 28.592, 28.88, 28.776, 28.872, 28.742, 28.53, 28.76, 29.268, 29.15, 
    29.034 ;
}
 
! Warnings
 
! SAVE/STRLEN is applied only on the first WRITE, not on /APPEND
 
save/clobber/file=a.nc/L=1/strlen=6 tstrings
save/append/file=a.nc/L=2:4/strlen=10 tstrings
sp ncdump a.nc
netcdf a {
dimensions:
	TAXIS = UNLIMITED ; // (4 currently)
	STRING1_6 = 6 ;
variables:
	double TAXIS(TAXIS) ;
		TAXIS:axis = "T" ;
	char TSTRINGS(TAXIS, STRING1_6) ;
		TSTRINGS:long_name = "RESHAPE(STRINGS, TT)" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
data:

 TAXIS = 1, 2, 3, 4 ;

 TSTRINGS =
  "abc",
  "defg",
  "hijkl",
  "lmnopq" ;
}
 
! Intentional errors
set mode ignore
 
! This needs length of 15.
 
let strings = {"abc", "defg", "hijkl", "lmnopqrstuvwxyz"}
 
save/clobber/file=a.nc/L=1 tstrings, tstrings_long
save/append/file=a.nc/L=2:4 tstrings, tstrings_long
 
! save/append/strlen=  cannot be used to change the string length
 
save/clobber/file=a.nc/L=1/strlen=4 tstrings
save/append/file=a.nc/L=2:4/strlen=10 tstrings
 
! /STRLEN applies to all the variables on the command line
! 7 is not long enough for 1st var not for 2nd variable
 
sp rm a.nc
save/clobber/file=a.nc/STRLEN=7 tstrings, tstrings_long
sp ncdump a.nc
netcdf a {

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
set mode/last ignore
*** Running ferret script: bn_set_mem_max.jnl
! bn_set_mem_max.jnl
! Ferret v7.6 27-Nov-2019
! SET MEMORY/MAX= replaces /SIZE=  (/SIZE kept for bkwrds compatibility)
! SHOW MEMORY outputs use MAX instead of SIZE
! This is the same as bn_memory_symbol but with MAX in place of SIZE
 
sh sym ferret_memory, ferret_bytes_mem
FERRET_MEMORY = "62.5"
FERRET_BYTES_MEM = "500Mb"
define symbol mem_save = ($ferret_memory)
 !-> define symbol mem_save = 62.5
 
set mem/max=90
sh sym ferret_memory, ferret_bytes_mem
FERRET_MEMORY = "90"
FERRET_BYTES_MEM = "720Mb"
show memory
    SET MEMORY/MAX: 720 Mb   (90 megawords)
    Peak demand: 0 Kb
    Current cache: 0 Kb
 
set mem/size=0.05
sh sym ferret_memory, ferret_bytes_mem
FERRET_MEMORY = "0.05"
FERRET_BYTES_MEM = "400Kb"
 
set mem/max=500000  ! too large to allow
sh sym ferret_memory, ferret_bytes_mem
FERRET_MEMORY = "500000"
FERRET_BYTES_MEM = "4000Gb"
 
set mem/max=($mem_save)  ! return to the previous setting
 !-> set mem/max=62.5
sh sym ferret_memory, ferret_bytes_mem
FERRET_MEMORY = "62.5"
FERRET_BYTES_MEM = "500Mb"
*** Running ferret script: bn_lineplots_keys.jnl
! bn_lineplots_keys.jnl
! Nov 21, 2019 ACM
! See issue 1960: Change auto-generated line keys for PLOT/OVER line plots
! so they are similar to what's generated for a plot with multiple arguments.
 
 
! Note the multi-var plot automatically shrinks the y axis to make more room
! below for legend lines (?without changing the value of auto-generated symbol
! ppl$ylen ??) btw, plot/color starts with a red line, to make the line colors
! the same in both panels.
 
define axis/t=1-jan-2010:31-dec-2010:1/units=days/t0=1-jan-2010 taxis
let tt= t[gt=taxis]
 
set v upper
plot/L=1:20/color sin(tt/30),sin(tt/40),sin(tt/50),sin(tt/60),sin(tt/70),cos(tt/30),cos(tt/40),cos(tt/50),cos(tt/60),cos(tt/70)
show sym ppl$yorg, ppl$ylen
PPL$YLEN = "1.60000"
PPL$YORG = "1.40000"
 
! Previously the legend lines were drawn inside the box after one
! column of labels filled up the available margin space. Now
! draw three columns of labels.
 
set v lower
plot/L=1:20/title=" "/vlim=-1:1 sin(tt/30)
plot/L=1:20/over sin(tt/30)
plot/L=1:20/over sin(tt/40)
plot/L=1:20/over sin(tt/50)
plot/L=1:20/over sin(tt/60)
plot/L=1:20/over sin(tt/70)
plot/L=1:20/over cos(tt/30)
plot/L=1:20/over cos(tt/40)
plot/L=1:20/over cos(tt/50)
plot/L=1:20/over cos(tt/60)
plot/L=1:20/over cos(tt/70)
show sym ppl$yorg, ppl$ylen
PPL$YLEN = "1.60000"
PPL$YORG = "1.40000"
frame/file=lineplot_key1.gif
 
cancel view
! Now a larger number of lines
let/title="sine day/20" var01 = sin(tt/20)
let/title="sine day/30" var02 = sin(tt/30)
let/title="sine day/40" var03 = sin(tt/40)
let/title="sine day/50" var04 = sin(tt/50)
let/title="sine day/60" var05 = sin(tt/60)
let/title="sine day/70" var06 = sin(tt/70)
let/title="sine day/80" var07 = sin(tt/80)
let/title="sine day/90" var08 = sin(tt/90)
let/title="sine day/100" var09 = sin(tt/100)
 
let/title="cosine day/10" var10 = cos(tt/10)
let/title="cosine day/20" var11 = cos(tt/20)
let/title="cosine day/30" var12 = cos(tt/30)
let/title="cosine day/40" var13 = cos(tt/40)
let/title="cosine day/50" var14 = cos(tt/50)
let/title="cosine day/60" var15 = cos(tt/60)
let/title="cosine day/70" var16 = cos(tt/70)
let/title="cosine day/80" var17 = cos(tt/80)
let/title="cosine day/90" var18 = cos(tt/90)
let/title="cosine day/100" var19 = cos(tt/100)
 
! plot/key=title says to use titles instead of the variable definitions.
 
! Legend lines still eventually drawn inside the box when the lower
! margin has been filled with three columns of labels.
! Could use "GO margins" to give more space.  Note that if there
! are eventually too many to fit in the plot box, additional labels
! are just skipped. Previously (in Ferret) a dialog box popped up
! for locating the label, not good behavior.
 
set v lower
plot/L=1:20/title=" "/vlim=-1:1 var01
plot/L=1:20/key=title/over var01
plot/L=1:20/key=title/over var02
plot/L=1:20/key=title/over var03
plot/L=1:20/key=title/over var04
plot/L=1:20/key=title/over var05
plot/L=1:20/key=title/over var06
plot/L=1:20/key=title/over var07
plot/L=1:20/key=title/over var08
plot/L=1:20/key=title/over var09
plot/L=1:20/key=title/over var10
plot/L=1:20/key=title/over var11
plot/L=1:20/key=title/over var12
plot/L=1:20/key=title/over var13
plot/L=1:20/key=title/over var14
plot/L=1:20/key=title/over var15
plot/L=1:20/key=title/over var16
plot/L=1:20/key=title/over var17
plot/L=1:20/key=title/over var18
plot/L=1:20/key=title/over var19
 
show sym ppl$yorg, ppl$ylen
PPL$YLEN = "1.60000"
PPL$YORG = "1.40000"
 
frame/file=lineplot_key2.gif
*** Running ferret script: bn76_bug_fixes.jnl
! bn76_bug_fixes.jnl
! test various fixes that went into version 7.6
! 2/20 *acm*
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err751_vs_deg_axis
! err751_vs_deg_axis.jnl
! ACM 2/11/2020
! bug 1967  Variable with units just degree or deg
! plotted in a PLOT/VS plot got plot axis of longitude for
! horizontal axis or latitude for vertical ones.
 
 
let/units=degrees/title=heading dir_var = {1,2,3,4,6,4,2,0}
let/units="m^2"/title="plot variable" other_var = {1,3,1,3,1,3,1,0}
 
set view ul ; plot/vs/color=red/thick/siz=0.12 dir_var, other_var
set view ur; plot/vs/color=red/thick/siz=0.12 other_var, dir_var
 
annotate/norm/xpos=0.2/ypos=1.25/halign=1/siz=0.2 "No lon/lat-formatted axes"
 
! Check previous fixes:
!  "degrees C" not lon/lat
!  "degrees e" is longitude
 
let/units="degrees C"/title=temp temp = {1,2,3,4,6,4,2,0}
set view ll ; plot/vs/color=red/thick/siz=0.12 temp, other_var
 
 
let/units="degrees e"/title=dvar dvar = {1,2,3,4,6,4,2,0}
set view lr; plot/vs/color=red/thick/siz=0.12 dvar, temp
 
annotate/norm/xpos=0.2/ypos=1.25/halign=1/siz=0.2 "lon-formatted horiz ax on right"
 
frame/file=err751_vs_deg_axis.gif
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err751_multiple_attrs
! err751_multiple_attrs.jnl
! issue 1968:
! When using more than one  varname.attrname in one expression, the
! value of the first was returned for each instance to use in the result.
 
let/units="m/s" v1 = 1.1
let/units="mmol C m-3" v2 = 2.2
 
! This was wrong: was "m/sm/s", but should be "m/smmol C m-3"
list/nohead v1.units + v2.units
        "m/smmol C m-3"
 
! This is ok
list/nohead "`v1.units` + `v2.units`"
 !-> list/nohead "m/s + mmol C m-3"
        "m/s + mmol C m-3"
 
! Try with attributes from file variables
use coads_vwnd
use ocean_atlas_temp
 
list vwnd[d=1].units + vwnd[d=1].long_name
             VARIABLE : VWND[D=coads_vwnd].UNITS + VWND[D=coads_vwnd].LONG_NAME
             FILENAME : ocean_atlas_temp.cdf
        "M/SMERIDIONAL WIND"
list temp[d=2].long_name + " " + temp[d=2].units + " " + temp[d=2].history
             VARIABLE : TEMP[D=ocean_atlas_temp].LONG_NAME + " " + TEMP[D=ocean_atlas_temp].UNITS + " " + TEMP[D=ocean_atlas_temp].HISTORY
             FILENAME : ocean_atlas_temp.cdf
        "Temperature Deg C From ocean_atlas_monthly"
 
 
! The bug was not particular to strings, but anything multiple attribute specs
 
list/nohead ..ndims
          4.000
list/nohead ..nvars
          1.000
 
! previously this resulted in 8, using ..ndims twice.
list/nohead ..ndims + ..nvars
          5.000
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err751_show_members_brief
! err751_show_members_brief.jnl
! 2/2020
! See ticket 1965
! For aggregations and descriptor datasets,show data/members
! (or the deprecated show members/files) lists the member sets.
! with coordinates in the aggregation direction. If /brief is added,
! output just the filenames. Previously /brief had no effect.
 
! aggregation listsings already tested in bn_aggregate*.jnl files
 
! descriptor file
use coads_clim.des
sh dat
     currently SET data sets:
    1> ./data/coads_clim.des  (default)
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:6
 
sh dat/files/members
     currently SET data sets:
    1> ./data/coads_clim.des  (default)
 name     title                             I         J         K         L
 SST      SEA SURFACE TEMPERATURE          1:180     1:90      ...       1:6
 
          time-dependent data files:
16-JAN-1900 06:00 -> 15-FEB-1900 16:29    coads_clim.001
18-MAR-1900 02:58 -> 17-APR-1900 13:27    coads_clim.002
17-MAY-1900 23:56 -> 17-JUN-1900 10:25    coads_clim.003
 
sh dat/files/members/brief
     currently SET data sets:
    1> ./data/coads_clim.des  (default)
coads_clim.001
coads_clim.002
coads_clim.003
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err751_use_feature
! err751_use_feature.jnl
! 2/2020 ACM
!  If we do a USE/FEATURE= but the feature-type setting
!  is to be unchanged, do not reinitialize the file!
 
use profile_dsg.nc
sh data
     currently SET data sets:
    1> ./data/profile_dsg.nc  (default)
       DSG Feature type Profile
 name     title                             I         J         K         L         M         N
 ROWSIZE  number of obs for this profile   ...       ...       ...       ...       1:3       ...
 PROFILE  profile ID: Cruise and Station   ...       ...       ...       ...       1:3       ...
 TIME     time                             ...       ...       ...       ...       1:3       ...
 LATITUDE station latitude                 ...       ...       ...       ...       1:3       ...
 LONGITUDE
          station longitude                ...       ...       ...       ...       1:3       ...
 POT_TEMP_DEGC
          pot_temp_degc                    ...       ...     tot 34      ...       1:3       ...
 SAL      sal                              ...       ...     tot 34      ...       1:3       ...
 DEPTH    DEPTH_M                          ...       ...     tot 34      ...       1:3       ...
 
set var/name=sal_in sal
sh data
     currently SET data sets:
    1> ./data/profile_dsg.nc  (default)
       DSG Feature type Profile
 name     title                             I         J         K         L         M         N
 ROWSIZE  number of obs for this profile   ...       ...       ...       ...       1:3       ...
 PROFILE  profile ID: Cruise and Station   ...       ...       ...       ...       1:3       ...
 TIME     time                             ...       ...       ...       ...       1:3       ...
 LATITUDE station latitude                 ...       ...       ...       ...       1:3       ...
 LONGITUDE
          station longitude                ...       ...       ...       ...       1:3       ...
 POT_TEMP_DEGC
          pot_temp_degc                    ...       ...     tot 34      ...       1:3       ...
 SAL_IN   sal                              ...       ...     tot 34      ...       1:3       ...
 DEPTH    DEPTH_M                          ...       ...     tot 34      ...       1:3       ...
 
 
! no change to the file, the rename should still be in place.
use/feature=profile profile_dsg.nc
sh data
     currently SET data sets:
    1> ./data/profile_dsg.nc  (default)
       DSG Feature type Profile
 name     title                             I         J         K         L         M         N
 ROWSIZE  number of obs for this profile   ...       ...       ...       ...       1:3       ...
 PROFILE  profile ID: Cruise and Station   ...       ...       ...       ...       1:3       ...
 TIME     time                             ...       ...       ...       ...       1:3       ...
 LATITUDE station latitude                 ...       ...       ...       ...       1:3       ...
 LONGITUDE
          station longitude                ...       ...       ...       ...       1:3       ...
 POT_TEMP_DEGC
          pot_temp_degc                    ...       ...     tot 34      ...       1:3       ...
 SAL_IN   sal                              ...       ...     tot 34      ...       1:3       ...
 DEPTH    DEPTH_M                          ...       ...     tot 34      ...       1:3       ...
 
stat sal_in
 
             sal
             X: 123.14W(-123.14) to 120.4W(-120.4)
             Y: 38.8N to 44.11N
             DEPTH (m): 2.12 to 33.2111
             T: 12-AUG-2009 00:00 to 13-AUG-2009 12:58
             E (instance): 1 to 3
             F:  N/A
             DATA SET: ./data/profile_dsg.nc
 
 Total # of data points: 34 (1*1*34*1*1*1)
 # flagged as bad  data: 0
 Minimum value: 32.383
 Maximum value: 35.629
 Mean    value: 33.684 (unweighted average)
 Standard deviation: 0.89513
 
 
cancel data/ all
 
use/feature=none dsg_cross_prime
set var/name=sst_in sst
let/like=sst_in/d=1 sst = sst_in*3
show data
     currently SET data sets:
    1> ./data/dsg_cross_prime.nc  (default)
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:3       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:3       ...
 LONS     longitude                        1:18      ...       ...       ...       ...       ...
 LATS     latitude                         1:18      ...       ...       ...       ...       ...
 SST_IN   Temperature                      1:18      ...       ...       ...       ...       ...
 TIME     Centered Time                    1:18      ...       ...       ...       ...       ...
 ------------------------------
 SST[D=dsg_cross_prime] = SST_IN*3
 
 
! After the same use/feature=none settin the
! dataset-specific settings should be unchanged.
use/feature=none dsg_cross_prime
show data
     currently SET data sets:
    1> ./data/dsg_cross_prime.nc  (default)
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:3       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:3       ...
 LONS     longitude                        1:18      ...       ...       ...       ...       ...
 LATS     latitude                         1:18      ...       ...       ...       ...       ...
 SST_IN   Temperature                      1:18      ...       ...       ...       ...       ...
 TIME     Centered Time                    1:18      ...       ...       ...       ...       ...
 ------------------------------
 SST[D=dsg_cross_prime] = SST_IN*3
 
list sst_in, sst
             DATA SET: ./data/dsg_cross_prime.nc
             X: 0.5 to 18.5
 Column  1: SST_IN is Temperature (Degrees C)
 Column  2: SST is SST_IN*3
          SST_IN    SST
1    /  1:  24.41  73.23
2    /  2:  25.22  75.66
3    /  3:  25.92  77.76
4    /  4:  28.97  86.91
5    /  5:  28.03  84.09
6    /  6:  27.77  83.31
7    /  7:  26.91  80.73
8    /  8:  26.07  78.21
9    /  9:  25.08  75.24
10   / 10:  24.01  72.03
11   / 11:  23.53  70.59
12   / 12:  22.64  67.92
13   / 13:  21.64  64.92
14   / 14:  23.41  70.23
15   / 15:  20.77  62.31
16   / 16:  19.97  59.91
17   / 17:  19.05  57.15
18   / 18:  18.27  54.81
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err75_vars_reserved_keywords
! err75_vars_reserved_keywords
! Bug in attribute handling with renamed variable
! Issue 1969 3/24/2020
 
! The dataset has variables Z and t
use reserved.nc
show data/att
     currently SET data sets:
    1> ./data/reserved.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        35   T       FERRET V7.504 (optimized) 24-Mar-20
                                 Conventions     CHAR        6    F       CF-1.6
                                 title           CHAR        56   F       example file with variables that match reserved keywords
  
(xax)                  DOUBLE    point_spacing   CHAR        4    T       even
                                 axis            CHAR        1    T       X
                                 orig_file_axname
                                                 CHAR        3    F       xax
  
 Z                     DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 long_name       CHAR        10   T       letter Zed
                                 units           CHAR        8    T       ZZ units
                                 my_att          CHAR        11   F       another_att
  
 t                     DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 long_name       CHAR        18   T       letter t lowercase
                                 units           CHAR        8    T       tt units
                                 att2            CHAR        2    F       33
  
 
can mode upcase
 
! access attributes without renaming the variables.
show attributes 't'
     attributes for dataset: ./data/reserved.nc
 t.missing_value = -1.E+34
 t._FillValue = -1.E+34
 t.long_name = letter t lowercase 
 t.units = tt units 
 t.att2 = 33 
show att 't'.att2
     attributes for dataset: ./data/reserved.nc
 t.att2 = 33 
show att 't'.units
     attributes for dataset: ./data/reserved.nc
 t.units = tt units 
let myvar = 't'.att2
list myvar/3
             VARIABLE : MYVAR/3
             DATA SET : example file with variables that match reserved keywords
             FILENAME : reserved.nc
             X        : 1
        ....
 
show attributes 'Z'
     attributes for dataset: ./data/reserved.nc
 Z.missing_value = -1.E+34
 Z._FillValue = -1.E+34
 Z.long_name = letter Zed 
 Z.units = ZZ units 
 Z.my_att = another_att 
 
! Intentional error: The names in quotes are case-sensitive.
set mode ignore
show attributes 'z'
set mode/last ignore
 
! saving all attributes to a filew
set att/output=all 'Z'
set att/output=all 't'
 
save/clobber/i=1:2/file=a.nc 'Z' , 't'
sp ncdump -h a.nc
netcdf a {
dimensions:
	xax = 2 ;
variables:
	double xax(xax) ;
		xax:point_spacing = "even" ;
		xax:axis = "X" ;
	double Z(xax) ;
		Z:missing_value = -1.e+34 ;
		Z:_FillValue = -1.e+34 ;
		Z:long_name = "letter Zed" ;
		Z:units = "ZZ units" ;
		Z:my_att = "another_att" ;
		Z:history = "From reserved" ;
	double t(xax) ;
		t:missing_value = -1.e+34 ;
		t:_FillValue = -1.e+34 ;
		t:long_name = "letter t lowercase" ;
		t:units = "tt units" ;
		t:att2 = "33" ;
		t:history = "From reserved" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
}
 
! The recommended way to deal with such variables is to rename
! them making them easier to work with.
set var/name=zee 'Z'
show att zee
     attributes for dataset: ./data/reserved.nc
 zee.missing_value = -1.E+34
 zee._FillValue = -1.E+34
 zee.long_name = letter Zed 
 zee.units = ZZ units 
 zee.my_att = another_att 
 
set var/name=tee 't'
sh att tee
     attributes for dataset: ./data/reserved.nc
 tee.missing_value = -1.E+34
 tee._FillValue = -1.E+34
 tee.long_name = letter t lowercase 
 tee.units = tt units 
 tee.att2 = 33 
 
set attribute/output=all tee
save/clobber/file=a.nc tee
sp ncdump a.nc
netcdf a {
dimensions:
	xax = 4 ;
variables:
	double xax(xax) ;
		xax:point_spacing = "even" ;
		xax:axis = "X" ;
	double tee(xax) ;
		tee:missing_value = -1.e+34 ;
		tee:_FillValue = -1.e+34 ;
		tee:long_name = "letter t lowercase" ;
		tee:units = "tt units" ;
		tee:att2 = "33" ;
		tee:history = "From reserved" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
data:

 xax = 1, 2, 3, 4 ;

 tee = 11, 12, 13, 14 ;
}
 
set mode/last upcase
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err751_att_too_long
! err751_att_too_long.jnl
! 4/7/2020 ACM
! The file has a global attribute "keywords", which is
! super long - more than 2048 chars.
! This causes runtime errors when running build w/ debug flags
 
use long_global_att.nc
 
! The entire attr is written out. Previously eithergot the
! error, or with non-debug build, attr listing was truncated
 
show att .
     attributes for dataset: ./data/long_global_att.nc
 ..history = FERRET V7.6 (debug)  7-Apr-20 
 ..Conventions = CF-1.6 
 ..cdm_data_type = Trajectory 
 ..cdm_trajectory_variables = expocode, dataset_name, platform_name, platform_type, organization, geospatial_lon_min, geospatial_lon_max, geospatial_lat_min, geospatial_lat_max, time_coverage_start, time_coverage_end, investigators, socat_version, all_region_ids, socat_doi, qc_flag, nobs_full, nobs_deci 
 ..creator_name = PMEL 
 ..creator_url = socat.info 
 ..Easternmost_Easting = 179.9994
 ..featureType = Trajectory 
 ..geospatial_lat_max = 69.9991
 ..geospatial_lat_min = -19.9997
 ..geospatial_lat_units = degrees_north 
 ..geospatial_lon_max = 179.9994
 ..geospatial_lon_min = -179.9946
 ..geospatial_lon_units = degrees_east 
 ..geospatial_vertical_positive = down 
 ..geospatial_vertical_units = m 
 ..id = socat_v2019_fulldata_2bd7_7513_4a09 
 ..infoUrl = socat.info 
 ..institution = PMEL 
 ..keywords = 100humidity, actual, additional, air, air_pressure_at_sea_level, air_temperature_at_sea_level, algorithm, atlas, atmosphere,
Atmosphere > Atmospheric Chemistry > Carbon and Hydrocarbon Compounds,
Atmosphere > Atmospheric Chemistry > Carbon and Hydrocarbon Compounds > Carbon Dioxide,
Atmosphere > Atmospheric Pressure > Atmospheric Pressure Measurements,
Atmosphere > Atmospheric Pressure > Sea Level Pressure,
Atmosphere > Atmospheric Pressure > Static Pressure,
Atmosphere > Atmospheric Water Vapor > Humidity,
Atmosphere > Atmospheric Winds > Surface Winds,
atmospheric, bathymetry, beginning, calculated, carbon, carbon dioxide, chamber, chemistry, circulation, co2, collection, compounds, course, currents, data, dataset, day, density, depth, dioxide, direction, distance, documents, dry, easternmost, eastward, eastward_sea_water_velocity, ending, equi, equil, equilibrator, etopo2, expocode, fco2, flag, fraction, globalview, ground, hour, humidity, hydrocarbon, identifier, interpolated, investigators, land, level, measured, measurements, minus, minute, mole, mole_fraction_of_carbon_dioxide_in_air, mole_fraction_of_carbon_dioxide_in_sea_water, mole_fraction_of_water_in_air, month, name, ncar, ncep, ncep/ncar, noaa, northernmost, number, ocean, oceans,
Oceans > Ocean Chemistry > Carbon,
Oceans > Ocean Chemistry > Carbon Dioxide,
Oceans > Ocean Circulation > Ocean Currents,
Oceans > Ocean Temperature > Sea Surface Temperature,
Oceans > Salinity/Density > Salinity,
organization, original, partial, pco2, platform, platform_course, platform_name, platform_speed_wrt_ground, pmel, ppm, pressure, quality, reanalysis, recommended, region, relative, relative_humidity, sal, salinity, sample, sea, sea-level, sea_surface_salinity, sea_surface_temperature, seawater, second, ship, slp, socat, southernmost, specific, specific_humidity, speed, sss, sst, static, surface, surface_partial_pressure_of_carbon_dioxide_in_air, surface_partial_pressure_of_carbon_dioxide_in_sea_water, temperature, time, true, uatm, using, vapor, v 
elocity, version, vessel, water, westernmost, wet, wind, wind_from_direction, wind_speed, winds, woa, woce, world, wrt, xco2, xh2o, year
 ..keywords_vocabulary = GCMD Science Keywords 
 ..license = The data may be used and redistributed for free but is not intended
for legal use, since it may contain inaccuracies. Neither the data
Contributor, ERD, NOAA, nor the United States Government, nor any
of their employees or contractors, makes any warranty, express or
implied, including warranties of merchantability and fitness for a
particular purpose, or assumes any legal liability for the accuracy,
completeness, or usefulness, of this information.

The synthesis and gridded SOCAT products are a result of scientific effort 
by data providers, data managers and quality controllers. It is important 
that users of the SOCAT products fairly acknowledge this effort. This will
help generate funding for continuation of observational products and 
promote further sharing of data.  

We expect that users of SOCAT data products:

1) Generously acknowledge the contribution of SOCAT data providers and
investigators in the form of invitation to co-authorship, reference 
to relevant scientific articles by data providers or by naming data 
providers in the acknowledgements.

Specifically, in regional studies invite large data providers, who 
frequently possess valuable expert knowledge on data and region, 
to collaborate at an early stage, which may lead to an invitation 
of co-authorship.  We recognize that co-authorship is only justified 
in case of a significant scientific contribution to a publication 
and that provision of data on its own does not warrant co-authorship.

2) Cite SOCAT and its data products as:
 Versions 3-6: Bakker et al. (2016);
 Version 2: Bakker et al. (2014);
 Version 1 (synthesis data products): Pfeil et al. (2013);
 Version 1 (gridded data product): Sabine et al.(2013) and Pfeil et al. (2013).

3) Include in the acknowledgements:
The Surface Ocean CO2 Atlas (SOCAT) is an international effort, 
endorsed by the International Ocean Carbon Coordination Project (IOCCP), 
the Surface Ocean Lower Atmosphere Study (SOLAS) and the Integrated 
Marine Biosphere Research (IMBeR) program, to deliver 
 a uniformly 
quality-controlled surface ocean CO2 database. The many researchers 
and funding agencies responsible for the collection of data and 
quality control are thanked for their contributions to SOCAT.

4) Report problems to submit@socat.info.

5) Inform submit@socat.info of publications in which SOCAT is used.

Please, contact the SOCAT investigators for further advice.
 ..Metadata_Conventions = CF-1.6, COARDS, Unidata Dataset Discovery v1.0 
 ..Northernmost_Northing = -19.9997
 ..sourceUrl = (local files) 
 ..Southernmost_Northing = -19.9997
 ..standard_name_vocabulary = CF-12 
 ..subsetVariables = expocode, dataset_name, platform_name, platform_type, organization, geospatial_lon_min, geospatial_lon_max, geospatial_lat_min, geospatial_lat_max, time_coverage_start, time_coverage_end, investigators, socat_version, all_region_ids, socat_doi, qc_flag, nobs_full, nobs_deci, region_id, WOCE_CO2_water, WOCE_CO2_atm 
 ..summary = SOCAT v2019 DSG Files 
 ..time_coverage_end = 2015-12-29T22:20:00Z 
 ..time_coverage_start = 2015-01-01T00:17:00Z 
 ..Westernmost_Easting = -179.9946
 
! This also uses the same show_attribute routine
show dat/att
     currently SET data sets:
    1> ./data/long_global_att.nc  (default)
 Variable    VarType(in dset)    AttributeName   AttType     Size OutFlag AttValue
------------------------------------------------------------------------------------------
  
 .                               history         CHAR        29   T       FERRET V7.6 (debug)  7-Apr-20
                                 Conventions     CHAR        6    F       CF-1.6
                                 cdm_data_type   CHAR        10   F       Trajectory
                                 cdm_trajectory_variables
                                                 CHAR        274  F       expocode, dataset_name, platform_name, platform_type, organization, geospatial_lon_min, geospatial_lon_max, geospatial_lat_min, geospatial_lat_max, time_coverage_start, time_coverage_end, investigators, socat_version, all_region_ids, socat_doi, qc_flag, nobs_full, nobs_deci
                                 creator_name    CHAR        4    F       PMEL
                                 creator_url     CHAR        10   F       socat.info
                                 Easternmost_Easting
                                                 DOUBLE      1    F       179.9994
                                 featureType     CHAR        10   F       Trajectory
                                 geospatial_lat_max
                                                 DOUBLE      1    F       69.9991
                                 geospatial_lat_min
                                                 DOUBLE      1    F       -19.9997
                                 geospatial_lat_units
                                                 CHAR        13   F       degrees_north
                                 geospatial_lon_max
                                                 DOUBLE      1    F       179.9994
                                 geospatial_lon_min
                                                 DOUBLE      1    F       -179.9946
                                 geospatial_lon_units
                                                 CHAR        12   F       degrees_east
                                 geospatial_vertical_positive
                                                 CHAR        4    F       down
                                 geospatial_vertical_units
                                                 CHAR        1    F       m
                                 id              CHAR        35   F       socat_v2019_fulldata_2bd7_7513_4a09
                                 infoUrl         CHAR        10   F       socat.info
                                 institution     CHAR        4    F       PMEL
                                 keywords        CHAR        2169 F       100humidity, actual, additional, air, air_pressure_at_sea_level, air_temperature_at_sea_level, algorithm, atlas, atmosphere,
Atmosphere > Atmospheric Chemistry > Carbon and Hydrocarbon Compounds,
Atmosphere > Atmospheric Chemistry > Carbon and Hydrocarbon Compounds > Carbon Dioxide,
Atmosphere > Atmospheric Pressure > Atmospheric Pressure Measurements,
Atmosphere > Atmospheric Pressure > Sea Level Pressure,
Atmosphere > Atmospheric Pressure > Static Pressure,
Atmosphere > Atmospheric Water Vapor > Humidity,
Atmosphere > Atmospheric Winds > Surface Winds,
atmospheric, bathymetry, beginning, calculated, carbon, carbon dioxide, chamber, chemistry, circulation, co2, collection, compounds, course, currents, data, dataset, day, density, depth, dioxide, direction, distance, documents, dry, easternmost, eastward, eastward_sea_water_velocity, ending, equi, equil, equilibrator, etopo2, expocode, fco2, flag, fraction, globalview, ground, hour, humidity, hydrocarbon, identifier, interpolated, investigators, land, level, measured, measurements, minus, minute, mole, mole_fraction_of_carbon_dioxide_in_air, mole_fraction_of_carbon_dioxide_in_sea_water, mole_fraction_of_water_in_air, month, name, ncar, ncep, ncep/ncar, noaa, northernmost, number, ocean, oceans,
Oceans > Ocean Chemistry > Carbon,
Oceans > Ocean Chemistry > Carbon Dioxide,
Oceans > Ocean Circulation > Ocean Currents,
Oceans > Ocean Temperature > Sea Surface Temperature,
Oceans > Salinity/Density > Salinity,
organization, original, partial, pco2, platform, platform_course, platform_name, platform_speed_wrt_ground, pmel, ppm, pressure, quality, reanalysis, recommended, region, relative, relative_humidity, sal, salinity, sample, sea, sea-level, sea_surface_salinity, sea_surface_temperature, seawater, second, ship, slp, socat, southernmost, specific, specific_humidity, speed, sss, sst, static, surface, surface_partial_pressure_of_carbon_dioxide_in_air, surface_partial_pressure_of_carbon_dioxide_in_sea_water, temperature, time, true, uatm, using, vapor, velocity, version, vessel, water, westernmost, wet, wind, wind_from_direction, wind_speed, winds, woa, woce, world, wrt, xco2, xh2o, year
                                 keywords_vocabulary
                                                 CHAR        21   F       GCMD Science Keywords
                                 license         CHAR        2415 F       The data may be used and redistributed for free but is not intended
for legal use, since it may contain inaccuracies. Neither the data
Contributor, ERD, NOAA, nor the United States Government, nor any
of their employees or contractors, makes any warranty, express or
implied, including warranties of merchantability and fitness for a
particular purpose, or assumes any legal liability for the accuracy,
completeness, or usefulness, of this information.

The synthesis and gridded SOCAT products are a result of scientific effort 
by data providers, data managers and quality controllers. It is important 
that users of the SOCAT products fairly acknowledge this effort. This will
help generate funding for continuation of observational products and 
promote further sharing of data.  

We expect that users of SOCAT data products:

1) Generously acknowledge the contribution of SOCAT data providers and
investigators in the form of invitation to co-authorship, reference 
to relevant scientific articles by data providers or by naming data 
providers in the acknowledgements.

Specifically, in regional studies invite large data providers, who 
frequently possess valuable expert knowledge on data and region, 
to collaborate at an early stage, which may lead to an invitation 
of co-authorship.  We recognize that co-authorship is only justified 
in case of a significant scientific contribution to a publication 
and that provision of data on its own does not warrant co-authorship.

2) Cite SOCAT and its data products as:
 Versions 3-6: Bakker et al. (2016);
 Version 2: Bakker et al. (2014);
 Version 1 (synthesis data products): Pfeil et al. (2013);
 Version 1 (gridded data product): Sabine et al.(2013) and Pfeil et al. (2013).

3) Include in the acknowledgements:
The Surface Ocean CO2 Atlas (SOCAT) is an international effort, 
endorsed by the International Ocean Carbon Coordination Project (IOCCP), 
the Surface Ocean Lower Atmosphere Study (SOLAS) and the Integrated 
Marine Biosphere Research (IMBeR) program, to deliver a uniformly 
quality-controlled surface ocean CO2 database. The many researchers 
and funding agencies responsible for the collection of data and 
quality control are thanked for their contributions to SOCAT.

4) Report problems to submit@socat.info.

5) Inform submit@socat.info of publications in which SOCAT is used.

Please, contact the SOCAT investigators for further advice.
                                 Metadata_Conventions
                                                 CHAR        46   F       CF-1.6, COARDS, Unidata Dataset Discovery v1.0
                                 Northernmost_Northing
                                                 DOUBLE      1    F       -19.9997
                                 sourceUrl       CHAR        13   F       (local files)
                                 Southernmost_Northing
                                                 DOUBLE      1    F       -19.9997
                                 standard_name_vocabulary
                                                 CHAR        5    F       CF-12
                                 subsetVariables CHAR        315  F       expocode, dataset_name, platform_name, platform_type, organization, geospatial_lon_min, geospatial_lon_max, geospatial_lat_min, geospatial_lat_max, time_coverage_start, time_coverage_end, investigators, socat_version, all_region_ids, socat_doi, qc_flag, nobs_full, nobs_deci, region_id, WOCE_CO2_water, WOCE_CO2_atm
                                 summary         CHAR        21   F       SOCAT v2019 DSG Files
                                 time_coverage_end
                                                 CHAR        20   F       2015-12-29T22:20:00Z
                                 time_coverage_start
                                                 CHAR        20   F       2015-01-01T00:17:00Z
                                 Westernmost_Easting
                                                 DOUBLE      1    F       -179.9946
  
 expocode              CHAR      long_name       CHAR        8    T       expocode
                                 cf_role         CHAR        13   F       trajectory_id
  
 rowSize               INT       long_name       CHAR        42   T       Number of Observations for this Trajectory
                                 sample_dimension
                                                 CHAR        3    F       obs
                                 actual_range    INT         2    F       8 8
  
 longitude             DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 axis            CHAR        1    T       X
                                 long_name       CHAR        9    T       Longitude
                                 units           CHAR        12   T       degrees_east
                                 history         CHAR        9    T       From fco2
                                 actual_range    DOUBLE      2    T       135.0717 135.2168
  
 latitude              DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 axis            CHAR        1    T       Y
                                 long_name       CHAR        8    T       Latitude
                                 units           CHAR        13   T       degrees_north
                                 history         CHAR        9    T       From fco2
                                 actual_range    DOUBLE      2    T       33.62171 33.72293
  
 time                  DOUBLE    missing_value   DOUBLE      1    T       NaN
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 axis            CHAR        1    T       T
                                 long_name       CHAR        4    T       Time
                                 time_origin     CHAR        20   T       01-JAN-1970 00:00:00
                                 units           CHAR        34   T       seconds since 1970-01-01T00:00:00Z
                                 history         CHAR        9    T       From fco2
                                 actual_range    DOUBLE      2    T       1.450111E+09 1.450113E+09
  
 fCO2_recommended      DOUBLE    missing_value   DOUBLE      1    T       -1.E+34
                                 _FillValue      DOUBLE      1    T       -1.E+34
                                 long_name       CHAR        16   T       fCO2 recommended
                                 units           CHAR        4    T       uatm
                                 history         CHAR        9    T       From fco2
  
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err751_assorted_dsg_errs
 
! err751_assorted_dsg_errors
! A collection of errors when working with DSG datasets
!   - PLOT/VS plots that are not the native dsg-plot style
!   - A few details in workin with Point data.
 
! PLOT/VS plot (not native profile plot) where the region given doesn't
! correspond to any data in the dataset.
 
! previously resulted in a runtime error
use profile_dsg2.nc
ribbon/vs/thick/x=-118:-112 pot_temp_degc, latitude, sal
 
 
! Now check that a PLOT/VS plot with depth on the vertical axis is
! drawn with depth positive down.  should run min=33, max=2
 
plot/ribbon/vs/sym/thick sal, depth, pot_temp_degc
show sym yax*
YAXIS_MIN = "33.2111015"
YAXIS_MAX = "2.11999989"
 
can data/all
 
! error saving string data on an instance axis.
 
use DSG_ERDDAP_Tao5daySst.nc
 
! This had  a data-type warning
save/clobber/file=a.nc t_25, wmo_platform_code
 
! This crashed Ferret
save/clobber/file=a.nc t_25, qt_5025, array, wmo_platform_code
 
can data/all; use a
list/e=10:15  wmo_platform_code, array
   DATA SET: ./a.nc
   SUBSET   : E (instance): 10 to 15
 STATION           is Timeseries-id
 WMO_PLATFORM_CODE is WMO Platform Code
 ARRAY             is Array
    FEATURE  STATION     LONGITUDE  LATITUDE WMO_PLATF ARRAY
    10            0n23w        23W         0  31007. "PIRATA"
    11            0n67e        67E         0  23015.  "RAMA"
    12          0n80.5e      80.5E         0  23001.  "RAMA"
    13            0n90e        90E         0  23004.  "RAMA"
    14            0n95w        95W         0  32321. "TAO/TRITON"
    15          1.5n67e        67E      1.5N     ...  "RAMA"
 
 
can data/all
 
! Constrain point data in x-y, the plot should subset in T
 
use dsg_point_data.nc
set view upper; ribbon/vs/thick/sym=19/siz=0.2 time, sst, sst
show sym xax*
XAXIS_MIN = "1.00000000"
XAXIS_MAX = "19.0000000"
set view lower; ribbon/vs/thick/sym=19/siz=0.2/x=-115:-100/y=16:18 time, sst, sst
show sym xax*
XAXIS_MIN = "4.00000000"
XAXIS_MAX = "16.0000000"
 
 
 
can data/all
 
! Trajectory data.
 
use sail_2019.nc
 
! this plot was missing the longitude label in the upper left
 
set view upper
ribbon/vs/thick  time, TEMP_CTD_RBR_MEAN, longitude
show sym lab($labnum_x), lab($labnum_y)
 !-> show sym lab1, lab2
LAB1 = "LONGITUDE : 166.848W(-166.848) to 166.0383W(-166.038"
LAB2 = "LATITUDE : 54.739N to 55.705N"
 
! This ribbon command caused a crash
set v lower
ribbon/vs/thick/y=54.9:55.2   time, TEMP_CTD_RBR_MEAN, longitude
 
 
can data/all
 
! PLOT/SET didn't work when plotting dsg data types when the PLOT is
! internally defining a RIBBON plot.  Would have needed PPL RIBBON,
! but that's inconvenient to expect the user to know. Change so that
! RIBBON/SET can be finished with PPL PLOT.
 
 
use dsg_cross_dateline.nc
plot/set/nolab temp
  ppl shakey 1, 0, 0.1, 2, , , 2.5, 8.5, 8.1, 8.3
  ppl plot
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err751_dsg_atan2_randu2
! err751_dsg_atan2_randu2
! Test fixes for ATAN2 function and RANDU2 function for DSG data.
 
! previously these both failed to do the computation, returned a flag of -12345
! Do not list randu2 results; they change with each run.
 
use ../bench/data/dsg_cross_prime.nc
list atan2(lons, lats),  randu(lons) ! , randu2(lons,-1)
   DATA SET: ../bench/data/dsg_cross_prime.nc
 ID         is Trajectory-id
 EX#1       is ATAN2(LONS, LATS)
 LONS       is longitude (degrees_east)
    FEATURE  ID          LONGITUDE  LATITUDE            TIME        EX#1    LONS
 
     1       1000               6W       20S   09-FEB-2017 12:00   1.627  0.7404
     1       1000               2E       10S   14-FEB-2017 12:00   2.944  0.1599
     1       1000               5W       30N   19-FEB-2017 12:00   1.486  0.8200
     1       1000               3E       40N   24-FEB-2017 12:00   0.075  0.3446
     1       1000               1E       20S   01-MAR-2017 12:00   3.092  0.8769
 
     2       2000              70W       15S   02-MAR-2017 12:00   1.622  0.4047
     2       2000              20E       20N   03-MAR-2017 12:00   0.785  0.4648
     2       2000              30E       10N   04-MAR-2017 12:00   1.249  0.1497
     2       2000              60W       15S   05-MAR-2017 12:00   1.621  0.3996
     2       2000              50W       20N   06-MAR-2017 12:00   1.506  0.1340
     2       2000              10W       10N   07-MAR-2017 12:00   1.542  0.0722
     2       2000              50W       15S   08-MAR-2017 12:00   1.619  0.7664
     2       2000               5E       20N   09-MAR-2017 12:00   0.245  0.5169
 
     3       3000              15W       15S   10-MAR-2017 12:00   1.614  0.1167
     3       3000               5W       25S   11-MAR-2017 12:00   1.641  0.9755
     3       3000               1E       35S   12-MAR-2017 12:00   3.113  0.1136
     3       3000               5E       45S   13-MAR-2017 12:00   3.031  0.7245
     3       3000              10E       55S   14-MAR-2017 12:00   2.962  0.7765
 
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err751_symbol_parsing
! err751_symbol_parsing.jnl
! ticket 756 4/6/2020 ACM
! The parsing previously evaluated ($a) at the time that ($loop)
! was parsed, and substituted the value "old" then, so that as the
! loop executed the "say ($a)" always used the original value of "old".
 
def sym a old
define sym loop rep/j=1:3 (def sym a \`j\`; show sym a; say (\$a))
($loop)
 !-> rep/j=1:3 (def sym a `j`; show sym a; say ($a))
!-> REPEAT: J=1
 !-> def sym a 1
A = "1"
 !-> MESSAGE/CONTINUE 1
1
!-> REPEAT: J=2
 !-> def sym a 2
A = "2"
 !-> MESSAGE/CONTINUE 2
2
!-> REPEAT: J=3
 !-> def sym a 3
A = "3"
 !-> MESSAGE/CONTINUE 3
3
 
! How about in a compound command?
def sym a old; let b = 8; show sym a; ($loop)
A = "old"
 !-> rep/j=1:3 (def sym a `j`; show sym a; say ($a))
!-> REPEAT: J=1
 !-> def sym a 1
A = "1"
 !-> MESSAGE/CONTINUE 1
1
!-> REPEAT: J=2
 !-> def sym a 2
A = "2"
 !-> MESSAGE/CONTINUE 2
2
!-> REPEAT: J=3
 !-> def sym a 3
A = "3"
 !-> MESSAGE/CONTINUE 3
3
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err751_fcns_of_dsg
! err751_fcns_of_dsg.jnl
! 5/2020
! intentional errors: grid-changing fcns and others that
! use coordinates are not yet customized for DSG datasets
 
use DSG_ERDDAP_Tao5daySst.nc
 
set mode ignore
plot/m=1:5 ffta(t_25)
 
list box_edges (t_25)
 
set mode/last ignore
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err751_use_order
! err751_use_order.jnl
! use/order= failed when some variables are 1-D and others are 2-D
! This change applies the permutation first to the grid of the
! variable with most dimensions (1st variable found w/ ndim) and then
! uses the resulting axis directions for other grids.
 
can data/all
use/feature=none/order=zt alamo_float_CFMA_profiles.nc
show dat
     currently SET data sets:
    1> ./data/alamo_float_CFMA_profiles.nc  (default)
 name     title                             I         J         K         L
 PROFILEID
                                           ...       ...       ...       1:4
 TIME     Julian day (UTC) of the station  ...       ...       ...       1:4
 LATITUDE Latitude of the station, best e  ...       ...       ...       1:4
 LONGITUDE
          Longitude of the station, best   ...       ...       ...       1:4
 PRES     Sea water pressure, equals 0 at  ...       ...       1:61      1:4
 
show grid longitude
    GRID GIH1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 PROFILE   T                    4 r   1                    4                   full
list longitude
             VARIABLE : Longitude of the station, best estimate (degrees_east)
             DATA SET : Float 9234 - Arctic Heat Open Science Experiment
             FILENAME : alamo_float_CFMA_profiles.nc
             SUBSET   : 4 points (T)
             CALENDAR : JULIAN
 1   / 1: -158.2
 2   / 2: -158.2
 3   / 3: -158.2
 4   / 4: -158.2
list pres
             VARIABLE : Sea water pressure, equals 0 at sea-level (decibar)
             DATA SET : Float 9234 - Arctic Heat Open Science Experiment
             FILENAME : alamo_float_CFMA_profiles.nc
             SUBSET   : 61 by 4 points (Z-T)
             CALENDAR : JULIAN
      ... listing every   4th point
             1      5      9     13     17     21     25     29     33     37     41     45     49     53     57     61    
             1      5      9     13     17     21     25     29     33     37     41     45     49     53     57     61
 1   / 1:   0.01   4.25   8.25  12.25  16.21  20.25  24.25  28.21  32.25  36.25  40.21  44.21  48.25  52.21  56.21  60.33
 2   / 2:  -0.00   4.28   8.24  12.28  16.24  20.28  24.28  28.24  32.24  36.28  40.24  44.24  48.24  52.28  56.28  60.48
 3   / 3:   0.01   4.25   8.25  12.33  16.25  20.29  24.25  28.25  32.25  36.29  40.29  44.29  48.29  52.29  56.29  60.33
 4   / 4:   0.02   4.30   8.30  12.34  16.30  20.26  24.26  28.26  32.26  36.26  40.26  44.22  48.26  52.26  56.30  60.18
 
can data/all
use/feature=none/order=-zt alamo_float_CFMA_profiles.nc
show dat
     currently SET data sets:
    1> ./data/alamo_float_CFMA_profiles.nc  (default)
 name     title                             I         J         K         L
 PROFILEID
                                           ...       ...       ...       1:4
 TIME     Julian day (UTC) of the station  ...       ...       ...       1:4
 LATITUDE Latitude of the station, best e  ...       ...       ...       1:4
 LONGITUDE
          Longitude of the station, best   ...       ...       ...       1:4
 PRES     Sea water pressure, equals 0 at  ...       ...       1:61      1:4
 
show grid longitude
    GRID GIH1
 name       axis              # pts   start                end                 subset
 normal    X
 normal    Y
 normal    Z
 PROFILE   T                    4 r   1                    4                   full
list longitude
             VARIABLE : Longitude of the station, best estimate (degrees_east)
             DATA SET : Float 9234 - Arctic Heat Open Science Experiment
             FILENAME : alamo_float_CFMA_profiles.nc
             SUBSET   : 4 points (T)
             CALENDAR : JULIAN
 1   / 1: -158.2
 2   / 2: -158.2
 3   / 3: -158.2
 4   / 4: -158.2
 
! reversed in the z direction, right to left
list pres
             VARIABLE : Sea water pressure, equals 0 at sea-level (decibar)
             DATA SET : Float 9234 - Arctic Heat Open Science Experiment
             FILENAME : alamo_float_CFMA_profiles.nc
             SUBSET   : 61 by 4 points (Z-T)
             CALENDAR : JULIAN
      ... listing every   4th point
             1      5      9     13     17     21     25     29     33     37     41     45     49     53     57     61    
             1      5      9     13     17     21     25     29     33     37     41     45     49     53     57     61
 1   / 1:  60.33  56.21  52.21  48.25  44.21  40.21  36.25  32.25  28.21  24.25  20.25  16.21  12.25   8.25   4.25   0.01
 2   / 2:  60.48  56.28  52.28  48.24  44.24  40.24  36.28  32.24  28.24  24.28  20.28  16.24  12.28   8.24   4.28  -0.00
 3   / 3:  60.33  56.29  52.29  48.29  44.29  40.29  36.29  32.25  28.25  24.25  20.29  16.25  12.33   8.25   4.25   0.01
 4   / 4:  60.18  56.30  52.26  48.26  44.22  40.26  36.26  32.26  28.26  24.26  20.26  16.30  12.34   8.30   4.30   0.02
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err751_proleptic_gregorian
! err751_proleptic_gregorian
! 5/26/20  ACM see tiket 1906
 
 
! These axes should act identically, as Proleptic Gregorian with a leap day in 1804.
 
define axis/t/t0="1-jan-1804"/units=days/cal="gregorian" tax_gr = L[L=1:3660]-0.5
define axis/t/t0="1-jan-1804"/units=days/cal="proleptic_gregorian" tax_pgr = L[L=1:3660]-0.5
show axis tax_gr
 name       axis              # pts   start                end
 TAX_GR    TIME              3660 r   01-JAN-1804 12:00    07-JAN-1814 12:00
T0 = 1-JAN-1804
   Axis span (to cell edges) = 3660
show axis tax_pgr
 name       axis              # pts   start                end
 TAX_PGR   TIME              3660 r   01-JAN-1804 12:00    07-JAN-1814 12:00
T0 = 1-JAN-1804
CALENDAR = PROLEPTIC_GREGORIAN
   Axis span (to cell edges) = 3660
 
let varg = L[gt=tax_gr]
 
list varg[l=58:60]
             VARIABLE : L[GT=TAX_GR]
             SUBSET   : 3 points (TIME)
 27-FEB-1804 12 / 58:  58.00
 28-FEB-1804 12 / 59:  59.00
 29-FEB-1804 12 / 60:  60.00
list/t=26-feb-1812:3-mar-1812 varg
             VARIABLE : L[GT=TAX_GR]
             SUBSET   : 6 points (TIME)
 26-FEB-1812 12 / 2979:  2979.
 27-FEB-1812 12 / 2980:  2980.
 28-FEB-1812 12 / 2981:  2981.
 29-FEB-1812 12 / 2982:  2982.
 01-MAR-1812 12 / 2983:  2983.
 02-MAR-1812 12 / 2984:  2984.
 
! These were incorrect, did not include the leap day
let varp=L[gt=tax_pgr]
list varp[l=58:60]
             VARIABLE : L[GT=TAX_PGR]
             SUBSET   : 3 points (TIME)
             CALENDAR : PROLEPTIC_GREGORIAN
 27-FEB-1804 12 / 58:  58.00
 28-FEB-1804 12 / 59:  59.00
 29-FEB-1804 12 / 60:  60.00
list/t=26-feb-1812:3-mar-1812 varp
             VARIABLE : L[GT=TAX_PGR]
             SUBSET   : 6 points (TIME)
             CALENDAR : PROLEPTIC_GREGORIAN
 26-FEB-1812 12 / 2979:  2979.
 27-FEB-1812 12 / 2980:  2980.
 28-FEB-1812 12 / 2981:  2981.
 29-FEB-1812 12 / 2982:  2982.
 01-MAR-1812 12 / 2983:  2983.
 02-MAR-1812 12 / 2984:  2984.
 
 
! Labels on plots (these were prev. ok, but check...)
define axis/x=1:10:1 xax
let var2d = x[gx=xax] + L[gt=tax_gr]
plot/l=60 var2d
 
! Should be Feb 29
sh sym lab($labnum_t)
 !-> sh sym lab1
LAB1 = "TIME : 29-FEB-1804 12:00"
 
 
define axis/t/t0="1-jan-1804"/units=days/cal="noleap" tax_nol = L[L=1:366]-0.5
let var2d = x[gx=xax] + L[gt=tax_nol]
plot/l=60 var2d
! Should be March 1
sh sym lab($labnum_t)
 !-> sh sym lab1
LAB1 = "TIME : 01-MAR-1804 12:00 NOLEAP"
 
 
*** Running ferret script: bn_ribbon_set.jnl
! bn_ribbon_set.jnl
! 4/20/20
! Update in v7.6 allows PPL PLOT to work with any RIBBON plot
! both for DSG datasets and othehr RIBBON plots.
! Previously needed to do RIBBON/SET []; ppl PLOT/RIBBON.
 
use coads_climatology
 
let/title=longitude/units longitude = x[gx=sst]
ribbon/thick=3/y=0/l=1/set sst, longitude
ppl shakey,1,0
ppl ylab
ppl plot
 
! or a PLOT command for a DSG trajectory dataset which internally becomes a RIBBON
! plot, but the user wouldn't be expected to know that.  So PLOT/SET must be
! finished with PPL PLOT.
 
use dsg_cross_dateline.nc
plot/set/nolab temp
  ppl shakey 1, 0, 0.1, 2, , , 2.5, 8.5, 8.1, 8.3
  ppl plot
 
!  Test with /OVER
 
fill/l=1/pal=grayscale/title="COADS SST and Temperature from `temp,return=dset` (Deg C) "/x=145:195/y=15s:45  sst[d=1]
 !-> CONTOUR/FILL/l=1/pal=grayscale/title="COADS SST and Temperature from dsg_cross_dateline (Deg C) "/x=145:195/y=15s:45  sst[d=1]
 
! Ribbon plot of trajectory data
plot/over/thick=3/nolab/key/set temp
  ppl shakey 1, 0
  ppl plot/over
 
frame/file=ribbon_set_ppl_plot.gif
*** Running ferret script: bn_mode_dsg.jnl
! bn_mode_dsg
! Turn off all enhancements for DSG datasets at the session level
! Default state is SET.
! 5/5/2020  ACM
 
show mode dsg
      MODE            STATE        ARGUMENT
      DSG              SET
cancel mode dsg
show mode dsg
      MODE            STATE        ARGUMENT
      DSG           CANCELED
 
! Canceled: open datasets as non-dsg
 
use dsg_point_data
use simple_traj_dsg
show data
     currently SET data sets:
    1> ./data/dsg_point_data.nc
 name     title                             I         J         K         L
 LONS     longitude                        1:26      ...       ...       ...
 LATS     latitude                         1:26      ...       ...       ...
 DEPTH    Depth                            1:26      ...       ...       ...
 TIME     time                             1:26      ...       ...       ...
 SST      Temperature                      1:26      ...       ...       ...
 
    2> ./data/simple_traj_dsg.nc  (default)
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:4       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:4       ...
 LONS     longitude                        1:26      ...       ...       ...       ...       ...
 LATS     latitude                         1:26      ...       ...       ...       ...       ...
 TIME     Centered Time                    1:26      ...       ...       ...       ...       ...
 SST      Temperature                      1:26      ...       ...       ...       ...       ...
 SSTGAP   IF SST GT 20 THEN SST            1:26      ...       ...       ...       ...       ...
 
cancel data/all
 
! open datasets as DSG
set mode dsg
show mode dsg
      MODE            STATE        ARGUMENT
      DSG              SET
 
use dsg_point_data
use simple_traj_dsg
show data
     currently SET data sets:
    1> ./data/dsg_point_data.nc
       DSG Feature type Point
 name     title                             I         J         K         L         M         N
 LONS     longitude                        ...       ...       ...       ...     tot 26      ...
 LATS     latitude                         ...       ...       ...       ...     tot 26      ...
 DEPTH    Depth                            ...       ...       ...       ...     tot 26      ...
 TIME     time                             ...       ...       ...       ...     tot 26      ...
 SST      Temperature                      ...       ...       ...       ...     tot 26      ...
 
    2> ./data/simple_traj_dsg.nc  (default)
       DSG Feature type Trajectory
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:4       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:4       ...
 LONS     longitude                      tot 26      ...       ...       ...       1:4       ...
 LATS     latitude                       tot 26      ...       ...       ...       1:4       ...
 TIME     Centered Time                  tot 26      ...       ...       ...       1:4       ...
 SST      Temperature                    tot 26      ...       ...       ...       1:4       ...
 SSTGAP   IF SST GT 20 THEN SST          tot 26      ...       ...       ...       1:4       ...
 
 
! Intentional error: CANCEL MODE DSG with dsg datasets open.
show mode dsg
      MODE            STATE        ARGUMENT
      DSG              SET
 
set mode ignore
cancel mode dsg
 
! That was an error, so mode setting unchanged.
show mode dsg
      MODE            STATE        ARGUMENT
      DSG              SET
 
cancel data/all
 
! CANCEL MODE DSG, open datasets
 
cancel mode dsg
 
use dsg_point_data
use simple_traj_dsg
show data
     currently SET data sets:
    1> ./data/dsg_point_data.nc
 name     title                             I         J         K         L
 LONS     longitude                        1:26      ...       ...       ...
 LATS     latitude                         1:26      ...       ...       ...
 DEPTH    Depth                            1:26      ...       ...       ...
 TIME     time                             1:26      ...       ...       ...
 SST      Temperature                      1:26      ...       ...       ...
 
    2> ./data/simple_traj_dsg.nc  (default)
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:4       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:4       ...
 LONS     longitude                        1:26      ...       ...       ...       ...       ...
 LATS     latitude                         1:26      ...       ...       ...       ...       ...
 TIME     Centered Time                    1:26      ...       ...       ...       ...       ...
 SST      Temperature                      1:26      ...       ...       ...       ...       ...
 SSTGAP   IF SST GT 20 THEN SST            1:26      ...       ...       ...       ...       ...
 
 
! Intentional error: SET MODE DSG is an error if any datasets open.
 
set mode dsg
set mode/last ignore
 
show data/all
     currently SET data sets:
    1> ./data/dsg_point_data.nc
 name     title                             I         J         K         L
 LONS     longitude                        1:26      ...       ...       ...
 LATS     latitude                         1:26      ...       ...       ...
 DEPTH    Depth                            1:26      ...       ...       ...
 TIME     time                             1:26      ...       ...       ...
 SST      Temperature                      1:26      ...       ...       ...
 
    2> ./data/simple_traj_dsg.nc  (default)
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:4       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:4       ...
 LONS     longitude                        1:26      ...       ...       ...       ...       ...
 LATS     latitude                         1:26      ...       ...       ...       ...       ...
 TIME     Centered Time                    1:26      ...       ...       ...       ...       ...
 SST      Temperature                      1:26      ...       ...       ...       ...       ...
 SSTGAP   IF SST GT 20 THEN SST            1:26      ...       ...       ...       ...       ...
 
cancel data/all
 
set mode dsg
 
! Interplay with use/feature=none
 
! This should not cause any error, a non-dsg file is open, we
! ask to cancel mode dsg
 
use/feature=none simple_traj_dsg
show data
     currently SET data sets:
    1> ./data/simple_traj_dsg.nc  (default)
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:4       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:4       ...
 LONS     longitude                        1:26      ...       ...       ...       ...       ...
 LATS     latitude                         1:26      ...       ...       ...       ...       ...
 TIME     Centered Time                    1:26      ...       ...       ...       ...       ...
 SST      Temperature                      1:26      ...       ...       ...       ...       ...
 SSTGAP   IF SST GT 20 THEN SST            1:26      ...       ...       ...       ...       ...
 
cancel mode dsg
show data
     currently SET data sets:
    1> ./data/simple_traj_dsg.nc  (default)
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:4       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:4       ...
 LONS     longitude                        1:26      ...       ...       ...       ...       ...
 LATS     latitude                         1:26      ...       ...       ...       ...       ...
 TIME     Centered Time                    1:26      ...       ...       ...       ...       ...
 SST      Temperature                      1:26      ...       ...       ...       ...       ...
 SSTGAP   IF SST GT 20 THEN SST            1:26      ...       ...       ...       ...       ...
 
 
cancel data/all
!
use/feature=none simple_traj_dsg
show data
     currently SET data sets:
    1> ./data/simple_traj_dsg.nc  (default)
 name     title                             I         J         K         L         M         N
 ID       id                               ...       ...       ...       ...       1:4       ...
 ROWSIZE  Number of Observations for this  ...       ...       ...       ...       1:4       ...
 LONS     longitude                        1:26      ...       ...       ...       ...       ...
 LATS     latitude                         1:26      ...       ...       ...       ...       ...
 TIME     Centered Time                    1:26      ...       ...       ...       ...       ...
 SST      Temperature                      1:26      ...       ...       ...       ...       ...
 SSTGAP   IF SST GT 20 THEN SST            1:26      ...       ...       ...       ...       ...
 
cancel data/all
 
! clean up
set mode dsg
*** Running ferret script: bn_string_type.jnl
! bn_string_type.jnl
! Data in netCDF files may be stored as type string
! Read and list such data, but write it as type char
 
use string_type_var
list str_temp
             VARIABLE : Example data of type string
             FILENAME : string_type_var.nc
             SUBSET   : 15 points (TIME)
 01-JAN-1970 00:00:01 /  1:"28.59"     
 01-JAN-1970 00:00:02 /  2:"28.88"     
 01-JAN-1970 00:00:03 /  3:"28.78"     
 01-JAN-1970 00:00:04 /  4:"28.87123"  
 01-JAN-1970 00:00:05 /  5:"28.74"     
 01-JAN-1970 00:00:06 /  6:"28.53"     
 01-JAN-1970 00:00:07 /  7:"28.76"     
 01-JAN-1970 00:00:08 /  8:"29.2712345"
 01-JAN-1970 00:00:09 /  9:"29.15"     
 01-JAN-1970 00:00:10 / 10:"29.03"     
 01-JAN-1970 00:00:11 / 11:"29.13"     
 01-JAN-1970 00:00:12 / 12:"29.19"     
 01-JAN-1970 00:00:13 / 13:"29.25"     
 01-JAN-1970 00:00:14 / 14:"29.25"     
 01-JAN-1970 00:00:16 / 15:"29.21"     
 
save/clobber/file=a.nc/L=6:10 str_temp
sp ncdump a.nc
netcdf a {
dimensions:
	TIME = UNLIMITED ; // (5 currently)
	bnds = 2 ;
	STRING1_15 = 15 ;
variables:
	int TIME(TIME) ;
		TIME:axis = "T" ;
		TIME:long_name = "Centered Time" ;
		TIME:time_origin = "01-JAN-1970 00:00:00" ;
		TIME:units = "seconds since 1970-01-01 00:00:00" ;
		TIME:standard_name = "time" ;
		TIME:bounds = "TIME_bnds" ;
	int TIME_bnds(TIME, bnds) ;
	char STR_TEMP(TIME, STRING1_15) ;
		STR_TEMP:long_name = "Example data of type string" ;
		STR_TEMP:history = "From string_type_var" ;

// global attributes:
		:history = "FERRET V7.6  DD-MON-YY" ;
		:Conventions = "CF-1.6" ;
data:

 TIME = 6, 7, 8, 9, 10 ;

 TIME_bnds =
  5, 6,
  6, 7,
  7, 8,
  8, 9,
  9, 10 ;

 STR_TEMP =
  "28.53",
  "28.76",
  "29.2712345",
  "29.15",
  "29.03" ;
}
 
! But asking for output of type string not yet implemented.
! Intentional error:
 
set mode ignore
save/clobber/file=a.nc/outtype='string' str_temp
set mode/last ignore
 
*** Running ferret script: bn_gif_noremote.jnl
! bn_gif_noremote.jnl
 
! NOTE the plots in bnplot_2.gif are different in PyFerret and Ferret,
! because of different treatment of /TEXT= for viewport definitions.
 
can mode logo
 
! define a 6 viewport window (modified definitions 11/92)
def view/text=.4/xlim=0,.333/ylim=0,.5    ll6
def view/text=.2/xlim=0,.333/ylim=.5,1    ul6
def view/text=.1/xlim=.333,.666/ylim=0,.5 lm6
def view/text=.6/xlim=.333,.666/ylim=.5,1 um6
def view/text=1.5/xlim=.666,1/ylim=0,.5   lr6
def view/xlim=.666,1/ylim=.5,1            ur6     ! auto /TEXT
show view
 
 name             text    xlimits     ylimits    mode
 
 UPPER            1.00   0.00,1.00   0.50,1.00   edges
 LOWER            1.00   0.00,1.00   0.00,0.50   edges
 RIGHT            1.00   0.50,1.00   0.00,1.00   edges
 LEFT             1.00   0.00,0.50   0.00,1.00   edges
 LL               0.50   0.00,0.50   0.00,0.50   edges
 LR               0.50   0.50,1.00   0.00,0.50   edges
 UL               0.50   0.00,0.50   0.50,1.00   edges
 UR               0.50   0.50,1.00   0.50,1.00   edges
 FULL             1.00   0.00,1.00   0.00,1.00   edges
 LL6              0.40   0.00,0.33   0.00,0.50   edges
 UL6              0.20   0.00,0.33   0.50,1.00   edges
 LM6              0.10   0.33,0.67   0.00,0.50   edges
 UM6              0.60   0.33,0.67   0.50,1.00   edges
 LR6              1.50   0.67,1.00   0.00,0.50   edges
 UR6              0.41   0.67,1.00   0.50,1.00   edges
   current viewport is NONE
 
! some variables for plotting
let a = 0.8*sin(l/10)
let b = 0.6*cos(l/10)
let c = sin(100/(l+k))
let d = l/50
let e = k-(l/25)
let f = -.5+(l/125)
let g = (l-25)/(k*35)
let h = 0.1
let m = 0.2
 
! illegal plot commands
set mode ignore
plot/i=1:10/j=1:20/nolabel i+j			! not a line
plot/i=1:10/j=1:20/nolabel i,i+j		! not a line
plot/i=1:10/j=1:20/nolabel i+j,i		! not a line
plot/i=1:10/j=1:20/nolabel j,i			! differing axes
plot/i=1:10/j=1:20/vs/line/nolabel j,i		! unequal lengths
contour/i=1:10/j=1:20/nolabel i			! only 1 D
contour/i=1:10/j=1:20/nolabel i/j,j/i		! multiple fields
vector/i=1:10/j=1:20/nolabel i/j		! only 1 field
vector/i=1:10/j=1:20/nolabel i/j,j/i,i+j	! 3 fields
set mode/last ignore
 
! notice the default window size is 10.2,width x 8.8,height
ppl list plot
         WIDTH=   10.20  HEIGHT=    8.80  TKTYPE=    0  BAUD=  110
         WINDOW= ON   BOX= OFF  CROSS= 0  PLTYPE=  3
         PLOT MODE=   A
         PLOT FILE= .gif                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 
! enlarge it to accomodate an additional 50% width
ppl size 15.3,8.8
 
! turn on metafile (enabled 10/29/91)
! commented out 9/97 - instead set in bn450_all.jnl
! set mode metafile
 
! draw a plot into a viewport - to be deleted (check hard copy)
set view ll6
contour/i=1:50/j=1:50/nolabel i/(j+20)
 
! 4 frames testing PLOT output
set view ul6
plot/l=1:50/k=1/trans/nolabel a,b,c
plot/l=1:50/k=1/trans/over/line=6/nolabel d
plot/l=1:50/k=1/trans/over/symbol=88/nolabel e
plot/l=1:50/k=1/trans/over/symbol=47/line/nolabel f
def view/text=.1/xlim=.333,1/ylim=0,.5 lm6   ! redefine longer in x (11/92)
set view lm6
!ppl axlen 16
set region/k=1
plot/l=1:50/nolabel a,b,c,d,e,f,g[k=1],g[k=2],a+h,b+h,c+h,d+h,e+h,f+h,g[k=1]+h,g[k=2]+h,a+m,b+m,c+m
def view/text=.6/xlim=.333,1/ylim=.5,1 um6    ! redefine it longer in x (11/92)
set view um6
!ppl axlen 17,5
plot/l=1:50/nolabel sin(100/(l+5))
plot/l=1:50/over/nolabel a,b,c,d,e,f,g[k=1],g[k=2],a+h,b+h,c+h,d+h,e+h,f+h,g[k=1]+h,g[k=2]+h,a+m,b+m,c+m
set view ll6
!ppl axlen 8,6
plot/l=1:99000/nolabel sin(200000/(l+10000))
 
! reset to normal axis lengths and prepare for a new piccie
!ppl axlen 8
frame/file=bnplot_1.gif
set wind/clear
 
! draw six frames
set view ll6
contour/i=1:50/j=1:50/levels=(0,2.5,.25)/nolabel i/(j+20)
plot/over/nolab/vs/line/i=1:50/j=1:50/nolabel 6*i/j,5*j/i
set view ul6
vector/i=1:50/j=1:50/length=50/aspect/nolabel sin(i/20)*10+j-20,-1*cos(j/10)*10+i-20
def view/text=.1/xlim=.333,.666/ylim=0,.5 lm6  ! redefine it (11/92)
set view lm6
shade/i=1:50/j=1:50/nolabel i/(j+20)
set view lr6
ppl lev () (0,2.5,.1)
shade/i=1:50/j=1:50/line/level/nolabel i/(j+20)
set view ur6
let icomp = (sin(i/20)*10+j-20)
let jcomp = (-1*cos(j/10)*10+i-20)
contour/i=1:50/j=1:50/nolabel icomp^2+jcomp^2
contour/i=1:50/j=1:50/over/level/nolabel icomp^2+(-1*cos(i/10)*80)^2
! note: "i-i" and "j-j" are needed to create 2D structures
vector/i=1:50/j=1:50/overlay/nolabel j-20+(i-i),i-20+(j-j)
vector/i=1:50/j=1:50/overlay/length/nolabel i-20+(j-j),40-j+(i-i)
def view/text=.6/xlim=.333,.666/ylim=.5,1 um6    ! redefine it (11/92)
set view um6
shade/i=1:50/j=1:50/nolabel i/(j+20)
contour/i=1:50/j=1:50/over/nolabel (sin(i/20)+j-20)^2+(-1*cos(j/10)+i-20)^2
vector/i=1:50/j=1:50/overlay/nolabel j-20+(i-i),i-20+(j-j)
frame/file=bnplot_2.gif
! additions for version 3.01 "/TITLE=" controls
cancel viewports
set view ul6
plot/title="My Custom Title"/i=1:100/nolabel sin(i/6)
plot/title="My Custom Key"/i=1:100/over/nolabel sin(i/5)
set view um6
plot/title="My Custom Title"/i=1:100/nolabel sin(i/6),sin(i/9)
plot/title="My Custom Key"/i=1:100/over/nolabel sin(i/7),sin(i/10)
set view ur6
plot/vs/line/title="My Custom Title"/i=1:100/nolabel sin(i/6),sin(i/9)
plot/vs/line/title="My Custom Key"/i=1:100/over/nolabel sin(i/7),sin(i/10)
set view ll6
plot/vs/line/title="My Custom Title"/i=1:100/nolabel sin(i/6),sin(i/9),sin(i/12)
plot/vs/line/title="My Custom Key"/i=1:100/over/nolabel sin(i/7),sin(i/10)
set view lm6
contour/i=1:20/j=1:20/title="My Contour Title"/nolabel sin(i/3)*cos(j/4)
contour/over/i=5:30/j=5:30/title="My Contour Overlay"/nolabel sin(i/2)*cos(j/3)
set view lr6
wire/view=0,0,2/i=1:20/j=1:20/title="My Egg Carton"/nolabel sin(i/3)*cos(j/4)
 
! addition for 3.20 showing changed default behavior of plot/vs
! return to window and redraw with symbols
set view ll6
plot/vs/title="My Custom Title"/i=1:100/nolabel sin(i/6),sin(i/9),sin(i/12)
plot/vs/title="My Custom Key"/i=1:100/over/nolabel sin(i/7),sin(i/10)
frame/file=bnplot_3.gif
 
! Prior to v5.8 could not get the window size in pixels when in gif mode
show symbol ppl$xpixel
PPL$XPIXEL = "1152"
show symbol ppl$ypixel
PPL$YPIXEL = "662"
 
! V6.13
! transparency with FRAME/TRANS
!!
! These gif images have the background color white or black
! replaced by transparent color. This can be tested by putting
! them into an HTML document with a colored background.
! e.g. a file called test_transparent.html containing only this line:
! <html> <body bgcolor="orange"> <img src="testfile.gif"/> </body> </html>
 
can view
use coads_climatology
shade/nokey/lev=50 sst[L=1]
frame/trans/file=testbackground.gif
 
! moved here from bn500_bug_fixes.jnl. The frame/  command it contains
! has trouble when running the benchmarks from remote desktop
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go err491_long_gif_name
! err491_long_gif_name.jnl
! *sh* 4/99 - test 175 character gif name
 
! name length extended with changes to save_frame.F and xeq_frame.F
 
set wind/siz=0.03
go ptest
! Description: create a simple test line plot
 
! spirograph picture ...
PLOT/VS/LINE/I=1:314 i*cos(i/20),i*sin(i/20)
 
 
sp rm -f abcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxy*
 
frame/file="abcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxy.gif"
 
spawn ls abcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxy*
abcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxy.gif
 
 
! The fix for bug 1396
set v ul; plot/dash x[gx=0:20:.5]
set v ur; plot/dash x[gx=0:20:.1]
set v ll; plot/dash x[gx=0:20:.05]
set v lr; plot/dash x[gx=0:20:.01]
frame/file=gif_dashbug.gif
 
! Restore size
set win/siz=1/asp=1
 
! New benchmark gif outputs in v6.97
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO bn_hovmuller_overlays_noremote
! bn_hovmuller_overlays_noremote.jnl
! run this in the gif benchmarks.
 
def view/xlim=0,.333/ylim=.5,1    ul6
def view/xlim=.333,.666/ylim=.5,1 um6
def view/xlim=.666,1/ylim=.5,1    ur6
def view/xlim=0,.333/ylim=0,.5    ll6
def view/xlim=.333,1/ylim=0,.5    lr6
 
! The example from the FAQ, "Overlaying a time series on a 2D plot"
set view ul6
 
! Define a 2D field in YT with a time axis in units of DAYS
DEFINE AXIS/T="1-JAN-1980":"1-JAN-1990":5/UNITS=DAYS tdays
DEFINE AXIS/Y=0:40N:2/UNITS=DEGREES yax
 
LET/TITLE=XY my_var = 10*cos(T[gt=tdays]/2000)*EXP((-1)*y[gy=yax]/20)
 
! make a Hovmoller plot
 
SHADE my_var
 
! This did not work previously.  Needed to re-define the axis in units of hours
PLOT/OVER my_var[Y=@loc:-4]
 
 
! XT variable
set view um6
 
DEFINE AXIS/X=0:40E:1/UNITS=DEGREES xax
LET/TITLE="XT" my_var = 10*cos(T[gt=tdays]/20)*EXP((-1)*x[gx=xax]/20)
SHADE/t=1-jan-1987:1-jan-1989 my_var
PLOT/OVER/TRANS/THICK my_var[x=@loc:-4]
 
 
! Irregular time axis
set view ur6
 
DEFINE AXIS/T0=1-jan-2001/UNITS=DAYS tdays = {1,2,4,5,6,8,9,10,12,30,35,41,42,44,45,46,48,49,50,58}
DEFINE AXIS/Y=0:40N:2/UNITS=DEGREES yax
LET my_var = 10*cos(T[gt=tdays])*EXP((-1)*y[gy=yax]/8)
 
FILL/title="irregular t" my_var
PLOT/OVER/thick/y=8 my_var+10
 
FRAME/FILE=bn_hovmuller_overlays.gif
 
can data/all
can region
 
 
Go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO bn_labels_on_taxis
! bn_labels_on_taxis.jnl
! tests of labels and overlays on time axes
 
 
set v ul
DEFINE AXIS/T=1-JAN-1980:31-JAN-1985:30/T0=1-jan-1980/UNIT=days tax
LET tt = t[gt=tax]
LET tvar = cos(tt/200)
plot tvar
 
LET xsqr = {-1,1,1,-1}                ! coordinates of a unit square
LET ysqr = {-1,-1,1,1}
LET xcircle = COS(6.3*i[i=1:42]/40)    ! coordinates of unit circle
LET ycircle = SIN(6.3*i[i=1:42]/40)
 
!   place an "X" at the value exactly at 7-aug-1982
!   "@ITP" causes interpolation to exact location
 
let t0   = tt[t="7-aug-1982"@itp]
let val0 = tvar[t="7-aug-1982"@itp]
plot/vs/over/nolab/sym=2/thick/color=red t0,val0
 
!   put a box around the "X"
polygon/over/thick/color=red/nolab t0+30*xsqr, 0.05*ysqr+val0
 
!   place an "X" on the data point nearest to 15-may-1984
!   Note that @ITP is absent, so behavior is set by MODE INTERPOLATE
let t1   = tt[t="15-may-1984"]
let val1 = tvar[t="15-may-1984"]
plot/vs/over/nolab/sym=2/color=blue/thick t1,val1
 
!     put a circle around the "X"
plot/vs/over/color=blue/thick/nolab t1+30*xcircle,0.05*ycircle+val1
 
set v ur
! Latitude/time plot
let ytvar = cos(tt/200) + sin(j/3)
shade/y=1:50/t=1-jan-1982:31-dec-1982 ytvar
 
let tlo = tt[t="1-jul-1982"@itp]
let thi = tt[t="1-aug-1982"@itp]
polygon/over/nolab/thick/pal=gray {`tlo`, `thi`,` thi`, `tlo`},  {20, 20, 25, 25}
 !-> polygon/over/nolab/thick/pal=gray {912, 943,943, 912},  {20, 20, 25, 25}
 
set v ll
! Plot the time series.
!----------------------------------
 
LET tvar = cos(tt/200)* tt/100
PLOT/vlim=-20:20 tvar
 
!----------------------------------
! Locate label position on time variable axis: the coordinate at the start of 1985.
LET datelabelpos=TT[T="01-JAN-1981"@ITP]
 
! Do nothing but set $PPL$XFIRST1 symbol at the time axis plot units
PLOT/LINE/VS/OVER/NOLAB datelabelpos,-9
 
! Make the label; left-justified
! LABEL xpos, ypos, justify, rotate, height "text"
LABEL ($PPL$XFIRST1),-8,-1,0,0.12,@AC Year 81 starts
 !-> PPL %LABEL 17905.00,-8,-1,0,0.12,@AC Year 81 starts
 
! Draw a vertical red line at the year boundary
PLOT/VS/NOLAB/LINE/COLOR=RED/OVER {`datelabelpos`,`datelabelpos`},{-20,20}
 !-> PLOT/VS/NOLAB/LINE/COLOR=RED/OVER {366,366},{-20,20}
 
! Do the same for the start of 1984
!----------------------------------
! Locate label position on time var axis
LET datelabelpos=TT[T="01-JAN-1984"@ITP]
 
! Do nothing but set $PPL$XFIRST1 symbol at the time axis plot units
plot/line/vs/over/nolab datelabelpos,-9
 
! LABEL xpos, ypos, justify, rotate, height "text"
LABEL ($PPL$XFIRST1),-8,-1,0,0.12,@AC Year 84 starts
 !-> PPL %LABEL 44185.00,-8,-1,0,0.12,@AC Year 84 starts
 
! Draw a vertical red line at the year boundary
PLOT/VS/NOLAB/LINE/COLOR=RED/OVER {`datelabelpos`,`datelabelpos`},{-20,20}
 !-> PLOT/VS/NOLAB/LINE/COLOR=RED/OVER {1461,1461},{-20,20}
 
!----------------------------------
! Now lets locate and label the maximum of the variable
LET vmax = `tvar[T=@MAX]`
 !-> DEFINE VARIABLE vmax = 12.72093076292341
LET t_at_max = tvar[T=01-JAN-1980:31-DEC-1985@LOC:`vmax`]
 !-> DEFINE VARIABLE t_at_max = tvar[T=01-JAN-1980:31-DEC-1985@LOC:12.72093076292341]
 
! This will define $PPL$XFIRST1 and also make a mark at the maximum location
PLOT/VS/OVER/NOLAB/SYM=17/COLOR=red t_at_max, vmax
 
! Use a centered label this time
! 1.02*vmax moves the label up a bit.
! LABEL xpos, ypos, justify, rotate, height "text"
LABEL ($PPL$XFIRST1),`1.02*vmax`,0,0,0.12,@AC MAX = `vmax,prec=3`
 !-> PPL %LABEL 40081.00,12.97534937818188,0,0,0.12,@AC MAX = 12.7
 
set v lr
 
! Define a dummy track line, position as a function of time.
DEFINE AXIS/T=1-JAN-1980:31-JAN-1985:30/UNIT=days tax
LET ypos = 40 *COS(L[GT=tax]/32)
LET xpos = 220 - 50 *SIN(L[GT=tax]/22)
! Make the basic track plot
use ocean_atlas_temp
shade/pal=blue_light/X=110E:40W/Y=20S:50N/L=1 temp
 
PLOT/VS/NOLAB/OVER XPOS,YPOS
! Label every 5th date. The labels could be positioned differently, using
! the 3rd argument of the LABEL command to control centering. Or, to put the
! labels a bit above the corresponding point location, add a small amount to
! the y positions, for instance `ypos + 0.04` in the second argument to LABEL.
LET tt = t[gt=tax]
! Loop over L; at each L we evaluate TAX_DATESTRING for the time step,
! and compute the location for the label
REPEAT/L=5:60:10 (DEFINE SYMBOL tlab = "`TAX_DATESTRING(tt,tt,"day")`"; \
 LABEL `xpos` `ypos` 1 0 0.09 ($tlab) )
 !-> REPEAT/L=5:60:10 (DEFINE SYMBOL tlab = "`TAX_DATESTRING(tt,tt,"day")`";  LABEL `xpos` `ypos` 1 0 0.09 ($tlab) )
!-> REPEAT: L=5
 !-> DEFINE SYMBOL tlab = "30-APR-1980"
 !-> PPL %LABEL 208.7339387413628 39.51271135265888 1 0 0.09 "30-APR-1980"
!-> REPEAT: L=15
 !-> DEFINE SYMBOL tlab = "24-FEB-1981"
 !-> PPL %LABEL 188.4897123753973 35.68534797467977 1 0 0.09 "24-FEB-1981"
!-> REPEAT: L=25
 !-> DEFINE SYMBOL tlab = "21-DEC-1981"
 !-> PPL %LABEL 174.6445516747008 28.40135534264319 1 0 0.09 "21-DEC-1981"
!-> REPEAT: L=35
 !-> DEFINE SYMBOL tlab = "17-OCT-1982"
 !-> PPL %LABEL 170.0101127410977 18.36629087569217 1 0 0.09 "17-OCT-1982"
!-> REPEAT: L=45
 !-> DEFINE SYMBOL tlab = "13-AUG-1983"
 !-> PPL %LABEL 175.527551028677 6.552192101033334 1 0 0.09 "13-AUG-1983"
!-> REPEAT: L=55
 !-> DEFINE SYMBOL tlab = "08-JUN-1984"
 !-> PPL %LABEL 190.0763927948022 -5.896578890096701 1 0 0.09 "08-JUN-1984"
 
FRAME/FILE=bn_labels_on_taxis.gif
 
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err696_contour_conset
! err696_contour_conset.jnl
! Ticket 2351. The PPL CONSET command had stopped working to set
! the # of digits in contour labels.  See the setting in PPL LIST LEVELS
 
contour/i=1:20/j=1:20/lev=(-10,10,2.125)/set/title="CONTOUR/SET with PPL CONSET,,4"  10*sin(i/3)*cos(j/4)
ppl conset,,4
ppl contour
 
! This should show NDIG=3
ppl list levels


         LEVEL       TYPE       NDIG       PEN
         -1.00E+01     DASH        3        0
         -7.88E+00     DASH        3        0
         -5.75E+00     DASH        3        0
         -3.62E+00     DASH        3        0
         -1.50E+00     DASH        3        0
          6.25E-01     LINE        3        0
          2.75E+00     LINE        3        0
          4.88E+00     LINE        3        0
          7.00E+00     LINE        3        0
          9.12E+00     LINE        3        0
          1.12E+01     LINE        3        0
 
! Now make the same setting with CONTOUR/SIGDIG=
contour/i=1:20/j=1:20/lev=(0)(-10,10,2.125)/sigdig=4/title="CONTOUR/SIGDIG=4"  10*sin(i/3)*cos(j/4)
 
! This should show NDIG=3
ppl list levels


         LEVEL       TYPE       NDIG       PEN
         -1.00E+01     DASH        3        0
         -7.88E+00     DASH        3        0
         -5.75E+00     DASH        3        0
         -3.62E+00     DASH        3        0
         -1.50E+00     DASH        3        0
          0.00E+00     DARK       -1        0
          6.25E-01     LINE        3        0
          2.75E+00     LINE        3        0
          4.88E+00     LINE        3        0
          7.00E+00     LINE        3        0
          9.12E+00     LINE        3        0
          1.12E+01     LINE        3        0
 
! test CONTOUR/SET; CONSET; PPL CONTOUR settings
contour/i=1:20/j=1:20/lev=(-10,10,2.125)/set/title="CONTOUR/SET with PPL CONSET,,4"  10*sin(i/3)*cos(j/4)
ppl conset,0.07,4,,,,,,1
ppl contour
 
! test CONTOUR qualifiers that make CONSET settings. Should exactly overlay the previous plot.
contour/over/color=red/i=1:20/j=1:20/lev=(-10,10,2.125)\
/sigdig=4/siz=0.07/spacing=1  10*sin(i/3)*cos(j/4)
 
frame/file=bn_contour_conset.gif
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err696_subspan_mod_strides
! err696_subspan_mod_strides
! See ticket 513. Axis is subspan modulo, and strides
! on a plot with a larger region than the axis span caused the
! shade plot to smear out beyond the edges.
 
define axis/x/units=degrees_e xax = {-82.96,-81.46,-79.96,-78.47,-76.97,-75.48,-73.98,-72.48,-70.99,-69.49}
let xx = x[gx=xax]
let yy = y[y=4:20:2]
let d10 = randu(xx) - randu(yy)
 
! previously smeared out to the plot edges.
set view upper
shade/hlim=-95:-60/vlim=0:25 d10[i=1:10:2,j=1:10]
 
! similar behavior with overlays
set view lower
use coads_climatology
shade/L=3/pal=white/nokey/x=-180:0/y=0:30/title="Overlay Test" sst
shade/over d10[i=1:10:2,j=1:10]
 
frame/file=bn_subspan_mod_strides.gif
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_plotvs_mode_label
! err71_plotvs_mode_label.jnl
!  *acm*3/17/17 Ticket 2517:
! MODE LONG_LABEL, MODE LATIT_LABEL need to apply
! to PLOT/VS plots.
 
can mode logo
 
set mode long_lab
set mode latit_lab
 
let/title="|Roll|"/units="degree" abscissa_roll = {0, 20}
let/title="Wind Speed"/units="kn" ordinate_spd  = {0, 0}
 
! labeled lon/lat axes. Units of "degrees" is taken to be degrees
! east or north depending on which plot axis it is drawn on.
 
set view ul
plot/vs/line/vlimits=-20:20 abscissa_roll, ordinate_spd
set view ur
plot/vs/line/hlimits=-20:20 ordinate_spd, abscissa_roll
 
! These modes turn off lon/lat axis labeling
 
cancel mode long_lab
cancel mode latit_lab
 
set view ll
plot/vs/line/vlimits=-20:20 abscissa_roll, ordinate_spd
set view lr
plot/vs/line/hlimits=-20:20 ordinate_spd, abscissa_roll
 
! Explicit units units of degrees_east and degrees_north:
! degrees_east draws longitude labeling on whichever plot axis
! the associated variable is drawn, and likewise for degrees_north.
! Setting or cancelling the label modes applies to the variable
! units not the plot-axis direction.
 
cancel view
set mode long_lab
set mode latit_lab
 
let/title="East"/units="degrees_east" lon = {10,20,30}
let/title="North"/units="degrees_north" lat = {-10,0,10}
 
! longitude axis on the horizontal, latitude axis on the vertical
 
set view ul; plot/vs/line/sym/hlim=0:40/vlim=-20:20 lon, lat
annotate/norm/x=0.1/y=0.9/siz=0.1 "long TRUE  latit TRUE"
 
! latitude axis on the horizontal, longitude axis on the vertical
 
set view ur; plot/vs/line/sym/vlim=0:40/hlim=-20:20 lat,lon
annotate/norm/x=0.1/y=0.9/siz=0.1 "long vertical  latit horizontal"
 
! longitude axis on the horizontal, latitude axis on the vertical
! but with latitude labeling turned off
 
set mode long_lab
cancel mode latit_lab
set view ll; plot/vs/line/sym/hlim=0:40/vlim=-20:20 lon, lat
annotate/norm/x=0.1/y=0.9/siz=0.1 "long TRUE  latit FALSE"
 
! latitude axis on the horizontal, longitude axis on the vertical
! but with longitude labeling turned off
 
cancel mode long_lab
set mode latit_lab
set view lr; plot/vs/line/sym/vlim=0:40/hlim=-20:20 lat,lon
annotate/norm/x=0.1/y=0.9/siz=0.1 "long FALSE  latit TRUE"
 
frame/file=lon_lat_label_controls.gif
 
 
! Restore default settings
set mode long_lab
set mode latit_lab
 
set mode/last logo
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err700_vs_plot_axes
! err700_vs_plot_axes.jnl
! See ticket 2477, in some cases the plot axes are not fully drawn
! 11/2016 ACM
 
 
USE err700_vs_data.nc
 
! only with PLOT/VS plots, only with SYMBOLS not PLOT/VS/LINE
PLOT/VS/THICK/COLOR=red/SIZ=0.2 lon,lat
FRAME/FILE=bn_axis_vs.gif
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_vs_constant
! err71_vs_constant.jnl
! See ticket 2318, defining plot axes when data is constant
! 4/2017 acm
 
! The axis ranges had been set as val-1, val+1 which
! worked poorly for large or small data values
 
 
 
 
def view/xlim=   0,.333/ylim=0,.5 ll6   ! ok
def view/xlim=   0,.333/ylim=.5,1 ul6   ! long tic labels
def view/xlim=.333,.666/ylim=0,.5 lm6   ! long tic labels, logo corrupted
def view/xlim=.333,.666/ylim=.5,1 um6   ! plot positioning and labels are corrupted
def view/xlim=.666,   1/ylim=0,.5 lr6   ! no plot at all
def view/xlim=.666,   1/ylim=.5,1 ur6   ! no vertical tic labels
 
 
set view ul6; plot/vs/color/thick/line/sym/siz=0.2 {1,2},  1e4*{1,1}
set view um6; plot/vs/color/thick/line/sym/siz=0.2 {1,2},  1e5*{1,1}
set view ur6; plot/vs/color/thick/line/sym/siz=0.2 {1,2},  1e6*{1,1}
set view ll6; plot/vs/color/thick/line/sym/siz=0.2 {1,2},  1e7*{1,1}
set view lm6; plot/vs/color/thick/line/sym/siz=0.2 {1,2},  1e8*{1,1}
set view lr6; plot/vs/color/thick/line/sym/siz=0.2 {1,2}, 1e-2*{1,1}
 
frame/file=bn_vs_const_value.gif
 
! With constant data value as the first argument
 
can view
set view ul6; plot/vs/color/thick/line/sym/siz=0.2  1e4*{1,1}, {1,2}
set view um6; plot/vs/color/thick/line/sym/siz=0.2  1e5*{1,1}, {1,2}
set view ur6; plot/vs/color/thick/line/sym/siz=0.2  1e6*{1,1}, {1,2}
set view ll6; plot/vs/color/thick/line/sym/siz=0.2  1e7*{1,1}, {1,2}
set view lm6; plot/vs/color/thick/line/sym/siz=0.2  1e8*{1,1}, {1,2}
set view lr6; plot/vs/color/thick/line/sym/siz=0.2 1e-2*{1,1}, {1,2}
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO err71_vs_lon_over
! err71_vs_lon_over.jnl
! PLOT/VS/OVER does longitude moduloing if the xpts
!  variable has units of degrees east.
 
use coads_climatology
shade/l=1/x=0:360/nolab/nokey if sst then 1
let/units=degrees_east xpts = {-170,-150,-100, 100, 150, 170}
let/units=degrees_north ypts = {-30, -20, -10,   0,  10,  20}
 
plot/vs/over/thick/siz=0.2/sym=19 xpts,ypts
frame/file=vs_lon_over.gif
 
exit/command
*** Running ferret script: bn_ps.jnl
! bn450_ps.JNL - copied from bn450_plot.jnl
! this journal file only tests the writing of ps files in batch mode using
! "-batch bnplot.ps" command line option...will create on final ps file
! *kob*
 
! define a 6 viewport window (modified definitions 11/92)
def view/text=.4/xlim=0,.333/ylim=0,.5    ll6
def view/text=.2/xlim=0,.333/ylim=.5,1    ul6
def view/text=.1/xlim=.333,.666/ylim=0,.5 lm6
def view/text=.6/xlim=.333,.666/ylim=.5,1 um6
def view/text=1.5/xlim=.666,1/ylim=0,.5   lr6
def view/xlim=.666,1/ylim=.5,1            ur6     ! auto /TEXT
show view
 
 name             text    xlimits     ylimits    mode
 
 UPPER            1.00   0.00,1.00   0.50,1.00   edges
 LOWER            1.00   0.00,1.00   0.00,0.50   edges
 RIGHT            1.00   0.50,1.00   0.00,1.00   edges
 LEFT             1.00   0.00,0.50   0.00,1.00   edges
 LL               0.50   0.00,0.50   0.00,0.50   edges
 LR               0.50   0.50,1.00   0.00,0.50   edges
 UL               0.50   0.00,0.50   0.50,1.00   edges
 UR               0.50   0.50,1.00   0.50,1.00   edges
 FULL             1.00   0.00,1.00   0.00,1.00   edges
 LL6              0.40   0.00,0.33   0.00,0.50   edges
 UL6              0.20   0.00,0.33   0.50,1.00   edges
 LM6              0.10   0.33,0.67   0.00,0.50   edges
 UM6              0.60   0.33,0.67   0.50,1.00   edges
 LR6              1.50   0.67,1.00   0.00,0.50   edges
 UR6              0.41   0.67,1.00   0.50,1.00   edges
   current viewport is NONE
 
! some variables for plotting
let a = 0.8*sin(l/10)
let b = 0.6*cos(l/10)
let c = sin(100/(l+k))
let d = l/50
let e = k-(l/25)
let f = -.5+(l/125)
let g = (l-25)/(k*35)
let h = 0.1
let m = 0.2
 
! illegal plot commands
set mode ignore
plot/i=1:10/j=1:20/nolabel i+j			! not a line
plot/i=1:10/j=1:20/nolabel i,i+j		! not a line
plot/i=1:10/j=1:20/nolabel i+j,i		! not a line
plot/i=1:10/j=1:20/nolabel j,i			! differing axes
plot/i=1:10/j=1:20/vs/line/nolabel j,i		! unequal lengths
contour/i=1:10/j=1:20/nolabel i			! only 1 D
contour/i=1:10/j=1:20/nolabel i/j,j/i		! multiple fields
vector/i=1:10/j=1:20/nolabel i/j		! only 1 field
vector/i=1:10/j=1:20/nolabel i/j,j/i,i+j	! 3 fields
set mode/last ignore
 
! notice the default window size is 10.2,width x 8.8,height
ppl list plot
         WIDTH=   10.20  HEIGHT=    8.80  TKTYPE=    0  BAUD=  110
         WINDOW= ON   BOX= OFF  CROSS= 0  PLTYPE=  3
         PLOT MODE=   A
         PLOT FILE= .gif                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 
! enlarge it to accomodate an additional 50% width
ppl size 15.3,8.8
 
! turn on metafile (enabled 10/29/91)
! commented out 9/97 - instead set in bn450_all.jnl
! set mode metafile
 
! draw a plot into a viewport - to be deleted (check hard copy)
set view ll6
contour/i=1:50/j=1:50/nolabel i/(j+20)
 
! 4 frames testing PLOT output
set view ul6
plot/l=1:50/k=1/trans/nolabel a,b,c
plot/l=1:50/k=1/trans/over/line=6/nolabel d
plot/l=1:50/k=1/trans/over/symbol=88/nolabel e
plot/l=1:50/k=1/trans/over/symbol=47/line/nolabel f
def view/text=.1/xlim=.333,1/ylim=0,.5 lm6   ! redefine longer in x (11/92)
set view lm6
!ppl axlen 16
set region/k=1
plot/l=1:50/nolabel a,b,c,d,e,f,g[k=1],g[k=2],a+h,b+h,c+h,d+h,e+h,f+h,g[k=1]+h,g[k=2]+h,a+m,b+m,c+m
def view/text=.6/xlim=.333,1/ylim=.5,1 um6    ! redefine it longer in x (11/92)
set view um6
!ppl axlen 17,5
plot/l=1:50/nolabel sin(100/(l+5))
plot/l=1:50/over/nolabel a,b,c,d,e,f,g[k=1],g[k=2],a+h,b+h,c+h,d+h,e+h,f+h,g[k=1]+h,g[k=2]+h,a+m,b+m,c+m
set view ll6
!ppl axlen 8,6
plot/l=1:99000/nolabel sin(200000/(l+10000))
 
! reset to normal axis lengths and prepare for a new piccie
!ppl axlen 8
 
set mode ignore
frame/file=bnplot.ps    ! DELIBERATE ERROR MESSAGE
can mode ignore
exit/command
*** Running ferret script: bn_all_ef.jnl
SET MODE VERIFY
! bn_all_ef.jnl
! - run all the benchmark tests for externally-linked external functions.
! 12/16 vis5D functions have long been defunct. Remove that test
 
GO bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
GO bn_ef_external_functions.jnl
! Tests of external functions that are distributed as shared object files.
 
! Jon's benchmarks
go bench_examples
set mode ignore_error
show func/ext add_9
ADD_9(A,B,C,D,E,F,G,H,I)
    (demonstration function) adds 9 arguments
show func/ext ave*
AVE_SCAT2GRID_T(TPTS,VPTS,TAXIS)
    Compute average of a variable in each cell of output time axis
    TPTS: T coordinates of scattered input time coordinates
    VPTS: Variable at times in TPTS
    TAXIS: Output time axis
AVET(A)
    (demonstration function) returns the time average
    A: data to be averaged over the time axis
show func dates
DATES(Timesteps,Precision)
    Demo function: Returns a string array of dates corresponding to timesteps
    Timesteps: Variable on a time axis, containing offsets from the coordinates of the axis, in the units of the axis
    Precision: Output precision: full, sec, min, hour, day, month, year (STRING)
show func pass_thru
PASS_THRU(A)
    (demonstration function) sets result equal to input
    A: this arg is passed through
show func sto*
STORAGE(A)
    sets result equal to input/10
    A: input
 
go bench_add_9
! Bench_add_9.jnl
!  ACM  8/99
!  benchmark script for testing external function add_9.
! Note: bench_add_9_visual contains plots of similar computations
 
set mode ignore_errors
 
 
can region
use coads_climatology
set region/x=151E:179E/y=0
 
let a1 = sst[d=1,l=1]
let a2 = sst[d=1,l=2]
let a3 = sst[d=1,l=3]
 
let a = add_9(a1,a2,a3,a1,a2,a3,a1,a2,a3)
 
list a
             VARIABLE : ADD_9(A1,A2,A3,A1,A2,A3,A1,A2,A3)
             SUBSET   : 15 points (LONGITUDE)
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
                1S    
                45
 151E   / 66:  263.6
 153E   / 67:  264.5
 155E   / 68:  264.2
 157E   / 69:  261.3
 159E   / 70:  260.9
 161E   / 71:  262.4
 163E   / 72:  264.0
 165E   / 73:  261.1
 167E   / 74:  260.9
 169E   / 75:  261.0
 171E   / 76:  259.3
 173E   / 77:  257.9
 175E   / 78:  257.0
 177E   / 79:  259.1
 179E   / 80:  254.8
list  a - 3 * sst[d=1,l=1:3@sum]
             VARIABLE : A - 3 * SST[D=coads_climatology,L=1:3@SUM]
             SUBSET   : 15 points (LONGITUDE)
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
                 1S    
                 45
 151E   / 66:  0.0000
 153E   / 67:  0.0000
 155E   / 68:  0.0000
 157E   / 69:  0.0000
 159E   / 70:  0.0000
 161E   / 71:  0.0000
 163E   / 72:  0.0000
 165E   / 73:  0.0000
 167E   / 74:  0.0000
 169E   / 75:  0.0000
 171E   / 76:  0.0000
 173E   / 77:  0.0000
 175E   / 78:  0.0000
 177E   / 79:  0.0000
 179E   / 80:  0.0000
set mode/last ignore_errors
go bench_avet
! Bench_avet.jnl
!  ACM  8/99
!  benchmark script for testing external function avet.
! Note: bench_avet_visual.jnl contains plots of similar computations
 
set mode ignore_errors
 
can region
use coads_climatology
set region/x=151E:179E/y=0
 
let a = avet(sst)
list a
             VARIABLE : AVET(SST)
             FILENAME : coads_climatology.cdf
             SUBSET   : 15 points (LONGITUDE)
             LATITUDE : 1S
                1S    
                45
 151E   / 66:  29.28
 153E   / 67:  29.39
 155E   / 68:  29.35
 157E   / 69:  29.03
 159E   / 70:  28.99
 161E   / 71:  29.15
 163E   / 72:  29.33
 165E   / 73:  29.01
 167E   / 74:  28.99
 169E   / 75:  29.00
 171E   / 76:  28.81
 173E   / 77:  28.66
 175E   / 78:  28.56
 177E   / 79:  28.79
 179E   / 80:  28.31
list a - sst[l=@ave]
             VARIABLE : A - SST[L=@AVE]
             FILENAME : coads_climatology.cdf
             SUBSET   : 15 points (LONGITUDE)
             LATITUDE : 1S
             TIME     : 01-JAN 00:45 to 01-APR 08:12
                  1S      
                  45
 151E   / 66: -3.553E-15
 153E   / 67:  0.000E+00
 155E   / 68: -3.553E-15
 157E   / 69:  0.000E+00
 159E   / 70: -3.553E-15
 161E   / 71:  0.000E+00
 163E   / 72: -3.553E-15
 165E   / 73: -3.553E-15
 167E   / 74: -3.553E-15
 169E   / 75: -3.553E-15
 171E   / 76:  0.000E+00
 173E   / 77: -3.553E-15
 175E   / 78:  3.553E-15
 177E   / 79:  0.000E+00
 179E   / 80:  0.000E+00
 
can region
let a = x[i=1:9,k=1:5] + t[l=1:5]
let b = x[i=1:9,k=1:5]
let c = avet(a)
list b, c
             X: 0.5 to 9.5
 Column  1: B is X[I=1:9,K=1:5]
 Column  2: C is AVET(A)
             B     C
1   / 1:  1.000   4.00
2   / 2:  2.000   5.00
3   / 3:  3.000   6.00
4   / 4:  4.000   7.00
5   / 5:  5.000   8.00
6   / 6:  6.000   9.00
7   / 7:  7.000  10.00
8   / 8:  8.000  11.00
9   / 9:  9.000  12.00
 
set mode/last ignore_errors
go bench_dates
! bench_dates.jnl
!
! time axis units of seconds allows fractional seconds
!
def axis /t="1-JAN-2020":"1-JAN-2021":`86400.0 * 366.0 / 12.0` /t0="1-JAN-2020" /edges /unit=seconds dates_taxis
 !-> def axis /t="1-JAN-2020":"1-JAN-2021":2635200 /t0="1-JAN-2020" /edges /unit=seconds dates_taxis
let offset = _T[gt=dates_taxis] / 12345.0
list /prec=12 _T[gt=dates_taxis] + offset, dates(offset, "full")
             TIME: 01-JAN-2020 00:00 to 01-JAN-2021 00:00
 Column  1: EX#1 is _T[GT=DATES_TAXIS] + OFFSET
 Column  2: EX#2 is DATES(OFFSET, "full")
                           EX#1              EX#2
16-JAN-2020 /  1:   1317706.7315 "16-JAN-2020 06:01:46.7315" 
15-FEB-2020 /  2:   3953120.1944 "15-FEB-2020 18:05:20.1944" 
17-MAR-2020 /  3:   6588533.6574 "17-MAR-2020 06:08:53.6574" 
16-APR-2020 /  4:   9223947.1203 "16-APR-2020 18:12:27.1203" 
17-MAY-2020 /  5:  11859360.5832 "17-MAY-2020 06:16:00.5832" 
16-JUN-2020 /  6:  14494774.0462 "16-JUN-2020 18:19:34.04617"
17-JUL-2020 /  7:  17130187.5091 "17-JUL-2020 06:23:07.5091" 
16-AUG-2020 /  8:  19765600.9721 "16-AUG-2020 18:26:40.9721" 
16-SEP-2020 /  9:  22401014.4350 "16-SEP-2020 06:30:14.435"  
16-OCT-2020 / 10:  25036427.8979 "16-OCT-2020 18:33:47.8979" 
16-NOV-2020 / 11:  27671841.3609 "16-NOV-2020 06:37:21.3609" 
16-DEC-2020 / 12:  30307254.8238 "16-DEC-2020 18:40:54.8238" 
list /prec=12 _T[gt=dates_taxis] + offset, dates(offset, "second")
             TIME: 01-JAN-2020 00:00 to 01-JAN-2021 00:00
 Column  1: EX#1 is _T[GT=DATES_TAXIS] + OFFSET
 Column  2: EX#2 is DATES(OFFSET, "second")
                           EX#1           EX#2
16-JAN-2020 /  1:   1317706.7315 "16-JAN-2020 06:01:46"
15-FEB-2020 /  2:   3953120.1944 "15-FEB-2020 18:05:20"
17-MAR-2020 /  3:   6588533.6574 "17-MAR-2020 06:08:53"
16-APR-2020 /  4:   9223947.1203 "16-APR-2020 18:12:27"
17-MAY-2020 /  5:  11859360.5832 "17-MAY-2020 06:16:00"
16-JUN-2020 /  6:  14494774.0462 "16-JUN-2020 18:19:34"
17-JUL-2020 /  7:  17130187.5091 "17-JUL-2020 06:23:07"
16-AUG-2020 /  8:  19765600.9721 "16-AUG-2020 18:26:40"
16-SEP-2020 /  9:  22401014.4350 "16-SEP-2020 06:30:14"
16-OCT-2020 / 10:  25036427.8979 "16-OCT-2020 18:33:47"
16-NOV-2020 / 11:  27671841.3609 "16-NOV-2020 06:37:21"
16-DEC-2020 / 12:  30307254.8238 "16-DEC-2020 18:40:54"
list /prec=12 _T[gt=dates_taxis] + offset, dates(offset, "minute")
             TIME: 01-JAN-2020 00:00 to 01-JAN-2021 00:00
 Column  1: EX#1 is _T[GT=DATES_TAXIS] + OFFSET
 Column  2: EX#2 is DATES(OFFSET, "minute")
                           EX#1          EX#2
16-JAN-2020 /  1:   1317706.7315 "16-JAN-2020 06:01"
15-FEB-2020 /  2:   3953120.1944 "15-FEB-2020 18:05"
17-MAR-2020 /  3:   6588533.6574 "17-MAR-2020 06:08"
16-APR-2020 /  4:   9223947.1203 "16-APR-2020 18:12"
17-MAY-2020 /  5:  11859360.5832 "17-MAY-2020 06:16"
16-JUN-2020 /  6:  14494774.0462 "16-JUN-2020 18:19"
17-JUL-2020 /  7:  17130187.5091 "17-JUL-2020 06:23"
16-AUG-2020 /  8:  19765600.9721 "16-AUG-2020 18:26"
16-SEP-2020 /  9:  22401014.4350 "16-SEP-2020 06:30"
16-OCT-2020 / 10:  25036427.8979 "16-OCT-2020 18:33"
16-NOV-2020 / 11:  27671841.3609 "16-NOV-2020 06:37"
16-DEC-2020 / 12:  30307254.8238 "16-DEC-2020 18:40"
list /prec=12 _T[gt=dates_taxis] + offset, dates(offset, "hour")
             TIME: 01-JAN-2020 00:00 to 01-JAN-2021 00:00
 Column  1: EX#1 is _T[GT=DATES_TAXIS] + OFFSET
 Column  2: EX#2 is DATES(OFFSET, "hour")
                           EX#1        EX#2
16-JAN-2020 /  1:   1317706.7315 "16-JAN-2020 06"
15-FEB-2020 /  2:   3953120.1944 "15-FEB-2020 18"
17-MAR-2020 /  3:   6588533.6574 "17-MAR-2020 06"
16-APR-2020 /  4:   9223947.1203 "16-APR-2020 18"
17-MAY-2020 /  5:  11859360.5832 "17-MAY-2020 06"
16-JUN-2020 /  6:  14494774.0462 "16-JUN-2020 18"
17-JUL-2020 /  7:  17130187.5091 "17-JUL-2020 06"
16-AUG-2020 /  8:  19765600.9721 "16-AUG-2020 18"
16-SEP-2020 /  9:  22401014.4350 "16-SEP-2020 06"
16-OCT-2020 / 10:  25036427.8979 "16-OCT-2020 18"
16-NOV-2020 / 11:  27671841.3609 "16-NOV-2020 06"
16-DEC-2020 / 12:  30307254.8238 "16-DEC-2020 18"
list /prec=12 _T[gt=dates_taxis] + offset, dates(offset, "day")
             TIME: 01-JAN-2020 00:00 to 01-JAN-2021 00:00
 Column  1: EX#1 is _T[GT=DATES_TAXIS] + OFFSET
 Column  2: EX#2 is DATES(OFFSET, "day")
                           EX#1       EX#2
16-JAN-2020 /  1:   1317706.7315 "16-JAN-2020"
15-FEB-2020 /  2:   3953120.1944 "15-FEB-2020"
17-MAR-2020 /  3:   6588533.6574 "17-MAR-2020"
16-APR-2020 /  4:   9223947.1203 "16-APR-2020"
17-MAY-2020 /  5:  11859360.5832 "17-MAY-2020"
16-JUN-2020 /  6:  14494774.0462 "16-JUN-2020"
17-JUL-2020 /  7:  17130187.5091 "17-JUL-2020"
16-AUG-2020 /  8:  19765600.9721 "16-AUG-2020"
16-SEP-2020 /  9:  22401014.4350 "16-SEP-2020"
16-OCT-2020 / 10:  25036427.8979 "16-OCT-2020"
16-NOV-2020 / 11:  27671841.3609 "16-NOV-2020"
16-DEC-2020 / 12:  30307254.8238 "16-DEC-2020"
list /prec=12 _T[gt=dates_taxis] + offset, dates(offset, "month")
             TIME: 01-JAN-2020 00:00 to 01-JAN-2021 00:00
 Column  1: EX#1 is _T[GT=DATES_TAXIS] + OFFSET
 Column  2: EX#2 is DATES(OFFSET, "month")
                           EX#1     EX#2
16-JAN-2020 /  1:   1317706.7315 "JAN-2020"
15-FEB-2020 /  2:   3953120.1944 "FEB-2020"
17-MAR-2020 /  3:   6588533.6574 "MAR-2020"
16-APR-2020 /  4:   9223947.1203 "APR-2020"
17-MAY-2020 /  5:  11859360.5832 "MAY-2020"
16-JUN-2020 /  6:  14494774.0462 "JUN-2020"
17-JUL-2020 /  7:  17130187.5091 "JUL-2020"
16-AUG-2020 /  8:  19765600.9721 "AUG-2020"
16-SEP-2020 /  9:  22401014.4350 "SEP-2020"
16-OCT-2020 / 10:  25036427.8979 "OCT-2020"
16-NOV-2020 / 11:  27671841.3609 "NOV-2020"
16-DEC-2020 / 12:  30307254.8238 "DEC-2020"
list /prec=12 _T[gt=dates_taxis] + offset, dates(offset, "year")
             TIME: 01-JAN-2020 00:00 to 01-JAN-2021 00:00
 Column  1: EX#1 is _T[GT=DATES_TAXIS] + OFFSET
 Column  2: EX#2 is DATES(OFFSET, "year")
                           EX#1   EX#2
16-JAN-2020 /  1:   1317706.7315 "2020"
15-FEB-2020 /  2:   3953120.1944 "2020"
17-MAR-2020 /  3:   6588533.6574 "2020"
16-APR-2020 /  4:   9223947.1203 "2020"
17-MAY-2020 /  5:  11859360.5832 "2020"
16-JUN-2020 /  6:  14494774.0462 "2020"
17-JUL-2020 /  7:  17130187.5091 "2020"
16-AUG-2020 /  8:  19765600.9721 "2020"
16-SEP-2020 /  9:  22401014.4350 "2020"
16-OCT-2020 / 10:  25036427.8979 "2020"
16-NOV-2020 / 11:  27671841.3609 "2020"
16-DEC-2020 / 12:  30307254.8238 "2020"
list /prec=12 _T[gt=dates_taxis] + offset, dates(offset, "")
             TIME: 01-JAN-2020 00:00 to 01-JAN-2021 00:00
 Column  1: EX#1 is _T[GT=DATES_TAXIS] + OFFSET
 Column  2: EX#2 is DATES(OFFSET, "")
                           EX#1              EX#2
16-JAN-2020 /  1:   1317706.7315 "16-JAN-2020 06:01:46.7315" 
15-FEB-2020 /  2:   3953120.1944 "15-FEB-2020 18:05:20.1944" 
17-MAR-2020 /  3:   6588533.6574 "17-MAR-2020 06:08:53.6574" 
16-APR-2020 /  4:   9223947.1203 "16-APR-2020 18:12:27.1203" 
17-MAY-2020 /  5:  11859360.5832 "17-MAY-2020 06:16:00.5832" 
16-JUN-2020 /  6:  14494774.0462 "16-JUN-2020 18:19:34.04617"
17-JUL-2020 /  7:  17130187.5091 "17-JUL-2020 06:23:07.5091" 
16-AUG-2020 /  8:  19765600.9721 "16-AUG-2020 18:26:40.9721" 
16-SEP-2020 /  9:  22401014.4350 "16-SEP-2020 06:30:14.435"  
16-OCT-2020 / 10:  25036427.8979 "16-OCT-2020 18:33:47.8979" 
16-NOV-2020 / 11:  27671841.3609 "16-NOV-2020 06:37:21.3609" 
16-DEC-2020 / 12:  30307254.8238 "16-DEC-2020 18:40:54.8238" 
!
! no fractional seconds if time axis units are not seconds
!
def axis /t="1-JAN-2020":"1-JAN-2021":`1440.0 * 366.0 / 12.0` /t0="1-JAN-2020" /edges /unit=minutes dates_taxis
 !-> def axis /t="1-JAN-2020":"1-JAN-2021":43920 /t0="1-JAN-2020" /edges /unit=minutes dates_taxis
let offset = _T[gt=dates_taxis] / 12345.0
list /prec=12 _T[gt=dates_taxis] + offset, dates(offset, "full")
             TIME: 01-JAN-2020 00:00 to 01-JAN-2021 00:00
 Column  1: EX#1 is _T[GT=DATES_TAXIS] + OFFSET
 Column  2: EX#2 is DATES(OFFSET, "full")
                           EX#1           EX#2
16-JAN-2020 /  1:   21961.778858 "16-JAN-2020 06:01:46"
15-FEB-2020 /  2:   65885.336574 "15-FEB-2020 18:05:20"
17-MAR-2020 /  3:  109808.894289 "17-MAR-2020 06:08:53"
16-APR-2020 /  4:  153732.452005 "16-APR-2020 18:12:27"
17-MAY-2020 /  5:  197656.009721 "17-MAY-2020 06:16:00"
16-JUN-2020 /  6:  241579.567436 "16-JUN-2020 18:19:34"
17-JUL-2020 /  7:  285503.125152 "17-JUL-2020 06:23:07"
16-AUG-2020 /  8:  329426.682868 "16-AUG-2020 18:26:40"
16-SEP-2020 /  9:  373350.240583 "16-SEP-2020 06:30:14"
16-OCT-2020 / 10:  417273.798299 "16-OCT-2020 18:33:47"
16-NOV-2020 / 11:  461197.356015 "16-NOV-2020 06:37:21"
16-DEC-2020 / 12:  505120.913730 "16-DEC-2020 18:40:54"
list /prec=12 _T[gt=dates_taxis] + offset, dates(offset, "second")
             TIME: 01-JAN-2020 00:00 to 01-JAN-2021 00:00
 Column  1: EX#1 is _T[GT=DATES_TAXIS] + OFFSET
 Column  2: EX#2 is DATES(OFFSET, "second")
                           EX#1           EX#2
16-JAN-2020 /  1:   21961.778858 "16-JAN-2020 06:01:46"
15-FEB-2020 /  2:   65885.336574 "15-FEB-2020 18:05:20"
17-MAR-2020 /  3:  109808.894289 "17-MAR-2020 06:08:53"
16-APR-2020 /  4:  153732.452005 "16-APR-2020 18:12:27"
17-MAY-2020 /  5:  197656.009721 "17-MAY-2020 06:16:00"
16-JUN-2020 /  6:  241579.567436 "16-JUN-2020 18:19:34"
17-JUL-2020 /  7:  285503.125152 "17-JUL-2020 06:23:07"
16-AUG-2020 /  8:  329426.682868 "16-AUG-2020 18:26:40"
16-SEP-2020 /  9:  373350.240583 "16-SEP-2020 06:30:14"
16-OCT-2020 / 10:  417273.798299 "16-OCT-2020 18:33:47"
16-NOV-2020 / 11:  461197.356015 "16-NOV-2020 06:37:21"
16-DEC-2020 / 12:  505120.913730 "16-DEC-2020 18:40:54"
list /prec=12 _T[gt=dates_taxis] + offset, dates(offset, "minute")
             TIME: 01-JAN-2020 00:00 to 01-JAN-2021 00:00
 Column  1: EX#1 is _T[GT=DATES_TAXIS] + OFFSET
 Column  2: EX#2 is DATES(OFFSET, "minute")
                           EX#1          EX#2
16-JAN-2020 /  1:   21961.778858 "16-JAN-2020 06:01"
15-FEB-2020 /  2:   65885.336574 "15-FEB-2020 18:05"
17-MAR-2020 /  3:  109808.894289 "17-MAR-2020 06:08"
16-APR-2020 /  4:  153732.452005 "16-APR-2020 18:12"
17-MAY-2020 /  5:  197656.009721 "17-MAY-2020 06:16"
16-JUN-2020 /  6:  241579.567436 "16-JUN-2020 18:19"
17-JUL-2020 /  7:  285503.125152 "17-JUL-2020 06:23"
16-AUG-2020 /  8:  329426.682868 "16-AUG-2020 18:26"
16-SEP-2020 /  9:  373350.240583 "16-SEP-2020 06:30"
16-OCT-2020 / 10:  417273.798299 "16-OCT-2020 18:33"
16-NOV-2020 / 11:  461197.356015 "16-NOV-2020 06:37"
16-DEC-2020 / 12:  505120.913730 "16-DEC-2020 18:40"
list /prec=12 _T[gt=dates_taxis] + offset, dates(offset, "hour")
             TIME: 01-JAN-2020 00:00 to 01-JAN-2021 00:00
 Column  1: EX#1 is _T[GT=DATES_TAXIS] + OFFSET
 Column  2: EX#2 is DATES(OFFSET, "hour")
                           EX#1        EX#2
16-JAN-2020 /  1:   21961.778858 "16-JAN-2020 06"
15-FEB-2020 /  2:   65885.336574 "15-FEB-2020 18"
17-MAR-2020 /  3:  109808.894289 "17-MAR-2020 06"
16-APR-2020 /  4:  153732.452005 "16-APR-2020 18"
17-MAY-2020 /  5:  197656.009721 "17-MAY-2020 06"
16-JUN-2020 /  6:  241579.567436 "16-JUN-2020 18"
17-JUL-2020 /  7:  285503.125152 "17-JUL-2020 06"
16-AUG-2020 /  8:  329426.682868 "16-AUG-2020 18"
16-SEP-2020 /  9:  373350.240583 "16-SEP-2020 06"
16-OCT-2020 / 10:  417273.798299 "16-OCT-2020 18"
16-NOV-2020 / 11:  461197.356015 "16-NOV-2020 06"
16-DEC-2020 / 12:  505120.913730 "16-DEC-2020 18"
list /prec=12 _T[gt=dates_taxis] + offset, dates(offset, "day")
             TIME: 01-JAN-2020 00:00 to 01-JAN-2021 00:00
 Column  1: EX#1 is _T[GT=DATES_TAXIS] + OFFSET
 Column  2: EX#2 is DATES(OFFSET, "day")
                           EX#1       EX#2
16-JAN-2020 /  1:   21961.778858 "16-JAN-2020"
15-FEB-2020 /  2:   65885.336574 "15-FEB-2020"
17-MAR-2020 /  3:  109808.894289 "17-MAR-2020"
16-APR-2020 /  4:  153732.452005 "16-APR-2020"
17-MAY-2020 /  5:  197656.009721 "17-MAY-2020"
16-JUN-2020 /  6:  241579.567436 "16-JUN-2020"
17-JUL-2020 /  7:  285503.125152 "17-JUL-2020"
16-AUG-2020 /  8:  329426.682868 "16-AUG-2020"
16-SEP-2020 /  9:  373350.240583 "16-SEP-2020"
16-OCT-2020 / 10:  417273.798299 "16-OCT-2020"
16-NOV-2020 / 11:  461197.356015 "16-NOV-2020"
16-DEC-2020 / 12:  505120.913730 "16-DEC-2020"
list /prec=12 _T[gt=dates_taxis] + offset, dates(offset, "month")
             TIME: 01-JAN-2020 00:00 to 01-JAN-2021 00:00
 Column  1: EX#1 is _T[GT=DATES_TAXIS] + OFFSET
 Column  2: EX#2 is DATES(OFFSET, "month")
                           EX#1     EX#2
16-JAN-2020 /  1:   21961.778858 "JAN-2020"
15-FEB-2020 /  2:   65885.336574 "FEB-2020"
17-MAR-2020 /  3:  109808.894289 "MAR-2020"
16-APR-2020 /  4:  153732.452005 "APR-2020"
17-MAY-2020 /  5:  197656.009721 "MAY-2020"
16-JUN-2020 /  6:  241579.567436 "JUN-2020"
17-JUL-2020 /  7:  285503.125152 "JUL-2020"
16-AUG-2020 /  8:  329426.682868 "AUG-2020"
16-SEP-2020 /  9:  373350.240583 "SEP-2020"
16-OCT-2020 / 10:  417273.798299 "OCT-2020"
16-NOV-2020 / 11:  461197.356015 "NOV-2020"
16-DEC-2020 / 12:  505120.913730 "DEC-2020"
list /prec=12 _T[gt=dates_taxis] + offset, dates(offset, "year")
             TIME: 01-JAN-2020 00:00 to 01-JAN-2021 00:00
 Column  1: EX#1 is _T[GT=DATES_TAXIS] + OFFSET
 Column  2: EX#2 is DATES(OFFSET, "year")
                           EX#1   EX#2
16-JAN-2020 /  1:   21961.778858 "2020"
15-FEB-2020 /  2:   65885.336574 "2020"
17-MAR-2020 /  3:  109808.894289 "2020"
16-APR-2020 /  4:  153732.452005 "2020"
17-MAY-2020 /  5:  197656.009721 "2020"
16-JUN-2020 /  6:  241579.567436 "2020"
17-JUL-2020 /  7:  285503.125152 "2020"
16-AUG-2020 /  8:  329426.682868 "2020"
16-SEP-2020 /  9:  373350.240583 "2020"
16-OCT-2020 / 10:  417273.798299 "2020"
16-NOV-2020 / 11:  461197.356015 "2020"
16-DEC-2020 / 12:  505120.913730 "2020"
list /prec=12 _T[gt=dates_taxis] + offset, dates(offset, "")
             TIME: 01-JAN-2020 00:00 to 01-JAN-2021 00:00
 Column  1: EX#1 is _T[GT=DATES_TAXIS] + OFFSET
 Column  2: EX#2 is DATES(OFFSET, "")
                           EX#1           EX#2
16-JAN-2020 /  1:   21961.778858 "16-JAN-2020 06:01:46"
15-FEB-2020 /  2:   65885.336574 "15-FEB-2020 18:05:20"
17-MAR-2020 /  3:  109808.894289 "17-MAR-2020 06:08:53"
16-APR-2020 /  4:  153732.452005 "16-APR-2020 18:12:27"
17-MAY-2020 /  5:  197656.009721 "17-MAY-2020 06:16:00"
16-JUN-2020 /  6:  241579.567436 "16-JUN-2020 18:19:34"
17-JUL-2020 /  7:  285503.125152 "17-JUL-2020 06:23:07"
16-AUG-2020 /  8:  329426.682868 "16-AUG-2020 18:26:40"
16-SEP-2020 /  9:  373350.240583 "16-SEP-2020 06:30:14"
16-OCT-2020 / 10:  417273.798299 "16-OCT-2020 18:33:47"
16-NOV-2020 / 11:  461197.356015 "16-NOV-2020 06:37:21"
16-DEC-2020 / 12:  505120.913730 "16-DEC-2020 18:40:54"
!
! clean up
!
cancel var offset
cancel axis dates_taxis
go bench_pass_thru
! Bench_pass_thru.jnl
!  ACM  8/99
!  benchmark script for testing external function pass_thru.
! Note: bench_pass_thru_visual.jnl contains plots of similar computations
 
set mode ignore_errors
 
can region
let a = pass_thru(x)
list a[i=1:20]
             VARIABLE : PASS_THRU(X)
             SUBSET   : 20 points (X)
 1    /  1:   1.00
 2    /  2:   2.00
 3    /  3:   3.00
 4    /  4:   4.00
 5    /  5:   5.00
 6    /  6:   6.00
 7    /  7:   7.00
 8    /  8:   8.00
 9    /  9:   9.00
 10   / 10:  10.00
 11   / 11:  11.00
 12   / 12:  12.00
 13   / 13:  13.00
 14   / 14:  14.00
 15   / 15:  15.00
 16   / 16:  16.00
 17   / 17:  17.00
 18   / 18:  18.00
 19   / 19:  19.00
 20   / 20:  20.00
set region/i=1:20
list sin(a)
             VARIABLE : SIN(A)
             SUBSET   : 20 points (X)
 1    /  1:  0.8415
 2    /  2:  0.9093
 3    /  3:  0.1411
 4    /  4: -0.7568
 5    /  5: -0.9589
 6    /  6: -0.2794
 7    /  7:  0.6570
 8    /  8:  0.9894
 9    /  9:  0.4121
 10   / 10: -0.5440
 11   / 11: -1.0000
 12   / 12: -0.5366
 13   / 13:  0.4202
 14   / 14:  0.9906
 15   / 15:  0.6503
 16   / 16: -0.2879
 17   / 17: -0.9614
 18   / 18: -0.7510
 19   / 19:  0.1499
 20   / 20:  0.9129
can var/all
can region
 
use coads_climatology
let a = pass_thru(sst[l=@ave,y=@sbx:11])
list/x=50 a
             VARIABLE : PASS_THRU(SST[L=@AVE,Y=@SBX:11])
             FILENAME : coads_climatology.cdf
             SUBSET   : 90 points (LATITUDE)
             LONGITUDE: 49E
             TIME     : 01-JAN 00:45 to 01-APR 08:12
               49E   
               15
 89N   / 90:   ....
 87N   / 89:   ....
 85N   / 88:   ....
 83N   / 87:   ....
 81N   / 86:   ....
 79N   / 85:   ....
 77N   / 84:   ....
 75N   / 83:   ....
 73N   / 82:   ....
 71N   / 81:   ....
 69N   / 80:   ....
 67N   / 79:   ....
 65N   / 78:   ....
 63N   / 77:   ....
 61N   / 76:   ....
 59N   / 75:   ....
 57N   / 74:   ....
 55N   / 73:   ....
 53N   / 72:   ....
 51N   / 71:   ....
 49N   / 70:   ....
 47N   / 69:   ....
 45N   / 68:   ....
 43N   / 67:   ....
 41N   / 66:   ....
 39N   / 65:   ....
 37N   / 64:   ....
 35N   / 63:   ....
 33N   / 62:   ....
 31N   / 61:   ....
 29N   / 60:   ....
 27N   / 59:   ....
 25N   / 58:   ....
 23N   / 57:   ....
 21N   / 56:   ....
 19N   / 55:   ....
 17N   / 54:   ....
 15N   / 53:   ....
 13N   / 52:   ....
 11N   / 51:   ....
 9N    / 50:   ....
 7N    / 49:   ....
 5N    / 48:  26.94
 3N    / 47:  27.22
 1N    / 46:  27.48
 1S    / 45:  27.67
 3S    / 44:  27.78
 5S    / 43:  27.92
 7S    / 42:  28.04
 9S    / 41:  28.12
 11S   / 40:  28.18
 13S   / 39:  28.14
 15S   / 38:  28.03
 17S   / 37:  27.82
 19S   / 36:  27.45
 21S   / 35:  27.04
 23S   / 34:  26.52
 25S   / 33:  25.86
 27S   / 32:  25.09
 29S   / 31:  24.17
 31S   / 30:  23.04
 33S   / 29:  21.37
 35S   / 28:  19.60
 37S   / 27:  17.68
 39S   / 26:  15.76
 41S   / 25:  13.87
 43S   / 24:  11.98
 45S   / 23:  10.18
 47S   / 22:   8.45
 49S   / 21:   6.82
 51S   / 20:   5.33
 53S   / 19:   4.03
 55S   / 18:   3.19
 57S   / 17:   2.42
 59S   / 16:   ....
 61S   / 15:   ....
 63S   / 14:   ....
 65S   / 13:   ....
 67S   / 12:   ....
 69S   / 11:   ....
 71S   / 10:   ....
 73S   /  9:   ....
 75S   /  8:   ....
 77S   /  7:   ....
 79S   /  6:   ....
 81S   /  5:   ....
 83S   /  4:   ....
 85S   /  3:   ....
 87S   /  2:   ....
 89S   /  1:   ....
let a = pass_thru(sst)
set region/@w
list/x=50 a[l=1]
             VARIABLE : PASS_THRU(SST)
             FILENAME : coads_climatology.cdf
             SUBSET   : 90 points (LATITUDE)
             LONGITUDE: 49E
             TIME     : 16-JAN 06:00
               49E   
               15
 89N   / 90:   ....
 87N   / 89:   ....
 85N   / 88:   ....
 83N   / 87:   ....
 81N   / 86:   ....
 79N   / 85:   ....
 77N   / 84:   ....
 75N   / 83:   ....
 73N   / 82:   0.59
 71N   / 81:   0.62
 69N   / 80:   0.45
 67N   / 79:   ....
 65N   / 78:   ....
 63N   / 77:   ....
 61N   / 76:   ....
 59N   / 75:   ....
 57N   / 74:   ....
 55N   / 73:   ....
 53N   / 72:   ....
 51N   / 71:   ....
 49N   / 70:   ....
 47N   / 69:   ....
 45N   / 68:   3.32
 43N   / 67:   4.72
 41N   / 66:   4.84
 39N   / 65:   8.63
 37N   / 64:   8.07
 35N   / 63:   ....
 33N   / 62:   ....
 31N   / 61:   ....
 29N   / 60:  18.91
 27N   / 59:  20.83
 25N   / 58:   ....
 23N   / 57:   ....
 21N   / 56:   ....
 19N   / 55:   ....
 17N   / 54:   ....
 15N   / 53:  25.41
 13N   / 52:  25.37
 11N   / 51:  25.82
 9N    / 50:  27.20
 7N    / 49:  26.11
 5N    / 48:  26.10
 3N    / 47:  26.25
 1N    / 46:  26.44
 1S    / 45:  27.01
 3S    / 44:  27.61
 5S    / 43:  28.24
 7S    / 42:  28.71
 9S    / 41:  28.46
 11S   / 40:  28.07
 13S   / 39:  28.15
 15S   / 38:  28.08
 17S   / 37:  28.29
 19S   / 36:  27.61
 21S   / 35:  27.59
 23S   / 34:  27.06
 25S   / 33:  26.70
 27S   / 32:  25.89
 29S   / 31:  24.65
 31S   / 30:  23.86
 33S   / 29:  22.16
 35S   / 28:  20.58
 37S   / 27:  19.20
 39S   / 26:  17.51
 41S   / 25:  14.44
 43S   / 24:   8.55
 45S   / 23:   7.51
 47S   / 22:   5.77
 49S   / 21:   4.21
 51S   / 20:   3.64
 53S   / 19:   2.87
 55S   / 18:   2.67
 57S   / 17:   2.05
 59S   / 16:   1.37
 61S   / 15:   1.33
 63S   / 14:   0.77
 65S   / 13:  -0.04
 67S   / 12:  -0.93
 69S   / 11:   ....
 71S   / 10:   ....
 73S   /  9:   ....
 75S   /  8:   ....
 77S   /  7:   ....
 79S   /  6:   ....
 81S   /  5:   ....
 83S   /  4:   ....
 85S   /  3:   ....
 87S   /  2:   ....
 89S   /  1:   ....
list/x=50 a[l=@ave,y=@sbx:11]
             VARIABLE : PASS_THRU(SST)
                        box smoothed by 11 pts on Y
             FILENAME : coads_climatology.cdf
             SUBSET   : 90 points (LATITUDE)
             LONGITUDE: 49E
             TIME     : 01-JAN 00:45 to 01-APR 08:12 (averaged)
               49E   
               15
 89N   / 90:   ....
 87N   / 89:   ....
 85N   / 88:   ....
 83N   / 87:   ....
 81N   / 86:   ....
 79N   / 85:   ....
 77N   / 84:   ....
 75N   / 83:   ....
 73N   / 82:   ....
 71N   / 81:   ....
 69N   / 80:   ....
 67N   / 79:   ....
 65N   / 78:   ....
 63N   / 77:   ....
 61N   / 76:   ....
 59N   / 75:   ....
 57N   / 74:   ....
 55N   / 73:   ....
 53N   / 72:   ....
 51N   / 71:   ....
 49N   / 70:   ....
 47N   / 69:   ....
 45N   / 68:   ....
 43N   / 67:   ....
 41N   / 66:   ....
 39N   / 65:   ....
 37N   / 64:   ....
 35N   / 63:   ....
 33N   / 62:   ....
 31N   / 61:   ....
 29N   / 60:   ....
 27N   / 59:   ....
 25N   / 58:   ....
 23N   / 57:   ....
 21N   / 56:   ....
 19N   / 55:   ....
 17N   / 54:   ....
 15N   / 53:   ....
 13N   / 52:   ....
 11N   / 51:   ....
 9N    / 50:   ....
 7N    / 49:   ....
 5N    / 48:  26.94
 3N    / 47:  27.22
 1N    / 46:  27.48
 1S    / 45:  27.67
 3S    / 44:  27.78
 5S    / 43:  27.92
 7S    / 42:  28.04
 9S    / 41:  28.12
 11S   / 40:  28.18
 13S   / 39:  28.14
 15S   / 38:  28.03
 17S   / 37:  27.82
 19S   / 36:  27.45
 21S   / 35:  27.04
 23S   / 34:  26.52
 25S   / 33:  25.86
 27S   / 32:  25.09
 29S   / 31:  24.17
 31S   / 30:  23.04
 33S   / 29:  21.37
 35S   / 28:  19.60
 37S   / 27:  17.68
 39S   / 26:  15.76
 41S   / 25:  13.87
 43S   / 24:  11.98
 45S   / 23:  10.18
 47S   / 22:   8.45
 49S   / 21:   6.82
 51S   / 20:   5.33
 53S   / 19:   4.03
 55S   / 18:   3.19
 57S   / 17:   2.42
 59S   / 16:   ....
 61S   / 15:   ....
 63S   / 14:   ....
 65S   / 13:   ....
 67S   / 12:   ....
 69S   / 11:   ....
 71S   / 10:   ....
 73S   /  9:   ....
 75S   /  8:   ....
 77S   /  7:   ....
 79S   /  6:   ....
 81S   /  5:   ....
 83S   /  4:   ....
 85S   /  3:   ....
 87S   /  2:   ....
 89S   /  1:   ....
 
set mode/last ignore_errors
go bench_storage
! Bench_storage.jnl
!  ACM  8/99
!  benchmark script for testing external function storage.
! Note: bench_storage_visual.jnl contains plots of similar computations
 
set mode ignore_errors
 
use gtsa056_1
let a = storage(temp)
set region/k=1/l=5/i=1:2/j=44:50
list  a
             VARIABLE : STORAGE(TEMP)
             FILENAME : gtsa056_1.cdf
             SUBSET   : 2 by 7 points (LONGITUDE-LATITUDE)
             DEPTH (m): 5
             TIME     : 27-JAN-1982 18:00
              130.5E 131.5E 
                1      2
 1.5N  / 50:   ....  2.955
 1.17N / 49:   ....  2.962
 0.83N / 48:   ....  2.966
 0.5N  / 47:   ....  2.973
 0.17N / 46:   ....  2.985
 0.17S / 45:   ....  2.990
 0.5S  / 44:   ....   ....
 
can region
set region/x=140w/y=10n/k=1
list a
             VARIABLE : STORAGE(TEMP)
             FILENAME : gtsa056_1.cdf
             SUBSET   : 5 points (TIME)
             LONGITUDE: 140.5W
             LATITUDE : 9.833N
             DEPTH (m): 5
                      140.5W 
                       90
 15-JAN-1982 14 / 1:  2.656
 18-JAN-1982 15 / 2:  2.654
 21-JAN-1982 16 / 3:  2.652
 24-JAN-1982 17 / 4:  2.649
 27-JAN-1982 18 / 5:  2.646
 
can region
 
let b = temp[x=140e:60w]
let c = storage(b)
list/i=11:20 c[k=1,l=5,j=44:50@ave]
             VARIABLE : STORAGE(B)
             FILENAME : gtsa056_1.cdf
             SUBSET   : 10 points (LONGITUDE)
             LATITUDE : 0.667S to 1.667N (averaged)
             DEPTH (m): 5
             TIME     : 27-JAN-1982 18:00
 140.5E / 11:  2.953
 141.5E / 12:  2.956
 142.5E / 13:  2.961
 143.5E / 14:  2.966
 144.5E / 15:  2.968
 145.5E / 16:  2.968
 146.5E / 17:  2.967
 147.5E / 18:  2.970
 148.5E / 19:  2.974
 149.5E / 20:  2.979
 
set mode/last ignore_errors
 
go bench_subtract
! Bench_subtract.jnl
!  ACM  8/99
!  benchmark script for testing external function subtract.
! Note: bench_subtract_visual.jnl contains plots of similar computations
! V550 *sh* 11/02 - documentation note only reflecting subspan modulo
 
set mode ignore_errors
 
can region
use ocean_atlas_temp
use coads_climatology
let oatemp = temp[d=ocean_atlas_temp,g=sst[d=coads_climatology]]
set region/l=1
let a = subtract(oatemp,sst)
list/x=150:160/y=0  a
             VARIABLE : SUBTRACT(OATEMP,SST)
             FILENAME : coads_climatology.cdf
             SUBSET   : 5 points (LONGITUDE)
             LATITUDE : 1S
             DEPTH (m): 0
             TIME     : 16-JAN 06:00
                 1S    
                 45
 151E   / 66:  0.0233
 153E   / 67:  0.0346
 155E   / 68:  0.1315
 157E   / 69:  0.2809
 159E   / 70:  0.2610
let b = oatemp- sst
list/x=150:160/y=0  a - b
             VARIABLE : A - B
             FILENAME : coads_climatology.cdf
             SUBSET   : 5 points (LONGITUDE)
             LATITUDE : 1S
             DEPTH (m): 0
             TIME     : 16-JAN 06:00
                 1S    
                 45
 151E   / 66:  0.0000
 153E   / 67:  0.0000
 155E   / 68:  0.0000
 157E   / 69:  0.0000
 159E   / 70:  0.0000
 
can region
let a = oatemp[l=1]
let b = sst[l=1]
list/x=150:160/y=0  subtract(a,b)
             VARIABLE : SUBTRACT(A,B)
             FILENAME : coads_climatology.cdf
             SUBSET   : 5 points (LONGITUDE)
             LATITUDE : 1S
             DEPTH (m): 0
             TIME     : 16-JAN 06:00
                 1S    
                 45
 151E   / 66:  0.0233
 153E   / 67:  0.0346
 155E   / 68:  0.1315
 157E   / 69:  0.2809
 159E   / 70:  0.2610
 
let a = oatemp[x=180]
let b = sst[x=180]
list/y=0 subtract(a,b)
             VARIABLE : SUBTRACT(A,B)
             FILENAME : coads_climatology.cdf
             SUBSET   : 3 points (TIME)
             LONGITUDE: 179E
             LATITUDE : 1S
             DEPTH (m): 0
                    179E   
                     80
 16-JAN      / 1:  0.1934
 15-FEB      / 2:  0.1304
 17-MAR      / 3:    ....
 
can region
let a = x[i=1:30]
let b = y[j=1:30]
list/y=15 subtract(a,b)  ! pre: V550 this gave a valid MARCH. Valid behavior chg in V550
             VARIABLE : SUBTRACT(A,B)
             SUBSET   : 30 points (X)
             Y        : 15
              15    
              15
 1    /  1: -14.00
 2    /  2: -13.00
 3    /  3: -12.00
 4    /  4: -11.00
 5    /  5: -10.00
 6    /  6:  -9.00
 7    /  7:  -8.00
 8    /  8:  -7.00
 9    /  9:  -6.00
 10   / 10:  -5.00
 11   / 11:  -4.00
 12   / 12:  -3.00
 13   / 13:  -2.00
 14   / 14:  -1.00
 15   / 15:   0.00
 16   / 16:   1.00
 17   / 17:   2.00
 18   / 18:   3.00
 19   / 19:   4.00
 20   / 20:   5.00
 21   / 21:   6.00
 22   / 22:   7.00
 23   / 23:   8.00
 24   / 24:   9.00
 25   / 25:  10.00
 26   / 26:  11.00
 27   / 27:  12.00
 28   / 28:  13.00
 29   / 29:  14.00
 30   / 30:  15.00
 
can region
let a = sst[l=1]
let b = 26
list/x=150:160/y=0 subtract(a,b)
             VARIABLE : SUBTRACT(A,B)
             FILENAME : coads_climatology.cdf
             SUBSET   : 5 points (LONGITUDE)
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
                1S    
                45
 151E   / 66:  3.416
 153E   / 67:  3.431
 155E   / 68:  3.334
 157E   / 69:  3.190
 159E   / 70:  3.219
list/x=150:160/y=0 subtract(a,26)
             VARIABLE : SUBTRACT(A,26)
             FILENAME : coads_climatology.cdf
             SUBSET   : 5 points (LONGITUDE)
             LATITUDE : 1S
             TIME     : 16-JAN 06:00
                1S    
                45
 151E   / 66:  3.416
 153E   / 67:  3.431
 155E   / 68:  3.334
 157E   / 69:  3.190
 159E   / 70:  3.219
 
let b = sst[x=180,y=0,l=@ave]
list/x=150:160/y=0  subtract(a,b)
             VARIABLE : SUBTRACT(A,B)
             FILENAME : coads_climatology.cdf
             SUBSET   : 5 points (LONGITUDE)
             LATITUDE : 1S
             TIME     : 01-JAN 00:45 to 01-APR 08:12
                1S    
                45
 151E   / 66:  1.109
 153E   / 67:  1.124
 155E   / 68:  1.027
 157E   / 69:  0.883
 159E   / 70:  0.912
 
set mode/last ignore_errors
 
 
 
!!!!!!!!!!!!!!!!!!!!!!
!
! YAY!! End of bench_examples.jnl without crashing!!!!
!
!!!!!!!!!!!!!!!!!!!!!!
 
! 12/16 No other external functions are distributed. Remove further references.
 
go bn_reset
cancel mode verify
ooooooooooooooooooooooooooooooooooooooooooo
go bn_fcn_calls.jnl
! Simple tests of external functions
! these are not otherwise tested in the benchmarkd
! ACM 23-Aug-2006
! 05/07 *acm* move tests of date1900, tax_* functions and
!             fill_xy to bn_internal_external_functions.jnl
 
exit
 
exit/command
*** Running ferret script: bn_startupfile.jnl
    SET MEMORY/MAX: 248 Mb   (31 megawords)
    Peak demand: 0 Kb
    Current cache: 0 Kb
PPL$XPIXEL = "0"
PPL$YPIXEL = "0"
BYTEORDER = "LITTLE"
FERRET_VERSION = "7.6"
FERRET_PLATFORM = "Linux 3.10.0-1127.10.1.el7.x86_64 64-bit"
FERRET_PRECISION = "double"
NETCDF_VERSION = "4.6.3 of Mar 21 2019 12:17:08 $"
FERRET_MEMORY = "31"
FERRET_BYTES_MEM = "248Mb"
SESSION_DATE = "DD-MON-YY"
SESSION_TIME = "HH:MM"
SESSION_PID = "#####"
DELTA_CPU = "######"
CLOCK_SECS = "######"
CURRENT_DATE = "DD-MON-YY"
CURRENT_TIME = "HH:MM:SS"
N_OPEN_DSETS = "0"
PROGRAM_NAME = "Ferret"
PEAK_MEMORY = "0"
SPAWN_OK = "1"
SPAWN_STATUS = "0"
GO_FILE = "./genjnls/bn_startupfile.jnl"
LAST_GO_FILE = "./genjnls/bn_startupfile.jnl"
PPL$FORMAT = "(3F10.2)"
PPL$PLTNME = ".gif"
PPL$TEKNME = "/dev/tt"
PPL$XLEN = "8.00000"
PPL$YLEN = "6.00000"
PPL$XORG = "1.20000"
PPL$YORG = "1.40000"
PPL$WIDTH = "10.2000"
PPL$HEIGHT = "8.80000"
PPL$LINE_COUNT = "0"
PPL$XFACT1 = "1.000000"
PPL$XOFF1 = "0.000000"
PPL$YFACT1 = "1.000000"
PPL$YOFF1 = "0.000000"
PPL$VIEW_X = "0.000"
PPL$VIEW_Y = "0.000"
PPL$VIEW_Z = "0.000"
PPL$COMMAND_FILE = "$$MEMBUF$$"
VP_WIDTH = "10.200"
VP_HEIGHT = "8.800"
VP_SCALE = "1.000"
VP_RT_MARGIN = "1.000"
VP_TOP_MARGIN = "1.400"
VP_XLO = "0.000"
VP_XHI = "1.000"
VP_YLO = "0.000"
VP_YHI = "1.000"
      MODE            STATE        ARGUMENT
      DIAGNOSTIC    CANCELED            99
      VERIFY        CANCELED       DEFAULT
      INTERPOLATE   CANCELED
      IGNORE_ERROR  CANCELED
      STUPID        CANCELED
      JOURNAL          SET         startup_tests.jnl
      LONG_LABEL       SET               4
      LATIT_LABEL   CANCELED             3
      DEPTH_LABEL      SET               4
      CALENDAR         SET         minutes
      E_LABEL          SET               4
      F_LABEL          SET         minutes
      ASCII_FONT       SET
      SEGMENT          SET
      WAIT          CANCELED
      DESPERATE     CANCELED             0
      GKS              SET
      REFRESH          SET
      METAFILE      CANCELED       .gif
      PPLLIST       CANCELED       ppllist.out
      GUI           CANCELED
      LOGO             SET
      LABELS           SET
      GRATICULE        SET
      LINECOLORS       SET               7
      UPCASE_OUTPU     SET
      NLEVELS          SET             100
      NODATA_LAB       SET
      SHRINK_YLAB   CANCELED
      CURVILINEAR   CANCELED
      LAYERZ        CANCELED
      6D_LAB           SET
      FRUGAL           SET              30
      DATE_FORMAT      SET         DEFAULT
      DSG              SET
     currently SET data sets:
    1> ./data/gtbc011.cdf  (default)
 name     title                             I         J         K         L
 TEMP     TEMPERATURE                     70:72      1:100     1:27      1:3
 SALT     (SALINITY(ppt) - 35) /1000      70:71      1:100     1:27      1:3
 U        ZONAL VELOCITY                  69:72      1:100     1:27      1:3
 V        MERIDIONAL VELOCITY             69:72      1:100     1:27      1:3
 W        VERTICAL VELOCITY               70:71      1:100     1:27      1:3
 TAUX     ZONAL WIND STRESS               69:71      1:100     ...       1:3
 TAUY     MERIDIONAL WIND STRESS          69:71      1:100     ...       1:3
 PSI      STREAM FUNCTION                 69:73      1:100     ...       1:3
 
*** Running ferret script: err700_decimate.jnl
! err700_decimate.jnl
! test decimation of SOCAT full-data DSG files
!
 
! Make sure the decimated file does not exist
sp rm -f 492C19881104_dec.nc
! Run the socat decimation script on a full-data DSG file
go ddsg_socat3 492C19881104.nc 492C19881104_dec.nc
! ddsg_socat3.jnl
! ACM 5/16/2014
 
! Compute and apply sampling for a single-trajectory dsg file
! using piecewise linear interpolation
 
! Uses the external function piecewise3.so
! This script contains a list of the variables in the input
! files. This allows us to create the decimated dsg file
! with the exact same names as in the input files.
!
! WOCE flags are not used in the decimated datasets, as they may change in the
! full data. Keep them in the file for a consistent set of variables, but mark
! them with the unused flag "M".
 
! arguments:
!  input_file single dsg file
!  output_file to write
!
 
DEFINE SYMBOL infile = ($1)
 !-> DEFINE SYMBOL infile = 492C19881104.nc
DEFINE SYMBOL outfile = ($2)
 !-> DEFINE SYMBOL outfile = 492C19881104_dec.nc
 
! Set the tolerances and control parameter
 
DEFINE SYMBOL tol_lon = 1
DEFINE SYMBOL tol_lat = 1
DEFINE SYMBOL tol_var = 4
 
LET tol1 = ($tol_lon)
 !-> DEFINE VARIABLE tol1 = 1
LET tol2 = ($tol_lat)
 !-> DEFINE VARIABLE tol2 = 1
let tol3 = ($tol_var)
 !-> DEFINE VARIABLE tol3 = 4
 
LET control = 2
 
! This script is written for non-DSG-enabled Ferret. Do not treat the
! file as a DSG file.
 
USE/feature=none "($infile)"
 !-> SET DAT/FORM=CDF/feature=none "492C19881104.nc"
 
! The names in the input and output file must match.
! To accomplish that we will rename the variables in the input file.
! varnames_list is a stable list of the original names. Check that it
! matches what's in the file, and rename the file variables.
 
LET varnames =  ..varnames
LET nvars =  ..nvars
 
! Will also add nobs_deci.
 
LET varnames_traj = {\
"num_obs","expocode","dataset_name","vessel_name","organization",\
"geospatial_lon_min","geospatial_lon_max","geospatial_lat_min",\
"geospatial_lat_max","time_coverage_start","time_converage_end",\
"investigators","socat_version","all_region_ids","socat_doi",\
"qc_flag","nobs_full"}
 
! The text is too long for one Ferret command. Define two variables and concatenate them.
 
LET varnames_list1 = {\
"sample_number","year","month","day","hour","minute","second",\
"longitude","latitude","sample_depth","sal","Temperature_equi",\
"temp","Temperature_atm","Pressure_equi","Pressure_atm",\
"xCO2_water_equi_temp_dry_ppm","xCO2_water_sst_dry_ppm",\
"xCO2_water_equi_temp_wet_ppm","xCO2_water_sst_wet_ppm",\
"pCO2_water_equi_temp","pCO2_water_sst_100humidity_uatm",\
"fCO2_water_equi_uatm","fCO2_water_sst_100humidity_uatm",\
"xCO2_atm_dry_actual","xCO2_atm_dry_interp",\
"pCO2_atm_wet_actual","pCO2_atm_wet_interp",\
"fCO2_atm_wet_actual","fCO2_atm_wet_interp",\
"delta_xCO2","delta_pCO2","delta_fCO2",\
"xH2O_equi","relative_humidity","specific_humidity",\
"ship_speed","ship_dir","wind_speed_true","wind_speed_rel",\
"wind_dir_true","wind_dir_rel","WOCE_CO2_water","WOCE_CO2_atm"\
}
LET varnames_list2 = {\
"woa_sss","pressure_ncep_slp",\
"fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm",\
"fCO2_insitu_from_xCO2_water_sst_dry_ppm",\
"fCO2_from_pCO2_water_water_equi_temp",\
"fCO2_from_pCO2_water_sst_100humidity_uatm",\
"fCO2_insitu_from_fCO2_water_equi_uatm",\
"fCO2_insitu_from_fCO2_water_sst_100humidty_uatm",\
"fCO2_from_pCO2_water_water_equi_temp_ncep",\
"fCO2_from_pCO2_water_sst_100humidity_uatm_ncep",\
"fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_woa",\
"fCO2_insitu_from_xCO2_water_sst_dry_ppm_woa",\
"fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep",\
"fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep",\
"fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep_woa",\
"fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep_woa",\
"fCO2_recommended","fCO2_source","delta_temp","region_id",\
"calc_speed","etopo2","gvCO2","dist_to_land",\
"day_of_year","time","lon360","tmonth"\
}
 
LET varnames_list = XCAT(varnames_list1, varnames_list2)
 
LET ntraj = `varnames_traj,return=isize`
 !-> DEFINE VARIABLE ntraj = 17
LET nlist = `varnames_list,return=isize`
 !-> DEFINE VARIABLE nlist = 72
 
!IF `nvars NE (ntraj+nlist)` THEN
!   say **ERROR List of variables in the script does not match list in the dataset
!   say **ERROR "($infile)" has `nvars` variables, script list has `nlist`
!   exit/script
!ENDIF
 
! Check that the variable names in the lists are in the file.
! If so rename the variables in the input file to varname_in
 
 
SET VAR/NAME=nobs_deci_in nobs_deci
 
LET vdiff = 0
REPEAT/range=1:`ntraj`/name=v (DEFINE SYMBOL  vv = `v`;\
 DEFINE SYMBOL vname = `varnames_traj[i=($vv)]`;\
 IF `IS_ELEMENT_OF_STR_N(varnames, "($vname)") EQ 0` THEN LET vdiff = `v`;\
 IF `vdiff GT 0` THEN EXIT/LOOP;\
 SET VAR/NAME=($vname)_in ($vname))
 !-> REPEAT/range=1:17/name=v (DEFINE SYMBOL  vv = `v`; DEFINE SYMBOL vname = `varnames_traj[i=($vv)]`; IF `IS_ELEMENT_OF_STR_N(varnames, "($vname)") EQ 0` THEN LET vdiff = `v`; IF `vdiff GT 0` THEN EXIT/LOOP; SET VAR/NAME=($vname)_in ($vname))
!-> REPEAT: V:1
 !-> DEFINE SYMBOL  vv = 1
 !-> DEFINE SYMBOL vname = num_obs
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=num_obs_in num_obs
!-> REPEAT: V:2
 !-> DEFINE SYMBOL  vv = 2
 !-> DEFINE SYMBOL vname = expocode
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=expocode_in expocode
!-> REPEAT: V:3
 !-> DEFINE SYMBOL  vv = 3
 !-> DEFINE SYMBOL vname = dataset_name
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=dataset_name_in dataset_name
!-> REPEAT: V:4
 !-> DEFINE SYMBOL  vv = 4
 !-> DEFINE SYMBOL vname = vessel_name
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=vessel_name_in vessel_name
!-> REPEAT: V:5
 !-> DEFINE SYMBOL  vv = 5
 !-> DEFINE SYMBOL vname = organization
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=organization_in organization
!-> REPEAT: V:6
 !-> DEFINE SYMBOL  vv = 6
 !-> DEFINE SYMBOL vname = geospatial_lon_min
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=geospatial_lon_min_in geospatial_lon_min
!-> REPEAT: V:7
 !-> DEFINE SYMBOL  vv = 7
 !-> DEFINE SYMBOL vname = geospatial_lon_max
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=geospatial_lon_max_in geospatial_lon_max
!-> REPEAT: V:8
 !-> DEFINE SYMBOL  vv = 8
 !-> DEFINE SYMBOL vname = geospatial_lat_min
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=geospatial_lat_min_in geospatial_lat_min
!-> REPEAT: V:9
 !-> DEFINE SYMBOL  vv = 9
 !-> DEFINE SYMBOL vname = geospatial_lat_max
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=geospatial_lat_max_in geospatial_lat_max
!-> REPEAT: V:10
 !-> DEFINE SYMBOL  vv = 10
 !-> DEFINE SYMBOL vname = time_coverage_start
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=time_coverage_start_in time_coverage_start
!-> REPEAT: V:11
 !-> DEFINE SYMBOL  vv = 11
 !-> DEFINE SYMBOL vname = time_converage_end
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=time_converage_end_in time_converage_end
!-> REPEAT: V:12
 !-> DEFINE SYMBOL  vv = 12
 !-> DEFINE SYMBOL vname = investigators
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=investigators_in investigators
!-> REPEAT: V:13
 !-> DEFINE SYMBOL  vv = 13
 !-> DEFINE SYMBOL vname = socat_version
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=socat_version_in socat_version
!-> REPEAT: V:14
 !-> DEFINE SYMBOL  vv = 14
 !-> DEFINE SYMBOL vname = all_region_ids
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=all_region_ids_in all_region_ids
!-> REPEAT: V:15
 !-> DEFINE SYMBOL  vv = 15
 !-> DEFINE SYMBOL vname = socat_doi
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=socat_doi_in socat_doi
!-> REPEAT: V:16
 !-> DEFINE SYMBOL  vv = 16
 !-> DEFINE SYMBOL vname = qc_flag
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=qc_flag_in qc_flag
!-> REPEAT: V:17
 !-> DEFINE SYMBOL  vv = 17
 !-> DEFINE SYMBOL vname = nobs_full
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=nobs_full_in nobs_full
 
LET vdiff = 0
REPEAT/range=1:`nlist`/name=v (DEFINE SYMBOL  vv = `v`;\
 DEFINE SYMBOL vname = `varnames_list[i=($vv)]`;\
 IF `IS_ELEMENT_OF_STR_N(varnames, "($vname)") EQ 0` THEN LET vdiff = `v`;\
 IF `vdiff GT 0` THEN EXIT/LOOP;\
 SET VAR/NAME=($vname)_in ($vname))
 !-> REPEAT/range=1:72/name=v (DEFINE SYMBOL  vv = `v`; DEFINE SYMBOL vname = `varnames_list[i=($vv)]`; IF `IS_ELEMENT_OF_STR_N(varnames, "($vname)") EQ 0` THEN LET vdiff = `v`; IF `vdiff GT 0` THEN EXIT/LOOP; SET VAR/NAME=($vname)_in ($vname))
!-> REPEAT: V:1
 !-> DEFINE SYMBOL  vv = 1
 !-> DEFINE SYMBOL vname = sample_number
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=sample_number_in sample_number
!-> REPEAT: V:2
 !-> DEFINE SYMBOL  vv = 2
 !-> DEFINE SYMBOL vname = year
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=year_in year
!-> REPEAT: V:3
 !-> DEFINE SYMBOL  vv = 3
 !-> DEFINE SYMBOL vname = month
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=month_in month
!-> REPEAT: V:4
 !-> DEFINE SYMBOL  vv = 4
 !-> DEFINE SYMBOL vname = day
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=day_in day
!-> REPEAT: V:5
 !-> DEFINE SYMBOL  vv = 5
 !-> DEFINE SYMBOL vname = hour
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=hour_in hour
!-> REPEAT: V:6
 !-> DEFINE SYMBOL  vv = 6
 !-> DEFINE SYMBOL vname = minute
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=minute_in minute
!-> REPEAT: V:7
 !-> DEFINE SYMBOL  vv = 7
 !-> DEFINE SYMBOL vname = second
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=second_in second
!-> REPEAT: V:8
 !-> DEFINE SYMBOL  vv = 8
 !-> DEFINE SYMBOL vname = longitude
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=longitude_in longitude
!-> REPEAT: V:9
 !-> DEFINE SYMBOL  vv = 9
 !-> DEFINE SYMBOL vname = latitude
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=latitude_in latitude
!-> REPEAT: V:10
 !-> DEFINE SYMBOL  vv = 10
 !-> DEFINE SYMBOL vname = sample_depth
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=sample_depth_in sample_depth
!-> REPEAT: V:11
 !-> DEFINE SYMBOL  vv = 11
 !-> DEFINE SYMBOL vname = sal
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=sal_in sal
!-> REPEAT: V:12
 !-> DEFINE SYMBOL  vv = 12
 !-> DEFINE SYMBOL vname = Temperature_equi
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=Temperature_equi_in Temperature_equi
!-> REPEAT: V:13
 !-> DEFINE SYMBOL  vv = 13
 !-> DEFINE SYMBOL vname = temp
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=temp_in temp
!-> REPEAT: V:14
 !-> DEFINE SYMBOL  vv = 14
 !-> DEFINE SYMBOL vname = Temperature_atm
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=Temperature_atm_in Temperature_atm
!-> REPEAT: V:15
 !-> DEFINE SYMBOL  vv = 15
 !-> DEFINE SYMBOL vname = Pressure_equi
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=Pressure_equi_in Pressure_equi
!-> REPEAT: V:16
 !-> DEFINE SYMBOL  vv = 16
 !-> DEFINE SYMBOL vname = Pressure_atm
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=Pressure_atm_in Pressure_atm
!-> REPEAT: V:17
 !-> DEFINE SYMBOL  vv = 17
 !-> DEFINE SYMBOL vname = xCO2_water_equi_temp_dry_ppm
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=xCO2_water_equi_temp_dry_ppm_in xCO2_water_equi_temp_dry_ppm
!-> REPEAT: V:18
 !-> DEFINE SYMBOL  vv = 18
 !-> DEFINE SYMBOL vname = xCO2_water_sst_dry_ppm
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=xCO2_water_sst_dry_ppm_in xCO2_water_sst_dry_ppm
!-> REPEAT: V:19
 !-> DEFINE SYMBOL  vv = 19
 !-> DEFINE SYMBOL vname = xCO2_water_equi_temp_wet_ppm
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=xCO2_water_equi_temp_wet_ppm_in xCO2_water_equi_temp_wet_ppm
!-> REPEAT: V:20
 !-> DEFINE SYMBOL  vv = 20
 !-> DEFINE SYMBOL vname = xCO2_water_sst_wet_ppm
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=xCO2_water_sst_wet_ppm_in xCO2_water_sst_wet_ppm
!-> REPEAT: V:21
 !-> DEFINE SYMBOL  vv = 21
 !-> DEFINE SYMBOL vname = pCO2_water_equi_temp
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=pCO2_water_equi_temp_in pCO2_water_equi_temp
!-> REPEAT: V:22
 !-> DEFINE SYMBOL  vv = 22
 !-> DEFINE SYMBOL vname = pCO2_water_sst_100humidity_uatm
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=pCO2_water_sst_100humidity_uatm_in pCO2_water_sst_100humidity_uatm
!-> REPEAT: V:23
 !-> DEFINE SYMBOL  vv = 23
 !-> DEFINE SYMBOL vname = fCO2_water_equi_uatm
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_water_equi_uatm_in fCO2_water_equi_uatm
!-> REPEAT: V:24
 !-> DEFINE SYMBOL  vv = 24
 !-> DEFINE SYMBOL vname = fCO2_water_sst_100humidity_uatm
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_water_sst_100humidity_uatm_in fCO2_water_sst_100humidity_uatm
!-> REPEAT: V:25
 !-> DEFINE SYMBOL  vv = 25
 !-> DEFINE SYMBOL vname = xCO2_atm_dry_actual
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=xCO2_atm_dry_actual_in xCO2_atm_dry_actual
!-> REPEAT: V:26
 !-> DEFINE SYMBOL  vv = 26
 !-> DEFINE SYMBOL vname = xCO2_atm_dry_interp
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=xCO2_atm_dry_interp_in xCO2_atm_dry_interp
!-> REPEAT: V:27
 !-> DEFINE SYMBOL  vv = 27
 !-> DEFINE SYMBOL vname = pCO2_atm_wet_actual
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=pCO2_atm_wet_actual_in pCO2_atm_wet_actual
!-> REPEAT: V:28
 !-> DEFINE SYMBOL  vv = 28
 !-> DEFINE SYMBOL vname = pCO2_atm_wet_interp
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=pCO2_atm_wet_interp_in pCO2_atm_wet_interp
!-> REPEAT: V:29
 !-> DEFINE SYMBOL  vv = 29
 !-> DEFINE SYMBOL vname = fCO2_atm_wet_actual
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_atm_wet_actual_in fCO2_atm_wet_actual
!-> REPEAT: V:30
 !-> DEFINE SYMBOL  vv = 30
 !-> DEFINE SYMBOL vname = fCO2_atm_wet_interp
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_atm_wet_interp_in fCO2_atm_wet_interp
!-> REPEAT: V:31
 !-> DEFINE SYMBOL  vv = 31
 !-> DEFINE SYMBOL vname = delta_xCO2
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=delta_xCO2_in delta_xCO2
!-> REPEAT: V:32
 !-> DEFINE SYMBOL  vv = 32
 !-> DEFINE SYMBOL vname = delta_pCO2
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=delta_pCO2_in delta_pCO2
!-> REPEAT: V:33
 !-> DEFINE SYMBOL  vv = 33
 !-> DEFINE SYMBOL vname = delta_fCO2
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=delta_fCO2_in delta_fCO2
!-> REPEAT: V:34
 !-> DEFINE SYMBOL  vv = 34
 !-> DEFINE SYMBOL vname = xH2O_equi
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=xH2O_equi_in xH2O_equi
!-> REPEAT: V:35
 !-> DEFINE SYMBOL  vv = 35
 !-> DEFINE SYMBOL vname = relative_humidity
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=relative_humidity_in relative_humidity
!-> REPEAT: V:36
 !-> DEFINE SYMBOL  vv = 36
 !-> DEFINE SYMBOL vname = specific_humidity
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=specific_humidity_in specific_humidity
!-> REPEAT: V:37
 !-> DEFINE SYMBOL  vv = 37
 !-> DEFINE SYMBOL vname = ship_speed
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=ship_speed_in ship_speed
!-> REPEAT: V:38
 !-> DEFINE SYMBOL  vv = 38
 !-> DEFINE SYMBOL vname = ship_dir
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=ship_dir_in ship_dir
!-> REPEAT: V:39
 !-> DEFINE SYMBOL  vv = 39
 !-> DEFINE SYMBOL vname = wind_speed_true
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=wind_speed_true_in wind_speed_true
!-> REPEAT: V:40
 !-> DEFINE SYMBOL  vv = 40
 !-> DEFINE SYMBOL vname = wind_speed_rel
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=wind_speed_rel_in wind_speed_rel
!-> REPEAT: V:41
 !-> DEFINE SYMBOL  vv = 41
 !-> DEFINE SYMBOL vname = wind_dir_true
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=wind_dir_true_in wind_dir_true
!-> REPEAT: V:42
 !-> DEFINE SYMBOL  vv = 42
 !-> DEFINE SYMBOL vname = wind_dir_rel
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=wind_dir_rel_in wind_dir_rel
!-> REPEAT: V:43
 !-> DEFINE SYMBOL  vv = 43
 !-> DEFINE SYMBOL vname = WOCE_CO2_water
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=WOCE_CO2_water_in WOCE_CO2_water
!-> REPEAT: V:44
 !-> DEFINE SYMBOL  vv = 44
 !-> DEFINE SYMBOL vname = WOCE_CO2_atm
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=WOCE_CO2_atm_in WOCE_CO2_atm
!-> REPEAT: V:45
 !-> DEFINE SYMBOL  vv = 45
 !-> DEFINE SYMBOL vname = woa_sss
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=woa_sss_in woa_sss
!-> REPEAT: V:46
 !-> DEFINE SYMBOL  vv = 46
 !-> DEFINE SYMBOL vname = pressure_ncep_slp
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=pressure_ncep_slp_in pressure_ncep_slp
!-> REPEAT: V:47
 !-> DEFINE SYMBOL  vv = 47
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_in fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm
!-> REPEAT: V:48
 !-> DEFINE SYMBOL  vv = 48
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_sst_dry_ppm
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_insitu_from_xCO2_water_sst_dry_ppm_in fCO2_insitu_from_xCO2_water_sst_dry_ppm
!-> REPEAT: V:49
 !-> DEFINE SYMBOL  vv = 49
 !-> DEFINE SYMBOL vname = fCO2_from_pCO2_water_water_equi_temp
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_from_pCO2_water_water_equi_temp_in fCO2_from_pCO2_water_water_equi_temp
!-> REPEAT: V:50
 !-> DEFINE SYMBOL  vv = 50
 !-> DEFINE SYMBOL vname = fCO2_from_pCO2_water_sst_100humidity_uatm
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_from_pCO2_water_sst_100humidity_uatm_in fCO2_from_pCO2_water_sst_100humidity_uatm
!-> REPEAT: V:51
 !-> DEFINE SYMBOL  vv = 51
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_fCO2_water_equi_uatm
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_insitu_from_fCO2_water_equi_uatm_in fCO2_insitu_from_fCO2_water_equi_uatm
!-> REPEAT: V:52
 !-> DEFINE SYMBOL  vv = 52
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_fCO2_water_sst_100humidty_uatm
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_insitu_from_fCO2_water_sst_100humidty_uatm_in fCO2_insitu_from_fCO2_water_sst_100humidty_uatm
!-> REPEAT: V:53
 !-> DEFINE SYMBOL  vv = 53
 !-> DEFINE SYMBOL vname = fCO2_from_pCO2_water_water_equi_temp_ncep
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_from_pCO2_water_water_equi_temp_ncep_in fCO2_from_pCO2_water_water_equi_temp_ncep
!-> REPEAT: V:54
 !-> DEFINE SYMBOL  vv = 54
 !-> DEFINE SYMBOL vname = fCO2_from_pCO2_water_sst_100humidity_uatm_ncep
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_from_pCO2_water_sst_100humidity_uatm_ncep_in fCO2_from_pCO2_water_sst_100humidity_uatm_ncep
!-> REPEAT: V:55
 !-> DEFINE SYMBOL  vv = 55
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_woa
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_woa_in fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_woa
!-> REPEAT: V:56
 !-> DEFINE SYMBOL  vv = 56
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_sst_dry_ppm_woa
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_insitu_from_xCO2_water_sst_dry_ppm_woa_in fCO2_insitu_from_xCO2_water_sst_dry_ppm_woa
!-> REPEAT: V:57
 !-> DEFINE SYMBOL  vv = 57
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep_in fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep
!-> REPEAT: V:58
 !-> DEFINE SYMBOL  vv = 58
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep_in fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep
!-> REPEAT: V:59
 !-> DEFINE SYMBOL  vv = 59
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep_woa
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep_woa_in fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep_woa
!-> REPEAT: V:60
 !-> DEFINE SYMBOL  vv = 60
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep_woa
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep_woa_in fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep_woa
!-> REPEAT: V:61
 !-> DEFINE SYMBOL  vv = 61
 !-> DEFINE SYMBOL vname = fCO2_recommended
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_recommended_in fCO2_recommended
!-> REPEAT: V:62
 !-> DEFINE SYMBOL  vv = 62
 !-> DEFINE SYMBOL vname = fCO2_source
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=fCO2_source_in fCO2_source
!-> REPEAT: V:63
 !-> DEFINE SYMBOL  vv = 63
 !-> DEFINE SYMBOL vname = delta_temp
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=delta_temp_in delta_temp
!-> REPEAT: V:64
 !-> DEFINE SYMBOL  vv = 64
 !-> DEFINE SYMBOL vname = region_id
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=region_id_in region_id
!-> REPEAT: V:65
 !-> DEFINE SYMBOL  vv = 65
 !-> DEFINE SYMBOL vname = calc_speed
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=calc_speed_in calc_speed
!-> REPEAT: V:66
 !-> DEFINE SYMBOL  vv = 66
 !-> DEFINE SYMBOL vname = etopo2
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=etopo2_in etopo2
!-> REPEAT: V:67
 !-> DEFINE SYMBOL  vv = 67
 !-> DEFINE SYMBOL vname = gvCO2
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=gvCO2_in gvCO2
!-> REPEAT: V:68
 !-> DEFINE SYMBOL  vv = 68
 !-> DEFINE SYMBOL vname = dist_to_land
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=dist_to_land_in dist_to_land
!-> REPEAT: V:69
 !-> DEFINE SYMBOL  vv = 69
 !-> DEFINE SYMBOL vname = day_of_year
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=day_of_year_in day_of_year
!-> REPEAT: V:70
 !-> DEFINE SYMBOL  vv = 70
 !-> DEFINE SYMBOL vname = time
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=time_in time
!-> REPEAT: V:71
 !-> DEFINE SYMBOL  vv = 71
 !-> DEFINE SYMBOL vname = lon360
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=lon360_in lon360
!-> REPEAT: V:72
 !-> DEFINE SYMBOL  vv = 72
 !-> DEFINE SYMBOL vname = tmonth
 !-> IF 0 THEN LET vdiff = `v`
 !-> IF 0 THEN EXIT/LOOP
 !-> SET VAR/NAME=tmonth_in tmonth
 
IF `vdiff GT 0` THEN
 !-> IF 0 THEN
ENDIF
 
 
! Which longitude to use for decimating: lon360 or longitude
 
let dlon = minmax(longitude_in[i=@ddf])
let dlon360 = minmax(lon360_in[i=@ddf])
 
IF `abs(dlon[i=@max]) LT abs(dlon360[i=@max])` THEN
 !-> IF 0 THEN
ELSE
   DEFINE SYMBOL lonvar = lon360_in
ENDIF
 
LET sample_pts= piecewise3(($lonvar), latitude_in, fCO2_recommended_in, `control`, `tol1`, `tol2`, `tol3`)
 !-> DEFINE VARIABLE sample_pts= piecewise3(lon360_in, latitude_in, fCO2_recommended_in, 2, 1, 1, 4)
LOAD sample_pts
 
DEFINE SYMBOL output_filename = ($outfile)
 !-> DEFINE SYMBOL output_filename = 492C19881104_dec.nc
 
! File will get all the global attributes
 
set att/out=all .
can mode upcase
 
! Single-point axis for instance direction
! The set axis/name is to make sure Ferret uses lowercase
 
SET AXIS/NAME=traj_in `num_obs_in,RETURN=eaxis`
 !-> SET AXIS/NAME=traj_in trajectory
DEF AXIS/E=1:1:1 traj_def
SET AXIS/NAME=traj traj_def
LET ee = _e[ge=traj]
 
! obs axis for sampled observation variables
 
SET AXIS/NAME=obj_in `longitude_in,RETURN=xaxis`
 !-> SET AXIS/NAME=obj_in obs
LET nsample = `sample_pts[i=@ngd]`
 !-> DEFINE VARIABLE nsample = 23
DEFINE AXIS/x=1:`nsample`:1 obs_def
 !-> DEFINE AXIS/x=1:23:1 obs_def
SET AXIS/NAME=obs obs_def
LET samplevar = sample_pts[gx=obs@asn]
 
! New num_obs variable with number of sampled data
! Make sure it has the right sample_dimension attribute
 
LET/BAD=-99 num_obs = reshape(nsample,ee)
SET ATT/LIKE=num_obs_in num_obs
DEFINE ATT/QUIET/OUTPUT num_obs.sample_dimension = "`num_obs_in.sample_dimension`"
 !-> DEFINE ATT/QUIET/OUTPUT num_obs.sample_dimension = "obs"
SET ATT/OUTPUT=all num_obs
DEFINE SYMBOL num_obs_sampled = `nsample`
 !-> DEFINE SYMBOL num_obs_sampled = 23
 
! write a global attribute with the decimation parameters.
DEFINE ATT/QUIET/OUTPUT ..decimation =  \
"`nobs_full_in` original number of obs. Piecewise decimated to ($num_obs_sampled) obs using tolerances: lon ($tol_lon), lat ($tol_lon), fco2_rec ($tol_var) ($comment)"
 !-> DEFINE ATT/QUIET/OUTPUT ..decimation =  "218 original number of obs. Piecewise decimated to 23 obs using tolerances: lon 1, lat 1, fco2_rec 4  "
 
SAVE/QUIET/FILE="($outfile)"/OUTTYPE=INT/CLOBBER num_obs
 !-> LIST/FORMAT=CDF/QUIET/FILE="492C19881104_dec.nc"/OUTTYPE=INT/CLOBBER num_obs
 
 
! Write the traj variables
 
REPEAT/RANGE=2:`ntraj`/NAME=q (DEFINE SYMBOL qq = `q`;\
DEFINE SYMBOL vname = `varnames_traj[i=($qq)]`;\
DEFINE SYMBOL vtype = `($vname)_in,RETURN=dtype`;\
DEFINE SYMBOL qual = /OUTTYPE=($vtype);\
IF ($vtype"0|CHAR>1|*>0") THEN CAN SYM qual;\
LET ($vname) = ($vname)_in[ge=traj@asn];\
SET ATT/LIKE=($vname)_in ($vname);\
SET ATT/OUTPUT=all ($vname);\
if `strindex("($vtype)", "INT") gt 0` THEN set var/bad=`($vname)_in,return=bad` ($vname);\
SAVE/QUIET/FILE="($outfile)"/APPEND($qual) ($vname))
 !-> REPEAT/RANGE=2:17/NAME=q (DEFINE SYMBOL qq = `q`;DEFINE SYMBOL vname = `varnames_traj[i=($qq)]`;DEFINE SYMBOL vtype = `($vname)_in,RETURN=dtype`;DEFINE SYMBOL qual = /OUTTYPE=($vtype);IF ($vtype"0|CHAR>1|*>0") THEN CAN SYM qual;LET ($vname) = ($vname)_in[ge=traj@asn];SET ATT/LIKE=($vname)_in ($vname);SET ATT/OUTPUT=all ($vname);if `strindex("($vtype)", "INT") gt 0` THEN set var/bad=`($vname)_in,return=bad` ($vname);SAVE/QUIET/FILE="($outfile)"/APPEND($qual) ($vname))
!-> REPEAT: Q:2
 !-> DEFINE SYMBOL qq = 2
 !-> DEFINE SYMBOL vname = expocode
 !-> DEFINE SYMBOL vtype = CHAR
 !-> DEFINE SYMBOL qual = /OUTTYPE=CHAR
 !-> IF 1 THEN CAN SYM qual
 !-> DEFINE VARIABLE expocode = expocode_in[ge=traj@asn]
 !-> SET ATT/LIKE=expocode_in expocode
 !-> SET ATT/OUTPUT=all expocode
 !-> if 0 THEN set var/bad=`expocode_in,return=bad` expocode
 !-> LIST/FORMAT=CDF/QUIET/FILE="492C19881104_dec.nc"/APPEND  expocode
!-> REPEAT: Q:3
 !-> DEFINE SYMBOL qq = 3
 !-> DEFINE SYMBOL vname = dataset_name
 !-> DEFINE SYMBOL vtype = CHAR
 !-> DEFINE SYMBOL qual = /OUTTYPE=CHAR
 !-> IF 1 THEN CAN SYM qual
 !-> DEFINE VARIABLE dataset_name = dataset_name_in[ge=traj@asn]
 !-> SET ATT/LIKE=dataset_name_in dataset_name
 !-> SET ATT/OUTPUT=all dataset_name
 !-> if 0 THEN set var/bad=`dataset_name_in,return=bad` dataset_name
 !-> LIST/FORMAT=CDF/QUIET/FILE="492C19881104_dec.nc"/APPEND  dataset_name
!-> REPEAT: Q:4
 !-> DEFINE SYMBOL qq = 4
 !-> DEFINE SYMBOL vname = vessel_name
 !-> DEFINE SYMBOL vtype = CHAR
 !-> DEFINE SYMBOL qual = /OUTTYPE=CHAR
 !-> IF 1 THEN CAN SYM qual
 !-> DEFINE VARIABLE vessel_name = vessel_name_in[ge=traj@asn]
 !-> SET ATT/LIKE=vessel_name_in vessel_name
 !-> SET ATT/OUTPUT=all vessel_name
 !-> if 0 THEN set var/bad=`vessel_name_in,return=bad` vessel_name
 !-> LIST/FORMAT=CDF/QUIET/FILE="492C19881104_dec.nc"/APPEND  vessel_name
!-> REPEAT: Q:5
 !-> DEFINE SYMBOL qq = 5
 !-> DEFINE SYMBOL vname = organization
 !-> DEFINE SYMBOL vtype = CHAR
 !-> DEFINE SYMBOL qual = /OUTTYPE=CHAR
 !-> IF 1 THEN CAN SYM qual
 !-> DEFINE VARIABLE organization = organization_in[ge=traj@asn]
 !-> SET ATT/LIKE=organization_in organization
 !-> SET ATT/OUTPUT=all organization
 !-> if 0 THEN set var/bad=`organization_in,return=bad` organization
 !-> LIST/FORMAT=CDF/QUIET/FILE="492C19881104_dec.nc"/APPEND  organization
!-> REPEAT: Q:6
 !-> DEFINE SYMBOL qq = 6
 !-> DEFINE SYMBOL vname = geospatial_lon_min
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> DEFINE SYMBOL qual = /OUTTYPE=DOUBLE
 !-> IF 0 THEN CAN SYM qual
 !-> DEFINE VARIABLE geospatial_lon_min = geospatial_lon_min_in[ge=traj@asn]
 !-> SET ATT/LIKE=geospatial_lon_min_in geospatial_lon_min
 !-> SET ATT/OUTPUT=all geospatial_lon_min
 !-> if 0 THEN set var/bad=`geospatial_lon_min_in,return=bad` geospatial_lon_min
 !-> LIST/FORMAT=CDF/QUIET/FILE="492C19881104_dec.nc"/APPEND/OUTTYPE=DOUBLE geospatial_lon_min
!-> REPEAT: Q:7
 !-> DEFINE SYMBOL qq = 7
 !-> DEFINE SYMBOL vname = geospatial_lon_max
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> DEFINE SYMBOL qual = /OUTTYPE=DOUBLE
 !-> IF 0 THEN CAN SYM qual
 !-> DEFINE VARIABLE geospatial_lon_max = geospatial_lon_max_in[ge=traj@asn]
 !-> SET ATT/LIKE=geospatial_lon_max_in geospatial_lon_max
 !-> SET ATT/OUTPUT=all geospatial_lon_max
 !-> if 0 THEN set var/bad=`geospatial_lon_max_in,return=bad` geospatial_lon_max
 !-> LIST/FORMAT=CDF/QUIET/FILE="492C19881104_dec.nc"/APPEND/OUTTYPE=DOUBLE geospatial_lon_max
!-> REPEAT: Q:8
 !-> DEFINE SYMBOL qq = 8
 !-> DEFINE SYMBOL vname = geospatial_lat_min
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> DEFINE SYMBOL qual = /OUTTYPE=DOUBLE
 !-> IF 0 THEN CAN SYM qual
 !-> DEFINE VARIABLE geospatial_lat_min = geospatial_lat_min_in[ge=traj@asn]
 !-> SET ATT/LIKE=geospatial_lat_min_in geospatial_lat_min
 !-> SET ATT/OUTPUT=all geospatial_lat_min
 !-> if 0 THEN set var/bad=`geospatial_lat_min_in,return=bad` geospatial_lat_min
 !-> LIST/FORMAT=CDF/QUIET/FILE="492C19881104_dec.nc"/APPEND/OUTTYPE=DOUBLE geospatial_lat_min
!-> REPEAT: Q:9
 !-> DEFINE SYMBOL qq = 9
 !-> DEFINE SYMBOL vname = geospatial_lat_max
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> DEFINE SYMBOL qual = /OUTTYPE=DOUBLE
 !-> IF 0 THEN CAN SYM qual
 !-> DEFINE VARIABLE geospatial_lat_max = geospatial_lat_max_in[ge=traj@asn]
 !-> SET ATT/LIKE=geospatial_lat_max_in geospatial_lat_max
 !-> SET ATT/OUTPUT=all geospatial_lat_max
 !-> if 0 THEN set var/bad=`geospatial_lat_max_in,return=bad` geospatial_lat_max
 !-> LIST/FORMAT=CDF/QUIET/FILE="492C19881104_dec.nc"/APPEND/OUTTYPE=DOUBLE geospatial_lat_max
!-> REPEAT: Q:10
 !-> DEFINE SYMBOL qq = 10
 !-> DEFINE SYMBOL vname = time_coverage_start
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> DEFINE SYMBOL qual = /OUTTYPE=DOUBLE
 !-> IF 0 THEN CAN SYM qual
 !-> DEFINE VARIABLE time_coverage_start = time_coverage_start_in[ge=traj@asn]
 !-> SET ATT/LIKE=time_coverage_start_in time_coverage_start
 !-> SET ATT/OUTPUT=all time_coverage_start
 !-> if 0 THEN set var/bad=`time_coverage_start_in,return=bad` time_coverage_start
 !-> LIST/FORMAT=CDF/QUIET/FILE="492C19881104_dec.nc"/APPEND/OUTTYPE=DOUBLE time_coverage_start
!-> REPEAT: Q:11
 !-> DEFINE SYMBOL qq = 11
 !-> DEFINE SYMBOL vname = time_converage_end
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> DEFINE SYMBOL qual = /OUTTYPE=DOUBLE
 !-> IF 0 THEN CAN SYM qual
 !-> DEFINE VARIABLE time_converage_end = time_converage_end_in[ge=traj@asn]
 !-> SET ATT/LIKE=time_converage_end_in time_converage_end
 !-> SET ATT/OUTPUT=all time_converage_end
 !-> if 0 THEN set var/bad=`time_converage_end_in,return=bad` time_converage_end
 !-> LIST/FORMAT=CDF/QUIET/FILE="492C19881104_dec.nc"/APPEND/OUTTYPE=DOUBLE time_converage_end
!-> REPEAT: Q:12
 !-> DEFINE SYMBOL qq = 12
 !-> DEFINE SYMBOL vname = investigators
 !-> DEFINE SYMBOL vtype = CHAR
 !-> DEFINE SYMBOL qual = /OUTTYPE=CHAR
 !-> IF 1 THEN CAN SYM qual
 !-> DEFINE VARIABLE investigators = investigators_in[ge=traj@asn]
 !-> SET ATT/LIKE=investigators_in investigators
 !-> SET ATT/OUTPUT=all investigators
 !-> if 0 THEN set var/bad=`investigators_in,return=bad` investigators
 !-> LIST/FORMAT=CDF/QUIET/FILE="492C19881104_dec.nc"/APPEND  investigators
!-> REPEAT: Q:13
 !-> DEFINE SYMBOL qq = 13
 !-> DEFINE SYMBOL vname = socat_version
 !-> DEFINE SYMBOL vtype = CHAR
 !-> DEFINE SYMBOL qual = /OUTTYPE=CHAR
 !-> IF 1 THEN CAN SYM qual
 !-> DEFINE VARIABLE socat_version = socat_version_in[ge=traj@asn]
 !-> SET ATT/LIKE=socat_version_in socat_version
 !-> SET ATT/OUTPUT=all socat_version
 !-> if 0 THEN set var/bad=`socat_version_in,return=bad` socat_version
 !-> LIST/FORMAT=CDF/QUIET/FILE="492C19881104_dec.nc"/APPEND  socat_version
!-> REPEAT: Q:14
 !-> DEFINE SYMBOL qq = 14
 !-> DEFINE SYMBOL vname = all_region_ids
 !-> DEFINE SYMBOL vtype = CHAR
 !-> DEFINE SYMBOL qual = /OUTTYPE=CHAR
 !-> IF 1 THEN CAN SYM qual
 !-> DEFINE VARIABLE all_region_ids = all_region_ids_in[ge=traj@asn]
 !-> SET ATT/LIKE=all_region_ids_in all_region_ids
 !-> SET ATT/OUTPUT=all all_region_ids
 !-> if 0 THEN set var/bad=`all_region_ids_in,return=bad` all_region_ids
 !-> LIST/FORMAT=CDF/QUIET/FILE="492C19881104_dec.nc"/APPEND  all_region_ids
!-> REPEAT: Q:15
 !-> DEFINE SYMBOL qq = 15
 !-> DEFINE SYMBOL vname = socat_doi
 !-> DEFINE SYMBOL vtype = CHAR
 !-> DEFINE SYMBOL qual = /OUTTYPE=CHAR
 !-> IF 1 THEN CAN SYM qual
 !-> DEFINE VARIABLE socat_doi = socat_doi_in[ge=traj@asn]
 !-> SET ATT/LIKE=socat_doi_in socat_doi
 !-> SET ATT/OUTPUT=all socat_doi
 !-> if 0 THEN set var/bad=`socat_doi_in,return=bad` socat_doi
 !-> LIST/FORMAT=CDF/QUIET/FILE="492C19881104_dec.nc"/APPEND  socat_doi
!-> REPEAT: Q:16
 !-> DEFINE SYMBOL qq = 16
 !-> DEFINE SYMBOL vname = qc_flag
 !-> DEFINE SYMBOL vtype = CHAR
 !-> DEFINE SYMBOL qual = /OUTTYPE=CHAR
 !-> IF 1 THEN CAN SYM qual
 !-> DEFINE VARIABLE qc_flag = qc_flag_in[ge=traj@asn]
 !-> SET ATT/LIKE=qc_flag_in qc_flag
 !-> SET ATT/OUTPUT=all qc_flag
 !-> if 0 THEN set var/bad=`qc_flag_in,return=bad` qc_flag
 !-> LIST/FORMAT=CDF/QUIET/FILE="492C19881104_dec.nc"/APPEND  qc_flag
!-> REPEAT: Q:17
 !-> DEFINE SYMBOL qq = 17
 !-> DEFINE SYMBOL vname = nobs_full
 !-> DEFINE SYMBOL vtype = INT4
 !-> DEFINE SYMBOL qual = /OUTTYPE=INT4
 !-> IF 0 THEN CAN SYM qual
 !-> DEFINE VARIABLE nobs_full = nobs_full_in[ge=traj@asn]
 !-> SET ATT/LIKE=nobs_full_in nobs_full
 !-> SET ATT/OUTPUT=all nobs_full
 !-> if 1 THEN set var/bad=`nobs_full_in,return=bad` nobs_full
 !-> set var/bad=-99 nobs_full
 !-> LIST/FORMAT=CDF/QUIET/FILE="492C19881104_dec.nc"/APPEND/OUTTYPE=INT4 nobs_full
 
! add nobs_deci on the same axis
LET/TITLE="`nobs_deci_in,RETURN=title`"/BAD=-99 nobs_deci = ($num_obs_sampled) + 0* nobs_full
 !-> DEFINE VARIABLE/TITLE="Count in decimated trajectory"/BAD=-99 nobs_deci = 23 + 0* nobs_full
DEFINE ATTRIBUTE/OUTPUT/OUTPUT nobs_deci.note = "Piecewise decimated"
SAVE/QUIET/FILE="($outfile)"/APPEND/OUTTYPE=int nobs_deci
 !-> LIST/FORMAT=CDF/QUIET/FILE="492C19881104_dec.nc"/APPEND/OUTTYPE=int nobs_deci
 
! Sample the obs variables. Keep attributes, make missing-data flags match.
 
! Numeric variables
REPEAT/RANGE=1:`nlist`/NAME=q (DEFINE SYMBOL qq = `q`;\
DEFINE SYMBOL vname = `varnames_list[i=($qq)]`;\
IF ($vname"0|sample_number>1|*>0") THEN EXIT/CYCLE;\
DEFINE SYMBOL vtype = `($vname)_in,RETURN=dtype`;\
IF ($vtype"0|CHAR>1|*>0") THEN EXIT/CYCLE;\
LET/BAD=`($vname)_in,RETURN=bad,PREC=9` ($vname) = SAMPLE_FAST_I(($vname)_in, samplevar);\
SET ATT/LIKE=($vname)_in ($vname);\
SET ATT/OUTPUT=all ($vname);\
SAVE/QUIET/APPEND/OUTTYPE=($vtype)/FILE="($outfile)" ($vname);\
)
 !-> REPEAT/RANGE=1:72/NAME=q (DEFINE SYMBOL qq = `q`;DEFINE SYMBOL vname = `varnames_list[i=($qq)]`;IF ($vname"0|sample_number>1|*>0") THEN EXIT/CYCLE;DEFINE SYMBOL vtype = `($vname)_in,RETURN=dtype`;IF ($vtype"0|CHAR>1|*>0") THEN EXIT/CYCLE;LET/BAD=`($vname)_in,RETURN=bad,PREC=9` ($vname) = SAMPLE_FAST_I(($vname)_in, samplevar);SET ATT/LIKE=($vname)_in ($vname);SET ATT/OUTPUT=all ($vname);SAVE/QUIET/APPEND/OUTTYPE=($vtype)/FILE="($outfile)" ($vname);)
!-> REPEAT: Q:1
 !-> DEFINE SYMBOL qq = 1
 !-> DEFINE SYMBOL vname = sample_number
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:2
 !-> DEFINE SYMBOL qq = 2
 !-> DEFINE SYMBOL vname = year
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = INT4
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1 year = SAMPLE_FAST_I(year_in, samplevar)
 !-> SET ATT/LIKE=year_in year
 !-> SET ATT/OUTPUT=all year
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=INT4/FILE="492C19881104_dec.nc" year
!-> REPEAT: Q:3
 !-> DEFINE SYMBOL qq = 3
 !-> DEFINE SYMBOL vname = month
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = INT4
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1 month = SAMPLE_FAST_I(month_in, samplevar)
 !-> SET ATT/LIKE=month_in month
 !-> SET ATT/OUTPUT=all month
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=INT4/FILE="492C19881104_dec.nc" month
!-> REPEAT: Q:4
 !-> DEFINE SYMBOL qq = 4
 !-> DEFINE SYMBOL vname = day
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = INT4
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1 day = SAMPLE_FAST_I(day_in, samplevar)
 !-> SET ATT/LIKE=day_in day
 !-> SET ATT/OUTPUT=all day
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=INT4/FILE="492C19881104_dec.nc" day
!-> REPEAT: Q:5
 !-> DEFINE SYMBOL qq = 5
 !-> DEFINE SYMBOL vname = hour
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = INT4
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1 hour = SAMPLE_FAST_I(hour_in, samplevar)
 !-> SET ATT/LIKE=hour_in hour
 !-> SET ATT/OUTPUT=all hour
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=INT4/FILE="492C19881104_dec.nc" hour
!-> REPEAT: Q:6
 !-> DEFINE SYMBOL qq = 6
 !-> DEFINE SYMBOL vname = minute
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = INT4
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1 minute = SAMPLE_FAST_I(minute_in, samplevar)
 !-> SET ATT/LIKE=minute_in minute
 !-> SET ATT/OUTPUT=all minute
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=INT4/FILE="492C19881104_dec.nc" minute
!-> REPEAT: Q:7
 !-> DEFINE SYMBOL qq = 7
 !-> DEFINE SYMBOL vname = second
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 second = SAMPLE_FAST_I(second_in, samplevar)
 !-> SET ATT/LIKE=second_in second
 !-> SET ATT/OUTPUT=all second
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" second
!-> REPEAT: Q:8
 !-> DEFINE SYMBOL qq = 8
 !-> DEFINE SYMBOL vname = longitude
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 longitude = SAMPLE_FAST_I(longitude_in, samplevar)
 !-> SET ATT/LIKE=longitude_in longitude
 !-> SET ATT/OUTPUT=all longitude
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" longitude
!-> REPEAT: Q:9
 !-> DEFINE SYMBOL qq = 9
 !-> DEFINE SYMBOL vname = latitude
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 latitude = SAMPLE_FAST_I(latitude_in, samplevar)
 !-> SET ATT/LIKE=latitude_in latitude
 !-> SET ATT/OUTPUT=all latitude
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" latitude
!-> REPEAT: Q:10
 !-> DEFINE SYMBOL qq = 10
 !-> DEFINE SYMBOL vname = sample_depth
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 sample_depth = SAMPLE_FAST_I(sample_depth_in, samplevar)
 !-> SET ATT/LIKE=sample_depth_in sample_depth
 !-> SET ATT/OUTPUT=all sample_depth
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" sample_depth
!-> REPEAT: Q:11
 !-> DEFINE SYMBOL qq = 11
 !-> DEFINE SYMBOL vname = sal
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 sal = SAMPLE_FAST_I(sal_in, samplevar)
 !-> SET ATT/LIKE=sal_in sal
 !-> SET ATT/OUTPUT=all sal
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" sal
!-> REPEAT: Q:12
 !-> DEFINE SYMBOL qq = 12
 !-> DEFINE SYMBOL vname = Temperature_equi
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 Temperature_equi = SAMPLE_FAST_I(Temperature_equi_in, samplevar)
 !-> SET ATT/LIKE=Temperature_equi_in Temperature_equi
 !-> SET ATT/OUTPUT=all Temperature_equi
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" Temperature_equi
!-> REPEAT: Q:13
 !-> DEFINE SYMBOL qq = 13
 !-> DEFINE SYMBOL vname = temp
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 temp = SAMPLE_FAST_I(temp_in, samplevar)
 !-> SET ATT/LIKE=temp_in temp
 !-> SET ATT/OUTPUT=all temp
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" temp
!-> REPEAT: Q:14
 !-> DEFINE SYMBOL qq = 14
 !-> DEFINE SYMBOL vname = Temperature_atm
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 Temperature_atm = SAMPLE_FAST_I(Temperature_atm_in, samplevar)
 !-> SET ATT/LIKE=Temperature_atm_in Temperature_atm
 !-> SET ATT/OUTPUT=all Temperature_atm
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" Temperature_atm
!-> REPEAT: Q:15
 !-> DEFINE SYMBOL qq = 15
 !-> DEFINE SYMBOL vname = Pressure_equi
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 Pressure_equi = SAMPLE_FAST_I(Pressure_equi_in, samplevar)
 !-> SET ATT/LIKE=Pressure_equi_in Pressure_equi
 !-> SET ATT/OUTPUT=all Pressure_equi
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" Pressure_equi
!-> REPEAT: Q:16
 !-> DEFINE SYMBOL qq = 16
 !-> DEFINE SYMBOL vname = Pressure_atm
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 Pressure_atm = SAMPLE_FAST_I(Pressure_atm_in, samplevar)
 !-> SET ATT/LIKE=Pressure_atm_in Pressure_atm
 !-> SET ATT/OUTPUT=all Pressure_atm
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" Pressure_atm
!-> REPEAT: Q:17
 !-> DEFINE SYMBOL qq = 17
 !-> DEFINE SYMBOL vname = xCO2_water_equi_temp_dry_ppm
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 xCO2_water_equi_temp_dry_ppm = SAMPLE_FAST_I(xCO2_water_equi_temp_dry_ppm_in, samplevar)
 !-> SET ATT/LIKE=xCO2_water_equi_temp_dry_ppm_in xCO2_water_equi_temp_dry_ppm
 !-> SET ATT/OUTPUT=all xCO2_water_equi_temp_dry_ppm
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" xCO2_water_equi_temp_dry_ppm
!-> REPEAT: Q:18
 !-> DEFINE SYMBOL qq = 18
 !-> DEFINE SYMBOL vname = xCO2_water_sst_dry_ppm
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 xCO2_water_sst_dry_ppm = SAMPLE_FAST_I(xCO2_water_sst_dry_ppm_in, samplevar)
 !-> SET ATT/LIKE=xCO2_water_sst_dry_ppm_in xCO2_water_sst_dry_ppm
 !-> SET ATT/OUTPUT=all xCO2_water_sst_dry_ppm
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" xCO2_water_sst_dry_ppm
!-> REPEAT: Q:19
 !-> DEFINE SYMBOL qq = 19
 !-> DEFINE SYMBOL vname = xCO2_water_equi_temp_wet_ppm
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 xCO2_water_equi_temp_wet_ppm = SAMPLE_FAST_I(xCO2_water_equi_temp_wet_ppm_in, samplevar)
 !-> SET ATT/LIKE=xCO2_water_equi_temp_wet_ppm_in xCO2_water_equi_temp_wet_ppm
 !-> SET ATT/OUTPUT=all xCO2_water_equi_temp_wet_ppm
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" xCO2_water_equi_temp_wet_ppm
!-> REPEAT: Q:20
 !-> DEFINE SYMBOL qq = 20
 !-> DEFINE SYMBOL vname = xCO2_water_sst_wet_ppm
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 xCO2_water_sst_wet_ppm = SAMPLE_FAST_I(xCO2_water_sst_wet_ppm_in, samplevar)
 !-> SET ATT/LIKE=xCO2_water_sst_wet_ppm_in xCO2_water_sst_wet_ppm
 !-> SET ATT/OUTPUT=all xCO2_water_sst_wet_ppm
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" xCO2_water_sst_wet_ppm
!-> REPEAT: Q:21
 !-> DEFINE SYMBOL qq = 21
 !-> DEFINE SYMBOL vname = pCO2_water_equi_temp
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 pCO2_water_equi_temp = SAMPLE_FAST_I(pCO2_water_equi_temp_in, samplevar)
 !-> SET ATT/LIKE=pCO2_water_equi_temp_in pCO2_water_equi_temp
 !-> SET ATT/OUTPUT=all pCO2_water_equi_temp
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" pCO2_water_equi_temp
!-> REPEAT: Q:22
 !-> DEFINE SYMBOL qq = 22
 !-> DEFINE SYMBOL vname = pCO2_water_sst_100humidity_uatm
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 pCO2_water_sst_100humidity_uatm = SAMPLE_FAST_I(pCO2_water_sst_100humidity_uatm_in, samplevar)
 !-> SET ATT/LIKE=pCO2_water_sst_100humidity_uatm_in pCO2_water_sst_100humidity_uatm
 !-> SET ATT/OUTPUT=all pCO2_water_sst_100humidity_uatm
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" pCO2_water_sst_100humidity_uatm
!-> REPEAT: Q:23
 !-> DEFINE SYMBOL qq = 23
 !-> DEFINE SYMBOL vname = fCO2_water_equi_uatm
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 fCO2_water_equi_uatm = SAMPLE_FAST_I(fCO2_water_equi_uatm_in, samplevar)
 !-> SET ATT/LIKE=fCO2_water_equi_uatm_in fCO2_water_equi_uatm
 !-> SET ATT/OUTPUT=all fCO2_water_equi_uatm
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" fCO2_water_equi_uatm
!-> REPEAT: Q:24
 !-> DEFINE SYMBOL qq = 24
 !-> DEFINE SYMBOL vname = fCO2_water_sst_100humidity_uatm
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 fCO2_water_sst_100humidity_uatm = SAMPLE_FAST_I(fCO2_water_sst_100humidity_uatm_in, samplevar)
 !-> SET ATT/LIKE=fCO2_water_sst_100humidity_uatm_in fCO2_water_sst_100humidity_uatm
 !-> SET ATT/OUTPUT=all fCO2_water_sst_100humidity_uatm
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" fCO2_water_sst_100humidity_uatm
!-> REPEAT: Q:25
 !-> DEFINE SYMBOL qq = 25
 !-> DEFINE SYMBOL vname = xCO2_atm_dry_actual
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 xCO2_atm_dry_actual = SAMPLE_FAST_I(xCO2_atm_dry_actual_in, samplevar)
 !-> SET ATT/LIKE=xCO2_atm_dry_actual_in xCO2_atm_dry_actual
 !-> SET ATT/OUTPUT=all xCO2_atm_dry_actual
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" xCO2_atm_dry_actual
!-> REPEAT: Q:26
 !-> DEFINE SYMBOL qq = 26
 !-> DEFINE SYMBOL vname = xCO2_atm_dry_interp
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 xCO2_atm_dry_interp = SAMPLE_FAST_I(xCO2_atm_dry_interp_in, samplevar)
 !-> SET ATT/LIKE=xCO2_atm_dry_interp_in xCO2_atm_dry_interp
 !-> SET ATT/OUTPUT=all xCO2_atm_dry_interp
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" xCO2_atm_dry_interp
!-> REPEAT: Q:27
 !-> DEFINE SYMBOL qq = 27
 !-> DEFINE SYMBOL vname = pCO2_atm_wet_actual
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 pCO2_atm_wet_actual = SAMPLE_FAST_I(pCO2_atm_wet_actual_in, samplevar)
 !-> SET ATT/LIKE=pCO2_atm_wet_actual_in pCO2_atm_wet_actual
 !-> SET ATT/OUTPUT=all pCO2_atm_wet_actual
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" pCO2_atm_wet_actual
!-> REPEAT: Q:28
 !-> DEFINE SYMBOL qq = 28
 !-> DEFINE SYMBOL vname = pCO2_atm_wet_interp
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 pCO2_atm_wet_interp = SAMPLE_FAST_I(pCO2_atm_wet_interp_in, samplevar)
 !-> SET ATT/LIKE=pCO2_atm_wet_interp_in pCO2_atm_wet_interp
 !-> SET ATT/OUTPUT=all pCO2_atm_wet_interp
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" pCO2_atm_wet_interp
!-> REPEAT: Q:29
 !-> DEFINE SYMBOL qq = 29
 !-> DEFINE SYMBOL vname = fCO2_atm_wet_actual
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 fCO2_atm_wet_actual = SAMPLE_FAST_I(fCO2_atm_wet_actual_in, samplevar)
 !-> SET ATT/LIKE=fCO2_atm_wet_actual_in fCO2_atm_wet_actual
 !-> SET ATT/OUTPUT=all fCO2_atm_wet_actual
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" fCO2_atm_wet_actual
!-> REPEAT: Q:30
 !-> DEFINE SYMBOL qq = 30
 !-> DEFINE SYMBOL vname = fCO2_atm_wet_interp
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 fCO2_atm_wet_interp = SAMPLE_FAST_I(fCO2_atm_wet_interp_in, samplevar)
 !-> SET ATT/LIKE=fCO2_atm_wet_interp_in fCO2_atm_wet_interp
 !-> SET ATT/OUTPUT=all fCO2_atm_wet_interp
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" fCO2_atm_wet_interp
!-> REPEAT: Q:31
 !-> DEFINE SYMBOL qq = 31
 !-> DEFINE SYMBOL vname = delta_xCO2
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 delta_xCO2 = SAMPLE_FAST_I(delta_xCO2_in, samplevar)
 !-> SET ATT/LIKE=delta_xCO2_in delta_xCO2
 !-> SET ATT/OUTPUT=all delta_xCO2
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" delta_xCO2
!-> REPEAT: Q:32
 !-> DEFINE SYMBOL qq = 32
 !-> DEFINE SYMBOL vname = delta_pCO2
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 delta_pCO2 = SAMPLE_FAST_I(delta_pCO2_in, samplevar)
 !-> SET ATT/LIKE=delta_pCO2_in delta_pCO2
 !-> SET ATT/OUTPUT=all delta_pCO2
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" delta_pCO2
!-> REPEAT: Q:33
 !-> DEFINE SYMBOL qq = 33
 !-> DEFINE SYMBOL vname = delta_fCO2
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 delta_fCO2 = SAMPLE_FAST_I(delta_fCO2_in, samplevar)
 !-> SET ATT/LIKE=delta_fCO2_in delta_fCO2
 !-> SET ATT/OUTPUT=all delta_fCO2
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" delta_fCO2
!-> REPEAT: Q:34
 !-> DEFINE SYMBOL qq = 34
 !-> DEFINE SYMBOL vname = xH2O_equi
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 xH2O_equi = SAMPLE_FAST_I(xH2O_equi_in, samplevar)
 !-> SET ATT/LIKE=xH2O_equi_in xH2O_equi
 !-> SET ATT/OUTPUT=all xH2O_equi
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" xH2O_equi
!-> REPEAT: Q:35
 !-> DEFINE SYMBOL qq = 35
 !-> DEFINE SYMBOL vname = relative_humidity
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 relative_humidity = SAMPLE_FAST_I(relative_humidity_in, samplevar)
 !-> SET ATT/LIKE=relative_humidity_in relative_humidity
 !-> SET ATT/OUTPUT=all relative_humidity
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" relative_humidity
!-> REPEAT: Q:36
 !-> DEFINE SYMBOL qq = 36
 !-> DEFINE SYMBOL vname = specific_humidity
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 specific_humidity = SAMPLE_FAST_I(specific_humidity_in, samplevar)
 !-> SET ATT/LIKE=specific_humidity_in specific_humidity
 !-> SET ATT/OUTPUT=all specific_humidity
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" specific_humidity
!-> REPEAT: Q:37
 !-> DEFINE SYMBOL qq = 37
 !-> DEFINE SYMBOL vname = ship_speed
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 ship_speed = SAMPLE_FAST_I(ship_speed_in, samplevar)
 !-> SET ATT/LIKE=ship_speed_in ship_speed
 !-> SET ATT/OUTPUT=all ship_speed
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" ship_speed
!-> REPEAT: Q:38
 !-> DEFINE SYMBOL qq = 38
 !-> DEFINE SYMBOL vname = ship_dir
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 ship_dir = SAMPLE_FAST_I(ship_dir_in, samplevar)
 !-> SET ATT/LIKE=ship_dir_in ship_dir
 !-> SET ATT/OUTPUT=all ship_dir
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" ship_dir
!-> REPEAT: Q:39
 !-> DEFINE SYMBOL qq = 39
 !-> DEFINE SYMBOL vname = wind_speed_true
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 wind_speed_true = SAMPLE_FAST_I(wind_speed_true_in, samplevar)
 !-> SET ATT/LIKE=wind_speed_true_in wind_speed_true
 !-> SET ATT/OUTPUT=all wind_speed_true
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" wind_speed_true
!-> REPEAT: Q:40
 !-> DEFINE SYMBOL qq = 40
 !-> DEFINE SYMBOL vname = wind_speed_rel
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 wind_speed_rel = SAMPLE_FAST_I(wind_speed_rel_in, samplevar)
 !-> SET ATT/LIKE=wind_speed_rel_in wind_speed_rel
 !-> SET ATT/OUTPUT=all wind_speed_rel
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" wind_speed_rel
!-> REPEAT: Q:41
 !-> DEFINE SYMBOL qq = 41
 !-> DEFINE SYMBOL vname = wind_dir_true
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 wind_dir_true = SAMPLE_FAST_I(wind_dir_true_in, samplevar)
 !-> SET ATT/LIKE=wind_dir_true_in wind_dir_true
 !-> SET ATT/OUTPUT=all wind_dir_true
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" wind_dir_true
!-> REPEAT: Q:42
 !-> DEFINE SYMBOL qq = 42
 !-> DEFINE SYMBOL vname = wind_dir_rel
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 wind_dir_rel = SAMPLE_FAST_I(wind_dir_rel_in, samplevar)
 !-> SET ATT/LIKE=wind_dir_rel_in wind_dir_rel
 !-> SET ATT/OUTPUT=all wind_dir_rel
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" wind_dir_rel
!-> REPEAT: Q:43
 !-> DEFINE SYMBOL qq = 43
 !-> DEFINE SYMBOL vname = WOCE_CO2_water
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = CHAR
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:44
 !-> DEFINE SYMBOL qq = 44
 !-> DEFINE SYMBOL vname = WOCE_CO2_atm
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = CHAR
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:45
 !-> DEFINE SYMBOL qq = 45
 !-> DEFINE SYMBOL vname = woa_sss
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 woa_sss = SAMPLE_FAST_I(woa_sss_in, samplevar)
 !-> SET ATT/LIKE=woa_sss_in woa_sss
 !-> SET ATT/OUTPUT=all woa_sss
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" woa_sss
!-> REPEAT: Q:46
 !-> DEFINE SYMBOL qq = 46
 !-> DEFINE SYMBOL vname = pressure_ncep_slp
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 pressure_ncep_slp = SAMPLE_FAST_I(pressure_ncep_slp_in, samplevar)
 !-> SET ATT/LIKE=pressure_ncep_slp_in pressure_ncep_slp
 !-> SET ATT/OUTPUT=all pressure_ncep_slp
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" pressure_ncep_slp
!-> REPEAT: Q:47
 !-> DEFINE SYMBOL qq = 47
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm = SAMPLE_FAST_I(fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_in, samplevar)
 !-> SET ATT/LIKE=fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_in fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm
 !-> SET ATT/OUTPUT=all fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm
!-> REPEAT: Q:48
 !-> DEFINE SYMBOL qq = 48
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_sst_dry_ppm
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 fCO2_insitu_from_xCO2_water_sst_dry_ppm = SAMPLE_FAST_I(fCO2_insitu_from_xCO2_water_sst_dry_ppm_in, samplevar)
 !-> SET ATT/LIKE=fCO2_insitu_from_xCO2_water_sst_dry_ppm_in fCO2_insitu_from_xCO2_water_sst_dry_ppm
 !-> SET ATT/OUTPUT=all fCO2_insitu_from_xCO2_water_sst_dry_ppm
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" fCO2_insitu_from_xCO2_water_sst_dry_ppm
!-> REPEAT: Q:49
 !-> DEFINE SYMBOL qq = 49
 !-> DEFINE SYMBOL vname = fCO2_from_pCO2_water_water_equi_temp
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 fCO2_from_pCO2_water_water_equi_temp = SAMPLE_FAST_I(fCO2_from_pCO2_water_water_equi_temp_in, samplevar)
 !-> SET ATT/LIKE=fCO2_from_pCO2_water_water_equi_temp_in fCO2_from_pCO2_water_water_equi_temp
 !-> SET ATT/OUTPUT=all fCO2_from_pCO2_water_water_equi_temp
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" fCO2_from_pCO2_water_water_equi_temp
!-> REPEAT: Q:50
 !-> DEFINE SYMBOL qq = 50
 !-> DEFINE SYMBOL vname = fCO2_from_pCO2_water_sst_100humidity_uatm
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 fCO2_from_pCO2_water_sst_100humidity_uatm = SAMPLE_FAST_I(fCO2_from_pCO2_water_sst_100humidity_uatm_in, samplevar)
 !-> SET ATT/LIKE=fCO2_from_pCO2_water_sst_100humidity_uatm_in fCO2_from_pCO2_water_sst_100humidity_uatm
 !-> SET ATT/OUTPUT=all fCO2_from_pCO2_water_sst_100humidity_uatm
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" fCO2_from_pCO2_water_sst_100humidity_uatm
!-> REPEAT: Q:51
 !-> DEFINE SYMBOL qq = 51
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_fCO2_water_equi_uatm
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 fCO2_insitu_from_fCO2_water_equi_uatm = SAMPLE_FAST_I(fCO2_insitu_from_fCO2_water_equi_uatm_in, samplevar)
 !-> SET ATT/LIKE=fCO2_insitu_from_fCO2_water_equi_uatm_in fCO2_insitu_from_fCO2_water_equi_uatm
 !-> SET ATT/OUTPUT=all fCO2_insitu_from_fCO2_water_equi_uatm
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" fCO2_insitu_from_fCO2_water_equi_uatm
!-> REPEAT: Q:52
 !-> DEFINE SYMBOL qq = 52
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_fCO2_water_sst_100humidty_uatm
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 fCO2_insitu_from_fCO2_water_sst_100humidty_uatm = SAMPLE_FAST_I(fCO2_insitu_from_fCO2_water_sst_100humidty_uatm_in, samplevar)
 !-> SET ATT/LIKE=fCO2_insitu_from_fCO2_water_sst_100humidty_uatm_in fCO2_insitu_from_fCO2_water_sst_100humidty_uatm
 !-> SET ATT/OUTPUT=all fCO2_insitu_from_fCO2_water_sst_100humidty_uatm
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" fCO2_insitu_from_fCO2_water_sst_100humidty_uatm
!-> REPEAT: Q:53
 !-> DEFINE SYMBOL qq = 53
 !-> DEFINE SYMBOL vname = fCO2_from_pCO2_water_water_equi_temp_ncep
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 fCO2_from_pCO2_water_water_equi_temp_ncep = SAMPLE_FAST_I(fCO2_from_pCO2_water_water_equi_temp_ncep_in, samplevar)
 !-> SET ATT/LIKE=fCO2_from_pCO2_water_water_equi_temp_ncep_in fCO2_from_pCO2_water_water_equi_temp_ncep
 !-> SET ATT/OUTPUT=all fCO2_from_pCO2_water_water_equi_temp_ncep
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" fCO2_from_pCO2_water_water_equi_temp_ncep
!-> REPEAT: Q:54
 !-> DEFINE SYMBOL qq = 54
 !-> DEFINE SYMBOL vname = fCO2_from_pCO2_water_sst_100humidity_uatm_ncep
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 fCO2_from_pCO2_water_sst_100humidity_uatm_ncep = SAMPLE_FAST_I(fCO2_from_pCO2_water_sst_100humidity_uatm_ncep_in, samplevar)
 !-> SET ATT/LIKE=fCO2_from_pCO2_water_sst_100humidity_uatm_ncep_in fCO2_from_pCO2_water_sst_100humidity_uatm_ncep
 !-> SET ATT/OUTPUT=all fCO2_from_pCO2_water_sst_100humidity_uatm_ncep
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" fCO2_from_pCO2_water_sst_100humidity_uatm_ncep
!-> REPEAT: Q:55
 !-> DEFINE SYMBOL qq = 55
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_woa
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_woa = SAMPLE_FAST_I(fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_woa_in, samplevar)
 !-> SET ATT/LIKE=fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_woa_in fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_woa
 !-> SET ATT/OUTPUT=all fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_woa
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_woa
!-> REPEAT: Q:56
 !-> DEFINE SYMBOL qq = 56
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_sst_dry_ppm_woa
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 fCO2_insitu_from_xCO2_water_sst_dry_ppm_woa = SAMPLE_FAST_I(fCO2_insitu_from_xCO2_water_sst_dry_ppm_woa_in, samplevar)
 !-> SET ATT/LIKE=fCO2_insitu_from_xCO2_water_sst_dry_ppm_woa_in fCO2_insitu_from_xCO2_water_sst_dry_ppm_woa
 !-> SET ATT/OUTPUT=all fCO2_insitu_from_xCO2_water_sst_dry_ppm_woa
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" fCO2_insitu_from_xCO2_water_sst_dry_ppm_woa
!-> REPEAT: Q:57
 !-> DEFINE SYMBOL qq = 57
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep = SAMPLE_FAST_I(fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep_in, samplevar)
 !-> SET ATT/LIKE=fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep_in fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep
 !-> SET ATT/OUTPUT=all fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep
!-> REPEAT: Q:58
 !-> DEFINE SYMBOL qq = 58
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep = SAMPLE_FAST_I(fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep_in, samplevar)
 !-> SET ATT/LIKE=fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep_in fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep
 !-> SET ATT/OUTPUT=all fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep
!-> REPEAT: Q:59
 !-> DEFINE SYMBOL qq = 59
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep_woa
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep_woa = SAMPLE_FAST_I(fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep_woa_in, samplevar)
 !-> SET ATT/LIKE=fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep_woa_in fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep_woa
 !-> SET ATT/OUTPUT=all fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep_woa
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep_woa
!-> REPEAT: Q:60
 !-> DEFINE SYMBOL qq = 60
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep_woa
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep_woa = SAMPLE_FAST_I(fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep_woa_in, samplevar)
 !-> SET ATT/LIKE=fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep_woa_in fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep_woa
 !-> SET ATT/OUTPUT=all fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep_woa
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep_woa
!-> REPEAT: Q:61
 !-> DEFINE SYMBOL qq = 61
 !-> DEFINE SYMBOL vname = fCO2_recommended
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 fCO2_recommended = SAMPLE_FAST_I(fCO2_recommended_in, samplevar)
 !-> SET ATT/LIKE=fCO2_recommended_in fCO2_recommended
 !-> SET ATT/OUTPUT=all fCO2_recommended
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" fCO2_recommended
!-> REPEAT: Q:62
 !-> DEFINE SYMBOL qq = 62
 !-> DEFINE SYMBOL vname = fCO2_source
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = INT4
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1 fCO2_source = SAMPLE_FAST_I(fCO2_source_in, samplevar)
 !-> SET ATT/LIKE=fCO2_source_in fCO2_source
 !-> SET ATT/OUTPUT=all fCO2_source
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=INT4/FILE="492C19881104_dec.nc" fCO2_source
!-> REPEAT: Q:63
 !-> DEFINE SYMBOL qq = 63
 !-> DEFINE SYMBOL vname = delta_temp
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 delta_temp = SAMPLE_FAST_I(delta_temp_in, samplevar)
 !-> SET ATT/LIKE=delta_temp_in delta_temp
 !-> SET ATT/OUTPUT=all delta_temp
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" delta_temp
!-> REPEAT: Q:64
 !-> DEFINE SYMBOL qq = 64
 !-> DEFINE SYMBOL vname = region_id
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = CHAR
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:65
 !-> DEFINE SYMBOL qq = 65
 !-> DEFINE SYMBOL vname = calc_speed
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 calc_speed = SAMPLE_FAST_I(calc_speed_in, samplevar)
 !-> SET ATT/LIKE=calc_speed_in calc_speed
 !-> SET ATT/OUTPUT=all calc_speed
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" calc_speed
!-> REPEAT: Q:66
 !-> DEFINE SYMBOL qq = 66
 !-> DEFINE SYMBOL vname = etopo2
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 etopo2 = SAMPLE_FAST_I(etopo2_in, samplevar)
 !-> SET ATT/LIKE=etopo2_in etopo2
 !-> SET ATT/OUTPUT=all etopo2
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" etopo2
!-> REPEAT: Q:67
 !-> DEFINE SYMBOL qq = 67
 !-> DEFINE SYMBOL vname = gvCO2
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 gvCO2 = SAMPLE_FAST_I(gvCO2_in, samplevar)
 !-> SET ATT/LIKE=gvCO2_in gvCO2
 !-> SET ATT/OUTPUT=all gvCO2
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" gvCO2
!-> REPEAT: Q:68
 !-> DEFINE SYMBOL qq = 68
 !-> DEFINE SYMBOL vname = dist_to_land
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 dist_to_land = SAMPLE_FAST_I(dist_to_land_in, samplevar)
 !-> SET ATT/LIKE=dist_to_land_in dist_to_land
 !-> SET ATT/OUTPUT=all dist_to_land
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" dist_to_land
!-> REPEAT: Q:69
 !-> DEFINE SYMBOL qq = 69
 !-> DEFINE SYMBOL vname = day_of_year
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 day_of_year = SAMPLE_FAST_I(day_of_year_in, samplevar)
 !-> SET ATT/LIKE=day_of_year_in day_of_year
 !-> SET ATT/OUTPUT=all day_of_year
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" day_of_year
!-> REPEAT: Q:70
 !-> DEFINE SYMBOL qq = 70
 !-> DEFINE SYMBOL vname = time
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 time = SAMPLE_FAST_I(time_in, samplevar)
 !-> SET ATT/LIKE=time_in time
 !-> SET ATT/OUTPUT=all time
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" time
!-> REPEAT: Q:71
 !-> DEFINE SYMBOL qq = 71
 !-> DEFINE SYMBOL vname = lon360
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE/BAD=-1.E+34 lon360 = SAMPLE_FAST_I(lon360_in, samplevar)
 !-> SET ATT/LIKE=lon360_in lon360
 !-> SET ATT/OUTPUT=all lon360
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=DOUBLE/FILE="492C19881104_dec.nc" lon360
!-> REPEAT: Q:72
 !-> DEFINE SYMBOL qq = 72
 !-> DEFINE SYMBOL vname = tmonth
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE SYMBOL vtype = CHAR
 !-> IF 1 THEN EXIT/CYCLE
 
! sample_number will be the sequence number within the decimated data
! We can use this to pick up the pen when drawing lines where the constraints
! (on the decimated set) have skipped data
 
LET/BAD=-1/TITLE="sequence number for decimated dataset" sample_number = i[gx=latitude]
SAVE/QUIET/APPEND/OUTTYPE=INT/FILE="($outfile)" sample_number
 !-> LIST/FORMAT=CDF/QUIET/APPEND/OUTTYPE=INT/FILE="492C19881104_dec.nc" sample_number
 
! Character variables
 
REPEAT/RANGE=1:`nlist`/NAME=q (DEFINE SYMBOL qq = `q`;\
DEFINE SYMBOL vname = `varnames_list[i=($qq)]`;\
DEFINE SYMBOL vtype = `($vname)_in,RETURN=dtype`;\
IF `($vtype"0|CHAR>1|*>0") EQ 0` THEN EXIT/CYCLE;\
LET ($vname)_s = SAMPLEI(($vname)_in, samplevar);\
LET ($vname) = RESHAPE(($vname)_s, x[gx=obs]);\
SET ATT/LIKE=($vname)_in ($vname);\
SET ATT/OUTPUT=all ($vname);\
SAVE/QUIET/APPEND/FILE="($outfile)" ($vname) )
 !-> REPEAT/RANGE=1:72/NAME=q (DEFINE SYMBOL qq = `q`;DEFINE SYMBOL vname = `varnames_list[i=($qq)]`;DEFINE SYMBOL vtype = `($vname)_in,RETURN=dtype`;IF `($vtype"0|CHAR>1|*>0") EQ 0` THEN EXIT/CYCLE;LET ($vname)_s = SAMPLEI(($vname)_in, samplevar);LET ($vname) = RESHAPE(($vname)_s, x[gx=obs]);SET ATT/LIKE=($vname)_in ($vname);SET ATT/OUTPUT=all ($vname);SAVE/QUIET/APPEND/FILE="($outfile)" ($vname) )
!-> REPEAT: Q:1
 !-> DEFINE SYMBOL qq = 1
 !-> DEFINE SYMBOL vname = sample_number
 !-> DEFINE SYMBOL vtype = INT4
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:2
 !-> DEFINE SYMBOL qq = 2
 !-> DEFINE SYMBOL vname = year
 !-> DEFINE SYMBOL vtype = INT4
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:3
 !-> DEFINE SYMBOL qq = 3
 !-> DEFINE SYMBOL vname = month
 !-> DEFINE SYMBOL vtype = INT4
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:4
 !-> DEFINE SYMBOL qq = 4
 !-> DEFINE SYMBOL vname = day
 !-> DEFINE SYMBOL vtype = INT4
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:5
 !-> DEFINE SYMBOL qq = 5
 !-> DEFINE SYMBOL vname = hour
 !-> DEFINE SYMBOL vtype = INT4
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:6
 !-> DEFINE SYMBOL qq = 6
 !-> DEFINE SYMBOL vname = minute
 !-> DEFINE SYMBOL vtype = INT4
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:7
 !-> DEFINE SYMBOL qq = 7
 !-> DEFINE SYMBOL vname = second
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:8
 !-> DEFINE SYMBOL qq = 8
 !-> DEFINE SYMBOL vname = longitude
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:9
 !-> DEFINE SYMBOL qq = 9
 !-> DEFINE SYMBOL vname = latitude
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:10
 !-> DEFINE SYMBOL qq = 10
 !-> DEFINE SYMBOL vname = sample_depth
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:11
 !-> DEFINE SYMBOL qq = 11
 !-> DEFINE SYMBOL vname = sal
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:12
 !-> DEFINE SYMBOL qq = 12
 !-> DEFINE SYMBOL vname = Temperature_equi
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:13
 !-> DEFINE SYMBOL qq = 13
 !-> DEFINE SYMBOL vname = temp
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:14
 !-> DEFINE SYMBOL qq = 14
 !-> DEFINE SYMBOL vname = Temperature_atm
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:15
 !-> DEFINE SYMBOL qq = 15
 !-> DEFINE SYMBOL vname = Pressure_equi
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:16
 !-> DEFINE SYMBOL qq = 16
 !-> DEFINE SYMBOL vname = Pressure_atm
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:17
 !-> DEFINE SYMBOL qq = 17
 !-> DEFINE SYMBOL vname = xCO2_water_equi_temp_dry_ppm
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:18
 !-> DEFINE SYMBOL qq = 18
 !-> DEFINE SYMBOL vname = xCO2_water_sst_dry_ppm
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:19
 !-> DEFINE SYMBOL qq = 19
 !-> DEFINE SYMBOL vname = xCO2_water_equi_temp_wet_ppm
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:20
 !-> DEFINE SYMBOL qq = 20
 !-> DEFINE SYMBOL vname = xCO2_water_sst_wet_ppm
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:21
 !-> DEFINE SYMBOL qq = 21
 !-> DEFINE SYMBOL vname = pCO2_water_equi_temp
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:22
 !-> DEFINE SYMBOL qq = 22
 !-> DEFINE SYMBOL vname = pCO2_water_sst_100humidity_uatm
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:23
 !-> DEFINE SYMBOL qq = 23
 !-> DEFINE SYMBOL vname = fCO2_water_equi_uatm
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:24
 !-> DEFINE SYMBOL qq = 24
 !-> DEFINE SYMBOL vname = fCO2_water_sst_100humidity_uatm
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:25
 !-> DEFINE SYMBOL qq = 25
 !-> DEFINE SYMBOL vname = xCO2_atm_dry_actual
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:26
 !-> DEFINE SYMBOL qq = 26
 !-> DEFINE SYMBOL vname = xCO2_atm_dry_interp
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:27
 !-> DEFINE SYMBOL qq = 27
 !-> DEFINE SYMBOL vname = pCO2_atm_wet_actual
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:28
 !-> DEFINE SYMBOL qq = 28
 !-> DEFINE SYMBOL vname = pCO2_atm_wet_interp
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:29
 !-> DEFINE SYMBOL qq = 29
 !-> DEFINE SYMBOL vname = fCO2_atm_wet_actual
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:30
 !-> DEFINE SYMBOL qq = 30
 !-> DEFINE SYMBOL vname = fCO2_atm_wet_interp
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:31
 !-> DEFINE SYMBOL qq = 31
 !-> DEFINE SYMBOL vname = delta_xCO2
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:32
 !-> DEFINE SYMBOL qq = 32
 !-> DEFINE SYMBOL vname = delta_pCO2
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:33
 !-> DEFINE SYMBOL qq = 33
 !-> DEFINE SYMBOL vname = delta_fCO2
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:34
 !-> DEFINE SYMBOL qq = 34
 !-> DEFINE SYMBOL vname = xH2O_equi
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:35
 !-> DEFINE SYMBOL qq = 35
 !-> DEFINE SYMBOL vname = relative_humidity
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:36
 !-> DEFINE SYMBOL qq = 36
 !-> DEFINE SYMBOL vname = specific_humidity
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:37
 !-> DEFINE SYMBOL qq = 37
 !-> DEFINE SYMBOL vname = ship_speed
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:38
 !-> DEFINE SYMBOL qq = 38
 !-> DEFINE SYMBOL vname = ship_dir
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:39
 !-> DEFINE SYMBOL qq = 39
 !-> DEFINE SYMBOL vname = wind_speed_true
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:40
 !-> DEFINE SYMBOL qq = 40
 !-> DEFINE SYMBOL vname = wind_speed_rel
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:41
 !-> DEFINE SYMBOL qq = 41
 !-> DEFINE SYMBOL vname = wind_dir_true
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:42
 !-> DEFINE SYMBOL qq = 42
 !-> DEFINE SYMBOL vname = wind_dir_rel
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:43
 !-> DEFINE SYMBOL qq = 43
 !-> DEFINE SYMBOL vname = WOCE_CO2_water
 !-> DEFINE SYMBOL vtype = CHAR
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE WOCE_CO2_water_s = SAMPLEI(WOCE_CO2_water_in, samplevar)
 !-> DEFINE VARIABLE WOCE_CO2_water = RESHAPE(WOCE_CO2_water_s, x[gx=obs])
 !-> SET ATT/LIKE=WOCE_CO2_water_in WOCE_CO2_water
 !-> SET ATT/OUTPUT=all WOCE_CO2_water
 !-> LIST/FORMAT=CDF/QUIET/APPEND/FILE="492C19881104_dec.nc" WOCE_CO2_water
!-> REPEAT: Q:44
 !-> DEFINE SYMBOL qq = 44
 !-> DEFINE SYMBOL vname = WOCE_CO2_atm
 !-> DEFINE SYMBOL vtype = CHAR
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE WOCE_CO2_atm_s = SAMPLEI(WOCE_CO2_atm_in, samplevar)
 !-> DEFINE VARIABLE WOCE_CO2_atm = RESHAPE(WOCE_CO2_atm_s, x[gx=obs])
 !-> SET ATT/LIKE=WOCE_CO2_atm_in WOCE_CO2_atm
 !-> SET ATT/OUTPUT=all WOCE_CO2_atm
 !-> LIST/FORMAT=CDF/QUIET/APPEND/FILE="492C19881104_dec.nc" WOCE_CO2_atm
!-> REPEAT: Q:45
 !-> DEFINE SYMBOL qq = 45
 !-> DEFINE SYMBOL vname = woa_sss
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:46
 !-> DEFINE SYMBOL qq = 46
 !-> DEFINE SYMBOL vname = pressure_ncep_slp
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:47
 !-> DEFINE SYMBOL qq = 47
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:48
 !-> DEFINE SYMBOL qq = 48
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_sst_dry_ppm
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:49
 !-> DEFINE SYMBOL qq = 49
 !-> DEFINE SYMBOL vname = fCO2_from_pCO2_water_water_equi_temp
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:50
 !-> DEFINE SYMBOL qq = 50
 !-> DEFINE SYMBOL vname = fCO2_from_pCO2_water_sst_100humidity_uatm
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:51
 !-> DEFINE SYMBOL qq = 51
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_fCO2_water_equi_uatm
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:52
 !-> DEFINE SYMBOL qq = 52
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_fCO2_water_sst_100humidty_uatm
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:53
 !-> DEFINE SYMBOL qq = 53
 !-> DEFINE SYMBOL vname = fCO2_from_pCO2_water_water_equi_temp_ncep
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:54
 !-> DEFINE SYMBOL qq = 54
 !-> DEFINE SYMBOL vname = fCO2_from_pCO2_water_sst_100humidity_uatm_ncep
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:55
 !-> DEFINE SYMBOL qq = 55
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_woa
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:56
 !-> DEFINE SYMBOL qq = 56
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_sst_dry_ppm_woa
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:57
 !-> DEFINE SYMBOL qq = 57
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:58
 !-> DEFINE SYMBOL qq = 58
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:59
 !-> DEFINE SYMBOL qq = 59
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_equi_temp_dry_ppm_ncep_woa
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:60
 !-> DEFINE SYMBOL qq = 60
 !-> DEFINE SYMBOL vname = fCO2_insitu_from_xCO2_water_sst_dry_ppm_ncep_woa
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:61
 !-> DEFINE SYMBOL qq = 61
 !-> DEFINE SYMBOL vname = fCO2_recommended
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:62
 !-> DEFINE SYMBOL qq = 62
 !-> DEFINE SYMBOL vname = fCO2_source
 !-> DEFINE SYMBOL vtype = INT4
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:63
 !-> DEFINE SYMBOL qq = 63
 !-> DEFINE SYMBOL vname = delta_temp
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:64
 !-> DEFINE SYMBOL qq = 64
 !-> DEFINE SYMBOL vname = region_id
 !-> DEFINE SYMBOL vtype = CHAR
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE region_id_s = SAMPLEI(region_id_in, samplevar)
 !-> DEFINE VARIABLE region_id = RESHAPE(region_id_s, x[gx=obs])
 !-> SET ATT/LIKE=region_id_in region_id
 !-> SET ATT/OUTPUT=all region_id
 !-> LIST/FORMAT=CDF/QUIET/APPEND/FILE="492C19881104_dec.nc" region_id
!-> REPEAT: Q:65
 !-> DEFINE SYMBOL qq = 65
 !-> DEFINE SYMBOL vname = calc_speed
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:66
 !-> DEFINE SYMBOL qq = 66
 !-> DEFINE SYMBOL vname = etopo2
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:67
 !-> DEFINE SYMBOL qq = 67
 !-> DEFINE SYMBOL vname = gvCO2
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:68
 !-> DEFINE SYMBOL qq = 68
 !-> DEFINE SYMBOL vname = dist_to_land
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:69
 !-> DEFINE SYMBOL qq = 69
 !-> DEFINE SYMBOL vname = day_of_year
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:70
 !-> DEFINE SYMBOL qq = 70
 !-> DEFINE SYMBOL vname = time
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:71
 !-> DEFINE SYMBOL qq = 71
 !-> DEFINE SYMBOL vname = lon360
 !-> DEFINE SYMBOL vtype = DOUBLE
 !-> IF 1 THEN EXIT/CYCLE
!-> REPEAT: Q:72
 !-> DEFINE SYMBOL qq = 72
 !-> DEFINE SYMBOL vname = tmonth
 !-> DEFINE SYMBOL vtype = CHAR
 !-> IF 0 THEN EXIT/CYCLE
 !-> DEFINE VARIABLE tmonth_s = SAMPLEI(tmonth_in, samplevar)
 !-> DEFINE VARIABLE tmonth = RESHAPE(tmonth_s, x[gx=obs])
 !-> SET ATT/LIKE=tmonth_in tmonth
 !-> SET ATT/OUTPUT=all tmonth
 !-> LIST/FORMAT=CDF/QUIET/APPEND/FILE="492C19881104_dec.nc" tmonth
 
can data/all
can var/all
can sym/all
can axis/all
 
! Dump the contents of the decimated-data DSG file
sp ncdump -h 492C19881104_dec.nc >> all_ncdump.out
