-
Notifications
You must be signed in to change notification settings - Fork 145
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
Conversation
This fixes broken link to WRF tutorial input.nml.template file during gen_retro_icbc.csh and init_ensemble_var.csh steps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Brett,
This fix seems to fix the problem of the missing input.nml. I'm not sure why there is all this scripting but these 3 input files have to be copied by hand. There is definitely still a lot that could be done to make the tutorial better.
init_ensemble_var.csh has a couple of places where input.nml.template is copied or linked:
${COPY} ${TEMPLATE_DIR}/input.nml.template input.nml |
${LINK} ${TEMPLATE_DIR}/input.nml.template ${RUN_DIR}/advance_temp${n}/input.nml |
and this note:
DART/models/wrf/shell_scripts/init_ensemble_var.csh
Lines 64 to 65 in e17959d
# TJH why does the run_dir/*/input.nml come from the template_dir and not the rundir? | |
# TJH furthermore, template_dir/input.nml.template and rundir/input.nml are identical. SIMPLIFY. |
I'm not sure if these scripts are used outside the tutorial or not, so I can't comment on whether these copies/links are expected to work.
Cheers,
Helen
models/wrf/tutorial/README.rst
Outdated
@@ -236,6 +236,7 @@ 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/. | |||
cp $DART_DIR/models/wrf/tutorial/template/input.nml.template $BASE_DIR/template/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
input.nml.template is a DART namelist. The comment above talks about WRF namelists. It would be good to be clear about namelists for running WRF vs namelist for running DART executables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest commit 911dc4e, addresses this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hkershaw-brown This is just a simple band-aid fix that gets the tutorial to run further. I am not suggesting things are ideal -- definitely is room for a refactor. I am still trying to actually complete the tutorial in its entirety just to get more perspective. I will comment more later today -- Cheyenne has been quite overloaded lately so it has been difficult for me to get even short jobs through. In general, the integration of multiple jobs of WRF interacting tightly with shell scripts that arrange the output files makes troubleshooting very difficult. These are all in one scripts designed for an advanced user. Feel like the tutorial could be more step-wise so user can check that each step was completed correctly before shell scripts start looking for files that may/ may not be there, then fails. The pure number of scripts, pbs jobs, log files, diagnostic files has to be overwhelming to a new user. It seems the default tutorial could be brought down from 50 to 5 ensemble members, and not clear to me why ./gen_retroc_icbc.sh needs to run from 201742700 through 201743000 to generate icbc, when the assimilation runs from only 201742700 to 201742712. Could be streamlined, without effecting functionality, I would think. |
totally agree! Great work smashing through the tutorial! |
The excessive linking as @hkershaw-brown points out above makes it very difficult/confusing to make meaningful changes to the DART
Also settings may be updated during changes to param.csh and running the ./setup.csh. This is especially annoying when updating the ensemble member number for the tutorial -- which is an especially useful update during troubleshooting. Looking to streamline this. |
Redirecting ls of linked files provides bad syntax to diagnostic_obs.csh
There are several template model_mod.f90 in models/template This fix picks a particular model_mod.f90 for each developer test. Fixes #408 developer test quickbuilds Added LOCATION back into developer test quickbuilds
If first time through driver.csh start_member and done_member diagnostics could exist causing errors with file transfers
There was a problem hiding this comment.
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.
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. | ||
|
There was a problem hiding this comment.
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.
@@ -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. | |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch here
…te/threed_model_mod.f90 for readability
Eliminating need to transfer DART input.nml to template directory within tutorial. Support editing of rundir input.nml only.
WRF shell scripts now generate links to DART input.nml within run dir, not template directory. Corrects missing updates from setup.csh.
@@ -89,7 +89,7 @@ ${COPY} ${SHELL_SCRIPTS_DIR}/add_bank_perts.ncl ${RUN_DIR} || exit 8 | |||
${COPY} ${SHELL_SCRIPTS_DIR}/new_advance_model.csh ${RUN_DIR} || exit 9 | |||
|
|||
# Edit input.nml.template so that its ens_size is set to the same value as $NUM_ENS in param.csh | |||
sed "s/ens_size.*/ens_size =$NUM_ENS,/g" ${DART_DIR}/models/wrf/tutorial/template/input.nml.template > ${RUN_DIR}/input.nml || exit 8 | |||
sed "s/ens_size.*/ens_size = $NUM_ENS,/g" ${DART_DIR}/models/wrf/tutorial/template/input.nml.template > ${RUN_DIR}/input.nml || exit 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The setup.csh script was designed to apply ensemble member updates to the run directory input.nml, thus all WRF shell scripting (e.g. gen_retro_icbc.csh, init_ensemble_var.csh, new_advance_model.csh etc) should link or copy the run directory input.nml, not the input.nml located in the template directory. This is now consistent with the WRF tutorial instructions.
${RUN_DIR}/done_member_* | ||
endif | ||
|
||
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
@braczka I've been reading through the WRF tutorial, and I noticed that in the step before where the user runs gen_retro_icbc.csh and init_ensemble_var.csh, here , the user has to edit some of the variables' values in driver.csh, gen_retro_icbc.csh, and gen_pert_bank.csh. I'm just wondering as to why we have the users make these changes and we don't go ahead and make these changes in main? This is NOT relevant for the release, but just a curiosity question. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved.
Bundle this PR with #466 for release.
@mjs2369 Technically the only variable that needs to be updated in the tutorial is the path to |
Description:
Simple 1 line documentation change that repairs broken link to WRF DART tutorial input.nml.template file. Resolves problems during gen_retro_icbc.csh and init_ensemble_var.csh steps.
Fixes issue
Related to github issue #295 .
Types of changes
Documentation changes needed?
Checklist for merging
Checklist for release