Green City Library Help

UserData

Basics:

This package works as template for your own weather datasets that are imported into the environmental model. It shows a dummy structure for all potential individual weather datasets.

How to add new weather data sets?:

First of all follow the corresponding instructions off City package documentation. Then, copy the UserCity1 sub-package to a customized folder for individual new data sets and use it as template for your own weather data sets. Fill-in every data point and/or input table set depending on the individual location parameters. You can define new reference day or test reference year (TRY) scenarios for each city.

Furthermore, the integration of a number of different new weather data for one location (i.e. city) requires some additional entries within the Environment model's Modelica code. Therefore, copy the Green City Environment model to your customer folder as well. Then open it using the text editor and add a replaceable parameter (use lines 706 to 772 as template) for the reference day scenarios (i.e. define InputData_City_xyz) and/or another one for the test reference year scenarios (i.e. define InputData_TRY_City_xyz).

Finally add the corresponding terms before the final 'else' term in both equations in line 776 and 779:

  • 'InputDataRefDay= ... elseif (City.CityIndex==XX) then InputData_City_xyz ...'

  • 'InputDataTRY= ... elseif (City.CityIndex==XX) then InputData_TRY_City_xyz ...'

Then, every new city/location automatically emerges in the parameter dialog of the Environment model. It is then available via the drop-down menu of the “Cities” parameter. Once selected, the associated weather data sets will emerge as a drop-down selection of “InputData_(TRY)_City_xyz”. If TRY is set to true, this dialog tab only shows the associated test reference year (TRY) data sets. If TRY is set to false, only reference day specific weather data sets are available.

A simple approach to add new weather data:

However, the complex workflow for adding large data sets is not always necessary. If the user only wants to use external text files as input data sets and the number of additional data sets required is small, they can use an alternative workflow based on the “UserCity1” template structure.

This simple approach uses the existing configuration of available "Cities" in Green City. Therefore, users need to choose simulation in "TRY" mode and select "User City 1 (Example)" as "City" parameter. Then, they must duplicate the UserCity1_TRY_2010 record to customized folder and rename it to the according to the desired location name. Again, fill-in every data point and/or input table set depending on the individual location parameters. However, leave the extension definition (i.e. GreenCity.Environment.UserData.UserCities.UserCity1.UserCity1_TRY) unchanged. Keep in mind to change the model's comment as well to enable its visibility in the Environment model's parameter dialog.

If the user now opens the “InputData_TRY_City_xyz” parameter dialog, the new input data set will be available for simulations.

29 Oktober 2025