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

Compiling SIS2 coupled model, missing mct_mod #362

Closed
markyoder opened this issue Oct 12, 2022 · 6 comments
Closed

Compiling SIS2 coupled model, missing mct_mod #362

markyoder opened this issue Oct 12, 2022 · 6 comments

Comments

@markyoder
Copy link

When compiling MOM6-SIS2 coupled model, as per these directions:

Getting this compiler error:

/scratch/users/myoder96/MOM6/MOM6-examples/src/MOM6/config_src/drivers/mct_cap/ocn_cpl_indices.F90:3:7:

    3 |   use mct_mod,              only: mct_avect_init, mct_avect_indexra, mct_aVect_clean, mct_aVect
      |       1
Fatal Error: Cannot open module file ‘mct_mod.mod’ for reading at (1): No such file or directory

Indeed, ocn_cpl_indices.F90 definitely asks for mct_mod (ie, mct_mod.mod file), which I cannot find.

MCT appears to refer to "Model Coupling Toolkit;" I found an acknowledgement to this ANL project:
https://github.com/MCSclimate/MCT, but it looks like mct_mod.mod is probably derived on that work (based on the reference).

So is there another sub-project to build for MCT, or maybe those functions have moved?

@marshallward
Copy link
Member

Which coupled model are you building? If you are following the directions here then you would have selected config_src/drivers/FMS_cap (the GFDL coupler) rather than config_src/drivers/mct_cap when using list_paths.

If you are using an MCT-based model, then you probably want to contact one of those groups. You can try the MOM6 forums:

https://bb.cgd.ucar.edu/cesm/forums/mom6.148/

@markyoder
Copy link
Author

Yeah, I'm trying to compile the MOM6-SIS2 coupled model. I cleaned up the syntax a bit from the example, but aside from substituting some relative path walking with fixed path variables it's cut and pasted from the example. Mine looks like this:

${MKMF_DIR}/list_paths -l\
   ${MOM6_SRC}/config_src/{infra/FMS1,memory/dynamic_symmetric,drivers/FMS_cap,external} ${MOM6_SRC}/{*,*/*}/\
   ${ROOT_PATH}/MOM6-examples/src/{atmos_null,coupler,land_null,ice_param,icebergs,SIS2,FMS/coupler,FMS/include}/

So list_paths references FMS_cap. As you suggest, there is a config_src/drivers/mct_cap folder; I've see -- in other codebase references, a module file mct_mod.f90, which is what is being referenced in the code.

I am still getting familiar with the many moving parts here; don't know exactly how the couplers work, but I can see pretty clearly that ocn_cpl_indices.F90 references mct_mod.

I'll have a look at the MOM6 discussion; thanks for the pointer!

@marshallward
Copy link
Member

Most likely something has happened with the list_paths command. It could be similar to the issues you were seeing in #350. My guess is that one of the command-line paths is getting mangled somehow and causing drivers/mct_cap to slip into path_names. Unfortunately it might take a bit of troubleshooting to know the reason. Worst case, you could just remove the lines from path_names.

The mkmf and list_paths tools are starting to show their age, and are even been phased out in some places. But it's still the canonical method for building the model at GFDL, so the instructions still focus on it.

Please do post your issue in the forums, I think it could be useful to hear feedback from others.

@jiandewang
Copy link

my gut feeling is that you are having a typo or continuation line issue. Here I put a simple script that I used for compiling using mkmf
https://www.emc.ncep.noaa.gov/gc_wmb/wd20xw/JD/compile-MOM6.txt (you need to rename it to *sh, somehow our serve doesn't like *sh files). Put this file inside MOM6-examples directory.
The usage is: compile-MOM6.sh --platform xxx, here xxx refer to the compiling option file you are going to select from mkmf/templates, for example, if you plan to use nccs-intel.mk, then xxx=nccs

@adcroft
Copy link
Member

adcroft commented Oct 13, 2022

${MOM6_SRC}/{*,*/*}/ is capturing all of config_src/ . I think you want ${MOM6_SRC}/src/{*,*/*}/

@markyoder
Copy link
Author

markyoder commented Oct 13, 2022 via email

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

No branches or pull requests

4 participants