Coder Social home page Coder Social logo

Nightlimit issue about uwg HOT 6 OPEN

gianlucamaracchini avatar gianlucamaracchini commented on July 22, 2024
Nightlimit issue

from uwg.

Comments (6)

saeranv avatar saeranv commented on July 22, 2024

(Reposting this, since I accidently used my work account to post the previous message).

@jmrk87

Yes, this looks like a bug, using the same threshold contradicts the next conditional statement below. The problem stems from the original UWG_Matlab:

            daylimit = parameter.dayThreshold;      % sunlight threshold for day (~150W/m^2)
            nightlimit = parameter.dayThreshold;    % sunlight threshold for night (~50W/m^2)
            sunlight = forc.dir+forc.dif;
            
            % If dir & dif light is greater than threshold, use day 
            if sunlight > daylimit && time <= noon ||...
                    sunlight > nightlimit && time > noon || obj.sensHeat > 150                

Ref: https://github.com/hansukyang/UWG_Matlab/blob/b96bc2a8458ce10990d9bdbea16c5cef17628c50/UBLDef.m#L66-L72

@hansukyang do you agree this is a bug, or are we missing something?

from uwg.

hansukyang avatar hansukyang commented on July 22, 2024

It's probably an error from me having played around with 'dayThreshold' and 'nightThreshold' being set to just a single value as I think I remember some of the UWG parameters did not really have noticeable effect.

FYI, I recently added 'boundary layer height' (https://docs.oikolab.com/#2-3-available-parameters) as an available weather parameter as this is available from NWP models. I haven't performed any analysis with it yet but was curious myself how it varies. Here in the plots below you can see how it varies over course of the day for Boston (rather than just two set values usually 50~80m for night and 700m for day in UWG) for a couple of years:

image

image

from uwg.

saeranv avatar saeranv commented on July 22, 2024

Update: I made the change, but it's failing one unit test, so I need to figure out why that's happening before I can merge it. A lot of the unit tests were based on data from the UWGMatlab so a failing unit test is not alarming.

@hansukyang Interesting, I recall from Nakano's thesis sensitivity analysis the nighttime BL height was one of the parameters that had a "significant" impact on the UHI. Is there any way to also get data on the "h_ref" parameter - height at which potential temperature is uniform? "h_ref" It also had a big impact on the UHI.

from uwg.

hansukyang avatar hansukyang commented on July 22, 2024

Yes, BL has substantial impact on UWG because it essentially changes the control volume where urban air and rural air is mixed I believe.

I don't think 'h_ref' parameter is available on its own. On the other hand, do be cautious about looking too much into various atmospheric parameters on UWG such as BL or 'h_ref'. Recall that UWG is built on some shaky assumptions translating 3D phenomenon (atmospheric heat convection) into extremely simplified 1D process while being over-parameterized at the same time so it is very easy to tweak input parameters to get results that fit the data.

from uwg.

saeranv avatar saeranv commented on July 22, 2024

@hansukyang Agreed, and thats why we advise everyone to not tweak the atmospheric parameters. But, according to Nakano's sensitivity study, the Night BL, and the inversion height parameters showed a "significant" impact on the resulting UHI and so relying solely on the default assumptions adds its own bias.

So wouldn't selected use of measured-cum-simulated/ERA5 data for atmospheric parameters improve the accuracy of the UWG simulation? Or would even that be out of scope or change underlying assumptions of the simplified 1D process for the atmospheric portion of the UWG?

from uwg.

hansukyang avatar hansukyang commented on July 22, 2024

I think that would be an interesting study. As you can see in the plots above, the boundary layer height varies considerably and the reservation that I have is that the definition of parameters such as 'boundary layer' as defined in UWG may be different than NWP datasets such as ERA5.

Feel free to download boundary layer variable from https://weatherdownloader.oikolab.com and play around (I think you should still have account to download this data). Inversion layer height is a bit tricky because temperature is given at various pressure heights (we don't have this yet but you can get it directly from Climate Data Store) and this value would have to be derived.

from uwg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.