Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WRF detailed setup procedure #689

Open
wants to merge 77 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
24d404e
Update readme.md
marcusgaspar Oct 20, 2022
fd66f10
Update readme.md
marcusgaspar Oct 20, 2022
df79228
upload images
marcusgaspar Oct 21, 2022
8516c5b
upload images
marcusgaspar Oct 21, 2022
6f2543f
Upload setup guide
marcusgaspar Oct 21, 2022
6dd1217
Update pre-reqs
marcusgaspar Oct 21, 2022
23357a5
Install cyclecloud setup guide
marcusgaspar Oct 21, 2022
fcbf885
update
marcusgaspar Oct 21, 2022
df856db
fix
marcusgaspar Oct 21, 2022
b907867
initialize CycleCloud CLI
marcusgaspar Oct 21, 2022
36882ed
install cyclecloud
marcusgaspar Oct 21, 2022
b2062d5
remove pre-reqs
marcusgaspar Oct 21, 2022
4fbf835
update pre-reqs
marcusgaspar Oct 21, 2022
ff16a4f
formatt
marcusgaspar Oct 21, 2022
10f70f9
updates and download_gfs_files.py
marcusgaspar Oct 24, 2022
6851aad
updates
marcusgaspar Oct 24, 2022
754efe0
change repo
marcusgaspar Oct 24, 2022
db35ea8
updates
marcusgaspar Oct 24, 2022
dae9123
updates
marcusgaspar Oct 25, 2022
88f3c75
update
marcusgaspar Oct 25, 2022
71996ae
changes
marcusgaspar Oct 25, 2022
63f63cd
changes
marcusgaspar Oct 25, 2022
d335434
fix test folder
marcusgaspar Oct 25, 2022
8c652ac
change permission
marcusgaspar Oct 25, 2022
c5d114e
validation
marcusgaspar Oct 25, 2022
ffa3024
test scenarios
marcusgaspar Oct 26, 2022
ea81743
changes
marcusgaspar Oct 27, 2022
34178e3
granting write permission to group on /data /apps
marcusgaspar Oct 27, 2022
988a1f2
adjustments required for pull request
marcusgaspar Dec 2, 2022
52e451e
small changes
marcusgaspar Dec 2, 2022
a480bd4
fix link
marcusgaspar Dec 2, 2022
74e1706
fix link
marcusgaspar Dec 2, 2022
d9227ad
link
marcusgaspar Dec 2, 2022
b65cbed
fix repo
marcusgaspar Dec 5, 2022
642b875
clean up
marcusgaspar Dec 6, 2022
79516f5
temporary change while donte complete the PR.
marcusgaspar Jan 26, 2023
2ea3d5b
Update install-cyclecloud.md
marcusgaspar Feb 2, 2024
e1f0428
Update install-cyclecloud.md
marcusgaspar Feb 2, 2024
8c0604d
Update install-cyclecloud.md
marcusgaspar Feb 2, 2024
5b6737a
Merge branch 'Azure:master' into master
marcusgaspar Feb 20, 2024
6cda4e9
New WRF template based on the Slurm 3.0.6 standard template
Jul 11, 2024
e193b8c
Update to slurm template version 3.0.7
Jul 12, 2024
3931b3c
fix
Jul 12, 2024
94a41fd
changes to run on AlmaLinux8 and HBv3
Jul 12, 2024
60b1eb6
download of gfs files has changed
Jul 12, 2024
2179fb1
hbv2 to hbv3
Jul 12, 2024
2217677
small fixes and including hbv3
Jul 15, 2024
6644b1e
add slurm script
Jul 16, 2024
fc742ad
slurm submission
Jul 17, 2024
a75b7d7
Update install-cyclecloud.md
marcusgaspar Jul 18, 2024
652960a
Newer version of WRF PBS template
Jul 18, 2024
0e6fc38
Merge branch 'master' of https://github.com/marcusgaspar/azurehpc
Jul 18, 2024
d3bb317
solving issues with slurm file
Jul 19, 2024
d3b3da0
fixing slurm script and submission
Jul 19, 2024
d1f33e6
add duration
Jul 19, 2024
dcf42e1
fix
Jul 19, 2024
7142c08
format duration
Jul 20, 2024
b4e7176
clean up file
Jul 22, 2024
d1c30cb
Adding automation scripts
Jul 23, 2024
6506196
wps1.slurm
Jul 24, 2024
96ce008
changes
Jul 24, 2024
307a652
slurm files
Jul 24, 2024
0919101
log files
Jul 24, 2024
07ee0a6
fix geog files
Jul 24, 2024
c656379
automation testing
Jul 26, 2024
25e0508
automation adjusts
Jul 26, 2024
31508e8
4 nodes
Jul 26, 2024
5a994ef
4 nodes
Jul 26, 2024
873553a
separating download job
Aug 23, 2024
892f729
genoma icon
Aug 29, 2024
d63af45
adding genoma template
Aug 29, 2024
8f8759d
fix drop down
Aug 29, 2024
172e4b7
fix icon URL
Aug 29, 2024
eec10c7
including cluster-init for wrf
Sep 27, 2024
03b3520
changes
Sep 30, 2024
c7574c1
changes
Sep 30, 2024
7a6ffae
include automation in the new_conus orig namelist files
Oct 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/spack/build_spack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e
APPS_SPACK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
APP_NAME=spack
APP_VERSION=0.16.0
APP_VERSION=0.16.3
SHARED_APP=${SHARED_APP:-/apps}
INTEL_MPI_VERSION=${INTEL_MPI_VERSION:-2018.4.274} # This should be retrieved dynamically

