When reading in the following netCDF data (remove the .txt extension), which DOES NOT have a longitude, only latitude:
sa_test.nc.txt
The resulting pandas dataframe does not capture the level and latitude data into separate columns but instead creates an index comprised of the latitude and level:
The Xarray method to_dataframe() does not correctly handle this input data.
Expected Behavior
When using the METdataio.METreadnc.util.read_netcdf package to reformat netCDF data with only latitude (and no corresponding longitude), no errors are produced but the resulting data frame does not have the expected data columns corresponding to the level and latitude.
On 'cheyenne', you will observe an AttributeError: 'DataFrame' object has no attribute 'append'. Did you mean: '_append'? while running the read_netcdf.py script. Note: the append method has been deprecated in later versions of pandas, so this should be replaced with concat.
Environment
Describe your runtime environment:
1. Machine: (e.g. HPC name, Linux Workstation, Mac Laptop) cheyenne
2. OS: (e.g. RedHat Linux, MacOS) GNU/ Linux
3. Software version number(s) Linux cheyenne5 4.12.14-95.51-default #1 SMP Fri Apr 17 08:14:12 UTC 2020 (c6bab98) x86_64 x86_64 x86_64 GNU/Linux (output from uname -a)
To Reproduce
Describe the steps to reproduce the behavior:
Clone the METcalcpy and METdataio source code
Set up a Python environment
1. Go to 'METdataio/METreadnc/util
2. Copy the netcdf file to a data directory and set the CALCPY_DATA env variable
3. Set the PYTHONPATH to PATH-TO/METdataio/METreadnc:PATH-TO/METcalcpy:PATH-TO/METcalcpy/metcalcpy
4. From the METdataio/METreadnc/util directory run the following:
python
Post relevant sample data following these instructions:sa_test.nc.txt
Relevant Deadlines
List relevant project deadlines here or state NONE.
Funding Source
Define the source of funding and account keys here or state NONE.
Define the Metadata
Assignee
[x] Select engineer Minna Win
[x] Select no scientist required
Labels
[x] Select component(s)
[x] Select priority
[x] Select requestor(s)
Projects and Milestone
[ ] Select Organization level Project for support of the current coordinated release
[ ] Select Repository level Project for development toward the next official release or add alert: NEED CYCLE ASSIGNMENT label
[ ] Select Milestone as the next bugfix version
Define Related Issue(s)
Consider the impact to the other METplus components.
[ ] Submit a pull request to merge into main_\.
Pull request: bugfix <Issue Number> main_<Version> <Description>
[ ] Define the pull request metadata, as permissions allow.
Select: Reviewer(s) and Development issues
Select: Organization level software support Project for the current coordinated release
Select: Milestone as the next bugfix version
[ ] Iterate until the reviewer(s) accept and merge your changes.
[ ] Delete your fork or branch.
[ ] Complete the steps above to fix the bug on the develop branch.
Branch name: bugfix_<Issue Number>_develop_<Description>
Pull request: bugfix <Issue Number> develop <Description>
Select: Reviewer(s) and Development issues
Select: Repository level development cycle Project for the next official release
Select: Milestone as the next official version
Describe the Problem
When reading in the following netCDF data (remove the .txt extension), which DOES NOT have a longitude, only latitude: sa_test.nc.txt
The resulting pandas dataframe does not capture the level and latitude data into separate columns but instead creates an index comprised of the latitude and level:
The Xarray method to_dataframe() does not correctly handle this input data.
Expected Behavior
When using the METdataio.METreadnc.util.read_netcdf package to reformat netCDF data with only latitude (and no corresponding longitude), no errors are produced but the resulting data frame does not have the expected data columns corresponding to the level and latitude.
On 'cheyenne', you will observe an AttributeError: 'DataFrame' object has no attribute 'append'. Did you mean: '_append'? while running the read_netcdf.py script. Note: the append method has been deprecated in later versions of pandas, so this should be replaced with concat.
Environment
Describe your runtime environment: 1. Machine: (e.g. HPC name, Linux Workstation, Mac Laptop) cheyenne 2. OS: (e.g. RedHat Linux, MacOS) GNU/ Linux 3. Software version number(s) Linux cheyenne5 4.12.14-95.51-default #1 SMP Fri Apr 17 08:14:12 UTC 2020 (c6bab98) x86_64 x86_64 x86_64 GNU/Linux (output from uname -a)
To Reproduce
Describe the steps to reproduce the behavior: Clone the METcalcpy and METdataio source code Set up a Python environment 1. Go to 'METdataio/METreadnc/util 2. Copy the netcdf file to a data directory and set the CALCPY_DATA env variable 3. Set the PYTHONPATH to PATH-TO/METdataio/METreadnc:PATH-TO/METcalcpy:PATH-TO/METcalcpy/metcalcpy 4. From the METdataio/METreadnc/util directory run the following: python Post relevant sample data following these instructions: sa_test.nc.txt
Relevant Deadlines
List relevant project deadlines here or state NONE.
Funding Source
Define the source of funding and account keys here or state NONE.
Define the Metadata
Assignee
Labels
Projects and Milestone
Define Related Issue(s)
Consider the impact to the other METplus components.
Bugfix Checklist
See the METplus Workflow for details.
bugfix_<Issue Number>_main_<Version>_<Description>
bugfix <Issue Number> main_<Version> <Description>
bugfix_<Issue Number>_develop_<Description>
Pull request:bugfix <Issue Number> develop <Description>
Select: Reviewer(s) and Development issues Select: Repository level development cycle Project for the next official release Select: Milestone as the next official version