Changeset 22800
- Timestamp:
- 05/21/18 17:04:30 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/c/cores/transient_core.cpp ¶
r22799 r22800 196 196 int ngrids_ice=femmodel->vertices->NumberOfVertices(); 197 197 int nels_ice=femmodel->elements->NumberOfElements(); 198 lat_ice= xNew<IssmDouble>(ngrids_ice);199 lon_ice= xNew<IssmDouble>(ngrids_ice);200 icebase= xNew<IssmDouble>(ngrids_ice);201 melt_mesh= xNew<IssmDouble>(ngrids_ice);202 198 203 199 /*Recover mesh and inputs needed*/ … … 207 203 femmodel->parameters->FindParam(&oceangridy,&ngrids_ocean,OceanGridYEnum); 208 204 BamgTriangulatex(&index_ocean,&nels_ocean,oceangridx,oceangridy,ngrids_ocean); 209 base_oceangrid= xNew<IssmDouble>(ngrids_ocean);210 oceanmelt = xNew<IssmDouble>(ngrids_ocean);211 205 212 206 femmodel->vertices->LatLonList(&lat_ice,&lon_ice); … … 220 214 /*Send and receive data*/ 221 215 ISSM_MPI_Send(&time,1,ISSM_MPI_DOUBLE,0,10001001,tomitgcmcomm); 216 oceanmelt = xNew<IssmDouble>(ngrids_ocean); 222 217 ISSM_MPI_Recv(&oceantime,1,ISSM_MPI_DOUBLE,0,10001002,tomitgcmcomm,&status); 223 218 if((oceantime - time > 0.1*yts) & (oceantime - time < -0.1*yts)) _error_("Ocean and ice time are starting to diverge"); 224 219 ISSM_MPI_Recv(oceanmelt,ngrids_ocean,ISSM_MPI_DOUBLE,0,10001007,tomitgcmcomm,&status); 220 for(int i=0;i<ngrids_ice;i++) base_oceangrid[i]=0; 225 221 ISSM_MPI_Send(base_oceangrid,ngrids_ocean,ISSM_MPI_DOUBLE,0,10001008,tomitgcmcomm); 226 222 … … 234 230 235 231 /*Delete*/ 232 xDelete<int>(index_ice); 233 xDelete<int>(index_ocean); 236 234 xDelete<IssmDouble>(lat_ice); 237 235 xDelete<IssmDouble>(lon_ice); … … 240 238 xDelete<IssmDouble>(z_ice); 241 239 xDelete<IssmDouble>(melt_mesh); 242 xDelete<int>(index_ice);243 240 xDelete<IssmDouble>(oceangridx); 244 241 xDelete<IssmDouble>(oceangridy);
Note:
See TracChangeset
for help on using the changeset viewer.