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

obs converter argument mismatch: quickskat, NSIDC, GSI2DART #352

Closed
hkershaw-brown opened this issue May 16, 2022 · 4 comments
Closed

obs converter argument mismatch: quickskat, NSIDC, GSI2DART #352

hkershaw-brown opened this issue May 16, 2022 · 4 comments
Assignees
Labels
Bug Something isn't working fortran standards compiler issues and (non) standard-compliant code obs_converters converting observations to DART format

Comments

@hkershaw-brown
Copy link
Member

hkershaw-brown commented May 16, 2022

gfortran --version
GNU Fortran (GCC) 11.2.0

quikscat

/glade/scratch/hkershaw/DART/Bugs/mismatch/DART/observations/obs_converters/quikscat/quikscat_JPL_mod.f90:835:47:

  815 |          retn=sfrdata(sds_id,start,stride,edge,buffer)
      |                                               2
......
  835 |          retn=sfrdata(sds_id,start,stride,edge,buffer3)
      |                                               1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/INTEGER(2)).
/glade/scratch/hkershaw/DART/Bugs/mismatch/DART/observations/obs_converters/quikscat/quikscat_JPL_mod.f90:852:47:

  815 |          retn=sfrdata(sds_id,start,stride,edge,buffer)
      |                                               2
......
  852 |          retn=sfrdata(sds_id,start,stride,edge,buffer2)
      |                                               1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(1)/INTEGER(2)).
/glade/scratch/hkershaw/DART/Bugs/mismatch/DART/observations/obs_converters/quikscat/quikscat_JPL_mod.f90:873:47:

  815 |          retn=sfrdata(sds_id,start,stride,edge,buffer)
      |                                               2
......
  873 |          retn=sfrdata(sds_id,start,stride,edge,out_var)
      |                                               1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/INTEGER(2)).
Makefile:82: recipe for target 'quikscat_JPL_mod.o' failed

GSI2DART/enkf/mpi_readobs.f90

/glade/scratch/hkershaw/DART/Bugs/mismatch/DART/observations/obs_converters/GSI2DART/enkf/mpi_readobs.f90:172:19:

   74 |     call mpi_bcast(nobs_conv,1,mpi_integer,0,mpi_comm_world,ierr)
      |                   2
......
  172 |     call mpi_bcast(ensmean_ob,nobs_tot,mpi_real4,0,mpi_comm_world,ierr)
      |                   1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/INTEGER(4)).
/glade/scratch/hkershaw/DART/Bugs/mismatch/DART/observations/obs_converters/GSI2DART/enkf/mpi_readobs.f90:173:19:

   74 |     call mpi_bcast(nobs_conv,1,mpi_integer,0,mpi_comm_world,ierr)
      |                   2
......
  173 |     call mpi_bcast(sprd_ob,nobs_tot,mpi_real4,0,mpi_comm_world,ierr)
      |                   1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/INTEGER(4)).
Makefile:10: recipe for target 'mpi_readobs.o' failed

These GSI2DART bugs will be moved to their own issue as they are not a problem with Fortran standards but rather just a general issue with the MPI implementation in this code which needs a complete refactor.

NSIDC

/glade/scratch/hkershaw/DART/Bugs/mismatch/DART/observations/obs_converters/NSIDC/HDF5_utilities_mod.f90:77:47:

   77 | call h5fopen_f(filename, flag, file_id, hdferr)
      |                                               1
Error: Type mismatch in argument ‘access_flags’ at (1); passed INTEGER(8) to INTEGER(4)

AIRS (there is a lot in this)

fortran -O2 -ffree-line-length-none -I/glade/u/apps/ch/opt/netcdf/4.8.1/gnu/11.2.0//include  -c	/glade/scratch/hkershaw/DART/Bugs/mismatch/DART/observations/obs_converters/AIRS/airs_JPL_mod.f90
/glade/scratch/hkershaw/DART/Bugs/mismatch/DART/observations/obs_converters/AIRS/airs_JPL_mod.f90:237:19:

  195 |                    airs_ret_gran%NumLandSurface)
      |                   2
......
  237 |                    airs_ret_gran%start_sec)
      |                   1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/INTEGER(4)).
/glade/scratch/hkershaw/DART/Bugs/mismatch/DART/observations/obs_converters/AIRS/airs_JPL_mod.f90:287:19:

  252 |                       airs_ret_gran%Latitude)
      |                      2
......
  287 |                    airs_ret_gran%scan_node_type)
      |                   1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(1)/REAL(8)).
/glade/scratch/hkershaw/DART/Bugs/mismatch/DART/observations/obs_converters/AIRS/airs_JPL_mod.f90:296:19:
@hkershaw-brown hkershaw-brown added Bug Something isn't working fortran standards compiler issues and (non) standard-compliant code labels May 16, 2022
@hkershaw-brown
Copy link
Member Author

i4 passed to i8 for various state_structure_mod calls is also going need to be fixed.

hkershaw-brown added a commit to hkershaw-brown/DART that referenced this issue Nov 7, 2022
i8 to i4 conversion for gfortran in model_mod. See issue NCAR#352
for more details on various argument mismatches we will need to
fix for newer compilers
@hkershaw-brown hkershaw-brown added the obs_converters converting observations to DART format label Nov 27, 2023
@hkershaw-brown hkershaw-brown mentioned this issue Dec 11, 2023
15 tasks
@mjs2369 mjs2369 self-assigned this Dec 28, 2023
@mjs2369 mjs2369 mentioned this issue Jan 10, 2024
15 tasks
@mjs2369
Copy link
Contributor

mjs2369 commented Feb 13, 2024

Closed as completed via #619

GSI2DART moved to #633

@mjs2369 mjs2369 closed this as completed Feb 13, 2024
@hkershaw-brown
Copy link
Member Author

quick note on quikscat build, type mismatch. Will open as a separate issue

/__w/DART/DART/observations/obs_converters/quikscat/quikscat_JPL_mod.f90:873:47:

815 | retn=sfrdata(sds_id,start,stride,edge,buffer)
| 2
......
873 | retn=sfrdata(sds_id,start,stride,edge,out_var)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/INTEGER(2)).
make: *** [Makefile:20: quikscat_JPL_mod.o] Error 1

@hkershaw-brown
Copy link
Member Author

correction, have to use
mkmf.template.quikscat.gfortran
which has the -fallow-argument-mismatch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working fortran standards compiler issues and (non) standard-compliant code obs_converters converting observations to DART format
Projects
None yet
Development

No branches or pull requests

2 participants