Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cdo
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpim-sw
cdo
Commits
9e670e14
Commit
9e670e14
authored
15 years ago
by
Uwe Schulzweida
Browse files
Options
Downloads
Patches
Plain Diff
Docu update
parent
bb581e54
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ChangeLog
+1
-0
1 addition, 0 deletions
ChangeLog
doc/tex/mod/Importcmsaf
+22
-2
22 additions, 2 deletions
doc/tex/mod/Importcmsaf
src/Importcmsaf.c
+17
-3
17 additions, 3 deletions
src/Importcmsaf.c
with
40 additions
and
5 deletions
ChangeLog
+
1
−
0
View file @
9e670e14
...
...
@@ -9,6 +9,7 @@
* mergegrid: added support for rotated lon/lat grids
* Seasstat: added env. CDO_SEASON_START to set the start month of seasons [request: Laurent Mortier]
* remapnn: added support for GRID_CELL without bounds (full grid search)
* import_cmsaf: read native float datatype and convert it to double
* ieg: added support for Gaussian grids [request: Ralf Podzun]
* store_link_cnsrv: remove two restrict keywords (bug fix) [report: Clement Alo]
* shifttime: bug fix for negative time increments [report: Andreas Hnsler]
...
...
This diff is collapsed.
Click to expand it.
doc/tex/mod/Importcmsaf
+
22
−
2
View file @
9e670e14
...
...
@@ -94,8 +94,28 @@ functionality.
@BeginExample
To convert a CM-SAF HDF5 file to netCDF use:
@C To convert a CM-SAF HDF5 file to netCDF use:
@C @BeginVerbatim
@C cdo -f nc import_cmsaf ifile.h5 ofile.nc
@C @EndVerbatim
A typical sequence of commands with this operator could look like this:
@BeginVerbatim
cdo -f nc
import_cmsaf ifile.h5 ofile
.nc
cdo -f nc
remapbil,r360x180 -import_cmsaf cmsaf_product.hdf output
.nc
@EndVerbatim
(bilinear remapping to a predefined global grid with 1 deg resolution and conversion to netcdf). \\
If you work with CM-SAF data on original satellite project, an additional file
with information on geolocation is required, to perform such spatial operations:
@BeginVerbatim
cdo -f nc remapbil,r720x360 -setgrid,cmsaf_latlon.h5 -import_cmsaf cmsaf.hdf output.nc
@EndVerbatim
Some CM-SAF data are stored as scaled integer values. For some operations, it
could be desirable (or necessary) to increase the accuracy of the converted
products:
@BeginVerbatim
cdo -b f32 -f nc fldmean -sellonlatbox,0,10,0,10 -remapbil,r720x360 \
-import_cmsaf cmsaf_product.hdf output.nc
@EndVerbatim
@EndExample
This diff is collapsed.
Click to expand it.
src/Importcmsaf.c
+
17
−
3
View file @
9e670e14
...
...
@@ -985,9 +985,23 @@ void read_dataset(hid_t loc_id, const char *name, void *opdata)
if
(
ftype
)
{
status
=
H5Dread
(
dset_id
,
H5T_NATIVE_DOUBLE
,
H5S_ALL
,
H5S_ALL
,
H5P_DEFAULT
,
array
);
if
(
status
<
0
)
cdoAbort
(
"Reading of NATIVE_DOUBLE variable %s failed!"
,
varname
);
if
(
dtype
==
DATATYPE_FLT32
)
{
float
*
farray
;
int
i
;
farray
=
(
float
*
)
malloc
(
gridsize
*
nt
*
sizeof
(
float
));
status
=
H5Dread
(
dset_id
,
H5T_NATIVE_FLOAT
,
H5S_ALL
,
H5S_ALL
,
H5P_DEFAULT
,
farray
);
if
(
status
<
0
)
cdoAbort
(
"Reading of NATIVE_FLOAT variable %s failed!"
,
varname
);
for
(
i
=
0
;
i
<
gridsize
*
nt
;
++
i
)
array
[
i
]
=
farray
[
i
];
free
(
farray
);
}
else
{
status
=
H5Dread
(
dset_id
,
H5T_NATIVE_DOUBLE
,
H5S_ALL
,
H5S_ALL
,
H5P_DEFAULT
,
array
);
if
(
status
<
0
)
cdoAbort
(
"Reading of NATIVE_DOUBLE variable %s failed!"
,
varname
);
}
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment