[Thread Prev][Thread Next][Index]

Re: [las_users] Ferret script to return the log of a variable



Hi Todd,
Your question points out a gap in what the Ferret scripts are set up to do. The logic currently assumes that the variable named in the xml is in the dataset, and is just being changed by the init script. They don't allow for a whole new variable to be created as you'e doing. There's no reason they can't do that, and with a little tweaking they will. I'll work this out and send you some new scripts to try, and this improvement will certainly be in the next release.

Otherwise I don't see anything wrong with what you've done. Thanks for writing

Ansley

Todd Viola wrote:
Hello all, I'm trying to solve a simple problem, but I'm afraid I don't have enough experience with Ferret scripting to see where I'm going wrong. I want to display maps and graphs showing the log of my variable (in this case, monthly averaged chlorophyll a), rather than the original variable itself. I've been trying to follow the directions on the two pages below, but keep getting syntax errors.

http://ferret.pmel.noaa.gov/LAS/documentation/installer-documentation/advanced-dataset-configuration/using-init_scripts-for-custom-ferret-behavior
http://ferret.pmel.noaa.gov/FERRET_17sep07/LAS/FAQ/virtual_variables.html

Here's the relevant snippet from my LAS variable XML:

<chlamday name="Chlorophyll a monthly" units="mg m^-3" url="http://oceanwatch.pfeg.noaa.gov/thredds/dodsC/satellite/SW/chla/mday#SWchla";>
           <link match="/lasdata/grids/SW_mday_grid"/>
           <properties>
            <ferret>
             <fill_type>fill</fill_type>
             <do_contour>0</do_contour>
            </ferret>
           </properties>
          </chlamday>
<logchlamday name="Log of Chlorophyll a monthly" units="log, mg m^-3" url="http://oceanwatch.pfeg.noaa.gov/thredds/dodsC/satellite/SW/chla/mday#SWchla";>
           <link match="/lasdata/grids/SW_mday_grid"/>
           <properties>
            <ferret>
<init_script>chlamday-log.jnl</init_script> <fill_type>fill</fill_type>
             <do_contour>0</do_contour>
            </ferret>
           </properties>
          </logchlamday>

And here is the chlamday-log.jnl script I'm trying to use:

SET DATA ($data_url) LET/TITLE="log( Chlorophyll a, mg m^-3 )" logchlamday = log(SWchla)

I'd appreciate any help.

Thanks,
Todd



[Thread Prev][Thread Next][Index]


Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement