Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Help me diagnose my 'parent type' error

cspencerjones

Spencer Jones
New Member
This is a development problem, but I think it is probably quite basic, which is why I am asking here. I'm trying to get the drifters code (written my LuYu Sun and Matt Harrison) to compile with a modern version of MOM6 on one of the TAMU clusters. I can compile MOM6 itself on the cluster, but it's just stringing that together with the new code that I'm struggling with.

I'm basically using the recipe from https://github.com/lysun0725/MOM6-drifter-example/blob/1c91e7dc62c03d217c5695d2058ceb6eb2f9849e/Makefile-dt2-intel where I do an updated version of their compile_libs (which goes fine), and then I run

rm -f path_names
../../src/mkmf/bin/list_paths ../../src/drifters/{particle_driver.F90,particles.F90,particles_framework.F90,particles_io.F90}
../../src/mkmf/bin/mkmf -t linux-intel.mk -o '-I../../src/FMS/include -I../../src/MOM6/src/framework -I../../src/MOM6/config_src/dynamic -I../MOM6.repro -I../shared.repro' -l '-L../MOM6.repro -lMOM6 -L../shared.repro -lfms' -p drifters -c "-Duse_libMPI -Duse_netCDF -DSPMD " path_names
make NETCDF=4 TEST=1 drifters -j


Which gives me an error

../../src/drifters/particle_driver.F90(129): error #6292: The parent type of this field is use associated with the PRIVATE fields attribute. [GV]
call verticalGridInit( PF, CS%GV )
----------------------------------^
../../src/drifters/particle_driver.F90(129): error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface. [US]
call verticalGridInit( PF, CS%GV )
---------^
../../src/drifters/particle_driver.F90(132): error #6292: The parent type of this field is use associated with the PRIVATE fields attribute. [OBC]
call MOM_initialize_fixed(dG,CS%OBC,PF,.false.,dirs%output_directory)
------------------------------------^

I don't know how to go about diagnosing what is wrong: maybe I am not compiling/linking some important code? Or maybe MOM6 has changed a lot since the drifters code was written. I am coming from MITgcm, and I'm not really familiar with public/private fields. Any pointers on how to make progress would be helpful.
 
MOM6 has changed. You can search it for verticalGridInit and find it in core/MOM_verticalGrid.F90. It now has a third argument which you must include when calling this routine. There is a new dimensional scaling check feature and the third argument is in support of that. See Marshall's talk from the 2020 tutorials. I bet Matt Harrison would know how to include that now. You'd need the line:

use MOM_unit_scaling, only : unit_scale_type

plus propagating it consistently down to the call to verticalGridInit.
 
Top