NOAA-PMEL / LAS

Live Access Server
https://ferret.pmel.noaa.gov/LAS/
The Unlicense
13 stars 5 forks source link

Error requesting HYCOM animations from PRIDE developmebt server #253

Closed karlmsmith closed 6 years ago

karlmsmith commented 6 years ago

Reported by steven.c.hankin on 14 Sep 2007 17:29 UTC debug URL: http://porter.pmel.noaa.gov:8922/PRIDE/ProductServer.do?xml=%3C%3Fxml+version%3D%221.0%22%3F%3E%3ClasRequest+package%3D%22%22+href%3D%22file%3Alas.xml%22%3E%3Clink+match%3D%22%2Flasdata%2Foperations%2Foperation%5B%40ID%3D%27Animation_2D_XY%27%5D%22+%2F%3E%3Cproperties%3E%3Cferret%3E%3Cview%3Exy%3C%2Fview%3E%3Cformat%3Etxt%3C%2Fformat%3E%3Ccontour_levels+%2F%3E%3Ccontour_style%3Edefault%3C%2Fcontour_style%3E%3Cdeg_min_sec%3Edefault%3C%2Fdeg_min_sec%3E%3Cexpression+%2F%3E%3Cfill_levels%3E150%3C%2Ffill_levels%3E%3Cinterpolate_data%3Efalse%3C%2Finterpolate_data%3E%3Cland_type%3Edefault%3C%2Fland_type%3E%3Cmargins%3Edefault%3C%2Fmargins%3E%3Cmark_grid%3Eno%3C%2Fmark_grid%3E%3Cpalette%3Edefault%3C%2Fpalette%3E%3Cset_aspect%3Edefault%3C%2Fset_aspect%3E%3Csize%3E0.5%3C%2Fsize%3E%3Cuse_graticules%3Edefault%3C%2Fuse_graticules%3E%3C%2Fferret%3E%3C%2Fproperties%3E%3Cargs%3E%3Clink+match%3D%22%2Flasdata%2Fdatasets%2FHYCOM_glb_nrt%2Fvariables%2Ftemperature%22+%2F%3E%3Cregion%3E%3Crange+low%3D%22-100.0%22+type%3D%22x%22+high%3D%22-74.0%22+%2F%3E%3Crange+low%3D%2216.0%22+type%3D%22y%22+high%3D%2233.0%22+%2F%3E%3Cpoint+v%3D%220.%22+type%3D%22z%22+%2F%3E%3Cpoint+v%3D%2201-Apr-2007%22+type%3D%22t%22+%2F%3E%3C%2Fregion%3E%3C%2Fargs%3E%3C%2FlasRequest%3E&debug=debug

==========

An error occurred in the service that was creating your product. Clicking this link will resubmit the product request with debugging turned on. Sending this URL to the LAS administrator is a good way to report the error since the URL contains everything they need to reproduce the error. Copy the URL from the link to the failed product and paste it into the body of a message to the site administrator. Click here to send email to the site administrator. More details about this error.

Cached data cleared from memory **ERROR: invalid command: plot_var , xcoord, ycoord DEFINE SYMBOL imin plot_var , xcoord, ycoord,return=xstart Command file, command group, or REPEAT execution aborted STOP -script mode, ERROR RUNNING SCRIPT statement executed

go "$1" !-> go "/home/porter/jing/tomcat/apache-tomcat-5.5.17/webapps/PRIDE/WEB-INF/classes/resources/ferret/temp/ferret_operation_1189790812613.jnl" ! Symbols from the server DEFINE SYMBOL data_0_ID = temperature DEFINE SYMBOL data_0_dataset_ID = HYCOM_glb_nrt DEFINE SYMBOL data_0_dataset_name = 1/12 Global HYCOM Near Real Time System (APR 2007 - Present) DEFINE SYMBOL data_0_ftds_url = http://porter.pmel.noaa.gov:8922/thredds/dodsC/las/HYCOM_glb_nrt/data__hycom.coaps.fsu.edu_thredds_dodsC_glb_nrt_analysis_HYCOM_initialize_data_temperature.jnl DEFINE SYMBOL data_0_grid_type = regular DEFINE SYMBOL data_0_intervals = xyzt DEFINE SYMBOL data_0_name = Sea Water Potential Temperature DEFINE SYMBOL data_0_points = xyzt DEFINE SYMBOL data_0_region = region_0 DEFINE SYMBOL data_0_title = Sea Water Potential Temperature DEFINE SYMBOL data_0_units = degC DEFINE SYMBOL data_0_url = http://hycom.coaps.fsu.edu/thredds/dodsC/glb_nrt_analysis DEFINE SYMBOL data_0_var = temperature DEFINE SYMBOL data_0_xpath = /lasdata/datasets/HYCOM_glb_nrt/variables/temperature DEFINE SYMBOL data_count = 1 DEFINE SYMBOL ferret_curvi_coord_lat = latitude DEFINE SYMBOL ferret_curvi_coord_lon = longitude DEFINE SYMBOL ferret_fill_levels = 150 DEFINE SYMBOL ferret_fill_type = fill DEFINE SYMBOL ferret_format = txt DEFINE SYMBOL ferret_init_script = HYCOM_initialize_data DEFINE SYMBOL ferret_interpolate_data = false DEFINE SYMBOL ferret_land_type = contour DEFINE SYMBOL ferret_mark_grid = no DEFINE SYMBOL ferret_palette = ocean_temp DEFINE SYMBOL ferret_service_action = Data_Extract_Frames DEFINE SYMBOL ferret_size = 0.5 DEFINE SYMBOL ferret_view = xy DEFINE SYMBOL las_debug = debug DEFINE SYMBOL operation_ID = Animation_2D_XY DEFINE SYMBOL operation_key = 5F1D7BE96D0F651DB432B333A8660033 DEFINE SYMBOL operation_name = Animation DEFINE SYMBOL operation_service = ferret DEFINE SYMBOL operation_service_action = Data_Extract_Frames DEFINE SYMBOL product_server_0_ps_timeout = 3600 DEFINE SYMBOL product_server_0_ui_timeout = 20 DEFINE SYMBOL product_server_0_use_cache = true DEFINE SYMBOL region_0_t_hi = 01-Apr-2007 DEFINE SYMBOL region_0_t_lo = 01-Apr-2007 DEFINE SYMBOL region_0_x_hi = -74.0 DEFINE SYMBOL region_0_x_lo = -100.0 DEFINE SYMBOL region_0_y_hi = 33.0 DEFINE SYMBOL region_0_y_lo = 16.0 DEFINE SYMBOL region_0_z_hi = 0. DEFINE SYMBOL region_0_z_lo = 0. DEFINE SYMBOL result_count = 3 DEFINE SYMBOL result_debug_ID = debug DEFINE SYMBOL result_debug_filename = /home/porter/jing/tomcat/tomcat/webapps/PRIDE/output/5F1D7BE96D0F651DB432B333A8660033_debug.txt DEFINE SYMBOL result_debug_type = debug DEFINE SYMBOL result_ferret_listing_ID = ferret_listing DEFINE SYMBOL result_ferret_listing_filename = /home/porter/jing/tomcat/tomcat/webapps/PRIDE/output/5F1D7BE96D0F651DB432B333A8660033_ferret_listing.xml DEFINE SYMBOL result_ferret_listing_type = xml DEFINE SYMBOL result_rss_ID = rss DEFINE SYMBOL result_rss_filename = /home/porter/jing/tomcat/tomcat/webapps/PRIDE/output/1A14059BD3E17A4E79B48F88473300DA_rss.rss DEFINE SYMBOL result_rss_type = rss GO ($operation_service_action) !-> GO Data_Extract_Frames !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! $Author: rhs $ ! ! Extracting to a netCDF file and some text and table files have different ! options in the UI. Need to separate them at this level to keep the UI ! happy. All the Data_Extract* scripts launch the same list_data.jnl script. GO list_frames !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! $RCSfile: list_frames.jnl,v $ ! ! $Author: Jing Y. Li $ ! $Date: 2007/08/22 ! ! list_frames.jnl creates a listing in XML format for animation ! Assumes symbol ferret_listing is the output file. ! The listing file includes: ! - fill_levels for 2D contour ! - dep_axis_scale for 1D plot ! - hasT used to determine if the dataset has time axis ! - units units of the time axis ! - resolution resolution of time frames ! - frames list of each individual time points

GO LAS_initialize_region 0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! $RCSfile: LAS_initialize_region.jnl,v $ ! $Revision: 1.1 $ ! ! $Author: ansley $ ! $Date: 2006/07/06 17:54:11 $ ! ! The LAS_initializeregion.jnl script defines the following symbols ! based on the region associated with data#: ! ! region_~lo/hi -- lo and hi points on a given axis ! region~range -- numeric range on a given axis ! region~ -- domain in 'lo:hi' notation ! region_full -- synonym for 'region_xyzt'

! Incoming argument determines which region to use ! The default number is 0, and the default region is region0. ! If we are making only a map, then there are no data symbols ! defined, so data_0_region is not set, but we can define region ! as region_0.

DEFINE SYMBOL num ($1"0") !-> DEFINE SYMBOL num 0 DEFINE SYMBOL regionname data($num)_region !-> DEFINE SYMBOL region_name data_0_region DEFINE SYMBOL region ($($region_name)"region_0") !-> DEFINE SYMBOL region region_0

