{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Spinup in USP mode" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from pyclmuapp import usp_clmu" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## spinup case\n", "\n", "Run 10 year for spinup\n", "\n", "The default SET `RUN_TYPE=\"coldstart\"`, the parameters will set to be in a cold state." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Copying the file forcing.nc to the /Users/user/Documents/GitHub/pyclmuapp/docs/notebooks/usp/workdir/inputfolder/usp\n" ] }, { "data": { "text/plain": [ "['/Users/user/Documents/GitHub/pyclmuapp/docs/notebooks/usp/workdir/outputfolder/lnd/hist/usp_spinup_clm0_2024-11-23_14-41-16_clm.nc']" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "usp = usp_clmu()\n", "\n", "# before running container, you need the image\n", "# usp.docker(\"pull\") # to pull the docker image if you don't have it\n", "usp_spinup = usp.run(\n", " case_name = \"usp_spinup\", \n", " SURF=\"surfdata.nc\", # path to surfdata.nc\n", " FORCING=\"forcing.nc\", # path to forcing.nc\n", " RUN_STARTDATE = \"2002-01-01\",\n", " STOP_OPTION = \"nyears\", \n", " STOP_N = \"10\",\n", " RUN_TYPE= \"coldstart\",\n", " )\n", "usp_spinup" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
<xarray.Dataset> Size: 123MB\n", "Dimensions: (levgrnd: 25, levlak: 10, levdcmp: 1, time: 175297,\n", " hist_interval: 2, lndgrid: 1, column: 6, gridcell: 1,\n", " landunit: 2, pft: 6, levsoi: 20)\n", "Coordinates:\n", " * levgrnd (levgrnd) float32 100B 0.01 0.04 0.09 ... 28.87 42.0\n", " * levlak (levlak) float32 40B 0.05 0.6 2.1 ... 25.6 34.33 44.78\n", " * levdcmp (levdcmp) float32 4B 1.0\n", " * time (time) datetime64[ns] 1MB 2002-01-01 ... 2012-01-01\n", "Dimensions without coordinates: hist_interval, lndgrid, column, gridcell,\n", " landunit, pft, levsoi\n", "Data variables: (12/129)\n", " mcdate (time) int32 701kB ...\n", " mcsec (time) int32 701kB ...\n", " mdcur (time) int32 701kB ...\n", " mscur (time) int32 701kB ...\n", " nstep (time) int32 701kB ...\n", " time_bounds (time, hist_interval) datetime64[ns] 3MB ...\n", " ... ...\n", " URBAN_AC (time, gridcell) float32 701kB ...\n", " URBAN_HEAT (time, gridcell) float32 701kB ...\n", " WASTEHEAT (time, gridcell) float32 701kB ...\n", " WBT (time, gridcell) float32 701kB ...\n", " Wind (time, gridcell) float32 701kB ...\n", " ZWT (time, gridcell) float32 701kB ...\n", "Attributes: (12/38)\n", " title: CLM History file information\n", " comment: NOTE: None of the variables ar...\n", " Conventions: CF-1.0\n", " history: created on 11/23/24 14:34:27\n", " source: Community Land Model CLM4.0\n", " hostname: clmu-app\n", " ... ...\n", " ctype_urban_shadewall: 73\n", " ctype_urban_impervious_road: 74\n", " ctype_urban_pervious_road: 75\n", " cft_c3_crop: 1\n", " cft_c3_irrigated: 2\n", " time_period_freq: minute_30