This document is tutorial for performing experiments easily with dcpam5.
As an aside, "GOKURAKU" means "easier".
"dcpam5-primitive" input/output NetCDF data based on Gtool4 NetCDF Conventions
Analysis and visualization tools for NetCDF data are need in order to analyze and visualize results of numerical experiments. Here, a GUI (Graphical User Interface) tool GAVE provided from Dennou Ruby Project is used. In addition, a CUI (Character User Interface) tool GPhys is provided there. Please select and use these tools for analysis and visualization.
It may be possible to analyze and visualize results of numerical experiments with some analysis and visualization tools (for example, GrADS, etc.) that can treat NetCDF data.
See Dennou Ruby Products Installation Guide.
Build dcpam5-primitive referring to dcpam5-primitive Installation Guide. Work until "Compile source code" in "How to build".
After building, executable files dcpam_main, init_data, sst_data are created under "src/main" directory. Some NAMELIST files (with suffix ".nml") are prepared in the directory.
$ ls src/main dcpam_hs94_T21L20.nml dcpam_hs94_T42L20.nml dcpam_main dcpam_main.F90 init_data init_data.F90 init_data_T21L16.nml init_data_T21L20.nml init_data_T42L16.nml :
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.
A method for run of a benchmark calculation for evaluating the dynamical cores of atmospheric general circulation models independently of the physical parameterizations proposed by Held and Suarez (1994) (See References) is explained.
"dcpam5-primitive" prepares a executable file dcpam_main.F90 that calculates dynamical core and Newtonian relaxation and Rayleigh damping proposed by Held and Suarez (1994).
Move "practice" directory.
$ cd practice
In the directory, execute 'make' command. The execution files and the NAMELIST files will be automatically copied. Input directory name first of all after inputting 'make' command. (It is assumed "hs94-exp" in the following example). Input 'Enter' to the question after that.
$ make ****** Setup a directory for a experiment ****** Enter directory name [testXX]: hs94-exp Directory in which executable files are prepared [../src/main]: Directory in which NAMELIST files are prepared [../src/main]: Save F90/95 source code files? [y/N]: : *** Setup of "hs94-exp" is complete ***
Then a directory 'hs94-exp' is created, and executable files, NAMELIST files, and source code files are copied to the directory. Move the 'hs94-exp'.
$ cd hs94-exp
Using an executable files 'dcpam_main' and a NAMELIST file dcpam_hs94_T21L20.nml, execute 'dcpam_main' as follows. This program will be finished in few minutes - tens of minutes.
$ ./dcpam_main -N=dcpam_hs94_T21L20.nml | tee hs94.log *** MESSAGE [dcpam_main] *** Run: Held and Suarez (1994) benchmark test : *** MESSAGE [timeset] *** ----- Initialization Messages ----- *** MESSAGE [timeset] *** StartTime = 0. [day] *** MESSAGE [timeset] *** EndTime = 10. [day] *** MESSAGE [timeset] *** DelTime = 30. [min] *** MESSAGE [timeset] *** = 1800. [sec] : : *** MESSAGE [fileset] *** ----- Initialization Messages ----- *** MESSAGE [fileset] *** FileTitle = Held and Suarez (1994) benchmark test *** MESSAGE [fileset] *** FileSource = dcpam5 (http://www.gfd-dennou.org/library/dcpam) *** MESSAGE [fileset] *** FileInstitution = GFD Dennou Club (http://www.gfd-dennou.org) *** MESSAGE [fileset] *** -- version = .... *** MESSAGE [gridset] *** ----- Initialization Messages ----- *** MESSAGE [gridset] *** nmax = 21 *** MESSAGE [gridset] *** imax = 64 *** MESSAGE [gridset] *** jmax = 32 *** MESSAGE [gridset] *** kmax = 20 *** MESSAGE [gridset] *** -- version = .... : ########## PREDICTION OF CALCULATION ########### Start Date 2009-03-06T08:26:41+09:00 Current Date 2009-03-06T08:26:45+09:00 Progress 20.00% [***** ] Remaining CPU TIME 0.160000E+02 Completion Date 2009-03-06T08:27:01+09:00 : ############## CPU TIME SUMMARY ################ held_suarez_1994 0.165611E+01 dynamics_hspl_vas83 0.191452E+02 timefilter_asselin19 0.264027E+00 others 0.896038E+00 ------------------------------------------------ TOTAL TIME = 0.219614E+02
In this case, 10 days integration is performed. Resolution is T21L20 (Number of grid points of longitude, latitude is 64, 32, and number of vertical layer is 20). History data are output to 'U.nc' and 'Temp.nc' etc., and a restart data is output to 'restart.nc'.
In a normal situation, the integration periods and resolution are too short, and too small as benchmark test. In Held and Suarez (1994), integration periods is 1200 days and resolution is T42L20 (Number of grid points of longitude, latitude is 128, 64, and number of vertical layer is 20).
Use ncdump command in order to refer information of output data. That command is included in NetCDF library, so the commend has been built and installed in process of installation of "dcpam5-primitive".
In order to refer information of "U.nc", input the command as follows. Contents are passed to pager "more" over pipe-line, since displayed lines are many.
$ ncdump -h U.nc | more
Contents are explained.
List of dimensional variables included in the data file. Numerical value is number of data of the dimensional variables.
netcdf U { dimensions: lon = 64 ; lat = 32 ; sig = 20 ; sigm = 21 ; time = UNLIMITED ; // (11 currently)
Metadata of dimensional and dependent variables included in the data file. 'float' indicates that the data is single precision real. If the data is double precision or integer, the character is changed to 'double' or 'int'. Variable(dimensional variables depended) is displayed at the back of it.
variables: float lon(lon) ; lon:long_name = "longitude" ; lon:units = "degree_east" ; lon:standard_name = "longitude" ; lon:gt_calc_weight = "lon_weight" ; : float time(time) ; time:long_name = "time" ; time:units = "day" ; : float U(time, sig, lat, lon) ; U:long_name = "eastward wind" ; U:units = "m s-1" ;
Global attirbutes appended to whole of the data file. Conventions of the file, title, source of data, created date and time, etc. are registered.
// global attributes: :Conventions = "http://www.gfd-dennou.org/library/gtool4/conventions/" ; :gt_version = "4.3" ; :title = "Held and Suarez (1994) benchmark test ..." ; :source = "dcpam5 (http://www.gfd-dennou.org/library/dcpam)" ; :institution = "GFD Dennou Club (http://www.gfd-dennou.org)" ; :history = "2008-11-29T22:01:10+09:00 unknown> gtool_history: HistoryCreate\n", "" ; }
In order to refer data, input the command as follows.
$ ncdump Temp.nc | more
The data is displayed as follows.
data: lon = 0, 5.625, 11.25, 16.875, 22.5, 28.125, 33.75, 39.375, 45, 50.625, 56.25, 61.875, 67.5, 73.125, 78.75, 84.375, 90, 95.625, 101.25, 106.875, 112.5, 118.125, 123.75, 129.375, 135, ... lat = -85.76059, -80.26878, -74.74454, -69.21297, -63.67863, -58.14296, -52.60653, -47.06964, -41.53246, -35.99508, -30.45755, -24.91993, -19.38223, -13.84448, -8.306703, ... : Temp = 249.9899, 249.9622, 249.9368, 249.9154, 249.8999, 249.8913, 249.8905, 249.8973, 249.9113, 249.9315, 249.9562, 249.9835, 250.0113, 250.0375, 250.0599, 250.0769, 250.0871, 250.0898, 250.0847, 250.0722, 250.0533, 250.0295, 250.0026, 249.9747, 249.948, 249.9245, 249.9062, 249.8943, 249.8899, 249.8932, 249.9041, 249.9217, 249.9899, 249.9658, 249.9432, 249.9233, 249.9073, 249.8962, 249.8905, 249.8907, 249.8967, 249.9081, 249.9244, 249.9445, 249.9672, 249.9913, 250.0153, 250.0378, 250.0575, 250.0732, 250.084, 250.0894, 250.0889, 250.0825, 250.0708, 250.0543, 250.034, 250.0112, 249.987, 249.9631, 249.9407, 249.9212, 249.9058, 249.8952,
Some data is visualized. A method of visualization with "GAVE" are showed as follows. Firstly, run "gave".
$ gave
Following window will be displayed.
Select a data file by [File] -> [Open] . Select "TempEQHs94.nc" here. This is equilibrium temperature used in Newtonian relaxation proposed by Held and Suarez (1994). After the file is opended, set values as follows, and click [draw].
Following window will be displayed. The figure indicates that temperature is 300 K or more on surface and the equator, and it is decreased as longitude increased and altitude increases.
Select a data file by [File] -> [Open] . Select "TempEQHs94.nc" here. This is equilibrium temperature used in Newtonian relaxation proposed by Held and Suarez (1994). After the file is opended, set as follows, and click [draw].
Next, see changes of eastward wind. Load 'U.nc' by [File] -> [Open] . In this time, set values as follows, and click [draw].
Following window will be displayed. This is eastward wind in a layer nearest to the surface. The figure indicates that velocity is 0 m/s at initial fields, and westward wind is arose at the equator and mid-latitude gradually.
At last, see changes of eastward wind in midair. Display a window that sets dimension by [Tools] -> [Dimensions]. On the windows set [sig] to about 0.2, and click [draw].
Following window will be displayed. This is eastward wind in a layer at about 200 hPa. The figure indicates that velocity is 0 m/s at initial fields, and eastward wind is arose at +/- 40 deg. latitude gradually.
Setting values of calculation is output to standard output. In Run: Dry atmosphere benchmark experiment for dynamical core suggested by Held and Suarez (1994), the messages were written to standard output and a file "hs94.log". See the "hs94.log".
A part of displayed contents is explained.
Start time of calculation, end time of calculation, time step, Interval of predicted end time output, On/off of CPU time monitoring are displayed. These values are managed in timeset module.
|*** MESSAGE [timeset] *** ----- Initialization Messages ----- |*** MESSAGE [timeset] *** StartTime = 0. [day] |*** MESSAGE [timeset] *** EndTime = 10. [day] |*** MESSAGE [timeset] *** DelTime = 30. [min] |*** MESSAGE [timeset] *** = 1800. [sec] |*** MESSAGE [timeset] *** PredictInt = 6. [hrs] |*** MESSAGE [timeset] *** CpuTimeMoniter = T |*** MESSAGE [timeset] *** -- version = ...
Title of experiments, source of data, institutions are displayed. These are given to global attributes of output data. These values are managed in fileset module.
|*** MESSAGE [fileset] *** ----- Initialization Messages ----- |*** MESSAGE [fileset] *** FileTitle = Held and Suarez (1994) benchmark test |*** MESSAGE [fileset] *** FileSource = dcpam5 (http://www.gfd-dennou.org/library/dcpam) |*** MESSAGE [fileset] *** FileInstitution = GFD Dennou Club (http://www.gfd-dennou.org) |*** MESSAGE [fileset] *** -- version ...
Maximum truncated wavenumber, number of grid points in longitude and latitude, number of vertical level are displayed. These values are managed in gridset module.
|*** MESSAGE [gridset] *** ----- Initialization Messages ----- |*** MESSAGE [gridset] *** nmax = 21 |*** MESSAGE [gridset] *** imax = 64 |*** MESSAGE [gridset] *** jmax = 32 |*** MESSAGE [gridset] *** kmax = 20 |*** MESSAGE [gridset] *** -- version ...
Some physical constants are displauyed. These values are managed in constants module. See a manual of this module for details.
|*** MESSAGE [constants] *** ----- Initialization Messages ----- |*** MESSAGE [constants] *** PI = 3.141592653589793 |*** MESSAGE [constants] *** GasRUniv = 8.314 |*** MESSAGE [constants] *** StB = 0.567E-07 |*** MESSAGE [constants] *** FKarm = 0.4 |*** MESSAGE [constants] *** RPlanet = 6371000. |*** MESSAGE [constants] *** Omega = 0.7292106590880652E-04 |*** MESSAGE [constants] *** Grav = 9.800000000000001 |*** MESSAGE [constants] *** CpDry = 1004.6 |*** MESSAGE [constants] *** MolWtDry = 0.28964E-01 |*** MESSAGE [constants] *** GasRDry = 287.0459881231874 |*** MESSAGE [constants] *** CpWet = 1810. |*** MESSAGE [constants] *** MolWtWet = 0.1801528E-01 |*** MESSAGE [constants] *** GasRWet = 461.4971291037386 |*** MESSAGE [constants] *** LatentHeat = 2500000. |*** MESSAGE [constants] *** EpsV = 0.6219886755972932 |*** MESSAGE [constants] *** -- version ...
Information of input/output of restart data are displayed. These values are managed in restart_file_io module. See a manual of this module for details.
|*** MESSAGE [restart_file_io] *** ----- Initialization Messages ----- |*** MESSAGE [restart_file_io] *** Input:: |*** MESSAGE [restart_file_io] *** InputFile = <Non> |*** MESSAGE [restart_file_io] *** ** Initial data is generated in "initial_data" module |*** MESSAGE [restart_file_io] *** Output:: |*** MESSAGE [restart_file_io] *** OutputFile = restart.nc |*** MESSAGE [restart_file_io] *** IntTime = 1. [day] |*** MESSAGE [restart_file_io] *** -- version ...
Information of output of history data are displayed. These values are managed in "gtool_historyauto" module of gtool5 Fortran 90/95 library. See this manual for details.
|*** MESSAGE [HistAuto] *** ----- "gtool_historyauto_nml" is not loaded" ----- |*** MESSAGE [HistAuto] *** Global Settings: |*** MESSAGE [HistAuto] *** AllOutput = T |*** MESSAGE [HistAuto] *** FilePrefix = |*** MESSAGE [HistAuto] *** Interval = 1. [day] |*** MESSAGE [HistAuto] *** Precision = float |*** MESSAGE [HistAuto] *** TimeAverage = F |*** MESSAGE [HistAuto] *** Origin = 0. [sec] |*** MESSAGE [HistAuto] *** Terminus = 10. [day] |*** MESSAGE [HistAuto] *** SliceStart = (/ 1, 1, 1, 1, 1 /) |*** MESSAGE [HistAuto] *** SliceEnd = (/ -1, -1, -1, -1, -1 /) |*** MESSAGE [HistAuto] *** SliceStride = (/ 1, 1, 1, 1, 1 /) |*** MESSAGE [HistAuto] *** SpaceAverage = (/ F, F, F, F, F /) |*** MESSAGE [HistAuto] *** NewFileInterval = -1 [day] |*** MESSAGE [HistAuto] ***
Information of setting values of dynamical core are displayed. These values are managed in dynamics_hspl_vas83 module. See a manual of this module for details.
|*** MESSAGE [dynamics_hspl_vas83] *** ----- Initialization Messages ----- |*** MESSAGE [dynamics_hspl_vas83] *** TimeIntegScheme = Semi-implicit |*** MESSAGE [dynamics_hspl_vas83] *** EFoldTime = 0.1 [day] |*** MESSAGE [dynamics_hspl_vas83] *** VisOrder = 8 |*** MESSAGE [dynamics_hspl_vas83] *** VisCoef = 0.214573634546703E+43 |*** MESSAGE [dynamics_hspl_vas83] *** RefTemp = 300. |*** MESSAGE [dynamics_hspl_vas83] *** -- version ...
In order to configure the settings of calculation, edit a NAMELIST file, and specify the file to "-N" option of an execution. Here, above 'dcpam_hs94_T21L20.nml' is edited. A part of 'dcpam_hs94_T21L20.nml' is showed as follows.
#= NAMELIST file for "dcpam_hs94" # &dcpam_main_nml FlagAPE = .false., ! Physical processes (APE) calculation on/off. FlagHS94 = .true. ! Held and Suarez (1994) forcing on/off. / &fileset_nml FileTitle = 'Held and Suarez (1994) benchmark test', ! Title of output data files FileSource = 'dcpam5 (http://www.gfd-dennou.org/library/dcpam)', ! Source of data file FileInstitution = 'GFD Dennou Club (http://www.gfd-dennou.org)' ! Institution or person that changes data files for the last time / &gridset_nml nmax = 21, ! Maximum truncated wavenumber imax = 64, ! Number of grid points in longitude jmax = 32, ! Number of grid points in latitude kmax = 20 ! Number of vertical level / :
Change end time of integration. Edit EndTimeValue of ×et_nml in "dcpam_hs94_T21L20.nml" as follows.
×et_nml : EndTimeValue = 20.0, ! End time of calculation EndTimeUnit = 'day', ! Unit of end time of calculation
20 days integration is performed when "dcpam_main" is executed with this NAMELIST file.
After edit, execute with '-N' (or '--namelist') option as follows.
$ ./dcpam_main -N=dcpam_hs94_T21L20.nml | tee hs94-T21L20.log *** MESSAGE [timeset] *** NAMELIST group "timeset_nml" is loaded from "dcpam_hs94_T21L20.nml". *** MESSAGE [timeset] *** ----- Initialization Messages ----- *** MESSAGE [timeset] *** StartTime = 0. [day] *** MESSAGE [timeset] *** EndTime = 20. [day] *** MESSAGE [timeset] *** DelTime = 30. [min] *** MESSAGE [timeset] *** = 1800. [sec] *** MESSAGE [timeset] *** PredictInt = 6. [hrs] *** MESSAGE [timeset] *** CpuTimeMoniter = T *** MESSAGE [timeset] *** -- version = .... :
A NAMELIST group name "&xxxxxx_nml" is managed by "xxxxxx" module. List of NAMELIST group names managed in dcpam5-primitive is dcpam5-primitive NAMELIST. See this manual for details.
See Configure output settings about >ool_historyauto_nml
!!! Under construction !!!
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_T21L20.nml are prepared for generation of initial data file. At first, edit "init_data_T21L20.nml", and execute as follows.
$ ./init_data -N=init_data_T21L20.nml
By default, a file named "init_T21L20.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_T21L20.nc', ! filename of input initial/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_main -N=dcpam_hs94_T21L20.nml | tee hs94.log
Starting an experiments, following data input messages may be displayed. Confirm them.
|*** MESSAGE [restart_file_io] *** ----- Initialization Messages ----- |*** MESSAGE [restart_file_io] *** Input:: |*** MESSAGE [restart_file_io] *** InputFile = init_T21L20.nc |*** MESSAGE [restart_file_io] *** Output:: |*** MESSAGE [restart_file_io] *** OutputFile = restart.nc |*** MESSAGE [restart_file_io] *** IntTime = 100. [day] |*** MESSAGE [restart_file_io] *** -- version = ... |*** MESSAGE [HistoryGetDouble3] *** Input init_T21L20.nc@U,time=0. |*** MESSAGE [HistoryGetDouble3] *** Input init_T21L20.nc@V,time=0. |*** MESSAGE [HistoryGetDouble3] *** Input init_T21L20.nc@Temp,time=0. |*** MESSAGE [HistoryGetDouble3] *** Input init_T21L20.nc@QVap,time=0. |*** MESSAGE [HistoryGetDouble2] *** Input init_T21L20.nc@Ps,time=0. |*** MESSAGE [restart_file_io] *** Initial data (not restart data) is input from a data file "init_T21L20.nc".