Changeset 22822
- Timestamp:
- 05/31/18 10:44:24 (7 years ago)
- Location:
- issm/trunk
- Files:
-
- 35 edited
- 6 copied
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
- Property svn:mergeinfo changed
/issm/trunk-jpl merged: 22759-22762,22764,22769-22770,22777-22780,22782,22784,22786-22787,22789,22791,22793-22818
- Property svn:mergeinfo changed
-
issm/trunk/README
r19105 r22822 16 16 17 17 18 Copyright (c) 2002-201 4, California Institute of Technology.18 Copyright (c) 2002-2018, California Institute of Technology. 19 19 All rights reserved. Based on Government Sponsored Research under contracts 20 20 NAS7-1407 and/or NAS7-03001. -
issm/trunk/configure.ac
r22758 r22822 2 2 3 3 #AUTOCONF 4 AC_INIT([Ice Sheet System Model (ISSM)],[4.1 3],[issm@jpl.nasa.gov],[issm],[http://issm.jpl.nasa.gov]) #Initializing configure4 AC_INIT([Ice Sheet System Model (ISSM)],[4.14],[issm@jpl.nasa.gov],[issm],[http://issm.jpl.nasa.gov]) #Initializing configure 5 5 AC_CONFIG_AUX_DIR([./aux-config]) #Put config files in aux-config 6 6 AC_CONFIG_MACRO_DIR([m4]) #m4 macros are located in m4 -
issm/trunk/jenkins/jenkins.sh
r22758 r22822 296 296 cd $ISSM_DIR/test/NightlyRun 297 297 if [ "$OS" = "win" ]; then 298 $MATLAB_PATH/bin/matlab -nodisplay -no jvm -nosplash -nodesktop-r "addpath $ISSM_DIR_WIN/src/m/dev; devpath; addpath $ISSM_DIR_WIN/nightlylog/; matlab_run$i" -logfile $ISSM_DIR_WIN/nightlylog/matlab_log$i.log &299 else 300 $MATLAB_PATH/bin/matlab -nodisplay -no jvm -nosplash -nodesktop-r "addpath $ISSM_DIR/src/m/dev; devpath; addpath $ISSM_DIR/nightlylog/; matlab_run$i" -logfile $ISSM_DIR/nightlylog/matlab_log$i.log &298 $MATLAB_PATH/bin/matlab -nodisplay -nosplash -r "addpath $ISSM_DIR_WIN/src/m/dev; devpath; addpath $ISSM_DIR_WIN/nightlylog/; matlab_run$i" -logfile $ISSM_DIR_WIN/nightlylog/matlab_log$i.log & 299 else 300 $MATLAB_PATH/bin/matlab -nodisplay -nosplash -r "addpath $ISSM_DIR/src/m/dev; devpath; addpath $ISSM_DIR/nightlylog/; matlab_run$i" -logfile $ISSM_DIR/nightlylog/matlab_log$i.log & 301 301 fi 302 302 done … … 470 470 echo 'end' >> $FILE 471 471 472 $MATLAB_PATH/bin/matlab -nodisplay -no jvm -nosplash -nodesktop-r "addpath $ISSM_DIR/src/m/dev; devpath; addpath $ISSM_DIR/nightlylog/; runme" -logfile $ISSM_DIR/nightlylog/$LOG_FILE472 $MATLAB_PATH/bin/matlab -nodisplay -nosplash -r "addpath $ISSM_DIR/src/m/dev; devpath; addpath $ISSM_DIR/nightlylog/; runme" -logfile $ISSM_DIR/nightlylog/$LOG_FILE 473 473 echo "starting: $(basename $dir)" >> $ISSM_DIR/nightlylog/matlab_log_examples.log 474 474 cat $ISSM_DIR/nightlylog/$LOG_FILE >> $ISSM_DIR/nightlylog/matlab_log_examples.log -
issm/trunk/src
- Property svn:mergeinfo changed
/issm/trunk-jpl/src merged: 22759-22760,22764,22769-22770,22777-22780,22782,22784,22786-22787,22789,22794-22795,22798-22802,22806-22808,22816-22817
- Property svn:mergeinfo changed
-
issm/trunk/src/c/analyses/MasstransportAnalysis.cpp
r22758 r22822 179 179 } 180 180 181 if(isoceancoupling){182 iomodel->FetchDataToInput(elements,"md.mesh.lat",MeshLatEnum);183 iomodel->FetchDataToInput(elements,"md.mesh.long",MeshLongEnum);184 }185 181 if(!issmb){ 186 182 iomodel->FetchDataToInput(elements,"md.smb.mass_balance",SmbMassBalanceEnum); -
issm/trunk/src/c/classes/Elements/Element.cpp
r22758 r22822 1400 1400 parameters->FindParam(&N,NULL,ControlInputSizeNEnum); 1401 1401 parameters->FindParam(&M,NULL,ControlInputSizeMEnum); 1402 if(control_index>0) for(int n=0;n<control_index-1;n++) start+=N[n]*M[n]; 1402 if(control_index>0) { 1403 for(int n=0;n<control_index;n++){ 1404 start+=N[n]*M[n]; 1405 } 1406 } 1403 1407 1404 1408 for(int n=0;n<N[control_index];n++){ … … 1662 1666 for(int t=0;t<N;t++) times[t] = vector[(M-1)*N+t]; 1663 1667 /*Create the three transient inputs for the control input*/ 1664 TransientInput* values_input=new TransientInput( ControlInputValuesEnum,times,N);1668 TransientInput* values_input=new TransientInput(input_enum,times,N); 1665 1669 TransientInput* mins_input = new TransientInput(ControlInputMinsEnum,times,N); 1666 1670 TransientInput* maxs_input = new TransientInput(ControlInputMaxsEnum,times,N); … … 1671 1675 values_min[i] = min_vector[N*(vertexids[i]-1)+t]; 1672 1676 values_max[i] = max_vector[N*(vertexids[i]-1)+t]; 1673 } 1677 } 1674 1678 switch(this->ObjectEnum()){ 1675 1679 case TriaEnum: 1676 values_input->AddTimeInput(new TriaInput( ControlInputValuesEnum,values,P1Enum));1680 values_input->AddTimeInput(new TriaInput(input_enum,values,P1Enum)); 1677 1681 mins_input->AddTimeInput(new TriaInput(ControlInputMinsEnum,values_min,P1Enum)); 1678 1682 maxs_input->AddTimeInput(new TriaInput(ControlInputMaxsEnum,values_max,P1Enum)); 1679 1683 break; 1680 1684 case PentaEnum: 1681 values_input->AddTimeInput(new PentaInput( ControlInputValuesEnum,values,P1Enum));1685 values_input->AddTimeInput(new PentaInput(input_enum,values,P1Enum)); 1682 1686 mins_input->AddTimeInput(new PentaInput(ControlInputMinsEnum,values_min,P1Enum)); 1683 1687 maxs_input->AddTimeInput(new PentaInput(ControlInputMaxsEnum,values_max,P1Enum)); 1684 1688 break; 1685 1689 case TetraEnum: 1686 values_input->AddTimeInput(new TetraInput( ControlInputValuesEnum,values,P1Enum));1690 values_input->AddTimeInput(new TetraInput(input_enum,values,P1Enum)); 1687 1691 mins_input->AddTimeInput(new TetraInput(ControlInputMinsEnum,values_min,P1Enum)); 1688 1692 maxs_input->AddTimeInput(new TetraInput(ControlInputMaxsEnum,values_max,P1Enum)); -
issm/trunk/src/c/classes/Elements/Tria.cpp
r22758 r22822 2082 2082 2083 2083 /*Control Inputs*/ 2084 if (control_analysis ){2084 if (control_analysis && !ad_analysis){ 2085 2085 if(!ad_analysis)iomodel->FindConstant(&controls,NULL,"md.inversion.control_parameters"); 2086 2086 if(ad_analysis)iomodel->FindConstant(&controls,NULL,"md.autodiff.independent_object_names"); -
issm/trunk/src/c/classes/ExternalResults/GenericExternalResult.h
r22758 r22822 179 179 180 180 } /*}}}*/ 181 void Transpose(void){ /*{{{*/ 182 _error_("not implemented yet"); 183 } /*}}}*/ 181 184 char* GetResultName(void){ /*{{{*/ 182 185 char* name = xNew<char>(strlen(this->result_name)+1); … … 594 597 595 598 } /*}}}*/ 596 597 /*Specific instantiations for IssmDouble*: */ 599 template <> inline void GenericExternalResult<IssmPDouble*>::Transpose(void){/*{{{*/ 600 601 602 /*Perform transpose only if we have a matrix*/ 603 if(M>1 && N>1){ 604 IssmPDouble* temp=xNew<IssmPDouble>(M*N); 605 for(int i=0;i<M;i++){ 606 for(int j=0;j<N;j++){ 607 temp[j*M+i] = value[i*N+j]; 608 } 609 } 610 xDelete<IssmPDouble>(this->value); 611 this->value = temp; 612 } 613 614 /*Switch dimensions*/ 615 int temp2 = this->N; 616 this->N = this->M; 617 this->M = temp2; 618 619 620 621 } /*}}}*/ 622 623 /*Specific instantiations for IssmDouble*: */ 598 624 #if defined(_HAVE_ADOLC_) && !defined(_WRAPPERS_) //We hook off this specific specialization when not running ADOLC, otherwise we get a redeclaration with the next specialization. 599 template <> inline void GenericExternalResult<IssmDouble*>::WriteData(FILE* fid,bool io_gather){ /*{{{*/ 600 601 int i; 602 int my_rank; 603 int type; 604 int rows,cols; 605 char *name = NULL; 606 IssmPDouble passiveDouble; 607 IssmPDouble* passiveDoubles; 608 609 /*recover my_rank:*/ 610 my_rank=IssmComm::GetRank(); 611 612 if(io_gather){ 613 /*we are gathering the data on cpu 0, don't write on other cpus: */ 614 if(my_rank) return; 615 } 616 617 /*First write enum: */ 618 int length=(strlen(this->result_name)+1)*sizeof(char); 619 fwrite(&length,sizeof(int),1,fid); 620 fwrite(this->result_name,length,1,fid); 621 622 /*Now write time and step: */ 623 passiveDouble=reCast<IssmPDouble>(time); 624 fwrite(&passiveDouble,sizeof(IssmPDouble),1,fid); 625 fwrite(&step,sizeof(int),1,fid); 626 627 /*writing a IssmDouble array, type is 3:*/ 628 type=3; 629 fwrite(&type,sizeof(int),1,fid); 630 rows=this->M; 631 fwrite(&rows,sizeof(int),1,fid); 632 cols=this->N; 633 fwrite(&cols,sizeof(int),1,fid); 634 635 passiveDoubles=xNew<IssmPDouble>(this->M*this->N); 636 for (i=0;i<this->M*this->N;i++)passiveDoubles[i]=reCast<IssmPDouble>(value[i]); 637 fwrite(passiveDoubles,cols*rows*sizeof(IssmPDouble),1,fid); 638 xDelete<IssmPDouble>(passiveDoubles); 639 640 } 641 /*}}}*/ 642 #endif 643 644 /*Specifics instantiations for Vector*/ 645 template <> inline GenericExternalResult<Vector<IssmPDouble>*>::GenericExternalResult(int in_id, int in_enum_type,Vector<IssmPDouble>* in_values, int in_M,int in_N,int in_step,IssmDouble in_time){/*{{{*/ 646 _error_("instanciation not correct"); 647 } 648 /*}}}*/ 649 template <> inline GenericExternalResult<Vector<IssmPDouble>*>::GenericExternalResult(int in_id, int in_enum_type,Vector<IssmPDouble>* in_value,int in_step, IssmDouble in_time){ /*{{{*/ 650 id = in_id; 651 M = 0; 652 N = 0; 653 654 /*Convert enum to name*/ 655 EnumToStringx(&this->result_name,in_enum_type); 656 657 step = in_step; 658 time = in_time; 659 660 value = in_value; 661 } /*}}}*/ 662 template <> inline GenericExternalResult<Vector<IssmPDouble>*>::~GenericExternalResult(){ /*{{{*/ 663 xDelete<char>(this->result_name); 664 delete value; 665 } /*}}}*/ 666 template <> inline void GenericExternalResult<Vector<IssmPDouble>*>::Echo(void){ /*{{{*/ 667 668 _printf_("GenericExternalResult<Vector<IssmPDouble>*>:\n"); 669 this->GenericEcho(); 670 this->value->Echo(); 671 672 } /*}}}*/ 673 template <> inline void GenericExternalResult<Vector<IssmPDouble>*>::DeepEcho(void){ /*{{{*/ 674 675 this->Echo(); 676 677 } /*}}}*/ 678 template <> inline Object* GenericExternalResult<Vector<IssmPDouble>*>::copy(void){ /*{{{*/ 679 return new GenericExternalResult<Vector<IssmPDouble>*>(this->id,StringToEnumx(this->result_name),this->value,this->step,this->time); 680 } /*}}}*/ 681 #if defined(_HAVE_ADOLC_) && !defined(_WRAPPERS_) //We hook off this specific specialization when not running ADOLC, otherwise we get a redeclaration with the next specialization. 682 template <> inline void GenericExternalResult<Vector<IssmPDouble>*>::WriteData(FILE* fid,bool io_gather){ /*{{{*/ 683 684 char *name = NULL; 685 int length,rows,cols=1; 686 687 if(!io_gather){ 688 _error_("not supported yet"); 689 } 690 691 /*Serialize vector*/ 692 IssmPDouble* serialvalues = this->value->ToMPISerial(); 693 this->value->GetSize(&rows); 694 695 if(IssmComm::GetRank()==0){ 696 /*First write name: */ 697 length=(strlen(this->result_name)+1)*sizeof(char); 625 template <> inline void GenericExternalResult<IssmDouble*>::WriteData(FILE* fid,bool io_gather){ /*{{{*/ 626 627 int i; 628 int my_rank; 629 int type; 630 int rows,cols; 631 char *name = NULL; 632 IssmPDouble passiveDouble; 633 IssmPDouble* passiveDoubles; 634 635 /*recover my_rank:*/ 636 my_rank=IssmComm::GetRank(); 637 638 if(io_gather){ 639 /*we are gathering the data on cpu 0, don't write on other cpus: */ 640 if(my_rank) return; 641 } 642 643 /*First write enum: */ 644 int length=(strlen(this->result_name)+1)*sizeof(char); 698 645 fwrite(&length,sizeof(int),1,fid); 699 646 fwrite(this->result_name,length,1,fid); 700 647 701 648 /*Now write time and step: */ 702 IssmPDoublepassiveDouble=reCast<IssmPDouble>(time);649 passiveDouble=reCast<IssmPDouble>(time); 703 650 fwrite(&passiveDouble,sizeof(IssmPDouble),1,fid); 704 651 fwrite(&step,sizeof(int),1,fid); 705 652 706 653 /*writing a IssmDouble array, type is 3:*/ 707 inttype=3;654 type=3; 708 655 fwrite(&type,sizeof(int),1,fid); 656 rows=this->M; 709 657 fwrite(&rows,sizeof(int),1,fid); 658 cols=this->N; 710 659 fwrite(&cols,sizeof(int),1,fid); 711 fwrite(serialvalues,cols*rows*sizeof(IssmPDouble),1,fid); 712 }713 714 /*Clean up*/715 xDelete<IssmPDouble>(serialvalues);716 717 }718 /*}}}*/660 661 passiveDoubles=xNew<IssmPDouble>(this->M*this->N); 662 for (i=0;i<this->M*this->N;i++)passiveDoubles[i]=reCast<IssmPDouble>(value[i]); 663 fwrite(passiveDoubles,cols*rows*sizeof(IssmPDouble),1,fid); 664 xDelete<IssmPDouble>(passiveDoubles); 665 666 } 667 /*}}}*/ 719 668 #endif 720 template <> inline int GenericExternalResult<Vector<IssmPDouble>*>::ObjectEnum(void){ /*{{{*/ 721 return NoneEnum; 722 /*???? FIXME*/ 723 } /*}}}*/ 724 725 /*Specifics instantiations for Vector<IssmDouble>*/ 726 template <> inline void GenericExternalResult<Vector<IssmDouble>*>::WriteData(FILE* fid,bool io_gather){ /*{{{*/ 727 728 int i; 729 char *name = NULL; 730 int length,rows,cols=1; 731 IssmDouble* serialvalues = NULL; 732 IssmPDouble* pserialvalues = NULL; 733 734 if(!io_gather){ 735 _error_("not supported yet"); 736 } 737 738 /*Serialize vector*/ 739 serialvalues = this->value->ToMPISerial(); 740 this->value->GetSize(&rows); 741 742 pserialvalues=xNew<IssmPDouble>(rows); 743 for(i=0;i<rows;i++)pserialvalues[i]=reCast<IssmPDouble>(serialvalues[i]); 744 745 if(IssmComm::GetRank()==0){ 746 /*First write name: */ 747 length=(strlen(this->result_name)+1)*sizeof(char); 748 fwrite(&length,sizeof(int),1,fid); 749 fwrite(this->result_name,length,1,fid); 750 751 /*Now write time and step: */ 752 IssmPDouble passiveDouble=reCast<IssmPDouble>(time); 753 fwrite(&passiveDouble,sizeof(IssmPDouble),1,fid); 754 fwrite(&step,sizeof(int),1,fid); 755 756 /*writing a IssmDouble array, type is 3:*/ 757 int type=3; 758 fwrite(&type,sizeof(int),1,fid); 759 fwrite(&rows,sizeof(int),1,fid); 760 fwrite(&cols,sizeof(int),1,fid); 761 fwrite(pserialvalues,cols*rows*sizeof(IssmPDouble),1,fid); 762 } 763 764 /*Clean up*/ 765 xDelete<IssmPDouble>(pserialvalues); 766 xDelete<IssmDouble>(serialvalues); 767 768 } 769 /*}}}*/ 770 template <> inline void GenericExternalResult<Vector<IssmDouble>*>::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/ 771 772 _error_("GenericExternalResult instantiated for type Vector<IssmDouble>* called " << result_name << " not implemented yet"); 773 774 } /*}}}*/ 669 670 /*Specifics instantiations for Vector*/ 671 template <> inline GenericExternalResult<Vector<IssmPDouble>*>::GenericExternalResult(int in_id, int in_enum_type,Vector<IssmPDouble>* in_values, int in_M,int in_N,int in_step,IssmDouble in_time){/*{{{*/ 672 _error_("instanciation not correct"); 673 } 674 /*}}}*/ 675 template <> inline GenericExternalResult<Vector<IssmPDouble>*>::GenericExternalResult(int in_id, int in_enum_type,Vector<IssmPDouble>* in_value,int in_step, IssmDouble in_time){ /*{{{*/ 676 id = in_id; 677 M = 0; 678 N = 0; 679 680 /*Convert enum to name*/ 681 EnumToStringx(&this->result_name,in_enum_type); 682 683 step = in_step; 684 time = in_time; 685 686 value = in_value; 687 } /*}}}*/ 688 template <> inline GenericExternalResult<Vector<IssmPDouble>*>::~GenericExternalResult(){ /*{{{*/ 689 xDelete<char>(this->result_name); 690 delete value; 691 } /*}}}*/ 692 template <> inline void GenericExternalResult<Vector<IssmPDouble>*>::Echo(void){ /*{{{*/ 693 694 _printf_("GenericExternalResult<Vector<IssmPDouble>*>:\n"); 695 this->GenericEcho(); 696 this->value->Echo(); 697 698 } /*}}}*/ 699 template <> inline void GenericExternalResult<Vector<IssmPDouble>*>::DeepEcho(void){ /*{{{*/ 700 701 this->Echo(); 702 703 } /*}}}*/ 704 template <> inline Object* GenericExternalResult<Vector<IssmPDouble>*>::copy(void){ /*{{{*/ 705 return new GenericExternalResult<Vector<IssmPDouble>*>(this->id,StringToEnumx(this->result_name),this->value,this->step,this->time); 706 } /*}}}*/ 707 #if defined(_HAVE_ADOLC_) && !defined(_WRAPPERS_) //We hook off this specific specialization when not running ADOLC, otherwise we get a redeclaration with the next specialization. 708 template <> inline void GenericExternalResult<Vector<IssmPDouble>*>::WriteData(FILE* fid,bool io_gather){ /*{{{*/ 709 710 char *name = NULL; 711 int length,rows,cols=1; 712 713 if(!io_gather){ 714 _error_("not supported yet"); 715 } 716 717 /*Serialize vector*/ 718 IssmPDouble* serialvalues = this->value->ToMPISerial(); 719 this->value->GetSize(&rows); 720 721 if(IssmComm::GetRank()==0){ 722 /*First write name: */ 723 length=(strlen(this->result_name)+1)*sizeof(char); 724 fwrite(&length,sizeof(int),1,fid); 725 fwrite(this->result_name,length,1,fid); 726 727 /*Now write time and step: */ 728 IssmPDouble passiveDouble=reCast<IssmPDouble>(time); 729 fwrite(&passiveDouble,sizeof(IssmPDouble),1,fid); 730 fwrite(&step,sizeof(int),1,fid); 731 732 /*writing a IssmDouble array, type is 3:*/ 733 int type=3; 734 fwrite(&type,sizeof(int),1,fid); 735 fwrite(&rows,sizeof(int),1,fid); 736 fwrite(&cols,sizeof(int),1,fid); 737 fwrite(serialvalues,cols*rows*sizeof(IssmPDouble),1,fid); 738 } 739 740 /*Clean up*/ 741 xDelete<IssmPDouble>(serialvalues); 742 743 } 744 /*}}}*/ 745 #endif 746 template <> inline int GenericExternalResult<Vector<IssmPDouble>*>::ObjectEnum(void){ /*{{{*/ 747 return NoneEnum; 748 /*???? FIXME*/ 749 } /*}}}*/ 750 751 /*Specifics instantiations for Vector<IssmDouble>*/ 752 template <> inline void GenericExternalResult<Vector<IssmDouble>*>::WriteData(FILE* fid,bool io_gather){ /*{{{*/ 753 754 int i; 755 char *name = NULL; 756 int length,rows,cols=1; 757 IssmDouble* serialvalues = NULL; 758 IssmPDouble* pserialvalues = NULL; 759 760 if(!io_gather){ 761 _error_("not supported yet"); 762 } 763 764 /*Serialize vector*/ 765 serialvalues = this->value->ToMPISerial(); 766 this->value->GetSize(&rows); 767 768 pserialvalues=xNew<IssmPDouble>(rows); 769 for(i=0;i<rows;i++)pserialvalues[i]=reCast<IssmPDouble>(serialvalues[i]); 770 771 if(IssmComm::GetRank()==0){ 772 /*First write name: */ 773 length=(strlen(this->result_name)+1)*sizeof(char); 774 fwrite(&length,sizeof(int),1,fid); 775 fwrite(this->result_name,length,1,fid); 776 777 /*Now write time and step: */ 778 IssmPDouble passiveDouble=reCast<IssmPDouble>(time); 779 fwrite(&passiveDouble,sizeof(IssmPDouble),1,fid); 780 fwrite(&step,sizeof(int),1,fid); 781 782 /*writing a IssmDouble array, type is 3:*/ 783 int type=3; 784 fwrite(&type,sizeof(int),1,fid); 785 fwrite(&rows,sizeof(int),1,fid); 786 fwrite(&cols,sizeof(int),1,fid); 787 fwrite(pserialvalues,cols*rows*sizeof(IssmPDouble),1,fid); 788 } 789 790 /*Clean up*/ 791 xDelete<IssmPDouble>(pserialvalues); 792 xDelete<IssmDouble>(serialvalues); 793 794 } 795 /*}}}*/ 796 template <> inline void GenericExternalResult<Vector<IssmDouble>*>::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/ 797 798 _error_("GenericExternalResult instantiated for type Vector<IssmDouble>* called " << result_name << " not implemented yet"); 799 800 } /*}}}*/ 775 801 776 802 #endif /* _EXTERNAL_RESULTOBJECT_H */ -
issm/trunk/src/c/classes/Inputs/ControlInput.cpp
r22758 r22822 330 330 TransientInput* transient_input = xDynamicCast<TransientInput*>(input); 331 331 IssmDouble time = transient_input->GetTimeByOffset(timeoffset); 332 TransientInput* new_trans_input = new TransientInput( ControlInputValuesEnum);332 TransientInput* new_trans_input = new TransientInput(this->enum_type); 333 333 for(int i=0;i<transient_input->numtimesteps;i++){ 334 334 if(transient_input->timesteps[i]==time) new_trans_input->AddTimeInput(xDynamicCast<TriaInput*>(in_input),time); -
issm/trunk/src/c/classes/Vertex.cpp
r21341 r22822 32 32 this->domaintype = iomodel->domaintype; 33 33 34 if(iomodel->Data("md.mesh.lat") && iomodel->Data("md.mesh.long")){ 35 this->latitute = iomodel->Data("md.mesh.lat")[i]; 36 this->longitude = iomodel->Data("md.mesh.long")[i]; 37 } 38 34 39 switch(iomodel->domaintype){ 35 40 case Domain3DEnum: … … 38 43 break; 39 44 case Domain3DsurfaceEnum: 45 _assert_(iomodel->Data("md.mesh.lat") && iomodel->Data("md.mesh.long") && iomodel->Data("md.mesh.r")); 40 46 this->latitute = iomodel->Data("md.mesh.lat")[i]; 41 47 this->longitude = iomodel->Data("md.mesh.long")[i]; … … 195 201 /*}}}*/ 196 202 int Vertex::Sid(void){ return sid; }/*{{{*/ 197 /*}}}*/198 void Vertex::ToXYZ(Matrix<IssmDouble>* matrix){/*{{{*/199 200 IssmDouble xyz[3];201 int indices[3];202 203 if (this->clone==true) return;204 205 xyz[0]=x;206 xyz[1]=y;207 xyz[2]=z;208 indices[0]=0;209 indices[1]=1;210 indices[2]=2;211 212 matrix->SetValues(1,&sid,3,&indices[0],&xyz[0],INS_VAL);213 }214 203 /*}}}*/ 215 204 void Vertex::UpdateClonePids(int* alltruepids){/*{{{*/ -
issm/trunk/src/c/classes/Vertex.h
r21341 r22822 62 62 void ShowTruePids(int* borderpids); 63 63 int Sid(void); 64 void ToXYZ(Matrix<IssmDouble>* matrix);65 64 void UpdateClonePids(int* allborderpids); 66 65 void UpdatePosition(Vector<IssmDouble>* vx,Vector<IssmDouble>* vy,Vector<IssmDouble>* vz,Parameters* parameters,IssmDouble* thickness,IssmDouble* bed); -
issm/trunk/src/c/classes/Vertices.cpp
r22758 r22822 180 180 } 181 181 /*}}}*/ 182 IssmDouble* Vertices::ToXYZ(void){/*{{{*/ 183 184 /*intermediary: */ 185 int i; 186 int my_rank; 187 int num_vertices; 182 void Vertices::LatLonList(IssmDouble** plat,IssmDouble** plon){/*{{{*/ 188 183 189 184 /*output: */ 190 Matrix<IssmDouble>* xyz = NULL;191 185 IssmDouble* xyz_serial=NULL; 192 186 193 187 /*recover my_rank:*/ 194 my_rank=IssmComm::GetRank();188 int my_rank=IssmComm::GetRank(); 195 189 196 190 /*First, figure out number of vertices: */ 197 num_vertices=this->NumberOfVertices(); 198 199 /*Now, allocate matrix to hold all the vertices x,y and z values: */ 200 xyz= new Matrix<IssmDouble>(num_vertices,3); 191 int num_vertices=this->NumberOfVertices(); 192 193 /*Now, allocate vectors*/ 194 Vector<IssmDouble>* lat = new Vector<IssmDouble>(num_vertices); 195 Vector<IssmDouble>* lon = new Vector<IssmDouble>(num_vertices); 201 196 202 197 /*Go through vertices, and for each vertex, object, report it cpu: */ 203 for(i=0;i<this->Size();i++){ 204 205 /*let vertex fill matrix: */ 206 Vertex* vertex=xDynamicCast<Vertex*>(this->GetObjectByOffset(i)); 207 vertex->ToXYZ(xyz); 198 for(int i=0;i<this->Size();i++){ 199 Vertex* vertex=xDynamicCast<Vertex*>(this->GetObjectByOffset(i)); 200 lat->SetValue(vertex->sid,vertex->GetLatitude() ,INS_VAL); 201 lon->SetValue(vertex->sid,vertex->GetLongitude(),INS_VAL); 208 202 } 209 203 210 204 /*Assemble:*/ 211 xyz->Assemble(); 205 lat->Assemble(); 206 lon->Assemble(); 212 207 213 208 /*gather on cpu 0: */ 214 xyz_serial=xyz->ToSerial(); 209 IssmDouble* lat_serial=lat->ToMPISerial(); 210 IssmDouble* lon_serial=lon->ToMPISerial(); 215 211 216 212 /*free ressources: */ 217 delete xyz; 218 if(my_rank!=0)delete xyz_serial; 219 220 /*return matrix: */ 221 return xyz_serial; 222 } 223 /*}}}*/ 213 *plat = lat_serial; 214 *plon = lon_serial; 215 delete lat; 216 delete lon; 217 } 218 /*}}}*/ -
issm/trunk/src/c/classes/Vertices.h
r15396 r22822 25 25 int NumberOfVertices(void); 26 26 void Ranks(int* ranks); 27 IssmDouble* ToXYZ(void);27 void LatLonList(IssmDouble** lat,IssmDouble** lon); 28 28 }; 29 29 -
issm/trunk/src/c/cores/controladm1qn3_core.cpp
r22758 r22822 71 71 int* N = NULL; 72 72 int N_add = 0; 73 int* control_enum = NULL; 73 74 74 75 if (solution_type == TransientSolutionEnum){ … … 88 89 femmodel->parameters->FindParam(&scaling_factors,NULL,InversionControlScalingFactorsEnum); 89 90 femmodel->parameters->FindParam(&N,NULL,ControlInputSizeNEnum); 91 femmodel->parameters->FindParam(&control_enum,NULL,InversionControlParametersEnum); 90 92 numberofvertices=femmodel->vertices->NumberOfVertices(); 91 93 … … 104 106 if(X[index]<XL[index]) X[index]=XL[index]; 105 107 } 108 N_add+=N[c]; 106 109 } 107 110 … … 318 321 Gnorm += G[index]*G[index]; 319 322 } 323 N_add+=N[c]; 320 324 } 321 325 Gnorm = sqrt(Gnorm); … … 348 352 int offset = 0; 349 353 int N_add; 354 int* control_enum; 350 355 351 356 /*Recover some parameters*/ … … 358 363 femmodel->parameters->FindParamAndMakePassive(>tol,InversionGttolEnum); 359 364 femmodel->parameters->FindParam(&scaling_factors,NULL,InversionControlScalingFactorsEnum); 365 femmodel->parameters->FindParam(&control_enum,NULL,InversionControlParametersEnum); 360 366 femmodel->parameters->SetParam(false,SaveResultsEnum); 361 367 femmodel->parameters->FindParam(&N,NULL,ControlInputSizeNEnum); … … 478 484 int step = 1; 479 485 femmodel->parameters->SetParam(step,StepEnum); 480 femmodel->OutputControlsx(&femmodel->results);481 486 femmodel->results->AddObject(new GenericExternalResult<IssmPDouble*>(femmodel->results->Size()+1,JEnum,mystruct.Jlist,(*mystruct.i),mystruct.N,1,0)); 482 femmodel->results->AddObject(new GenericExternalResult<IssmPDouble*>(femmodel->results->Size()+1,Gradient1Enum,G,numberofvertices,intn/numberofvertices,1,0)); 483 femmodel->results->AddObject(new GenericExternalResult<IssmPDouble*>(femmodel->results->Size()+1,InversionControlParametersEnum,X,numberofvertices,intn/numberofvertices,1,0)); 487 488 int offset = 0; 489 for(int i=0;i<num_controls;i++){ 490 491 /*Disect results*/ 492 GenericExternalResult<IssmPDouble*>* G_output = new GenericExternalResult<IssmPDouble*>(femmodel->results->Size()+1,Gradient1Enum+i,&G[offset],N[i],numberofvertices,1,0.); 493 GenericExternalResult<IssmPDouble*>* X_output = new GenericExternalResult<IssmPDouble*>(femmodel->results->Size()+1,control_enum[i],&X[offset],N[i],numberofvertices,1,0.); 494 495 /*transpose for consistency with MATLAB's formating*/ 496 G_output->Transpose(); 497 X_output->Transpose(); 498 499 /*Add to results*/ 500 femmodel->results->AddObject(G_output); 501 femmodel->results->AddObject(X_output); 502 503 offset += N[i]*numberofvertices; 504 } 484 505 } 485 506 else{ -
issm/trunk/src/c/cores/sealevelrise_core.cpp
r22758 r22822 15 15 Vector<IssmDouble> *Sg_absolute = NULL; 16 16 Vector<IssmDouble> *Sg_eustatic = NULL; 17 Vector<IssmDouble> *slr_initial = NULL; 17 18 Vector<IssmDouble> *steric_rate_g = NULL; 18 19 Vector<IssmDouble> *U_radial = NULL; … … 80 81 if(isslr){ 81 82 Sg_eustatic=sealevelrise_core_eustatic(femmodel); //generalized eustatic (Farrel and Clark, Eq 4, 1st, 3rd and 4rd terms on the RHS. 83 84 /* The following is for reproducing Farrell&Clark1976 Fig. 1, and aimed for the workshop! 85 * md.slr.sealevel is considered as the "initial sea-level" where 1 m slr is distributed uniformly over the ocean 86 * similar strategy may work for computin SAL due to "internal mass distribution" associated with ocean dynamics 87 * if it breaks the code, it will be reverted. And, we will strategize how we want to accomodate */ 88 GetVectorFromInputsx(&slr_initial,femmodel,SealevelEnum,VertexSIdEnum); 89 Sg_eustatic->AXPY(slr_initial,1); 82 90 83 91 Sg=sealevelrise_core_noneustatic(femmodel,Sg_eustatic); //ocean loading tems (2nd and 5th terms on the RHS of Farrel and Clark) -
issm/trunk/src/c/cores/transient_core.cpp
r22758 r22822 21 21 /*parameters: */ 22 22 IssmDouble finaltime,dt,yts,starttime; 23 bool isstressbalance,ismasstransport,issmb,isFS,isthermal,isgroundingline,isgia,is slr,iscoupler,ismovingfront,isdamageevolution,ishydrology,isoceancoupling,iscontrol,isautodiff;23 bool isstressbalance,ismasstransport,issmb,isFS,isthermal,isgroundingline,isgia,isesa,isslr,iscoupler,ismovingfront,isdamageevolution,ishydrology,isoceancoupling,iscontrol,isautodiff; 24 24 bool save_results,dakota_analysis; 25 25 int timestepping; … … 54 54 femmodel->parameters->FindParam(&isthermal,TransientIsthermalEnum); 55 55 femmodel->parameters->FindParam(&isgia,TransientIsgiaEnum); 56 femmodel->parameters->FindParam(&isesa,TransientIsesaEnum); 56 57 femmodel->parameters->FindParam(&isslr,TransientIsslrEnum); 57 58 femmodel->parameters->FindParam(&iscoupler,TransientIscouplerEnum); … … 93 94 tomitgcmcomm=parcom->GetParameterValue(); 94 95 if(my_rank==0){ 96 /*Recover fixed parameters and store them*/ 95 97 ISSM_MPI_Send(&coupling_time,1,ISSM_MPI_DOUBLE,0,10001000,tomitgcmcomm); 96 98 ISSM_MPI_Recv(&oceangridnxsize,1,ISSM_MPI_INT,0,10001003,tomitgcmcomm,&status); … … 102 104 oceangridy = xNew<IssmDouble>(oceangridnxsize*oceangridnysize); 103 105 ISSM_MPI_Recv(oceangridy,oceangridnxsize*oceangridnysize,ISSM_MPI_DOUBLE,0,10001006,tomitgcmcomm,&status); 104 106 femmodel->parameters->SetParam(oceangridx,oceangridnxsize*oceangridnysize,OceanGridXEnum); 107 femmodel->parameters->SetParam(oceangridy,oceangridnxsize*oceangridnysize,OceanGridYEnum); 108 109 /*Exchange varying parameters for the initialization*/ 105 110 ISSM_MPI_Send(&time,1,ISSM_MPI_DOUBLE,0,10001001,tomitgcmcomm); 106 111 ISSM_MPI_Recv(&oceantime,1,ISSM_MPI_DOUBLE,0,10001002,tomitgcmcomm,&status); … … 162 167 femmodel->parameters->SetParam(save_results,SaveResultsEnum); 163 168 164 if(isoceancoupling){ {{{ 169 if(isoceancoupling){ /*{{{*/ 170 #ifndef _HAVE_ADOLC_ 165 171 if(VerboseSolution()) _printf0_(" ocean coupling: exchanging information\n"); 166 172 int my_rank; 167 int oceangridnxsize,oceangridnysize;168 IssmDouble *oceanmelt;169 IssmDouble *icebase;170 IssmDouble oceantime;171 173 ISSM_MPI_Comm tomitgcmcomm; 172 174 ISSM_MPI_Status status; … … 177 179 tomitgcmcomm=parcom->GetParameterValue(); 178 180 if(my_rank==0){ 181 int ngrids_ocean, nels_ocean; 182 IssmDouble oceantime; 183 IssmDouble rho_ice; 184 IssmDouble *oceanmelt; 185 IssmDouble *base_oceangrid; 186 IssmDouble *oceangridx; 187 IssmDouble *oceangridy; 188 IssmDouble* x_ice = NULL; 189 IssmDouble* y_ice = NULL; 190 IssmDouble* lat_ice = NULL; 191 IssmDouble* lon_ice = NULL; 192 IssmDouble* z_ice = NULL; 193 IssmDouble* icebase= NULL; 194 IssmDouble* melt_mesh = NULL; 195 int* index_ice= NULL; 196 int* index_ocean = NULL; 197 int ngrids_ice=femmodel->vertices->NumberOfVertices(); 198 int nels_ice=femmodel->elements->NumberOfElements(); 199 200 /*Recover mesh and inputs needed*/ 201 femmodel->parameters->FindParam(&rho_ice,MaterialsRhoIceEnum); 202 femmodel->GetMesh(femmodel->vertices,femmodel->elements,&x_ice,&y_ice,&z_ice,&index_ice); 203 femmodel->parameters->FindParam(&oceangridx,&ngrids_ocean,OceanGridXEnum); 204 femmodel->parameters->FindParam(&oceangridy,&ngrids_ocean,OceanGridYEnum); 205 BamgTriangulatex(&index_ocean,&nels_ocean,oceangridx,oceangridy,ngrids_ocean); 206 207 femmodel->vertices->LatLonList(&lat_ice,&lon_ice); 208 209 /*Interpolate ice base onto ocean grid*/ 210 GetVectorFromInputsx(&icebase,femmodel,BaseEnum,VertexSIdEnum); 211 InterpFromMeshToMesh2dx(&base_oceangrid,index_ice,lon_ice,lat_ice,ngrids_ice,nels_ice, 212 icebase,ngrids_ice,1, 213 oceangridx,oceangridy,ngrids_ocean,NULL); 214 215 /*Send and receive data*/ 179 216 ISSM_MPI_Send(&time,1,ISSM_MPI_DOUBLE,0,10001001,tomitgcmcomm); 217 oceanmelt = xNew<IssmDouble>(ngrids_ocean); 180 218 ISSM_MPI_Recv(&oceantime,1,ISSM_MPI_DOUBLE,0,10001002,tomitgcmcomm,&status); 181 219 if((oceantime - time > 0.1*yts) & (oceantime - time < -0.1*yts)) _error_("Ocean and ice time are starting to diverge"); 182 femmodel->parameters->FindParam(&oceangridnxsize,OceanGridNxEnum); 183 femmodel->parameters->FindParam(&oceangridnysize,OceanGridNyEnum); 184 oceanmelt = xNew<IssmDouble>(oceangridnxsize*oceangridnysize); 185 ISSM_MPI_Recv(oceanmelt,oceangridnxsize*oceangridnysize,ISSM_MPI_DOUBLE,0,10001007,tomitgcmcomm,&status); 186 icebase = xNew<IssmDouble>(oceangridnxsize*oceangridnysize); 187 for(int i=0;i<oceangridnxsize;i++){ 188 for(int j=0;j<oceangridnysize;j++){ 189 icebase[i*oceangridnysize+j]=9999.; 190 } 191 } 192 ISSM_MPI_Send(icebase,oceangridnxsize*oceangridnysize,ISSM_MPI_DOUBLE,0,10001008,tomitgcmcomm); 220 ISSM_MPI_Recv(oceanmelt,ngrids_ocean,ISSM_MPI_DOUBLE,0,10001007,tomitgcmcomm,&status); 221 for(int i=0;i<ngrids_ice;i++) base_oceangrid[i]=0; 222 ISSM_MPI_Send(base_oceangrid,ngrids_ocean,ISSM_MPI_DOUBLE,0,10001008,tomitgcmcomm); 223 224 /*Interp melt onto ice grid*/ 225 InterpFromMeshToMesh2dx(&melt_mesh,index_ocean,oceangridx,oceangridy,ngrids_ocean,nels_ocean, 226 oceanmelt,ngrids_ocean,1, 227 lon_ice,lat_ice,ngrids_ice,NULL); 228 229 for(int i=0;i<ngrids_ice;i++) melt_mesh[i]=-melt_mesh[i]/rho_ice; //heat flux provided by ocean is in kg/m^2/s 230 InputUpdateFromVectorx(femmodel,melt_mesh,BasalforcingsFloatingiceMeltingRateEnum,VertexSIdEnum); 231 232 /*Delete*/ 233 xDelete<int>(index_ice); 234 xDelete<int>(index_ocean); 235 xDelete<IssmDouble>(lat_ice); 236 xDelete<IssmDouble>(lon_ice); 237 xDelete<IssmDouble>(x_ice); 238 xDelete<IssmDouble>(y_ice); 239 xDelete<IssmDouble>(z_ice); 240 xDelete<IssmDouble>(melt_mesh); 241 xDelete<IssmDouble>(oceangridx); 242 xDelete<IssmDouble>(oceangridy); 193 243 xDelete<IssmDouble>(oceanmelt); 194 244 xDelete<IssmDouble>(icebase); 195 } 196 } 197 }}} 245 xDelete<IssmDouble>(base_oceangrid); 246 } 247 #else 248 _error_("not supported"); 249 #endif 250 } 251 /*}}}*/ 198 252 199 253 if(isthermal && domaintype==Domain3DEnum){ … … 258 312 } 259 313 314 /*esa: */ 315 if(isesa) esa_core(femmodel); 316 260 317 /*Sea level rise: */ 261 318 if(isslr || iscoupler) sealevelrise_core(femmodel); -
issm/trunk/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp
r22758 r22822 16 16 bool dakota_analysis; 17 17 bool adolc_analysis; 18 bool isoceancoupling; 18 19 int nnat,dummy; 19 20 int* nature=NULL; … … 24 25 iomodel->FindConstant(&materials_type,"md.materials.type"); 25 26 iomodel->FindConstant(&adolc_analysis,"md.autodiff.isautodiff"); 27 iomodel->FindConstant(&isoceancoupling,"md.transient.isoceancoupling"); 26 28 27 29 /*Did we already create the elements? : */ … … 232 234 if (iomodel->domaintype == Domain3DsurfaceEnum) iomodel->FetchData(3,"md.mesh.lat","md.mesh.long","md.mesh.r"); 233 235 else iomodel->FetchDataToInput(elements,"md.mesh.scale_factor",MeshScaleFactorEnum,1.); 236 if (isoceancoupling) iomodel->FetchData(2,"md.mesh.lat","md.mesh.long"); 234 237 235 238 CreateNumberNodeToElementConnectivity(iomodel,solution_type); … … 242 245 iomodel->DeleteData(6,"md.mesh.x","md.mesh.y","md.mesh.z","md.geometry.base","md.geometry.thickness","md.mask.ice_levelset"); 243 246 if (iomodel->domaintype == Domain3DsurfaceEnum) iomodel->DeleteData(3,"md.mesh.lat","md.mesh.long","md.mesh.r"); 247 if (isoceancoupling) iomodel->DeleteData(2,"md.mesh.lat","md.mesh.long"); 244 248 } -
issm/trunk/src/c/modules/ModelProcessorx/CreateOutputDefinitions.cpp
r22758 r22822 341 341 iomodel->FetchMultipleData(&cfsurfacelogvel_vyobs_string,&num_cfsurfacelogvels, "md.cfsurfacelogvel.vyobs_string"); iomodel->FetchMultipleData(&cfsurfacelogvel_weights,&cfsurfacelogvel_weights_M,&cfsurfacelogvel_weights_N,&num_cfsurfacelogvels, "md.cfsurfacelogvel.weights"); 342 342 iomodel->FetchMultipleData(&cfsurfacelogvel_weightstring,&num_cfsurfacelogvels, "md.cfsurfacelogvel.weights_string"); 343 _printf_("Num with weight string: "<<num_cfsurfacelogvels<<"\n");344 343 iomodel->FetchMultipleData(&cfsurfacelogvel_datatime,&num_cfsurfacelogvels, "md.cfsurfacelogvel.datatime"); 345 344 -
issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp
r22758 r22822 291 291 292 292 iomodel->FindConstant(&materialtype,"md.materials.type"); 293 if(materialtype==MatdamageiceEnum || materialtype==MaticeEnum || materialtype==MatenhancediceEnum){ 294 parameters->AddObject(iomodel->CopyConstantObject("md.materials.rho_ice",MaterialsRhoIceEnum)); 295 } 293 296 if(materialtype==MatdamageiceEnum){ 294 297 iomodel->FindConstant(&requestedoutputs,&numoutputs,"md.damage.requested_outputs"); -
issm/trunk/src/c/shared/Enum/EnumDefinitions.h
r22758 r22822 200 200 MasstransportRequestedOutputsEnum, 201 201 MasstransportStabilizationEnum, 202 MaterialsRhoIceEnum, 202 203 MeltingOffsetEnum, 203 204 MeshAverageVertexConnectivityEnum, … … 834 835 MaterialsRheologyLawEnum, 835 836 MaterialsRhoFreshwaterEnum, 836 MaterialsRhoIceEnum,837 837 MaterialsRhoSeawaterEnum, 838 838 MaterialsTemperateiceconductivityEnum, … … 855 855 MeltingAnalysisEnum, 856 856 MeshElementsEnum, 857 MeshLatEnum,858 MeshLongEnum,859 857 MeshXEnum, 860 858 MeshYEnum, -
issm/trunk/src/c/shared/Enum/EnumToStringx.cpp
r22758 r22822 208 208 case MasstransportRequestedOutputsEnum : return "MasstransportRequestedOutputs"; 209 209 case MasstransportStabilizationEnum : return "MasstransportStabilization"; 210 case MaterialsRhoIceEnum : return "MaterialsRhoIce"; 210 211 case MeltingOffsetEnum : return "MeltingOffset"; 211 212 case MeshAverageVertexConnectivityEnum : return "MeshAverageVertexConnectivity"; … … 838 839 case MaterialsRheologyLawEnum : return "MaterialsRheologyLaw"; 839 840 case MaterialsRhoFreshwaterEnum : return "MaterialsRhoFreshwater"; 840 case MaterialsRhoIceEnum : return "MaterialsRhoIce";841 841 case MaterialsRhoSeawaterEnum : return "MaterialsRhoSeawater"; 842 842 case MaterialsTemperateiceconductivityEnum : return "MaterialsTemperateiceconductivity"; … … 859 859 case MeltingAnalysisEnum : return "MeltingAnalysis"; 860 860 case MeshElementsEnum : return "MeshElements"; 861 case MeshLatEnum : return "MeshLat";862 case MeshLongEnum : return "MeshLong";863 861 case MeshXEnum : return "MeshX"; 864 862 case MeshYEnum : return "MeshY"; -
issm/trunk/src/c/shared/Enum/StringToEnumx.cpp
r22758 r22822 211 211 else if (strcmp(name,"MasstransportRequestedOutputs")==0) return MasstransportRequestedOutputsEnum; 212 212 else if (strcmp(name,"MasstransportStabilization")==0) return MasstransportStabilizationEnum; 213 else if (strcmp(name,"MaterialsRhoIce")==0) return MaterialsRhoIceEnum; 213 214 else if (strcmp(name,"MeltingOffset")==0) return MeltingOffsetEnum; 214 215 else if (strcmp(name,"MeshAverageVertexConnectivity")==0) return MeshAverageVertexConnectivityEnum; … … 259 260 else if (strcmp(name,"SealevelriseTidalLoveK")==0) return SealevelriseTidalLoveKEnum; 260 261 else if (strcmp(name,"SealevelriseTransitions")==0) return SealevelriseTransitionsEnum; 261 else if (strcmp(name,"SealevelriseUElastic")==0) return SealevelriseUElasticEnum;262 262 else stage=3; 263 263 } 264 264 if(stage==3){ 265 if (strcmp(name,"SettingsIoGather")==0) return SettingsIoGatherEnum; 265 if (strcmp(name,"SealevelriseUElastic")==0) return SealevelriseUElasticEnum; 266 else if (strcmp(name,"SettingsIoGather")==0) return SettingsIoGatherEnum; 266 267 else if (strcmp(name,"SettingsOutputFrequency")==0) return SettingsOutputFrequencyEnum; 267 268 else if (strcmp(name,"SettingsRecordingFrequency")==0) return SettingsRecordingFrequencyEnum; … … 382 383 else if (strcmp(name,"BasalforcingsPicoBasinId")==0) return BasalforcingsPicoBasinIdEnum; 383 384 else if (strcmp(name,"BasalforcingsPicoBoxId")==0) return BasalforcingsPicoBoxIdEnum; 384 else if (strcmp(name,"BasalforcingsPicoSubShelfOceanOverturning")==0) return BasalforcingsPicoSubShelfOceanOverturningEnum;385 385 else stage=4; 386 386 } 387 387 if(stage==4){ 388 if (strcmp(name,"BasalforcingsPicoSubShelfOceanSalinity")==0) return BasalforcingsPicoSubShelfOceanSalinityEnum; 388 if (strcmp(name,"BasalforcingsPicoSubShelfOceanOverturning")==0) return BasalforcingsPicoSubShelfOceanOverturningEnum; 389 else if (strcmp(name,"BasalforcingsPicoSubShelfOceanSalinity")==0) return BasalforcingsPicoSubShelfOceanSalinityEnum; 389 390 else if (strcmp(name,"BasalforcingsPicoSubShelfOceanTemp")==0) return BasalforcingsPicoSubShelfOceanTempEnum; 390 391 else if (strcmp(name,"Base")==0) return BaseEnum; … … 505 506 else if (strcmp(name,"Sealevel")==0) return SealevelEnum; 506 507 else if (strcmp(name,"SealevelriseDeltathickness")==0) return SealevelriseDeltathicknessEnum; 507 else if (strcmp(name,"SedimentHead")==0) return SedimentHeadEnum;508 508 else stage=5; 509 509 } 510 510 if(stage==5){ 511 if (strcmp(name,"SedimentHeadOld")==0) return SedimentHeadOldEnum; 511 if (strcmp(name,"SedimentHead")==0) return SedimentHeadEnum; 512 else if (strcmp(name,"SedimentHeadOld")==0) return SedimentHeadOldEnum; 512 513 else if (strcmp(name,"SedimentHeadResidual")==0) return SedimentHeadResidualEnum; 513 514 else if (strcmp(name,"SigmaNN")==0) return SigmaNNEnum; … … 628 629 else if (strcmp(name,"WaterfractionDrainageIntegrated")==0) return WaterfractionDrainageIntegratedEnum; 629 630 else if (strcmp(name,"Waterfraction")==0) return WaterfractionEnum; 630 else if (strcmp(name,"Waterheight")==0) return WaterheightEnum;631 631 else stage=6; 632 632 } 633 633 if(stage==6){ 634 if (strcmp(name,"WeightsSurfaceObservation")==0) return WeightsSurfaceObservationEnum; 634 if (strcmp(name,"Waterheight")==0) return WaterheightEnum; 635 else if (strcmp(name,"WeightsSurfaceObservation")==0) return WeightsSurfaceObservationEnum; 635 636 else if (strcmp(name,"InputsEND")==0) return InputsENDEnum; 636 637 else if (strcmp(name,"Absolute")==0) return AbsoluteEnum; … … 751 752 else if (strcmp(name,"GaussTetra")==0) return GaussTetraEnum; 752 753 else if (strcmp(name,"GaussTria")==0) return GaussTriaEnum; 753 else if (strcmp(name,"GenericOption")==0) return GenericOptionEnum;754 754 else stage=7; 755 755 } 756 756 if(stage==7){ 757 if (strcmp(name,"GenericParam")==0) return GenericParamEnum; 757 if (strcmp(name,"GenericOption")==0) return GenericOptionEnum; 758 else if (strcmp(name,"GenericParam")==0) return GenericParamEnum; 758 759 else if (strcmp(name,"GiadWdt")==0) return GiadWdtEnum; 759 760 else if (strcmp(name,"GiaIvinsAnalysis")==0) return GiaIvinsAnalysisEnum; … … 856 857 else if (strcmp(name,"MaterialsRheologyLaw")==0) return MaterialsRheologyLawEnum; 857 858 else if (strcmp(name,"MaterialsRhoFreshwater")==0) return MaterialsRhoFreshwaterEnum; 858 else if (strcmp(name,"MaterialsRhoIce")==0) return MaterialsRhoIceEnum;859 859 else if (strcmp(name,"MaterialsRhoSeawater")==0) return MaterialsRhoSeawaterEnum; 860 860 else if (strcmp(name,"MaterialsTemperateiceconductivity")==0) return MaterialsTemperateiceconductivityEnum; … … 880 880 if (strcmp(name,"MeltingAnalysis")==0) return MeltingAnalysisEnum; 881 881 else if (strcmp(name,"MeshElements")==0) return MeshElementsEnum; 882 else if (strcmp(name,"MeshLat")==0) return MeshLatEnum;883 else if (strcmp(name,"MeshLong")==0) return MeshLongEnum;884 882 else if (strcmp(name,"MeshX")==0) return MeshXEnum; 885 883 else if (strcmp(name,"MeshY")==0) return MeshYEnum; … … 998 996 else if (strcmp(name,"Outputdefinition90")==0) return Outputdefinition90Enum; 999 997 else if (strcmp(name,"Outputdefinition91")==0) return Outputdefinition91Enum; 998 else if (strcmp(name,"Outputdefinition92")==0) return Outputdefinition92Enum; 999 else if (strcmp(name,"Outputdefinition93")==0) return Outputdefinition93Enum; 1000 1000 else stage=9; 1001 1001 } 1002 1002 if(stage==9){ 1003 if (strcmp(name,"Outputdefinition92")==0) return Outputdefinition92Enum; 1004 else if (strcmp(name,"Outputdefinition93")==0) return Outputdefinition93Enum; 1005 else if (strcmp(name,"Outputdefinition94")==0) return Outputdefinition94Enum; 1003 if (strcmp(name,"Outputdefinition94")==0) return Outputdefinition94Enum; 1006 1004 else if (strcmp(name,"Outputdefinition95")==0) return Outputdefinition95Enum; 1007 1005 else if (strcmp(name,"Outputdefinition96")==0) return Outputdefinition96Enum; … … 1121 1119 else if (strcmp(name,"TransientParam")==0) return TransientParamEnum; 1122 1120 else if (strcmp(name,"TransientSolution")==0) return TransientSolutionEnum; 1121 else if (strcmp(name,"Tria")==0) return TriaEnum; 1122 else if (strcmp(name,"TriaInput")==0) return TriaInputEnum; 1123 1123 else stage=10; 1124 1124 } 1125 1125 if(stage==10){ 1126 if (strcmp(name,"Tria")==0) return TriaEnum; 1127 else if (strcmp(name,"TriaInput")==0) return TriaInputEnum; 1128 else if (strcmp(name,"UzawaPressureAnalysis")==0) return UzawaPressureAnalysisEnum; 1126 if (strcmp(name,"UzawaPressureAnalysis")==0) return UzawaPressureAnalysisEnum; 1129 1127 else if (strcmp(name,"VectorParam")==0) return VectorParamEnum; 1130 1128 else if (strcmp(name,"Vertex")==0) return VertexEnum; -
issm/trunk/src/c/shared/io/Marshalling/IoCodeConversions.cpp
r22758 r22822 16 16 const char* field = "md.geometry.thickness"; 17 17 input_enum = ThicknessEnum; 18 fieldname=xNew<char>((strlen(field)+1)); xMemCpy<char>(fieldname,field,(strlen(field)+1)); 19 } 20 else if(strcmp(string_in,"MaterialsRheologyBbar")==0){ 21 const char* field = "md.materials.rheology_B"; 22 input_enum = MaterialsRheologyBbarEnum; 18 23 fieldname=xNew<char>((strlen(field)+1)); xMemCpy<char>(fieldname,field,(strlen(field)+1)); 19 24 } … … 141 146 const char* field = "md.calving.stress_threshold_groundedice"; 142 147 input_enum = CalvingStressThresholdGroundediceEnum; 148 fieldname=xNew<char>((strlen(field)+1)); xMemCpy<char>(fieldname,field,(strlen(field)+1)); 149 } 150 else if(strcmp(string_in,"DamageDbar")==0){ 151 const char* field = "md.damage.D"; 152 input_enum = DamageDbarEnum; 143 153 fieldname=xNew<char>((strlen(field)+1)); xMemCpy<char>(fieldname,field,(strlen(field)+1)); 144 154 } -
issm/trunk/src/m/classes/clusters/generic.m
r22758 r22822 219 219 fid=fopen([modelname '.queue'],'w'); 220 220 fprintf(fid,'#!%s\n',cluster.shell); 221 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s : -np %i ./mitgcmuv\n',cluster.np,cluster.codepath,executable,solution,cluster.executionpath,modelname,cluster.npocean); 221 if ~isvalgrind, 222 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s : -np %i ./mitgcmuv\n',cluster.np,cluster.codepath,executable,solution,cluster.executionpath,modelname,cluster.npocean); 223 224 else 225 fprintf(fid,'mpiexec -np %i %s --leak-check=full --error-limit=no --dsymutil=yes --suppressions=%s %s/%s %s %s %s : -np %i ./mitgcmuv\n',... 226 cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,executable,solution,cluster.executionpath,modelname,cluster.npocean); 227 end 222 228 fclose(fid); 223 229 -
issm/trunk/src/m/classes/geometry.js
r21341 r22822 37 37 checkfield(md,'fieldname','geometry.thickness','NaN',1,'Inf',1,'size',[md.mesh.numberofvertices, 1],'>',0); 38 38 for(var i=0;i<md.mesh.numberofvertices;i++){ 39 if (Math.abs(md.geometry.thickness .thickness-md.geometry.surface+md.geometry.base)>Math.pow(10,9)){39 if (Math.abs(md.geometry.thickness[i]-md.geometry.surface[i]+md.geometry.base[i])>Math.pow(10,9)){ 40 40 md = checkmessage(md,'equality thickness=surface-base violated'); 41 41 break; -
issm/trunk/src/m/classes/slr.js
r22758 r22822 88 88 console.log(sprintf(' Sealevelrise solution parameters:')); 89 89 90 fielddisplay(this,'deltathickness','thickness change (main loading of the slr solution core[m]');90 fielddisplay(this,'deltathickness','thickness change: ice height equivalent [m]'); 91 91 fielddisplay(this,'sealevel','current sea level (prior to computation) [m]'); 92 92 fielddisplay(this,'reltol','sea level rise relative convergence criterion, (NaN: not applied)'); 93 fielddisplay(this,'abstol','sea level rise absolute convergence criterion, (default, NaN: not applied ');93 fielddisplay(this,'abstol','sea level rise absolute convergence criterion, (default, NaN: not applied)'); 94 94 fielddisplay(this,'maxiter','maximum number of nonlinear iterations'); 95 95 fielddisplay(this,'love_h','load Love number for radial displacement'); … … 105 105 fielddisplay(this,'elastic','elastic earth graviational potential perturbation'); 106 106 fielddisplay(this,'rotation','rotational earth potential perturbation'); 107 fielddisplay(this,'ocean_area_scaling','correction for model representation of ocean area [default: No correction]');108 fielddisplay(this,'steric_rate','rate of steric ocean expansion (in mm/yr)');107 fielddisplay(this,'ocean_area_scaling','correction for model representation of ocean area (default: No correction)'); 108 fielddisplay(this,'steric_rate','rate of steric ocean expansion [mm/yr]'); 109 109 fielddisplay(this,'degacc',"accuracy (default .01 deg) for numerical discretization of the Green's functions"); 110 110 fielddisplay(this,'transitions','indices into parts of the mesh that will be icecaps'); -
issm/trunk/src/m/classes/slr.m
r22758 r22822 122 122 disp(sprintf(' slr parameters:')); 123 123 124 fielddisplay(self,'deltathickness','thickness change (main loading of the slr solution core[m]');124 fielddisplay(self,'deltathickness','thickness change: ice height equivalent [m]'); 125 125 fielddisplay(self,'sealevel','current sea level (prior to computation) [m]'); 126 126 fielddisplay(self,'reltol','sea level rise relative convergence criterion, (NaN: not applied)'); 127 fielddisplay(self,'abstol','sea level rise absolute convergence criterion, (default, NaN: not applied ');127 fielddisplay(self,'abstol','sea level rise absolute convergence criterion, (default, NaN: not applied)'); 128 128 fielddisplay(self,'maxiter','maximum number of nonlinear iterations'); 129 129 fielddisplay(self,'love_h','load Love number for radial displacement'); … … 139 139 fielddisplay(self,'elastic','elastic earth graviational potential perturbation'); 140 140 fielddisplay(self,'rotation','earth rotational potential perturbation'); 141 fielddisplay(self,'ocean_area_scaling','correction for model representation of ocean area [default: No correction]');142 fielddisplay(self,'steric_rate','rate of steric ocean expansion (in mm/yr)');141 fielddisplay(self,'ocean_area_scaling','correction for model representation of ocean area (default: No correction)'); 142 fielddisplay(self,'steric_rate','rate of steric ocean expansion [mm/yr]'); 143 143 fielddisplay(self,'degacc','accuracy (default .01 deg) for numerical discretization of the Green''s functions'); 144 144 fielddisplay(self,'transitions','indices into parts of the mesh that will be icecaps'); -
issm/trunk/src/m/classes/slr.py
r22758 r22822 43 43 def __repr__(self): # {{{ 44 44 string=' slr parameters:' 45 string="%s\n%s"%(string,fielddisplay(self,'deltathickness','thickness change (main loading of the slr solution core[m]'))45 string="%s\n%s"%(string,fielddisplay(self,'deltathickness','thickness change: ice height equivalent [m]')) 46 46 string="%s\n%s"%(string,fielddisplay(self,'sealevel','current sea level (prior to computation) [m]')) 47 47 string="%s\n%s"%(string,fielddisplay(self,'reltol','sea level rise relative convergence criterion, (NaN: not applied)')) 48 string="%s\n%s"%(string,fielddisplay(self,'abstol','sea level rise absolute convergence criterion, (default, NaN: not applied '))48 string="%s\n%s"%(string,fielddisplay(self,'abstol','sea level rise absolute convergence criterion, (default, NaN: not applied)')) 49 49 string="%s\n%s"%(string,fielddisplay(self,'maxiter','maximum number of nonlinear iterations')) 50 50 string="%s\n%s"%(string,fielddisplay(self,'love_h','load Love number for radial displacement')) … … 60 60 string="%s\n%s"%(string,fielddisplay(self,'elastic','elastic earth graviational potential perturbation')) 61 61 string="%s\n%s"%(string,fielddisplay(self,'rotation','earth rotational potential perturbation')) 62 string="%s\n%s"%(string,fielddisplay(self,'ocean_area_scaling','correction for model representation of ocean area [default: No correction]'))63 string="%s\n%s"%(string,fielddisplay(self,'steric_rate','rate of steric ocean expansion (in mm/yr)'))62 string="%s\n%s"%(string,fielddisplay(self,'ocean_area_scaling','correction for model representation of ocean area (default: No correction)')) 63 string="%s\n%s"%(string,fielddisplay(self,'steric_rate','rate of steric ocean expansion [mm/yr]')) 64 64 string="%s\n%s"%(string,fielddisplay(self,'degacc','accuracy (default .01 deg) for numerical discretization of the Green''s functions')) 65 65 string="%s\n%s"%(string,fielddisplay(self,'transitions','indices into parts of the mesh that will be icecaps')) -
issm/trunk/src/m/dev/issmversion.m
r21729 r22822 17 17 disp(['Compiled on ' IssmConfig('HOST_VENDOR') ' ' IssmConfig('HOST_OS') ' ' IssmConfig('HOST_ARCH') ' by ' IssmConfig('USER_NAME')]); 18 18 disp([' ']); 19 disp(['Copyright (c) 2009-201 7California Institute of Technology']);19 disp(['Copyright (c) 2009-2018 California Institute of Technology']); 20 20 disp([' ']); 21 21 disp([' to get started type: issmdoc']); -
issm/trunk/src/m/dev/issmversion.py
r21729 r22822 15 15 print ' ' 16 16 print 'Build date: '+IssmConfig('PACKAGE_BUILD_DATE')[0] 17 print 'Copyright (c) 2009-201 7California Institute of Technology'17 print 'Copyright (c) 2009-2018 California Institute of Technology' 18 18 print ' ' 19 19 print ' to get started type: issmdoc' -
issm/trunk/src/m/mesh/planet/gmsh/gmshplanet.m
r22790 r22822 58 58 fprintf(fid,'Circle(12) = {6,1,2};\n'); 59 59 fprintf(fid,'Line Loop(13) = {2,8,-10};\n'); 60 fprintf(fid,' RuledSurface(14) = {13};\n');60 fprintf(fid,'Surface(14) = {13};\n'); 61 61 fprintf(fid,'Line Loop(15) = {10,3,7};\n'); 62 fprintf(fid,' RuledSurface(16) = {15};\n');62 fprintf(fid,'Surface(16) = {15};\n'); 63 63 fprintf(fid,'Line Loop(17) = {-8,-9,1};\n'); 64 fprintf(fid,' RuledSurface(18) = {17};\n');64 fprintf(fid,'Surface(18) = {17};\n'); 65 65 fprintf(fid,'Line Loop(19) = {-11,-2,5};\n'); 66 fprintf(fid,' RuledSurface(20) = {19};\n');66 fprintf(fid,'Surface(20) = {19};\n'); 67 67 fprintf(fid,'Line Loop(21) = {-5,-12,-1};\n'); 68 fprintf(fid,' RuledSurface(22) = {21};\n');68 fprintf(fid,'Surface(22) = {21};\n'); 69 69 fprintf(fid,'Line Loop(23) = {-3,11,6};\n'); 70 fprintf(fid,' RuledSurface(24) = {23};\n');70 fprintf(fid,'Surface(24) = {23};\n'); 71 71 fprintf(fid,'Line Loop(25) = {-7,4,9};\n'); 72 fprintf(fid,' RuledSurface(26) = {25};\n');72 fprintf(fid,'Surface(26) = {25};\n'); 73 73 fprintf(fid,'Line Loop(27) = {-4,12,-6};\n'); 74 fprintf(fid,' RuledSurface(28) = {27};\n');74 fprintf(fid,'Surface(28) = {27};\n'); 75 75 fprintf(fid,'Surface Loop(29) = {28,26,16,14,20,24,22,18};\n'); 76 76 fprintf(fid,'Volume(30) = {29};\n'); … … 107 107 for i=paths 108 108 if exist(i{1},'file'), 109 gmshpath = i{1} 110 break; 109 gmshpath = i{1}; 111 110 end 112 111 end -
issm/trunk/src/m/mesh/planet/gmsh/gmshplanet.py
r21729 r22822 64 64 fid.write('Circle(12) = {6,1,2};\n') 65 65 fid.write('Line Loop(13) = {2,8,-10};\n') 66 fid.write(' RuledSurface(14) = {13};\n')66 fid.write('Surface(14) = {13};\n') 67 67 fid.write('Line Loop(15) = {10,3,7};\n') 68 fid.write(' RuledSurface(16) = {15};\n')68 fid.write('Surface(16) = {15};\n') 69 69 fid.write('Line Loop(17) = {-8,-9,1};\n') 70 fid.write(' RuledSurface(18) = {17};\n')70 fid.write('Surface(18) = {17};\n') 71 71 fid.write('Line Loop(19) = {-11,-2,5};\n') 72 fid.write(' RuledSurface(20) = {19};\n')72 fid.write('Surface(20) = {19};\n') 73 73 fid.write('Line Loop(21) = {-5,-12,-1};\n') 74 fid.write(' RuledSurface(22) = {21};\n')74 fid.write('Surface(22) = {21};\n') 75 75 fid.write('Line Loop(23) = {-3,11,6};\n') 76 fid.write(' RuledSurface(24) = {23};\n')76 fid.write('Surface(24) = {23};\n') 77 77 fid.write('Line Loop(25) = {-7,4,9};\n') 78 fid.write(' RuledSurface(26) = {25};\n')78 fid.write('Surface(26) = {25};\n') 79 79 fid.write('Line Loop(27) = {-4,12,-6};\n') 80 fid.write(' RuledSurface(28) = {27};\n')80 fid.write('Surface(28) = {27};\n') 81 81 fid.write('Surface Loop(29) = {28,26,16,14,20,24,22,18};\n') 82 82 fid.write('Volume(30) = {29};\n') -
issm/trunk/test
- Property svn:mergeinfo changed
/issm/trunk-jpl/test merged: 22759,22797
- Property svn:mergeinfo changed
-
issm/trunk/test/MITgcm/code/cpl_issm.F
r22758 r22822 159 159 DO j=1,sNy 160 160 DO i=1,sNx 161 local(i,j,bi,bj) = shelficeHeatFlux(i,j,bi,bj)161 local(i,j,bi,bj)=shelficeFreshWaterFlux(i,j,bi,bj) 162 162 ENDDO 163 163 ENDDO … … 175 175 ENDIF 176 176 CALL BAR2( myThid ) 177 print*,'Done Sending shelfice HeatFlux array.'177 print*,'Done Sending shelficeFreshWaterFlux array.' 178 178 179 179 ENDIF
Note:
See TracChangeset
for help on using the changeset viewer.