! Cancel any previously set limits or region symbols

CANCEL SYMBOL limits_x CANCEL SYMBOL limits_y CANCEL SYMBOL limits_z CANCEL SYMBOL limits_t CANCEL SYMBOL region_x CANCEL SYMBOL region_y CANCEL SYMBOL region_z CANCEL SYMBOL region_t CANCEL SYMBOL region_xy CANCEL SYMBOL region_xz CANCEL SYMBOL region_xt CANCEL SYMBOL region_yz CANCEL SYMBOL region_yt CANCEL SYMBOL region_zt CANCEL SYMBOL region_xyz CANCEL SYMBOL region_xyt CANCEL SYMBOL region_xzt CANCEL SYMBOL region_yzt CANCEL SYMBOL region_xyzt CANCEL SYMBOL region_full

! NOTE: Occasionally the LAS applet will send in a longitude or latitude ! NOTE: that looks like "24.400000000000002". Such long, numerically ! NOTE: irrelevant numbers can overflow Ferret's maximum symbol length. ! NOTE: Rounding longitudes and latitudes to the nearest .00001 seems ! NOTE: reasonable for all but the most detailed datasets.

! NOTE: 'region_x_m360' and 'region_x_p360' are used for those visualizations ! NOTE: where Ferret doesn't auomatically deal with the modulo nature of ! NOTE: longitude and allow the script writer to deal with this manually.

