Changeset 23077
- Timestamp:
 - 08/07/18 21:46:18 (7 years ago)
 - File:
 - 
      
- 1 edited
 
- 
          
  issm/trunk-jpl/src/c/cores/transient_core.cpp (modified) (8 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
issm/trunk-jpl/src/c/cores/transient_core.cpp
r23067 r23077 93 93 IssmDouble *oceangridx; 94 94 IssmDouble *oceangridy; 95 IssmDouble * base_oceangrid;95 IssmDouble *icebase_oceangrid; 96 96 IssmDouble* x_ice = NULL; 97 97 IssmDouble* y_ice = NULL; … … 153 153 odouble->size=NULL; 154 154 options->AddOption(odouble); 155 InterpFromMeshToMesh2dx(& base_oceangrid,index_ice,lon_ice,lat_ice,ngrids_ice,nels_ice,155 InterpFromMeshToMesh2dx(&icebase_oceangrid,index_ice,lon_ice,lat_ice,ngrids_ice,nels_ice, 156 156 icebase,ngrids_ice,1, 157 157 oceangridx,oceangridy,ngrids_ocean,options); … … 159 159 160 160 if(my_rank==0){ 161 ISSM_MPI_Send( base_oceangrid,ngrids_ocean,ISSM_MPI_DOUBLE,0,10001008,tomitgcmcomm);161 ISSM_MPI_Send(icebase_oceangrid,ngrids_ocean,ISSM_MPI_DOUBLE,0,10001008,tomitgcmcomm); 162 162 } 163 163 … … 171 171 xDelete<IssmDouble>(z_ice); 172 172 xDelete<IssmDouble>(icebase); 173 xDelete<IssmDouble>( base_oceangrid);173 xDelete<IssmDouble>(icebase_oceangrid); 174 174 xDelete<IssmDouble>(oceangridx); 175 175 xDelete<IssmDouble>(oceangridy); … … 237 237 IssmDouble oceantime; 238 238 IssmDouble rho_ice; 239 IssmDouble *oceanmelt; 240 IssmDouble *base_oceangrid; 241 IssmDouble *oceangridx; 242 IssmDouble *oceangridy; 243 IssmDouble* x_ice = NULL; 244 IssmDouble* y_ice = NULL; 245 IssmDouble* lat_ice = NULL; 246 IssmDouble* lon_ice = NULL; 247 IssmDouble* z_ice = NULL; 248 IssmDouble* icebase= NULL; 249 IssmDouble* melt_mesh = NULL; 250 int* index_ice= NULL; 251 int* index_ocean = NULL; 239 IssmDouble *oceanmelt = NULL; 240 IssmDouble *icebase_oceangrid = NULL; 241 IssmDouble *icemask_oceangrid = NULL; 242 IssmDouble *oceangridx = NULL; 243 IssmDouble *oceangridy = NULL; 244 IssmDouble *x_ice = NULL; 245 IssmDouble *y_ice = NULL; 246 IssmDouble *lat_ice = NULL; 247 IssmDouble *lon_ice = NULL; 248 IssmDouble *z_ice = NULL; 249 IssmDouble *icebase = NULL; 250 IssmDouble *icemask = NULL; 251 IssmDouble *melt_mesh = NULL; 252 int *index_ice = NULL; 253 int *index_ocean = NULL; 252 254 int ngrids_ice=femmodel->vertices->NumberOfVertices(); 253 255 int nels_ice=femmodel->elements->NumberOfElements(); … … 262 264 femmodel->vertices->LatLonList(&lat_ice,&lon_ice); 263 265 264 /*Interpolate ice base onto ocean grid*/266 /*Interpolate ice base and mask onto ocean grid*/ 265 267 GetVectorFromInputsx(&icebase,femmodel,BaseEnum,VertexSIdEnum); 266 InterpFromMeshToMesh2dx(&base_oceangrid,index_ice,lon_ice,lat_ice,ngrids_ice,nels_ice, 267 icebase,ngrids_ice,1, 268 oceangridx,oceangridy,ngrids_ocean,NULL); 268 InterpFromMeshToMesh2dx(&icebase_oceangrid,index_ice,lon_ice,lat_ice,ngrids_ice,nels_ice, 269 icebase,ngrids_ice,1,oceangridx,oceangridy,ngrids_ocean,NULL); 270 xDelete<IssmDouble>(icebase); 271 272 GetVectorFromInputsx(&icemask,femmodel,BaseEnum,VertexSIdEnum); 273 InterpFromMeshToMesh2dx(&icemask_oceangrid,index_ice,lon_ice,lat_ice,ngrids_ice,nels_ice, 274 icemask,ngrids_ice,1,oceangridx,oceangridy,ngrids_ocean,NULL); 275 xDelete<IssmDouble>(icemask); 276 277 /*Put +9999 for places where there is no ice!*/ 278 for(int i=0;i<ngrids_ocean;i++) if(icemask_oceangrid[i]>0.) icebase_oceangrid[i]=+9999.; 279 xDelete<IssmDouble>(icemask_oceangrid); 269 280 270 281 /*Send and receive data*/ … … 275 286 oceanmelt = xNew<IssmDouble>(ngrids_ocean); 276 287 ISSM_MPI_Recv(oceanmelt,ngrids_ocean,ISSM_MPI_DOUBLE,0,10001007,tomitgcmcomm,&status); 277 ISSM_MPI_Send( base_oceangrid,ngrids_ocean,ISSM_MPI_DOUBLE,0,10001008,tomitgcmcomm);288 ISSM_MPI_Send(icebase_oceangrid,ngrids_ocean,ISSM_MPI_DOUBLE,0,10001008,tomitgcmcomm); 278 289 } 279 290 ISSM_MPI_Bcast(&oceantime,1,ISSM_MPI_DOUBLE,0,IssmComm::GetComm()); … … 301 312 xDelete<IssmDouble>(oceangridy); 302 313 xDelete<IssmDouble>(oceanmelt); 303 xDelete<IssmDouble>(icebase); 304 xDelete<IssmDouble>(base_oceangrid); 314 xDelete<IssmDouble>(icebase_oceangrid); 305 315 } 306 316 #else  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  ![(please configure the [header_logo] section in trac.ini)](/trac/issm/chrome/common/trac_banner.png)