Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
4ee4451
Update README.md with zenodo link
jprestop Aug 9, 2024
588bce2
First set of CP method code additions (does not include TVC).
domingom Dec 10, 2024
6699f1e
Merge pull request #7 from domingom/cpmethod
jsauer-NCAR Dec 11, 2024
9a4fc9e
python coupling tools (1/3): GeoSpec
domingom Feb 14, 2025
3b870c2
Merge pull request #8 from domingom/wrf_coupling_python
jsauer-NCAR Feb 14, 2025
d8984cb
python coupling tools (1/3): make lat/lon double precision. Include N…
domingom Feb 14, 2025
62eb8b2
Adding a print with file path and making landcover an integer field.
domingom Feb 15, 2025
d7f856d
python coupling tools (2/3): SimGrid
domingom Feb 15, 2025
bb4e7de
Fix to the determination of x_s,y_s and removal of some commented lin…
domingom Feb 18, 2025
bfbec79
Add definition of xIndex,yIndex,zIndex to SimGrid output.
domingom Feb 26, 2025
72b969f
python coupling tools (3/3): GenICBCs
domingom Feb 26, 2025
4f143e0
Use higher order interpolation for surface NWP and linear for 3d fields.
domingom Mar 5, 2025
d6bf822
Merge pull request #9 from domingom/wrf_coupling_python
jsauer-NCAR Mar 18, 2025
4f05c93
Small change to the title units of a plot
domingom Mar 19, 2025
77cef47
Implemented capability of non-unity valued dx/d_zeta and dy/d_zeta me…
jsauer-NCAR Mar 25, 2025
7e72ef4
Implemented the use of dx/d_zeta and dy/d_zeta metric tensor terms in…
jsauer-NCAR Mar 25, 2025
1b48916
Implemented dx/d_zeta and dy/d_zeta for terrain following coordinate …
jsauer-NCAR Mar 25, 2025
27cd876
Implemented dx/d_zeta and dy/d_zeta metric tensor terms allowing terr…
jsauer-NCAR Mar 25, 2025
40025d8
Fix sign on J32 element in (unused, only for sanity check) device-sid…
jsauer-NCAR Mar 26, 2025
1b0bd0d
Merge pull request #10 from domingom/bugfix_terrain_following
domingom Mar 26, 2025
08b4cc4
Implemented hydroBCs==1 option for LAD lateral, ceiling and surface B…
jsauer-NCAR Mar 26, 2025
1a49909
Merge branch 'develop', remote-tracking branch 'origin' into feature/…
jsauer-NCAR Mar 26, 2025
d06ac68
Round of corrections for terrain-following terms (recently added) and…
jsauer-NCAR Mar 26, 2025
1efdab4
Merge pull request #11 from domingom/feature/fe_coupling
jsauer-NCAR Mar 28, 2025
991ddc5
Implemented output of a float value for time in netCDF or binary outp…
jsauer-NCAR Mar 28, 2025
93693af
Merge pull request #12 from domingom/feature/time_variable_in_output_…
jsauer-NCAR Mar 28, 2025
0372831
Implemented TVCP capability to go with hydroBCs==1 and existing CP su…
jsauer-NCAR Mar 31, 2025
62f7c01
Merge pull request #13 from domingom/feature/TVCP
domingom Mar 31, 2025
39ce90c
Modifications to GenICBCs.py to handle second increments.
domingom Apr 1, 2025
948407f
Removal of wrfRef file and a small fix to the input GIS file name in …
domingom Apr 1, 2025
dbad12a
Last additions to bring vertical ABL BCs under hydroBCs=1 in line wit…
jsauer-NCAR Apr 1, 2025
37be1d9
Merge pull request #15 from domingom/feature/final_coupling_BC_adjust…
domingom Apr 1, 2025
b992136
Correction on the default value of the ceilingAdvectionBC parameter t…
jsauer-NCAR Apr 5, 2025
229e3b8
Add missing free on cleanup of J13 and J23 arrays at host-level, add …
jsauer-NCAR Apr 5, 2025
ccdfaca
Added a memset call to ensure the fempi_DataBuffer used for scatterin…
jsauer-NCAR Apr 5, 2025
6d2a903
Removed the UnitTest component of all routine names that formerly con…
jsauer-NCAR Apr 5, 2025
d22bc99
Remove two object files inadvertently added to the repository in the …
jsauer-NCAR Apr 5, 2025
a589ee7
Change input GIS name of terrain from topoPos to elevation
domingom Apr 8, 2025
bda2ebc
Add sea mask plot to GeoSpec
domingom Apr 8, 2025
d67a48e
Adjust simgrid plot naeme
domingom Apr 8, 2025
feedd00
Remove if True/Fasle statements and some comments
domingom Apr 8, 2025
ad89ad7
Merge pull request #16 from domingom/wrf_coupling_python
jsauer-NCAR Apr 8, 2025
661d6a0
Fixes to surface layer (zol limits, stability functions for stable co…
domingom Apr 9, 2025
6630f45
Feature 100 main v4.0 update doc (#114)
jprestop Nov 17, 2025
269ec1d
Nov 2025 v4.0.1 patch (#115)
jsauer-NCAR Nov 18, 2025
df361c4
Feature 116 v4.0.1 (#117)
jprestop Nov 18, 2025
5dbe85f
Updating Downloads page with 4.0.1 release information
jprestop Nov 18, 2025
d9de150
Merge branch 'main_v4.0' of github.com:NCAR/FastEddy-model into main_…
jprestop Nov 18, 2025
67f19f9
Resolved conflicts
domingom Nov 20, 2025
d109c81
Resolved conflicts 2
domingom Nov 20, 2025
da7ad02
Reduce the order of advection as approaching the surface.
domingom Dec 1, 2025
20363a1
Adding information for surflayerSelector == 3
jprestop Dec 19, 2025
d03777e
Merge pull request #17 from domingom/feature_vertadv_lowbdy
domingom Jan 7, 2026
981f84e
Added missing cudaMemcpyToSymbol for urban_heatRedis paramter to acti…
domingom Jan 7, 2026
663b8bb
Small adjustment to ensure the device parameter is always consistent …
domingom Jan 7, 2026
4553128
Merge pull request #18 from domingom/feature_heatRedis
jsauer-NCAR Jan 7, 2026
f69301e
Added if (surflayerSelector == 1) around queryFloatParameter for surf…
jprestop Jan 9, 2026
ce5a1c1
Removed atmosphere_boundary_layer_thickness as a standard name for In…
jprestop Jan 9, 2026
eb60ffe
Corrected the units for qflux
jprestop Jan 9, 2026
d7d586c
Corrected the units for qskin
jprestop Jan 9, 2026
45cfa87
Merge pull request #19 from domingom/bugfix_develop_various
jprestop Feb 9, 2026
23510c1
Fix to memory allocation for random number array in CP method at devi…
domingom Mar 2, 2026
d18d8eb
Revert "Fix to memory allocation for random number array in CP method…
domingom Mar 4, 2026
009ccda
Revert "Fix to memory allocation for random number array in CP method…
domingom Mar 4, 2026
5593d43
Incorporate fe2fe coupling option for real cases
domingom Mar 4, 2026
fc55a60
Ensuring that cellpert_ktop is large enough with cellpert_tvcp == 1 t…
domingom Mar 4, 2026
2e8417e
Incorporate fe2fe coupling option for ideal cases
domingom Mar 4, 2026
25df3e4
Adding lat and lon 2d arrays and using latitude at each i,j index for…
domingom Mar 5, 2026
340ab69
Passed longitude down to device
domingom Mar 7, 2026
83c9643
Merge pull request #20 from domingom/feature/latlon
domingom Mar 7, 2026
8d8fcac
Use Nz instead of cellpert_ktop as vertical length to allocate the ar…
domingom Mar 7, 2026
a2281ac
Merge remote-tracking branch 'refs/remotes/origin/develop' into develop
domingom Mar 7, 2026
130dcd8
Add scripts to couple mpassit output with FE
willmayfield Mar 9, 2026
c74f0d8
Updates to incorporate nesting of TKE and some small fixes
domingom Mar 9, 2026
8ac6ac9
Use TKE_0 for boundary conditions in LAD runs
domingom Mar 11, 2026
b59f712
Merge pull request #21 from domingom/feature/nesting_tke
jsauer-NCAR Mar 12, 2026
3923992
Clipping of TKE_0 to minimum value of fe_low_tke
domingom Mar 12, 2026
80aeb29
Performance improvements for FE2FE coupling, and WRF2FE coupling.
jsauer-NCAR Mar 16, 2026
b5e6293
One commented out print line for debugging if needed.
jsauer-NCAR Mar 16, 2026
e664b80
Ensure moisture and hydrometeors are not negative
domingom Mar 18, 2026
0ee1bc5
Eloisa's modifications to SimGrid for heat redistribution option
domingom Mar 18, 2026
e21d947
Update SHFR couplingUtils.py
raluy Mar 20, 2026
f8fb6d4
Update SHFR
raluy Mar 20, 2026
d09dd26
Update SHFR
raluy Mar 20, 2026
28ad757
Merge pull request #22 from raluy/shfr-updated
domingom Mar 20, 2026
909e171
Added json configuration for mpassit conversion script and renamed re…
willmayfield Mar 24, 2026
390ecd3
rename parameters in mpassit run batch script
willmayfield Mar 24, 2026
84e7509
Draft of Addendum about using MPAS forecasts as input to GenICBCs
willmayfield Mar 24, 2026
3c58b9f
Update typos in WRF_coupling_case0.rst
willmayfield Mar 24, 2026
ed656d4
Renaming nlcd_name to a more generic landcover_table name
domingom Mar 27, 2026
8b522ad
Merge branch 'feature/icbcs_fe2fe' of github.com:domingom/FastEddy-mo…
domingom Mar 27, 2026
fcb7489
Bugfix from Gong and Zhou resolving illegal memory access
jprestop Mar 30, 2026
717f035
Revert "Bugfix from Gong and Zhou resolving illegal memory access"
jprestop Mar 30, 2026
a889160
Bugfix resolving illegal memory access
jprestop Mar 30, 2026
81fe024
Merge remote-tracking branch 'upstream/develop' into mpassit_scripts
willmayfield Apr 2, 2026
63f6070
merging with domingom/develop
willmayfield Apr 2, 2026
22720a8
Merge remote-tracking branch 'origin/mpassit_scripts' into HEAD
willmayfield Apr 2, 2026
a5c9756
Changing forecast length to match files that will go into Zenodo record
willmayfield Apr 3, 2026
b7ea38d
stabilityScheme options reconcilication
domingom Apr 6, 2026
7ac05b8
Update WRF_coupling_case0.rst to revert changes to documentation
willmayfield Apr 8, 2026
a58d6d4
Merge pull request #24 from willmayfield/mpas_coupling
domingom Apr 8, 2026
8c7c753
Fix to corner case in determining vertical grid index when turbine hu…
domingom Apr 13, 2026
9394e6b
Merge pull request #23 from domingom/feature/stabilityScheme
domingom Apr 13, 2026
627613d
Merge branch 'develop' of github.com:domingom/FastEddy-model into gad…
domingom Apr 13, 2026
372f43d
Block-averaged topography
raluy Apr 14, 2026
5340a58
Block-averaged topography
raluy Apr 14, 2026
95814da
Block-averaged topography
raluy Apr 14, 2026
d25c259
Block-averaged topography
raluy Apr 15, 2026
c017bda
Block-averaged topography
raluy Apr 15, 2026
2a1099f
Block-averaged topography
raluy Apr 15, 2026
ee9fd2f
Merge pull request #25 from raluy/feature/icbcs_fe2fe
domingom Apr 15, 2026
66f7dc6
adding some comments to genicbcs.json to have the two sections of par…
domingom Apr 17, 2026
503ed13
Fix to the determination of kMaxPrnt to only consider the portion of …
domingom May 1, 2026
430fd5a
Merge pull request #26 from domingom/gad_fix
domingom May 5, 2026
6b41052
Merge branch 'develop' into feature/icbcs_fe2fe
domingom May 5, 2026
3ba7162
Merge pull request #27 from domingom/feature/icbcs_fe2fe
domingom May 5, 2026
bc0f3dc
advance target arch to be sm_80 assuming a100 GPUs, remove secondary …
jsauer-NCAR May 5, 2026
afc5d6a
Add new routine to count the 2d and 3d arrays in the registry list.
jsauer-NCAR May 5, 2026
92a9ea5
IO module additions to implement virtual towers.
jsauer-NCAR May 5, 2026
fd8736f
GRID module additions towards introducing virtual towers.
jsauer-NCAR May 5, 2026
1adfb7f
TIME module additions towards introducing virtual towers.
jsauer-NCAR May 5, 2026
0d0ab85
HYDRO_CORE module host/device level additions towards introducing vir…
jsauer-NCAR May 5, 2026
7911a15
Added virtual tower initial/static conditions file craetion.
jsauer-NCAR May 5, 2026
50b9a9f
fixes an incorrect element index in the tower initial write routine.
jsauer-NCAR May 6, 2026
98fae1b
Fix hydroSubGridWrite dependence for Taus and add moist Taus.
jsauer-NCAR May 6, 2026
8a2620c
Assign profIDs internally, no longer accept as inputs from towerSpecF…
jsauer-NCAR May 7, 2026
abca700
Moves lat and lon arrays at host and deevice level out of HYDRO_CORE …
jsauer-NCAR May 8, 2026
ccbbe28
Changes coordTypes array to a single int scalar value, coordType asso…
jsauer-NCAR May 8, 2026
71c6ccd
Introduces the ability for virtual towers to be specified in lat/lon …
jsauer-NCAR May 9, 2026
1af9496
Added a new post-processing python script and associated example json…
jsauer-NCAR May 11, 2026
4ee54c8
Merge pull request #28 from domingom/feature/virtual_towers
domingom May 11, 2026
ddb97c3
Merge branch 'develop' of github.com:NCAR/FastEddy-model into develop
domingom May 12, 2026
55012d6
Fixes typo bug and adds proper logic to have prevented the issue in t…
jsauer-NCAR May 14, 2026
b9c8d01
Generic placeholder name for simgrid.json name_dom entry
domingom May 16, 2026
8fe3124
Added declaration of the ioBuffFieldInt to the io.h header file for c…
jsauer-NCAR May 18, 2026
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 SRC/EXTENSIONS/GAD/CUDA/cuda_GADDevice.cu
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ extern "C" int cuda_GADDeviceCleanup(){
cudaFree(GAD_turbineVseries_d);
cudaFree(u_sampAvg_d);
cudaFree(v_sampAvg_d);
cudaFree(GAD_yawError);
cudaFree(GAD_yawError_d);
cudaFree(GAD_anFactor_d);
cudaFree(GAD_Xcoords_d);
cudaFree(GAD_Ycoords_d);
Expand Down
34 changes: 22 additions & 12 deletions SRC/EXTENSIONS/GAD/GAD.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,11 +665,12 @@ int GADConstructor(){
int GADInitTurbineRefChars(float dt){
int errorCode = GAD_SUCCESS;
int iturb,i,j,k;
int ijk;
int ijk,ijkp1,ijkm1;
int ij;
float rVec;
float rVec0;
float deltaz, deltaz0;
float deltaz_p1, deltaz_m1;

/*Initialize requisite parameters for the RefMag and RefDir calculations*/
GADsamplingAvgLength = (int) floor(GADrefSampleWindow/dt); //Determine the number of model timesteps in a sample window (high frequencies filter)
Expand Down Expand Up @@ -702,30 +703,39 @@ int GADInitTurbineRefChars(float dt){
}//end if inFile == NULL
for(i=iMin-Nh; i < iMax+Nh; i++){
for(j=jMin-Nh; j < jMax+Nh; j++){
for(k=kMin-Nh; k < kMax+Nh; k++){
for(k=kMin-Nh+1; k < kMax+Nh-1; k++){
ijk = i*(Nyp+2*Nh)*(Nzp+2*Nh)+j*(Nzp+2*Nh)+k;
ij = i*(Nyp+2*Nh)+j;
ijkp1 = i*(Nyp+2*Nh)*(Nzp+2*Nh)+j*(Nzp+2*Nh)+(k+1);
ijkm1 = i*(Nyp+2*Nh)*(Nzp+2*Nh)+j*(Nzp+2*Nh)+(k-1);
rVec = sqrt( pow((GAD_Xcoords[iturb]-xPos[ijk]),2.0)
+pow((GAD_Ycoords[iturb]-yPos[ijk]),2.0));
if(rVec <= sqrt(pow(dX,2.0)+pow(dY,2.0))){ //Should be a candiate gridcell for (nacelle center) reference location
if(rVec <= rVec0){
if(rVec < rVec0){
if((rVec <= sqrt(pow(dX,2.0)+pow(dY,2.0))) && (rVec <= rVec0)){ //Should be a candiate gridcell for (nacelle center) reference location
if(rVec < rVec0){
printf("%d/%d: iturb = %d, rVec = %.9f, rVec0 = %.9f\n",
mpi_rank_world,mpi_size_world, iturb, rVec, rVec0);
rVec0 = rVec;
GAD_turbineRank[iturb] = mpi_rank_world;
GAD_turbineRefi[iturb] = i;
GAD_turbineRefj[iturb] = j;
}
deltaz = sqrt(pow((GAD_hubHeights[GAD_turbineType[iturb]]-(zPos[ijk]-topoPos[ij])),2.0));
}
if ((GAD_turbineRank[iturb]==mpi_rank_world) && (GAD_turbineRefi[iturb]==i) && (GAD_turbineRefj[iturb]==j)){
deltaz = fabsf(GAD_hubHeights[GAD_turbineType[iturb]]-(zPos[ijk]-topoPos[ij]));
deltaz_p1 = GAD_hubHeights[GAD_turbineType[iturb]]-(zPos[ijkp1]-topoPos[ij]);
deltaz_m1 = GAD_hubHeights[GAD_turbineType[iturb]]-(zPos[ijkm1]-topoPos[ij]);
#ifdef DEBUG_TURBCHAR
printf("%d/%d: deltaz = %f, 0.5/(J33[ijk]*dZi)) = %f\n",
mpi_rank_world,mpi_size_world, deltaz, 0.5/(J33[ijk]*dZi));
printf("%d/%d: iturb = %d, deltaz = %.9f, deltaz0 = %.9f, deltaz_m1 = %.9f, deltaz_p1 = %.9f\n",
mpi_rank_world,mpi_size_world, iturb, deltaz, deltaz0, deltaz_m1, deltaz_p1);
#endif
if(deltaz <= 0.5/(J33[ijk]*dZi)){ // 1/(J33[ijk]*dZi)) = dz of cell
if((deltaz_m1 > 0.0) && (deltaz_p1 < 0.0) && (deltaz < deltaz0)){
deltaz0 = deltaz;
GAD_turbineRefk[iturb] = k;
#ifdef DEBUG_TURBCHAR
printf("%d/%d: iturb = %d, k = %d, j=%d, i=%d, deltaz = %.9f, deltaz0 = %.9f\n", mpi_rank_world,mpi_size_world, iturb, k, j, i, deltaz, deltaz0);
#endif
}//end if vertical delta < dz ...
}//end if rVec < rVec0...
}//end if rVec...
}// end if GAD_turbine...
}//end if rVec<=...
} //end for(k...
} // end for(j...
} // end for(i...
Expand Down
3 changes: 2 additions & 1 deletion SRC/EXTENSIONS/URBAN/CUDA/cuda_urbanDevice.cu
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ extern "C" int cuda_urbanDeviceSetup(){

cudaMemcpyToSymbol(delta_aware_bdg_d, &delta_aware_bdg, sizeof(float));

cudaMemcpyToSymbol(urban_heatRedis_d, &urban_heatRedis, sizeof(int));
if(urban_heatRedis > 0){
Nelems = (Nxp+2*Nh)*(Nyp+2*Nh);
fecuda_DeviceMalloc(Nelems, &urban_heat_redis_d);
Expand Down Expand Up @@ -157,7 +158,7 @@ __global__ void cudaDevice_URBANfinal(float* hydroFlds_d, float* hydroFldsFrhs_d
ijk = i*iStride + j*jStride + k*kStride;

cudaDevice_UrbanDragMethod(&hydroFlds_d[fldStride*RHO_INDX+ijk],&hydroFlds_d[fldStride*U_INDX+ijk],&hydroFlds_d[fldStride*V_INDX+ijk],&hydroFlds_d[fldStride*W_INDX+ijk],
&hydroFlds_d[fldStride*THETA_INDX+ijk],&hydroBaseStateFlds_d[fldStride*THETA_INDX+ijk],&hydroBaseStateFlds_d[fldStride*RHO_INDX+ijk],
&hydroFlds_d[fldStride*THETA_INDX+ijk],&hydroBaseStateFlds_d[fldStride*THETA_INDX_BS+ijk],&hydroBaseStateFlds_d[fldStride*RHO_INDX_BS+ijk],
&hydroFldsFrhs_d[fldStride*U_INDX+ijk],&hydroFldsFrhs_d[fldStride*V_INDX+ijk],&hydroFldsFrhs_d[fldStride*W_INDX+ijk],
&hydroFldsFrhs_d[fldStride*THETA_INDX+ijk],&hydroFldsFrhs_d[fldStride*RHO_INDX+ijk],&building_mask_d[ijk]);
if(NhydroAuxScalars_d > 0){
Expand Down
114 changes: 105 additions & 9 deletions SRC/FEMAIN/FastEddy.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,12 @@ int main(int argc, char **argv){
/* Parse the command line arguments */
if(argc != 2){
printf("usage: %s paramFile \n",argv[0]);
fflush(stdout);
exit(0);
}else{
sscanf(argv[1],"%s", paramFile);
printf("Obtaining parameters from %s\n", paramFile);
fflush(stdout);
}
fflush(stdout);
} //end if(mpi_rank == 0 )

/*** ---------------------------------------------------------------------------------------------- ***/
Expand Down Expand Up @@ -260,6 +259,56 @@ int main(int argc, char **argv){
errorCode = hydro_corePrepareFromInitialConditions(simTime_itRestart, dt);
}//end if inFile !=NULL


/*** ---------------------------------------------------------------------------------------------- ***/
/*** ----------------- Initialize/configure any specified Profile/Planes IO functionality ----------***/
/*** ---------------------------------------------------------------------------------------------- ***/
if(towerIOSelector > 0){
int iprofile;
int tmp_rank;
errorCode = ioProfilePreparations();
for(iprofile = 0; iprofile < nProfs; iprofile++){
if(towerProfiles.coordType == 0){
tmp_rank = gridGetRankFromLatLonPosition(towerProfiles.coordsLon[iprofile],towerProfiles.coordsLat[iprofile]);
if(tmp_rank >= 0){
towerProfiles.mpi_ranks[iprofile] = tmp_rank;
printf("Rank %d/%d: profile ID = %d at position (lat,lon) = (%f,%f), found in mpi_rank = %d subdomain!\n",
mpi_rank_world, mpi_size_world, towerProfiles.profIDs[iprofile],towerProfiles.coordsLat[iprofile],towerProfiles.coordsLon[iprofile],
towerProfiles.mpi_ranks[iprofile]);
}else{
printf("Rank %d/%d: profile ID = %d at position (lat,lon) = (%f,%f), not in simulation domain!\n",
mpi_rank_world, mpi_size_world, towerProfiles.profIDs[iprofile],towerProfiles.coordsLat[iprofile],towerProfiles.coordsLon[iprofile]);
}
}else{
tmp_rank = gridGetRankFromXYPosition(towerProfiles.coordsWE[iprofile],towerProfiles.coordsSN[iprofile]);
if(tmp_rank >= 0){
towerProfiles.mpi_ranks[iprofile] = tmp_rank;
printf("Rank %d/%d: profile ID = %d at position (x,y) = (%f,%f), found in mpi_rank = %d subdomain!\n",
mpi_rank_world, mpi_size_world, towerProfiles.profIDs[iprofile],towerProfiles.coordsWE[iprofile],towerProfiles.coordsSN[iprofile],
towerProfiles.mpi_ranks[iprofile]);
}else{
printf("Rank %d/%d: profile ID = %d at position (x,y) = (%f,%f), not in simulation domain!\n",
mpi_rank_world, mpi_size_world, towerProfiles.profIDs[iprofile],towerProfiles.coordsWE[iprofile],towerProfiles.coordsSN[iprofile]);
}
}
}
fflush(stdout);
errorCode = hydro_coreAllocateTowersDataStructure(nProfs, towerProfiles, NtBatch);
MPI_Barrier(MPI_COMM_WORLD);

//Write Towers static/initial conditions files
ioWriteBinaryTowerInitialFile(dt, simTime_itRestart, Nxp, Nyp, Nzp, Nh,
towersData, towersSurfData,
towerIDs, rank_nTowers, tower_iInds, tower_jInds,
towerProfiles.coordType, tower_xOffsets, tower_yOffsets, tower_LonOffsets, tower_LatOffsets,
NtBatch, towerInstanceSize, towerSurfInstanceSize,
zPos, yPos, xPos, topoPos, surflayer_offshore, sea_mask);
}// endif towerIOSelector > 0
MPI_Barrier(MPI_COMM_WORLD);
printf("Rank %d/%d: Profile preparations complete!\n",mpi_rank_world, mpi_size_world);
fflush(stdout);
MPI_Barrier(MPI_COMM_WORLD);

/*** ---------------------------------------------------------------------------------------------- ***/
/*** ----------------- Initialize the CUDA-layer of each model-component module --------------------***/
/*** ---------------------------------------------------------------------------------------------- ***/
Expand Down Expand Up @@ -299,8 +348,8 @@ int main(int argc, char **argv){

#endif /* ifndef NOTCUDA: THIS SECTION PREPARED FOR CUDA FASTEDDY SIMULATION */

fflush(stdout);
MPI_Barrier(MPI_COMM_WORLD);

/*** ---------------------------------------------------------------------------------------------- ***/
/*** ------- Final pre-check logging and initialization before entering the main time-loop ---------***/
/*** ---------------------------------------------------------------------------------------------- ***/
Expand Down Expand Up @@ -359,7 +408,7 @@ int main(int argc, char **argv){
/*If appropriate timing to do so, update the nesting boundary conditions*/
if(hydroBCs == 1){
if((it%((int)roundf(dtBdyPlaneBCs/dt))==0)&&(it > simTime_itRestart)){ //If due for an update and after the simulation start
printf("FastEddy MAin timestepping loop: Reading new BdyPlanes at it=%d...\n",it);
printf("FastEddy Main timestepping loop: Reading new BdyPlanes at it=%d...\n",it);
fflush(stdout);
errorCode = timeIntBdyPlaneUpdates();
if((cellpertSelector==1)&&(cellpert_tvcp==1)){ // update CP parameters with dynamic LBCs
Expand All @@ -368,7 +417,9 @@ int main(int argc, char **argv){
}//end if hydroBCs == 1
}
MPI_Barrier(MPI_COMM_WORLD);
fflush(stdout);

mpi_t3 = MPI_Wtime(); //Mark the walltime to measure IO/logging duration.
if(it%frqOutput == 0){
MPI_Barrier(MPI_COMM_WORLD);
if(mpi_rank_world == 0){
Expand All @@ -378,6 +429,7 @@ int main(int argc, char **argv){
} //if mpi_rank_world

MPI_Barrier(MPI_COMM_WORLD);
fflush(stdout);

/*Every rank calls the StateLogDump*/
hydro_coreStateLogDump();
Expand All @@ -389,7 +441,6 @@ int main(int argc, char **argv){
fflush(stdout);
} //if mpi_rank_world

mpi_t3 = MPI_Wtime(); //Mark the walltime to measure IO duration.
/* Dump the root output file. */
#ifndef IO_OFF
if(ioOutputMode==0){
Expand All @@ -405,13 +456,22 @@ int main(int argc, char **argv){
errorCode = ioWriteBinaryoutFileSingleTime(it, Nxp, Nyp, Nzp, Nh);
#endif
}
#endif
mpi_t4 = MPI_Wtime(); //Mark the walltime to measure IO duration
#endif
if(mpi_rank_world == 0){
printf("Dumped state at timestep = %d...\n",it);
fflush(stdout);
} //if mpi_rank_world
} //end if (it%frqOutput == 0) .... (We log summary info and dump outputs)
//Dump tower data if appropriate
if((towerIOSelector > 0) && (it > simTime_itRestart)){
ioWriteBinaryTowerFileSingleBatch(it, NtBatch, Nz, simTimeBatch, towersData, towersSurfData,
towerIDs, rank_nTowers, towerInstanceSize, towerSurfInstanceSize);
if(mpi_rank_world == 0){
printf("Dumped batch tower data at timestep = %d...\n",it);
fflush(stdout);
} //if mpi_rank_world
}
mpi_t4 = MPI_Wtime(); //Mark the walltime to measure IO/logging duration
#ifdef NOTCUDA
/* OBSELETE!!!!! There is longer any CPU model integration functionality */
#else /* --------------- CUDA FASTEDDY !!!!! ------------------------- */
Expand All @@ -429,7 +489,7 @@ int main(int argc, char **argv){
/*Kernel return*/
itTmp = itTmp+NtBatch;
#endif
mpi_t2 = MPI_Wtime(); //Mark the walltime to measure duration of a batch of timesteps.
mpi_t2 = MPI_Wtime(); //Mark the walltime to measure duration of a batch of timesteps (including any IO/logging).
if(mpi_rank_world == 0){
printf("\n\t\t\t!!!!!\t TIMESTEP PERFORMANCE \t !!!!! \n");
printf(" Total Time (s) | Batch Steps \t| Time/step (s) | Comp./step (s) | IO Time (s)\n");
Expand Down Expand Up @@ -460,6 +520,37 @@ int main(int argc, char **argv){
hydro_coreStateLogDump();
MPI_Barrier(MPI_COMM_WORLD);

MPI_Barrier(MPI_COMM_WORLD);
if(mpi_rank_world == 0){
printf("\n_____________________#######_________ TOWER-SUMMARY @ it = %d _________#######____________________ \n", it);
fflush(stdout);
} //if mpi_rank_world
MPI_Barrier(MPI_COMM_WORLD);
#ifdef DEBUG_TOWER
for(int mrank=0; mrank < mpi_size_world; mrank++){
MPI_Barrier(MPI_COMM_WORLD);
if(mrank == mpi_rank_world){
for(int towerCount = 0; towerCount < rank_nTowers; towerCount++){
printf("========================================= TOWER-ID %d =========================================== \n", towerIDs[towerCount]);
for(int k=0; k < Nz; k++){
printf("%d: ",k);
for(int towfld=0; towfld < 15; towfld++){
printf("%f, ",towersData[(NtBatch)*towerCount*towerInstanceSize + (NtBatch-1)*towerInstanceSize+towfld*Nz+k]);
}
printf("\n");
}
printf("************ surface values ****************\n");
for(int surfld=0; surfld < 6; surfld++){
printf("%f, ",towersSurfData[(NtBatch)*towerCount*towerSurfInstanceSize + (NtBatch-1)*towerSurfInstanceSize+surfld]);
}
printf("\n");
}
fflush(stdout);
}
MPI_Barrier(MPI_COMM_WORLD);
}//end for mrank
MPI_Barrier(MPI_COMM_WORLD);
#endif
if(mpi_rank_world == 0){
printf("Dumping state at timestep = %d...\n",it);
fflush(stdout);
Expand All @@ -481,6 +572,11 @@ int main(int argc, char **argv){
#endif
}
#endif
MPI_Barrier(MPI_COMM_WORLD);
//Dump tower data if appropriate
if(towerIOSelector > 0){
ioWriteBinaryTowerFileSingleBatch(it, NtBatch, Nz, simTimeBatch, towersData, towersSurfData, towerIDs, rank_nTowers, towerInstanceSize, towerSurfInstanceSize);
}
MPI_Barrier(MPI_COMM_WORLD);
mpi_t4 = MPI_Wtime(); //Mark the walltime to measure IO duration
mpi_t2 = MPI_Wtime(); //Mark the walltime to measure final timestep summary and performance.
Expand All @@ -492,7 +588,6 @@ int main(int argc, char **argv){
printf(" %8.4f \t| %8d \t| %8.4f \t| %8.4f \t | %9.6f \n", (mpi_t2-mpi_t1), 0,
(mpi_t2-mpi_t1)/NtBatch, (mpi_t2-mpi_t1-(mpi_t4-mpi_t3))/NtBatch, (mpi_t4-mpi_t3));
printf("\n********************************************************************************************************\n");
fflush(stdout);
printf("Your FastEddy simulation is complete!\n");
printf("Cleaning up...\n");
fflush(stdout);
Expand Down Expand Up @@ -532,6 +627,7 @@ int main(int argc, char **argv){
/* Finalize the FEMPI environment */
if(mpi_rank_world == 0){
printf("Shutting down MPI...\n Goodbye!\n");
fflush(stdout);
} //if mpi_rank_world == 0
MPI_Barrier(MPI_COMM_WORLD);
errorCode = fempi_FinalizeMPI();
Expand Down
5 changes: 3 additions & 2 deletions SRC/FEMAIN/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ DEBUG_CFLAGS = -g
DEFINES = -DCUB_IGNORE_DEPRECATED_CPP_DIALECT -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT

TEST_CFLAGS = -Wall -m64 ${DEFINES} ${INCLUDES} ${OTHER_INCLUDES}
ARCH_CU_FLAGS = -arch=sm_70
ARCH_CU_FLAGS = -arch=sm_80
TEST_CU_CFLAGS = ${ARCH_CU_FLAGS} -m64 -std=c++11 ${DEFINES} ${INCLUDES} ${OTHER_INCLUDES}

L_CPPFLAGS =
Expand Down Expand Up @@ -189,7 +189,8 @@ all: FastEddy
../HYDRO_CORE/CUDA/cuda_largeScaleForcingsDevice.cu \
../HYDRO_CORE/CUDA/cuda_moistureDevice.cu \
../HYDRO_CORE/CUDA/cuda_filtersDevice.cu \
../HYDRO_CORE/CUDA/cuda_cellpertDevice.cu
../HYDRO_CORE/CUDA/cuda_cellpertDevice.cu \
../HYDRO_CORE/CUDA/cuda_towersDevice.cu
$(TEST_CU_CC) $(TEST_CU_CFLAGS) -dc $< -o $@
################################################################################
# Generic Executable
Expand Down
Loading
Loading