Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
geoms
cds_convert
Commits
85aedb6d
Commit
85aedb6d
authored
May 14, 2019
by
Ian Boyd
Browse files
Replace cds_tools.pro
parent
b902de9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
cds_tools.pro
View file @
85aedb6d
;
Main
Program
Version
:
cds_tools
.
pro
Release
v2
.
0
b5
6
,
201
81116
;
Main
Program
Version
:
cds_tools
.
pro
Release
v2
.
0
b5
9
,
201
90514
;
Written
by
Ian
Boyd
for
the
AVDC
/
EVDC
-
iboyd
@
astro
.
umass
.
edu
;
Sub
-
versions
:
;
20090828
:
Initial
Release
for
testing
-
v0
.
1
...
...
@@ -152,7 +152,12 @@
;
in
Celcius
(
affected
NDACC
NASA
Ames
only
)
-
v2
.
0
b54
;
20180901
,
Previous
fix
caused
crash
when
checking
non
-
NDACC
measurements
.
Fixed
in
;
this
version
-
v2
.
0
b55
;
20181116
Update
due
to
fix
in
idlcr8ascii
-
v2
.
0
b56
;
20181116
,
Update
due
to
fix
in
idlcr8ascii
-
v2
.
0
b56
;
20190314
,
Add
'LON360E TO GEOMS'
to
conv_chk
array
so
that
program
can
convert
longitude
;
values
using
the
0
-
360
E
convention
to
GEOMS
convention
.
Compiled
with
;
latest
idlcr8hdf
that
allows
for
HDF5
compression
-
v2
.
0
b57
;
20190506
,
Update
due
to
fix
in
idlcr8hdf
-
v2
.
0
b58
;
20190514
,
Update
due
to
fix
in
idlcr8ascii
-
v2
.
0
b59
;
Program
to
read
in
a
file
or
string
array
created
by
CDS_Match
(
or
equivalent
)
and
,
;
based
on
the
input
information
,
convert
NDACC
NASA
/
AMES
,
WOUDC
CSV
,
SHADOZ
,
NOAA
-
ESRL
or
...
...
@@ -1960,6 +1965,8 @@ PRO write_data, si, dv_arr, ndhse, holddata, vat, res, sectionb, ndacc, dyear, d
;
in
Celcius
(
affected
NDACC
NASA
Ames
only
)
-
v2
.
0
b54
;
20180901
:
Previous
fix
caused
crash
when
checking
non
-
NDACC
measurements
.
Fixed
in
;
this
version
-
v2
.
0
b55
;
20190314
:
Add
'LON360E TO GEOMS'
to
conv_chk
array
so
that
program
can
convert
longitude
;
values
using
the
0
-
360
E
convention
to
GEOMS
convention
-
v2
.
0
b57
;
;
Input
:
si
-
index
(
or
indices
)
of
NDACC
/
WOUDC
header
line
describing
the
data
being
searched
for
;
dv_arr
-
string
array
holding
the
DATA_VARIABLE
values
...
...
@@ -1983,7 +1990,7 @@ PRO write_data, si, dv_arr, ndhse, holddata, vat, res, sectionb, ndacc, dyear, d
;
Called
by
:
Convert
mv
=
STRTRIM
(
LONG
(
colsclfill
[
1
]),
2
)
;
'-90000'
;
dummy
value
in
holddata
(
if
changing
need
to
also
change
value
in
CONVERT
routine
)
conv_chk
=
[
'%'
,
'PP TO MR'
,
'PP TO ND'
,
'C TO K'
,
'INTERPOLATE_LOG_VALUES'
,
'TK TO T'
,
'F TO M'
]
;
Possible
conversion
factors
conv_chk
=
[
'%'
,
'PP TO MR'
,
'PP TO ND'
,
'C TO K'
,
'INTERPOLATE_LOG_VALUES'
,
'TK TO T'
,
'F TO M'
,
'LON360E TO GEOMS'
]
;
Possible
conversion
factors
dsize
=
datasize
;
holding
array
for
the
data
vdt
=
SIZE
(
datasize
,
/
TYPE
)
...
...
@@ -2598,6 +2605,11 @@ ENDIF ELSE IF res[3] EQ conv_chk[3] THEN BEGIN ;Convert C to K
IF
mcnt
NE
0
THEN
dsize
[
mi
]
=
dsize
[
mi
]
+
273.15
ENDIF
ELSE
IF
res
[
3
]
EQ
conv_chk
[
6
]
THEN
BEGIN
;
Convert
ft
to
m
IF
mcnt
NE
0
THEN
dsize
[
mi
]
=
dsize
[
mi
]
*
0.3048
ENDIF
ELSE
IF
res
[
3
]
EQ
conv_chk
[
7
]
THEN
BEGIN
;
Convert
longitude
360
E
convention
to
GEOMS
IF
mcnt
NE
0
THEN
BEGIN
lonhi
=
WHERE
(
dsize
[
mi
]
GT
180
.,
lonhcnt
)
IF
lonhcnt
NE
0
THEN
dsize
[
mi
[
lonhi
]]
=
dsize
[
mi
[
lonhi
]]
-
360
.
ENDIF
ENDIF
ELSE
BEGIN
;
Apply
Metadata
Scale
factor
to
the
data
(
given
in
Section
(
b
)
of
the
Translation
Table
)
IF
mcnt
NE
0
THEN
dsize
[
mi
]
=
dsize
[
mi
]
*
DOUBLE
(
res
[
3
])
...
...
@@ -3677,7 +3689,7 @@ FUNCTION cds_tools, listf, tav, outdir, dataformat, DATETIME=o1
;Initialize statusflag, and exit_code
statusflag='' & dum='' & exit_code=3
cdver='cds_tools
version
2.0
b5
6
,
201
8
-
11
-
1
6
'
cdver='cds_tools
version
2.0
b5
9
,
201
9
-
05
-
1
4
'
;Check input parameters
IF N_PARAMS() LT 3 THEN $
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment