[cam-users] Slab ocean/aquaplanet

Peter Langen plangen@gfy.ku.dk
Wed, 27 Nov 2002 09:43:16 +0100


This is a multi-part message in MIME format.
--------------040709060301070402040606
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Dear CAM-Users

I am working with the CAM2.0.1 on Compaq Alpha's without MPI available.
I wish to perform experiments with the following setup:

-T21
-aquaplanet
-no seasonal cycle
-slab ocean
-with and without sea-ice

In connection to this I have some questions and comments:

1) Having chosen T21 in the configuration, using the "-infile" option to
the build-namelist-script makes it go into some infinite loop. This is
of course worked around by entering the name-list variables in the
command line, but it is still weird since it doesn't happen when using
T42. Has anybody else encountered this?

2) If I set "-ocn som" in the configuration, I hoped to be able to run
in slab ocean mode, but it seems that I am missing some code to be able
to do this. The compilation stops when trying to build "ice_data.o",
since here a reference is made to the sst_data-module in the directory
cam2.0.1/models/atm/cam/src/ocnsice/dom which is not included in 
"Filepath" when "-ocn som" is chosen. Has anybody run the CAM as
stand alone with a slab ocean model, or is it necessary to go through
the flux coupler (which needs mpi) ?

3) When running with (aqua_planet=.true.) in the namelist, there is no
sea ice in the model and SST's are specified analytically. How do I
change this?

4) Has anybody else tried to make (and perhaps even tested) an
aquaplanet/SOM setup?

At the bottom of this mail I have included the error message from the 
compilation in SOM-mode. With the mail I have attached the run-script, 
"testrun.csh", used.

Thanks a lot

Peter Langen

-- 
Peter Langen
Niels Bohr Institute for Astronomy, Physics and Geophysics
Geophysical Department
University of Copenhagen


THIS IS THE ERROR MESSAGE:

f90: Error: 
/users/apollo_users/plangen/ccsm/cam201/cam2.0.1/models/ice/csim4/ice_data.F90, 
line 607: Error in opening the Library module file.   [SST_DATA]
   use sst_data, only: sst
------^
f90: Error: 
/users/apollo_users/plangen/ccsm/cam201/cam2.0.1/models/ice/csim4/ice_data.F90, 
line 658: Conflicting attributes or multiple declaration of name.   [SST]
               surface_state2d(lchnk)%tssub(i,k)=sst(i,lchnk)+Tffresh
------------------------------------------------^
f90: Error: 
/users/apollo_users/plangen/ccsm/cam201/cam2.0.1/models/ice/csim4/ice_data.F90, 
line 607: Name in only-list does not exist.   [SST]
   use sst_data, only: sst
----------------------^
gmake: *** [ice_data.o] Error 1


--------------040709060301070402040606
Content-Type: application/x-csh;
 name="testrun.csh"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="testrun.csh"

#! /usr/bin/csh -f

#-----------------------------------------------------------------------
## ALPHA
##------------
##
## This is a script to build and run CAM
## on the Compaq Alphas at DCESS.  The configuration
## is T21L26 , Eulerian dynamics, CLM2 land model, and CSIM4 ice model.

## ----------------------------------
## Aquaplanet and/or slab ocean model
## ----------------------------------

## Made by Peter Langen from example script for ibm. Revised 18/11-02
##

## Move history files and delete old initial and restart files?
set move = 0

## ROOT OF CAM DISTRIBUTION
## Contains the source code for the CAM distribution.
## (the root directory contains the subdirectory "models")
setenv CAM_ROOT /users/apollo_users/plangen/ccsm/cam201/cam2.0.1

## ROOT OF CAM DATA DISTRIBUTION
## Contains the initial and boundary data for the CAM distribution.
## (the root directory contains the subdirectories "atm" and "lnd")
setenv CSMDATA  /users/apollo_users/plangen/ccsm/inputdata

