bartbrashers
New member
I have written a program (ghrsst-to-intermediate, beta testers wanted) that reads JPL PODAAC GHRSST netCDF files, and writes WPS Intermediate version 5 files. Another program interpolates Intermediate files in time (interp-intermediate).
Following the advice from this thread: https://forum.mmm.ucar.edu/phpBB3/viewtopic.php?f=31&t=9032, the program first writes the SST field, then the LANDSEA mask (found in the GHRSST files) to the SST:YYYY-MM-DD_HH output file.
If I run int2nc.exe on the SST file, it reports both fields:
However, in the netCDF file, the LANDSEA field values are from the SST field:
If I run interp-intermediate in debug mode to write out a point over water, I see that the values look correct (look for the "data = " lines below):
I looked at utils/src/int2nc.F, but the bug is not obvious.
I have uploaded sample SST:* and SST:*.nc file to the nextcloud.mmm.ucar.edu "Upload files to admin", named "SST_files_showing_int2nc_bug.zip".
I'll post my ghrsst-to-intermediate and interp-intermediate codes to Github shortly.
Following the advice from this thread: https://forum.mmm.ucar.edu/phpBB3/viewtopic.php?f=31&t=9032, the program first writes the SST field, then the LANDSEA mask (found in the GHRSST files) to the SST:YYYY-MM-DD_HH output file.
If I run int2nc.exe on the SST file, it reports both fields:
Code:
% /usr/local/src/wrf/WPS-4.1/util/int2nc.exe SST:2013-12-14_12
OPENING FILE: SST:2013-12-14_12
Reading Field, Level: SST, 200100
Reading Field, Level: LANDSEA, 200100
SUCCESSFUL COMPLETION OF PROGRAM INT2NC, SST:2013-12-14_12.nc WRITTEN.
However, in the netCDF file, the LANDSEA field values are from the SST field:
Code:
% ncks -s "%0.6f\n" -H -v SST__0200100 SST:2013-12-14_12.nc | head
276.412994
276.407990
276.408997
276.412994
276.417999
276.424988
276.432983
276.441986
276.451996
276.462982
% ncks -s "%0.6f\n" -H -v LANDSEA__0200100 SST:2013-12-14_12.nc | head
276.412994
276.407990
276.408997
276.412994
276.417999
276.424988
276.432983
276.441986
276.451996
276.462982
If I run interp-intermediate in debug mode to write out a point over water, I see that the values look correct (look for the "data = " lines below):
Code:
%interp-intermediate --debug --ij 2000 2000 -i SST:2013-12-14_12 SST:2013-12-15_12 -o SST:2013-12-14_18
Debug mode turned on.
Read infile1:
hdate = 2013-12-14_12:00:00
field = SST
units = K
desc = Sea Surface Temperature
nx,ny = 10202 5602
iproj = 0
I,J = 2000 2000
data = 292.5640
Read infile2:
hdate = 2013-12-15_12:00:00
field = SST
units = K
desc = Sea Surface Temperature
nx,ny = 10202 5602
iproj = 0
I,J = 2000 2000
data = 293.5480
Writing to outfile:
hdate = 2013-12-14_18:00:00
field = SST
units = K
desc = Sea Surface Temperature
nx,ny = 10202 5602
iproj = 0
I,J = 2000 2000
data = 292.8100
Read infile1:
hdate = 2013-12-14_12:00:00
field = LANDSEA
units =
desc = Land Sea Mask
nx,ny = 10202 5602
iproj = 0
I,J = 2000 2000
data = 0.000000
Read infile2:
hdate = 2013-12-15_12:00:00
field = LANDSEA
units =
desc = Land Sea Mask
nx,ny = 10202 5602
iproj = 0
I,J = 2000 2000
data = 0.000000
Writing to outfile:
hdate = 2013-12-14_18:00:00
field = LANDSEA
units =
desc = Land Sea Mask
nx,ny = 10202 5602
iproj = 0
I,J = 2000 2000
data = 0.000000
I looked at utils/src/int2nc.F, but the bug is not obvious.
I have uploaded sample SST:* and SST:*.nc file to the nextcloud.mmm.ucar.edu "Upload files to admin", named "SST_files_showing_int2nc_bug.zip".
I'll post my ghrsst-to-intermediate and interp-intermediate codes to Github shortly.