Results 1 to 10 of 608

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default

    Heh, you have a point about the image size- unfortunately, scaling it down from the original size after i had made my elevation maps is what caused things to become janky (several pixels became various shades which I found unhelpful).

    But the good news is, your code just ran and successfully executed.

    EDIT: And after some color swapping, I'm proud to present the results below:
    suru climates.png

    Besides the large amount of tundra up north, there's also considerably more desert than I expected. But in any case, I'm really grateful you threw the code together for this.
    Last edited by Coggleton; 10-31-2020 at 11:30 AM.

  2. #2

    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.

  3. #3
    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?

  4. #4

    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.

  5. #5
    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).

  6. #6

    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

  7. #7
    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.

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
  •