Skip to content
This repository was archived by the owner on Oct 23, 2020. It is now read-only.

Atmosphere/physics makefile updates #1238

Conversation

ldfowler58
Copy link
Contributor

@ldfowler58 ldfowler58 commented Feb 10, 2017

Clean-up of Makefile in physics directory
In this PR, we removed the statement "use mpas_derived types" in all the mpas_atmphys modules where we also had the statement "use mpas_pool_routimes". We then proceed to clean-up and simplify Makefile.

…tatements "use mpas_derived_types"

  and "use mpas_pool_routines", removed "use mpas_derived_types" which is not needed.

* In ./src/core_atmosphere/Makefile:
  -> Cleaned up all the dependencies.
  -> Moved compiling mpas_atmphys_o3climatology.F from OBJS_init to OBJS.
  -> Removed the include -I../../operators which is not needed.
  -> moved mpas_atmphys_interface.o from OBJS_dyn to OBJS. I recall that originally,
     we used OBJS_dyn to handle separate interfaces between the dynamics and physics
     when we had the hydrostatic and non-hydrostatic dynamical cores. Now that we
     only run the non-hydrostatic dynamicol core, we can simplify Makefile.
  -> consequently, also removed core_dyn.
@mgduda
Copy link
Contributor

mgduda commented Feb 14, 2017

@ldfowler58 I think I stumbled across a couple of other missing dependencies in src/core_atmosphere/physics/physics_wrf/Makefile; here are my modifications to add these dependencies:

--- a/src/core_atmosphere/physics/physics_wrf/Makefile
+++ b/src/core_atmosphere/physics/physics_wrf/Makefile
@@ -51,6 +51,9 @@ module_cam_support.o: \
 module_mp_thompson.o: \
        module_mp_radar.o
 
+module_mp_thompson_cldfra3.o: \
+       module_mp_thompson.o
+
 module_ra_cam.o: \
        module_cam_support.o \
        module_ra_cam_support.o
@@ -59,7 +62,8 @@ module_ra_rrtmg_lw.o: \
        module_ra_rrtmg_vinterp.o
 
 module_ra_rrtmg_sw.o: \
-       module_ra_rrtmg_vinterp.o
+       module_ra_rrtmg_vinterp.o \
+       module_ra_rrtmg_lw.o

I can add a commit with these changes to your branch, or if you'd prefer you can fold these changes into your existing commits.

@mgduda
Copy link
Contributor

mgduda commented Feb 14, 2017

I also have some changes that are mostly confined to the physics that should enable us to run parallel builds of MPAS-Atmosphere with, e.g., make -j 4 ifort CORE=atmosphere. If you're interested to include these changes in this PR, I can pass them along; or I can create a separate PR to enable parallel builds for MPAS-Atmosphere; either way works fine for me.

  -> In module_mp_thompson.F, specify that the functions gammp,wgamma,rslf,and
     rsif are the only functions to used from mpas_atmphys_functions.
  -> In module_mp_thompson_cdfra3.F, now use mpas_atmphys_functions instead of
     use module_mp_thompson since we only want to use the functions rslf and
     rsif from mpas_atmphys_functions.
@ldfowler58
Copy link
Contributor Author

I corrected the dependency of module_ra_rrtmg_sw.o in the physics_wrf Makefile. Thanks for pointing this out to me.

About the dependency for module_mp_thompson_cldfra3.F, the module should really use the functions rslf and rsif in mpas_atmphys_functions.F and not the functions rslf and rsif from module_mp_thompson.F. Note that in module_mp_thompson.F, those two functions are bracketed with a #defined (mpas) statement so that they are removed by cpp and would not show in module_mp_thompson.f90 with GEN_F90=true. In module_mp_thompson.F, in "use mpas_atmphys_functions", I now request to only use the functions gammp, wgamma, rslf, and rsif.

I am interested in looking at the changes that are needed in physics to allow a parallel build. It may be better to add them in a separate PR?

.gitignore Outdated
@@ -3,10 +3,12 @@
# All pre-processed Fortran files in MPAS specific directories
src/core_*/Registry_processed.xml
src/core_*/*.f90
src/core_*/*/*.f90
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be cleanest to just add a rule for *.f90 in .gitignore files in the src/core_atmosphere/diagnostics and src/core_atmsphere/utils directories. As a separate framework issue, I'm actually wondering whether the top-level .gitignore file should be dictating which files are ignored within core subdirectories at all.

@ldfowler58
Copy link
Contributor Author

OK. I will remove the last commit regarding .gitignore and push the updated sourcecode to github.

@ldfowler58 ldfowler58 force-pushed the atmosphere/physics_Makefile_updates branch from 1f5a38e to 8737b09 Compare February 14, 2017 20:01
@mgduda mgduda merged commit 8737b09 into MPAS-Dev:atmosphere/develop Feb 15, 2017
@mgduda mgduda deleted the atmosphere/physics_Makefile_updates branch February 15, 2017 01:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants