Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature #2809 nc_laea #2811

Merged
merged 5 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions internal/test_unit/xml/unit_pcp_combine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -376,4 +376,16 @@
</output>
</test>

<test name="pcp_combine_LAEA_GRIB2">
<exec>&MET_BIN;/pcp_combine</exec>
<param> \
-add &DATA_DIR_MODEL;/grib2/ukv/ukv_agl_temperature_1.5_12.grib2 \
'name="TMP"; level="Z1.5"; lead_time="24";' \
&OUTPUT_DIR;/pcp_combine/ukv_agl_temperature_1.5.nc
</param>
<output>
<grid_nc>&OUTPUT_DIR;/pcp_combine/ukv_agl_temperature_1.5.nc</grid_nc>
</output>
</test>

</met_test>
15 changes: 15 additions & 0 deletions internal/test_unit/xml/unit_plot_data_plane.xml
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,21 @@
</output>
</test>

<test name="plot_data_plane_LAEA_MET_NC">
<exec>&MET_BIN;/plot_data_plane</exec>
<param> \
&OUTPUT_DIR;/pcp_combine/ukv_agl_temperature_1.5.nc \
&OUTPUT_DIR;/plot_data_plane/ukv_agl_temperature_laea_met_nc.ps \
'name="TMP_Z1.5"; level="(*,*)";' \
-title "MET NetCDF LAEA 1.5m Temperature" \
-v 1
</param>
<output>
<ps>&OUTPUT_DIR;/plot_data_plane/ukv_agl_temperature_laea_met_nc.ps</ps>
</output>
</test>


<test name="plot_data_plane_NCCF_POLAR_STEREO">
<exec>&MET_BIN;/plot_data_plane</exec>
<param> \
Expand Down
10 changes: 6 additions & 4 deletions src/libcode/vx_data2d_grib2/data2d_grib2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,8 @@ void MetGrib2DataFile::read_grib2_record_list() {

void MetGrib2DataFile::read_grib2_grid(gribfield *gfld) {

const char * method_name = "MetGrib2DataFile::read_grib2_grid() -> ";

double d, r_km;
int ResCompFlag;
char hem = 0;
Expand Down Expand Up @@ -1040,7 +1042,7 @@ void MetGrib2DataFile::read_grib2_grid(gribfield *gfld) {

// check for thinned lat/lon grid
if( data.Nlon == -1 ){
mlog << Error << "\nMetGrib2DataFile::read_grib2_grid() -> "
mlog << Error << "\n" << method_name
<< "Thinned Lat/Lon grids are not supported for GRIB version 2.\n\n";
exit(1);
}
Expand Down Expand Up @@ -1329,7 +1331,7 @@ void MetGrib2DataFile::read_grib2_grid(gribfield *gfld) {
// build an LaeaData struct with the projection information
LaeaData laea;
laea.name = laea_proj_type;
laea.spheroid_name = "Grib template";
m_strncpy(laea.spheroid_name, "Grib template",m_strlen("Grib template"), method_name);

// earth shape
// Reference: https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table3-2.shtml
Expand Down Expand Up @@ -1385,7 +1387,7 @@ void MetGrib2DataFile::read_grib2_grid(gribfield *gfld) {
break;

default:
mlog << Error << "\nMetGrib2DataFile::read_grib2_grid() -> "
mlog << Error << "\n" << method_name
<< "unsupported earth shape value of " << earth_shape_int << "!\n\n";
exit(1);
}
Expand Down Expand Up @@ -1433,7 +1435,7 @@ void MetGrib2DataFile::read_grib2_grid(gribfield *gfld) {
// unrecognized grid
else {

mlog << Error << "\nMetGrib2DataFile::read_grib2_grid() -> "
mlog << Error << "\n" << method_name
<< "found unrecognized grid definition (" << gfld->igdtnum << ")\n\n";
exit(1);

Expand Down
Loading
Loading