! ###################################################################### ! ### ! ### Same as pycasso-tm5-expert.rc but without the global 1x1 grid, and ! ### it includes a hi-res (i.e. smaller than 1x1) ! ### grid definition thru inclusion of a region rc file. ! ### ! ### ! ### TM5 - Expert settings. ! ### ! ### The variables '${..}' in this file are expanded on reading. ! ### See the description in 'rc.py' . ! ### Special variables are (read 'S' as '$'): ! ### S{pid} : evalutates to the process id of the calling script ! ### S{script} : " " " name " " " " ! ### ! ###################################################################### ! ------------------------------------------------ ! logging ! ------------------------------------------------ ! Default setting for print debug messages (True|False) ? ! NOTE: passing '--verbose' or '-v' options to setup_tm5 script will ! set this value to 'True' verbose : False ! set name of log file: logfile : ${script}.${pid}.log !logfile : ${script}.0000.log ! ------------------------------------------------ ! run directory ! ------------------------------------------------ ! submit script, executable, and settings are installed here: rundir : ${my.run.dir} ! ------------------------------------------------ ! build source ! ------------------------------------------------ ! ! Building an executable could consist of 3 steps: ! copy : copy a source code into a build directory (on scratch) ! configure : generate source files if necessary, create Makefile ! make : compile and link executable ! ! prefix for source and script files ! (base path for subdirectories src, py, etc) ! this should be an absolute path; use ${PWD} for the present dir if necessary: !build.prefix : ${rundir}/build build.prefix : ${my.project.dir}/build ! extend with flag groups ? e.g. build_optim-all_mpi ! a link with the original name will be created to this extended name build.prefix.extend : True ! actual source codes will end up in ... build.sourcedir : ${build.prefix}/src ! Number of jobs (commands) to run simultaneously. ! An empty value indicates unlimitted number, which might claim all resources; ! better is to specify a value which will be the default maximum. ! The value is overwritten by the '-j' or '--jobs' flag passed to the submit script ! The final number (specified here or from the flags) will be inserted in the maker command: ! maker : gmake -j ${build.jobs} ! build.jobs : 8 ! ! cleanup old build ! ! remove existing build directory for a complete new copy of codee and scripts ? ! NOTE: this flag is set to true by the '--new' option build.new : False ! ! create a source ! ! copy a source code to the build prefix directory (True|False) ? !build.copy : False build.copy : True ! list of source directories to be copied; ! files in latest directory overwrite previously copied versions: !build.copy.dirs : base/trunk proj/pycasso build.copy.dirs : ${my.source.dirs} ! sub directories to be included: build.copy.subdirs : src bin py ! remove project extenstions (True|False) ? build.copy.remove.__part : True ! skip some extensions (list of regex pattern) ? build.copy.skip.ext : \.pyc$ \..*~$ ! skip some files ? include in this list: ! o files that are (re)written by the scripts, e.g. include files; ! if these are copied, the creation times are obscured, ! which leads to a re-make during every build ! o old stuff that should be removed in a new version; ! skip them now to test if these files are really not necessary anymore ! ! remove the 'dims_grid.F90' file only if it should be written by the scripts ... #if len("${regions}") > 0 : my.skip.dims_grid : dims_grid.F90 #else my.skip.dims_grid : #endif ! build.copy.skip.file : configure config.compiler \ Makefile.template Makefile.tm5 \ parray_cwp.F90.in parray_iwp.F90.in parray_rwp.F90.in \ file_hdf_iwp.F90.in file_hdf_rwp.F90.in \ tmkit.F90 \ advect.h \ dims_grid.h_template ${my.skip.dims_grid} \ mdf.h tmm.h tm5.h \ mdf.inc tmm.inc tm5.inc \ tmm_mf_hdf.F90 tmm_mf_grib.F90 tmm_mf_ecmwf_mars.F90 \ rcfilename.h ! extend python path with '/py' directory (True|False) ? build.copy.pypath : True ! ! configure ! ! configure source (True|False) ? build.configure : True ! * macro's ! defined macro's : build.configure.macro.define : ${my.df.define} \ ${my.tmm.define} \ ${my.tm5.define} ! Specify a list of macro groups: build.configure.macro.groups : go num grid mdf tmm tm5 user_output ! For each of the groups, specify: ! ! o all supported macro's ! (sometimes necessary to identify which macros are NOT defined ...) ! ! o optionally the name of header file; if provided, ! this file is filed with appropriate '#define' commands ! ! In addition to the macro's defined here, others might be defined ! in 'pycasso_user_scripts/Build_Define' given the other settings. ! ! ~ GO modules ! TO BE REMOVED: ! with_go # not necessary, go modules present by default ! PRINT_MINU # used for testing ? build.configure.macro.go.all : __INTEL_COMPILER \ __GFORTRAN__ \ __GNUC____GNUC_MINOR____GNUC_PATCHLEVEL__ \ __IBMC__ \ __ecmwf__ \ with_go \ PRINT_MINU build.configure.macro.go.hfile : ! ! ~ num modules: build.configure.macro.num.all : with_lapack build.configure.macro.num.hfile : ! ! ~ grid modules: build.configure.macro.grid.all : check_all build.configure.macro.grid.hfile : ! ! ~ mdf interface to hdf/netcdf ! TO BE REMOVED: ! with_go # not necessary, go modules present by default ! with_hdf5_beta # testing ... build.configure.macro.mdf.all : with_hdf4 \ with_hdf5 with_hdf5_par \ with_netcdf with_netcdf4 with_netcdf4_par \ with_go \ with_hdf5_beta build.configure.macro.mdf.hfile : mdf.inc ! ! ~ tmm meteo input build.configure.macro.tmm.all : with_tmm_tmpp \ with_tmm_tm5 \ with_tmm_ecmwf \ with_tmm_ecearth \ with_tmm_ncep \ with_tmm_msc \ with_prism \ with_tmm_convec_raw with_tmm_convec_ec with_tmm_convec_ec_gg \ with_grib with_w3 \ with_udunits1 with_udunits2 build.configure.macro.tmm.hfile : tmm.inc ! ! ~ tm5 settings ! ! Cpp used in coupled version of TM5: my.macro.tm5.coupling.all : with_prism \ oasis3 \ oasis4 \ with_tendencies \ with_ecearth_optics \ with_feedback ! ! List of all C-pre-processors flags used in the code. BUT: ! ! * Do not include macro for meteo (tmm* and mdf* files) ! * Move macros used in coupled version to my.macro.tm5.coupling.all ! * Move obsolete macros (i.e. to be deleted) to my.macro.tm5.old.all ! ! See tools/misc/find_cpp script to generate initial list of macro ! starting by with_ or without_ ! build.configure.macro.tm5.all : slopes \ secmom \ MPI \ _OPENMP \ with_budgets \ with_cariolle \ with_gems_emis \ with_GFED_8day \ with_lapack \ with_m7 \ with_aqchem \ with_kpp \ FULL_ALGEBRA \ with_online_bvoc \ with_online_nox \ with_optics \ without_advection \ without_boundary \ without_chemistry \ without_convection \ without_diffusion \ without_dry_deposition \ without_emission \ without_lmax_conv \ without_nmhc_gfed \ without_o3_nudging \ without_photolysis \ without_sedimentation \ without_wet_deposition \ with_ch4_emis \ with_pm \ with_w3 \ with_netcdf4_par \ with_zoom \ ${my.macro.tm5.coupling.all} \ ${my.macro.tm5.old.all} ! Header file build.configure.macro.tm5.hfile : tm5.inc ! ! cpp used in user output routines () build.configure.macro.user_output.all : with_retro_output \ with_cf_output ! Header file build.configure.macro.user_output.hfile : ! ! SOON TO BE OBSOLETE and REMOVED: ! with_mpi # should be MPI ? ! with_openmp # should be _OPENMP ! with_barrier # used for testing ? ! with_budget # should be with_budgets ! with_okdebug # via logical flag ! without_wetdeposition # should be without_wet_deposition ! with_restart # not necessary anymore with new restart module ! with_pnetcdf # depricated library; use netcdf4 instead ! with_go # should use module GO instead ! with_hdf # still in some tmkit.F90 in some 4D ! branches - should update my.macro.tm5.old.all : with_barrier \ with_budget \ with_go \ with_mpi \ with_okdebug \ with_openmp \ without_wetdeposition \ with_restart \ with_hdf \ with_pnetcdf ! Pass macro definitions to command lines, e.g. -Dwith_this_flag (True|False) ? ! The source code checking tests on '#include "tm5.inc"', ! so this flag could be set to False: build.configure.define.D : False ! * remove files ! remove some files ? build.configure.remove : ! remove if macro's are *not* defined ? Use list of files and/or pattern (i.e. *,?, and range of characters with []) build.configure.remove.ifndef.with_mpi : mpi_const.F90 mpi_comm.F90 build.configure.remove.ifndef.with_hdf4 : file_hdf.F90 build.configure.remove.ifndef.with_tmm_tmpp : tmm_mf_tmpp.F90 build.configure.remove.ifndef.with_tmm_tm5 : tmm_mf_tm5_hdf.F90 tmm_mf_tm5_nc.F90 build.configure.remove.ifndef.with_tmm_ecmwf : tmm_mf_ecmwf_tmpp.F90 tmm_mf_ecmwf_tm5.F90 file_grib.F90 grib_table.F90 build.configure.remove.ifndef.with_tmm_ncep : tmm_mf_ncep_gfs.F90 tmm_mf_ncep_cdc.F90 file_ncb.F90 file_ncg.F90 build.configure.remove.ifndef.with_tmm_msc : tmm_mf_msc.F90 build.configure.remove.ifndef.with_prism : prism_putget.F90 tmm_mf_prism.F90 tm5_prism.F90 appl-tm5.F90 build.configure.remove.ifndef.with_tendencies : tm5_tendency.F90 tm5_tendency_eval.F90 build.configure.remove.ifndef.with_budgets : budget_global.F90 build.configure.remove.ifndef.with_pnetcdf : pnetcdf.F90 build.configure.remove.ifndef.with_udunits1 : udunits.F90 udunits_inc.F build.configure.remove.ifndef.with_udunits2 : f_udunits_2.f90 f_udunits_2.inc build.configure.remove.ifndef.with_m7 : mo_*.F90 m7_*.F90 m7.F90 emission_ss.F90 emission_pom.F90 emission_dust.F90 emission_bc.F90 PM.F90 optics.F90 calc_pm.F90 user_output_aerocom.F90 build.configure.remove.ifndef.with_aqchem : aqchem.F90 build.configure.remove.ifndef.with_kpp : kpp_aqchem.F90 build.configure.remove.ifndef.with_cariolle : tm5_climat.F90 file_fortkeld.F90 file_cariolle.F90 chemistry_cariolle.F90 chemistry_0d__o3tracer.F90 build.configure.remove.ifndef.with_ecearth_optics : ecearth_optics.F90 ! - for proj/user_output/ !PLS!build.configure.remove.ifndef.with_cf : user_output_cf.F90 build.configure.remove.ifndef.with_cf_output : user_output_cf.F90 ! - for M7 modules: build.configure.remove.ifndef.with_optics : optics.F90 build.configure.remove.ifndef.with_pm : PM.F90 ! remove if macro's are defined ? Use list of files and/or pattern (i.e. *,?, and range of characters with []) build.configure.remove.ifdef.without_advection : advectx.F90 advecty.F90 advectz.F90 build.configure.remove.ifdef.without_diffusion : diffusion.F90 build.configure.remove.ifdef.without_wet_deposition : wet_deposition.F90 build.configure.remove.ifdef.without_dry_deposition : dry_deposition.F90 build.configure.remove.ifdef.without_photolysis : photolysis.i photolysis.F90 photolysis_data.F90 build.configure.remove.ifdef.without_emission : emission.F90 build.configure.remove.ifdef.without_convection : convection.F90 build.configure.remove.ifdef.without_boundary : boundary.F90 build.configure.remove.ifdef.without_chemistry : chemistry.F90 ebischeme.F90 build.configure.remove.ifdef.without_sedimentation : sedimentation.F90 ! * compiler flags ! Specify space seperated list of compiler flag groups. ! See the implementation in 'pycasso_user_scripts/Build_FlagGroups' . ! Two groups are added by default, and eventually openmp is added if necessary: ! default real8 [openmp] ! For the actual compiler flags set by a group, see the compiler specific settings. ! build.configure.flags : ${my.build.configure.flags} ! include file to be written for Makefile: build.configure.flags.includefile : Makefile_flags ! * libraries ! Libraries to be included are specified with a list of keywords, e.g.: ! netcdf hdf5 hdf4 z jpeg gribex ! For each library name, 2 lines should be present that specify ! the compile and link flags (probably in the host specific rcfile) ! ! For TotalView with memory debugging, add the 'tv' library. ! list of all supported libraries; this defines the linking order ! build.configure.libs.all : netcdf4_par netcdf4 netcdf hdf5_par hdf5 hdf4 sz jpeg z grib lapack udunits1 udunits2 mpi tv ! ! ~ default librries: build.configure.libs : ! ! ~ libraries to be included if a specific marcro is defined: build.configure.libs.ifdef.with_netcdf4_par : netcdf4_par build.configure.libs.ifdef.with_netcdf4 : netcdf4 build.configure.libs.ifdef.with_netcdf : netcdf build.configure.libs.ifdef.with_hdf5_par : hdf5_par sz jpeg z build.configure.libs.ifdef.with_hdf5 : hdf5 sz jpeg z build.configure.libs.ifdef.with_hdf4 : hdf4 sz jpeg z build.configure.libs.ifdef.with_grib : grib build.configure.libs.ifdef.with_lapack : lapack build.configure.libs.ifdef.with_mpi : mpi build.configure.libs.ifdef.with_udunits1 : udunits1 build.configure.libs.ifdef.with_udunits2 : udunits2 ! * user configuration ! routine 'Build_Configure' in 'pycasso_user_scripts.py' is called now; ! use this routine to write special include files etc. ! Apply some source code checks ? ! Provide a space seperated list with keywords; for each keyword, provide below: ! o a short message to describe the test; ! o the filename pattern to select the files on which the test should be applied; ! o a filename pattern to exclude some files; ! o a python boolean expression applied to each line of the file; ! the line itself is stored in a string variable named 'line'; ! o a help text to be displayed in case a warning is issued; ! include \n for newlines. ! If for one of the lines in a source file the test evaluates to 'True', ! a warning is issued. ! If the test expression starts with 'not', a warning is issued if none ! of the lines evaluates to 'True' for the test after the 'not'. ! If the 'error' flag is set to 'True' and any warnings are issued, then ! the scripting will exit with an error status. ! list with keywords for checks to be applied: build.configure.checks : tm5_inc tmm_inc advect_h ! all TM files should include "tm5.inc"; search files that do not do that: build.configure.check.tm5_inc.msg : Test on TM5 files that do no not include "tm5.inc" ... build.configure.check.tm5_inc.files : *.[Ff]* build.configure.check.tm5_inc.skip : binas* parray* file_hdf* go* num* grid* phys* tmm* mdf* *grib* \ xmlf* *udunits* standard_name_table.f90 *.swp .* build.configure.check.tm5_inc.test : not line.startswith('#include "tm5.inc"') build.configure.check.tm5_inc.help : \n\ All files TM5 files should include "tm5.inc" in the header.\n\ This include file is filled by the scripting with '#define' pre-processing macros.\n\ To compile a source code with TM5 files that do not include "tm5.inc",\n\ ensure that marco definitions are passed to the compiler directly by setting:\n\ . build.configure.define.D : True\n\ in the expert.rc file.\n\ . ! all TMM files should include "tmm.inc"; search files that do not do that: build.configure.check.tmm_inc.msg : Test on TMM files that do no not include "tmm.inc" ... build.configure.check.tmm_inc.files : tmm*.[Ff]* build.configure.check.tmm_inc.skip : build.configure.check.tmm_inc.test : not line.startswith('#include "tmm.inc"') build.configure.check.tmm_inc.help : \n\ All files TMM files should include "tmm.inc" in the header.\n\ This include file is filled by the scripting with '#define' pre-processing macros.\n\ To compile a source code with TMM files that do not include "tmm.inc",\n\ ensure that marco definitions are passed to the compiler directly by setting:\n\ . build.configure.define.D : True\n\ in the expert.rc file.\n\ . ! none of the TM files should include "advect.h" anymore: build.configure.check.advect_h.msg : Test on TM5 files that include "advect.h" ... build.configure.check.advect_h.files : *.[Ff]* build.configure.check.advect_h.skip : binas* file_hdf* go* num* grid* phys* tmm* build.configure.check.advect_h.test : line.startswith('#include "advect.h"') build.configure.check.advect_h.help : \n\ Including "advect.h" is depricated; include "tm5.inc" instead.\n\ . ! special: check on unknown macros used in '#if[n]def' lines, ! but not listed in .all lists above ? build.configure.check.unknown_macro : True build.configure.check.unknown_macro.msg : Test for unsupported macros ... ! in case some strange things are found, leave with error message (True|False)? build.configure.checks.error : True ! * makedep ! create depencencies using the external 'makedep' program (True|False) ? build.configure.makedep : True ! include file to be written for Makefile: build.configure.makedep.includefile : Makefile_deps ! dependencies are created for files matching the pattern: build.configure.makedep.files : *.[Ff]* ! ! make ! ! make executable (True||False) ? !build.make : False build.make : True ! source directory: build.make.dir : ${build.prefix}/src ! remove object and module files before compiling (True|False) ? ! NOTE: this flag is set to 'True' automatically if ! the '--clean' or '-c' flag is provided to the setup script build.make.clean : False ! which executable to be build ? build.make.exec : tm5.x ! ------------------------------------------------ ! install executable and scripts ! ------------------------------------------------ ! Copy files into run directory. ! Specify a space seperated list with source files. ! If the copy should obtain another name, append it seperated with a ':', e.g. ! model.x:model-myproject.x ! Include the build directory if necessary, e.g. '${build.prefix}/src/model.x' . install.copy : ${build.prefix}/src/${build.make.exec}:${job.step.run.exe} \ ${build.prefix}/bin/submit_tm5 \ ${build.prefix}/bin/Makefile.rundir:Makefile ! name of processed rc file to be written (original this file); ! leave empty for not writing: install.rc : ${my.basename}.rc ! ------------------------------------------------ ! Post-processing : archive sources ! ------------------------------------------------ ! Add the name 'sources' to the 'store.tasks' list to enable this! ! specify how to store source files wiht output: ! o store from run dictory: sources.store.from : .. ! o target file name: sources.store.files : ${my.basename}__sources.tar ! o filter for files to be included: sources.store.tarfilter : build/bin/ \ build/src/Makefile* \ build/src/*.[Ff]* \ build/src/*.inc \ run/${install.rc} ! ------------------------------------------------ ! job script ! ------------------------------------------------ ! name of job in queue etc: job.name : ${my.basename} ! names used for job steps: job.steps : init run done ! executable used by the 'run' step: job.step.run.exe : ${my.basename}.x ! ------------------------------------------------ ! submit script ! ------------------------------------------------ ! name of submit script: submit.script : submit_tm5 ! full submit command from rundirectory: submit.command : ./${submit.script} ${job.step.run.exe} ${install.rc} ! try to use relative paths if possible ? ! this will facilitate moving the complete build/run/output directory: submit.relpaths : True ! submit job to : foreground | background | queue ! might be replaced given the flags passed to the submit script submit.to : foreground ! options passed directly to a submission command (llsubmit, qsub, ...): submit.options : ! run in debugger (True|False*) ? submit.debugger : False ! ------------------------------------------------ ! horizontal grids ! ------------------------------------------------ ! ! List with model regions (space seperated): ! ! o if empty, the regions are defined via 'proj/grid' sources. See ! below, but this is obsolete and will be phased out; ! ! o the routine 'dims_grid' is automatically re-written if the region list ! or the number of regions change [should be default]; ! ! o in contrast to the region list in the 'dims_grid.F90' files, ! do not include the 'globe' and 'glb100x100' regions in the region list ! but specify them seperately below; ! ! o the parameter 'nregions' will be set to the number of regions in ! this list; ! ! o the macro 'with_zoom' is now automatically defined, and only if ! more than one region is specified here; ! ! see routine 'pycasso_user_scripts/Build_Define' ! ! ~ list of region names for definition via rcfile regions : ${my.region1} ${my.region2} ${my.region3} ${my.region4} ${my.region5} ! special: single cell global region: region.globe : globe ! special: global surface fields (unless region 1 is on the same grid) #if "${my.region1}" == "glb100x100" : region.glbsfc : #else: !region.glbsfc : glb100x100 ! NOT USE in HI-RES runs without emissions region.glbsfc : #endif ! parent regions for zoom; Must use 'globe' for the global region: region.${my.region1}.parent : ${region.globe} ! 'parent' region for global surface field; used to match surface ! pressures if necessary: #if not("${my.region1}" == "glb100x100"): region.${region.glbsfc}.parent : ${my.region1} #endif ! region definitions: #include base/trunk/rc/pycasso-tm5-regions-${my.region1}.rc !------------------------------- ! OBSOLETE..... TO BE PHASED OUT !------------------------------- ! * Region definition via 'proj/grid' sources #if len("${regions}") == 0 : ! Actual number of regions, compiled as parameter in the code. ! Written by the scripting in the 'dims_grid.h' include file. ! Accepted values are : 1 2 .. nregions_max-1 nregions_max ! The value of 'nregions_max' is defined in 'dims_grid.F90'. !source.nregions : 1 source.nregions : nregions_max #endif