IF ($($region)_x_lo"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_x_lo = `INT(100000 ($($region)_x_lo)) / 100000 !-> DEFINE SYMBOL region_x_lo = -100 DEFINE SYMBOL region_x_hi =INT(100000 * ($($region)_x_hi)) / 100000 !-> DEFINE SYMBOL region_x_hi = -74 DEFINE SYMBOL limits_x = ($region_x_lo):($region_x_hi) !-> DEFINE SYMBOL limits_x = -100:-74 DEFINE SYMBOL limits_x_m360 =($region_x_lo)-360:($region_x_hi)-360 !-> DEFINE SYMBOL limits_x_m360 = -460:-434 DEFINE SYMBOL limits_x_p360 =($region_x_lo)+360:($region_x_hi)+360 !-> DEFINE SYMBOL limits_x_p360 = 260:286 DEFINE SYMBOL region_x = X=($region_x_lo):($region_x_hi) !-> DEFINE SYMBOL region_x = X=-100:-74 DEFINE SYMBOL region_x_m360 X=($region_x_lo)-360:($region_x_hi)-360 !-> DEFINE SYMBOL region_x_m360 X=-460:-434 DEFINE SYMBOL region_x_p360 X=($region_x_lo)+360:($region_x_hi)+360 !-> DEFINE SYMBOL region_x_p360 X=260:286 IF($region_x_hi) GE ($region_x_lo)THEN !-> IF 1 THEN DEFINE SYMBOL region_x_range =($region_x_hi) - ($region_x_lo)` !-> DEFINE SYMBOL region_x_range = 26 ELSE ENDIF ENDIF

IF ($($region)_y_lo"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_y_lo = `INT(1000 ($($region)_y_lo)) / 1000 !-> DEFINE SYMBOL region_y_lo = 16 DEFINE SYMBOL region_y_hi =INT(1000 * ($($region)_y_hi)) / 1000 !-> DEFINE SYMBOL region_y_hi = 33 DEFINE SYMBOL limits_y = ($region_y_lo):($region_y_hi) !-> DEFINE SYMBOL limits_y = 16:33 DEFINE SYMBOL region_y = Y=($region_y_lo):($region_y_hi) !-> DEFINE SYMBOL region_y = Y=16:33 IF($region_y_hi) GE ($region_y_lo)THEN !-> IF 1 THEN DEFINE SYMBOL region_y_range =($region_y_hi) - ($region_y_lo)` !-> DEFINE SYMBOL region_y_range = 17 ELSE ENDIF ENDIF

IF ($($region)_z_lo"0|*>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_z_lo = ($($region)_z_lo) !-> DEFINE SYMBOL region_z_lo = 0. DEFINE SYMBOL region_z_hi = ($($region)_z_hi) !-> DEFINE SYMBOL region_z_hi = 0. DEFINE SYMBOL limits_z = ($region_z_lo):($region_z_hi) !-> DEFINE SYMBOL limits_z = 0.:0. DEFINE SYMBOL region_z = Z=($region_z_lo):($region_z_hi) !-> DEFINE SYMBOL region_z = Z=0.:0. IF ($region_z_hi) GE ($region_z_lo) THEN !-> IF 1 THEN DEFINE SYMBOL region_z_range = ($region_z_hi) - ($region_z_lo) !-> DEFINE SYMBOL region_z_range = 0 ELSE ENDIF ENDIF

! NOTE: Normally we use 'DEFINE SYMBOL ~ = ...' ! NOTE: For the time axis we use 'DEFINE SYMBOL ~ ...' because the Ferret ! NOTE: parser complains about unmatched quotes if we do it the other way.

IF ($($region)_t_lo"0|*>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_t_lo = ($($region)_t_lo) !-> DEFINE SYMBOL region_t_lo = 01-Apr-2007 DEFINE SYMBOL region_t_hi = ($($region)_t_hi) !-> DEFINE SYMBOL region_t_hi = 01-Apr-2007 DEFINE SYMBOL limits_t \"($region_t_lo)\":\"($region_t_hi)\" !-> DEFINE SYMBOL limits_t \"01-Apr-2007\":\"01-Apr-2007\" DEFINE SYMBOL region_t T=\"($region_t_lo)\":\"($region_t_hi)\" !-> DEFINE SYMBOL region_t T=\"01-Apr-2007\":\"01-Apr-2007\" ENDIF

! Now build up all possible multi-axis regions, being careful not to use ! commas when a region is missing

! region_xy IF ($region_x"0|>1") THEN !-> IF 1 THEN IF ($region_y"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_xy = ($region_x); INSERT INTO "ticket" VALUES ($region_y) !-> DEFINE SYMBOL region_xy = X=-100:-74,Y=16:33 ELSE ENDIF ELSE ENDIF ENDIF

! region_xz IF ($region_x"0|>1") THEN !-> IF 1 THEN IF ($region_z"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_xz = ($region_x); INSERT INTO "ticket" VALUES ($region_z) !-> DEFINE SYMBOL region_xz = X=-100:-74,Z=0.:0. ELSE ENDIF ELSE ENDIF ENDIF

! region_xt IF ($region_x"0|>1") THEN !-> IF 1 THEN IF ($region_t"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_xt = ($region_x); INSERT INTO "ticket" VALUES ($region_t) !-> DEFINE SYMBOL region_xt = X=-100:-74,T="01-Apr-2007":"01-Apr-2007" ELSE ENDIF ELSE ENDIF ENDIF

! region_yz IF ($region_y"0|>1") THEN !-> IF 1 THEN IF ($region_z"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_yz = ($region_y); INSERT INTO "ticket" VALUES ($region_z) !-> DEFINE SYMBOL region_yz = Y=16:33,Z=0.:0. ELSE ENDIF ELSE ENDIF ENDIF

! region_yt IF ($region_y"0|>1") THEN !-> IF 1 THEN IF ($region_t"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_yt = ($region_y); INSERT INTO "ticket" VALUES ($region_t) !-> DEFINE SYMBOL region_yt = Y=16:33,T="01-Apr-2007":"01-Apr-2007" ELSE ENDIF ELSE ENDIF ENDIF

! region_zt IF ($region_z"0|>1") THEN !-> IF 1 THEN IF ($region_t"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_zt = ($region_z); INSERT INTO "ticket" VALUES ($region_t) !-> DEFINE SYMBOL region_zt = Z=0.:0.,T="01-Apr-2007":"01-Apr-2007" ELSE ENDIF ELSE ENDIF ENDIF

! region_xyz IF ($region_xy"0|>1") THEN !-> IF 1 THEN IF ($region_z"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_xyz = ($region_xy); INSERT INTO "ticket" VALUES ($region_z) !-> DEFINE SYMBOL region_xyz = X=-100:-74,Y=16:33,Z=0.:0. ELSE ENDIF ELSE ENDIF ENDIF

! region_xyt IF ($region_xy"0|>1") THEN !-> IF 1 THEN IF ($region_t"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_xyt = ($region_xy); INSERT INTO "ticket" VALUES ($region_t) !-> DEFINE SYMBOL region_xyt = X=-100:-74,Y=16:33,T="01-Apr-2007":"01-Apr-2007" ELSE ENDIF ELSE ENDIF ENDIF

! region_yzt IF ($region_yz"0|>1") THEN !-> IF 1 THEN IF ($region_t"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_yzt = ($region_yz); INSERT INTO "ticket" VALUES ($region_t) !-> DEFINE SYMBOL region_yzt = Y=16:33,Z=0.:0.,T="01-Apr-2007":"01-Apr-2007" ELSE ENDIF ELSE ENDIF ENDIF

! region_xyzt IF ($region_xyz"0|>1") THEN !-> IF 1 THEN IF ($region_t"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_xyzt = ($region_xyz); INSERT INTO "ticket" VALUES ($region_t) !-> DEFINE SYMBOL region_xyzt = X=-100:-74,Y=16:33,Z=0.:0.,T="01-Apr-2007":"01-Apr-2007" ELSE ENDIF ELSE ENDIF ENDIF

DEFINE SYMBOL region_full = ($region_xyzt) !-> DEFINE SYMBOL region_full = X=-100:-74,Y=16:33,Z=0.:0.,T="01-Apr-2007":"01-Apr-2007"

! If no regions have been defined then we have an error.

IF ($region_full"1|*>0") THEN !-> IF 0 THEN ENDIF

! End of LAS_initialize_region.jnl ------------------------------------------------------

GO LAS_initialize_data 0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! $RCSfile: LAS_initialize_data.jnl,v $ ! $Revision: 1.2 $ ! ! $Author: ansley $ ! $Date: 2007/29/2007 ! ! The LAS_initialize_data.jnl script takes care of everything having to ! do with initializing a datset for later use. ! ! LAS_initialize_data.jnl takes an argument that specifies which data ! item [0|1|2|3|...] to create symbols for. ! ! 3/2007: ! split up previous version of LAS_initialize_data.jnl into two; ! initialize the dataset and define the plot (or output listing) variable. ! This allows the custom init scripts to call LAS_initialize_dataset, then ! issue commands for the customization, then call LAS_initialize_variable ! ! 8/2007: ! The custom init scripts now consist of only SET DATA and the custom commands. ! This lets F-TDS run first and call the init script to create the data set ! that will be used by the Ferret product script. When F-TDS is done it will ! not send the symbol ferret_init_script to the product scripts so we will just skip ! that step. ! ! 8/2007: ! Some of the custom init scripts previously contained commands like SET MEMORY ! or SET MODE which are intended to be executed by the product script These need ! to be separated from commands for fixing grids or regridding which are executed ! prior to the product script being run by F-TDS. These commands are to be specified ! in the dataset configuration as ferret_init_commands, whose the value is a set ! of Ferret commands separated by semicolons. ! GO LAS_initialize_dataset ($1"0") !-> GO LAS_initialize_dataset 0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! $RCSfile: LAS_initialize_dataset.jnl

! This is the first part of LAS_initialize_data.jnl used for standard and ! customized init scripts

! $Author: ansley, jing ! $Date: 2007/29/2007

! 6/29/2007 ! Allow for data_0_units or data_1_units etc to be defined a null string or a ! string containing a single space. If data_0_units is either undefined or is ! one of these blank strings, then use the attnames syntax to see if the dataset ! variable has units defined, and if so define the data_units symbol from that.

! The LAS_initialize_data.jnl script takes care of everything having to ! do with initializing a datset for later use. ! ! LAS_initialize_data.jnl takes an argument that specifies which data ! item [0|1|2|3|...] to create symbols for.

!ACM_note: if we use a loop in the plot routine, we are not ! limited to 9 data items ! DEFINE SYMBOL num ($1"0|0|1|2|3|4|5|6|7|8|9") DEFINE SYMBOL num ($1"0") !-> DEFINE SYMBOL num 0

! TODO: It would be nice if the java code removed this dependency upon ! TODO: whether an operation was 'chained' or not.

! Check whether the source data was part of a 'chained' operation. !ACM note: How does this jibe with what I do below changing data_url to data_num??

IF ($data_($num)_chained"0|1|*>1) THEN !-> IF 0 THEN ELSE DEFINE SYMBOL dataurl \"($data($num)_url)\" !-> DEFINE SYMBOL data_url \"http://hycom.coaps.fsu.edu/thredds/dodsC/glb_nrt_analysis\" ENDIF

IF ($data_($num)_var"0|>1") THEN DEFINE SYMBOL datavar ($data($num)_var) !-> IF 1 THEN DEFINE SYMBOL data_var temperature !-> DEFINE SYMBOL datavar temperature IF ($data($num)_units"0|>1") THEN DEFINE SYMBOL dataunits (($data($num)_units)) !-> IF 1 THEN DEFINE SYMBOL data_units (degC) !-> DEFINE SYMBOL data_units (degC)

! Do not define dataunits with an empty string IF ($data($num)_units%1|"">1|>0%) THEN CANCEL SYMBOL data_units !-> IF 0 THEN CANCEL SYMBOL dataunits IF ($data($num)_units%1|" ">1|>0%) THEN CANCEL SYMBOL data_units !-> IF 0 THEN CANCEL SYMBOL data_units

IF ($data_($num)name"0|1|*>1) THEN !-> IF 1 THEN IF ($data($num)_title"0|*>1") THEN DEFINE SYMBOL datatitle ($data($num)_title) !-> IF 1 THEN DEFINE SYMBOL data_title Sea Water Potential Temperature !-> DEFINE SYMBOL data_title Sea Water Potential Temperature ELSE ENDIF

DEFINE SYMBOL ferret_plot_title "($data_title) ($data_units)" !-> DEFINE SYMBOL ferret_plot_title "Sea Water Potential Temperature (degC)"

! TODO: Use new error features in Ferret to turn off STDERR and check ! TODO: for Ferret error symbols to see if the SET DATA command actually worked.

! SET DATA and check for errors

SET DATA ($data_url) !-> SET DATA "http://hycom.coaps.fsu.edu/thredds/dodsC/glb_nrt_analysis"

IF ($fer_last_error"0|*>1") THEN !-> IF 0 THEN ENDIF DEFINE SYMBOL data_num = ($data_var),return=dsetnum !-> DEFINE SYMBOL data_num = 1

! Be sure units and title are defined. ! If units are not defined, try to get units from the data variable. ! If the variable in the file has no units, leave data_units symbol undefined.

LET anames = ($data_var).attnames !-> DEFINE VARIABLE anames = temperature.attnames IF IS_ELEMENT_OF_STR (anames, "units") OR IS_ELEMENT_OF_STR (anames, "UNITS") THEN !-> IF 1 THEN DEFINE SYMBOL data_var_units ($data_var),RETURN=units !-> DEFINE SYMBOL data_var_units degC DEFINE SYMBOL data_units (($data_var),RETURN=units) !-> DEFINE SYMBOL data_units (degC) ENDIF

DEFINE SYMBOL ferret_plot_title "($data_title) ($data_units)" !-> DEFINE SYMBOL ferret_plot_title "Sea Water Potential Temperature (degC)"

IF ($data_title"0|*>1") EQ 0 THEN !-> IF 0 THEN ENDIF

! End of $RCSfile ------------LAS_initialize_dataset.jnl--------------------------

IF ($ferret_init_script"0|*>1") THEN GO ($ferret_init_script) ($1"0") !-> IF 1 THEN GO HYCOM_initialize_data 0 !-> GO HYCOM_initialize_data 0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! HYCOM_initialize_data.jnl ! $Revision:$ ! ! $Author:$ ! $Date:$

GO LAS_initialize_dataset ($1"0") !-> GO LAS_initialize_dataset 0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! $RCSfile: LAS_initialize_dataset.jnl

! This is the first part of LAS_initialize_data.jnl used for standard and ! customized init scripts

! $Author: ansley, jing ! $Date: 2007/29/2007

! 6/29/2007 ! Allow for data_0_units or data_1_units etc to be defined a null string or a ! string containing a single space. If data_0_units is either undefined or is ! one of these blank strings, then use the attnames syntax to see if the dataset ! variable has units defined, and if so define the data_units symbol from that.

! The LAS_initialize_data.jnl script takes care of everything having to ! do with initializing a datset for later use. ! ! LAS_initialize_data.jnl takes an argument that specifies which data ! item [0|1|2|3|...] to create symbols for.

!ACM_note: if we use a loop in the plot routine, we are not ! limited to 9 data items ! DEFINE SYMBOL num ($1"0|0|1|2|3|4|5|6|7|8|9") DEFINE SYMBOL num ($1"0") !-> DEFINE SYMBOL num 0

! TODO: It would be nice if the java code removed this dependency upon ! TODO: whether an operation was 'chained' or not.

! Check whether the source data was part of a 'chained' operation. !ACM note: How does this jibe with what I do below changing data_url to data_num??

IF ($data_($num)_chained"0|1|*>1) THEN !-> IF 0 THEN ELSE DEFINE SYMBOL dataurl \"($data($num)_url)\" !-> DEFINE SYMBOL data_url \"http://hycom.coaps.fsu.edu/thredds/dodsC/glb_nrt_analysis\" ENDIF

IF ($data_($num)_var"0|>1") THEN DEFINE SYMBOL datavar ($data($num)_var) !-> IF 1 THEN DEFINE SYMBOL data_var temperature !-> DEFINE SYMBOL datavar temperature IF ($data($num)_units"0|>1") THEN DEFINE SYMBOL dataunits (($data($num)_units)) !-> IF 1 THEN DEFINE SYMBOL data_units (degC) !-> DEFINE SYMBOL data_units (degC)

! Do not define dataunits with an empty string IF ($data($num)_units%1|"">1|>0%) THEN CANCEL SYMBOL data_units !-> IF 0 THEN CANCEL SYMBOL dataunits IF ($data($num)_units%1|" ">1|>0%) THEN CANCEL SYMBOL data_units !-> IF 0 THEN CANCEL SYMBOL data_units

IF ($data_($num)name"0|1|*>1) THEN !-> IF 1 THEN IF ($data($num)_title"0|*>1") THEN DEFINE SYMBOL datatitle ($data($num)_title) !-> IF 1 THEN DEFINE SYMBOL data_title Sea Water Potential Temperature !-> DEFINE SYMBOL data_title Sea Water Potential Temperature ELSE ENDIF

DEFINE SYMBOL ferret_plot_title "($data_title) ($data_units)" !-> DEFINE SYMBOL ferret_plot_title "Sea Water Potential Temperature (degC)"

! TODO: Use new error features in Ferret to turn off STDERR and check ! TODO: for Ferret error symbols to see if the SET DATA command actually worked.

! SET DATA and check for errors

SET DATA ($data_url) !-> SET DATA "http://hycom.coaps.fsu.edu/thredds/dodsC/glb_nrt_analysis"

IF ($fer_last_error"0|*>1") THEN !-> IF 0 THEN ENDIF DEFINE SYMBOL data_num = ($data_var),return=dsetnum !-> DEFINE SYMBOL data_num = 1

! Be sure units and title are defined. ! If units are not defined, try to get units from the data variable. ! If the variable in the file has no units, leave data_units symbol undefined.

LET anames = ($data_var).attnames !-> DEFINE VARIABLE anames = temperature.attnames IF IS_ELEMENT_OF_STR (anames, "units") OR IS_ELEMENT_OF_STR (anames, "UNITS") THEN !-> IF 1 THEN DEFINE SYMBOL data_var_units ($data_var),RETURN=units !-> DEFINE SYMBOL data_var_units degC DEFINE SYMBOL data_units (($data_var),RETURN=units) !-> DEFINE SYMBOL data_units (degC) ENDIF

DEFINE SYMBOL ferret_plot_title "($data_title) ($data_units)" !-> DEFINE SYMBOL ferret_plot_title "Sea Water Potential Temperature (degC)"

IF ($data_title"0|*>1") EQ 0 THEN !-> IF 0 THEN ENDIF

! End of $RCSfile ------------LAS_initialize_dataset.jnl--------------------------

! Define the plot variable. For comparison plots, we want to save the dataset number ! for each dataset.

DEFINE SYMBOL data_num = ($data_var),return=dsetnum !-> DEFINE SYMBOL datanum = 1 DEFINE SYMBOL data($num)_num = ($data_var),return=dsetnum !-> DEFINE SYMBOL data_0_num = 1

DEFINE SYMBOL ferret_plot_var = ($data_var)[d=($data_num); INSERT INTO "ticket" VALUES ($region_full)] !-> DEFINE SYMBOL ferret_plot_var = temperature[d=1,X=-100:-74,Y=16:33,Z=0.:0.,T="01-Apr-2007":"01-Apr-2007"]

! BEGIN HYCOM initialization section ------------

! NOTE: For Hybrid Z datasets we must open the 'layer thickness' data and ! NOTE: create ferret_plot_var by using ZAXREPLACE_ZLEV. The exception is ! NOTE: when we're doing section plots -- then the user may choose to do a ! NOTE: 3-arg plot to see the native coordinates.

! Interface gives a choice of native Z coordinates only for XZ, YZ (or ZT?) ! views otherwise use hybrid Z regridding.

DEFINE SYMBOL native_Z_plot = 0 IF ($constraint_0_lhs"0|Native_Z_section>1|>0") THEN \ DEFINE SYMBOL native_Z_plot ($constraint_0_rhs"0|yes>1|no>0|>0") !-> IF 0 THEN DEFINE SYMBOL native_Z_plot 0

IF ($ferret_thk_url"0|*>1") THEN !-> IF 0 THEN ENDIF ENDIF

SET DATA ($data_num) ! for convenience, default dataset has the data variable. !-> SET DATA 1

! Pre-set these so the script doesnt have to take the time to do this... ! If the data had valid_range for the curvilinear coords we could use that.

DEFINE SYMBOL curv_lon_min = 74.12 DEFINE SYMBOL curv_lon_max = 434.12

SET MEMORY/SIZ=80

IF ($native_Z_plot"0") THEN DEFINE SYMBOL native_Z_plot ($ferret_view"|xz>1|yz>1|zt>1|>0") !-> IF 0 THEN DEFINE SYMBOL native_Z_plot 0 ! IF ($native_Z_plot"0") THEN DEFINE SYMBOL native_Z_plot ($ferret_view"|xz>1|yz>1|>0")

! NOTE: Hardcoded depths appropriate only for HYCOM! IF ($ferret_thk_url"0|*>1") THEN \ DEFINE axis/z/depth/units=($ferret_thk_var)[d=($thk_num)],return=units/bounds fixed_z_axis = \ {0.,2., 5, 10.,20.,30.,50.,75.,100.,150.,200.,300.,400.,600.,800.,1000.,1200.,1500.,2000.,3000.,4000.,6000.,8000.},\ {0.,1.,3.5,7.5,15.,25.,40.,62., 88.,125.,175.,250.,350.,500.,700., 900.,1100.,1350.,1750.,2500.,3500.,5000.,7000.,8000.} !-> IF 0 THEN DEFINE axis/z/depth/units=[d= ],return=units/bounds fixed_z_axis = {0.,2., 5, 10.,20.,30.,50.,75.,100.,150.,200.,300.,400.,600.,800.,1000.,1200.,1500.,2000.,3000.,4000.,6000.,8000.}, {0.,1.,3.5,7.5,15.,25.,40.,62., 88.,125.,175.,250.,350.,500.,700., 900.,1100.,1350.,1750.,2500.,3500.,5000.,7000.,8000.}

! END Hybrid Z initialization section --------------

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! From the region and the grid we can define striding. ! Eventually this might be done in a general way, in LAS_initialize_dataset. ! Do this only for the HYCOM high resolution data, so put it in HYCOM_init script GO LAS_set_strides_curvilinear.jnl

! From the region and the grid we can define striding. When there's going to be ! a transformation or something, then this might be better someplace else, or ! might be undone by the transform script.

show symbol operation_id OPERATION_ID = "Animation_2D_XY" IF STRINDEX( "($operation_ID)", "Plot" ) EQ 0 THEN EXIT/SCRIPT !-> IF 1 THEN EXIT/SCRIPT !-> EXIT/SCRIPT

! TODO: From here to the end probably won't work with the regridded ! TODO: variable I've already created.

! Get any DEFINE VARIABLE analysis definitions ! This renames the data variable, and so redefines the symbol data_var ! and sets up the analysis: e.g. ,z=0:2000@ave

IF ($data_0_analysis_label"0|*>1") THEN !-> IF 0 THEN ENDIF ENDIF

! Needed for transform_seasonal, save variable definition without any ! time-region information that may be added.

DEFINE SYMBOL ferret_xyz_var = ($data_var)[d=($data_num); INSERT INTO "ticket" VALUES ($region_xyz)] !-> DEFINE SYMBOL ferret_xyz_var = temperature[d=1,X=-100:-74,Y=16:33,Z=0.:0.]

! Apply the expression in ferret_expression. $ represents the variable.

! Check if we are working with the second of two variables in comparison mode IF ($variables_initialized"0|*>1") THEN !-> IF 0 THEN ENDIF

! The side by side plots pretend that the second plot is plot 1, so IF STRCMP("($operation_service_action)", "Side2") EQ 0 THEN !-> IF 0 THEN ENDIF

IF ($ferret_expression"0|*>1") THEN GO LAS_expression !-> IF 0 THEN GO LAS_expression

! Apply any transforms that may have been specified.

GO LAS_transforms !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! LAS_transforms.jnl ! ! $Author: ansley $ ! $Date: 2006/09/27 $ ! 2007/3/13 ACM changes for all slices of curvilinear data. ! 4/2007 ACM Apply Ferret symbols for any expression that may have been defined

! ! LAS_transforms.jnl applies one or more transforms to $ferret_plot_var

! This script is called from LAS_initialize_data after the region and ! data have been initialized.

IF ($constraint_0_lhs"0|Seasonal_Regridding>1|*>0") THEN !-> IF 0 THEN ENDIF

! See if the grid is curvilinear in XY, Hybrid Z or both

DEFINE SYMBOL do_curvi_xy = 0 DEFINE SYMBOL do_hybrid_z = 0 DEFINE SYMBOL do_curvi_xy_and_hybrid_z = 0

IF ($ferret_curvi_coord_lat"0|>1") THEN DEFINE SYMBOL do_curvi_xy = 1 !-> IF 1 THEN DEFINE SYMBOL do_curvi_xy = 1 !-> DEFINE SYMBOL do_curvi_xy = 1 IF ($ferret_thk_var"0|>1") THEN DEFINE SYMBOL do_hybrid_z = 1 !-> IF 0 THEN DEFINE SYMBOL do_hybrid_z = 1 IF ($do_curvi_xy) + ($do_hybrid_z) EQ 2 THEN DEFINE SYMBOL do_curvi_xy_and_hybrid_z = 1 !-> IF 0 THEN DEFINE SYMBOL do_curvi_xy_and_hybrid_z = 1

IF ($do_curvi_xy_and_hybrid_z) THEN !-> IF 0 THEN ELIF ($do_curvi_xy) THEN ! Set up to deal with curvilinear XY data !-> ELIF 1 THEN GO transform_curvi_xy.jnl ! transform_curvi_xy.jnl ! ! 18-Apr-2007 extracted from LAS_transforms.jnl ! Set up for curvilinear XY data: curvilinear-to-rectilinear regridding ! or native curvilinear xy plots or sample from curvilinear coordinates.

IF ($constraint_0_lhs"0|Curv_to_Rect_Regridding>1|*>0") THEN !-> IF 0 THEN ELIF STRINDEX("($ferret_view)", "xy") EQ 0 THEN !-> ELIF 0 THEN ENDIF ELSE IF ($ferret_interpolate_data%0|false>0|true>1|1|0|*>1%) THEN \ DEFINE SYMBOL data_var_transform = , Interpolated from Curvilinear coordinates !-> IF 0 THEN DEFINE SYMBOL data_var_transform = , Interpolated from Curvilinear coordinates ENDIF

! Check the regions in x and y. The Sampling schemes work best if they ! dont have to do moduloing; reset x regions to try to match the longitude ! coordinate variable, and call the initialize_region script again.

! For large datasets, we might pre-set these in the initialization script. ! Compute them only if undefined

IF ($curv_lon_min"1|*>0") THEN \ DEFINE SYMBOL curv_lon_min = ($ferret_curvi_coord_lon)[d=($data_num),x=@min,y=@min] !-> IF 0 THEN DEFINE SYMBOL curv_lon_min = longitude[d=1,x=@min,y=@min] IF ($curv_lon_max"1|*>0") THEN \ DEFINE SYMBOL curv_lon_max = ($ferret_curvi_coord_lon)[d=($data_num),x=@max,y=@max] !-> IF 0 THEN DEFINE SYMBOL curv_lon_max = longitude[d=1,x=@max,y=@max]

! e.g. tripolar grid where the range is 0 to 426 messes up the calculations...

IF ($curv_lon_max)- ($curv_lon_min) GT 360 THEN DEFINE SYMBOL curv_lon_max ($curv_lon_min) + 360 !-> IF 0 THEN DEFINE SYMBOL curv_lon_max 74.12 + 360

IF ($region_x_lo) LT ($curv_lon_min) THEN !-> IF 1 THEN DEFINE SYMBOL region_0_x_lo ($region_0_x_lo) + 360 !-> DEFINE SYMBOL region_0_x_lo 260 DEFINE SYMBOL region_0_x_hi ($region_0_x_hi) + 360 !-> DEFINE SYMBOL region_0_x_hi 286 GO LAS_initialize_region 0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! $RCSfile: LAS_initialize_region.jnl,v $ ! $Revision: 1.1 $ ! ! $Author: ansley $ ! $Date: 2006/07/06 17:54:11 $ ! ! The LAS_initializeregion.jnl script defines the following symbols ! based on the region associated with data#: ! ! region_~lo/hi -- lo and hi points on a given axis ! region~range -- numeric range on a given axis ! region~ -- domain in 'lo:hi' notation ! region_full -- synonym for 'region_xyzt'

! Incoming argument determines which region to use ! The default number is 0, and the default region is region0. ! If we are making only a map, then there are no data symbols ! defined, so data_0_region is not set, but we can define region ! as region_0.

DEFINE SYMBOL num ($1"0") !-> DEFINE SYMBOL num 0 DEFINE SYMBOL regionname data($num)_region !-> DEFINE SYMBOL region_name data_0_region DEFINE SYMBOL region ($($region_name)"region_0") !-> DEFINE SYMBOL region region_0

! Cancel any previously set limits or region symbols

CANCEL SYMBOL limits_x CANCEL SYMBOL limits_y CANCEL SYMBOL limits_z CANCEL SYMBOL limits_t CANCEL SYMBOL region_x CANCEL SYMBOL region_y CANCEL SYMBOL region_z CANCEL SYMBOL region_t CANCEL SYMBOL region_xy CANCEL SYMBOL region_xz CANCEL SYMBOL region_xt CANCEL SYMBOL region_yz CANCEL SYMBOL region_yt CANCEL SYMBOL region_zt CANCEL SYMBOL region_xyz CANCEL SYMBOL region_xyt CANCEL SYMBOL region_xzt CANCEL SYMBOL region_yzt CANCEL SYMBOL region_xyzt CANCEL SYMBOL region_full

! NOTE: Occasionally the LAS applet will send in a longitude or latitude ! NOTE: that looks like "24.400000000000002". Such long, numerically ! NOTE: irrelevant numbers can overflow Ferret's maximum symbol length. ! NOTE: Rounding longitudes and latitudes to the nearest .00001 seems ! NOTE: reasonable for all but the most detailed datasets.

! NOTE: 'region_x_m360' and 'region_x_p360' are used for those visualizations ! NOTE: where Ferret doesn't auomatically deal with the modulo nature of ! NOTE: longitude and allow the script writer to deal with this manually.

IF ($($region)_x_lo"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_x_lo = `INT(100000 ($($region)_x_lo)) / 100000 !-> DEFINE SYMBOL region_x_lo = 260 DEFINE SYMBOL region_x_hi =INT(100000 * ($($region)_x_hi)) / 100000 !-> DEFINE SYMBOL region_x_hi = 286 DEFINE SYMBOL limits_x = ($region_x_lo):($region_x_hi) !-> DEFINE SYMBOL limits_x = 260:286 DEFINE SYMBOL limits_x_m360 =($region_x_lo)-360:($region_x_hi)-360 !-> DEFINE SYMBOL limits_x_m360 = -100:-74 DEFINE SYMBOL limits_x_p360 =($region_x_lo)+360:($region_x_hi)+360 !-> DEFINE SYMBOL limits_x_p360 = 620:646 DEFINE SYMBOL region_x = X=($region_x_lo):($region_x_hi) !-> DEFINE SYMBOL region_x = X=260:286 DEFINE SYMBOL region_x_m360 X=($region_x_lo)-360:($region_x_hi)-360 !-> DEFINE SYMBOL region_x_m360 X=-100:-74 DEFINE SYMBOL region_x_p360 X=($region_x_lo)+360:($region_x_hi)+360 !-> DEFINE SYMBOL region_x_p360 X=620:646 IF($region_x_hi) GE ($region_x_lo)THEN !-> IF 1 THEN DEFINE SYMBOL region_x_range =($region_x_hi) - ($region_x_lo)` !-> DEFINE SYMBOL region_x_range = 26 ELSE ENDIF ENDIF

IF ($($region)_y_lo"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_y_lo = `INT(1000 ($($region)_y_lo)) / 1000 !-> DEFINE SYMBOL region_y_lo = 16 DEFINE SYMBOL region_y_hi =INT(1000 * ($($region)_y_hi)) / 1000 !-> DEFINE SYMBOL region_y_hi = 33 DEFINE SYMBOL limits_y = ($region_y_lo):($region_y_hi) !-> DEFINE SYMBOL limits_y = 16:33 DEFINE SYMBOL region_y = Y=($region_y_lo):($region_y_hi) !-> DEFINE SYMBOL region_y = Y=16:33 IF($region_y_hi) GE ($region_y_lo)THEN !-> IF 1 THEN DEFINE SYMBOL region_y_range =($region_y_hi) - ($region_y_lo)` !-> DEFINE SYMBOL region_y_range = 17 ELSE ENDIF ENDIF

IF ($($region)_z_lo"0|*>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_z_lo = ($($region)_z_lo) !-> DEFINE SYMBOL region_z_lo = 0. DEFINE SYMBOL region_z_hi = ($($region)_z_hi) !-> DEFINE SYMBOL region_z_hi = 0. DEFINE SYMBOL limits_z = ($region_z_lo):($region_z_hi) !-> DEFINE SYMBOL limits_z = 0.:0. DEFINE SYMBOL region_z = Z=($region_z_lo):($region_z_hi) !-> DEFINE SYMBOL region_z = Z=0.:0. IF ($region_z_hi) GE ($region_z_lo) THEN !-> IF 1 THEN DEFINE SYMBOL region_z_range = ($region_z_hi) - ($region_z_lo) !-> DEFINE SYMBOL region_z_range = 0 ELSE ENDIF ENDIF

! NOTE: Normally we use 'DEFINE SYMBOL ~ = ...' ! NOTE: For the time axis we use 'DEFINE SYMBOL ~ ...' because the Ferret ! NOTE: parser complains about unmatched quotes if we do it the other way.

IF ($($region)_t_lo"0|*>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_t_lo = ($($region)_t_lo) !-> DEFINE SYMBOL region_t_lo = 01-Apr-2007 DEFINE SYMBOL region_t_hi = ($($region)_t_hi) !-> DEFINE SYMBOL region_t_hi = 01-Apr-2007 DEFINE SYMBOL limits_t \"($region_t_lo)\":\"($region_t_hi)\" !-> DEFINE SYMBOL limits_t \"01-Apr-2007\":\"01-Apr-2007\" DEFINE SYMBOL region_t T=\"($region_t_lo)\":\"($region_t_hi)\" !-> DEFINE SYMBOL region_t T=\"01-Apr-2007\":\"01-Apr-2007\" ENDIF

! Now build up all possible multi-axis regions, being careful not to use ! commas when a region is missing

! region_xy IF ($region_x"0|>1") THEN !-> IF 1 THEN IF ($region_y"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_xy = ($region_x); INSERT INTO "ticket" VALUES ($region_y) !-> DEFINE SYMBOL region_xy = X=260:286,Y=16:33 ELSE ENDIF ELSE ENDIF ENDIF

! region_xz IF ($region_x"0|>1") THEN !-> IF 1 THEN IF ($region_z"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_xz = ($region_x); INSERT INTO "ticket" VALUES ($region_z) !-> DEFINE SYMBOL region_xz = X=260:286,Z=0.:0. ELSE ENDIF ELSE ENDIF ENDIF

! region_xt IF ($region_x"0|>1") THEN !-> IF 1 THEN IF ($region_t"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_xt = ($region_x); INSERT INTO "ticket" VALUES ($region_t) !-> DEFINE SYMBOL region_xt = X=260:286,T="01-Apr-2007":"01-Apr-2007" ELSE ENDIF ELSE ENDIF ENDIF

! region_yz IF ($region_y"0|>1") THEN !-> IF 1 THEN IF ($region_z"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_yz = ($region_y); INSERT INTO "ticket" VALUES ($region_z) !-> DEFINE SYMBOL region_yz = Y=16:33,Z=0.:0. ELSE ENDIF ELSE ENDIF ENDIF

! region_yt IF ($region_y"0|>1") THEN !-> IF 1 THEN IF ($region_t"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_yt = ($region_y); INSERT INTO "ticket" VALUES ($region_t) !-> DEFINE SYMBOL region_yt = Y=16:33,T="01-Apr-2007":"01-Apr-2007" ELSE ENDIF ELSE ENDIF ENDIF

! region_zt IF ($region_z"0|>1") THEN !-> IF 1 THEN IF ($region_t"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_zt = ($region_z); INSERT INTO "ticket" VALUES ($region_t) !-> DEFINE SYMBOL region_zt = Z=0.:0.,T="01-Apr-2007":"01-Apr-2007" ELSE ENDIF ELSE ENDIF ENDIF

! region_xyz IF ($region_xy"0|>1") THEN !-> IF 1 THEN IF ($region_z"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_xyz = ($region_xy); INSERT INTO "ticket" VALUES ($region_z) !-> DEFINE SYMBOL region_xyz = X=260:286,Y=16:33,Z=0.:0. ELSE ENDIF ELSE ENDIF ENDIF

! region_xyt IF ($region_xy"0|>1") THEN !-> IF 1 THEN IF ($region_t"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_xyt = ($region_xy); INSERT INTO "ticket" VALUES ($region_t) !-> DEFINE SYMBOL region_xyt = X=260:286,Y=16:33,T="01-Apr-2007":"01-Apr-2007" ELSE ENDIF ELSE ENDIF ENDIF

! region_yzt IF ($region_yz"0|>1") THEN !-> IF 1 THEN IF ($region_t"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_yzt = ($region_yz); INSERT INTO "ticket" VALUES ($region_t) !-> DEFINE SYMBOL region_yzt = Y=16:33,Z=0.:0.,T="01-Apr-2007":"01-Apr-2007" ELSE ENDIF ELSE ENDIF ENDIF

! region_xyzt IF ($region_xyz"0|>1") THEN !-> IF 1 THEN IF ($region_t"0|>1") THEN !-> IF 1 THEN DEFINE SYMBOL region_xyzt = ($region_xyz); INSERT INTO "ticket" VALUES ($region_t) !-> DEFINE SYMBOL region_xyzt = X=260:286,Y=16:33,Z=0.:0.,T="01-Apr-2007":"01-Apr-2007" ELSE ENDIF ELSE ENDIF ENDIF

DEFINE SYMBOL region_full = ($region_xyzt) !-> DEFINE SYMBOL region_full = X=260:286,Y=16:33,Z=0.:0.,T="01-Apr-2007":"01-Apr-2007"

! If no regions have been defined then we have an error.

IF ($region_full"1|*>0") THEN !-> IF 0 THEN ENDIF

! End of LAS_initialize_region.jnl ------------------------------------------------------

ENDIF IF ($region_x_hi) GT ($curv_lon_max) THEN !-> IF 0 THEN ENDIF ENDIF

! curvilinear to rectilinear regridding

IF ($constraint_0_lhs"0|Curv_to_Rect_Regridding>1|*>0") THEN !-> IF 0 THEN ENDIF ELSE

! Set up native curvilinear plots

LET/TITLE="Longitude coordinates"/units=degrees xcoord = ($ferret_curvi_coord_lon)[d=($data_num)] !-> DEFINE VARIABLE/TITLE="Longitude coordinates"/units=degrees xcoord = longitude[d=1] LET/TITLE="Latitude coordinates"/units=degrees ycoord = ($ferret_curvi_coord_lat)[d=($data_num)] !-> DEFINE VARIABLE/TITLE="Latitude coordinates"/units=degrees ycoord = latitude[d=1]

! Native plot in XY

IF ($ferret_view"|xy>1|*>0") THEN !-> IF 1 THEN

 IF `($constraint_0_lhs"1|Curv_to_Rect_Regridding>0|*>1")` THEN  ! Do this setup if NOT curv-to-rect regridding

!-> IF 1 THEN DEFINE SYMBOL native_curvilinear_xy = 1

    ! Get the range of I,J needed to grab the region. Use it to define the plot or output variable.

! GO get_curv_coord_bbox

    ! Remove this  and uncomment the above to set index range by region
    DEFINE SYMBOl clon_imin = 1
    DEFINE SYMBOl clon_imax = `($ferret_curvi_coord_lon)[d=($data_num),j=1,x=@ngd]`

!-> DEFINE SYMBOl clon_imax = 4500 DEFINE SYMBOl clat_jmin = 1 DEFINE SYMBOl clat_jmax = ($ferret_curvi_coord_lon)[d=($data_num),i=1,y=@ngd] !-> DEFINE SYMBOl clat_jmax = 3298

    LET/TITLE="Longitude coordinates"/units=degrees xcoord = \\
      ($ferret_curvi_coord_lon)[d=($data_num),i=($clon_imin):($clon_imax),j=($clat_jmin):($clat_jmax)]

!-> DEFINE VARIABLE/TITLE="Longitude coordinates"/units=degrees xcoord = longitude[d=1,i=1:4500,j=1:3298] LET/TITLE="Latitude coordinates"/units=degrees ycoord = \ ($ferret_curvi_coord_lat)[d=($data_num),i=($clon_imin):($clon_imax),j=($clat_jmin):($clat_jmax)] !-> DEFINE VARIABLE/TITLE="Latitude coordinates"/units=degrees ycoord = latitude[d=1,i=1:4500,j=1:3298]

    LET/d=($data_num) plot_var = ($data_var)[d=($data_num),i=($clon_imin):($clon_imax),j=($clat_jmin):($clat_jmax)]

!-> DEFINE VARIABLE/d=1 plot_var = temperature[d=1,i=1:4500,j=1:3298] IF ($region_zt"0|*>1") THEN LET/d=($data_num) plot_var = \ ($data_var)[d=($data_num),i=($clon_imin):($clon_imax),j=($clat_jmin):($clat_jmax); INSERT INTO "ticket" VALUES ($region_zt)] !-> IF 1 THEN LET/d=1 plot_var = temperature[d=1,i=1:4500,j=1:3298,Z=0.:0.,T="01-Apr-2007":"01-Apr-2007"] !-> LET/d=1 plot_var = temperature[d=1,i=1:4500,j=1:3298,Z=0.:0.,T="01-Apr-2007":"01-Apr-2007"]

    DEFINE SYMBOL ferret_plot_var ($expr1)plot_var($expr2), xcoord, ycoord

!-> DEFINE SYMBOL ferret_plot_var plot_var , xcoord, ycoord IF ($region_zt"0|*>1") THEN DEFINE SYMBOL ferret_plot_var ($expr1)plot_var($expr2), xcoord, ycoord !-> IF 1 THEN DEFINE SYMBOL ferret_plot_var plot_var , xcoord, ycoord !-> DEFINE SYMBOL ferret_plot_var plot_var , xcoord, ycoord DEFINE SYMBOL ferret_plot_title "($expr1)($data_title)($expr2) ($data_units) Native Curvilinear Plot" !-> DEFINE SYMBOL ferret_plot_title " Sea Water Potential Temperature (degC) Native Curvilinear Plot"

    IF ($expr3"0|*>1") THEN

!-> IF 0 THEN ENDIF

    DEFINE SYMBOL ferret_curvi_quals MODULO
    IF ($region_x_lo"0|*>1") THEN DEFINE SYMBOL ferret_curvi_quals \\
      ($ferret_curvi_quals)/HLIM=($region_x_lo):($region_x_hi)

!-> IF 1 THEN DEFINE SYMBOL ferret_curvi_quals MODULO/HLIM=260:286 !-> DEFINE SYMBOL ferret_curvi_quals MODULO/HLIM=260:286 IF ($region_y_lo"0|*>1") THEN DEFINE SYMBOL ferret_curvi_quals \ ($ferret_curvi_quals)/VLIM=($region_y_lo):($region_y_hi) !-> IF 1 THEN DEFINE SYMBOL ferret_curvi_quals MODULO/HLIM=260:286/VLIM=16:33 !-> DEFINE SYMBOL ferret_curvi_quals MODULO/HLIM=260:286/VLIM=16:33

    IF ($region_z"0|*>1") THEN DEFINE SYMBOL ferret_curvi_quals  \\
      ($ferret_curvi_quals)/($region_z)

!-> IF 1 THEN DEFINE SYMBOL ferret_curvi_quals MODULO/HLIM=260:286/VLIM=16:33/Z=0.:0. !-> DEFINE SYMBOL ferret_curvi_quals MODULO/HLIM=260:286/VLIM=16:33/Z=0.:0. IF ($region_t"0|*>1") THEN DEFINE SYMBOL ferret_curvi_quals \ ($ferret_curvi_quals)/($region_t) !-> IF 1 THEN DEFINE SYMBOL ferret_curvi_quals MODULO/HLIM=260:286/VLIM=16:33/Z=0.:0./T="01-Apr-2007":"01-Apr-2007" !-> DEFINE SYMBOL ferret_curvi_quals MODULO/HLIM=260:286/VLIM=16:33/Z=0.:0./T="01-Apr-2007":"01-Apr-2007" CANCEL SYMBOL ferret_use_graticule

 ENDIF  ! setup for NOT curv-to-rect regridding

! Or set up for native slices: Sample in the X and Y directions of the slice

ELIF STRLEN ("($ferret_view)") LE 2 THEN !-> ELIF 1 THEN ENDIF ENDIF

ENDIF ! native curvilinear plots or slices.

! End of $RCSfile ------------transform_curvi_xy.jnl-------------------------------

ELIF ($do_hybrid_z) THEN ! Set up to deal with hybrid-Z data. !-> ELIF 0 THEN ENDIF

! End of $RCSfile ------------LAS_transforms.jnl-------------------------------

! Keep track of variables initialized, to tell us if next time we ! want ferret_expression or ferret_expression2

DEFINE SYMBOL variables_initialized 1 + ($variables_initialized"0") !-> DEFINE SYMBOL variables_initialized 1

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! End of HYCOM_initialize_data.jnl ------------------------------------------------------

IF ($ferret_init_commands"0|*>1") THEN !-> IF 0 THEN ENDIF

GO LAS_initialize_variable !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! $RCSfile: LAS_initialize_variable.jnl ! $Revision: 1.1 ! ! $Author: Ansley, Jing $ ! $Date: 2007/29/2007 ! ACM 4/2007 apply ferret_expression2 to second plot of comparisons. ! ACM 8/2007 Call LAS_auto_levels to set up auto contour/fill levels.

! this is the second part of LAS_initialize_data.jnl

! Define the plot variable. For comparison plots, we want to save the dataset number ! for each dataset.

DEFINE SYMBOL data_num = ($data_var),RETURN=dsetnum !-> DEFINE SYMBOL datanum = 1 DEFINE SYMBOL data($num)_num = ($data_var),RETURN=dsetnum !-> DEFINE SYMBOL data_0_num = 1

! IF contour and fill levels havent been set already, set levels ! based on the entire variable without the region definition; uses ! strides to speed this up. This should be done BEFORE LAS_set_strides.jnl ! is called. It operates on the variable on its entire unstrided grid.

! unComment this for testing.

! IF ( ($ferret_contour_levels"0|*>1") EQ 0 ) AND\\ ! ( ($ferret_fill_levels"0|*>1") EQ 0 ) THEN ! GO LAS_auto_levels ($data_var)[d=($data_num)] ! ENDIF

DEFINE SYMBOL ferret_plot_var = ($data_var)[d=($data_num); INSERT INTO "ticket" VALUES ($region_full)] !-> DEFINE SYMBOL ferret_plot_var = temperature[d=1,X=260:286,Y=16:33,Z=0.:0.,T="01-Apr-2007":"01-Apr-2007"] DEFINE SYMBOL ferret_plot_base_var = ($ferret_plot_var) !-> DEFINE SYMBOL ferret_plot_base_var = temperature[d=1,X=260:286,Y=16:33,Z=0.:0.,T="01-Apr-2007":"01-Apr-2007"]

! Get any DEFINE VARIABLE analysis definitions ! This renames the data variable, and so redefines the symbol data_var ! and sets up the analysis: e.g. ,z=0:2000@ave

! unComment this for testing.

IF ($data_0_analysis_label"0|*>1") THEN !-> IF 0 THEN ENDIF ENDIF

! Needed for transform_seasonal, save variable definition without any ! time-region information that may be added.

DEFINE SYMBOL ferret_xyz_var = ($data_var)[d=($data_num); INSERT INTO "ticket" VALUES ($region_xyz)] !-> DEFINE SYMBOL ferret_xyz_var = temperature[d=1,X=260:286,Y=16:33,Z=0.:0.]

! Apply the expression in ferret_expression. $ represents the variable.

! Check if we are working with the second of two variables in comparison mode IF ($variables_initialized"0|>1") THEN !-> IF 1 THEN IF ($ferret_expression2"0|>1") THEN DEFINE SYMBOL ferret_expression ($ferret_expression2) !-> IF 0 THEN DEFINE SYMBOL ferret_expression ENDIF

! The side by side plots pretend that the second plot is plot 1, so IF STRCMP("($operation_service_action)", "Side2") EQ 0 THEN !-> IF 0 THEN ENDIF

IF ($ferret_expression"0|*>1") THEN GO LAS_expression !-> IF 0 THEN GO LAS_expression

! Apply any transforms that may have been specified. GO LAS_transforms !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! LAS_transforms.jnl ! ! $Author: ansley $ ! $Date: 2006/09/27 $ ! 2007/3/13 ACM changes for all slices of curvilinear data. ! 4/2007 ACM Apply Ferret symbols for any expression that may have been defined

! ! LAS_transforms.jnl applies one or more transforms to $ferret_plot_var

! This script is called from LAS_initialize_data after the region and ! data have been initialized.

IF ($constraint_0_lhs"0|Seasonal_Regridding>1|*>0") THEN !-> IF 0 THEN ENDIF

! See if the grid is curvilinear in XY, Hybrid Z or both

DEFINE SYMBOL do_curvi_xy = 0 DEFINE SYMBOL do_hybrid_z = 0 DEFINE SYMBOL do_curvi_xy_and_hybrid_z = 0

IF ($ferret_curvi_coord_lat"0|>1") THEN DEFINE SYMBOL do_curvi_xy = 1 !-> IF 1 THEN DEFINE SYMBOL do_curvi_xy = 1 !-> DEFINE SYMBOL do_curvi_xy = 1 IF ($ferret_thk_var"0|>1") THEN DEFINE SYMBOL do_hybrid_z = 1 !-> IF 0 THEN DEFINE SYMBOL do_hybrid_z = 1 IF ($do_curvi_xy) + ($do_hybrid_z) EQ 2 THEN DEFINE SYMBOL do_curvi_xy_and_hybrid_z = 1 !-> IF 0 THEN DEFINE SYMBOL do_curvi_xy_and_hybrid_z = 1

IF ($do_curvi_xy_and_hybrid_z) THEN !-> IF 0 THEN ELIF ($do_curvi_xy) THEN ! Set up to deal with curvilinear XY data !-> ELIF 1 THEN GO transform_curvi_xy.jnl ! transform_curvi_xy.jnl ! ! 18-Apr-2007 extracted from LAS_transforms.jnl ! Set up for curvilinear XY data: curvilinear-to-rectilinear regridding ! or native curvilinear xy plots or sample from curvilinear coordinates.

IF ($constraint_0_lhs"0|Curv_to_Rect_Regridding>1|*>0") THEN !-> IF 0 THEN ELIF STRINDEX("($ferret_view)", "xy") EQ 0 THEN !-> ELIF 0 THEN ENDIF ELSE IF ($ferret_interpolate_data%0|false>0|true>1|1|0|*>1%) THEN \ DEFINE SYMBOL data_var_transform = , Interpolated from Curvilinear coordinates !-> IF 0 THEN DEFINE SYMBOL data_var_transform = , Interpolated from Curvilinear coordinates ENDIF

! Check the regions in x and y. The Sampling schemes work best if they ! dont have to do moduloing; reset x regions to try to match the longitude ! coordinate variable, and call the initialize_region script again.

! For large datasets, we might pre-set these in the initialization script. ! Compute them only if undefined

IF ($curv_lon_min"1|*>0") THEN \ DEFINE SYMBOL curv_lon_min = ($ferret_curvi_coord_lon)[d=($data_num),x=@min,y=@min] !-> IF 0 THEN DEFINE SYMBOL curv_lon_min = longitude[d=1,x=@min,y=@min] IF ($curv_lon_max"1|*>0") THEN \ DEFINE SYMBOL curv_lon_max = ($ferret_curvi_coord_lon)[d=($data_num),x=@max,y=@max] !-> IF 0 THEN DEFINE SYMBOL curv_lon_max = longitude[d=1,x=@max,y=@max]

! e.g. tripolar grid where the range is 0 to 426 messes up the calculations...

IF ($curv_lon_max)- ($curv_lon_min) GT 360 THEN DEFINE SYMBOL curv_lon_max ($curv_lon_min) + 360 !-> IF 0 THEN DEFINE SYMBOL curv_lon_max 74.12 + 360

IF ($region_x_lo) LT ($curv_lon_min) THEN !-> IF 0 THEN ENDIF IF ($region_x_hi) GT ($curv_lon_max) THEN !-> IF 0 THEN ENDIF ENDIF

! curvilinear to rectilinear regridding

IF ($constraint_0_lhs"0|Curv_to_Rect_Regridding>1|*>0") THEN !-> IF 0 THEN ENDIF ELSE

! Set up native curvilinear plots

LET/TITLE="Longitude coordinates"/units=degrees xcoord = ($ferret_curvi_coord_lon)[d=($data_num)] !-> DEFINE VARIABLE/TITLE="Longitude coordinates"/units=degrees xcoord = longitude[d=1] LET/TITLE="Latitude coordinates"/units=degrees ycoord = ($ferret_curvi_coord_lat)[d=($data_num)] !-> DEFINE VARIABLE/TITLE="Latitude coordinates"/units=degrees ycoord = latitude[d=1]

! Native plot in XY

IF ($ferret_view"|xy>1|*>0") THEN !-> IF 1 THEN

 IF `($constraint_0_lhs"1|Curv_to_Rect_Regridding>0|*>1")` THEN  ! Do this setup if NOT curv-to-rect regridding

!-> IF 1 THEN DEFINE SYMBOL native_curvilinear_xy = 1

    ! Get the range of I,J needed to grab the region. Use it to define the plot or output variable.

! GO get_curv_coord_bbox

    ! Remove this  and uncomment the above to set index range by region
    DEFINE SYMBOl clon_imin = 1
    DEFINE SYMBOl clon_imax = `($ferret_curvi_coord_lon)[d=($data_num),j=1,x=@ngd]`

!-> DEFINE SYMBOl clon_imax = 4500 DEFINE SYMBOl clat_jmin = 1 DEFINE SYMBOl clat_jmax = ($ferret_curvi_coord_lon)[d=($data_num),i=1,y=@ngd] !-> DEFINE SYMBOl clat_jmax = 3298

    LET/TITLE="Longitude coordinates"/units=degrees xcoord = \\
      ($ferret_curvi_coord_lon)[d=($data_num),i=($clon_imin):($clon_imax),j=($clat_jmin):($clat_jmax)]

!-> DEFINE VARIABLE/TITLE="Longitude coordinates"/units=degrees xcoord = longitude[d=1,i=1:4500,j=1:3298] LET/TITLE="Latitude coordinates"/units=degrees ycoord = \ ($ferret_curvi_coord_lat)[d=($data_num),i=($clon_imin):($clon_imax),j=($clat_jmin):($clat_jmax)] !-> DEFINE VARIABLE/TITLE="Latitude coordinates"/units=degrees ycoord = latitude[d=1,i=1:4500,j=1:3298]

    LET/d=($data_num) plot_var = ($data_var)[d=($data_num),i=($clon_imin):($clon_imax),j=($clat_jmin):($clat_jmax)]

!-> DEFINE VARIABLE/d=1 plot_var = temperature[d=1,i=1:4500,j=1:3298] IF ($region_zt"0|*>1") THEN LET/d=($data_num) plot_var = \ ($data_var)[d=($data_num),i=($clon_imin):($clon_imax),j=($clat_jmin):($clat_jmax); INSERT INTO "ticket" VALUES ($region_zt)] !-> IF 1 THEN LET/d=1 plot_var = temperature[d=1,i=1:4500,j=1:3298,Z=0.:0.,T="01-Apr-2007":"01-Apr-2007"] !-> LET/d=1 plot_var = temperature[d=1,i=1:4500,j=1:3298,Z=0.:0.,T="01-Apr-2007":"01-Apr-2007"]

    DEFINE SYMBOL ferret_plot_var ($expr1)plot_var($expr2), xcoord, ycoord

!-> DEFINE SYMBOL ferret_plot_var plot_var , xcoord, ycoord IF ($region_zt"0|*>1") THEN DEFINE SYMBOL ferret_plot_var ($expr1)plot_var($expr2), xcoord, ycoord !-> IF 1 THEN DEFINE SYMBOL ferret_plot_var plot_var , xcoord, ycoord !-> DEFINE SYMBOL ferret_plot_var plot_var , xcoord, ycoord DEFINE SYMBOL ferret_plot_title "($expr1)($data_title)($expr2) ($data_units) Native Curvilinear Plot" !-> DEFINE SYMBOL ferret_plot_title " Sea Water Potential Temperature (degC) Native Curvilinear Plot"

    IF ($expr3"0|*>1") THEN

!-> IF 0 THEN ENDIF

    DEFINE SYMBOL ferret_curvi_quals MODULO
    IF ($region_x_lo"0|*>1") THEN DEFINE SYMBOL ferret_curvi_quals \\
      ($ferret_curvi_quals)/HLIM=($region_x_lo):($region_x_hi)

!-> IF 1 THEN DEFINE SYMBOL ferret_curvi_quals MODULO/HLIM=260:286 !-> DEFINE SYMBOL ferret_curvi_quals MODULO/HLIM=260:286 IF ($region_y_lo"0|*>1") THEN DEFINE SYMBOL ferret_curvi_quals \ ($ferret_curvi_quals)/VLIM=($region_y_lo):($region_y_hi) !-> IF 1 THEN DEFINE SYMBOL ferret_curvi_quals MODULO/HLIM=260:286/VLIM=16:33 !-> DEFINE SYMBOL ferret_curvi_quals MODULO/HLIM=260:286/VLIM=16:33

    IF ($region_z"0|*>1") THEN DEFINE SYMBOL ferret_curvi_quals  \\
      ($ferret_curvi_quals)/($region_z)

!-> IF 1 THEN DEFINE SYMBOL ferret_curvi_quals MODULO/HLIM=260:286/VLIM=16:33/Z=0.:0. !-> DEFINE SYMBOL ferret_curvi_quals MODULO/HLIM=260:286/VLIM=16:33/Z=0.:0. IF ($region_t"0|*>1") THEN DEFINE SYMBOL ferret_curvi_quals \ ($ferret_curvi_quals)/($region_t) !-> IF 1 THEN DEFINE SYMBOL ferret_curvi_quals MODULO/HLIM=260:286/VLIM=16:33/Z=0.:0./T="01-Apr-2007":"01-Apr-2007" !-> DEFINE SYMBOL ferret_curvi_quals MODULO/HLIM=260:286/VLIM=16:33/Z=0.:0./T="01-Apr-2007":"01-Apr-2007" CANCEL SYMBOL ferret_use_graticule

 ENDIF  ! setup for NOT curv-to-rect regridding

! Or set up for native slices: Sample in the X and Y directions of the slice

ELIF STRLEN ("($ferret_view)") LE 2 THEN !-> ELIF 1 THEN ENDIF ENDIF

ENDIF ! native curvilinear plots or slices.

! End of $RCSfile ------------transform_curvi_xy.jnl-------------------------------

ELIF ($do_hybrid_z) THEN ! Set up to deal with hybrid-Z data. !-> ELIF 0 THEN ENDIF

! End of $RCSfile ------------LAS_transforms.jnl-------------------------------

! Keep track of variables initialized, to tell us if next time we ! want ferret_expression or ferret_expression2

DEFINE SYMBOL variables_initialized 1 + ($variables_initialized"0") !-> DEFINE SYMBOL variables_initialized 2

IF ($variables_initialized) EQ ($data_count) THEN !-> IF 0 THEN ENDIF ENDIF

! End of $RCSfile ------------LAS_initialize_variable.jnl--------------------------

! End of $RCSfile ------------LAS_initialize_data.jnl--------------------------

! Here is the variable we will list out, with the region specified. DEFINE SYMBOL ferret_list_var = ($ferret_plot_var) !-> DEFINE SYMBOL ferret_list_var = plot_var , xcoord, ycoord

DEFINE SYMBOL imin ($ferret_list_var),return=xstart

Migrated-From: http://dunkel.pmel.noaa.gov/trac/las/ticket/247

karlmsmith commented 6 years ago

Comment by jing.y.li on 23 Oct 2007 19:18 UTC move to "Projects - PRIDE"

karlmsmith commented 6 years ago

Comment by jing.y.li on 27 Nov 2007 21:54 UTC Ansley:

To fix this error for HYCOM data, the list_frames.jnl script needs lots of changes. I don't feel comfortable in writing scripts for HYCOM data. Could you please take care of this problem?

Thanks.

Jing

karlmsmith commented 6 years ago

Comment by @AnsleyManke on 27 Nov 2007 23:22 UTC I have changed list_frames.jnl so that it works for a data variable on a curvilinear grid. It operates on ferret_plot_base_var which is the data field only; in the LAS ferret scripts for curvilinear data, the plot variable has been defined as ferret_plot_var = data_var,xcoord,ycoord.

I don't know if the script should write any information about the curvilinear grid to the xml file. Leaving the ticket open until the script is tested and we see if more is needed to correctly make the product.

karlmsmith commented 6 years ago

Comment by jing.y.li on 28 Nov 2007 18:49 UTC

DEFINE SYMBOL nt `($ferret_plot_base_var),return=lsize`

gives error like:

*ERROR: illegal limits: TEMPERATURE does not exist at X=203.7:246.8
          Axis extremes are X=1619.5:2160.5
DEFINE SYMBOL nt `temperature[d=1,X=203.68:246.8,Y=19.606:76.053,Z=0.:0.,T="12-Apr-2007 00:00:00":"12-Apr-2007 00:00:00"],return=lsize`
Command file, command group, or REPEAT execution aborted
STOP -script mode, ERROR RUNNING SCRIPT statement executed
karlmsmith commented 6 years ago

Comment by @AnsleyManke on 28 Nov 2007 19:24 UTC Further fixes to list_frames.jnl. For curvilinear data, specify the XY region for the variable using the IJ box limits that were previously computed.

karlmsmith commented 6 years ago

Modified by steven.c.hankin on 7 Feb 2008 21:54 UTC

karlmsmith commented 6 years ago

Modified by @kevin-obrien on 8 Feb 2008 18:25 UTC

karlmsmith commented 6 years ago

Comment by @AnsleyManke on 13 Feb 2008 20:22 UTC This is fixed in LAS_auto_levels_animate.jnl which had previously not been set up to work with curvilinear data.