diff --git a/lessons/Lesson-S1-wps.html b/lessons/Lesson-S1-wps.html new file mode 100644 index 000000000..3c170de2c --- /dev/null +++ b/lessons/Lesson-S1-wps.html @@ -0,0 +1,13180 @@ + + + +Lesson-S1-wps + + + + + + + + + + + + + + + + + + + +
+
+ + +
+
+
+
+

NOTE THIS LESSON WILL SOON BE DEPRECATED IN FAVOR OF THE NEW WPS DOCKER IMAGE METHOD

Lesson S1 - Defining the Domain and Model Initial Conditions

Overview

This lesson covers two topics: creating your case-specific domain that will also be used throughout the WRF-Hydro system and defining static and initial conditions used for the land-surface model.

+

Software and conventions

This notebook is not intended to be used interactively and merely is used to create a static markdown document.

+

This lesson uses the wrfhydro/wps docker utility, which can be obtained using the command docker pull wrfhydro/wps. +Additionally, we will use the latest Croton_NY_example_testcase.tar.gz domain tar ball for this lesson, which can be obtained from the latest WRF-Hydro release at https://github.com/NCAR/wrf_hydro_nwm_public/releases.

+

All paths used in this lesson assume that the lesson materials are located under your home directory in a folder named wrf-hydro-training.

+

Data sources

WRF-Hydro leverages the extensive domain generation and geophysical dataset processing tools available in the WRF Preprocessing System (WPS). The geographical input data (e.g., land cover, soil texture, vegetation) are some of the primary datasets used by WRF-Hydro. The entire dataset collection can be obtained from the WPS geographical input data download page. However, these data are rather large (~50GB) and contain a number of datasets that are not used in most implementations of WRF-Hydro. To facilitate the domain generation process, the WRF-Hydro team has created a subset of the data by removing unnecessary data, removing resolutions of the data not commonly used, and limiting the area to the Continental United States (CONUS). This is consistent with the availability of other datasets used in this tutorial. Thus, the dataset provided with the wrfhydro/training Docker container is considerably smaller than the complete WRF-WPS dataset.

+

Creating the geo_em_d01.nc (geogrid) file to define the domain

geogrid.exe

The WPS program geogrid.exe is used to create the geo_em_d01.nc, hereafter referred to as the 'geogrid' file. The geogrid.exe program takes a Fortran namelist (namelist.wps) and the WPS geographical input data as inputs and creates the geogrid file. However, the geogrid.exe program requires that WRF and WPS be built according to your system specification, and building WRF and WPS can be difficult on some systems. Additionally, much of the functionality of WRF and WPS is not utilized for creating a geogrid file for WRF-Hydro, and many of the options in the namelist.wps are not relevant to this process. Therefore, we have created a Docker container and Python command line utility to abstract much of the WRF/WPS complexity and simplify the process of creating a geogrid file for WRF-Hydro users.

+

We will cover the steps to create the geogrid file using this method in the section 'Creating the geogrid file'. For more advanced usage please see the WRF-WPS documentation.

+

Defining domain boundaries

WRF-Hydro uses domain boundaries defined by the namelist.wps input namelist to the geogrid.exe program. The first step to creating the geogrid file is to define our domain boundaries. The geogrid.exe program takes a centerpoint, x and y grid specifications, and other projection information to define a bounding box for the domain. If you do not already have coordinates, you can obtain them from Google Earth or a standard GIS system. The NOAA supported DomainWizard is also a helpful tool for defining coordinates. However, for this tutorial we have supplied the coordinates for you and you may use the WRF-Hydro geogrid python command line utility to visualize the domain location and create the geogrid file given these coordinates.

+

Exploring the WPS geogrid.exe utility and namelist.wps

The WPS geogrid.exe utility is controlled by options set in the namelist.wps. As previously stated, there are many options in the namelist.wps file that are not relevant to most WRF-Hydro users. For educational purposes, we will take a quick look at the full namelist.wps file and then discuss the relevant options used by the WRF-Hydro geogrid utility in more detail.

+ +
+
+
+
+
+
+
+ +
&share
+ wrf_core = 'ARW',
+ max_dom = 1,
+ start_date = '2006-08-16_12:00:00',
+ end_date   = '2006-08-16_18:00:00',
+ interval_seconds = 21600
+ io_form_geogrid = 2,
+/
+
+&geogrid
+ parent_id         =   1,
+ parent_grid_ratio =   1,
+ i_parent_start    =   1,
+ j_parent_start    =   1,
+ e_we              =  74,
+ e_sn              =  61,
+ !
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!! IMPORTANT NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! The default datasets used to produce the HGT_M, GREENFRAC, 
+ ! and LU_INDEX/LANDUSEF fields have changed in WPS v3.8. The HGT_M field
+ ! is now interpolated from 30-arc-second USGS GMTED2010, the GREENFRAC 
+ ! field is interpolated from MODIS FPAR, and the LU_INDEX/LANDUSEF fields 
+ ! are interpolated from 21-class MODIS.
+ !
+ ! To match the output given by the default namelist.wps in WPS v3.7.1, 
+ ! the following setting for geog_data_res may be used:
+ !
+ ! geog_data_res = 'gtopo_10m+usgs_10m+nesdis_greenfrac+10m','gtopo_2m+usgs_2m+nesdis_greenfrac+2m',
+ !
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!! IMPORTANT NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !
+ dx = 30000,
+ dy = 30000,
+ map_proj = 'lambert',
+ ref_lat   =  34.83,
+ ref_lon   = -81.03,
+ truelat1  =  30.0,
+ truelat2  =  60.0,
+ stand_lon = -98.0,
+
+ geog_data_res = 'default',
+ geog_data_path = '/home/docker/WRF_WPS/utilities/geog_conus'
+/
+
+&ungrib
+ out_format = 'WPS',
+ prefix = 'FILE',
+/
+
+&metgrid
+ fg_name = 'FILE'
+ io_form_metgrid = 2, 
+/
+ +
+
+
+
+
+
+
+

A full description of these options can be found in the WPS user guide at http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3.9/users_guide_chap3.html. The options that are of interest to most WRF-Hydro users are the following:

+

