Page 26 of 61 FirstFirst ... 1622232425262728293036 ... LastLast
Results 251 to 260 of 608

Thread: The Köppen–Geiger climate classification made simpler (I hope so)

  1. #251
    Guild Grand Master Azélor's Avatar
    Join Date
    Jul 2008
    Location
    Québec
    Posts
    3,363

    Default

    That is pretty impressive! You have experience in programming?

    I know it's unlikely to work. I just wanted to see it since I have no idea where to begin.

  2. #252
    Guild Artisan Charerg's Avatar
    Join Date
    Feb 2015
    Location
    Finland
    Posts
    525

    Default

    Quote Originally Posted by Azelor View Post
    That is pretty impressive! You have experience in programming?

    I know it's unlikely to work. I just wanted to see it since I have no idea where to begin.
    Yeah I did study programming as a minor subject. So I do have a grasp of the basics (not a whole lot of experience though). Although I didn't have any experience with Scheme or scripting in GIMP, but fortunately GIMP is pretty user friendly in the sense that it includes a well-documented library of the available functions and there were some nice tutorials around the web too. It can be a bit difficult to get started but it's pretty easy once you get through the basic stuff.

    Basically, just start simple, first figure out how to code in the duplication operations. Learning the basics like how to store some value in a variable (like a reference to a layer) is the biggest hurdle, once you manage that the colour picking and replacing is largely a lot of copy-paste (and testing so you don't accidentally write the wrong colour somewhere). If there are some sample scripts intended for beginners or scripting tutorials available for PhotoShop it shouldn't be too hard (it just takes some time and patience to learn the basics).

    My climate script probably isn't the best learning material since it hasn't been written as a tutorial, and in any case it only applies to GIMP functions and their particular syntax.
    Last edited by Charerg; 01-29-2018 at 05:37 PM.

  3. #253
    Guild Grand Master Azélor's Avatar
    Join Date
    Jul 2008
    Location
    Québec
    Posts
    3,363

    Default

    Photoshop accepts javascript, vbscript and applescript but I think the last one only works on mac.
    There are pdf guide for coding for each of the language.
    Applescript is close to written English.
    I'll have a look at them and I'll try to code maybe.
    I'll probably just end up using your script.

    It's not so bad if it doesn't work in PS. Anyone can get Gimp and Install it. Unlike PS which cost money.

    ________________________________________________

    Btw, I've found a ways to simplify the temperature.

    let's begin with those that have no impact because they are always identical.

    The funky colours on the right side. They are always wet. Green, orange and yellow.
    Super Hot + hot and Super hot + warm always have the same climate, so we can keep only one of them. in yellow
    Super hot+cool and very hot+cool are identical. in yellow too
    Hot+very cold and super hot + super cold are identical. In red

    changes

    sheet18.png


    8 temp combos down
    574 possibilities

    Updated table

    sheet19.png

    __________________________________________

    The following have an impact but is small. It changes a steppe/humid/desert but only 1 at a time. Not 2 were humid become a desert fro example.
    Also the changes only impact 1 of the 36 precipitation blocks.
    They ussually impact more than one cell because the climate shift follow a diagonal.

    Secound table

    Super hot + super cold is almost identical with very hot+super cold. dark red
    mild + very cold and warm+super cold are almost identical, therefore we could unite all the dc climates. green
    mild+cold and warm+very cold are almost identical. In purple
    Super hot+cool and Super hot+mild are identical exept in one place. Desert vs steppe. magenta
    Hot+cold and very hot + cold , almost identical. in orange.

    Very hot+warm and Hot+warm are identical except in one of the 36 rain combinations. one is a desert and the other one a steppe.
    Hot +warm is also almost identical to Warm+warm exept is one area where one is a steppe and the other is humid.
    We could fuse the 3 together using the one in the middle. Or maybe just fuse 2 of the 3 to minimize divergence. They appear red in the table.

    propositions:

    sheet20.png

    if we take all these suggestions, the number of temperatuyre combinations drop at 21.
    With a total possibilities of 464, but the model loses some accuracy.
    Last edited by Azélor; 01-29-2018 at 08:44 PM.

  4. #254
    Guild Grand Master Azélor's Avatar
    Join Date
    Jul 2008
    Location
    Québec
    Posts
    3,363

    Default

    made another version of the precipitation map for July but using only 10 ml categories all the way to 600 ml

    10 ml precipitation categories 2.png

    I've managed to find out

    Change the foreground color
    Select a particular color in the image
    Fill a selection (don't know how to avoid filling an empty selection, but I guess it's not a problem if I import a color key)

    The code is pretty long to select a color.

    Of course I have the help of a listener or so that's how it's called. It can help sometime but it is clumsy and uses lab colors in his code. Selecting a color take a dozen lines of code at least, for each color.
    Hopefully I can find a more efficient way to do it.
    Last edited by Azélor; 01-30-2018 at 12:39 AM.

  5. #255
    Guild Artisan Charerg's Avatar
    Join Date
    Feb 2015
    Location
    Finland
    Posts
    525

    Default

    Quote Originally Posted by Azelor View Post
     
    Photoshop accepts javascript, vbscript and applescript but I think the last one only works on mac.
    There are pdf guide for coding for each of the language.
    Applescript is close to written English.
    I'll have a look at them and I'll try to code maybe.
    I'll probably just end up using your script.

    It's not so bad if it doesn't work in PS. Anyone can get Gimp and Install it. Unlike PS which cost money.

    ________________________________________________

    Btw, I've found a ways to simplify the temperature.

    let's begin with those that have no impact because they are always identical.

    The funky colours on the right side. They are always wet. Green, orange and yellow.
    Super Hot + hot and Super hot + warm always have the same climate, so we can keep only one of them. in yellow
    Super hot+cool and very hot+cool are identical. in yellow too
    Hot+very cold and super hot + super cold are identical. In red

    changes

    sheet18.png


    8 temp combos down
    574 possibilities
    I think I'll use this system for the script. I don't think 574 is too many since we already have a list about which colour belongs to which climate group, so it's just a matter of a lot copy-paste basically to put that list into the code.

    I should perhaps note that merging Hot+Super Cold with the "never arid" categories will create a minor inaccuracy in Mongolia though. The aforementioned Ulaangom and surrounding regions actually have this temperature pattern, but they are classified as BSk. In our case those areas will become Da.

    Edit:
    Ok, I finished up the temperature merging part. Can you check out if the output is fine? This time I included "test boxes" in the maps that show all the combinations so it's easier to test for errors. I calculated 26+2 temp combinations left after merging, which should be correct. Likewise, I calculated 22 precip combos after re-colouring (so, 26*22 + 2= 574 total possibilities).

    Precs after merging and re-colouring:
    genPrecMTest.png

    Temps after merging:
    genTempMTest.png

    Btw, I've just re-coloured all the ET and EF as black since they've already been painted into the climate map at this stage (so there's no need to keep the temperature info for them).
    Last edited by Charerg; 01-30-2018 at 09:05 AM.

  6. #256
    Guild Grand Master Azélor's Avatar
    Join Date
    Jul 2008
    Location
    Québec
    Posts
    3,363

    Default

    I should perhaps note that merging Hot+Super Cold with the "never arid" categories will create a minor inaccuracy in Mongolia though. The aforementioned Ulaangom and surrounding regions actually have this temperature pattern, but they are classified as BSk. In our case those areas will become Da.
    No it does not change that area. The precipitation category affected is the one in the lower right only, the driest of the whole table. The area covers the central part of the Tarim bassin and northern Tibet, in that region.
    Mongolia is wetter because it receive some precipitation during the monsoon.

    I think the maps look ok. I just need to find what temperature you merged with what in terms of color.


    Also, I was wondering, what are your precipitation categories. I can't find the min/max, only the average.
    Last edited by Azélor; 01-30-2018 at 10:33 AM.

  7. #257
    Guild Artisan Charerg's Avatar
    Join Date
    Feb 2015
    Location
    Finland
    Posts
    525

    Default

    Quote Originally Posted by Azelor View Post
    No it does not change that area. The precipitation category affected is the one in the lower right only, the driest of the whole table. The area covers the central part of the Tarim bassin and northern Tibet, in that region.
    Mongolia is wetter because it receive some precipitation during the monsoon.

    I think the maps look ok. I just need to find what temperature you merged with what in terms of color.


    Also, I was wondering, what are your precipitation categories. I can't find the min/max, only the average.
    That is in N. Mongolia, it's basically located in the valleys between the Altai and Sayan mountains (The Tarim is part of China, actually). It's actually the only area on Earth that has that temperature pattern (Hot+S. Cold), I think. Although it would probably be misclassified as Da in any case, because our way of calculating the mean annual temperature (taking the extreme temperatures) makes it seem colder than what it actually is annually.

    As to the maps, that precipitation table (and the categories) are exactly the same as in your prior post (since this version is intended to be a direct port). Likewise, I've followed the temperature tables exactly, so if you check the hexadecimal values of the colours from the table I included in the map, they should match with those detailed in the 1st proposition of your post. Unless you mean what categories I used in the 8-step version?
    Last edited by Charerg; 01-30-2018 at 12:26 PM.

  8. #258
    Guild Grand Master Azélor's Avatar
    Join Date
    Jul 2008
    Location
    Québec
    Posts
    3,363

    Default

    Ok but if this area is in Northern Mongolia, it receive too much rain to be affected, so it should not be a problem.

    Likewise, I've followed the temperature tables exactly,
    Yes, I sorted that out. Just wanted to be sure the Excel table had the right values for the simplified table.

    Yes I wanted to know the 8 categories version. I'd be interested in making a new table by extending the one I already have. Just to see and maybe for future use.
    You did say that it improved the precision of the map?
    If we can find a good way to implement the precipitation, having 2 more categories could be worth it.
    Otherwise, it might be better to stick with 6.

    I'm not sure if you know that but the initial method made by Pixie included only 5 instead of 6. I added the 6th to help identify the cold and dry climates.
    The possibilities jumped from 25 to 36 and now maybe 64.

  9. #259
    Guild Artisan Charerg's Avatar
    Join Date
    Feb 2015
    Location
    Finland
    Posts
    525

    Default

    Quote Originally Posted by Azelor View Post
    Ok but if this area is in Northern Mongolia, it receive too much rain to be affected, so it should not be a problem.



    Yes, I sorted that out. Just wanted to be sure the Excel table had the right values for the simplified table.

    Yes I wanted to know the 8 categories version. I'd be interested in making a new table by extending the one I already have. Just to see and maybe for future use.
    You did say that it improved the precision of the map?
    If we can find a good way to implement the precipitation, having 2 more categories could be worth it.
    Otherwise, it might be better to stick with 6.

    I'm not sure if you know that but the initial method made by Pixie included only 5 instead of 6. I added the 6th to help identify the cold and dry climates.
    The possibilities jumped from 25 to 36 and now maybe 64.
    The categories I used were:
    0-5 mm
    5-10 mm
    10-20 mm
    20-40 mm
    40-70 mm
    70-140 mm
    140-200 mm
    200+ mm

    Though my averages were slightly odd at times (for example, I used 50 mm avg. for the 40-70 mm category, mostly cuz I like round numbers ). But yes, I do believe that having more categories particularly in the 40-140 mm region would probably improve the accuracy especially when it comes to the extent of the B climates.

    Though I'm not sure if these should be followed exactly. The 70-140 mm in particular is a bit too broad. Also, it would probably be a very good idea to have either a 30-60 mm or 40-60 mm category, because 60 mm is the "boundary" between Af and the rest of the A climates.

    One possibility would be to script the thing so it reads through the map pixel-by-pixel and just calculates the climates that way without doing all the colour picking. That way you could essentially use an arbitrary amount of categories, because the actual math would be done by the script itself. However, it would be more complicated to script and require some testing about the idea first. Also, the processing time could get fairly long if the script went through a whole high res map on a pixel-by-pixel basis.

    Though that is just from the "data processing" point of view, I guess you meant the difficulty in creating good instructions about where to actually put the boundaries between different precipitation zones?


    Edit: Finished the script

    So, I coded in the climate definition stage. Here's the output:

    Source maps:

    Climates:
    genClimates.png

    Since I don't see any holes in the climate map, the script probably works as intended (given that I just copy-pasted all those hexadecimal codes from your Excel file into the various climate zones).

    Some first glance remarks:

    - Overall not too different from the 8-step version's output (which is expected given that both versions have the same temperature system (just simplified even further in the 8-step script))
    - The extent of w climates looks pretty good
    - On the other hand, that shuffling of those categories that receive more than 30% rain in summer from f to s did not work out: since 25-50 mm in summer and 50-100 mm in winter counts as "summer dry", a big chunk of southern England and France gets classified as Cs
    - Not sure about Am, seems to have had very limited effect in Africa, whereas in South America Am seems a bit too widespread (or rather, some of it should be Af instead)

    I didn't post the script quite yet since this is just the first test run (and also in case you want to make some changes).
    Last edited by Charerg; 01-30-2018 at 03:16 PM.

  10. #260
    Guild Grand Master Azélor's Avatar
    Join Date
    Jul 2008
    Location
    Québec
    Posts
    3,363

    Default

    I don't know about the usefulness of having

    0-5 and 5-10 m. I think 0-10 does a good job. When I look at the summer map, it's all desert except maybe in Israel and lower California, which are humid/steppe but they receive significantly more precipitations in winter.

    Something like that maybe?


    1. 0-10
    2. 10-20
    3. 20-40
    4. 40-60
    5. 60-100
    6. 100-150
    7. 150-200
    8. 200+


    And yes, I was talking about the instructions.
    I had an idea. A new map to visualize precipitation distribution. The idea is that the world is divided in 3 zones. Rainy, dry and transition. Each zone (except the transition) has some sort of centre from which precipitations increase/decrease. It work a bit like a gradient.
    of course, it's possible that this model doesn't work everywhere. In the northern latitudes, the polar front distributes precipitations differently.

    10 ml precipitation categories.jpg

Page 26 of 61 FirstFirst ... 1622232425262728293036 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •