1 |
|
|
2 |
#include "CPP_OPTIONS.h" |
#include "AUTODIFF_OPTIONS.h" |
3 |
|
|
4 |
c ================================================================== |
c ================================================================== |
5 |
c |
c |
25 |
c o active_write_tile_xy - Write an active 2D variable to a file. |
c o active_write_tile_xy - Write an active 2D variable to a file. |
26 |
c o active_write_tile_xyz - Write an active 3D variable to a file. |
c o active_write_tile_xyz - Write an active 3D variable to a file. |
27 |
c |
c |
28 |
|
c o active_read_profile - Read an active 1D record. |
29 |
|
c o active_write_profile - Write an active 1D record. |
30 |
|
c |
31 |
c |
c |
32 |
c changed: Christian Eckert eckert@mit.edu 24-Apr-2000 |
c changed: Christian Eckert eckert@mit.edu 24-Apr-2000 |
33 |
c - Added routines that do active writes on tiles |
c - Added routines that do active writes on tiles |
236 |
c == end of interface == |
c == end of interface == |
237 |
CEOP |
CEOP |
238 |
|
|
239 |
mynr = 1 |
mynr = nr |
240 |
call active_read_xz_rl( active_var_file, active_var, doglobalread, |
call active_read_xz_rl( active_var_file, active_var, doglobalread, |
241 |
& lAdInit, irec, mynr, |
& lAdInit, irec, mynr, |
242 |
& FORWARD_SIMULATION, myOptimIter, mythid) |
& FORWARD_SIMULATION, myOptimIter, mythid) |
306 |
c == end of interface == |
c == end of interface == |
307 |
CEOP |
CEOP |
308 |
|
|
309 |
mynr = 1 |
mynr = nr |
310 |
call active_read_yz_rl( active_var_file, active_var, doglobalread, |
call active_read_yz_rl( active_var_file, active_var, doglobalread, |
311 |
& lAdInit, irec, mynr, |
& lAdInit, irec, mynr, |
312 |
& FORWARD_SIMULATION, myOptimIter, mythid) |
& FORWARD_SIMULATION, myOptimIter, mythid) |
492 |
c == end of interface == |
c == end of interface == |
493 |
CEOP |
CEOP |
494 |
|
|
495 |
mynr = 1 |
mynr = nr |
496 |
globalfile = .false. |
globalfile = .false. |
497 |
|
|
498 |
call active_write_xz_rl( active_var_file, active_var, globalfile, |
call active_write_xz_rl( active_var_file, active_var, globalfile, |
555 |
c == end of interface == |
c == end of interface == |
556 |
CEOP |
CEOP |
557 |
|
|
558 |
mynr = 1 |
mynr = nr |
559 |
globalfile = .false. |
globalfile = .false. |
560 |
|
|
561 |
call active_write_yz_rl( active_var_file, active_var, globalfile, |
call active_write_yz_rl( active_var_file, active_var, globalfile, |
873 |
|
|
874 |
return |
return |
875 |
end |
end |
876 |
|
|
877 |
|
C !ROUTINE: active_read_profile |
878 |
|
C !INTERFACE: |
879 |
|
subroutine active_read_profile( |
880 |
|
I active_num_file, |
881 |
|
I nactive_var, |
882 |
|
O active_var, |
883 |
|
I active_varnum, |
884 |
|
I irec, |
885 |
|
I lAdInit, |
886 |
|
I myOptimIter, |
887 |
|
I mythid, |
888 |
|
I dummy |
889 |
|
& ) |
890 |
|
|
891 |
|
c ================================================================== |
892 |
|
c SUBROUTINE active_read_profile |
893 |
|
c ================================================================== |
894 |
|
c o Read an active 1D record from an profile data file. |
895 |
|
c ================================================================== |
896 |
|
|
897 |
|
implicit none |
898 |
|
c == global variables == |
899 |
|
#include "EEPARAMS.h" |
900 |
|
#include "SIZE.h" |
901 |
|
#include "profiles.h" |
902 |
|
|
903 |
|
c == routine arguments == |
904 |
|
c active_var_file: filename |
905 |
|
c nactive_var: integer size of active_var |
906 |
|
c active_var: array |
907 |
|
c active_varname: name fo the quantity to save |
908 |
|
c irec: record number |
909 |
|
c myOptimIter: number of optimization iteration (default: 0) |
910 |
|
c mythid: thread number for this instance |
911 |
|
c lAdInit: initialisation of corresponding adjoint |
912 |
|
c variable and write to active file |
913 |
|
integer nactive_var,active_num_file |
914 |
|
_RL active_var(nactive_var) |
915 |
|
integer irec,active_varnum |
916 |
|
integer myOptimIter |
917 |
|
integer mythid |
918 |
|
logical lAdInit |
919 |
|
_RL dummy |
920 |
|
|
921 |
|
|
922 |
|
call active_read_profile_rl( fidforward(active_num_file), |
923 |
|
& active_num_file, |
924 |
|
& nactive_var, active_var, active_varnum, lAdInit, |
925 |
|
& irec, prof_ind_glob(active_num_file,irec), |
926 |
|
& FORWARD_SIMULATION, myOptimIter, mythid) |
927 |
|
|
928 |
|
return |
929 |
|
end |
930 |
|
|
931 |
|
c ================================================================== |
932 |
|
c ================================================================== |
933 |
|
c ================================================================== |
934 |
|
|
935 |
|
C !ROUTINE: active_write_profile |
936 |
|
C !INTERFACE: |
937 |
|
subroutine active_write_profile( |
938 |
|
I active_num_file, |
939 |
|
I nactive_var, |
940 |
|
I active_var, |
941 |
|
I active_varnum, |
942 |
|
I irec, |
943 |
|
I myOptimIter, |
944 |
|
I mythid, |
945 |
|
I dummy |
946 |
|
& ) |
947 |
|
|
948 |
|
C !DESCRIPTION: \bv |
949 |
|
c ================================================================== |
950 |
|
c SUBROUTINE active_write_profile |
951 |
|
c ================================================================== |
952 |
|
c o Write an active 1D record from file. |
953 |
|
c ================================================================== |
954 |
|
|
955 |
|
C !USES: |
956 |
|
implicit none |
957 |
|
|
958 |
|
c == global variables == |
959 |
|
#include "EEPARAMS.h" |
960 |
|
#include "SIZE.h" |
961 |
|
#include "profiles.h" |
962 |
|
|
963 |
|
c == routine arguments == |
964 |
|
c active_var_file: filename |
965 |
|
c nactive_var: integer size of active_var |
966 |
|
c active_var: array |
967 |
|
c active_varname: name fo the quantity to save |
968 |
|
c irec: record number |
969 |
|
c myOptimIter: number of optimization iteration (default: 0) |
970 |
|
c mythid: thread number for this instance |
971 |
|
integer nactive_var,active_num_file, active_varnum |
972 |
|
_RL active_var(nactive_var) |
973 |
|
integer irec |
974 |
|
integer myOptimIter |
975 |
|
integer mythid |
976 |
|
_RL dummy |
977 |
|
|
978 |
|
call active_write_profile_rl( fidforward(active_num_file), |
979 |
|
& active_num_file, |
980 |
|
& nactive_var, active_var, active_varnum, |
981 |
|
& irec, prof_ind_glob(active_num_file,irec), |
982 |
|
& FORWARD_SIMULATION, myOptimIter, mythid) |
983 |
|
|
984 |
|
return |
985 |
|
end |
986 |
|
|
987 |
|
c ================================================================== |
988 |
|
|
989 |
|
|