diff --git a/.vscode/settings.json b/.vscode/settings.json index cc5dbd19..d11501fd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -117,11 +117,14 @@ "SAST", "Segoe", "Sinebow", + "SMFLUX", "SOMISANA", "subdataset", "subdatasets", + "sustr", "swcrc", "Swipeable", + "swparam", "Terrestris", "tileserv", "timestep", diff --git a/models/algoa-bay-forecast/croco.Dockerfile b/models/algoa-bay-forecast/croco.Dockerfile index dd30f3d9..e50d5d96 100644 --- a/models/algoa-bay-forecast/croco.Dockerfile +++ b/models/algoa-bay-forecast/croco.Dockerfile @@ -1,8 +1,8 @@ FROM ubuntu:20.04 ARG DEBIAN_FRONTEND=noninteractive -ARG NP_ETA=2 -ARG NP_XI=2 +ARG NP_ETA=4 +ARG NP_XI=3 ENV NP_ETA=$NP_ETA ENV NP_XI=$NP_XI @@ -26,8 +26,8 @@ COPY croco/overwrites/ . # Configure param.h # TODO - next, refactor this to be at container run time (along with compilication) -RUN sed -e "s/\$NP_XI/3/g" -e "s/\$NP_ETA/4/g" _param.h > croco-1.1/param.h -RUN sed -e "s/\$NP_XI/3/g" -e "s/\$NP_ETA/4/g" _param.h > param.h +RUN sed -e "s/\$NP_XI/${NP_XI:-3}/g" -e "s/\$NP_ETA/${NP_ETA:-4}/g" _param.h > croco-1.1/param.h +RUN sed -e "s/\$NP_XI/${NP_XI:-3}/g" -e "s/\$NP_ETA/${NP_ETA:-4}/g" _param.h > param.h RUN rm _param.h RUN rm croco-1.1/_param.h diff --git a/models/algoa-bay-forecast/croco/run-model/run_croco.bash b/models/algoa-bay-forecast/croco/run-model/run_croco.bash index 3193d35b..70e23ae6 100755 --- a/models/algoa-bay-forecast/croco/run-model/run_croco.bash +++ b/models/algoa-bay-forecast/croco/run-model/run_croco.bash @@ -12,7 +12,7 @@ NH_AVG=1 # The temporal average of the output file in hours edited to save ever NH_AVGSURF=1 # The temporal average of the output file (only surface variables) in hours NDAYS=$((HDAYS + FDAYS)) INDIR=$(pwd) # where the croco_frcst.in file is stored, in the current setup it is in the same directory -MPI_NUM_PROCS=$(( ${NP_ETA:-2} * ${NP_XI:-2} )) +MPI_NUM_PROCS=$(( ${NP_ETA:-4} * ${NP_XI:-3} )) EXEDIR=$(pwd) INPUTDIR=$RUNDIR/croco/forcing SCRATCHDIR=$RUNDIR/croco/scratch diff --git a/models/false-bay-forecast/croco.Dockerfile b/models/false-bay-forecast/croco.Dockerfile index df823c44..00e072f5 100644 --- a/models/false-bay-forecast/croco.Dockerfile +++ b/models/false-bay-forecast/croco.Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:20.04 ARG DEBIAN_FRONTEND=noninteractive -ARG NP_ETA=2 +ARG NP_ETA=4 ARG NP_XI=2 ENV NP_ETA=$NP_ETA @@ -24,6 +24,13 @@ COPY croco/1.1/ croco-1.1/ COPY croco/overwrites/ croco-1.1/ COPY croco/overwrites/ . +# Configure param.h +# TODO - next, refactor this to be at container run time (along with compilication) +RUN sed -e "s/\$NP_XI/${NP_XI:-2}/g" -e "s/\$NP_ETA/${NP_ETA:-4}/g" _param.h > croco-1.1/param.h +RUN sed -e "s/\$NP_XI/${NP_XI:-2}/g" -e "s/\$NP_ETA/${NP_ETA:-4}/g" _param.h > param.h +RUN rm _param.h +RUN rm croco-1.1/_param.h + # Create the entrypoint to run the compiled model COPY croco/run-model/ . diff --git a/models/false-bay-forecast/croco/overwrites/param.h b/models/false-bay-forecast/croco/overwrites/_param.h similarity index 99% rename from models/false-bay-forecast/croco/overwrites/param.h rename to models/false-bay-forecast/croco/overwrites/_param.h index 1ebbb462..d32a3031 100755 --- a/models/false-bay-forecast/croco/overwrites/param.h +++ b/models/false-bay-forecast/croco/overwrites/_param.h @@ -228,7 +228,7 @@ integer NSUB_X, NSUB_E, NPP #ifdef MPI integer NP_XI, NP_ETA, NNODES - parameter (NP_XI=2, NP_ETA=4, NNODES=NP_XI*NP_ETA) + parameter (NP_XI=$NP_XI, NP_ETA=$NP_ETA, NNODES=NP_XI*NP_ETA) parameter (NPP=1) parameter (NSUB_X=1, NSUB_E=1) #elif defined OPENMP diff --git a/models/false-bay-forecast/croco/run-model/run_croco.bash b/models/false-bay-forecast/croco/run-model/run_croco.bash index 65caded2..35370b7c 100755 --- a/models/false-bay-forecast/croco/run-model/run_croco.bash +++ b/models/false-bay-forecast/croco/run-model/run_croco.bash @@ -12,7 +12,7 @@ NH_AVG=1 # The temporal average of the output file in hours edited to save every NH_AVGSURF=1 # The temporal average of the output file (only surface variables) in hours NDAYS=$((HDAYS + FDAYS)) INDIR=$(pwd) # where the croco_frcst.in file is stored, in the current setup it is in the same directory -MPI_NUM_PROCS=$(( ${NP_ETA:-2} * ${NP_XI:-2} )) +MPI_NUM_PROCS=$(( ${NP_ETA:-4} * ${NP_XI:-2} )) EXEDIR=$(pwd) INPUTDIR=$RUNDIR/croco/forcing AGRIF_FILE=$INDIR/AGRIF_FixedGrids.in #The nested run needs the AGRIF.in file