Skip to content

Commit

Permalink
Changes to NCL scripts to find write-component grid parameters. (#52)
Browse files Browse the repository at this point in the history
* Use sfc_climo_gen code from the "develop" branch of UFS_UTILS instead of the previous feature branch.

* Add RUN_ENVIR parameter to switch between nco and community modes.

* Simplify set of possible values that VERBOSE takes on.

* Rename predefined domains for clarity and add new predefined domain (13km HRRR/CONUS).

* Set WORKDIR equal to EXPT_DIR so that the preprocessing subdirectories are under EXPT_DIR along with everything else.

* Remove creation of symlinks whose names don't contain the string "halo".  That is already done in stage_static.sh.

* Add copying of mosaic file from grid work directory to shave work directory so that all grid and orography files are in one place after the shave step.  This makes things more convenient for later tasks in the workflow (i.e. those after make_grid_orog).

* Add capability to read in grid and orography files from a specified directory instead of creating a grid.  Similarly, add capability to read in surface climatology files from a specified directory instead of generating these files.

* Fixes after testing workflow:

ush/checkout_repo.sh:
Change branch to use from feature/chgres_grib2_gsk to feature/chgres_grib2 since that has all the latest (and the _gsk one may have been overwritten).

ush/get_extrn_mdl_file_dir_info.sh:
Change variable name; remove debugging statements.

ush/get_extrn_mdl_files.sh:
Put in a check for the availability of external model data on the specified CDATE.

ush/make_ICS_surf_LBC0.sh:
Change cd to cd_vrfy; fix directory in which to look for surface climatology files.

ush/make_LBC1_to_LBCN.sh:
Change cd to cd_vrfy; fix directory in which to look for surface climatology files; fix bug involving input_type.

ush/run_FV3SAR.sh:
Change cd to cd_vrfy.

ush/stage_static.sh:
Put in fix so that RES and CRES are calculated only if the make_grid_orog task is not being run.  Also, put in fix to set these variables in the variable definitions file.

ush/templates/FV3SAR_wflow.xml:
Make file non-executable.

* Fix bug (directory being considered should be the one for LBCS, not ICSSURF).

* Changes to NCL code to allow finding of write-component grid parameters on 13km HRRR (CONUS) grid.
  • Loading branch information
gsketefian authored and JeffBeck-NOAA committed Aug 2, 2019
1 parent df873c2 commit 64db99b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 17 deletions.
10 changes: 8 additions & 2 deletions ush/NCL/plot_FV3SAR_field_native.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ run_dir = "/scratch3/BMC/det/Gerard.Ketefian/UFS_CAM_test_instructions/expt_dirs
run_dir = "/scratch4/BMC/gmtb/Linlin.Pan/ice/Linlin.Pan/rtgen.112531/tmp/fv3_regional_control"
run_dir = "/scratch3/BMC/det/beck/FV3-CAM/run_dirs/real_time/2019062300"

run_dir = "/scratch3/BMC/det/Gerard.Ketefian/FV3SAR_demo_PASPBL_20190725/expt_dirs/FFFFF"

tile_inds := (/ 1, 7, 4 /)
;tile_inds := (/ 1, 4 /)
;tile_inds := (/ 5, 6 /)
Expand Down Expand Up @@ -418,8 +420,8 @@ char_dq + "ncgm" + char_dq + "." + char_nl
;
; **********************************************************************
;
if (True) then
;if (False) then
;if (True) then
if (False) then

fn := "1916021000000"
fp := addfile(fn + ".grb2", "r")
Expand Down Expand Up @@ -674,6 +676,10 @@ if (True) then

dx_native = 3.0d+3
dy_native = 3.0d+3

dx_native = 13.0d+3
dy_native = 13.0d+3

angle_units = "deg"

out := calc_wrtcmp_grid_params_lambert_cnfrml( \
Expand Down
5 changes: 4 additions & 1 deletion ush/NCL/process_plot_params.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ example_usage_and_help_str
;
; **********************************************************************
;
work_dir = str_sub_str(run_dir, "expt_dirs", "work_dirs")
; Don't need this line since we got rid of work_dirs and put all prepro-
; cessing output in subdirectories in the experiment directory.
; work_dir = str_sub_str(run_dir, "expt_dirs", "work_dirs")
work_dir = run_dir



Expand Down
26 changes: 13 additions & 13 deletions ush/NCL/read_FV3SAR_grid_native.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -231,19 +231,19 @@ begin
if (strcmp_exact(gtype, "regional") .and. (n_tile .eq. 7)) then
grid_fn = grid_fn + ".halo" + tostring(nhalo_T7) + ".nc"

; grid_fn = work_dir + "/shave/" + grid_fn

;The following is just a temporary fix to get plots for Jeff's real_time
;runs which don't use the latest directory structure. The above is still
; the correct way to do it in general
temp_dir := str_sub_str(run_dir, "run_dirs", "work_dirs")
;temp_dir := str_sub_str(temp_dir, "2019062300", "shave")
indx := str_index_of_substr(temp_dir, "/", -1)
temp_dir := str_get_cols(temp_dir, 0, indx-1)
print("run_dir = " + char_dq + run_dir + char_dq)
print("temp_dir = " + char_dq + temp_dir + char_dq)
pause
grid_fn = temp_dir + "/shave/" + grid_fn
grid_fn = work_dir + "/shave/" + grid_fn

;;The following is just a temporary fix to get plots for Jeff's real_time
;;runs which don't use the latest directory structure. The above is still
;; the correct way to do it in general
;temp_dir := str_sub_str(run_dir, "run_dirs", "work_dirs")
;;temp_dir := str_sub_str(temp_dir, "2019062300", "shave")
;indx := str_index_of_substr(temp_dir, "/", -1)
;temp_dir := str_get_cols(temp_dir, 0, indx-1)
;print("run_dir = " + char_dq + run_dir + char_dq)
;print("temp_dir = " + char_dq + temp_dir + char_dq)
;pause
;grid_fn = temp_dir + "/shave/" + grid_fn

else
grid_fn = grid_fn + ".nc"
Expand Down
2 changes: 1 addition & 1 deletion ush/make_LBC1_to_LBCN.sh
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ esac
#-----------------------------------------------------------------------
#
num_fhrs="${#EXTRN_MDL_LBC_UPDATE_FHRS[@]}"
for (( i=0; i<=$(( $num_fhrs - 1 )); i++ )); do
for (( i=0; i<$num_fhrs; i++ )); do
#
# Get the forecast hour of the external model.
#
Expand Down

0 comments on commit 64db99b

Please sign in to comment.