Table 1. WPS namelist options relevent to WRF-Hydro

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
e_weThe number of grid edges in the west-east dimension. The number of grid centers will be e_we-1.
e_snThe number of grid edges in the south-north dimension. The number of grid centers will be e_sn-1.
ref_latA real value specifying the latitude part of a (latitude, longitude) center-point of the domain.
ref_lonA real value specifying the longitude part of a (latitude, longitude) center-point of the domain. West longitudes are negative, and the value of ref_lon should be in the range [-180, 180].
dxA real value specifying the grid distance in the x-direction where the map scale factor is 1. The grid distance is in meters for the 'polar', 'lambert', and 'mercator' projection, and in degrees longitude for the 'lat-lon' projection.
dyA real value specifying the grid distance in the y-direction where the map scale factor is 1. The grid distance is in meters for the 'polar', 'lambert', and 'mercator' projection, and in degrees latitude for the 'lat-lon' projection.
map_projA character string specifying the projection of the simulation domain. Accepted projections are 'lambert', 'polar', 'mercator', and 'lat-lon'. Default value is 'lambert'.
truelat1A real value specifying, the first true latitude for the Lambert conformal conic projection, or the only true latitude for the Mercator and polar stereographic projections.
truelat2A real value specifying, the second true latitude for the Lambert conformal conic projection. For all other projections, truelat2 is ignored. No default value.
stand_lonA real value specifying, the longitude that is parallel with the y-axis in the Lambert conformal and polar stereographic projections. For the regular latitude-longitude projection, this value gives the rotation about the earth's geographic poles. No default value.
geog_data_resA character string specifying a corresponding resolution or list of resolutions separated by + symbols of source data to be used when interpolating static terrestrial data to the grid. This string should contain a resolution matching a string preceding a colon in a rel_path or abs_path specification (see the description of GEOGRID.TBL options) in the GEOGRID.TBL file for each field. If a resolution in the string does not match any such string in a rel_path or abs_path specification for a field in GEOGRID.TBL, a default resolution of data for that field, if one is specified, will be used. If multiple resolutions match, the first resolution to match a string in a rel_path or abs_path specification in the GEOGRID.TBL file will be used. Default value is 'default'.
geog_data_pathA character string giving the path, either relative or absolute, to the directory where the geographical data directories may be found. This path is the one to which rel_path specifications in the GEOGRID.TBL file are given in relation to. No default value.
+

To simplify the process of creating the geogrid file, these options are the only ones needed when using the WRF-Hydro geogrid Docker utility.

+

Lets take a look at the namelist.wps file used by the wrfhydro/wps docker utility

+ +
+
+
+
+
+
+
+ +
&share
+ wrf_core = 'ARW',
+ max_dom = 1,
+ start_date = '2006-08-16_12:00:00',
+ end_date   = '2006-08-16_18:00:00',
+ interval_seconds = 21600
+ io_form_geogrid = 2,
+/
+
+&geogrid
+ parent_id         =   1,
+ parent_grid_ratio =   1,
+ i_parent_start    =   1,
+ j_parent_start    =   1,
+ e_we              =  74,
+ e_sn              =  61,
+ !
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!! IMPORTANT NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! The default datasets used to produce the HGT_M, GREENFRAC, 
+ ! and LU_INDEX/LANDUSEF fields have changed in WPS v3.8. The HGT_M field
+ ! is now interpolated from 30-arc-second USGS GMTED2010, the GREENFRAC 
+ ! field is interpolated from MODIS FPAR, and the LU_INDEX/LANDUSEF fields 
+ ! are interpolated from 21-class MODIS.
+ !
+ ! To match the output given by the default namelist.wps in WPS v3.7.1, 
+ ! the following setting for geog_data_res may be used:
+ !
+ ! geog_data_res = 'gtopo_10m+usgs_10m+nesdis_greenfrac+10m','gtopo_2m+usgs_2m+nesdis_greenfrac+2m',
+ !
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!! IMPORTANT NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !
+ dx = 30000,
+ dy = 30000,
+ map_proj = 'lambert',
+ ref_lat   =  34.83,
+ ref_lon   = -81.03,
+ truelat1  =  30.0,
+ truelat2  =  60.0,
+ stand_lon = -98.0,
+
+ geog_data_res = 'default',
+ geog_data_path = '/home/docker/WRF_WPS/utilities/geog_conus'
+/
+
+&ungrib
+ out_format = 'WPS',
+ prefix = 'FILE',
+/
+
+&metgrid
+ fg_name = 'FILE'
+ io_form_metgrid = 2, 
+/
+ +
+
+
+
+
+
+
+

Setting up lesson directory

Step 1: Setup directory for lesson +First, we need to create a directory to hold the inputs and outputs for this lesson.

+ +
+
+
+
+
+
In [1]:
+
+
+
%%bash
+mkdir -p $HOME/wrf-hydro-training/lessonS1
+
+ +
+
+
+ +
+
+
+
+
+

Step 2: Download the example case.

+

The example case can be obtained from the WRF-Hydro release page at https://github.com/NCAR/wrf_hydro_nwm_public/releases

+

NOTE: The URL below will need to point to the LATEST release

+ +
+
+
+
+
+
In [2]:
+
+
+
%%bash
+cd $HOME/wrf-hydro-training/lessonS1
+wget https://github.com/NCAR/wrf_hydro_nwm_public/releases/download/v5.0.2/croton_NY_example_testcase.tar.gz &>/dev/null
+tar -xf croton_NY_example_testcase.tar.gz
+
+ +
+
+
+ +
+
+
+
+
+

Changing the domain location and boundaries in WPS

In this section we will make a few changes to the example case namelist.wps to demonstrate how to move the domain location and change the extent. NOTE: Do not edit the ~/wrf-hydro-training/example_case/supplemental/namelist.wps file because we will use this prepared namelist to create the example case geogrid file using WPS in a later section of this lesson

+

In general, users want to do the largest, highest-resolution model domain possible. Unfortunately, we are often constrained by available computer power or drive storage. These contraints usually define the acceptable grid sizes for us (e_we, e_sn). Therefore, once we know our domain center, we can play with dx and dy to cover our interested area.

+

We will edit the dx and dy options in the namelist to grow the size of the domain. We will leave all other options the same, which will simply increase the domain coverage but maintain the domain center and domain dimensions.

+

Step 1: Visualize the original domain location.

+

First let's create a basic map of the original example case domain location using the example case namelist.wps file ~/wrf-hydro-training/example_case/supplemental/namelist.wps and the WRF-Hydro geogrid Python utility. You can get help on the arguments to the python utility by accessing its help.

+ +
+
+
+
+
+
In [3]:
+
+
+
%%bash
+docker run wrfhydro/wps --help
+
+ +
+
+
+ +
+
+ + +
+ +
+ + +
+
usage: make_geogrid.py [-h] [--namelist_path NAMELIST_PATH]
+                       [--output_dir OUTPUT_DIR] [--plot_only]
+                       [--create_wrf_input]
+
+Step 1: Pull the image docker pull wrfhydro/dev:conda Step 2: Create a
+directory to bind-mount to Docker for passing files between your system and
+docker mkdir /home/dockerMount Step 3: Create a namelist.wps file for your
+domain using the above example as a starting point and save it in your mount
+directory from step 1. Step 4: Run Docker invoking the python make_geogrid.py
+utility with the required arguments. NOTE THE PATHS LISTED BELOW IN THE
+ARUGMENT LIST ARE FOR THE DOCKER FILESYSTEM. ALSO NOTE THAT ALL PATHS MUST BE
+ABSOLUTEdocker run -v <path-to-your-local-mount-folder>:/home/docker/mount
+wrfhydro/wps --namelist_path /home/docker/mount/namelist.wps --output_dir
+/home/docker/mount/ Note: Windows users will need to remove the \ from the end
+of each line of the above commands.
+
+optional arguments:
+  -h, --help            show this help message and exit
+  --namelist_path NAMELIST_PATH
+                        Path to namelist file containing the namelist.wps
+                        updates
+  --output_dir OUTPUT_DIR
+                        Path to directory to hold outputs
+  --plot_only           Only create a plot of the domain. Geogrid will not be
+                        created if plot_only = true, only a plot of the domain
+                        will be created.
+  --create_wrf_input    create a wrfinput initial condition file for WRF-Hydro
+
+
+
+ +
+
+ +
+
+
+
+
+

Note that the Docker utility entrypoint script takes 4 arguments, the first --namelist_path is the path to your namelist.wps file, the second --output_dir is the path to the directory to hold the output, and the third --plot_only is a boolean True or False indicating whether or not to plot the domain. If plot_only the utility will only plot the domain and not create the geogrid file. This option is useful for making changes to your domain location or extent. The fourth argument --create_wrfinput is a boolean True or False indicating whether or not to create a wrfinput initial conditions.

+

Now, let's create a plot of the original example case domain location.

+ +
+
+
+
+
+
In [4]:
+
+
+
%%bash
+docker run -v $HOME/wrf-hydro-training/lessonS1/:/home/docker/mount wrfhydro/wps \
+--namelist_path /home/docker/mount/example_case/supplemental/namelist.wps \
+--output_dir /home/docker/mount \
+--plot_only
+
+ +
+
+
+ +
+
+ + +
+ +
+ + +
+
Proj4: +proj=lcc +units=meters +a=6370000.0 +b=6370000.0 +lat_1=30.0 +lat_2=60.0 +lat_0=45.0 +lon_0=-97.0
+Grid center x,y: [1849500.1972706 -108771.437837 ]
+Grid center lat,lon: [ 58.50955341 -63.99173649]
+Domain extent: [1842000.1972705964, 1857000.1972705964, -116771.43783700376, -100771.43783700376]
+Process completed after 8.99 seconds.
+
+
+
+ +
+
+ +
+
+
+
In [5]:
+
+
+
import os
+from IPython.display import Image
+Image(filename=os.path.expanduser('~/wrf-hydro-training/lessonS1/domain.png')) 
+
+ +
+
+
+ +
+
+ + +
+ +
Out[5]:
+ + + + +
+ +
+ +
+ +
+
+ +
+
+
+
+
+

Step 2: Make a copy of the original domain namelist.wps

+

We will copy our original domain namelist.wps that was used to create the example case and edit it. It is located at ~/wrf-hydro-training/example_case/supplemental/namelist.wps NOTE: Do not edit the original namelist.wps ~/wrf-hydro-training/example_case/supplemental/namelist.wps because we will use it later to create our geogrid file.

+ +
+
+
+
+
+
In [7]:
+
+
+
%%bash
+cp ~/wrf-hydro-training/lessonS1/example_case/supplemental/namelist.wps ~/wrf-hydro-training/lessonS1/namelist_edit.wps
+
+ +
+
+
+ +
+
+
+
+
+

Step 3: Edit the ~/wrf-hydro-training/output/lessonS1/namelist_edit.wps

+

Using your editor of choice (can be edited in Jupyter), open the ~/wrf-hydro-training/output/lessonS1/namelist_edit.wps file and change the dx and dy values to

+ +
dx=2000.0
+dy=2000.0
+ +
+
+
+
+
+
In [8]:
+
+
+
%%bash
+docker run -v $HOME/wrf-hydro-training/lessonS1/:/home/docker/mount wrfhydro/wps \
+--namelist_path /home/docker/mount/namelist_edit.wps \
+--output_dir /home/docker/mount \
+--plot_only
+
+ +
+
+
+ +
+
+ + +
+ +
+ + +
+
Proj4: +proj=lcc +units=meters +a=6370000.0 +b=6370000.0 +lat_1=30.0 +lat_2=60.0 +lat_0=45.0 +lon_0=-97.0
+Grid center x,y: [1849500.1972706 -108771.437837 ]
+Grid center lat,lon: [ 58.50955341 -63.99173649]
+Domain extent: [1834500.1972705964, 1864500.1972705964, -124771.43783700376, -92771.43783700376]
+Process completed after 8.12 seconds.
+
+
+
+ +
+
+ +
+
+
+
In [9]:
+
+
+
import os
+from IPython.display import Image
+Image(filename=os.path.expanduser('~/wrf-hydro-training/lessonS1/domain.png')) 
+
+ +
+
+
+ +
+
+ + +
+ +
Out[9]:
+ + + + +
+ +
+ +
+ +
+
+ +
+
+
+
+
+

We can see that the domain coverage has expanded but the center and size are the same. You can change any of your domain set-up by editing the variables in namelist.wps.

+ +
+
+
+
+
+
+
+

Making the geogrid file

In this section, we will create the geogrid file using the WRF-Hydro geogrid python utility. Note: If you would like to use this utilitiy outside of this training, the utility and all required datasets for the Continental United States are available in the wrfhydro/wps Docker container at https://hub.docker.com/r/wrfhydro/wps/.

+

Step 1: Copy the prepared namelist.wps file for the example case to the lessonS1 output folder

+

We will copy over the prepared namelist.wps file from the example case to create our geogrid file. We will also rename our edited namelist.wps from the previous domain location exercise, in case you want to retain for reference.

+ +
+
+
+
+
+
In [11]:
+
+
+
%%bash
+cp ~/wrf-hydro-training/lessonS1/example_case/supplemental/namelist.wps \
+~/wrf-hydro-training/lessonS1/namelist.wps
+
+ +
+
+
+ +
+
+
+
+
+

Step 1: Check the domain boundaries

+

We will do a quick visual inspection to make sure our supplied domain boundary information is correct.

+ +
+
+
+
+
+
In [12]:
+
+
+
%%bash
+docker run -v $HOME/wrf-hydro-training/lessonS1/:/home/docker/mount wrfhydro/wps \
+--namelist_path /home/docker/mount/example_case/supplemental/namelist.wps \
+--output_dir /home/docker/mount \
+--plot_only
+
+ +
+
+
+ +
+
+ + +
+ +
+ + +
+
Proj4: +proj=lcc +units=meters +a=6370000.0 +b=6370000.0 +lat_1=30.0 +lat_2=60.0 +lat_0=45.0 +lon_0=-97.0
+Grid center x,y: [1849500.1972706 -108771.437837 ]
+Grid center lat,lon: [ 58.50955341 -63.99173649]
+Domain extent: [1842000.1972705964, 1857000.1972705964, -116771.43783700376, -100771.43783700376]
+Process completed after 8.25 seconds.
+
+
+
+ +
+
+ +
+
+
+
In [13]:
+
+
+
import os
+from IPython.display import Image
+Image(filename=os.path.expanduser('~/wrf-hydro-training/lessonS1/domain.png')) 
+
+ +
+
+
+ +
+
+ + +
+ +
Out[13]:
+ + + + +
+ +
+ +
+ +
+
+ +
+
+
+
+
+

Step 2: Create the geogrid and wrfinput files.

+

This time we will run the utility with --plot_only set to False. A plot of the domain will still be produced, but the geogrid.exe utility will also be executed to create the geogrid file.

+

The wrfinput_d01.nc is a very basic WRF-Hydro initialization file (wrfinput) from a WRF geogrid file and a set of user-specified conditions. The file contains fields of spatially uniform initial model states of soil moisture, soil temperature, soil liquid water content and skin temperature among a few other variables necessary for model cold-start initialization. This file can be used as a 'cold start' for long-term model spin-up or users can overwrite the fields in the file created. Sophisticated and WRF-savvy users can bypass this script and use the WRF utility REAL.EXE to create a wrfinput file from model or reanalysis products.

+

The R script used to create this file can be downloaded at https://ral.ucar.edu/projects/wrf_hydro/pre-processing-tools.

+

NOTE: This R script will be replaced in the future with a Python command line utility to eliminate the R dependency.

+ +
+
+
+
+
+
In [14]:
+
+
+
%%bash
+docker run -v $HOME/wrf-hydro-training/lessonS1/:/home/docker/mount wrfhydro/wps \
+--namelist_path /home/docker/mount/example_case/supplemental/namelist.wps \
+--output_dir /home/docker/mount \
+--create_wrf_input
+
+ +
+
+
+ +
+
+ + +
+ +
+ + +
+
Parsed 7 entries in GEOGRID.TBL
+Processing domain 1 of 1
+  Processing XLAT and XLONG
+  Processing MAPFAC
+  Processing F and E
+  Processing ROTANG
+  Processing LANDUSEF
+  Calculating landmask from LANDUSEF ( WATER =  16 )
+  Processing HGT_M
+  Processing SOILTEMP
+  Processing SOILCTOP
+  Processing SCT_DOM
+  Processing SOILCBOT
+  Processing SCB_DOM
+  Processing GREENFRAC
+  Processing LAI12M
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!  Successful completion of geogrid.        !
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+[1] "ncks -O -4 -v XLAT_M,XLONG_M,HGT_M,SOILTEMP,LU_INDEX,MAPFAC_MX,MAPFAC_MY,GREENFRAC,LAI12M,SOILCTOP /home/docker/WRF_WPS/WPS/geo_em.d01.nc /home/docker/mount/wrfinput_d01.nc"
+[1] "ncrename -O -v HGT_M,HGT /home/docker/mount/wrfinput_d01.nc /home/docker/mount/wrfinput_d01.nc"
+ncrename: In total renamed 0 attributes, 0 dimensions, 0 groups, and 1 variable
+[1] "ncrename -O -v XLAT_M,XLAT /home/docker/mount/wrfinput_d01.nc /home/docker/mount/wrfinput_d01.nc"
+ncrename: In total renamed 0 attributes, 0 dimensions, 0 groups, and 1 variable
+[1] "ncrename -O -v XLONG_M,XLONG /home/docker/mount/wrfinput_d01.nc /home/docker/mount/wrfinput_d01.nc"
+ncrename: In total renamed 0 attributes, 0 dimensions, 0 groups, and 1 variable
+[1] "ncrename -O -v LU_INDEX,IVGTYP /home/docker/mount/wrfinput_d01.nc /home/docker/mount/wrfinput_d01.nc"
+ncrename: In total renamed 0 attributes, 0 dimensions, 0 groups, and 1 variable
+[1] "ncks -O -x -v SOILTEMP,GREENFRAC,LAI12M,SOILCTOP /home/docker/mount/wrfinput_d01.nc /home/docker/mount/wrfinput_d01.nc"
+Plotting domain
+Proj4: +proj=lcc +units=meters +a=6370000.0 +b=6370000.0 +lat_1=30.0 +lat_2=60.0 +lat_0=45.0 +lon_0=-97.0
+Grid center x,y: [1849500.1972706 -108771.437837 ]
+Grid center lat,lon: [ 58.50955341 -63.99173649]
+Domain extent: [1842000.1972705964, 1857000.1972705964, -116771.43783700376, -100771.43783700376]
+Process completed after 7.71 seconds.
+Generating geogrid file
+Generating wrfinput file
+
+
+
+ +
+
+ +
+
+
+
+
+

Inspecting the geogrid file

Now that we have created our geogrid file, we will quickly open it using the Python library xarray and check its contents.

+ +
+
+
+
+
+
In [16]:
+
+
+
%%bash
+ncdump -h ~/wrf-hydro-training/lessonS1/geo_em.d01.nc
+
+ +
+
+
+ +
+
+ + +
+ +
+ + +
+
netcdf geo_em.d01 {
+dimensions:
+	Time = UNLIMITED ; // (1 currently)
+	DateStrLen = 19 ;
+	west_east = 15 ;
+	south_north = 16 ;
+	south_north_stag = 17 ;
+	west_east_stag = 16 ;
+	land_cat = 24 ;
+	soil_cat = 16 ;
+	month = 12 ;
+variables:
+	char Times(Time, DateStrLen) ;
+	float XLAT_M(Time, south_north, west_east) ;
+		XLAT_M:FieldType = 104 ;
+		XLAT_M:MemoryOrder = "XY " ;
+		XLAT_M:units = "degrees latitude" ;
+		XLAT_M:description = "Latitude on mass grid" ;
+		XLAT_M:stagger = "M" ;
+		XLAT_M:sr_x = 1 ;
+		XLAT_M:sr_y = 1 ;
+	float XLONG_M(Time, south_north, west_east) ;
+		XLONG_M:FieldType = 104 ;
+		XLONG_M:MemoryOrder = "XY " ;
+		XLONG_M:units = "degrees longitude" ;
+		XLONG_M:description = "Longitude on mass grid" ;
+		XLONG_M:stagger = "M" ;
+		XLONG_M:sr_x = 1 ;
+		XLONG_M:sr_y = 1 ;
+	float XLAT_V(Time, south_north_stag, west_east) ;
+		XLAT_V:FieldType = 104 ;
+		XLAT_V:MemoryOrder = "XY " ;
+		XLAT_V:units = "degrees latitude" ;
+		XLAT_V:description = "Latitude on V grid" ;
+		XLAT_V:stagger = "V" ;
+		XLAT_V:sr_x = 1 ;
+		XLAT_V:sr_y = 1 ;
+	float XLONG_V(Time, south_north_stag, west_east) ;
+		XLONG_V:FieldType = 104 ;
+		XLONG_V:MemoryOrder = "XY " ;
+		XLONG_V:units = "degrees longitude" ;
+		XLONG_V:description = "Longitude on V grid" ;
+		XLONG_V:stagger = "V" ;
+		XLONG_V:sr_x = 1 ;
+		XLONG_V:sr_y = 1 ;
+	float XLAT_U(Time, south_north, west_east_stag) ;
+		XLAT_U:FieldType = 104 ;
+		XLAT_U:MemoryOrder = "XY " ;
+		XLAT_U:units = "degrees latitude" ;
+		XLAT_U:description = "Latitude on U grid" ;
+		XLAT_U:stagger = "U" ;
+		XLAT_U:sr_x = 1 ;
+		XLAT_U:sr_y = 1 ;
+	float XLONG_U(Time, south_north, west_east_stag) ;
+		XLONG_U:FieldType = 104 ;
+		XLONG_U:MemoryOrder = "XY " ;
+		XLONG_U:units = "degrees longitude" ;
+		XLONG_U:description = "Longitude on U grid" ;
+		XLONG_U:stagger = "U" ;
+		XLONG_U:sr_x = 1 ;
+		XLONG_U:sr_y = 1 ;
+	float CLAT(Time, south_north, west_east) ;
+		CLAT:FieldType = 104 ;
+		CLAT:MemoryOrder = "XY " ;
+		CLAT:units = "degrees latitude" ;
+		CLAT:description = "Computational latitude on mass grid" ;
+		CLAT:stagger = "M" ;
+		CLAT:sr_x = 1 ;
+		CLAT:sr_y = 1 ;
+	float CLONG(Time, south_north, west_east) ;
+		CLONG:FieldType = 104 ;
+		CLONG:MemoryOrder = "XY " ;
+		CLONG:units = "degrees longitude" ;
+		CLONG:description = "Computational longitude on mass grid" ;
+		CLONG:stagger = "M" ;
+		CLONG:sr_x = 1 ;
+		CLONG:sr_y = 1 ;
+	float MAPFAC_M(Time, south_north, west_east) ;
+		MAPFAC_M:FieldType = 104 ;
+		MAPFAC_M:MemoryOrder = "XY " ;
+		MAPFAC_M:units = "none" ;
+		MAPFAC_M:description = "Mapfactor on mass grid" ;
+		MAPFAC_M:stagger = "M" ;
+		MAPFAC_M:sr_x = 1 ;
+		MAPFAC_M:sr_y = 1 ;
+	float MAPFAC_V(Time, south_north_stag, west_east) ;
+		MAPFAC_V:FieldType = 104 ;
+		MAPFAC_V:MemoryOrder = "XY " ;
+		MAPFAC_V:units = "none" ;
+		MAPFAC_V:description = "Mapfactor on V grid" ;
+		MAPFAC_V:stagger = "V" ;
+		MAPFAC_V:sr_x = 1 ;
+		MAPFAC_V:sr_y = 1 ;
+	float MAPFAC_U(Time, south_north, west_east_stag) ;
+		MAPFAC_U:FieldType = 104 ;
+		MAPFAC_U:MemoryOrder = "XY " ;
+		MAPFAC_U:units = "none" ;
+		MAPFAC_U:description = "Mapfactor on U grid" ;
+		MAPFAC_U:stagger = "U" ;
+		MAPFAC_U:sr_x = 1 ;
+		MAPFAC_U:sr_y = 1 ;
+	float MAPFAC_MX(Time, south_north, west_east) ;
+		MAPFAC_MX:FieldType = 104 ;
+		MAPFAC_MX:MemoryOrder = "XY " ;
+		MAPFAC_MX:units = "none" ;
+		MAPFAC_MX:description = "Mapfactor (x-dir) on mass grid" ;
+		MAPFAC_MX:stagger = "M" ;
+		MAPFAC_MX:sr_x = 1 ;
+		MAPFAC_MX:sr_y = 1 ;
+	float MAPFAC_VX(Time, south_north_stag, west_east) ;
+		MAPFAC_VX:FieldType = 104 ;
+		MAPFAC_VX:MemoryOrder = "XY " ;
+		MAPFAC_VX:units = "none" ;
+		MAPFAC_VX:description = "Mapfactor (x-dir) on V grid" ;
+		MAPFAC_VX:stagger = "V" ;
+		MAPFAC_VX:sr_x = 1 ;
+		MAPFAC_VX:sr_y = 1 ;
+	float MAPFAC_UX(Time, south_north, west_east_stag) ;
+		MAPFAC_UX:FieldType = 104 ;
+		MAPFAC_UX:MemoryOrder = "XY " ;
+		MAPFAC_UX:units = "none" ;
+		MAPFAC_UX:description = "Mapfactor (x-dir) on U grid" ;
+		MAPFAC_UX:stagger = "U" ;
+		MAPFAC_UX:sr_x = 1 ;
+		MAPFAC_UX:sr_y = 1 ;
+	float MAPFAC_MY(Time, south_north, west_east) ;
+		MAPFAC_MY:FieldType = 104 ;
+		MAPFAC_MY:MemoryOrder = "XY " ;
+		MAPFAC_MY:units = "none" ;
+		MAPFAC_MY:description = "Mapfactor (y-dir) on mass grid" ;
+		MAPFAC_MY:stagger = "M" ;
+		MAPFAC_MY:sr_x = 1 ;
+		MAPFAC_MY:sr_y = 1 ;
+	float MAPFAC_VY(Time, south_north_stag, west_east) ;
+		MAPFAC_VY:FieldType = 104 ;
+		MAPFAC_VY:MemoryOrder = "XY " ;
+		MAPFAC_VY:units = "none" ;
+		MAPFAC_VY:description = "Mapfactor (y-dir) on V grid" ;
+		MAPFAC_VY:stagger = "V" ;
+		MAPFAC_VY:sr_x = 1 ;
+		MAPFAC_VY:sr_y = 1 ;
+	float MAPFAC_UY(Time, south_north, west_east_stag) ;
+		MAPFAC_UY:FieldType = 104 ;
+		MAPFAC_UY:MemoryOrder = "XY " ;
+		MAPFAC_UY:units = "none" ;
+		MAPFAC_UY:description = "Mapfactor (y-dir) on U grid" ;
+		MAPFAC_UY:stagger = "U" ;
+		MAPFAC_UY:sr_x = 1 ;
+		MAPFAC_UY:sr_y = 1 ;
+	float E(Time, south_north, west_east) ;
+		E:FieldType = 104 ;
+		E:MemoryOrder = "XY " ;
+		E:units = "-" ;
+		E:description = "Coriolis E parameter" ;
+		E:stagger = "M" ;
+		E:sr_x = 1 ;
+		E:sr_y = 1 ;
+	float F(Time, south_north, west_east) ;
+		F:FieldType = 104 ;
+		F:MemoryOrder = "XY " ;
+		F:units = "-" ;
+		F:description = "Coriolis F parameter" ;
+		F:stagger = "M" ;
+		F:sr_x = 1 ;
+		F:sr_y = 1 ;
+	float SINALPHA(Time, south_north, west_east) ;
+		SINALPHA:FieldType = 104 ;
+		SINALPHA:MemoryOrder = "XY " ;
+		SINALPHA:units = "none" ;
+		SINALPHA:description = "Sine of rotation angle" ;
+		SINALPHA:stagger = "M" ;
+		SINALPHA:sr_x = 1 ;
+		SINALPHA:sr_y = 1 ;
+	float COSALPHA(Time, south_north, west_east) ;
+		COSALPHA:FieldType = 104 ;
+		COSALPHA:MemoryOrder = "XY " ;
+		COSALPHA:units = "none" ;
+		COSALPHA:description = "Cosine of rotation angle" ;
+		COSALPHA:stagger = "M" ;
+		COSALPHA:sr_x = 1 ;
+		COSALPHA:sr_y = 1 ;
+	float LANDMASK(Time, south_north, west_east) ;
+		LANDMASK:FieldType = 104 ;
+		LANDMASK:MemoryOrder = "XY " ;
+		LANDMASK:units = "none" ;
+		LANDMASK:description = "Landmask : 1=land, 0=water" ;
+		LANDMASK:stagger = "M" ;
+		LANDMASK:sr_x = 1 ;
+		LANDMASK:sr_y = 1 ;
+	float XLAT_C(Time, south_north_stag, west_east_stag) ;
+		XLAT_C:FieldType = 104 ;
+		XLAT_C:MemoryOrder = "XY " ;
+		XLAT_C:units = "degrees latitude" ;
+		XLAT_C:description = "Latitude at grid cell corners" ;
+		XLAT_C:stagger = "CORNER" ;
+		XLAT_C:sr_x = 1 ;
+		XLAT_C:sr_y = 1 ;
+	float XLONG_C(Time, south_north_stag, west_east_stag) ;
+		XLONG_C:FieldType = 104 ;
+		XLONG_C:MemoryOrder = "XY " ;
+		XLONG_C:units = "degrees longitude" ;
+		XLONG_C:description = "Longitude at grid cell corners" ;
+		XLONG_C:stagger = "CORNER" ;
+		XLONG_C:sr_x = 1 ;
+		XLONG_C:sr_y = 1 ;
+	float SINALPHA_U(Time, south_north, west_east_stag) ;
+		SINALPHA_U:FieldType = 104 ;
+		SINALPHA_U:MemoryOrder = "XY " ;
+		SINALPHA_U:units = "none" ;
+		SINALPHA_U:description = "Sine of rotation angle on U grid" ;
+		SINALPHA_U:stagger = "U" ;
+		SINALPHA_U:sr_x = 1 ;
+		SINALPHA_U:sr_y = 1 ;
+	float COSALPHA_U(Time, south_north, west_east_stag) ;
+		COSALPHA_U:FieldType = 104 ;
+		COSALPHA_U:MemoryOrder = "XY " ;
+		COSALPHA_U:units = "none" ;
+		COSALPHA_U:description = "Cosine of rotation angle on U grid" ;
+		COSALPHA_U:stagger = "U" ;
+		COSALPHA_U:sr_x = 1 ;
+		COSALPHA_U:sr_y = 1 ;
+	float SINALPHA_V(Time, south_north_stag, west_east) ;
+		SINALPHA_V:FieldType = 104 ;
+		SINALPHA_V:MemoryOrder = "XY " ;
+		SINALPHA_V:units = "none" ;
+		SINALPHA_V:description = "Sine of rotation angle on V grid" ;
+		SINALPHA_V:stagger = "V" ;
+		SINALPHA_V:sr_x = 1 ;
+		SINALPHA_V:sr_y = 1 ;
+	float COSALPHA_V(Time, south_north_stag, west_east) ;
+		COSALPHA_V:FieldType = 104 ;
+		COSALPHA_V:MemoryOrder = "XY " ;
+		COSALPHA_V:units = "none" ;
+		COSALPHA_V:description = "Cosine of rotation angle on V grid" ;
+		COSALPHA_V:stagger = "V" ;
+		COSALPHA_V:sr_x = 1 ;
+		COSALPHA_V:sr_y = 1 ;
+	float LANDUSEF(Time, land_cat, south_north, west_east) ;
+		LANDUSEF:FieldType = 104 ;
+		LANDUSEF:MemoryOrder = "XYZ" ;
+		LANDUSEF:units = "category" ;
+		LANDUSEF:description = "2011 30 meter, USGS reclass" ;
+		LANDUSEF:stagger = "M" ;
+		LANDUSEF:sr_x = 1 ;
+		LANDUSEF:sr_y = 1 ;
+	float LU_INDEX(Time, south_north, west_east) ;
+		LU_INDEX:FieldType = 104 ;
+		LU_INDEX:MemoryOrder = "XY " ;
+		LU_INDEX:units = "category" ;
+		LU_INDEX:description = "Dominant category" ;
+		LU_INDEX:stagger = "M" ;
+		LU_INDEX:sr_x = 1 ;
+		LU_INDEX:sr_y = 1 ;
+	float HGT_M(Time, south_north, west_east) ;
+		HGT_M:FieldType = 104 ;
+		HGT_M:MemoryOrder = "XY " ;
+		HGT_M:units = "meters MSL" ;
+		HGT_M:description = "Topography height" ;
+		HGT_M:stagger = "M" ;
+		HGT_M:sr_x = 1 ;
+		HGT_M:sr_y = 1 ;
+	float SOILTEMP(Time, south_north, west_east) ;
+		SOILTEMP:FieldType = 104 ;
+		SOILTEMP:MemoryOrder = "XY " ;
+		SOILTEMP:units = "Kelvin" ;
+		SOILTEMP:description = "Annual mean deep soil temperature" ;
+		SOILTEMP:stagger = "M" ;
+		SOILTEMP:sr_x = 1 ;
+		SOILTEMP:sr_y = 1 ;
+	float SOILCTOP(Time, soil_cat, south_north, west_east) ;
+		SOILCTOP:FieldType = 104 ;
+		SOILCTOP:MemoryOrder = "XYZ" ;
+		SOILCTOP:units = "category" ;
+		SOILCTOP:description = "16-category top-layer soil type" ;
+		SOILCTOP:stagger = "M" ;
+		SOILCTOP:sr_x = 1 ;
+		SOILCTOP:sr_y = 1 ;
+	float SCT_DOM(Time, south_north, west_east) ;
+		SCT_DOM:FieldType = 104 ;
+		SCT_DOM:MemoryOrder = "XY " ;
+		SCT_DOM:units = "category" ;
+		SCT_DOM:description = "Dominant category" ;
+		SCT_DOM:stagger = "M" ;
+		SCT_DOM:sr_x = 1 ;
+		SCT_DOM:sr_y = 1 ;
+	float SOILCBOT(Time, soil_cat, south_north, west_east) ;
+		SOILCBOT:FieldType = 104 ;
+		SOILCBOT:MemoryOrder = "XYZ" ;
+		SOILCBOT:units = "category" ;
+		SOILCBOT:description = "16-category bottom-layer soil type" ;
+		SOILCBOT:stagger = "M" ;
+		SOILCBOT:sr_x = 1 ;
+		SOILCBOT:sr_y = 1 ;
+	float SCB_DOM(Time, south_north, west_east) ;
+		SCB_DOM:FieldType = 104 ;
+		SCB_DOM:MemoryOrder = "XY " ;
+		SCB_DOM:units = "category" ;
+		SCB_DOM:description = "Dominant category" ;
+		SCB_DOM:stagger = "M" ;
+		SCB_DOM:sr_x = 1 ;
+		SCB_DOM:sr_y = 1 ;
+	float GREENFRAC(Time, month, south_north, west_east) ;
+		GREENFRAC:FieldType = 104 ;
+		GREENFRAC:MemoryOrder = "XYZ" ;
+		GREENFRAC:units = "fraction" ;
+		GREENFRAC:description = "MODIS FPAR" ;
+		GREENFRAC:stagger = "M" ;
+		GREENFRAC:sr_x = 1 ;
+		GREENFRAC:sr_y = 1 ;
+	float LAI12M(Time, month, south_north, west_east) ;
+		LAI12M:FieldType = 104 ;
+		LAI12M:MemoryOrder = "XYZ" ;
+		LAI12M:units = "m^2/m^2" ;
+		LAI12M:description = "MODIS LAI" ;
+		LAI12M:stagger = "M" ;
+		LAI12M:sr_x = 1 ;
+		LAI12M:sr_y = 1 ;
+
+// global attributes:
+		:TITLE = "OUTPUT FROM GEOGRID V3.9" ;
+		:SIMULATION_START_DATE = "0000-00-00_00:00:00" ;
+		:WEST-EAST_GRID_DIMENSION = 16 ;
+		:SOUTH-NORTH_GRID_DIMENSION = 17 ;
+		:BOTTOM-TOP_GRID_DIMENSION = 0 ;
+		:WEST-EAST_PATCH_START_UNSTAG = 1 ;
+		:WEST-EAST_PATCH_END_UNSTAG = 15 ;
+		:WEST-EAST_PATCH_START_STAG = 1 ;
+		:WEST-EAST_PATCH_END_STAG = 16 ;
+		:SOUTH-NORTH_PATCH_START_UNSTAG = 1 ;
+		:SOUTH-NORTH_PATCH_END_UNSTAG = 16 ;
+		:SOUTH-NORTH_PATCH_START_STAG = 1 ;
+		:SOUTH-NORTH_PATCH_END_STAG = 17 ;
+		:GRIDTYPE = "C" ;
+		:DX = 1000.f ;
+		:DY = 1000.f ;
+		:DYN_OPT = 2 ;
+		:CEN_LAT = 41.47101f ;
+		:CEN_LON = -73.74365f ;
+		:TRUELAT1 = 30.f ;
+		:TRUELAT2 = 60.f ;
+		:MOAD_CEN_LAT = 41.47101f ;
+		:STAND_LON = -97.f ;
+		:POLE_LAT = 90.f ;
+		:POLE_LON = 0.f ;
+		:corner_lats = 41.42282f, 41.55638f, 41.51908f, 41.38562f, 41.42414f, 41.5577f, 41.51775f, 41.38428f, 41.41836f, 41.56083f, 41.52353f, 41.38117f, 41.41969f, 41.56216f, 41.52219f, 41.37983f ;
+		:corner_lons = -73.85333f, -73.80026f, -73.63379f, -73.68719f, -73.85928f, -73.80621f, -73.62784f, -73.68127f, -73.8551f, -73.79849f, -73.63202f, -73.689f, -73.86105f, -73.80444f, -73.62607f, -73.68304f ;
+		:MAP_PROJ = 1 ;
+		:MMINLU = "USGS" ;
+		:NUM_LAND_CAT = 24 ;
+		:ISWATER = 16 ;
+		:ISLAKE = -1 ;
+		:ISICE = 24 ;
+		:ISURBAN = 1 ;
+		:ISOILWATER = 14 ;
+		:grid_id = 1 ;
+		:parent_id = 1 ;
+		:i_parent_start = 1 ;
+		:j_parent_start = 1 ;
+		:i_parent_end = 16 ;
+		:j_parent_end = 17 ;
+		:parent_grid_ratio = 1 ;
+		:sr_x = 1 ;
+		:sr_y = 1 ;
+		:FLAG_MF_XY = 1 ;
+		:FLAG_LAI12M = 1 ;
+}
+
+
+
+ +
+
+ +
+
+
+
In [17]:
+
+
+
%matplotlib inline
+import xarray as xr
+
+geogrid = xr.open_dataset('~/wrf-hydro-training/lessonS1/geo_em.d01.nc')
+geogrid.HGT_M.plot()
+
+ +
+
+
+ +
+
+ + +
+ +
Out[17]:
+ + + + +
+
<matplotlib.collections.QuadMesh at 0x325827e80>
+
+ +
+ +
+ +
+ + + + +
+ +
+ +
+ +
+
+ +
+
+
+
+
+

View the wrfinput_d01.nc file

+ +
+
+
+
+
+
In [18]:
+
+
+
%%bash
+ncdump -h ~/wrf-hydro-training/lessonS1/wrfinput_d01.nc
+
+ +
+
+
+ +
+
+ + +
+ +
+ + +
+
netcdf wrfinput_d01 {
+dimensions:
+	Time = UNLIMITED ; // (1 currently)
+	south_north = 16 ;
+	west_east = 15 ;
+	soil_layers_stag = 4 ;
+variables:
+	float CANWAT(Time, south_north, west_east) ;
+		CANWAT:units = "kg/m^2" ;
+		CANWAT:_FillValue = -1.e+36f ;
+	float DZS(Time, soil_layers_stag) ;
+		DZS:units = "m" ;
+		DZS:_FillValue = -1.e+36f ;
+	float HGT(Time, south_north, west_east) ;
+		HGT:FieldType = 104 ;
+		HGT:MemoryOrder = "XY " ;
+		HGT:units = "meters MSL" ;
+		HGT:description = "Topography height" ;
+		HGT:stagger = "M" ;
+		HGT:sr_x = 1 ;
+		HGT:sr_y = 1 ;
+	int ISLTYP(Time, south_north, west_east) ;
+		ISLTYP:_FillValue = -9999 ;
+	float IVGTYP(Time, south_north, west_east) ;
+		IVGTYP:FieldType = 104 ;
+		IVGTYP:MemoryOrder = "XY " ;
+		IVGTYP:units = "category" ;
+		IVGTYP:description = "Dominant category" ;
+		IVGTYP:stagger = "M" ;
+		IVGTYP:sr_x = 1 ;
+		IVGTYP:sr_y = 1 ;
+	float LAI(Time, south_north, west_east) ;
+		LAI:units = "m^2/m^2" ;
+		LAI:_FillValue = -1.e+36f ;
+	float MAPFAC_MX(Time, south_north, west_east) ;
+		MAPFAC_MX:FieldType = 104 ;
+		MAPFAC_MX:MemoryOrder = "XY " ;
+		MAPFAC_MX:units = "none" ;
+		MAPFAC_MX:description = "Mapfactor (x-dir) on mass grid" ;
+		MAPFAC_MX:stagger = "M" ;
+		MAPFAC_MX:sr_x = 1 ;
+		MAPFAC_MX:sr_y = 1 ;
+	float MAPFAC_MY(Time, south_north, west_east) ;
+		MAPFAC_MY:FieldType = 104 ;
+		MAPFAC_MY:MemoryOrder = "XY " ;
+		MAPFAC_MY:units = "none" ;
+		MAPFAC_MY:description = "Mapfactor (y-dir) on mass grid" ;
+		MAPFAC_MY:stagger = "M" ;
+		MAPFAC_MY:sr_x = 1 ;
+		MAPFAC_MY:sr_y = 1 ;
+	float SEAICE(Time, south_north, west_east) ;
+		SEAICE:_FillValue = -1.e+36f ;
+	float SHDMAX(Time, south_north, west_east) ;
+		SHDMAX:units = "%" ;
+		SHDMAX:_FillValue = -1.e+36f ;
+	float SHDMIN(Time, south_north, west_east) ;
+		SHDMIN:units = "%" ;
+		SHDMIN:_FillValue = -1.e+36f ;
+	float SMOIS(Time, soil_layers_stag, south_north, west_east) ;
+		SMOIS:units = "m^3/m^3" ;
+		SMOIS:_FillValue = -1.e+36f ;
+	float SNOW(Time, south_north, west_east) ;
+		SNOW:units = "kg/m^2" ;
+		SNOW:_FillValue = -1.e+36f ;
+	float TMN(Time, south_north, west_east) ;
+		TMN:units = "K" ;
+		TMN:_FillValue = -1.e+36f ;
+	float TSK(Time, south_north, west_east) ;
+		TSK:units = "K" ;
+		TSK:_FillValue = -1.e+36f ;
+	float TSLB(Time, soil_layers_stag, south_north, west_east) ;
+		TSLB:units = "K" ;
+		TSLB:_FillValue = -1.e+36f ;
+	int XLAND(Time, south_north, west_east) ;
+		XLAND:_FillValue = -9999 ;
+	float XLAT(Time, south_north, west_east) ;
+		XLAT:FieldType = 104 ;
+		XLAT:MemoryOrder = "XY " ;
+		XLAT:units = "degrees latitude" ;
+		XLAT:description = "Latitude on mass grid" ;
+		XLAT:stagger = "M" ;
+		XLAT:sr_x = 1 ;
+		XLAT:sr_y = 1 ;
+	float XLONG(Time, south_north, west_east) ;
+		XLONG:FieldType = 104 ;
+		XLONG:MemoryOrder = "XY " ;
+		XLONG:units = "degrees longitude" ;
+		XLONG:description = "Longitude on mass grid" ;
+		XLONG:stagger = "M" ;
+		XLONG:sr_x = 1 ;
+		XLONG:sr_y = 1 ;
+	float ZS(Time, soil_layers_stag) ;
+		ZS:units = "m" ;
+		ZS:_FillValue = -1.e+36f ;
+
+// global attributes:
+		:TITLE = "OUTPUT FROM GEOGRID V3.9" ;
+		:SIMULATION_START_DATE = "0000-00-00_00:00:00" ;
+		:WEST-EAST_GRID_DIMENSION = 16 ;
+		:SOUTH-NORTH_GRID_DIMENSION = 17 ;
+		:BOTTOM-TOP_GRID_DIMENSION = 0 ;
+		:WEST-EAST_PATCH_START_UNSTAG = 1 ;
+		:WEST-EAST_PATCH_END_UNSTAG = 15 ;
+		:WEST-EAST_PATCH_START_STAG = 1 ;
+		:WEST-EAST_PATCH_END_STAG = 16 ;
+		:SOUTH-NORTH_PATCH_START_UNSTAG = 1 ;
+		:SOUTH-NORTH_PATCH_END_UNSTAG = 16 ;
+		:SOUTH-NORTH_PATCH_START_STAG = 1 ;
+		:SOUTH-NORTH_PATCH_END_STAG = 17 ;
+		:GRIDTYPE = "C" ;
+		:DX = 1000.f ;
+		:DY = 1000.f ;
+		:DYN_OPT = 2 ;
+		:CEN_LAT = 41.47101f ;
+		:CEN_LON = -73.74365f ;
+		:TRUELAT1 = 30.f ;
+		:TRUELAT2 = 60.f ;
+		:MOAD_CEN_LAT = 41.47101f ;
+		:STAND_LON = -97.f ;
+		:POLE_LAT = 90.f ;
+		:POLE_LON = 0.f ;
+		:corner_lats = 41.42282f, 41.55638f, 41.51908f, 41.38562f, 41.42414f, 41.5577f, 41.51775f, 41.38428f, 41.41836f, 41.56083f, 41.52353f, 41.38117f, 41.41969f, 41.56216f, 41.52219f, 41.37983f ;
+		:corner_lons = -73.85333f, -73.80026f, -73.63379f, -73.68719f, -73.85928f, -73.80621f, -73.62784f, -73.68127f, -73.8551f, -73.79849f, -73.63202f, -73.689f, -73.86105f, -73.80444f, -73.62607f, -73.68304f ;
+		:MAP_PROJ = 1 ;
+		:MMINLU = "USGS" ;
+		:NUM_LAND_CAT = 24 ;
+		:ISWATER = 16 ;
+		:ISLAKE = -1 ;
+		:ISICE = 24 ;
+		:ISURBAN = 1 ;
+		:ISOILWATER = 14 ;
+		:grid_id = 1 ;
+		:parent_id = 1 ;
+		:i_parent_start = 1 ;
+		:j_parent_start = 1 ;
+		:i_parent_end = 16 ;
+		:j_parent_end = 17 ;
+		:parent_grid_ratio = 1 ;
+		:sr_x = 1 ;
+		:sr_y = 1 ;
+		:FLAG_MF_XY = 1 ;
+		:FLAG_LAI12M = 1 ;
+		:NCO = "\"4.5.4\"" ;
+		:history = "Mon Oct 22 17:29:21 2018: ncks -O -x -v SOILTEMP,GREENFRAC,LAI12M,SOILCTOP /home/docker/mount/wrfinput_d01.nc /home/docker/mount/wrfinput_d01.nc\nMon Oct 22 17:29:20 2018: ncrename -O -v LU_INDEX,IVGTYP /home/docker/mount/wrfinput_d01.nc /home/docker/mount/wrfinput_d01.nc\nMon Oct 22 17:29:20 2018: ncrename -O -v XLONG_M,XLONG /home/docker/mount/wrfinput_d01.nc /home/docker/mount/wrfinput_d01.nc\nMon Oct 22 17:29:20 2018: ncrename -O -v XLAT_M,XLAT /home/docker/mount/wrfinput_d01.nc /home/docker/mount/wrfinput_d01.nc\nMon Oct 22 17:29:20 2018: ncrename -O -v HGT_M,HGT /home/docker/mount/wrfinput_d01.nc /home/docker/mount/wrfinput_d01.nc\nMon Oct 22 17:29:20 2018: ncks -O -4 -v XLAT_M,XLONG_M,HGT_M,SOILTEMP,LU_INDEX,MAPFAC_MX,MAPFAC_MY,GREENFRAC,LAI12M,SOILCTOP /home/docker/WRF_WPS/WPS/geo_em.d01.nc /home/docker/mount/wrfinput_d01.nc" ;
+}
+
+
+
+ +
+
+ +
+
+
+
+
+

Next up - Regridding forcing data

This concludes Lesson S1. In the next lesson, we will regrid some NLDAS forcing data to match our geogrid file for use in WRF-Hydro.

+

IT IS BEST TO EITHER SHUTDOWN THIS LESSON OR CLOSE IT BEFORE PROCEEDING TO THE NEXT LESSON TO AVOID POSSIBLY EXCEEDING ALLOCATED MEMORY. Shutdown the lesson be either closing the browser tab for the lesson or selecting KERNAL->SHUTDOWN in the jupyter notebook toolbar.

+ +
+
+
+
+
+ + + + + + diff --git a/lessons/Lesson-S1-wps.ipynb b/lessons/internal_nbs/Lesson-S1-wps.ipynb similarity index 100% rename from lessons/Lesson-S1-wps.ipynb rename to lessons/internal_nbs/Lesson-S1-wps.ipynb