How does falwa deal with NaN values? #121
-
Hi! How are NaN (numpy.nan) values dealt with? I am asking because I tried computing LWA (following notebooks/nh2018_science/demo_script_for_nh2018_with_xarray.ipynb), first supplying a dataset with values extrapolated to pressure levels below topography. That worked fine, but I get some odd results for the "convergence_zonal_advective_flux" around, and at the same latitudes to the high topography. Trying again, supplying a dataset where np.nan is prescribed to all grid points below topography, QGDataset.compute_lwa_and_barotropic_fluxes() crashes because it uses to much memory. Is there a better way to deal with values below topography? Thanks a lot for a easy to use package! Best, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi Henrik, The input to QGField requires all grid points to be finite values. To deal with values below topography, we do poisson grid fill at each pressure level (such that there is no extremum values filled in on each level). The regions with gridfilled values are masked out in the diagnostic plots. You may see the contribution from Dr. @Pragallva Barpanda in this directory: https://github.com/csyhuang/hn2016_falwa/tree/master/scripts/pre_process_data_in_hybrid_coordinates I will document the details about this pre-processing procedure soon, as we are submitting an implementation to MDTF-diagnostics:
Let me create an issue ticket #122 out of this thread, and keep you posted of our progress. Regarding the xarray memory problem, we are still figuring out how to solve it (See #50 ) Stay in touch, Clare |
Beta Was this translation helpful? Give feedback.
Hi Henrik,
The input to QGField requires all grid points to be finite values. To deal with values below topography, we do poisson grid fill at each pressure level (such that there is no extremum values filled in on each level). The regions with gridfilled values are masked out in the diagnostic plots.
You may see the contribution from Dr. @Pragallva Barpanda in this directory:
https://github.com/csyhuang/hn2016_falwa/tree/master/scripts/pre_process_data_in_hybrid_coordinates
I will document the details about this pre-processing procedure soon, as we are submitting an implementation to MDTF-diagnostics: