Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DART input.nml to template in WRF Tutorial #464

Merged
merged 11 commits into from
Apr 11, 2023
2 changes: 1 addition & 1 deletion models/wrf/shell_scripts/diagnostics_obs.csh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
set datef = `echo $datef $ASSIM_INT_HOURS | ${DART_DIR}/models/wrf/work/advance_time`

end
ls -1 obs_seq.final_* >! flist
readlink -f obs_seq.final_* >! flist

cat >! script.sed << EOF
/obs_sequence_name/c\
Expand Down
7 changes: 7 additions & 0 deletions models/wrf/shell_scripts/driver.csh
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had major trouble running tutorial without this check to make sure there were no pre-existing start_member and done_member diagnostic files that existed during first run through of driver.csh. There was a tendency for these diagnostic files to exist already from prior execution of init_ensemble_var.csh. This led to file transfers to begin within driver.csh before the WRF integrations were complete.

Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,13 @@ while ( 1 == 1 )

echo "ready to integrate ensemble members"

# Removing old start_member and done_member diagnostics
if ( -e ${RUN_DIR}/start_member_1) then
${REMOVE} ${RUN_DIR}/start_member_* \
${RUN_DIR}/done_member_*
endif


Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If first time through the driver.csh, there could be lingering start_member or done_member files from the prior init_ensemble_var.csh run. Need to get rid of these or the driver.csh script starts transferring files that do not exist because WRF integration is not yet completed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mgharamti I know you are super busy, but as a regular WRF user, would be worth for you to look this over, especially commit 63a5748 . This commit changes some of the wrf shell scripting which extends outside the tutorial. I think it is OK and just a more simple way of linking the DART input.nml information to the WRF case. No rush on this. I think this is about as much as I want to change for foreseeable future. Thanks @mjs2369 for looking at this too. If everything looks OK please include in next DART release.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@braczka I've looked over these changes and I agree that the WRF shell scripting needs to link ${RUN_DIR}/input.nml as opposed to ${TEMPLATE_DIR}/input.nml.template . I think this is ready to merge.

But there's no rush on this release (the bug-fix that Helen implemented is developer code only), so I also think that we should wait for @mgharamti to take a look if he has the time. If not, we can just go ahead and release sometime next week.

set n = 1
while ( $n <= $NUM_ENS )

Expand Down
15 changes: 11 additions & 4 deletions models/wrf/tutorial/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,14 @@ bash ``export BASE_DIR=<path_to_your_working_directory>``
cp $DART_DIR/models/wrf/tutorial/template/namelist.input.meso $BASE_DIR/template/.
cp $DART_DIR/models/wrf/tutorial/template/namelist.wps.template $BASE_DIR/template/.

3. You will also need the scripting to run a WRF/DART experiment. Copy
the contents of ``$DART_DIR/models/wrf/shell_scripts`` to the
``$BASE_DIR/scripts`` directory.
3. You will also need DART namelists and scripting to run a WRF/DART experiment. Copy
the DART tutorial namelist (``input.nml.template``) to the
``$DART_DIR/models/wrf/tutorial/template`` directory. Also copy the contents of
``$DART_DIR/models/wrf/shell_scripts`` to the ``$BASE_DIR/scripts`` directory.

::

cp $DART_DIR/models/wrf/tutorial/template/input.nml.template $BASE_DIR/template/.
mkdir $BASE_DIR/scripts
cp -R $DART_DIR/models/wrf/shell_scripts/* $BASE_DIR/scripts

Expand Down Expand Up @@ -457,7 +459,7 @@ changes:
+====================+======================================+=========================================================================================================================================================================================================================================================+
| driver.csh | datefnl = 2017042712 | Change to the final target date; here the final date is already set correctly for this tutorial. |
+--------------------+--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| gen_retro_icbc.csh | datefnl = 2017043000 | This is the final date to create WRF initial/boundary conditions for. This is set to the last date that files are included in the tutorial. |
| gen_retro_icbc.csh | datefnl = 2017042712 | Set to the final target date of the tutorial. However, it is possible (not necessary) to create WRF initial/boundary conditions to 2017043000. This is the latest date that files are included in the tutorial. |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to run gen_retro_icbc.csh all the way to 2017043000 when tutorial only runs to 2017042712. This helps streamline troubleshooting.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch here

+--------------------+--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| gen_retro_icbc.csh | paramfile = <full path to param.csh> | The full path to param.csh. Change this on the line after the comment. While these two files are in the same directory here, in general it is helpful to have one param.csh for each experiment. |
+--------------------+--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Expand Down Expand Up @@ -557,6 +559,11 @@ and look near the end. You will need to modify the lines staring with
also want to modify this script to test running a single member first —
just in case you have some debugging to do.

However, be warned that to successfully complete the tutorial, including
running the *driver.csh* script in Step 5, using a smaller ensemble
(e.g. < 20 members) can lead to spurious updates during the analysis step,
causing the WRF simulation to fail.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tutorial can run OK with as little as 20 ensemble members. Wanted to avoid confusion with new users that using less than recommended 50 members, although good for quick troubleshooting, introduces problems if not done carefully.

When complete for the full ensemble, you should find 50 new files in the
directory ``output/2017042700/PRIORS`` with names like *prior_d01.0001*,
*prior_d01.0002*, etc... You may receive an e-mail to helpfully inform
Expand Down