For someone who is facing trouble how to use the Linear Baroclinic Model (Watanabe and Kimoto 2000)...
At the end of your SYSOUT file, did you find "### RDSTRT: No Initial Data"?
This indicates that the model cannot read the basic states correctly. You might need to change the namelist parameters of “&nmtime start=1,1,1,0,0,0, end=1,1,$TEND,0,0,0 &end” to “&nmtime start=0,1,1,0,0,0, end=0,1,$TEND,0,0,0 &end" in the script of "ln_solver/model/sh/tintgr/linear-run.classic.csh”, for example, just for the consistency of time between the shell script and the basic state file.
You can check the time information in the text header of a basic state using the strings or less command (instead of the Gtool commands):
$ strings ln_solver/bs/gt3/ncepwin.t21l20 | grep GAU
Here GAU is the zonal wind component of the basic state. Then, after "HOUR", you will find "00000101 000000" that means "start=0,1,1,0,0,0". See the screenshot attached.
Use the system-dependent files for the Linux architecture: https://ccsr.aori.u-tokyo.ac.jp/~lbm/sub/lbm_4.html. You need to recompile the model after adding the files to your ln_solver. Please be careful that the model must be compiled by assuming the big endian.
Updated on March 2023: The above now includes ln_solver/solver/lib/linux.
You need to check the SYSOUT file in your output directory to see what happened when the model simulation stopped. Also, confirm if all the input parameters were as you expected in the SYSIN file in your output directory.
When the model stops reading the basic state [ ### RDSTRT: No Initial Data; ###########: STOPPED DUE TO ERROR LEVEL= 1], consider changing the compiler options in src/sysdep/Makedef.*. You may try to set SYSCPPFLAGS without "-DCODE_ENDIAN" if it has been included. You will need to recompile the model at model/src/: make clean; make lib lbm.
A compiler option for big-endian is required in ln_solver/solver/include/make.inc.linux as in the ln_solver/model/src/sysdep/ files as all the code assumes the big-endian data. Please find an example provided on the LBM website (files for the Linux architecture). After modifying your make.inc.linux, please recompile the command.
If you use a long path in solver/util/SETPAR, please check the Fortran file (ecmsbs.f etc.) to see if the maximum length of each character is set to, e.g., 180 (CHARACTER*180).
Do you use GrADS to display the results and see the noisy map as shown in the screenshot attached? Then, the GrADS ctl file must include "big_endian" in the options section, if your machine assumes the little endian at default (e.g., Linux).
The model is not supported for MacOS.
The variables registered in the ln_solver/solver/util/SETPAR file must be consistent to those in ln_solver/solver/util/gt2gt.f. For the dry model (i.e., oclassic=true), please do not include cfq (q: specific humidity), cfx (dt: atmospheric heating), cfy (dq: atmospheric moistening) as these are available only for the moist model (i.e., oclassic=false).
Also, please add a line "IJ = 0" before the do loop 510 in ln_solver/solver/util/gt2gt.f. Then, do not forget to recompile the command gt2gr. This is a known code error in v2.3 or earlier (will be fixed in the future), which may cause errors when converting the model output.
It has been reported that an error in is2po.F appears when compiling the model code ($ make lbm).
You may fix this by changing the following parts in PS2INT of ln_solver/model/src/io/is2po.F:
CALL HQCAXZ( ASIG, HCORD )
CALL HQCDMZ( KMAXS, HCORD )
CALL HQCAXZ( APLEV, 'APLEV' )
Please replace the above parts with the following codes:
CALL HQCAXZ( ASIG, HCORD , 1, KMAX )
CALL HQCDMZ( KMAXS, HCORD )
CALL HQCAXZ( APLEV, 'APLEV', 1, KMAXP )
You need to prepare the initial perturbation data for the anomalies of u, v, T, Ps (and q for the moist model). The data format is the same as the steady forcing data. Please set "oper=t" in the namelist "nmfrc". See the source code ln_solver/model/src/proj/tintgr/dterm-2.F and find the lines where "OPER" appears.
You may add the initial perturbation data in addition to the steady forcing, which is set at the namelist "nmsfrc" (see the users' guide). You may stop the steady forcing at a specific time step by setting fsend (default with the negative value of year: fsend=-1,1,30,0,0,0) in the namelist "nmsfrc" (Note: To terminate the steady forcing at fsend, fsend must be between start and end of the namelist "nmtime").
The parameter tefold in the namelist "nmhdif" sets the damping time scale of the maximum wavenumber of the fourth-order horizontal diffusion (given order=4 in the namelist "nmhdif"). Therefore, you need to change it when increasing the horizontal resolution. In T21, it is set as tefold=6 hours as default. Use tefold=2 hours or a similar value in T42.
&nmhdif order=4, tefold=2, tunit='HOUR' &end
Also, the standard time step should be reduced from delt=40 min to delt=20 min or a similar value in the namelist "nmdelt".
&nmdelt delt=20, tunit='MIN', inistp=2 &end
Please kindly remind the code distributor if you do not have any reply to your model code request email. You usually receive a reply within a week manually.
Please confirm if you followed the instruction to get the model code: https://ccsr.aori.u-tokyo.ac.jp/~lbm/sub/lbm_4.html. You should provide your full name and affiliation and should describe the scientific purpose briefly. To avoid misdelivery, I recommend you use the email address of your institution or university.
I, Michiya Hayashi, hope this FAQ page may help you to use the LBM (Linear Baroclinic Model, Watanabe and Kimoto 2000).
©︎2021 Michiya Hayashi