[ncl-talk] smops interpolation
Dennis Shea
shea at ucar.edu
Fri Aug 31 07:44:51 MDT 2018
Sometimes, you have to read documentation associated with the file(s)
*Soil Moisture* Operational Products System (*SMOPS*)
The file has:
netcdf NPR_SMOPS_CMAP_D20170410 {
dimensions:
* Longitude = 1440 ; Latitude = 720 ;*
variables:
*short* Blended_SM(*Latitude, Longitude*) ;
Blended_SM:long_name = "Blended Soil Moisture" ;
Blended_SM:units = "m^3/m^3" ;
Blended_SM:FillValue = -999s ;
Blended_SM:valid_range = 0s, 10000s ;
Blended_SM:*scale_factor *= 0.0001f ;
Blended_SM:*add_offset* = 0.f ;
[SNIP]
:Product_Resolution = "0.25 degree" ;
:Date_Start = "20170410" ;
:Date_End = "20170410" ;
[SNIP]
====
It does not have Latitude[*] and Longitude[*] coordinates. However, **you**
can create them. Then, use ESMF or (say)* linint2_Wrap *
<https://www.ncl.ucar.edu/Document/Functions/Contributed/linint2_Wrap.shtml>or
*linint2_points_Wrap*
<https://www.ncl.ucar.edu/Document/Functions/Contributed/linint2_points_Wrap.shtml>
to perform the interpolation.
====
nlat = 720
latitude = *fspan*(-49.875, 49.875, nlat)
latitude at units = "degrees_east"
latitude at long_name = "latitude"
latitude!0 = "latitude"
latitude&latitude = latitude
printVarSummary(latitude)
printMinMax(latitude,0)
mlon = 1440
longitude = *lonGlobeFo*
<https://www.ncl.ucar.edu/Document/Functions/Contributed/lonGlobeFo.shtml>(mlon,
"longitude", "longitude", "degrees_east") ; 0->360
longitude = (/ longitude - 180. /) ; subtract 180 from all values
longitude&longitude = longitude ; update coordinates
printVarSummary(lon)
printVarSummary(longitude)
printMinMax(longitude,0)
f = *addfile*("NPR_SMOPS_CMAP_D20170410.nc","r")
x = *short2flt*
<https://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml>(
f->Blended_SM )
x&latitude = latitude
x&longitude = longitude
printVarSummary(x)
On Fri, Aug 31, 2018 at 5:45 AM, Ehsan Taghizadeh <ehsantaghizadeh at yahoo.com
> wrote:
> Hi,
> Until now I've asked some questions related to interpolating some dataset
> on some unstructured points (synoptic stations). Now I have a new data set
> which I'm not sure about appropriate method to interpolating. I put one of
> my data (NPR_SMOPS_CMAP_D20170410.nc) in ftp.cgd.ucar.edu. I'll be
> thankful if some one could refer me to correct script, like on (
> https://www.ncl.ucar.edu/Applications/ESMF.shtml) or (
> https://www.ncl.ucar.edu/Applications/regrid.shtml), which interpolates
> my data on some special unstructured points.
> However the printVarSummary(Blended_SM) result is as below:
>
> Variable: Blended_SM
> Type: float
> Total Size: 4147200 bytes
> 1036800 values
> Number of Dimensions: 2
> Dimensions and sizes: [Latitude | 720] x [Longitude | 1440]
> Coordinates:
> Number Of Attributes: 5
> _FillValue : 1e+20
> long_name : Blended Soil Moisture
> units : m^3/m^3
> FillValue : -999
> valid_range : ( 0, 1 )
>
>
> Sincerely
> Ehsan
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180831/aa77a11e/attachment.html>
More information about the ncl-talk
mailing list