Expand Down
4 changes: 2 additions & 2 deletions apps/spack/compilers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ compilers:
extra_rpaths: []
flags: {}
modules: []
operating_system: centos7
operating_system: almalinux8
paths:
cc: /usr/bin/gcc
cxx: /usr/bin/g++
Expand All @@ -17,7 +17,7 @@ compilers:
extra_rpaths: []
flags: {}
modules: [gcc-9.2.0]
operating_system: centos7
operating_system: almalinux8
paths:
cc: /opt/gcc-9.2.0/bin/gcc
cxx: /opt/gcc-9.2.0/bin/g++
Expand Down
2 changes: 1 addition & 1 deletion apps/spack/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
packages:
openmpi:
externals:
- spec: openmpi@4.0.5%[email protected]
- spec: openmpi@5.0.2%[email protected]
modules:
- mpi/openmpi
buildable: False
Expand Down
50 changes: 50 additions & 0 deletions apps/wrf/automation/build-folder-structure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash

WRFDAT="/data/wrfdata"

echo "creating ${WRFDAT}/wpsdir/"
mkdir -p ${WRFDAT}/wpsdir/

echo "creating ${WRFDAT}/wrfdir/"
mkdir -p ${WRFDAT}/wrfdir/

echo "creating ${WRFDAT}/tables/wps/"
mkdir -p ${WRFDAT}/tables/wps/

echo "creating ${WRFDAT}/tables/wrf/"
mkdir -p ${WRFDAT}/tables/wrf/

echo "creating ${WRFDAT}/tables/namelist/"
mkdir -p ${WRFDAT}/tables/namelist/

echo "creating ${WRFDAT}/gfs_data/"
mkdir -p ${WRFDAT}/gfs_data/

echo "creating ${WRFDAT}/geog/"
mkdir -p ${WRFDAT}/geog/

echo "creating /apps/scripts/"
mkdir -p /apps/scripts/

echo "copying namelist*.wps"
cp -f /data/azurehpc/apps/wrf/automation/namelist*.wps ${WRFDAT}/tables/namelist/

echo "copying namelist*.input"
cp -f /data/azurehpc/apps/wrf/automation/namelist*.input ${WRFDAT}/tables/namelist/

echo "creating link to scripts"
#cd /data/azurehpc/apps/wrf/automation/
#cp /data/azurehpc/apps/wrf/automation/fwddatan.awk /apps/scripts/
#cp /data/azurehpc/apps/wrf/automation/get_gfs_data.py /apps/scripts/
#cp run_*.slurm run_*.pbs submit*.sh /apps/scripts/
ln -s /data/azurehpc/apps/wrf/automation/* /apps/scripts/

echo "creating links to WPF files"
ln -s /apps/hbv3/wps-openmpi/WPS-4.1/* /data/wrfdata/tables/wps/

echo "creating links to WRF files"
ln -s /apps/hbv3/wrf-openmpi/WRF-4.1.5/run/* /data/wrfdata/tables/wrf/

echo "Moving geog files"
#mv albedo_modis albedo_modis.tar.bz2 greenfrac_fpar_modis greenfrac_fpar_modis.tar.bz2 lai_modis_10m lai_modis_10m.tar.bz2 maxsnowalb_modis maxsnowalb_modis.tar.bz2 modis_landuse_20class_30s_with_lakes modis_landuse_20class_30s_with_lakes.tar.bz2 orogwd_10m orogwd_10m.tar.bz2 soiltemp_1deg soiltemp_1deg.tar.bz2 soiltype_bot_30s soiltype_bot_30s.tar.bz2 soiltype_top_30s soiltype_top_30s.tar.bz2 topo_10m topo_10m.tar.bz2 topo_2m topo_2m.tar.bz2 topo_30s topo_30s.tar.bz2 topo_gmted2010_30s topo_gmted2010_30s.tar.bz2 geog

88 changes: 88 additions & 0 deletions apps/wrf/automation/fwddatan.awk
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{ data = $1;
hplus = $2;
len = length(data);
res = len - 6;
dias_mes = "31,28,31,30,31,30,31,31,30,31,30,31"
ano = substr(data,1,4);
mes = substr(data,5,2);
dia = substr(data,7,2);
resto = substr(data,9,res);
fs=","
a=split(dias_mes,dias,fs);
# an1 = (1900+ano)/4.0;
an1 = ano/4.0;
bix = substr(an1,1,3);

if (bix == an1){
dias_mes = "31,29,31,30,31,30,31,31,30,31,30,31";
split(dias_mes,dias,fs);}

diao = dia
if(diao<10) { diao= substr(data,8,1) + 1 - 1};

hres = resto + hplus;
ndia = hres/24.0;
diai = int (ndia)

if(diai >= 1)
{
hres = hres - (diai*24)
diao = dia + diai;
};

if(mes<10) {mes = substr(data,6,1) + 1 - 1};

if(diao > dias[mes])
{
diao = diao - dias[mes];
mes=mes+1;
if(mes > 12)
{
mes=1;
anoteste=ano;
ano = ano +1;
if(ano==100)
{
ano="0";
};

};
};


if(hres < 0)
{
diai = diai - 1
hres = hres - (diai*24)
if(hres == 24)
{
hres=0;
diai = diai + 1;
};
diao = dia + diai;
};

if(diao<1)
{
mes=mes-1;

if(mes<1)
{
mes=12;
ano = ano -1;
if(ano<0)
{
ano=99;
};
};
diao = dias[mes] + diao ;
}


if(diao<10) {diao="0"diao};
if(ano<10) {ano="0"ano};
if(mes<10) {mes="0"mes};
if(hres<10) {hres="0"hres};

print ano mes diao hres;
}
73 changes: 73 additions & 0 deletions apps/wrf/automation/get_gfs_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#from wget import download
import wget
import datetime as dt
import os, subprocess
import sys
from time import time as timer
from multiprocessing.pool import ThreadPool
#import requests
year = int(sys.argv[1])
month = int(sys.argv[2])
day = int(sys.argv[3])

##dia = dt.date.today()
#dia = dt.datetime(dia.year,dia.month,dia.day,12)
dia = dt.datetime(year,month,day,12)
print(dia)
inicio = 00
##fim = 28 ## Dados para 1 dia
fim = 135 ## Dados para 5 dias

data_sys = dia.strftime("%Y%m%d%H")
data_gfs = dia.strftime("%Y%m%d")

##path_home = "/data/wrfdata/itv-data/"
path_home = "/data/wrfdata/gfs_data/"


#### CASO O DIRETORIO PARA O DOWNLOAD NAO EXISTE, ELE SERA CRIADO ####

if not os.path.isdir(path_home + "/" + data_sys ):
os.system("mkdir -p " + path_home + data_sys )

#### URL (http://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod)
#### Alteracao realizada em 10 / set / 2020
#### URL (ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/gfs/prod)

#### DOWNLOAD DOS ARQUIVOS #####
args_inputs = []
j=0
for i in range(inicio,fim,3):
k = str(i)
if i < 10 :
k = ('00' + k)
if i >= 10 and i < 100 :
k = ('0' + k)

gfs = "gfs.t12z.pgrb2.0p25.f" + k
print(gfs)

if not os.path.isfile(path_home + "/" + data_sys + "/" + gfs):
f_out = path_home + "/" + data_sys + '/' + gfs

#### url = ('http://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.' + data_gfs + '/12/' + gfs)
#### url = ('ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.' + data_gfs + '/12/' + gfs)
#### url = ('ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.' + data_gfs + '/12/atmos/' + gfs)
url = ('https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.' + data_gfs + '/12/atmos/' + gfs)

args_inputs.append ((f_out, url))
j=j+1

def fetch_url(entry):
path, uri = entry
print ("Downloading...", path)
filename = wget.download(uri,path_home + data_sys)
return path

start=timer()
results = ThreadPool(6).imap_unordered(fetch_url, args_inputs)

for path in results:
print(path)

print("Elapsed Time: ", timer() - start)
140 changes: 140 additions & 0 deletions apps/wrf/automation/namelist-new.input
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
&time_control
run_days = 0,
run_hours = 132,
run_minutes = 0,
run_seconds = 0,
start_year = aai, aai,
start_month = mmi, mmi,
start_day = ddi, ddi,
start_hour = hhi, hhi,
end_year = aaf, aaf,
end_month = mmf, mmf,
end_day = ddf, ddf,
end_hour = hhf, hhf,
interval_seconds = 10800,
input_from_file = .true.,.true.,
history_interval = 60, 60,
frames_per_outfile = 1, 1,
restart = .false.,
restart_interval = 7200,
io_form_history = 2,
io_form_restart = 2,
io_form_input = 2,
io_form_boundary = 2,
debug_level = 0,

/

&domains
!time_step = 100,
time_step = 80,
time_step_fract_num = 0,
time_step_fract_den = 1,
max_dom = 2,
s_we = 1, 1,
e_we = 420, 982,
s_sn = 1, 1,
e_sn = 300, 646,
p_top_requested = 7200,
num_metgrid_levels = 34,
num_metgrid_soil_levels = 4,
use_surface = .true.,
sfcp_to_sfcp = .true.,
dx = 9000., 3000.,
dy = 9000., 3000.,
grid_id = 1, 2,
parent_id = 1, 1,
i_parent_start = 1, 46,
j_parent_start = 1, 39,
parent_grid_ratio = 1, 3,
parent_time_step_ratio = 1, 3,
feedback = 1,
smooth_option = 0,
/

&physics
mp_physics = 95, 95,
ra_lw_physics = 4, 4,
ra_sw_physics = 4, 4,
slope_rad = 1, 1,
topo_shading = 0, 1,
radt = 30, 30,
sf_urban_physics = 1, 1,
sf_sfclay_physics = 1, 1,
sf_surface_physics = 2, 2,
bl_pbl_physics = 1, 1,
bldt = 0, 0,
cu_physics = 3, 3,
cudt = 5, 5,
cugd_avedx = 3,
sst_update = 0,
isfflx = 1,
ifsnow = 0,
icloud = 1,
surface_input_source = 1,
num_soil_layers = 4,
maxiens = 1,
maxens = 3,
maxens2 = 3,
maxens3 = 16,
ensdim = 144,

/

&fdda
/

&dynamics
dyn_opt = 2,
rk_ord = 3,
w_damping = 1,
diff_opt = 1, 1,
km_opt = 4, 4,
damp_opt = 3,
base_temp = 290.,
zdamp = 5000., 5000.,
dampcoef = 0.2, 0.2,
khdif = 0, 0,
kvdif = 0, 0,
smdiv = 0.1, 0.1,
emdiv = 0.01, 0.01,
epssm = 0.1, 0.1,
non_hydrostatic = .true., .true.,
time_step_sound = 0, 0,
h_mom_adv_order = 5, 5,
v_mom_adv_order = 3, 3,
h_sca_adv_order = 3, 5,
v_sca_adv_order = 2, 3,
moist_adv_opt = 1, 1,
scalar_adv_opt = 1, 1,
chem_adv_opt = 1, 1,
tke_adv_opt = 1, 1,
diff_6th_opt = 1, 1,
diff_6th_factor = 0.12, 0.12,
/

&bdy_control
spec_bdy_width = 5,
spec_zone = 1,
relax_zone = 4,
specified = .true., .false.,
periodic_x = .false., .false.,
symmetric_xs = .false., .false.,
symmetric_xe = .false., .false.,
open_xs = .false., .false.,
open_xe = .false., .false.,
periodic_y = .false., .false.,
symmetric_ys = .false., .false.,
symmetric_ye = .false., .false.,
open_ys = .false., .false.,
open_ye = .false., .false.,
nested = .false., .true.,
/

&grib2
/

&namelist_quilt
nio_tasks_per_group = 0,
nio_groups = 1,
/
Loading