4. Shell: All the necessary shell-scripts

a. There are common shell scripts to be used regardless of the applications
b. And in each directory, application specific scripts are located
You may change each script according to your purpose.

#a. common scripts
    • changenamelistinput.sh edit_sst_wrfinput.sh prepareROMS.sh uauo.sh wrflaunch

#b. specific scripts
    • couple.sh ROMS2WRF.sh WRF2ROMS_bulk.sh

After complete the necessary declaration in wrf_roms main script (e.g., wrf_roms_mjo7_1day_cu7_mp2.sh),
couple.sh will sequentially run these scripts in a specified interaval of loop

More specific descriptions on each shell script

1. submit.sh is to submit the job at WHOI's scylla cluster. In atlas, this is not necessary
Always use
#$ -l h_rt=24:00:00,num_proc=12
#$ -q default.q

but change
#$ -pe mpi 120
to match your intent use of # cpus (this should be the same as in NCPU in main_wrfroms.sh)

2. main_wrfroms.sh to declare various parameters for the model run.
Note, regardless of coupling frequency (CF) values, I tend to use 3 hourly wrfout (WRF_OUTPUT_FREQUENCY=3) and 6 hourly wrflowinp SST (SST_FREQUENCY=6).

3. common shell scripts
wrflaunch: script that launches the wrf run
prepare-ROMS.sh: script that reads the initial and boundary conditions for ROMS run.
changenamelistinput.sh: From Dian (to change the file name to have specific time).
uauo.sh: haven't been used for a while.

4. application-specific
couple.sh: loop sequence: ROMS2WRF -> Run WRF -> WRF2ROMS -> Run ROMS

At every coupling time step, this updates the SST in wrflowinp file at corresponding time step, which then will be used by WRF.
Note SST_FREQUENCY=6 always (wish it could be higher).
So, if CF=24, and Day=1, this will update SST in wrflowinp file over five 6 hourly intervals, hr=0, 6, 12, 18 24, i.e., t=1,2,3,4,5
At Day=2, it will update hr=24, 30 36 42 48 , i.e., t=5,6,7,8,9 etc..

#2. Run WRF:
use wrflaunch.
Since wrfrst are large in size, I only keep the last 4 wrfrst files...
WRF restarts every time using the latest restart file. So the corresponding wrfout files begin to write files from t=0 (initial condition, or wrfrst values).
So it has one more time step (i.e, 5 time steps for 24 hour run with 6 hourly interval).

#3. WRF2ROMS; basically read the forcing variables from WRF outputs to be used to compute the fluxes for ROMS.
So far, there is only WRF2ROMS bulk forcing version.
Special attention to rainfall; total rain = RAINC+RAINNC (RAINSH is nearly zero) and these are accumulated over the forecast hours.
To get the total rainfall over 24 hour (if CF=24), then rain_total=RAIN(end)-RAIN(end-1).
This operation uses NCO library, which I assume is installed in atlas.

#4. Run ROMS is same.