README 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. This directory contains the files for running TM5-MP coupled to EC-Earth 3. The standard
  2. package for EC-Earth v3 consists of:
  3. - meteo.F90 : Has specific order of met fields' setup to match EC-Earth
  4. order of received fields. And no check_pressure done in
  5. meteo_setup_mass, because of the artificial lag b/w TM
  6. and PRISM.
  7. - prism_putget.F90 : interface to push all required fields to OASIS3/prism
  8. (a/k/a 'put'). 'Get' is dummy for now.
  9. - tm5_prism.F90 : general prism-related routines (read specific rc keys,
  10. prism grid and partition, remapping of spectral fields)
  11. - tmm_mf_prism.F90 : Met Field object and its methods to fill it (readrecord)
  12. To include the feedback of aerosol optical properties from TM5 to IFS, the cpp
  13. flag "with_ecearth_optics" must be used in the rc-file and the following file
  14. is added (automatically done in tm5-expert.rc) to the sources:
  15. - ecearth_optics.F90
  16. Note that "prism_putget.F90, tm5.F90, and initexit.F90" (the last two in the
  17. TM5/base/) also includes parts related to aerosol optics (check for
  18. "with_ecearth_optics").
  19. Now, the "with_ecearth_optics" flag is on by default if not running the CO2-only
  20. config. See <EC-Earth top dir>/sources/config-build.xml of ECE-3.2 for the CO2
  21. flag, and <EC-Earth top dir>/sources/tm5mp/rc/main-config-ecearth3.rc.tmpl for
  22. the setting of the flag.
  23. merging info ECE3MCT
  24. --------------------
  25. erepo=https://svn.ec-earth.org/ecearth3
  26. #parent branch
  27. export pb3='https://svn.ec-earth.org/ecearth3/branches/development/2014/r1225-cplng-mct'
  28. cd ECEARTH-3 ; or whatever is the directory name you used at checkout
  29. svn mergeinfo ${pb3}
  30. svn mergeinfo ${pb3} --show-revs eligible
  31. svn merge ${pb3} --dry-run
  32. svn merge ${pb3}
  33. --------------------------------------------------------------
  34. TM5-MP 1.0 -- ECEARTH v3
  35. --------------------------------------------------------------
  36. === compilation
  37. cd ${ECEARTH}/sources
  38. ec-conf -p <your-platform> config-build.xml
  39. cd TM5
  40. setup_tm5 [-c|--clean] [-n|--new] [-v|--verbose] [-j N | --jobs=N] ecconfig-ecearth3.rc
  41. --new : means realclean
  42. --jobs=N : N processes to compile (make), default value is 8
  43. by default, setup_tm5 gathers source code from relevant sub dirs
  44. (defined by "my.source.dirs" key) into ${my.project.dir}/build,
  45. then compiles in the later
  46. compilation log : setup_tm5.comp.log
  47. NOTE:
  48. - IFS nlevels is hardcoded and required for compilation.
  49. - unlike IFS and NEMO, TM5 resolution is set at compilation, and
  50. hardcoded in the template file. See below.
  51. - that resolution limits the number of processors that can run TM5. For
  52. the default 3x2 resolution, it is 45 proc in the Y direction, 60 in the
  53. X direction. In the config-run.xml file, increase NUMPROC_Y as much as
  54. you can first leaving NUMPROC_X to 1, and then you may try NUMPROC_X to
  55. 2 or 3 (the performance of the model quickly deteriorates when NUMPROC_X
  56. increases).
  57. ----------------------------------------------------------
  58. To switch TM5 resolution from 3x2 to 6x4, you need to change the
  59. following lines (with their 6x4 equivalent) in these 3 files (first
  60. one for compilation):
  61. (1) <root-distribution>/sources/TM5/rc/pycasso-config-ecearth3.rc.tmpl
  62. my.region1 : glb300x200
  63. (2) <root-distribution>/runtime/ctrl/namcouple.sh
  64. ctm_grid=CTM3
  65. ctm_nx=120
  66. ctm_ny=90
  67. (3) <root-distribution>/runtime/ctrl/tm5-config-run.rc.tmpl
  68. my.region1 : glb300x200
  69. ----------------------------------------------------------
  70. To add grid info from TM5:
  71. This is done in file
  72. <root-distribution>/sources/TM5/proj/ecearth/branches/mp-ecearth3/src/tm5_prism.F90,
  73. in routine TM5_Prism_Init2:
  74. Set write_grid=.true.
  75. Set correct point_name for region_glb (comment code for region_sfc
  76. and/or spectral grid if their gridinfo is already available)
  77. === setup
  78. ** directories
  79. Within EC-Earth, restart.read.dir must be the same as restart.write.dir.
  80. Following IFS and NEMO, we use the rundir. If first chunk starts from a
  81. restart, then you must ensure that it is present. This is done in the script now.
  82. TM5 hackers: If restart.*.dir is not the rundir, you must create that
  83. directory if needed. This is not done in the script.
  84. Other directories that TM5 usually creates and that may need to be created
  85. differently within EC-Earth: output.dir, timing.output.subdir,
  86. settings.output.subdir, and tmm.output.
  87. Like for restart dir, we default to rundir for now, and deals with any pre/post
  88. processing in the script.
  89. ** run config
  90. TM5 does not use namelist, but instead rely on a rc file argument. This rcfile
  91. is obtained by calling:
  92. setuptm5 --no-compile \
  93. --time-start=${TIME_START} \
  94. --time-final=${TIME_FINAL} \
  95. --istart=${ISTART} \
  96. RAW_RCFILE
  97. This call creates a runtime rc file argument in the ECEARTH_RUNDIR, by:
  98. - expanding env variable
  99. - unraveling the various included rc files
  100. - evaluate python snippets
  101. - update keys with command line options (basically those that changes with each leg)
  102. (It will also put an unneeded submit_tm5 script in the rundir. Script must
  103. delete it for sake of completion)
  104. We could skip the call to setup_tm5, but that would require quite a bit of
  105. editing, and lost of flexibility, since many keys would be harcoded. We want
  106. to keep a flexible setup, to be able to drive TM5 without chemistry but with
  107. inactive tracers for example.
  108. The input RAW_RCFILE is based on a template. To set the key (those that remain
  109. the same with every leg) in the template, there is three possibilities:
  110. (1) use ec-conf: config-run.xml must include a translation to set the
  111. leg-independent keys
  112. (2) use shell variables, which must be exported before, and can be set from
  113. the xml tags and/or with the config keys at the top of the templates scripts
  114. (3) or a mixture of both
  115. Option (3) is currently used.