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
dfb8333c
Commit
dfb8333c
authored
Sep 20, 2018
by
Ian Boyd
Browse files
Upload New File
parent
0abec463
Changes
1
Hide whitespace changes
Inline
Side-by-side
cds_LIDAR.pro
0 → 100644
View file @
dfb8333c
;
---------------------------------------------------------------------------------------------------
;
;
name
:
cds_LIDAR
.
pro
;
description
:
Wrapper
for
AVDC
CDS
LIDAR
tool
;
;
2011
-
06
-
01
,
v1
.
0
Christian
Retscher
;
2011
-
08
-
14
,
v1
.
1
Ian
Boyd
-
Add
special
case
for
1988
Table
Mountain
measurements
,
which
should
not
be
processed
,
;
Returns
an
error_code
of
3
;
2011
-
08
-
16
,
v1
.
5
Ian
Boyd
-
Change
NDACC_Lidar_HDF4
.
pro
call
to
NDACC_Lidar_HDF
.
pro
;
;
---------------------------------------------------------------------------------------------------
FUNCTION
cds_LIDAR
,
chFileOrig
,
chFileGEOMSTE
,
metadir
,
tav
,
hdfdir
,
iDataType
;
derive
ames
dir
amesdir
=
FILE_DIRNAME
(
chFileOrig
)
+
'/'
chFileOrigBase
=
FILE_BASENAME
(
chFileOrig
)
chFileOrigBaseArr
=
STRSPLIT
(
chFileOrigBase
,
'.'
,
ESCAPE
=
'\'
,
/
EXTRACT
)
;
determine
pi
,
date
,
and
filter
site
=
STRLOWCASE
(
STRMID
(
chFileOrigBase
,
0
,
2
))
species
=
STRLOWCASE
(
STRMID
(
chFileOrigBase
,
2
,
2
))
year
=
STRMID
(
chFileOrigBase
,
4
,
2
)
month
=
STRMID
(
chFileOrigBase
,
6
,
2
)
pi
=
STRLOWCASE
(
STRMID
(
chFileOrigBaseArr
(
1
),
0
,
2
))
if
(
year
ge
80
)
then
begin
year
=
'19'
+
string
(
year
)
end
else
begin
year
=
'20'
+
string
(
year
)
end
;
special
case
-
do
not
process
1988
measurements
from
Table
Mountain
iDoNotProcess
=
0
if
(
year
eq
'1988'
)
and
(
site
eq
'tm'
)
then
iDoNotProcess
=
1
chFileGEOMSTEBase
=
FILE_BASENAME
(
chFileGEOMSTE
)
chFileGEOMSTEBaseArr
=
STRSPLIT
(
STRUPCASE
(
chFileGEOMSTEBase
),
'-.'
,
ESCAPE
=
'\'
,
/
EXTRACT
)
if
iDoNotProcess
eq
0
then
begin
if
((
chFileGEOMSTEBaseArr
(
2
)
eq
'LIDAR'
)
and
(
pi
eq
'mg'
))
then
begin
if
(
chFileGEOMSTEBaseArr
(
3
)
eq
'O3'
)
and
(
species
eq
'tg'
)
then
chgas
=
'o3'
$
else
if
(
chFileGEOMSTEBaseArr
(
3
)
eq
'TEMPERATURE'
)
and
(
species
eq
'tg'
)
then
chgas
=
'te'
$
else
if
(
chFileGEOMSTEBaseArr
(
3
)
eq
'TEMPERATURE'
)
and
(
species
eq
't2'
)
then
chgas
=
'te'
$
else
return
,
3
print
,
'LIDAR: McGee filter '
+
chgas
+
': '
+
species
if
(
iDataType
eq
'h5'
)
then
begin
NDACC_Lidar_HDF
,
site
,
chgas
,
year
,
month
,
pi
,
mcgee
=
species
,
ames_dir
=
amesdir
,
meta_dir
=
metadir
,
hdf_dir
=
hdfdir
,
tav
=
tav
,
h5
=
'h5'
end
else
if
(
iDataType
eq
'nc'
)
then
begin
NDACC_Lidar_HDF
,
site
,
chgas
,
year
,
month
,
pi
,
mcgee
=
species
,
ames_dir
=
amesdir
,
meta_dir
=
metadir
,
hdf_dir
=
hdfdir
,
tav
=
tav
,
nc
=
'nc'
end
else
begin
NDACC_Lidar_HDF
,
site
,
chgas
,
year
,
month
,
pi
,
mcgee
=
species
,
ames_dir
=
amesdir
,
meta_dir
=
metadir
,
hdf_dir
=
hdfdir
,
tav
=
tav
end
end
else
begin
if
(
iDataType
eq
'h5'
)
then
begin
NDACC_Lidar_HDF
,
site
,
species
,
year
,
month
,
pi
,
ames_dir
=
amesdir
,
meta_dir
=
metadir
,
hdf_dir
=
hdfdir
,
tav
=
tav
,
h5
=
'h5'
end
else
if
(
iDataType
eq
'nc'
)
then
begin
NDACC_Lidar_HDF
,
site
,
species
,
year
,
month
,
pi
,
ames_dir
=
amesdir
,
meta_dir
=
metadir
,
hdf_dir
=
hdfdir
,
tav
=
tav
,
nc
=
'nc'
end
else
begin
NDACC_Lidar_HDF
,
site
,
species
,
year
,
month
,
pi
,
ames_dir
=
amesdir
,
meta_dir
=
metadir
,
hdf_dir
=
hdfdir
,
tav
=
tav
end
end
return
,
0
endif
else
return
,
3
END
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