Thanks to visit codestin.com
Credit goes to github.com

Skip to content

argument mismatch wrf pert_model_sounding #351

@hkershaw-brown

Description

@hkershaw-brown

just a warning that with the new build system, i found that models/wrf/experiments/Radar/IC/sounding_perturbation/pert_sounding_module.f90 does not compile with gfortran v11.2.0 on my mac. there are 3 places with an integer/real mismatch in subroutine arguments. this isn't our code - i'm guessing from the directory and name that it's used to perturb synthetic radar obs for testing/experiments. there are probably no makefiles that use this module but the new build system tries to compile everything and fails the wrf build because of this. i took a quick stab at trying to see if i could resolve the real(4) vs integer(4) mismatch but it wasn't simple to see what could be changed without breaking the code.

There is a script to compile this code:
DART/models/wrf/experiments/Radar/IC/sounding_perturbation/compile_pert_sounding.csh . It does not compile on main with gnu/11.2.0

hkershaw@cheyenne5:/glade/scratch/hkershaw/DART/Bugs/mismatch/DART/models/wrf/experiments/Radar/IC/sounding_perturbation(main)$ gfortran -c pert_sounding_module.f90 
pert_sounding_module.f90:175:27:

  175 |       amp(m) = mag*gaussdev(iseed1)
      |                           1
Error: Type mismatch in argument ‘idum’ at (1); passed REAL(4) to INTEGER(4)
pert_sounding_module.f90:179:34:

  179 |          phs(m) = 2.0*PI*(2.0*ran2(iseed2)-1.0)
      |                                  1
Error: Type mismatch in argument ‘idum’ at (1); passed REAL(4) to INTEGER(4)
pert_sounding_module.f90:192:25:

  192 |       q(k) = mag*gaussdev(iseed1)
      |                         1
Error: Type mismatch in argument ‘idum’ at (1); passed REAL(4) to INTEGER(4)
hkershaw@cheyenne5:/glade/scratch/hkershaw/DART/Bugs/mismatch/DART/models/wrf/experiments/Radar/IC/sounding_perturbation(main)$ gfortran --version
GNU Fortran (GCC) 11.2.0

I will move this to an issue, I think fix or remove this code from the repo, set as EXCLUDE in this pull request

Originally posted by @hkershaw-brown in #348 (comment)

Metadata

Metadata

Assignees

Labels

fortran standardscompiler issues and (non) standard-compliant code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions