[Thread Prev][Thread Next][Index]
Re: virtual variable in LAS
Zhangfan,
There are two problems.
1) Each variable defined in the file jpl_have.xml must have a 'url=...'
attribute.
The 'url=...' attribute may be associated at the <lasdata>, <dataset> or
<variable> level. If no 'url=...' attribute is defined at the variable
level then the variable inherits its url from the next level up -- the
dataset. In your case, no URL is defined at the lasdata or dataset
level and none is defined for the 'u_v' variable. The simple fix is to
define your variable like this:
<u_v units="M/S" name="u v diff"
url="file:/mnt/sde1/datasets/adjoint/
Vave.des>
<link match="/lasdata/grids/jpl_3d_grid_1997_"/>
<properties>
<ferret>
<init_script>u_v_diff_inint</init_script>
</ferret>
</properties>
</u_v>
2) The instructions in the FAQ are a little old. Initialization scripts
need to do more than they used to and should be based on
lasxml/server/jnls/std_initialize.jnl Personally, I would rename your
init script to 'u_v_diff_init.jnl' and fix the reference to it in the
xml. The contents of your journal file should look like this:
! u_v_diff_init.jnl
!
! Based on lasxml/server/jnls/std_initialize.jnl
! 11/01
! Open the files we know we need.
set data "/mnt/sde1/datasets/adjoint/Uave"
set data "/mnt/sde1/datasets/adjoint/Vave"
! We must define var$2_grid for use in differencing.
! This grid must reference a file variable: one that actually
! exists in dataset 'dset' as opposed to a virtual variable
! created with an expression involving other variables.
define grid/like=Uave[d=1] var1_grid_
! Any extra work: defining virtual variables, regridding, etc
! should be done at this time.
let/title="u and v Difference"/units="M/S" u_v = Uave[d=1] - Vave[d=2]
----------------- end of Ferret script -----------------------
I hope that this will allow things to work as usual including
regridding.
-- Jon
Zhangfan Xing wrote:
>
> Jon and friends,
>
> I am trying to create virtual variables with LAS, but get this error:
>
> No 'url' attribute specified for 'var' element at Ferret.pl line 82
>
> The faq http://ferret.wrc.noaa.gov/Ferret/LAS/FAQ/virtual_variables.html
> was followed.
>
> My test site is http://eyre.jpl.nasa.gov/try
> Please check for "u v diff" under first dataset "Assimilation (Adjoint)".
>
> The *.xml and *.jnl files were posted at
> http://eyre.jpl.nasa.gov/download/for-jon/
>
> Thanks,
>
> Zhangfan
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement