subroutine PrintUsage() print *, "Usage: ESMF_RegridWeightGen --source|-s src_grid_filename" print *, " --destination|-d dst_grid_filename" print *, " --weight|-w out_weight_file " #if 0 print *, " [--routehandle out_routehandle_file]" #endif print *, " [--method|-m bilinear|patch|neareststod|nearestdtos|conserve|conserve2nd]" print *, " [--pole|-p all|none|teeth|<N>]" print *, " [--line_type|-l cartesian|greatcircle]" print *, " [--norm_type dstarea|fracarea]" print *, " [--extrap_method none|neareststod|nearestidavg|nearestd|creep|creepnrstd]" print *, " [--extrap_num_src_pnts <N>]" print *, " [--extrap_dist_exponent <P>]" print *, " [--extrap_num_levels <L>]" print *, " [--ignore_unmapped|-i]" print *, " [--ignore_degenerate]" print *, " [--src_type SCRIP|ESMFMESH|UGRID|CFGRID|GRIDSPEC|MOSAIC|TILE]" print *, " [--dst_type SCRIP|ESMFMESH|UGRID|CFGRID|GRIDSPEC|MOSAIC|TILE]" print *, " [-t SCRIP|ESMFMESH|UGRID|CFGRID|GRIDSPEC|MOSAIC|TILE]" print *, " [-r]" print *, " [--src_regional]" print *, " [--dst_regional]" print *, " [--64bit_offset]" print *, " [--netcdf4]" print *, " [--weight_only]" print *, " [--src_missingvalue src_var_name]" print *, " [--dst_missingvalue dst_var_name]" print *, " [--src_coordinates lon_var_name,lat_var_name]" print *, " [--dst_coordinates lon_var_name,lat_var_name]" print *, " [--user_areas]" print *, " [--src_loc center|corner]" print *, " [--dst_loc center|corner]" print *, " [--tilefile_path tile_file_path]" print *, " [--no_log]" print *, " [--check]" print *, " [--checkFlag]" print *, " [--help]" print *, " [--version]" print *, " [-V]" print *, "where" print *, "--source or -s - a required argument specifying the source grid file" print *, " name" print *, "--destination or -d - a required argument specifying the destination grid" print *, " file name" print *, "--weight or -w - a required argument specifying the output regridding weight" print *, " file name" #if 0 print *, "--routehandle - an optional argument specifying the output routehandle file name" #endif print *, "--method or -m - an optional argument specifying which interpolation method is" print *, " used. The default method is bilinear." print *, "--pole or -p - an optional argument indicating what to do with the pole." print *, " The default value is all." print *, "--line_type or -l - an optional argument indicating the type of path" print *, " lines (e.g. cell edges) follow on a spherical" print *, " surface. The default value depends on the regrid" print *, " method. For non-conservative methods the default is" print *, " cartesian. For conservative methods the default is greatcircle." print *, "--norm_type - an optional argument indicating the type of normalization to" print *, " do when generating conserative weights. The default value is dstarea." print *, "--extrap_method - an optional argument specifying which extrapolation method is" print *, " used. The default method is none." print *, "--extrap_num_src_pnts - an optional argument specifying how many source points should" print *, " be used when the extrapolation method is nearestidavg. The default is 8." print *, "--extrap_dist_exponent - an optional argument specifying the exponent that the distance should" print *, " be raised to when the extrapolation method is nearestidavg. The default is 2.0." print *, "--extrap_num_levels - an optional argument specifying how many levels should" print *, " be filled for level based extrapolation methods (e.g. creep)." print *, "--ignore_unmapped or -i - ignore unmapped destination points. If not specified," print *, " the default is to stop with an error." print *, "--ignore_degenerate - ignore degenerate cells in the input grids. If not specified," print *, " the default is to stop with an error." print *, "--src_type - an optional argument specifying the source grid file type." print *, " The value can be one of SCRIP, ESMFMESH, UGRID, CFGRID, GRIDSPEC, MOSAIC or TILE." print *, " If neither --src_type nor -t is given, the source grid file type will be" print *, " determined automatically. (Usually it is unnecessary to provide --src_type," print *, " but it can be specified when the automatic file type determination fails.)" print *, "--dst_type - an optional argument specifying the destination grid file type." print *, " The value can be one of SCRIP, ESMFMESH, UGRID, CFGRID, GRIDSPEC, MOSAIC or TILE." print *, " If neither --dst_type nor -t is given, the destination grid file type will be" print *, " determined automatically. (Usually it is unnecessary to provide --dst_type," print *, " but it can be specified when the automatic file type determination fails.)" print *, "-t - an optional argument specifying the file types for both the source" print *, " and the destination grid files." print *, " The value can be one of SCRIP, ESMFMESH, UGRID, CFGRID, GRIDSPEC, MOSAIC or TILE." print *, " If -t is given, then neither --src_type nor --dst_type can be given." print *, "-r - an optional argument specifying the source and destination grids" print *, " are regional grids. Without this argument, the grids are assumed" print *, " to be global" print *, "--src_regional - an optional argument specifying the source grid is regional." print *, " Without this argument, the src grids is assumed to be global." print *, "--dst_regional - an optional argument specifying the destination grid is regional" print *, " Without this argument, the dst grids is assumed to be global." print *, "--64bit_offset - an optional argument specifying the output weight file is in" print *, " NetCDF 64-bit offset format. This option only works with NetCDF library" print *, " version 3.6 and above" print *, "--netcdf4 - an optional argument specifying the output weight file is in" print *, " the NetCDF4 format. This option only works with NetCDF library" print *, " version 4.1 and above" print *, "--weight_only - an Optional argument specifying the output weight file only contains" print *, " the weights and the source and destination grid's indices." print *, "--src_missingvalue - an optional argument used when the src file type is GRIDSPEC" print *, " or UGRID. It defines the variable name whose 'missing_value' or" print *, " '_FillValue' attribute will be used to construct the mask for the source" print *, " grid. Without this argument,a GRIDSPEC file or a UGRID file is not masked." print *, "--dst_missingvalue - an optional argument used when the destination file type is" print *, " GRIDSPEC or UGRID. It defines the variable name whose 'missing_value' or" print *, " '_FillValue' attribute will be used to construct the mask for the destination" print *, " grid. Without this argument,a GRIDSPEC file or a UGRID file is not masked." print *, "--src_coordinates - an optional argument used when the source grid type is GRIDSPEC." print *, " It defines the longitude and latitude variable names separated by comma," print *, " in case there are multiple coordinate variables defined in the file" print *, "--dst_coordinates - an optional argument used when the destination grid type is GRIDSPEC." print *, " It defines the longitude and latitude variable names separated by comma," print *, " in case there are multiple coordinate variables defined in the file" print *, "--user_areas - an optional argument specifying that the conservation is adjusted to" print *, " hold for the user areas provided in the grid files. If not specified," print *, " then the conservation will hold for the ESMF calculated (great circle)" print *, " areas. Whichever areas the conservation holds for are output to the" print *, " weight file." print *, "--src_loc - an optional argument specifying which location is used to do the regridding" print *, " The location can be either 'center' or 'corner'. Currently, this argument" print *, " is only required when the source grid file is an unstructured grid defined" print *, " in UGRID or ESMF format and the regridding method is non-conservative. For " print *, " all other cases, the default location is 'center'." print *, "--dst_loc - an optional argument specifying which location is used to do the regridding" print *, " The location can be either 'center' or 'corner'. Currently, this argument" print *, " is 'center'. Currently, this argument will only be used when the" print *, " is only required when the destination grid file is an unstructured grid defined" print *, " in UGRID or ESMF format and the regridding method is non-conservative. For " print *, " all other cases, the default location is 'center'." print *, "--tilefile_path - the alternative file path for the tile files when the grid file type is" print *, " MOSAIC." print *, "--no_log - Turn off the ESMF logs." print *, "--check - Check that the generated weights produce reasonable regridded fields. This" print *, " is done by calling ESMF_FieldRegrid() on an analytic source field using the weights" print *, " generated by this application. The mean relative error between the destination" print *, " and analytic field is computed, as well as the relative error between the mass" print *, " of the source and destination fields in the conservative case." print *, "--checkFlag - Turn on more expensive extra error checking during weight generation." print *, "--help or -h - Print this help message and exit." print *, "--version - Print ESMF version and license information and exit." print *, "-V - Print ESMF version number and exit." print *, "" print *, "For questions, comments, or feature requests please send email to:" print *, "esmf_support@cgd.ucar.edu" print *, "" print *, "Visit http://www.earthsystemmodeling.org/ to find out more about the" print *, "Earth System Modeling Framework." print *, "" end subroutine PrintUsage