Changeset 14 for trunk/src/sinobad.h
- Timestamp:
- 03/18/11 17:35:53 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sinobad.h
r9 r14 856 856 } 857 857 858 //Gestion des fichiers netcdf 858 859 859 860 void xrst_save(int argc, char *argv[]) { 861 //Sauvegarde un restart 860 862 if (argc!=2) 861 863 { … … 876 878 } 877 879 } 880 881 void xwriteout (int argc, char *argv[]) { 882 //xwriteout t suff ncfile 883 //Ecrit dans le fichier ncfile les variables u,v,t,s,ssh avec le suffixe suff au pas de temps t 884 if (argc!=4) 885 { 886 printf("\n not enough arguments in writeout\n"); 887 exit(1); 888 } 889 890 int t; 891 char suff[200]; 892 char ncfile[200]; 893 int ncfile_id; 894 t=atoi(argv[1]); 895 strcpy(suff,argv[2]); 896 strcpy(ncfile,argv[3]); 897 ncfile_id=Ouvre_nc_add(ncfile); 898 write_out_var(t,ncfile_id,suff); 899 nc_close(ncfile_id); 900 901 } 902 903 void xinitnc(int argc,char *argv[]) { 904 //xinit ncfile 905 //init le fichier netcdf pour sauvegarde 906 if (argc!=2) 907 { 908 printf("\ncf file for saving output not specified in command xinitnc\n"); 909 exit(1); 910 } 911 else 912 { 913 char ncfile[200]; 914 int nc_file_id; 915 int dimid[4]; 916 strcpy(ncfile,argv[1]); 917 nc_file_id=Ouvre_nc_write(ncfile); 918 define_dim(nc_file_id,dimid); 919 write_out_var_init(nc_file_id,dimid); 920 nc_close(nc_file_id); 921 } 922 923 }
Note: See TracChangeset
for help on using the changeset viewer.