Results 1 to 10 of 608

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

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    Guild Artisan Charerg's Avatar
    Join Date
    Feb 2015
    Location
    Finland
    Posts
    525

    Default Updated script for GIMP

    I ended up messing around with writing a GIMP plug-in in Python and updated my old climate script. The new version is largely adopted from Azure's script and works in a similar fashion: the plug-in processes the source maps on a pixel-by-pixel basis. Since this one uses many of GIMP's in-built functions, it's not as efficient as Azure's script, and the processing time is quite long. On the other hand, it now has a nice progress bar that shows how far along the script is from completing. While this is a GIMP plug-in, I'm not 100% sure that it works without installing Python. Anyway, here are the instructions:

    Installation:
    Place the plug-in in the appropriate folder (usually /Program Files/GIMP 2/lib/gimp/2.0/plug-ins). If uncertain, you can check Edit->Preferences->Folders->Plug-ins to see where the plug-ins are stored. Once in the right folder, the plug-in should be available (you can use Filters->Script-Fu->Refresh Scripts so you don't have to restart GIMP). You should now have the script available under the Image tab:

    Click image for larger version. 

Name:	Activation.PNG 
Views:	86 
Size:	267.7 KB 
ID:	124834

    Restrictions for using the script:
    - This has been written for and tested in GIMP 2.10
    - The image needs to be RGBA (RGB with an Alpha channel) with 8-bit Integer precision

    Layer naming restrictions:
    The temperature/precipitation layers need to have exactly the following names (the script searches for them by name):

    JanTemp
    JulTemp
    JanPrec
    JulPrec

    Layer colouring restrictions:
    The temperature and precipitation categories need to have exactly the following colours (with the ocean tiles coloured in a separate colour, not transparent as in prior versions of the script):

    Temperature zones:
     

    Temp Category R G B
    Severely Hot 160 0 65
    Very Hot 210 60 80
    Hot 245 110 65
    Warm 250 175 95
    Mild 255 225 140
    Cool 230 245 150
    Cold 170 220 165
    Very Cold 100 195 165
    Severely Cold 50 135 190
    Deadly Cold 95 80 160

    The temperature zones in a slider:
    Click image for larger version. 

Name:	TempSlider.png 
Views:	28 
Size:	253 Bytes 
ID:	124841

    Precipitation zones:
     

    Prec Category R G B
    200+ mm 210 200 250
    100-200 mm 190 170 240
    50-100 mm 150 130 220
    25-50 mm 90 80 160
    10-25 mm 240 235 160
    0-10 mm 235 0 140

    The precipitation zones in a slider:
    Click image for larger version. 

Name:	PrecSliderAzel.png 
Views:	22 
Size:	225 Bytes 
ID:	124842

    Ocean tiles:
     

    R G B
    155 205 230


    Sample Map:
    Here is a sample climate map using source maps generated from WorldClim's 1970-2000 dataset:

    Source maps:
     
    Click image for larger version. 

Name:	JanPrec.png 
Views:	85 
Size:	330.7 KB 
ID:	124835

    Click image for larger version. 

Name:	JulPrec.png 
Views:	65 
Size:	329.3 KB 
ID:	124836

    Click image for larger version. 

Name:	JanTemp.png 
Views:	70 
Size:	332.0 KB 
ID:	124837

    Click image for larger version. 

Name:	JulTemp.png 
Views:	42 
Size:	376.3 KB 
ID:	124838

    Generated climates:
    Click image for larger version. 

Name:	GenClimates.png 
Views:	137 
Size:	468.5 KB 
ID:	124839

    The plug-in can be found in the attachments. Feel free to provide any feedback if you have trouble using it. Note that the new script has been set up not to generate any Cc climates, and uses a gradual aridity threshold (unlike the previous versions, which used a stepped threshold as in most publications of Köppen maps).


    Update (28/10/20):
    - Now supports off-colour pixels (they are assumed to have 0 °C temperature and 1,0 mm precipitation)
    - Fixed a bug where the script could paint the ocean in the wrong colour if opacity was set at less than 100%

    Big thanks to Coggleton for reporting the issues with the script, this update should solve the problems related to off-colour pixels.
    Attached Files Attached Files
    Last edited by Charerg; 08-01-2021 at 02:35 PM.

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
  •