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

Antarctic example has a reprojection error #526

Open
mankoff opened this issue Nov 30, 2023 · 1 comment
Open

Antarctic example has a reprojection error #526

mankoff opened this issue Nov 30, 2023 · 1 comment
Labels

Comments

@mankoff
Copy link
Contributor

mankoff commented Nov 30, 2023

Description

I'm getting some proj errors with the new examples/antarctica.

When I compile PISM without proj, it warns me:

$ /antspin-coarse.sh
* Got projection parameters "EPSG:3031" from "/home/kdm/projects/GISS/LIME/src/pism-stable/examples/antarctica/pism_Antarctica_5km.nc".
* Computing longitude and latitude using projection parameters...
PISM ERROR: Cannot compute longitude and latitude. Please rebuild PISM with PROJ.
            Error location: /home/kdm/projects/GISS/LIME/src/pism-stable/src/util/projection.cc, line 402

If I recompile with PROJ hints to CMAKE, such as:

  -D Pism_USE_PROJ=YES \
  -D PROJ_INCLUDES=${MAMBA_ENV}/lime/include \
  -D PROJ_LIBRARIES=${MAMBA_ENV}/lime/lib/libproj.so \

I get a different error:

* Got projection parameters "EPSG:3031" from "/home/kdm/projects/GISS/LIME/src/pism-stable/examples/antarctica/pism_Antarctica_5km.nc".
* Computing longitude and latitude using projection parameters...
PISM ERROR: Failed to initialize projection transformation 'EPSG:3031' to 'EPSG:4326' (errno: -1, no arguments in initialization list).
            Error location: /home/kdm/projects/GISS/LIME/src/pism-stable/build/pism/util/Proj.hh, line 37

I notice that in PISM 2.0.6 the SeaRISE Antarctica file is pre-processed and contains a mapping variable, and the other variables each have a var:grid_mapping = "mapping" ; attribute. There are also standard_name:prokection_x_coordinate on the old SeaRISE data that are not on the post-processed ALBAMAP data.

I've tried adding various metadata to the post-processed ALBAMAP data set but have not yet figured out what is needed to let antspin-coarse.sh run.

PISM version

$ pismr -version
Petsc Release Version 3.20.1, unknown 
       The PETSc Team
    petsc-maint@mcs.anl.gov
 https://petsc.org/
See https://petsc.org/release/changes for recent updates.
See https://petsc.org/release/faq for problems.
See https://petsc.org/release/manualpages for help. 
Libraries linked from /home/kdm/projects/GISS/LIME/src/petsc/arch-linux-c-debug/lib
----------------------------------------
Reading configuration parameters (pism_config) from file '/home/kdm/projects/GISS/LIME/opt/share/pism/pism_config.nc'.
PISMR (basic evolution run mode) stable v2.1 committed by Constantine Khrulev on 2023-11-23 11:24:22 -0900
PISM (stable v2.1 committed by Constantine Khrulev on 2023-11-23 11:24:22 -0900)
CMake 3.22.1.
Petsc Release Version 3.20.1, unknown 
PETSc configure: 
OpenMPI 5.0.0
HDF5 library version: 1.12.2
NetCDF 4.7.4 of Nov  7 2023 09:16:31 $.
FFTW fftw-3.3.10-sse2-avx.
GSL 2.7.
PROJ Rel. 5.2.0, September 15th, 2018.

To Reproduce

./preprocess.sh
./antspin-coarse.sh 
@mankoff mankoff added the bug label Nov 30, 2023
@ckhroulev
Copy link
Member

Thanks for reporting this! I should update this example so that it runs without PROJ: I just need to add -grid.recompute_longitude_and_latitude false to command line options.

Regarding the error message you get when you compile PISM with PROJ: PISM can use PROJ 6.0 or newer; looks like you have

PROJ Rel. 5.2.0, September 15th, 2018.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants