From 29fa1e58603dd46c914673ecad798a05d1194891 Mon Sep 17 00:00:00 2001 From: igor Date: Mon, 14 Jul 2025 21:08:37 +0500 Subject: [PATCH] New server nomads.ncep.noaa.gov --- org_ccalm_weather.yml | 12 ++++++------ src/main/java/org/ccalm/weather/AirTemperature.java | 10 +++++++--- src/main/java/org/ccalm/weather/Precipitation.java | 3 ++- src/main/java/org/ccalm/weather/SoilTmperature.java | 5 +++-- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/org_ccalm_weather.yml b/org_ccalm_weather.yml index d157b18..0e24c06 100644 --- a/org_ccalm_weather.yml +++ b/org_ccalm_weather.yml @@ -22,16 +22,16 @@ custom: data_dir: /data/ db_all: #url: jdbc:postgresql://92.46.48.43:5444/weather?ApplicationName=kz_mcp_weather&sslmode=require - url: jdbc:postgresql://192.168.0.90:5432/weather?ApplicationName=kz_mcp_weather&sslmode=require - #url: jdbc:postgresql://127.0.0.1:5432/weather?ApplicationName=kz_mcp_weather&sslmode=require + #url: jdbc:postgresql://192.168.0.90:5432/weather?ApplicationName=kz_mcp_weather&sslmode=require + url: jdbc:postgresql://127.0.0.1:5432/weather?ApplicationName=kz_mcp_weather&sslmode=require login: postgres - password: PasSecrKey1 + password: 309A86FF65A78FB428F4E38DFE35F730 db_ru: #url: jdbc:postgresql://92.46.48.43:5444/weather_ru?ApplicationName=kz_mcp_weather&sslmode=require - url: jdbc:postgresql://192.168.0.90:5432/weather_ru?ApplicationName=kz_mcp_weather&sslmode=require - #url: jdbc:postgresql://127.0.0.1:5432/weather_ru?ApplicationName=kz_mcp_weather&sslmode=require + #url: jdbc:postgresql://192.168.0.90:5432/weather_ru?ApplicationName=kz_mcp_weather&sslmode=require + url: jdbc:postgresql://127.0.0.1:5432/weather_ru?ApplicationName=kz_mcp_weather&sslmode=require login: postgres - password: PasSecrKey1 + password: 309A86FF65A78FB428F4E38DFE35F730 springdoc: diff --git a/src/main/java/org/ccalm/weather/AirTemperature.java b/src/main/java/org/ccalm/weather/AirTemperature.java index 80a3402..877f2e7 100644 --- a/src/main/java/org/ccalm/weather/AirTemperature.java +++ b/src/main/java/org/ccalm/weather/AirTemperature.java @@ -91,7 +91,10 @@ public class AirTemperature implements ServletContextAware { */ @RequestMapping(value = "/geodatalist/AirTemperature",method = RequestMethod.GET,produces = "text/html;charset=UTF-8") @ResponseBody - public Object ajaxTamer(/*@RequestParam(required=true,name="forecast") String forecast,*/@RequestParam(required=false,name="date") String date) { + public Object ajaxTamer( + /*@RequestParam(required=true,name="forecast") String forecast,*/ + @RequestParam(required=false,name="date") String date + ) { String forecast = "000"; String result=""; @@ -142,8 +145,9 @@ public class AirTemperature implements ServletContextAware { String measurement = "TMP:2 m above ground"; //Build URL to download - String URL = "https://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs."+date+"/"+time+"/atmos/gfs.t"+time+"z.pgrb2.0p25.f"+forecast; - + //String URL = "https://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs."+date+"/"+time+"/atmos/gfs.t"+time+"z.pgrb2.0p25.f"+forecast; + String URL = "https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs."+date+"/"+time+"/atmos/gfs.t"+time+"z.pgrb2.0p25.f"+forecast; + File f1 = new File(data_dir+"temp"+File.separator+"air_text.idx"); if(f1.exists()) { if (!f1.delete()) { diff --git a/src/main/java/org/ccalm/weather/Precipitation.java b/src/main/java/org/ccalm/weather/Precipitation.java index d44cc44..40656cb 100644 --- a/src/main/java/org/ccalm/weather/Precipitation.java +++ b/src/main/java/org/ccalm/weather/Precipitation.java @@ -159,7 +159,8 @@ public class Precipitation implements ServletContextAware { String measurement = "APCP:surface:0-1 day acc fcst"; //Build URL to download - String URL = "https://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs."+date+"/"+time+"/atmos/gfs.t"+time+"z.pgrb2.0p25.f"+forecast; + //String URL = "https://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs."+date+"/"+time+"/atmos/gfs.t"+time+"z.pgrb2.0p25.f"+forecast; + String URL = "https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs."+date+"/"+time+"/atmos/gfs.t"+time+"z.pgrb2.0p25.f"+forecast; File f1 = new File(data_dir+"temp"+File.separator+"pre_text.idx"); if(f1.exists()) { diff --git a/src/main/java/org/ccalm/weather/SoilTmperature.java b/src/main/java/org/ccalm/weather/SoilTmperature.java index 7fedfca..682bca5 100644 --- a/src/main/java/org/ccalm/weather/SoilTmperature.java +++ b/src/main/java/org/ccalm/weather/SoilTmperature.java @@ -101,7 +101,7 @@ public class SoilTmperature implements ServletContextAware { }*/ //--------------------------------------------------------------------------- /** - * Example: http://127.0.0.1:8081/geodatalist/DownloadSoil?forecast=000 + * Example: https://127.0.0.1:8083/geodatalist/DownloadSoil?forecast=000 * @param response * @param forecast * @param date @@ -165,7 +165,8 @@ public class SoilTmperature implements ServletContextAware { //String measurement = "TSOIL:0.1-0.4 m below ground"; //Build URL to download - String URL = "https://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs."+date+"/"+time+"/atmos/gfs.t"+time+"z.pgrb2.0p25.f"+forecast; + //String URL = "https://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs."+date+"/"+time+"/atmos/gfs.t"+time+"z.pgrb2.0p25.f"+forecast; + String URL = "https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs."+date+"/"+time+"/atmos/gfs.t"+time+"z.pgrb2.0p25.f"+forecast; File f1 = new File(data_dir+"temp"+File.separator+"text.idx"); if(f1.exists()) {