🚀 Deploy Sudan GCN as a GEE App

Step-by-step guide to publish your Curve Number application as a public Google Earth Engine App on cloud/ee-osmangeomatics1993

1

Save the App Script

First, save the App-ready script to your GEE repository.

Action: In the script panel, delete all existing code
Action: Paste the entire contents of Sudan_GCN_APP.js
Action: Click Save (top menu) → Name it:
Sudan_Hydrologic_CN_App
Save to your repository (e.g., users/osmangeomatics1993/)
⚠️ Important: Use the Sudan_GCN_APP.js file (NOT the Sudan_GCN_CodeEditor.js). The APP version has print() and Export.image.toDrive() removed because they don't work in GEE Apps.
2

Test the Script First

Before publishing, run the script to make sure everything works.

Action: Click ▶ Run

Verify these work correctly:

TestExpected Result
Map loads CN Average layerFull Sudan in green-yellow-red colors
State dropdown populated18 Sudan states listed
Select "Khartoum" → Apply StateMap zooms to Khartoum State
Click on mapPoint query shows CN + State + Locality
Legend appearsColor bar with labels below layer selector
Change layer to "Land Cover"Legend updates to categorical classes
Draw rectangle → ApplyMap clips to drawn area
Generate Download LinkBlue download URL appears
✅ If all tests pass, proceed to Step 3.
❌ If there are errors, check the Console tab for red error messages and fix before publishing.
3

Open the App Manager

Action: In the Code Editor, click the Apps button (top-right, near your profile icon)
Action: This opens the "Manage Apps" dialog you showed in your screenshot

You should see your existing cloud project: cloud/ee-osmangeomatics1993

4

Create New App

Action: Click the blue NEW APP button (top-right of the Manage Apps dialog)

A "New App" form will appear with these fields:

FieldWhat to Enter
App Name Sudan Hydrologic Curve Number Application
Project Select: cloud/ee-osmangeomatics1993
App ID (auto-generated) Will auto-fill something like:
cloud/ee-osmangeomatics1993/sudan-hydrologic-curve-number-application
You can edit the slug if you want a shorter URL
Source Code Should automatically point to your currently open script
If not, browse to: users/osmangeomatics1993/Sudan_Hydrologic_CN_App
5

Configure App Settings

SettingRecommended Value
Access Select: "Anyone with the link" (for public research access)
Or: "Anyone" (to appear in the GEE App Gallery)
Earth Engine App Visibility Check "Show in Gallery" if you want public discovery
⚠️ Google Account required: Users must have a GEE account to run the app. For fully public access (no login), consider the "Anyone" option, but note GEE still requires authentication for heavy computation.
6

Publish the App

Action: Click PUBLISH

After publishing, you'll get your app URL:

https://ee-osmangeomatics1993.projects.earthengine.app/view/sudan-hydrologic-curve-number-application
Your app is now live! Share this URL with researchers, students, and agencies.
7

Test the Published App

Open the URL in a new browser tab (or incognito window) and verify:

#TestPass?
1App loads and shows CN Average map
2Left panel visible with all sections
3State dropdown shows 18 states
4Selecting state → map zooms and clips
5Locality populates after state selected
6Click on map → shows query with State + Locality
7Legend updates when switching layers
8Draw tools work (rectangle/polygon/point)
9Runoff calculator produces results
10GPM rainfall fetches and displays
11Download link generates for selected product
12Reset to Full Sudan works
8

Update the App (Future Changes)

To update your app after making code changes:

Action: Edit and save the script in Code Editor
Action: Open Apps manager → find your app → click the pencil icon ✏️ next to the App ID
Action: Click UPDATE (or PUBLISH again)

The URL stays the same — users always see the latest version.

🔧 What Changed from Code Editor Version → App Version

FeatureCode Editor (Sudan_GCN_CodeEditor.js)App (Sudan_GCN_APP.js)
print()Console messages❌ Removed (not available in Apps). Welcome message shown in result panel instead.
Export.image.toDrive()5 export tasks to Google Drive❌ Replaced with getDownloadURL() — generates direct download links for GeoTIFF files. User selects product + scale.
DownloadTasks tab required✅ Direct download link in the panel. User clicks link → browser downloads GeoTIFF.
Scale selectionFixed 250m✅ User can choose 250m / 500m / 1000m / 5000m (smaller scale = faster for large AOIs).
All other featuresIdentical: State/Locality, Draw, Asset, 12 layers, Legend, Runoff, GPM, Click query, Statistics
💡 Pro Tip: Keep both script versions. Use Sudan_GCN_CodeEditor.js for your own research (with Export to Drive), and Sudan_GCN_APP.js for the published App (with download links).