fimex:faq

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

fimex:faq [2013-09-14 13:15:54]
heikok [Vector-rotation gives error-message (>= 0.48) or wrong values due to different units]
fimex:faq [2022-05-31 09:29:32]
Line 1: Line 1:
-====== Frequently Asked Questions ====== 
- 
-===== How to solve problems with a short variable? =====  
-I have problems with a felt-file with a variable of type 'short'. fimex abborts with<code>change in scaling-factor for parameter: 31,2,1000 consider using float or double datatpye</code> What should I do? 
-  - While the netcdf-format allows for only 1 scaling-factor per variable, the felt-format can have a scaling-factor per 2d-slice per variable (that are level*time scaling-factors). You should change the //type// of the variable and its //_FillValue// attribute from //short// to //float// in the file felt2nc_variables.xml. 
-  - If you want to save disk-space, and you know that all data of the variable can be subscribed sufficiently with a packed short data-array, use the ncml-configuration as follows: <code> 
-<?xml version="1.0" encoding="UTF-8"?> 
-<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2" 
-           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-           xsi:schemaLocation="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2 ncml-2.2.xsd "> 
-<!-- change the type of a variable, repack --> 
-<variable name="precipitation_amount" type="short"> 
-   <attribute name="_FillValue" value="-32767" type="short" /> 
-   <attribute name="scale_factor" value="0.1" type="float" /> 
-   <attribute name="add_offset" value="0" type="double" /> 
-</variable> 
-</netcdf> 
-</code> 
-In this example, the precipitation will be described with an accuracy of 0.1mm and up to 3276.7mm. The ncml-configfile will be applied right before writing with the ''--ncml.config=....ncml'' fimex-option. 
- 
-===== Vector-rotation gives error-message (>= 0.48) and wrong values due to different units ===== 
- 
-When rotating vectors for spatial interpolations, fimex does not change the scale_factor, add_offset or unit of the vector-components, but requires, that those are equal for both x and y component of the vector. This happens in particular when retrieving wind-data from ECMWF in netcdf, e.g. for ERA data. 
- 
-A solution is to configure the vector to have the same scale/add_offset, e.g. with ncml (--input.config): 
- 
-<code> 
-<variable orgName="Uvind" name="x_wind" type="float"> 
-  <attribute name="scale_factor" value="1" type="float" /> 
-  <attribute name="add_offset" value="0" type="float" /> 
-  <remove name="_FillValue"  type="attribute" /> 
-  <attribute name="standard_name" value="x_wind" type="String" /> 
-</variable> 
- 
-<variable orgName="Vvind" name="y_wind" type="float" > 
-  <attribute name="scale_factor" value="1" type="float" /> 
-  <attribute name="add_offset" value="0" type="float" /> 
-  <remove name="_FillValue"  type="attribute" /> 
-  <attribute name="standard_name" value="y_wind" type="String" /> 
-</variable> 
-</code> 
- 
- 
-===== What does this error-message mean? ===== 
- 
-==== CDMException: Felt_File_Error: FeltError: cannot read gridParameters: no Felt_Array2 available ==== 
- 
-The config-file for felt-files must at least define 1 existing parameter in the corresponding felt-file. Update your config-file (e.g. felt2nc_variables.xml) with the output from the felt-index, which can be read by felt-tools like ''rfinh''. 
- 
-==== CDMException: Can't open HDF5 attribute ==== 
- 
-This error-message is unfortuneatly very misleading. In many cases, the ''_FillValue'' type does not correspond to the variables type. Please check your config-file. Unless really required, it's recommended to remove the ''_FillValue''. 
- 
-===== How can I read grib-message which are split over several files? ===== 
- 
-since fimex 0.40.1, it is possible to give multiple optional file-sources: 
-<code> 
-fimex --input.file=/opdata/lameps/mle/eceps_201211260000_ens00.mars \ 
-      --input.type=grb --input.config=/home/heikok/Programme/MetSis/Fimex/share/etc/cdmGribReaderConfig.xml \ 
-      --input.optional=/opdata/lameps/mle/eceps_201211260000_ens01.mars \ 
-      --input.optional=/opdata/lameps/mle/eceps_201211260000_ens02.mars \ 
-      --output.file=eceps.nc4 
-</code> 
- 
-===== How to use fimex as opendap-client? ===== 
- 
-==== Install netcdf with integrated dap-support ==== 
- 
-=== Prerequisites === 
- 
-  * netcdf4 (4.1.1) from unidata 
-  * curl library: ''sudo apt-get install libcurl4-gnutls-dev'' (on ubuntu hardy) 
-  * make sure to remove the libnetcdf4-dev package (on ubuntu hardy): ''apt-get remove libnetcdf4-dev'' 
- 
-=== Build === 
- 
-Configuring, without HDF-file support (can be added if desired). Important: include dap-support via curl; build shared libraries (libtool autodetect dependencies) 
- 
-<code> 
-./configure --prefix=/usr/local/netcdf4.1.1 --enable-dap --with-curl-config=/usr/bin/curl-config --enable-shared --disable-static 
-make -k # there might be errors building the man-pages depending on tex-installation 
-make check 
-make -k install 
-</code> 
- 
-==== Fimex and OpENDAP ==== 
- 
-=== Build === 
- 
-<code> 
-./configure --with-netcdf=/usr/local/netcdf4.1.1 
-</code> 
- 
-=== Running an extraction from opendap === 
- 
-<code> 
-fimex --input.file=http://thredds.met.no/thredds/dodsC/topaz/dataset-topaz3-arc-myocean-be \ 
-      --input.type=netcdf \ 
-      --output.type=netcdf \ 
-      --output.file=test.nc \ 
-\ 
-      --extract.selectVariables=time \ 
-      --extract.selectVariables=x \ 
-      --extract.selectVariables=y \ 
-      --extract.selectVariables=depth \ 
-      --extract.selectVariables=longitude \ 
-      --extract.selectVariables=latitude \ 
-      --extract.selectVariables=temperature \ 
-\ 
-      --extract.reduceTime.start=2010-10-05 \ 
-      --extract.reduceTime.end=2010-10-07 \ 
-\ 
-      --extract.reduceToBoundingBox.south 55.0 \ 
-      --extract.reduceToBoundingBox.north 80.0 \ 
-      --extract.reduceToBoundingBox.east 20.0 \ 
-      --extract.reduceToBoundingBox.west -5.0 
- 
-</code> 
- 
- 
- 
-===== Why takes linking with ''g++ -g''  ages? ===== 
- 
-This happens with older versions of gcc, seen with 3.3 on debian sarge. 
- 
-Use ''-gstabs'' or ''-ggdb'' instead of ''-g''. For debugging, this is better suited to c++ code and works with the GNU utils and most other debugger, too. (But unfortunately  not with /valgrind/. 
  
  • fimex/faq.txt
  • Last modified: 2022-05-31 09:29:32
  • (external edit)