## Exe-name, Case name and Input file for build-namlist
set cam_exe      = slab
set case         = $cam_exe
set runtype      = initial
set nelapse      = -1
set mss_irt      = 0
set infile       = $CAM_ROOT/../namelist_low01 # T21 resolution-run  namelists

## _______________________________________________________________________
##     Type of model
set aqua_planet  = .false.
set ocn          = som  # data ocean model (dom) or slab ocean model (som)
## -----------------------------------------------------------------------

## Resolution setting
set res          = 32x64  #  ---- T21 ----
#set res          = 64x128 #  ---- T42 ----

## NO HARDWARE SWITCH on Apollo
setenv NO_SWITCH TRUE

## Do our best to get sufficient stack memory
unlimit
limit stacksize unlimited
setenv MP_STACK_SIZE 17000000

## $wrkdir is a working directory where the model will be built and run.
## $blddir is the directory where model will be compiled.
## $rundir is the directory where the model will be run.
## $cfgdir is the directory containing the CAM configuration scripts.
set wrkdir       = /users/apollo_users/plangen/ccsm/cam201/work
set blddir       = $wrkdir/$case/bld
set rundir       = $wrkdir/$case
set cfgdir       = $CAM_ROOT/models/atm/cam/bld

set archive_dir  = $CAM_ROOT/../archive/$case
set rest_pfile   = $CAM_ROOT/../restartpointers/cam2.$case.rpointer
set rpntpath     = $CAM_ROOT/../restartpointers/lnd.$case.rpointer

## Ensure that run and build directories exist
mkdir -p $archive_dir           || echo "cannot create $archive_dir" && exit 1
mkdir -p $rundir                || echo "cannot create $rundir" && exit 1
mkdir -p $blddir                || echo "cannot create $blddir" && exit 1

## If an executable doesn't exist, build one.
if ( ! -x $blddir/$cam_exe ) then
    cd $blddir                             || echo "cd $blddir failed" && exit 1
    $cfgdir/configure -v 2 -fflags "-tune host -arch host -fast" \
    -res $res -nospmd -test -cam_exe $cam_exe -ocn $ocn \
    -nc_inc /users/apollo_users/rca/tools/netcdf-3.5.0/include \
    -nc_lib /users/apollo_users/rca/tools/netcdf-3.5.0/lib -s || echo "configure failed" && exit 1
    echo "building CAM in $blddir ..."
    rm -f Depends
gmake >&! MAKE.out                 || echo "CAM build failed: see $blddir/MAKE.out" && exit 1
endif

## Create the namelist
cd $blddir                      || echo "cd $blddir failed" && exit 1
$cfgdir/build-namelist -test -case $case -runtype $runtype -o $rundir/namelist \
-namelist "&camexp aqua_planet=$aqua_planet nelapse=$nelapse  mss_irt=$mss_irt rest_pfile='$rest_pfile' / \
&clmexp rpntpath='$rpntpath' /" \
  || echo "build-namelist failed" && exit 1

## Run CAM
cd $rundir                      || echo "cd $rundir failed" && exit 1
echo "running CAM in $rundir"
nice +10 $blddir/$cam_exe < namelist  || echo "CAM run failed" && exit 1

if ( $move == 1 ) then
  echo "Moving history files and deleting old initial and restart files..."
  cd $rundir
  ~/tools/moveold $archive_dir `ls $case.cam2.h*`
  ~/tools/moveold $archive_dir `ls $case.clm2.h*`
  ~/tools/deleteold `ls $case.cam2.i*`
  ~/tools/deleteold `ls $case.clm2.i*`
  ~/tools/deleteold `ls $case.cam2.r.*`
  ~/tools/deleteold `ls $case.clm2.r.*`
  ~/tools/deleteold `ls $case.cam2.rh0.*`
  ~/tools/deleteold `ls $case.cam2.rh0.*`

  echo "History files have been moved to"
  echo $archive_dir
  echo "and only newest initial and restart files have been kept."
endif

exit 0

--------------040709060301070402040606--