-----Original Message----- From: Charmaine Franklin Sent: Friday, 2 November 2007 15:46 To: Hongyan Zhu; Vaughan Barras; 'christian.jakob@sci.monash.edu.au' Cc: Greg Roff; 'Martin Dix' Subject: FW: Standalone version of the SCM [SEC=UNCLASSIFIED] Hi, I just tested Martin's standalone version of the SCM (see details below) and got it to run on d2 no problems. Note that the new CNTLATM file is in Martin's directory /cs/flush/dix043/newscm/CNTLATM I have updated my branch test/cnf/r64_scm_pc2 to include Martin's changes. There still seems to be a problem with one of the pc2 diagnostics, which is where the memory overwrite was occurring for the sx6 scm runs. The values have changed in the d2 run but the ice and liquid values are still equal and too high which suggests that there is still a bug in there somewhere. Charmaine -----Original Message----- From: Martin Dix [mailto:Martin.Dix@csiro.au] Sent: Monday, 22 October 2007 14:43 To: Greg Roff; Charmaine Franklin Subject: Standalone version of the SCM I've come up with a way to generate a standalone version of the SCM code that can be built on any linux machine. I've written a python script generate_scm_makefile.py that generates a makefile based on the FCM extracted code. The FCM extract includes a lot of code that's not actually used so you first need to do a full FCM build so that the script can check just what routines are really required. The script should be run in the top level FCM build directory (e.g. /access/work_dix043/UM63_ROUTDIR/xadte). It creates a new bldx subdirectory, creating a dirname.mk file for each source subdirectory. These are all included in Makefile.inc (also created by the script) which is in turn included by the top level Makefile. This last makefile is not automatically created because it's compiler dependent. I've created versions for sxf90, Intel ifort , g95 and gfortran. I've also created routines gc_dummy.F90 and portio.F90. These replace the GCOM library and some C interface routines to make the code a bit more easily portable. The makefiles and extra routines are in d2:~dix043/scm/standalone and need to be copied to the bldx directory. You can run make from there. If you want to do it on a different machine you just need the src and bldx subdirectories. There are a few differences in the routines used by the SX6 and generic linux versions which means you can't use the SX6 code for the linux version. I've set up a new job xadte which builds a d2 version using the UMUI. Trying to run the model on cherax revealed a couple of problems with missing subroutine arguments related to biogenic aerosol. These are fixed in the branch fcm:um_br/test/dix043/r121_scm_pc2/ which was created from /branches/test/cnf/r64_scm_pc2@121. The CNTLATM namelist file in d2:/bm/home/cnf/scm6.3/standard_hadgem1a_pc2_xagla has a number of aerosol flags turned on, e.g. L_SO2_SURFEM=.TRUE., presumably because it was copied from a HadGEM1 job that included the full aerosol physics. The SCM data has aerosol fields that are set to zero. When I compared SCM runs on the SX6 and cherax the differences were larger than expected. I added a check for unitialised data with the SX6 compiler options -Wf"-init stack=nan heap=nan". This showed there were unitialised values in various tracer routines. I fixed these by turning off all the aerosol related flags (see differences betwee /cs/flush/dix043/scm/CNTLATM and CNTLATM.orig). This changed the cherax results slightly which confirms that an unitialised value was really being used somewhere (the SX6 results didn't change). A couple of other changes were also necessary to allow the model to run properly. These are also checked into the r121_scm_pc2 branch. It's probably best to merge these changes onto the r64_scm_pc2 branch and then we can get rid of my branch. The SCM takes about 10 s on d2 which is quite a bit faster than the SX-6. Martin