Skip to content

Commit

Permalink
review corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
givelberg committed Sep 10, 2024
1 parent 48f9c54 commit 001c793
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 20 deletions.
27 changes: 13 additions & 14 deletions test/soca/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ function(CREATE_CONFIG_FILE test_config_in test_config_out bufr_input_dir ioda_o
endfunction()


# set(TEST_WORKING_DIR "/scratch1/NCEPDEV/stmp2/Edward.Givelberg/RUNDIRS/GFSv17-3DVAR-C384mx025/prepoceanobs.114138")
set(TEST_WORKING_DIR ${PROJECT_BINARY_DIR}/test/soca)
message("bufr to ioda: TEST_WORKING_DIR = ${TEST_WORKING_DIR}")

Expand All @@ -63,22 +62,22 @@ set(CONFIG_DIR ${PROJECT_SOURCE_DIR}/test/soca/testinput)
set(TESTREF_DIR ${PROJECT_SOURCE_DIR}/test/soca/testref)

# find the staging directory for bufr test input files ${BUFR_TEST_DIR}
# checking on orion and hera
# bufr input files on orion:
set(BUFR_TEST_DIR
"/work/noaa/da/marineda/gfs-marine/data/obs/ci/bufr"
# "/work/noaa/da/marineda/gfs-marine/data/obs/ci/obs"
# ${TEST_WORKING_DIR} # temporary fix
)
if (NOT EXISTS ${BUFR_TEST_DIR})
# bufr input files on hera:
set(BUFR_TEST_DIR
"/scratch1/NCEPDEV/da/common/ci/bufr"
# "/scratch1/NCEPDEV/da/common/ci/obs"
# ${TEST_WORKING_DIR} # temporary fix
)
endif()
if (NOT EXISTS ${BUFR_TEST_DIR})
message(FATAL_ERROR "staging directory for BUFR test files ${BUFR_TEST_DIR} not found")
message("staging directory for BUFR test files ${BUFR_TEST_DIR} not found")
set(GENERATE_BUFR2IODA_TESTS FALSE)
else()
set(GENERATE_BUFR2IODA_TESTS TRUE)
endif()


Expand Down Expand Up @@ -120,11 +119,11 @@ function(ADD_INSITU_TEST testname testbufr)
endfunction()


ADD_INSITU_TEST("profile_argo" "subpfl")
ADD_INSITU_TEST("profile_bathy" "bathy")
ADD_INSITU_TEST("profile_glider" "subpfl")
# ADD_INSITU_TEST(profile_marinemammal)
ADD_INSITU_TEST("profile_tesac" "tesac")
ADD_INSITU_TEST("profile_xbtctd" "xbtctd")
# ADD_INSITU_TEST(surface_altkob)
ADD_INSITU_TEST("surface_trkob" "trkob")
if (GENERATE_BUFR2IODA_TESTS)
ADD_INSITU_TEST("profile_argo" "subpfl")
ADD_INSITU_TEST("profile_bathy" "bathy")
ADD_INSITU_TEST("profile_glider" "subpfl")
ADD_INSITU_TEST("profile_tesac" "tesac")
ADD_INSITU_TEST("profile_xbtctd" "xbtctd")
ADD_INSITU_TEST("surface_trkob" "trkob")
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ temp hash = c00bbe5d969f8de8232ae22cd0948621e6b3e326e4931cdcfa2f7dd4d2509879
seqNum: 1751, int32 min, max = 0, 2
seqNum hash = 7429963169776e1dc0d26732c5053c7e81131cc66654c23aa6393258e9b5b9ae
PreQC: 1751, int32 min, max = 0, 0
ObsError_temp: 1751, float32 min, max = 0.0, 0.0
ObsError_temp: 1751, float32 min, max = 0.23999999463558197, 0.23999999463558197
OceanBasin: 1751, int32 min, max = 1, 1
OceanBasin hash = 7de61dfe030e0fabc021c5e1c509cbd2f01afba06ac93959f94c5726d513937f
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
platform_description)

ioda_vars = BathyIODAVariables()
# ??? ioda_vars.SetTemperatureError(0.3)
# ??? ioda_vars.SetSalinityError(1.0)
ioda_vars.SetTemperatureError(0.24)
ioda_vars.SetTemperatureVarName("waterTemperature")

bathy = Bufr2ioda_Converter(bufr2ioda_config, ioda_vars, log_file)
Expand Down
10 changes: 7 additions & 3 deletions ush/ioda/bufr2ioda/marine/b2i/bufr_plot_stations.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# a simple script to plot stations
# Usage: python3 bufr_plot_stations.py -i BUFR_FILE_NAME
# output is produced in the file "stations.png"

# the bufr query strings will not always work;
# in some cases they need to be changed to CLONH, CLATH

import argparse

from pyiodaconv import bufr
Expand Down Expand Up @@ -44,9 +51,6 @@ def plot_points_on_map(latitudes, longitudes, title='Map with Points', marker_co
plt.savefig(png_file, dpi=300)


# bufrfile_path = "/scratch1/NCEPDEV/stmp2/Edward.Givelberg/RUNDIRS/GFSv17-3DVAR-C384mx025/prepoceanobs.114138/xx003"


parser = argparse.ArgumentParser()
parser.add_argument(
'-i', '--input',
Expand Down
Binary file removed ush/ioda/bufr2ioda/marine/b2i/stations.png
Binary file not shown.

0 comments on commit 001c793

Please sign in to comment.