Steve, The first thing to do is try to do your contouring in Ferret rather than through LAS so we can isolate the problem. Will Ferret 5.3 give you an XZ contour plot of your data with the following? use ~dataset~For the preceding to work, the dataset must have the following variables defined on the same grid: ~variable~, X, depth_at_sigma. Note that Ferret treats anything in single quotes as case sensitive whereas Ferret is normally case insensitive. If the commands above don't work then we've narrowed things down a lot. If the simple commands above work then I'd try going into the las/server/ directory, making sure you have the same Ferret environment variables as your LAS, copying the /tmp/lasgo31108960517.jnl file to bug_a.jnl and then copying the Ferret command lines from las/server/log/debug to bug.jnl and modify it to reference bug_a.jnl. Then you can start Ferret and run exactly the same session that LAS was running. You will reproduce the same error and can comment out lines in your bug.jnl and bug_a.jnl scripts until you get something that does work. In the process you should find the offending lines in the script and we can figure out what's going wrong from there. Good luck sleuthing this one. -- Jon Steve Cousins wrote: Hi again, I just thought I'd check again to see if anybody has any ideas about being able to customize the draw_2d.tmpl file in LAS 6.3? Is there a reason that this should work in LAS 5 but not in 6? It boils down to this line: [% ELSIF args.view == 'xz' %] [% args.fill_type %]/levels=[% args.fill_levels %]/set [% args.variable_name.0 %],'X',depth_at_sigma where I've added ,'X',depth_at_sigma to the CONTOUR line. The error (all details are below) comes up as: yes? GO "/tmp/lasgo31108960517.jnl" **ERROR: variable unknown or not in data set: 'X' CONTOUR/FILL/levels=30/set no3,'X',depth_at_sigma Command file, command group, or REPEAT execution aborted Thanks, Steve ______________________________________________________________________ Steve Cousins, Ocean Modeling Group Email: cousins@umit.maine.edu Marine Sciences, 208 Libby Hall http://rocky.umeoce.maine.edu Univ. of Maine, Orono, ME 04469 Phone: (207) 581-4302 On Mon, 12 Jul 2004, Steve Cousins wrote:Thanks Joe (and Cyndy). This has allowed me to continue but I now get a different error: LAS Error The following error message was received from LAS: Adding an acceptable error string: "*** NOTE: ". NOAA/PMEL TMAP FERRET v5.53 Linux(g77) 2.4.x - 09/26/03 12-Jul-04 11:46 yes? cancel mode verify yes? cancel mode interp yes? define symbol refmap_xhi = 290.071990966797 yes? define symbol refmap_yhi = 10.030584335327148 yes? define symbol land_type = shade yes? define symbol refmap_xlo = 99.7431030273438 yes? define symbol jnl_t = ARRAY(0x8cde450) yes? define symbol refmap_view = xline yes? define symbol refmap_ylo = 10.030584335327148 yes? define symbol variable_name_0 = no3 yes? define symbol fill_type = fill yes? define symbol jnl_x = ARRAY(0x8cde2c4) yes? define symbol variable_name = ARRAY(0x886064c) yes? define symbol jnl_y = ARRAY(0x8cde3fc) yes? define symbol jnl_z = ARRAY(0x8cde414) yes? define symbol diag_direction = down yes? define symbol dataset_name_0 = /usr2/fer_dsets/descr/pacific-roms-90-01.des yes? define symbol dataset_name = ARRAY(0x8860670) yes? define symbol rank = 2 yes? canc data/all yes? go std_initialize "/usr2/fer_dsets/descr/pacific-roms-90-01.des" "1" "1" "no3" yes? set region/x="99.7431030273438":"290.071990966797"/y="10.030584335327148"/z="1":"20"/l="1":"1" yes? set win/size=.5 yes? GO "/tmp/lasgo31108960517.jnl" **ERROR: variable unknown or not in data set: 'X' CONTOUR/FILL/levels=30/set no3,'X',depth_at_sigma Command file, command group, or REPEAT execution aborted I'm just adding the 'X', and depth_at_sigma variables to the end of the CONTOUR line. 'X' is supposed to refer to the X dimension variable as I understand it. It works this way in LAS 5. Any ideas? Thanks, Steve ______________________________________________________________________ Steve Cousins, Ocean Modeling Group Email: cousins@umit.maine.edu Marine Sciences, 208 Libby Hall http://rocky.umeoce.maine.edu Univ. of Maine, Orono, ME 04469 Phone: (207) 581-4302 On Sun, 11 Jul 2004, Joe McLean wrote:Hi Steve, As of LAS v6.0 template access to args.variable_name refers to an array rather than a string variable . Easy fix though. You'll notice in 'draw_2d.tmpl' which you sent that most references to the variable name are in the following syntax: args.variable_name.0 There is still one place in your template which refers to 'args.variable_name' instead of 'args.variable_name.0'. Make this change and all should be well. Joe --------------------------- [...] ! SDC: Dealing with Sigma (actually S-coordinates in this case) [...] DEFINE AXIS/Z=-5000.0:0.0:10.0/UNIT=meters/DEPTH zdepth ! LET varonsigma= ZAXREPLACE([% args.variable_name%],depth_x_sigma,z[gz=zdepth]) LET varonsigma= ZAXREPLACE([% args.variable_name%],depth_at_sigma,z[gz=zdepth]) LET var_at_depth = varonsigma[ [% args.z_lo %] ] [...] let var_kend = `var_at_depth,RETURN=KEND` [% END %] -------------------------- Steve Cousins wrote:Hi All, In LAS 5 I was able to edit the draw2d.tmpl file to get LAS to show data correctly that is on a curvilinear grid and with Sigma coordinate depth. I'm now trying to get the Sigma depth part to work in LAS 6.3. When I try it though, it produces: ---------------------------------------------------------------------- LAS Error The following error message was received from LAS: Adding an acceptable error string: "*** NOTE: ". NOAA/PMEL TMAP FERRET v5.53 Linux(g77) 2.4.x - 09/26/03 9-Jul-04 18:03 yes? cancel mode verify yes? cancel mode interp yes? define symbol refmap_xhi = 290.0 yes? define symbol refmap_yhi = -17.0 yes? define symbol land_type = shade yes? define symbol refmap_xlo = 100.0 yes? define symbol jnl_t = ARRAY(0x8cde4c4) yes? define symbol refmap_view = xline yes? define symbol refmap_ylo = -17.0 yes? define symbol variable_name_0 = no3 yes? define symbol fill_type = fill yes? define symbol jnl_x = ARRAY(0x8cde488) yes? define symbol variable_name = ARRAY(0x88605dc) yes? define symbol jnl_y = ARRAY(0x8cde4b8) yes? define symbol jnl_z = ARRAY(0x8cde2b4) yes? define symbol diag_direction = down yes? define symbol dataset_name_0 = /juno/usr4/lshi/RESULT_NP_1990_2001_NCEP_daily/NP_avg.001.nc yes? define symbol dataset_name = ARRAY(0x8860600) yes? define symbol rank = 2 yes? canc data/all yes? go std_initialize "/juno/usr4/lshi/RESULT_NP_1990_2001_NCEP_daily/NP_avg.001.nc" "1" "1" "no3" yes? set region/x="100.0":"290.0"/y="-17.0"/z="1":"20"/t="01-Jan-1990":"01-Jan-1990" yes? set win/size=.5 yes? GO "/tmp/lasgo223198511390.jnl" **ERROR: command syntax: ZAXREPLACE(ARRAY(0x88605dc),depth_at_sigma,z[gz=zdepth]) RRAY(0x88 DEFINE VARIABLE varonsigma=ZAXREPLACE(ARRAY(0x88605dc),depth_at_sigma,z[gz=zdepth]) Command file, command group, or REPEAT execution aborted ---------------------------------------------------------------------- The thing that sticks out is the ARRAY(0x88605dc). I hadn't seen this before. The /tmp/lasgo... file looks like: ---------------------------------------------------------------------- can view define view/x=0,1/y=0.25,1 vt define view/x=0.029,.975/y=0,0.25 vb set view vt set MEMORY/SIZE=20.0 DEFINE AXIS/Z=-5000.0:0.0:10.0/UNIT=meters/DEPTH zdepth LET varonsigma=ZAXREPLACE(ARRAY(0x88605cc),depth_at_sigma,z[gz=zdepth]) LET var_at_depth = varonsigma[ ] let var_kend = `var_at_depth,RETURN=KEND` go preplot_setup fill/levels=30/set no3,'X',depth_at_sigma go postplot_setup palette default ppl title,0.15,averaged nitrate (mMol N m-3) ppl fill ppl %range 'PPL$ZMIN' 'PPL$ZMAX' 30 ppl set PPL$RANGE_INC2 'PPL$RANGE_INC' * 2 contour/over/levels=('PPL$RANGE_LOW','PPL$RANGE_HIGH','PPL$RANGE_INC2')/nolabel no3 set view vb ppl origin ,.7 ppl axlen ,2 ---------------------------------------------------------------------- In order to compare it with my LAS 5 server, I put a typo in the draw_2d.tmpl file so the /tmp/lasgo... file would not be deleted. Here is what I get with LAS 5: ---------------------------------------------------------------------- can view define view/x=0,1/y=0.25,1 vt define view/x=0.029,.975/y=0,0.25 vb set view vt set MEMORY/SIZE=20.0 DEFINE AXIS/Z=-5000.0:0.0:10.0/UNIT=meters/DEPTH zdepth LET varonsigma= ZAXREPLACE(temp,depth_at_sigma,z[gz=zdepth]) LET var_at_depth = varonsigma[ ] let var_kend = `var_at_depth,RETURN=KEND` go preplot_setup fill/levels=30/set temp,'X',depth_at_igma go postplot_setup palette default ppl title,0.2,temp ppl fill ppl %range 'PPL$ZMIN' 'PPL$ZMAX' 30 ppl set PPL$RANGE_INC2 'PPL$RANGE_INC' * 2 contour/over/levels=1/nolabel temp,'X',depth_at_sigma set view vb ppl origin ,.7 ppl axlen ,2 ---------------------------------------------------------------------- So you see that it doesn't use ARRAY(0x88605cc) in the ZAXREPLACE line. Is this the problem? Ferret doesn't know what ARRAY(0x88605cc) is? Maybe I'm going down the wrong path. Just to make this email even longer, I'll include the draw_2d.tmpl file: ---------------------------------------------------------------------- [% DEFAULT args.fill_type = 'fill' args.fill_levels = '30' args.palette = 'default' args.do_shade = 1 args.do_contour = 0 args.do_overlay = 0 %] [% IF args.fill_type == 'default'; args.fill_type = 'fill' ; ELSIF args.fill_type == 'none'; args.do_shade = 0 ; END %] ! Support for <contour_levels>none</contour_levels> ! Must be overridden for overlay plots. [% IF args.contour_levels == 'none'; args.do_contour = 0 ; args.contour_levels = '' ; END %] ! NetCDF strides should be used only for XY views ! NetCDF strides should not be used for comparison. [% IF args.view == 'xy' && args.variable_name.0 != 'diff_' && args.variable_name.0 != 'data1_' && args.variable_name.0 != 'data2_' %] go stride_create_symbols [% args.variable_name.0 %] 300 200 [% END %] ! SDC: Dealing with Sigma (actually S-coordinates in this case) [% IF args.view == 'xy' %] [% needz = 'NO' %] [% ELSIF args.view == 'xz' %] [% needz = 'YES' %] [% ELSIF args.view == 'yz' %] [% needz = 'YES' %] [% ELSE %] [% needz = 'NO' %] [% END %] [% IF needz == 'YES' %] set MEMORY/SIZE=20.0 ! let sigma = z[gz=zpos] ! let depth_x_sigma = sigma * depth DEFINE AXIS/Z=-5000.0:0.0:10.0/UNIT=meters/DEPTH zdepth ! LET varonsigma= ZAXREPLACE([% args.variable_name %],depth_x_sigma,z[gz=zdepth]) LET varonsigma= ZAXREPLACE([% args.variable_name %],depth_at_sigma,z[gz=zdepth]) LET var_at_depth = varonsigma[ [% args.z_lo %] ] let var_kend = `var_at_depth,RETURN=KEND` [% END %] [% IF args.do_shade %] go preplot_setup [% IF args.view == 'xy' && args.variable_name.0 != 'diff_' && args.variable_name.0 != 'data1_' && args.variable_name.0 != 'data2_' %] [% args.fill_type %]/levels=[% args.fill_levels %]/set [% args.variable_name.0 %][i=($STRIDE_irange),j=($STRIDE_jrange)] [% ELSIF args.view == 'xz' %] [% args.fill_type %]/levels=[% args.fill_levels %]/set [% args.variable_name.0 %],'X',depth_at_sigma [% ELSIF args.view == 'yz' %] [% args.fill_type %]/levels=[% args.fill_levels %]/set [% args.variable_name.0 %],'Y',depth_at_sigma [% ELSE %] [% args.fill_type %]/levels=[% args.fill_levels %]/set [% args.variable_name.0 %] [% END %] go postplot_setup palette [% args.palette %] [% IF args.title %] ppl title,0.15,[% args.title %] [% END %] [% INCLUDE labels.tmpl args = args %] ppl [% args.fill_type %] [% END %] [% IF args.do_contour %] [% IF args.do_shade %] ppl %range 'PPL$ZMIN' 'PPL$ZMAX' 30 ppl set PPL$RANGE_INC2 'PPL$RANGE_INC' * 2 [% IF ! args.contour_levels %] [% args.contour_levels = "('PPL\$RANGE_LOW','PPL\$RANGE_HIGH','PPL\$RANGE_INC2')" %] [% END %] [% ELSE %] [% IF ! args.contour_levels %] [% args.contour_levels = "20" %] [% END %] [% END %] [% IF args.view == 'xy' && args.variable_name.0 != 'diff_' && args.variable_name.0 != 'data1_' && args.variable_name.0 != 'data2_' %] contour/over/levels=[% args.contour_levels %]/nolabel [% args.variable_name.0 %][i=($STRIDE_irange),j=($STRIDE_jrange)] [% ELSE %] contour/over/levels=[% args.contour_levels %]/nolabel [% args.variable_name.0 %] [% END %] [% END %] [% IF args.do_overlay %] [% IF ! args.contour_levels %] [% args.contour_levels = '20' %] [% END %] [% IF args.view == 'xy' && args.variable_name.0 != 'diff_' && args.variable_name.0 != 'data1_' && args.variable_name.0 != 'data2_' %] contour/over/levels=[% args.contour_levels %]/nolabel [% args.overlay_variable_name.0 %][i=($STRIDE_irange),j=($STRIDE_jrange)] [% ELSE %] contour/over/levels=[% args.contour_levels %]/nolabel [% args.overlay_variable_name.0 %] [% END %] [% END %] ---------------------------------------------------------------------- Unfortunately it doesn't wrap very well. If you want me to just attach it let me know. Can anyone tell me what the problem is? Thanks very much and have a good weekend. Steve ______________________________________________________________________ Steve Cousins, Ocean Modeling Group Email: cousins@umit.maine.edu Marine Sciences, 208 Libby Hall http://rocky.umeoce.maine.edu Univ. of Maine, Orono, ME 04469 Phone: (207) 581-4302 |