Page 59 of 61 FirstFirst ... 94955565758596061 LastLast
Results 581 to 590 of 608

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

  1. #581

    Default

    Hello, I've been encountering a nasty error using the Python script and I don't know how to solve it:

    2020-11-06 17_38_58-Administrator_ Anaconda Powershell Prompt (Anaconda3).png

    It seems to be a code error rather than an user error, but I'm not sure. Any help would be greatly appreciated. Should I upload my input images just in case you need them? I'm running the script via Conda, should that be a problem.
    Last edited by Skalimoi; 11-06-2020 at 11:44 AM.

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

    Default

    Quote Originally Posted by Skalimoi View Post
    Hello, I've been encountering a nasty error using the Python script and I don't know how to solve it:

    2020-11-06 17_38_58-Administrator_ Anaconda Powershell Prompt (Anaconda3).png

    It seems to be a code error rather than an user error, but I'm not sure. Any help would be greatly appreciated. Should I upload my input images just in case you need them? I'm running the script via Conda, should that be a problem.
    You're running AzureWings' script linked in the OP, right? In any case you should probably post the entire command line you're attempting to run, this looks to be just a typing error, rather than an error in the code itself (as the error message doesn't point to a particular line of code). I'm not sure if running the script through Conda would be a problem or not. I'd suggest attempting to activate it through the command prompt to see if you get the same error?

  3. #583

    Default

    Quote Originally Posted by Charerg View Post
    You're running AzureWings' script linked in the OP, right? In any case you should probably post the entire command line you're attempting to run, this looks to be just a typing error, rather than an error in the code itself (as the error message doesn't point to a particular line of code). I'm not sure if running the script through Conda would be a problem or not. I'd suggest attempting to activate it through the command prompt to see if you get the same error?
    Yes, I'm using AzureWings' script. I tried running it with the command prompt, but I got the same error. The command line I'm using is:
    Code:
    python ./skcc.py --tempns=TEMPJULY.png --tempnw=TEMPJANUARY.png --precns=PRECIPJULY.png --precnw=PRECIPJANUARY.png --outfile=OUTPUT.png --precprof=RAIN --tempprof=TEMPERATURE
    I'll attach the custom color profiles I'm using, too. Maybe there's a problem with those:

    TEMPERATURE.txt RAIN.txt

    They're in .txt format, as the forum wouldn't let me upload them just as files. Hope they can help you.

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

    Default

    You need to put the file names in quotes, for example:

    python ./skcc.py --tempns="TEMPJULY.png" --tempnw="TEMPJANUARY.png" --precns="PRECIPJULY.png" --precnw="PRECIPJANUARY.png" --outfile="OUTPUT.png" --precprof="RAIN.txt" --tempprof="TEMPERATURE.txt"

    Aside from that, there was one instance of using tab instead of spaces in the custom color profiles (which Python will surely complain about).

  5. #585

    Default

    Quote Originally Posted by Charerg View Post
    You need to put the file names in quotes, for example:

    python ./skcc.py --tempns="TEMPJULY.png" --tempnw="TEMPJANUARY.png" --precns="PRECIPJULY.png" --precnw="PRECIPJANUARY.png" --outfile="OUTPUT.png" --precprof="RAIN.txt" --tempprof="TEMPERATURE.txt"

    Aside from that, there was one instance of using tab instead of spaces in the custom color profiles (which Python will surely complain about).
    Okay, I changed the command line to that, I checked every color profile to delete any tab, and now I have another problem. The script doesn't detect my ocean color and keeps saying that it isn't specified in the profile: "Error: Invalid color in input data (did not match input profile): (255, 255, 255)". This was after I changed my ocean color to white because I had the same error with the blue color I had before. The color is indeed specified in the new profiles, which I'll attach again just in case.

    TEMPERATURE.txt RAIN.txt

    In order to correct this, I tried to use the correct_colors.py script with the following line:
    Code:
    python ./correct_colors.py input_img="TEMPJULY.png" output_img="TEMPJULY_CORRECTED.png" colors="TEMPERATURE.txt"
    And it returns the following error:
    2020-11-07 11_46_31-Administrator_ Windows PowerShell.png

    The color profile IS in the directory. I haven't moved any file. I put the same arguments as in the README file. I'm sure the answer is plain and simple, but I'm afraid I can't wrap my head around it.

    I'll attach my input images too, in case you need them. Thank you
    images.zip

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

    Default

    I'm actually not sure how Azure's script handles ocean colors when reading from an input profile. Personally I just tend to write any custom colors into the script itself. You could do that as well, open "skcc.py" and replace the original defaultOceanColor (line 56) with the new one.

  7. #587

    Default

    Finally solved it! For anyone who may have the same problem: you need to change the value of the Ocean color from "O" to any random number. It seems that the script doesn't recognise the default value properly.

  8. #588
    Guild Adept acrosome's Avatar
    Join Date
    Dec 2013
    Location
    35.2, -106.5
    Posts
    289

    Default

    I'm working on precipitation, and I'm trying to interpret this graphic:

    altitude rain.png

    Am I interpreting it correctly that precipitation is 1 (or maybe 0?) at altitudes higher than 4000m? Or, put another way, once altitude gets VERY high does precipitation start to drop rather than increase from orographic lift?

    I have many very high altitude provinces in otherwise high precipitation areas, so this is important for my worldbuilding.
    Last edited by acrosome; 11-29-2020 at 06:08 PM.

  9. #589

    Default

    Quote Originally Posted by Skalimoi View Post
    Finally solved it! For anyone who may have the same problem: you need to change the value of the Ocean color from "O" to any random number. It seems that the script doesn't recognise the default value properly.
    Sorry about this one; I've known about the "(ocean color) is invalid/not in input profile" bug since a very long time ago and due to a couple of obnoxious and awkward reasons hadn't fixed it despite the fix being rather simple. I just pushed a version of the Python script to Github that should put a stop to this particular bug once and for all.

    For reference, it wasn't a problem with the input profile specifically, but rather typos in an internal check made to see if a pixel matches an ocean (or other "ignored") color. The problem arose specifically if there were pixels that were ocean in either or both of the nothern-hemisphere-winter temperature and the northern-hemisphere-summer precipitation input maps, but not ocean in the other two. With the new version you should be able to use an 'O' or an 'X' in lieu of a number to specify an ocean/ignored color in input profiles, even when the input maps conform to the above scenario, without experiencing this error (pixels that are ocean in some input maps but not others will be treated as ocean for the final output).

    Quote Originally Posted by acrosome
    Am I interpreting it correctly that precipitation is 1 (or maybe 0?) at altitudes higher than 4000m? Or, put another way, once altitude gets VERY high does precipitation start to drop rather than increase from orographic lift?
    I'm not as knowledgeable on the subject as Azélor, Charerg and some of the other regulars, but at very high altitudes I would think the possibility does exist that enough precipitation occurs on the preceding lower slopes that the remaining precipitation on the higher levels is diminished. Apparently this can also depend on the temperature of the moist air mass: if it is warmer, it is likely to precipitate most heavily lower in elevation than a colder air mass would (but I'm unsure if this is enough to overcome the fact that the warmer air mass is likely to have a lot more precipitation to drop overall compared to the cold one).

    However, at those elevations it might start to become less relevant anyways because the temperatures might push the climate category towards E climates where precipitation amounts don't matter, so if the provinces in question aren't warm to begin with it might end up being a moot point (for reference, going off of Azélor's chart for the temperature impact of elevations, at 4000m, if at sea level the temperature would have been any lower than 36 degrees C, the temperature will be less than 10 degrees C). If it doesn't get up to 10 degrees or higher in at least one of summer or winter it's an E climate and the precipitation amount doesn't affect the category.
    Last edited by AzureWings; 11-22-2020 at 06:26 PM.

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

    Default

    AzureWings is correct, the precipitation does eventually diminish as the elevation becomes very high. For example, both the Altiplano and the Tibetan Plateau are very dry landscapes. As pointed out, the effect is somewhat diminished by the cold conditions prevalent in these altitudes (hence, low evaporation), and anything higher than 4000 m in altitude typically has an E-type climate.

Page 59 of 61 FirstFirst ... 94955565758596061 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
  •