-
Notifications
You must be signed in to change notification settings - Fork 25
Merge stochastic physics (SPPT only) into GSL's develop branch #239
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
base: gsl/develop
Are you sure you want to change the base?
Changes from all commits
6f687ea
bb262cd
e5bde4d
293e081
abc034b
cee787e
c93caca
845ff87
995a0cf
5cf356a
d63788d
cea828b
9d0eb11
8428af8
a0700bf
f8fea43
4060353
9bdd0de
57f2ccf
6f5de0a
662e9c2
b4c22a1
d2708cf
ec08395
ae7c0d7
a11e46f
d5a2107
365959c
795dd8c
722cac1
aaf05d0
b3a8e0c
462953d
e3dedb8
91bcfba
7782ece
0c2d253
2934e47
97a98ec
fe3720c
0f4d720
1b05207
18f58f3
82c99cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,7 @@ core_reg: | |
|
|
||
| core_input_gen: | ||
| if [ ! -e default_inputs ]; then mkdir default_inputs; fi | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is to remove any stale stream files ( |
||
| rm -f default_inputs/streams.atmosphere default_inputs/stream_list.atmosphere.* | ||
| ( cd default_inputs; $(NL_GEN) ../Registry_processed.xml namelist.atmosphere in_defaults=true ) | ||
| ( cd default_inputs; $(ST_GEN) ../Registry_processed.xml streams.atmosphere stream_list.atmosphere. listed in_defaults=true) | ||
|
|
||
|
|
@@ -37,12 +38,21 @@ gen_includes: core_reg | |
|
|
||
| post_build: | ||
| if [ ! -e $(ROOT_DIR)/default_inputs ]; then mkdir $(ROOT_DIR)/default_inputs; fi | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is to remove any stale stream files ( |
||
| rm -f $(ROOT_DIR)/default_inputs/streams.$(CORE) $(ROOT_DIR)/default_inputs/stream_list.$(CORE).* | ||
| cp default_inputs/* $(ROOT_DIR)/default_inputs/. | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Previously, files (e.g. stream-related files such as |
||
| ( cd $(ROOT_DIR)/default_inputs; for FILE in `ls -1`; do if [ ! -e ../$$FILE ]; then cp $$FILE ../.; fi; done ) | ||
| ( cd $(ROOT_DIR)/default_inputs; for FILE in `ls -1`; do \ | ||
| if [ -e ../$$FILE ]; then \ | ||
| N=1; \ | ||
| while [ -e "../$$FILE.old$$(printf '%03d' $$N)" ]; do N=$$((N+1)); done; \ | ||
| mv "../$$FILE" "../$$FILE.old$$(printf '%03d' $$N)"; \ | ||
| fi; \ | ||
| cp $$FILE ../.; \ | ||
| done ) | ||
|
|
||
| physcore: mpas_atm_dimensions.o | ||
| ( cd physics; $(MAKE) all ) | ||
| ( mkdir libphys; cd libphys; ar -x ../physics/libphys.a ) | ||
| ( cd stochastic_physics; $(MAKE) -f Makefile all ) | ||
| ( mkdir libphys; cd libphys; ar -x ../physics/libphys.a; ar -x ../stochastic_physics/libstochphys.a ) | ||
| ( cd ../..; ln -sf ./src/core_atmosphere/physics/physics_wrf/files/*TBL .) | ||
| ( cd ../..; ln -sf ./src/core_atmosphere/physics/physics_wrf/files/*DATA* .) | ||
| ( cd ../..; ln -sf ./src/core_atmosphere/physics/physics_noahmp/parameters/*TBL .) | ||
|
|
@@ -68,6 +78,12 @@ mpas_atm_dimensions.o: | |
| clean: | ||
| ( cd physics; $(MAKE) clean ) | ||
| ( cd dynamics; $(MAKE) clean ) | ||
| @# The stochastic_physics directory contains both a makefile (lower case | ||
| @# "m") and a Makefile (upper case "M"). The former is used for FV3 and | ||
| @# the latter for MPAS. The default for "make" is to use "makefile", but | ||
| @# here, we want to use the one for MPAS (with an upper case "M"). Indicate | ||
| @# that using the -f flag. | ||
| ( cd stochastic_physics; $(MAKE) -f Makefile clean ) | ||
| ( cd diagnostics; $(MAKE) clean ) | ||
| ( cd utils; $(MAKE) clean ) | ||
| ( cd ../..; rm -f *TBL ) | ||
|
|
@@ -84,7 +100,7 @@ clean: | |
| $(RM) $@ $*.mod | ||
| ifeq "$(GEN_F90)" "true" | ||
| $(CPP) $(CPPFLAGS) $(PHYSICS) $(CPPINCLUDES) -I./inc $< > $*.f90 | ||
| $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_wrf -I./physics/physics_mmm -I./physics/physics_noaa/UGWP -I../external/esmf_time_f90 | ||
| $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_wrf -I./physics/physics_mmm -I./physics/physics_noaa/UGWP -I./stochastic_physics -I../external/esmf_time_f90 | ||
| else | ||
| $(FC) $(CPPFLAGS) $(PHYSICS) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I./inc -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_wrf -I./physics/physics_mmm -I./physics/physics_noaa/UGWP -I../external/esmf_time_f90 | ||
| $(FC) $(CPPFLAGS) $(PHYSICS) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I./inc -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_wrf -I./physics/physics_mmm -I./physics/physics_noaa/UGWP -I./stochastic_physics -I../external/esmf_time_f90 | ||
| endif | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,26 @@ OBJS_init = \ | |
| mpas_atmphys_functions.o \ | ||
| mpas_atmphys_utilities.o | ||
|
|
||
| # Set TEMPO_TBLS_MAKEFILE_SUFFIX needed to build TEMPO's executable for | ||
| # generating microphysics tables. Note that when the "clean" target is | ||
| # invoked by upstream Makefies, FC_SERIAL and FC_PARALLEL will not be set, | ||
| # in which case TEMPO_TBLS_MAKEFILE_SUFFIX will be set to its default | ||
| # value of "none". | ||
| TEMPO_TBLS_MAKEFILE_SUFFIX = none | ||
|
|
||
| ifeq "$(FC_SERIAL)" "gfortran" | ||
| ifeq "$(FC_PARALLEL)" "mpif90" | ||
| TEMPO_TBLS_MAKEFILE_SUFFIX = gfortran | ||
| endif | ||
| endif | ||
|
|
||
| ifeq "$(FC_SERIAL)" "ifort" | ||
| ifeq "$(FC_PARALLEL)" "mpiifort" | ||
| TEMPO_TBLS_MAKEFILE_SUFFIX = intel | ||
| endif | ||
| endif | ||
| $(info TEMPO_TBLS_MAKEFILE_SUFFIX = $(TEMPO_TBLS_MAKEFILE_SUFFIX)) | ||
|
|
||
| OBJS = \ | ||
| mpas_atmphys_camrad_init.o \ | ||
| mpas_atmphys_control.o \ | ||
|
|
@@ -65,7 +85,8 @@ core_physics_mmm: core_physics_init | |
| (cd physics_mmm; $(MAKE) -f Makefile.mpas all) | ||
|
|
||
| core_microphysics: core_physics_init core_physics_mmm | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changes in first line are to copy |
||
| (cd physics_noaa/TEMPO; $(MAKE) -f Makefile.mpas) | ||
| (cd physics_noaa/TEMPO; $(MAKE) -f Makefile.mpas; cp tables/ccn_activate.bin ../../../../../) | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The following new line builds TEMPO's Not sure why this wasn't originally included. Also, not sure if this work with all machines and compilers, but it works on Hera.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @clark-evans Not sure if you're the right person to ask this. If not, please let me know who to ask (Anders?). I'm wondering why the original version of this Without this executable (named I will comment out this line for now so the CI tests can proceed, but it would be nice to understand why building
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @gsketefian -- I think this is handled in src/core_atmosphere/utils/Makefile, where directives for compiling build_tables_tempo are provided alongside those for build_tables. This is called when core_atmosphere is built. Tagging @AndersJensen-NOAA to correct me in case I'm wrong, though...
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @clark-evans @AndersJensen-NOAA As far as I can tell, that
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @clark-evans @AndersJensen-NOAA I talked to Anders today about this, and he pointed out that there is also a Makefile for gfortran ( Btw, the code in |
||
| (cd physics_noaa/TEMPO; $(MAKE) -f Makefile.$(TEMPO_TBLS_MAKEFILE_SUFFIX) run_build_tables ; cp run_build_tables ../../../../../) | ||
|
|
||
| core_SMOKE: core_physics_init | ||
| (cd physics_noaa/SMOKE; cp ./MPAS/Makefile .; cp ./MPAS/mpas_smoke_wrapper.F90 .; $(MAKE) all) | ||
|
|
@@ -290,6 +311,13 @@ clean: | |
| ( cd physics_noahmp/src; $(MAKE) clean ) | ||
| ( cd physics_noahmp/utility; $(MAKE) clean ) | ||
| ( if [ -d physics_noaa/TEMPO ]; then cd physics_noaa/TEMPO; $(MAKE) -f Makefile.mpas clean; fi ) | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The following is to clean the |
||
| @# For cleaning the TEMPO executable for generating microphysics tables, call both | ||
| @# the intel and the gfortran Makefiles. This is because when the "clean" target | ||
| @# is invoked in upstream Makefiles, a compiler is not specified, so it is not | ||
| @# clear which of the two Makefiles to use here. By calling both, we ensure that | ||
| @# the directory is properly cleaned regardless of which compiler was used to build | ||
| @# the executable. | ||
| ( if [ -d physics_noaa/TEMPO ]; then cd physics_noaa/TEMPO; $(MAKE) -f Makefile.gfortran clean; $(MAKE) -f Makefile.intel clean; fi ) | ||
| ( if [ -d physics_noaa/UGWP ]; then cd physics_noaa/UGWP; $(MAKE) clean; fi ) | ||
| ( if [ -d physics_noaa/RUCLSM ]; then cd physics_noaa/RUCLSM; $(MAKE) -f MPAS/Makefile clean; fi ) | ||
| ( if [ -d physics_noaa/MYNN-EDMF ]; then cd physics_noaa/MYNN-EDMF; cp ./MPAS/Makefile .; $(MAKE) clean; fi ) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -199,9 +199,9 @@ | |
| <!-- **************************************************************************************** --> | ||
|
|
||
| <streams> | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was necessary to avoid SMIOL errors apparently due to another stream named |
||
| <stream name="output" | ||
| <stream name="output_smoke" | ||
| type="output" | ||
| filename_template="history.$Y-$M-$D_$h.$m.$s.nc" | ||
| filename_template="history_smoke.$Y-$M-$D_$h.$m.$s.nc" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @gsketefian This change will break the current rrfs-workflow.v2 (with smoke and dust) as discussed in #196 (comment) We need to discuss this and have an agreement before making this change. Thanks! |
||
| output_interval="6:00:00" | ||
| runtime_format="separate_file"> | ||
| <var name="aero_emis_for_enhmix"/> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the new line here now uses
esmf_time_f91instead ofesmf_time_f90.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NingWang325 @clark-evans These intel mkl libraries are generating the following errors in the CI build tests:
With gnu compiler:
With intel compiler:
First, I thought this was due to gnu not recognizing these intel libraries, but it is also happening with the intel compiler. Do we need to change the modules when running the CI tests?
Thanks.