Package: sdmbc
SDMBCSDMBC is an open-source Python pacakge for correcting the full atmospheric fields as well as sea surface temperature of global climate model (GCM) datasets prior to dynamical downscaling.Table of contentsAcknowledgementsBackground to SDMBC packageInstallationInput dataOutput dataTutorialGet in touch1. AcknowledgementsRETURN TO TOPSDMBC refers to Sub-Daily Multivariate Bias Correction and was developed byYoungil Kim. The theoretical support for this project was provided byJason EvansandAshish Sharma.The design of SDMBC was influenced byMultivariate Bias Correction (MBC) R pakcage, which adjusts for the biases in inter-variable relationships of climate model outputs across multiple time scales.We acknowledge funding from the UNSW Scientia PhD Scholarship Scheme, the ARC Centre of Excellence for Climate Extremes (CE170100023), and the Australian Government under the National Environmental Science Program. This research was undertaken with the assistance of resources from the National Computational Infrastructure (NCI Australia), an NCRIS enabled capability supported by the Australian Government.2. Background to SDMBC packageRETURN TO TOPVarious bias correction techniques have been used to correct RCM input boundary conditions, ranging from simple scaling to more complex approaches that mimic observed multi-scale relationships in simulations. Studies have shown that increasingly sophisticated techniques that correct auto- and cross-dependence attributes can significantly improve rainfall characteristics, particularly for variability and extremes. Multivariate bias correction of RCM input boundary conditions has also been demonstrated to better represent compound events, which can be defined as a combination of extremes and hazards. However, while correcting the physical relationships between variables is important to reduce errors in simulated extreme events, daily and longer-term bias correction may impact the simulation of sub-daily rainfall, assuming that diurnal patterns are adequately modeled by the global climate model (GCM).Therefore, a novel approach that corrects multivariate relationships between variables at a sub-daily time scale was developed. RCM simulations with sub-daily multivariate bias-corrected boundary conditions demonstrated improved performance particularly for extreme events. However, the bias correction process requires complex mathematical formulations and large matrices, making it challenging for users to apply the method. None of studies have developed software to support this process.To address this issue, we developed the first software package for sub-daily multivariate bias correction, called Sub-Daily Multivariate Bias Correction (SDMBC) for Dynamical Downscaling, in the Python environment. The approach has been proposed by (Kim 2023, under review), and is generally more effective at representing the range of diurnal rainfall magnitude compared to multivariate bias correction and corrects the full atmospheric fields and sea surface temperature of GCM datasets prior to dynamical downscaling.This software package simplifies the implementation of the bias correction process.3. InstallationRETURN TO TOPThe following sections describe the software requirements and the process of installing SDMBC.3.1 Software requirements (prerequisite):Pythonversion 3 or later.To generate output stastitics figuresThebasemapThecartopy3.2 DownloadThere are several options to donwload this package to your computer.Download and extractthis fileto your computer.
This will create a directory named "sdmbc".Install SDMBC directly from GitHubpip install https://github.com/young-ccrc/sdmbc/archive/refs/heads/master.zipInstall SDMBC from PYPIpip install sdmbcClone SDMBC git repository and installgit clone https://github.com/young-ccrc/sdmbc.gitThen,python setup.py installRecommend to install this package under new python or conda environment.To create and activate new conda environment,conda create -n sdmbc python=3.10
conda activate sdmbc4. Input dataRETURN TO TOPUsers need to modify the 'user_input.py' file, which contains input data information and bias correction options. The input files include global climate model (GCM) data that needs to be bias-corrected and reanalysis data used as observations. It should be noted that the reanalysis data must be properly interpolated to match the GCM resolutions before being used as inputs.To conduct bias correction, a simluation period of a minimum of 31 years is recommended to correct climatological statistics, considering a 1-year spin-up period for RCM simulations.Following files must be in the same folder.user_input.pymain_biascorrection.exeInput files3d.gcm.%level%.input.nc: three-dimensional atmospheric variables of GCM, including specific humidity (q), temperature (t), and zonal and meridional wind components (u and v)3d.obs.%level%.input.nc: three-dimensional atmospheric variables of observation, including specific humidity (q), temperature (t), zonal and meridional wind components (u and v)sfc.gcm.input.nc: two-dimensional surface variable of GCM, including sea surface temperatrue (sst)sfc.obs.input.nc: two-dimensional surface variable of observation, including sea surface temperatrue (sst)5. Output dataRETURN TO TOPThis package provides two types of bias-corrected outputs: three-dimensional atmospheric variables at each vertical level and sea surface temperature. If bias correction performed correctly, the package generates key statistics of the outputs within the selected domain.These results provide an evaluation of model performance at different time scales, including climatological mean, standard deviation, lag1 auto-correlation, cross-correlation, mean absolute bias of sea surface temperature, and distribution at a sub-daily time scale.Output files3d.bcd.%level%.output.nc: bias-corrected specific humidity (q), temperature (t), and zonal and meridional wind components (u and v)sfc.bcd.output.nc: bias-corrected sea surface temperatrue (sst)Once SDMBC has been applied to all vertical levels, the resulting outputs can be reformatted according to the CMIP6 global attribute description. If users set the reformat option to 1 in 'user_input.py', the package will automatically generate bias-corrected GCM datasets that have the same format as the original data.6. TotorialRETURN TO TOPJupyter Notebook example, how to run this packge, can be found in example folder.7. Get in touchRETURN TO TOPThe authors welcome any contributions to code development going forward.youngil.kim@student.unsw.edu.au