This document is tutorial for performing experiments easily with dcpam5.
As an aside, "RAKURAKU" means "easier".
Build dcpam5 referring to dcpam5 Installation Guide. Work until "Compile source code" in "How to build".
Notes about some compilers that are done the operation check or have done are as follows.
Read it through if the following operation check doesn't go well, because it is likely to apply about other compilers.
Firstly, how to execute a benchmark experiment suggested by Held and Suarez (1994) prepared as a sample is explained.
Move "practice" directory.
$ cd practice
In the directory, execute 'make' command. There are some questions, then input 'Enter' key.
$ make ****** Setup a directory for a experiment ****** Enter directory name [testXX]: Directory in which executable files are prepared [/home/dcpam/work/dcpam5/src/main]: Directory in which NAMELIST files are prepared [/home/dcpam/work/dcpam5/src/main]: Save F90/95 source code files? [Y/n]: Directory in which source code files are prepared [/home/dcpam/work/dcpam5/src]: : *** Setup of "testXX" is complete ***
Then a directory 'testXX' is created, and executable files, NAMELIST files, and source code files are copied to the directory. Move the 'textXX'.
$ cd testXX
Executable files 'dcpam_hs94', 'init_data' etc. will be prepared. Execute 'dcpam_hs94' as follows. If "-h" or "--help" are specified as command line options, the resolution or output files are displayed.
$ ./dcpam_hs94 *** MESSAGE [dcpam_hs94] *** History files are created. *** MESSAGE [dcpam_hs94] *** Restart file "restart.nc" is created. *** MESSAGE [dcpam_hs94] *** History data (time=0.125 days) is output. *** MESSAGE [dcpam_hs94] *** Restart data (time=1440. minute - 20. minute, and 1440. minute) is output to "restart.nc" ########## PREDICTION OF CALCULATION ########### Start Date 2007-07-30T17:25:25+09:00 Current Date 2007-07-30T17:25:35+09:00 Progress 14.29% [*** ] Remaining CPU TIME 0.580000E+02 Completion Date 2007-07-30T17:26:33+09:00 : ############## CPU TIME SUMMARY ################ Setup 0.223517E-09 HistoryGet 0.223517E-09 HistoryPut 0.679995E+00 Dynamics 0.133000E+02 Phyisics 0.342000E+01 TimeFilter 0.209997E+00 ------------------------------------------------ TOTAL TIME = 0.176100E+02
In this case, 7 days calculation is performed, and history data are output to 'U.nc' and 'Temp.nc' etc., and a restart data is output to 'restart.nc'. They are netCDF data with gtool4 NetCDF conventions. In order to visualize or analyze, use tools developed by Dennou Ruby Project.
In order to configure the settings of calculation, use NAMELIST file. As samples, 'dcpam_hs94_T42L20.nml' are prepared. Edit these files and execute with '-N' (or '--namelist') option as follows.
$ ./dcpam_hs94 -N=dcpam_hs94_T42L20.nml *** MESSAGE [timeset] *** NAMELIST group "timeset_nml" is loaded from "dcpam_hs94_T42L20.nml". *** MESSAGE [timeset] *** ----- Initialization Messages ----- *** MESSAGE [timeset] *** StartTime = 0. [day] *** MESSAGE [timeset] *** EndTime = 1200. [day] *** MESSAGE [timeset] *** DelTime = 30. [min] *** MESSAGE [timeset] *** = 1800. [sec] *** MESSAGE [timeset] *** PredictInt = 1. [day] *** MESSAGE [timeset] *** CpuTimeMoniter = T *** MESSAGE [timeset] *** -- version = $Id: index.rd,v 1.2 2008-11-08 19:03:20 morikawa Exp $ *** MESSAGE [gridset] *** NAMELIST group "gridset_nml" is loaded from "dcpam_hs94_T42L20.nml". *** MESSAGE [gridset] *** ----- Initialization Messages ----- *** MESSAGE [gridset] *** nmax = 42 *** MESSAGE [gridset] *** imax = 128 *** MESSAGE [gridset] *** jmax = 64 *** MESSAGE [gridset] *** kmax = 20 :
When a NAMELIST file is loaded, information about loading of NAMELIST group name is output.
In the case of above experiment, initial data is generated internally by execution program. A way to output initial data to a file is described below.
First, as above, move "practice" directory, and create a directory for a experiment by "make" command. Then move the directory.
Executive file "init_data" and NAMELIST file "init_data_T10L8.nml" etc. are prepared for generation of initial data file. At first, edit "init_data_T10L8.nml", and execute as follows. If "-h" or "--help" are specified as command line options, the resolution or output files are displayed.
$ ./init_data -N=init_data_T10L8.nml
By default, a file named "init.nc" is output. In order to use this file as initial data or restart data, See Input initial data or restart data file.
In order to input initial data or restart data from a file, edit NAMELIST file as follows.
&restart_file_io_nml InputFile = 'init.nc', ! 入力するリスタートデータのファイル名 ! filename of input restart data : /
Specify a filename of initial data or restart data to "InputFile".
After change of NAMELIST file, start an experiment with -N or --namelist option and the NAMELIST file as follows.
$ ./dcpam_hs94 -N=dcpam_hs94_TXXLXX.nml
Starting an experiments, following data input messages may be displayed. Confirm them.
|*** MESSAGE [HistoryGetDouble3] *** Input init.nc@UB,time=10.0 |*** MESSAGE [HistoryGetDouble3] *** Input init.nc@UN,time=10.0 |*** MESSAGE [HistoryGetDouble3] *** Input init.nc@VB,time=10.0 |*** MESSAGE [HistoryGetDouble3] *** Input init.nc@VN,time=10.0 |*** MESSAGE [HistoryGetDouble3] *** Input init.nc@TempB,time=10.0 |*** MESSAGE [HistoryGetDouble3] *** Input init.nc@TempN,time=10.0 |*** MESSAGE [HistoryGetDouble3] *** Input init.nc@QVapB,time=10.0 |*** MESSAGE [HistoryGetDouble3] *** Input init.nc@QVapN,time=10.0 |*** MESSAGE [HistoryGetDouble2] *** Input init.nc@PsB,time=10.0 |*** MESSAGE [HistoryGetDouble2] *** Input init.nc@PsN,time=10.0
After editing files under "src" directory, update of contents in a directory for a experiment under "practice" is performed easily as follows. If you edit Fortran 90/95 programs under "src", see RAKURAKU (easier) dcpam5 (under construction) for detail.
Forst, move a directory for a experiment under "practice".
$ cd practice/testXX
Input a following command. A question whether update them may be displayed, then input "Y".
$ make update Update directory "testXX" ? [y/N]: Y
Updated files under "src" directory are copied into "practice/testXX". Old files are renamed to filenames with suffixes ".bak.XX".
Secondly, how to execute a test run with simple physical prcesses.
(In cross compile environment, programs can not be executed as following methods. See a manual of the environment for execution method. )
Move "practice" directory:
$ cd practice
Execute "make" command and copy execution files in the directory. Specify arbitrary directory name. Input Enter key to other questions.
$ make ****** Setup a directory for a experiment ****** Enter directory name [testXX]: ape-test Directory in which executable files are prepared [/home/dcpam/work/dcpam5/src/main]: :
Move the directory, and create initial data file "init_T21L16.nc" using "init_data" and "init_data_T21L16.nml"
$ cd ape-test $ ./init_data -N=init_data_T21L16.nml : *** MESSAGE [restart_file_io] *** ----- Initialization Messages ----- *** MESSAGE [restart_file_io] *** Input:: *** MESSAGE [restart_file_io] *** InputFile = *** MESSAGE [restart_file_io] *** Output:: *** MESSAGE [restart_file_io] *** OutputFile = init_T21L16.nc *** MESSAGE [restart_file_io] *** IntTime = 1. [day] *** MESSAGE [HistoryCreate3] *** "init_T21L16.nc" is created (origin=0. [day]) *** MESSAGE [initial_data] *** NAMELIST group "initial_data_nml" is loaded from "init_data_T21L16.nml". *** MESSAGE [initial_data] *** NAMELIST group "initial_data_nml" is loaded from "init_data_T21L16.nml". *** MESSAGE [initial_data] *** ----- Initialization Messages ----- *** MESSAGE [initial_data] *** Pattern = Small Disturbance of Temperature *** MESSAGE [initial_data] *** TempAvr = 280. *** MESSAGE [initial_data] *** PsAvr = 100000. *** MESSAGE [initial_data] *** QVapAvr = 0.1E-09 *** MESSAGE [HistoryClose] *** "init_T21L16.nc" is closed
Next, create SST data "sst_T21.nc" using "sst_data" and "sst_data_T21.nml".
$ ./sst_data -N=sst_data_T21.nml : *** MESSAGE [restart_surftemp_io] *** ----- Initialization Messages ----- *** MESSAGE [restart_surftemp_io] *** Input:: *** MESSAGE [restart_surftemp_io] *** InputFile = *** MESSAGE [restart_surftemp_io] *** InputName = SurfTemp *** MESSAGE [restart_surftemp_io] *** Output:: *** MESSAGE [restart_surftemp_io] *** OutputFile = sst_T21.nc *** MESSAGE [restart_surftemp_io] *** IntTime = 1. [day] *** MESSAGE [HistoryCreate3] *** "sst_T21.nc" is created (origin=0. [day]) *** MESSAGE [surface_data] *** NAMELIST group "surface_data_nml" is loaded from "sst_data_T21.nml". *** MESSAGE [surface_data] *** NAMELIST group "surface_data_nml" is loaded from "sst_data_T21.nml". *** MESSAGE [surface_data] *** ----- Initialization Messages ----- *** MESSAGE [surface_data] *** Pattern = Hosaka et al. (1998) *** MESSAGE [surface_data] *** SurfTemp = 302. *** MESSAGE [surface_data] *** Albedo = 0.15 *** MESSAGE [surface_data] *** HumidCoeff = 1. *** MESSAGE [surface_data] *** RoughLength = 0.1E-03 *** MESSAGE [surface_data] *** HeatCapacity = 0. *** MESSAGE [surface_data] *** TempFlux = 0. *** MESSAGE [surface_data] *** SurfCond = 0 *** MESSAGE [HistoryClose] *** "sst_T21.nc" is closed
At the last, run a experiment using "dcpam_ape" and "dcpam_ape_T21L16.nml". Resolution is T21L16, time step is 20 minutes. Integration time is 7 days. A restart data file, a restart data file of surface data, and some history data files are output.
$ ./dcpam_ape -N=dcpam_ape_T21L16.nml
If initial data, surface data, settings of experiments want to be changed, edit "init_data_T21L16.nml", "sst_data_T21.nml", "dcpam_ape_T21L16.nml".