Source code for

import os
from logging import info
import numpy as np
import shutil
from ....utils.path import init_dir
from .utils.make_hcoord import make_hcoord
from .utils.make_vcoord import make_vcoord
from .utils.make_landuse import make_landuse
from .utils.make_domainlist import make_domainlist

[docs]def create_domain(domain, **kwargs): """Creates a grid if needed Args: domain (dictionary): dictionary defining the domain. """ # Initialize domain folder where new files will be dumped init_dir("{}/domain".format(domain.workdir)) init_dir("{}/domain/VCOORD/".format(domain.workdir)) init_dir("{}/domain/LANDUSE/".format(domain.workdir)) # Generate HCOORD make_hcoord(domain) # Generate VCOORD make_vcoord(domain) # Make LANDUSE make_landuse(domain) # Update domainlist make_domainlist(domain)