This document is tutorial for performing experiments easily with dcpam4.
As an aside, "GOKURAKU" means "easiest".
Build dcpam4 referring to dcpam4 Installation Guide. Work until "Compile source code" in "How to build".
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/dcpam4/src/main]: Directory in which NAMELIST files are prepared [/home/dcpam/work/dcpam4/src/main]: Save F90/95 source code files? [Y/n]: Directory in which source code files are prepared [/home/dcpam/work/dcpam4/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_sample' 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 "dcpam_hs94_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 "dcpam_hs94_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 'dcpam_hs94_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_T10L12.nml' and 'dcpam_hs94_T21L12.nml' are prepared. Edit these files and execute with '-N' (or '--namelist') option as follows.
$ ./dcpam_hs94 -N=dcpam_hs94_T10L12.nml *** MESSAGE [dcpam_hs94] *** NAMELIST group "dcpam_hs94_grid_nml" is loaded from "dcpam_hs94_T10L12.nml". &DCPAM_HS94_GRID_NML NMAX = 10, IMAX = 32, JMAX = 16, KMAX = 12 / *** MESSAGE [dcpam_hs94] *** NAMELIST group "dcpam_hs94_time_nml" is loaded from "dcpam_hs94_T10L12.nml". &DCPAM_HS94_TIME_NML START_TIME_VALUE = 0.000000000000000E+000, START_TIME_UNIT = sec , DELTA_TIME_VALUE = 20.0000000000000 , DELTA_TIME_UNIT = minute , TOTAL_TIME_VALUE = 7.00000000000000 , TOTAL_TIME_UNIT = day , PREDICT_SHOW_INTERVAL_VALUE = 1.00000000000000 , PREDICT_SHOW_INTERVAL_UNIT = days / :
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.
A sample "init_sample" is prepared for generation of initial data file. Execute as follows. If "-h" or "--help" are specified as command line options, the resolution or output files are displayed.
By default, a file named "init_T10L12.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. NAMELIST file for "dcpam_hs94" is "dcpam_hs94_TXXLXX.nml". Specify input data information to NAMELIST group name "dcpam_hs94_initdata_nml" in the NAMELIST files.
&dcpam_hs94_initdata_nml initial_data_prepared = .false., !!$ initial_data_prepared = .true., ! Presence or absence of initial data init_nc = 'init.nc', !!$ init_nc = 'dcpam_hs94_restart.nc', ! NetCDF file for initial data init_nc_time_varname = '', !!$ init_nc_time_varname = 'time', ! Variable name of time. ! If this variable is null character, ! time is not specified when data is input. ! init_nc_timeB = -90.0, ! Time of initial data ( $ t-\Delta t $ ) init_nc_timeN = 0.0 ! Time of initial data ( $ t $ ) /
Change a value of "initial_data_prepared" to ".true.", and specify a filename of initial data or restart data to "init_nc". In order to load a data file not including time dimension like initial data files, specify empty to "init_nc_time_varname". On the other hand, in order to load a data file including time dimension like restart data files, specify a name of the time dimension (default name is "time"). If a name of the time dimension is specified to "init_nc_time_varname", specify time of step t - delta t to "init_nc_timeB", and time of step t to "init_nc_timeN".
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 [HistoryGetDouble1] *** Input init_T10L12.nc@lon |*** MESSAGE [HistoryGetDouble1] *** Input init_T10L12.nc@lat |*** MESSAGE [HistoryGetDouble1] *** Input init_T10L12.nc@sig |*** MESSAGE [HistoryGetDouble1] *** Input init_T10L12.nc@sigm |*** MESSAGE [HistoryGetDouble3] *** Input init_T10L12.nc@Vor,time=0.0 |*** MESSAGE [HistoryGetDouble3] *** Input init_T10L12.nc@Vor,time=6.0 |*** MESSAGE [HistoryGetDouble3] *** Input init_T10L12.nc@Div,time=0.0 |*** MESSAGE [HistoryGetDouble3] *** Input init_T10L12.nc@Div,time=6.0 |*** MESSAGE [HistoryGetDouble3] *** Input init_T10L12.nc@Temp,time=0.0 |*** MESSAGE [HistoryGetDouble3] *** Input init_T10L12.nc@Temp,time=6.0 |*** MESSAGE [HistoryGetDouble3] *** Input init_T10L12.nc@QVap,time=0.0 |*** MESSAGE [HistoryGetDouble3] *** Input init_T10L12.nc@QVap,time=6.0 |*** MESSAGE [HistoryGetDouble2] *** Input init_T10L12.nc@Ps,time=0.0 |*** MESSAGE [HistoryGetDouble2] *** Input init_T10L12.nc@Ps,time=6.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) dcpam4 (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".