Comments (4)
Tested latest build from Tony. The config file with two spaces after the configFile definition still causes a failure, but now VERDI gives an error message, and the plots are not created.
./verdi_batch.csh
2024.01.25 15:14:47.791 [main] ERROR anl.verdi.commandline.BatchScriptHandler - Error in BatchScriptHandler.processTasks: Task is null. Cannot invoke "anl.verdi.plot.config.PlotConfiguration.getConfigFileName()" because "config" is null
BatchScriptHandler: Error in BatchScriptHandler.processTasks: Task is null. Cannot invoke "anl.verdi.plot.config.PlotConfiguration.getConfigFileName()" because "config" is null
java.lang.NullPointerException: Cannot invoke "anl.verdi.plot.config.PlotConfiguration.getConfigFileName()" because "config" is null
at anl.verdi.plot.gui.FastTilePlot.configure(FastTilePlot.java:2667)
at anl.verdi.commandline.task.TilePlotTask.run(TilePlotTask.java:148)
at anl.verdi.commandline.BatchScriptHandler.processTasks(BatchScriptHandler.java:146)
at anl.verdi.commandline.BatchScriptHandler.run(BatchScriptHandler.java:125)
at anl.verdi.core.VerdiPlugin.run(VerdiPlugin.java:150)
at saf.core.runtime.CorePlugin.runApplicationRunnable(CorePlugin.java:93)
at saf.core.runtime.CorePlugin.run(CorePlugin.java:48)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at saf.core.runtime.Boot.run(Boot.java:178)
at saf.core.runtime.Boot.main(Boot.java:388)
However, it gives this error whether there are two spaces after the configFile or not.
It isn't reading the configFile, even if it points to a valid configFile.
from verdi.
Using the following command line script, all three versions of VERDI that I am testing work to read the provided configFile and correctly generates the tile plot using the colorMap and legendBins used in the config file.
#!/bin/csh -f
cd /Users/lizadams/Downloads/VERDI_2.1.5_01_03/
./verdi.command -configFile /Users/lizadams/downloads/nolte_test/11bin.cfg -f /Users/lizadams/downloads/nolte_test/yearlyavg_aelmo_gmt_v54_cb6r3_ae7_aq_WR413_MYR_GCAM2CMAQ_12US1_Ref_2015 -s "PM25[1]" -f /Users/lizadams/downloads/nolte_test/yearlyavg_aelmo_gmt_v54_cb6r3_ae7_aq_WR413_MYR_GCAM2CMAQ_12US1_2015_2015 -s "PM25[2]" -s "PM25[2]-PM25[1]" -g tile -saveImage "png" /Users/lizadams/Downloads/nolte_test/PM25_Ref-2015_01-03gui -quit
cd /Users/lizadams/Downloads/VERDI_2.1.5_01_24/
./verdi.command -configFile /Users/lizadams/downloads/nolte_test/11bin.cfg -f /Users/lizadams/downloads/nolte_test/yearlyavg_aelmo_gmt_v54_cb6r3_ae7_aq_WR413_MYR_GCAM2CMAQ_12US1_Ref_2015 -s "PM25[1]" -f /Users/lizadams/downloads/nolte_test/yearlyavg_aelmo_gmt_v54_cb6r3_ae7_aq_WR413_MYR_GCAM2CMAQ_12US1_2015_2015 -s "PM25[2]" -s "PM25[2]-PM25[1]" -g tile -saveImage "png" /Users/lizadams/Downloads/nolte_test/PM25_Ref-2015_01-24gui -quit
cd /Users/lizadams/Downloads/VERDI_2.1.5_01_30/
./verdi.command -configFile /Users/lizadams/downloads/nolte_test/11bin.cfg -f /Users/lizadams/downloads/nolte_test/yearlyavg_aelmo_gmt_v54_cb6r3_ae7_aq_WR413_MYR_GCAM2CMAQ_12US1_Ref_2015 -s "PM25[1]" -f /Users/lizadams/downloads/nolte_test/yearlyavg_aelmo_gmt_v54_cb6r3_ae7_aq_WR413_MYR_GCAM2CMAQ_12US1_2015_2015 -s "PM25[2]" -s "PM25[2]-PM25[1]" -g tile -saveImage "png" /Users/lizadams/Downloads/nolte_test/PM25_Ref-2015_01-30gui -quit
Using the same config file using batch command line, fails for all except for the 01-03 build. Tony tried to fix the issue of spaces causing VERDI not to read and use the configFile for the 01-24 and 01-30 builds, but this fix does not work. An error is created for all of the versions except for the 01-03 build, but that build just ignores the configFile if there are blank spaces after the definition of the configFile. The configFile used for this test does not have any blank spaces, so VERDI should be able to read it, and produce plots that match the above CLI option.
#!/bin/csh -f
/Users/lizadams/downloads/VERDI_2.1.5_01_03/verdi.command -batch /Users/lizadams/Downloads/nolte_test/tileplot_png.txt
ls -lrt *.png
mv PM25_Ref-2015.png PM25_Ref-2015-01-03.png
mv PM25_OA_Ref-2015.png PM25_OA_Ref-2015-01-03.png
/Users/lizadams/downloads/VERDI_2.1.5_01_24/verdi.command -batch /Users/lizadams/Downloads/nolte_test/tileplot_png.txt
mv PM25_Ref-2015.png Ref-2015-01-24.png
mv PM25_OA_Ref-2015.png PM25_OA_Ref-2015-01-24.png
ls -lrt *.png
/Users/lizadams/downloads/VERDI_2.1.5_01_24/verdi.command -batch /Users/lizadams/Downloads/nolte_test/tileplot_png.txt
mv PM25_Ref-2015.png Ref-2015-01-30.png
mv PM25_OA_Ref-2015.png PM25_OA_Ref-2015-01-30.png
ls -lrt *.png
Contents of tileplot_png.txt
####################################################################################
# NOTE: Batch Scripting Language
#
# * All parameter/value pairs should be inside one of the two blocks --
# <Global/> or <Task/>
# * Number of blocks is not limited
# * Only one <Global/> block is recommended. <Global/> blocks should
# contains different items if use multiple <Global/> blocks
# * Parameter values in <Task/> blocks will override those in <Global/>
# * Currently supported parameters (keys, case insensitive):
# configFile -- configuration file full path
# f -- dataset file path/name
# dir -- dataset file folder
# pattern -- dataset file name pattern
# gtype -- plot type (tile, line, bar, vector)
# vector -- vector plot variables
# vectorTile -- vector plot variables
# s -- variable name
# ts -- time step
# titleString -- plot title
# subdomain -- xmin ymin xmax ymax
# subTitle1 -- plot subtitle one
# subTitle2 -- plot subtitle two
# saveImage -- image file type (png, jpeg, eps, etc.)
# imageFile -- image file path/name
# imageDir -- image file folder
# drawGridLines -- draw grid lines on the tile plot if 'yes'
# imageWidth -- image width
# imageHeight -- image height
# unitString -- units
#
#
####################################################################################
<Global>
dir=/Users/lizadams/downloads/nolte_test
configFile=/Users/lizadams/downloads/nolte_test/11bin.cfg
f=yearlyavg_aelmo_gmt_v54_cb6r3_ae7_aq_WR413_MYR_GCAM2CMAQ_12US1_Ref_2015
f=yearlyavg_aelmo_gmt_v54_cb6r3_ae7_aq_WR413_MYR_GCAM2CMAQ_12US1_2015_2015
#pattern=*CCTM46*
#s=[1]
saveImage=png
imageDir=/Users/lizadams/downloads/nolte_test
#subdomain=20 10 75 50
</Global>
#######################
# Data files picked #
# up from patterns #
# specified for names #
#######################
<Task>
s=PM25[1]-PM25[2]
imageFile=PM25_Ref-2015
gtype=tile
</Task>
<Task>
s=PM25_OA[1]-PM25_OA[2]
imageFile=PM25_OA_Ref-2015
gtype=tile
</Task>
Contents of the 11bin.cfg
<PlotConfig>
<property type="java.awt.Font" key="anl.verdi.plot.config.PlotConfiguration.domain_font" value="Lucida Grande-plain-13" />
<property type="java.awt.Color" key="anl.verdi.plot.config.PlotConfiguration.obs_legend_color" value="-16777216" />
<property type="java.awt.Font" key="anl.verdi.plot.config.PlotConfiguration.units_tick_font" value="Lucida Grande-plain-13" />
<property type="java.awt.Color" key="anl.verdi.plot.config.PlotConfiguration.domain_color" value="-12566464" />
<property type="java.awt.Color" key="anl.verdi.plot.config.PlotConfiguration.range_tick_color" value="-12566464" />
<property type="java.awt.Color" key="anl.verdi.plot.config.PlotConfiguration.footer_line_2_color" value="-16777216" />
<ColorMap intervalType="CUSTOM" scaleType="LINEAR" paletteType="DIVERGING" min="-2.5" max="2.5">
<Format type="java.text.DecimalFormat" pattern="#0.00" />
<Scale description="Color Scale">
<Step>-2.50</Step>
<Step>-2.00</Step>
<Step>-1.50</Step>
<Step>-0.50</Step>
<Step>-0.01</Step>
<Step> 0.01</Step>
<Step> 0.05</Step>
<Step> 0.50</Step>
<Step> 1.00</Step>
<Step> 1.50</Step>
<Step> 2.00</Step>
<Step> 2.50</Step>
</Scale>
<Palette description="Newton RGB (AVS)">
<Color>-0010455</Color>
<Color>-2615280</Color>
<Color>-10218999</Color>
<Color>-166217106</Color>
<Color>-217239139</Color>
<Color>-255255191</Color>
<Color>-254224139</Color>
<Color>-25317497</Color>
<Color>-24410967</Color>
<Color>-2154839</Color>
<Color>-1650038</Color>
</Palette>
</ColorMap>
</PlotConfig>
Java Error message
2024.01.30 18:02:40.977 [main] ERROR anl.verdi.commandline.BatchScriptHandler - Error in BatchScriptHandler.processTasks: Task is null. Cannot invoke "anl.verdi.plot.config.PlotConfiguration.getConfigFileName()" because "config" is null
BatchScriptHandler: Error in BatchScriptHandler.processTasks: Task is null. Cannot invoke "anl.verdi.plot.config.PlotConfiguration.getConfigFileName()" because "config" is null
java.lang.NullPointerException: Cannot invoke "anl.verdi.plot.config.PlotConfiguration.getConfigFileName()" because "config" is null
at anl.verdi.plot.gui.FastTilePlot.configure(FastTilePlot.java:2667)
at anl.verdi.commandline.task.TilePlotTask.run(TilePlotTask.java:148)
at anl.verdi.commandline.BatchScriptHandler.processTasks(BatchScriptHandler.java:146)
at anl.verdi.commandline.BatchScriptHandler.run(BatchScriptHandler.java:125)
at anl.verdi.core.VerdiPlugin.run(VerdiPlugin.java:150)
at saf.core.runtime.CorePlugin.runApplicationRunnable(CorePlugin.java:93)
at saf.core.runtime.CorePlugin.run(CorePlugin.java:48)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at saf.core.runtime.Boot.run(Boot.java:178)
at saf.core.runtime.Boot.main(Boot.java:388)
from verdi.
Tested VERDI_2.1.5_linux64_20240130.tar.gz on Atmos, tried both running the batch script from command window and directly open the batch text file in VERDI GUI, it did not work.
Below is the error message when ran the text file directly from VERDI GUI by File >>View Script Editor >>Run :
(this error also showed up when used the text file without extra white space)
Below is the error message from the command window:
from verdi.
Tested latest build VERDI_2.1.5_mac_20240131.tar.gz on mac.
Confirmed that the verdi batch script is able to read the configuration file and create plots using the settings in the configuration File for the following cases.
- batch script configuration file is specified as follows: configFile=/Users/lizadams/downloads/nolte_test/11bin.cfg
- batch script configuration file is specified as above, but with two blank spaces after the name
- batch script configuration file specifies a config file that uses hex colors
This issue is resolved.
from verdi.
Related Issues (20)
- Temporal and spatial accuracy when overlay aircraft data in a tile plot - testing VERDI 2.1.4 20221109 builds HOT 20
- Obs overlays not working in VERDI 2.1.4 20221109 version HOT 19
- Saving/opening VERDI project HOT 14
- The purpose of the "Domain" window in the Datasets panel HOT 8
- Failed to load GOES-16/-17 GLM datasets (in NetCDF format) in VERDI 20230425 builds HOT 7
- save tileplot as shapefile from gui HOT 8
- Opening MPAS mesh file with an error HOT 12
- Incorrect values for the probed grid cells after using "maximum_8hour_mean" stats in a tile plot HOT 6
- Support sub-domain on a Vertical Cross Section Plot HOT 9
- Incorrect Map Projection for Regional MPAS Mesh HOT 3
- Add ability to read MPAS "cdf5"-formatted output HOT 3
- High Priority: Update Java in VERDI to Java SE 17.0.8 or greater HOT 6
- create ascii file from tileplot variable from the command line and obtain projection information for GIS from shapefile with same name
- No loaders are available for the selected file HOT 6
- Visualize differences between time-independent model files HOT 1
- Reading data from one grid and adding the value of a cell to another grid
- Reading netCDF files with unconventional dimension names HOT 5
- Tile plot for 3D grid data with layer mean or sum quantities shown in 2D space HOT 11
- batch script does not turn off column/row labels and legend as specified in the configuration file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from verdi.