[ncl-talk] Fw: lintint2_points

Ehsan Taghizadeh ehsantaghizadeh at yahoo.com
Mon Jan 29 09:23:43 MST 2018


 Hi,
I want to interpolate soil moisture data from SMAP (Soil Moisture Ative/Passive) to some specified locations (in stations_NW.csv attached file). Some information of data are as belows.
printVarSummary(lat2d)
Variable: lat2dType: floatTotal Size: 1565536 bytes            391384 valuesNumber of Dimensions: 2Dimensions and sizes:   [DIM_000 | 406] x [DIM_001 | 964]Coordinates:Number Of Attributes: 2  long_name :   Latitude of the center of the Earth based grid cell.  units :       degrees_north
printVarSummary(lon2d)
Variable: lon2dType: floatTotal Size: 1565536 bytes            391384 valuesNumber of Dimensions: 2Dimensions and sizes:   [DIM_000 | 406] x [DIM_001 | 964]Coordinates:Number Of Attributes: 2  long_name :   Longitude of the center of the Earth based grid cell.  units :       degrees_east
printVarSummary(var):
Variable: varType: floatTotal Size: 1565536 bytes            391384 valuesNumber of Dimensions: 2Dimensions and sizes:   [DIM_000 | 406] x [DIM_001 | 964]Coordinates:Number Of Attributes: 6  _FillValue :  -9999  coordinates : /Soil_Moisture_Retrieval_Data_AM/latitude /Soil_Moisture_Retrieval_Data_AM/longitude  long_name :   Representative soil moisture measurement for the Earth based grid cell.  units :       cm**3/cm**3  valid_max :   0.5  valid_min :   0.02
However I've faced below error:
fatal:(lon) is not a dimension name in variable (var), could not determine dimension number

I searched in google and I found may be "There is no 'lon' dimension name. In fact, there are no latitude/longitude coordinates on the file at all."
So I used following line:    SMAP_fo = linint2_points(lon2d,lat2d,var(DIM_000 | :, DIM_001 | :), False , lon_NW, lat_NW, 0)
instead of:    SMAP_fo = linint2_points(lon2d,lat2d,var(lat | :, lon | :), False , lon_NW, lat_NW, 0)
and after that I faced following error:fatal:linint2_points: If xi is not one-dimensional, then it must have one less dimension than fi

After that I added following lines to the script:    lat1d = ndtooned(lat2d)    lon1d = ndtooned(lon2d)
Again I had following error:fatal:linint2_points: The rightmost dimensions of fi must be nyi x nxi, where nyi and nxi are the lengths of yi and xi respectively

And here I'm not sure about what I've done.I've attached the script, stations_NW.csv (input for unstructured points) and links.txt (which contains links for downloading SMAP data. Sorry about that but I couldn't attach SMAP files, because of their sizes. However to download them it is necessary to have earthdata user name!).
I'll be thankful if I could have your help, again.
SincerelyEhsan
    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180129/7159ddb3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stations_NW.csv
Type: application/vnd.ms-excel
Size: 5565 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180129/7159ddb3/attachment.xlb>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2_SPL3SMP_E_Interpolating.ncl
Type: application/octet-stream
Size: 3812 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180129/7159ddb3/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: links.txt
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180129/7159ddb3/attachment.txt>


More information about the ncl-talk mailing list