Changeset 15141
- Timestamp:
- 2021-07-23T16:20:12+02:00 (4 years ago)
- Location:
- NEMO/trunk/src/OCE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/DIA/diawri.F90
r15136 r15141 583 583 REAL(wp) :: zsto, zout, zmax, zjulian ! local scalars 584 584 ! 585 REAL(wp), DIMENSION(jpi,jpj ) :: zw2d! 2D workspace586 REAL(wp), DIMENSION(jpi,jpj,jpk) :: z w3d, ze3t, zgdept! 3D workspace585 REAL(wp), DIMENSION(jpi,jpj ) :: z2d ! 2D workspace 586 REAL(wp), DIMENSION(jpi,jpj,jpk) :: z3d ! 3D workspace 587 587 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zw3d_abl ! ABL 3D workspace 588 588 !!---------------------------------------------------------------------- … … 624 624 it = kt 625 625 itmod = kt - nit000 + 1 626 627 ! store e3t for subsitute628 DO jk = 1, jpk629 ze3t (:,:,jk) = e3t (:,:,jk,Kmm)630 zgdept(:,:,jk) = gdept(:,:,jk,Kmm)631 END DO632 633 626 634 627 ! 1. Define NETCDF files and fields at beginning of first time step … … 944 937 945 938 IF( .NOT.ln_linssh ) THEN 946 CALL histwrite( nid_T, "votemper", it, ts(:,:,:,jp_tem,Kmm) * ze3t(:,:,:) , ndim_T , ndex_T ) ! heat content 947 CALL histwrite( nid_T, "vosaline", it, ts(:,:,:,jp_sal,Kmm) * ze3t(:,:,:) , ndim_T , ndex_T ) ! salt content 948 CALL histwrite( nid_T, "sosstsst", it, ts(:,:,1,jp_tem,Kmm) * ze3t(:,:,1) , ndim_hT, ndex_hT ) ! sea surface heat content 949 CALL histwrite( nid_T, "sosaline", it, ts(:,:,1,jp_sal,Kmm) * ze3t(:,:,1) , ndim_hT, ndex_hT ) ! sea surface salinity content 939 DO_3D( 0, 0, 0, 0, 1, jpk ) 940 z3d(ji,jj,jk) = ts(ji,jj,jk,jp_tem,Kmm) * e3t(ji,jj,jk,Kmm) 941 END_3D 942 CALL histwrite( nid_T, "votemper", it, z3d, ndim_T , ndex_T ) ! heat content 943 DO_3D( 0, 0, 0, 0, 1, jpk ) 944 z3d(ji,jj,jk) = ts(ji,jj,jk,jp_sal,Kmm) * e3t(ji,jj,jk,Kmm) 945 END_3D 946 CALL histwrite( nid_T, "vosaline", it, z3d, ndim_T , ndex_T ) ! salt content 947 DO_2D( 0, 0, 0, 0 ) 948 z2d(ji,jj ) = ts(ji,jj, 1,jp_tem,Kmm) * e3t(ji,jj, 1,Kmm) 949 END_2D 950 CALL histwrite( nid_T, "sosstsst", it, z2d, ndim_hT, ndex_hT ) ! sea surface heat content 951 DO_2D( 0, 0, 0, 0 ) 952 z2d(ji,jj ) = ts(ji,jj, 1,jp_sal,Kmm) * e3t(ji,jj, 1,Kmm) 953 END_2D 954 CALL histwrite( nid_T, "sosaline", it, z2d, ndim_hT, ndex_hT ) ! sea surface salinity content 950 955 ELSE 951 956 CALL histwrite( nid_T, "votemper", it, ts(:,:,:,jp_tem,Kmm) , ndim_T , ndex_T ) ! temperature … … 955 960 ENDIF 956 961 IF( .NOT.ln_linssh ) THEN 957 zw3d(:,:,:) = ( ( ze3t(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2 958 CALL histwrite( nid_T, "vovvle3t", it, ze3t (:,:,:) , ndim_T , ndex_T ) ! level thickness 959 CALL histwrite( nid_T, "vovvldep", it, zgdept , ndim_T , ndex_T ) ! t-point depth 960 CALL histwrite( nid_T, "vovvldef", it, zw3d , ndim_T , ndex_T ) ! level thickness deformation 961 ENDIF 962 CALL histwrite( nid_T, "sossheig", it, ssh(:,:,Kmm) , ndim_hT, ndex_hT ) ! sea surface height 963 CALL histwrite( nid_T, "sowaflup", it, ( emp-rnf ) , ndim_hT, ndex_hT ) ! upward water flux 962 DO_3D( 0, 0, 0, 0, 1, jpk ) 963 z3d(ji,jj,jk) = e3t(ji,jj,jk,Kmm) ! 3D workspace for qco substitution 964 END_3D 965 CALL histwrite( nid_T, "vovvle3t", it, z3d , ndim_T , ndex_T ) ! level thickness 966 DO_3D( 0, 0, 0, 0, 1, jpk ) 967 z3d(ji,jj,jk) = gdept(ji,jj,jk,Kmm) ! 3D workspace for qco substitution 968 END_3D 969 CALL histwrite( nid_T, "vovvldep", it, z3d , ndim_T , ndex_T ) ! t-point depth 970 DO_3D( 0, 0, 0, 0, 1, jpk ) 971 z3d(ji,jj,jk) = ( ( e3t(ji,jj,jk,Kmm) - e3t_0(ji,jj,jk) ) / e3t_0(ji,jj,jk) * 100._wp * tmask(ji,jj,jk) ) ** 2 972 END_3D 973 CALL histwrite( nid_T, "vovvldef", it, z3d , ndim_T , ndex_T ) ! level thickness deformation 974 ENDIF 975 CALL histwrite( nid_T, "sossheig", it, ssh(:,:,Kmm) , ndim_hT, ndex_hT ) ! sea surface height 976 DO_2D( 0, 0, 0, 0 ) 977 z2d(ji,jj) = emp(ji,jj) - rnf(ji,jj) 978 END_2D 979 CALL histwrite( nid_T, "sowaflup", it, z2d , ndim_hT, ndex_hT ) ! upward water flux 964 980 CALL histwrite( nid_T, "sorunoff", it, rnf , ndim_hT, ndex_hT ) ! river runoffs 965 981 CALL histwrite( nid_T, "sosfldow", it, sfx , ndim_hT, ndex_hT ) ! downward salt flux … … 967 983 ! in linear free surface case) 968 984 IF( ln_linssh ) THEN 969 zw2d(:,:) = emp (:,:) * ts(:,:,1,jp_tem,Kmm) 970 CALL histwrite( nid_T, "sosst_cd", it, zw2d, ndim_hT, ndex_hT ) ! c/d term on sst 971 zw2d(:,:) = emp (:,:) * ts(:,:,1,jp_sal,Kmm) 972 CALL histwrite( nid_T, "sosss_cd", it, zw2d, ndim_hT, ndex_hT ) ! c/d term on sss 973 ENDIF 974 CALL histwrite( nid_T, "sohefldo", it, qns + qsr , ndim_hT, ndex_hT ) ! total heat flux 985 DO_2D( 0, 0, 0, 0 ) 986 z2d(ji,jj) = emp (ji,jj) * ts(ji,jj,1,jp_tem,Kmm) 987 END_2D 988 CALL histwrite( nid_T, "sosst_cd", it, z2d, ndim_hT, ndex_hT ) ! c/d term on sst 989 DO_2D( 0, 0, 0, 0 ) 990 z2d(ji,jj) = emp (ji,jj) * ts(ji,jj,1,jp_sal,Kmm) 991 END_2D 992 CALL histwrite( nid_T, "sosss_cd", it, z2d, ndim_hT, ndex_hT ) ! c/d term on sss 993 ENDIF 994 DO_2D( 0, 0, 0, 0 ) 995 z2d(ji,jj) = qsr(ji,jj) + qns(ji,jj) 996 END_2D 997 CALL histwrite( nid_T, "sohefldo", it, z2d , ndim_hT, ndex_hT ) ! total heat flux 975 998 CALL histwrite( nid_T, "soshfldo", it, qsr , ndim_hT, ndex_hT ) ! solar heat flux 976 999 IF( ALLOCATED(hmld) ) THEN ! zdf_mxl not called by SWE … … 1030 1053 CALL histwrite( nid_T, "sohefldp", it, qrp , ndim_hT, ndex_hT ) ! heat flux damping 1031 1054 CALL histwrite( nid_T, "sowafldp", it, erp , ndim_hT, ndex_hT ) ! freshwater flux damping 1032 zw2d(:,:) = erp(:,:) * ts(:,:,1,jp_sal,Kmm) * tmask(:,:,1) 1033 CALL histwrite( nid_T, "sosafldp", it, zw2d , ndim_hT, ndex_hT ) ! salt flux damping 1055 DO_2D( 0, 0, 0, 0 ) 1056 z2d(ji,jj) = erp(ji,jj) * ts(ji,jj,1,jp_sal,Kmm) * tmask(ji,jj,1) 1057 END_2D 1058 CALL histwrite( nid_T, "sosafldp", it, z2d , ndim_hT, ndex_hT ) ! salt flux damping 1034 1059 ENDIF 1035 1060 ! zw2d(:,:) = FLOAT( nmln(:,:) ) * tmask(:,:,1) … … 1043 1068 #endif 1044 1069 1045 CALL histwrite( nid_U, "vozocrtx", it, uu(:,:,:,Kmm) 1070 CALL histwrite( nid_U, "vozocrtx", it, uu(:,:,:,Kmm) , ndim_U , ndex_U ) ! i-current 1046 1071 CALL histwrite( nid_U, "sozotaux", it, utau , ndim_hU, ndex_hU ) ! i-wind stress 1047 1072 1048 CALL histwrite( nid_V, "vomecrty", it, vv(:,:,:,Kmm) 1073 CALL histwrite( nid_V, "vomecrty", it, vv(:,:,:,Kmm) , ndim_V , ndex_V ) ! j-current 1049 1074 CALL histwrite( nid_V, "sometauy", it, vtau , ndim_hV, ndex_hV ) ! j-wind stress 1050 1075 1051 1076 IF( ln_zad_Aimp ) THEN 1052 CALL histwrite( nid_W, "vovecrtz", it, ww + wi , ndim_T, ndex_T ) ! vert. current 1077 DO_3D( 0, 0, 0, 0, 1, jpk ) 1078 z3d(ji,jj,jk) = ww(ji,jj,jk) + wi(ji,jj,jk) 1079 END_3D 1080 CALL histwrite( nid_W, "vovecrtz", it, z3d , ndim_T, ndex_T ) ! vert. current 1053 1081 ELSE 1054 1082 CALL histwrite( nid_W, "vovecrtz", it, ww , ndim_T, ndex_T ) ! vert. current … … 1097 1125 CHARACTER (len=* ), INTENT( in ) :: cdfile_name ! name of the file created 1098 1126 !! 1099 INTEGER :: inum, jk 1100 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t, zgdept ! 3D workspace for qco substitution 1127 INTEGER :: ji, jj, jk ! dummy loop indices 1128 INTEGER :: inum 1129 REAL(wp), DIMENSION(jpi,jpj) :: z2d 1130 REAL(wp), DIMENSION(jpi,jpj,jpk) :: z3d 1101 1131 !!---------------------------------------------------------------------- 1102 1132 ! … … 1108 1138 ENDIF 1109 1139 ! 1110 DO jk = 1, jpk1111 ze3t(:,:,jk) = e3t(:,:,jk,Kmm)1112 zgdept(:,:,jk) = gdept(:,:,jk,Kmm)1113 END DO1114 !1115 1140 CALL iom_open( TRIM(cdfile_name), inum, ldwrt = .TRUE. ) 1116 1141 ! 1117 1142 CALL iom_rstput( 0, 0, inum, 'votemper', ts(:,:,:,jp_tem,Kmm) ) ! now temperature 1118 1143 CALL iom_rstput( 0, 0, inum, 'vosaline', ts(:,:,:,jp_sal,Kmm) ) ! now salinity 1119 CALL iom_rstput( 0, 0, inum, 'sossheig', ssh(:,:,Kmm) 1120 CALL iom_rstput( 0, 0, inum, 'vozocrtx', uu(:,:,:,Kmm) 1121 CALL iom_rstput( 0, 0, inum, 'vomecrty', vv(:,:,:,Kmm) 1144 CALL iom_rstput( 0, 0, inum, 'sossheig', ssh(:,:,Kmm) ) ! sea surface height 1145 CALL iom_rstput( 0, 0, inum, 'vozocrtx', uu(:,:,:,Kmm) ) ! now i-velocity 1146 CALL iom_rstput( 0, 0, inum, 'vomecrty', vv(:,:,:,Kmm) ) ! now j-velocity 1122 1147 IF( ln_zad_Aimp ) THEN 1123 CALL iom_rstput( 0, 0, inum, 'vovecrtz', ww + wi ) ! now k-velocity 1148 DO_3D( 0, 0, 0, 0, 1, jpk ) 1149 z3d(ji,jj,jk) = ww(ji,jj,jk) + wi(ji,jj,jk) 1150 END_3D 1151 CALL iom_rstput( 0, 0, inum, 'vovecrtz', z3d ) ! now k-velocity 1124 1152 ELSE 1125 1153 CALL iom_rstput( 0, 0, inum, 'vovecrtz', ww ) ! now k-velocity 1126 1154 ENDIF 1127 CALL iom_rstput( 0, 0, inum, 'risfdep', risfdep ) ! now k-velocity1155 CALL iom_rstput( 0, 0, inum, 'risfdep', risfdep ) 1128 1156 CALL iom_rstput( 0, 0, inum, 'ht' , ht(:,:) ) ! now water column height 1129 1157 ! 1130 1158 IF ( ln_isf ) THEN 1131 1159 IF (ln_isfcav_mlt) THEN 1132 CALL iom_rstput( 0, 0, inum, 'fwfisf_cav', fwfisf_cav ) ! now k-velocity1133 CALL iom_rstput( 0, 0, inum, 'rhisf_cav_tbl', rhisf_tbl_cav ) ! now k-velocity1134 CALL iom_rstput( 0, 0, inum, 'rfrac_cav_tbl', rfrac_tbl_cav ) ! now k-velocity1135 CALL iom_rstput( 0, 0, inum, 'misfkb_cav', REAL(misfkb_cav,wp) ) ! now k-velocity1136 CALL iom_rstput( 0, 0, inum, 'misfkt_cav', REAL(misfkt_cav,wp) ) ! now k-velocity1160 CALL iom_rstput( 0, 0, inum, 'fwfisf_cav', fwfisf_cav ) 1161 CALL iom_rstput( 0, 0, inum, 'rhisf_cav_tbl', rhisf_tbl_cav ) 1162 CALL iom_rstput( 0, 0, inum, 'rfrac_cav_tbl', rfrac_tbl_cav ) 1163 CALL iom_rstput( 0, 0, inum, 'misfkb_cav', REAL(misfkb_cav,wp) ) 1164 CALL iom_rstput( 0, 0, inum, 'misfkt_cav', REAL(misfkt_cav,wp) ) 1137 1165 CALL iom_rstput( 0, 0, inum, 'mskisf_cav', REAL(mskisf_cav,wp), ktype = jp_i1 ) 1138 1166 END IF 1139 1167 IF (ln_isfpar_mlt) THEN 1140 CALL iom_rstput( 0, 0, inum, 'isfmsk_par', REAL(mskisf_par,wp) ) ! now k-velocity1141 CALL iom_rstput( 0, 0, inum, 'fwfisf_par', fwfisf_par ) ! now k-velocity1142 CALL iom_rstput( 0, 0, inum, 'rhisf_par_tbl', rhisf_tbl_par ) ! now k-velocity1143 CALL iom_rstput( 0, 0, inum, 'rfrac_par_tbl', rfrac_tbl_par ) ! now k-velocity1144 CALL iom_rstput( 0, 0, inum, 'misfkb_par', REAL(misfkb_par,wp) ) ! now k-velocity1145 CALL iom_rstput( 0, 0, inum, 'misfkt_par', REAL(misfkt_par,wp) ) ! now k-velocity1168 CALL iom_rstput( 0, 0, inum, 'isfmsk_par', REAL(mskisf_par,wp) ) 1169 CALL iom_rstput( 0, 0, inum, 'fwfisf_par', fwfisf_par ) 1170 CALL iom_rstput( 0, 0, inum, 'rhisf_par_tbl', rhisf_tbl_par ) 1171 CALL iom_rstput( 0, 0, inum, 'rfrac_par_tbl', rfrac_tbl_par ) 1172 CALL iom_rstput( 0, 0, inum, 'misfkb_par', REAL(misfkb_par,wp) ) 1173 CALL iom_rstput( 0, 0, inum, 'misfkt_par', REAL(misfkt_par,wp) ) 1146 1174 CALL iom_rstput( 0, 0, inum, 'mskisf_par', REAL(mskisf_par,wp), ktype = jp_i1 ) 1147 1175 END IF … … 1156 1184 CALL iom_rstput( 0, 0, inum, 'ahmf', ahmf ) ! ahmf at v-point 1157 1185 ENDIF 1158 CALL iom_rstput( 0, 0, inum, 'sowaflup', emp - rnf ) ! freshwater budget 1159 CALL iom_rstput( 0, 0, inum, 'sohefldo', qsr + qns ) ! total heat flux 1186 DO_2D( 0, 0, 0, 0 ) 1187 z2d(ji,jj) = emp(ji,jj) - rnf(ji,jj) 1188 END_2D 1189 CALL iom_rstput( 0, 0, inum, 'sowaflup', z2d ) ! freshwater budget 1190 DO_2D( 0, 0, 0, 0 ) 1191 z2d(ji,jj) = qsr(ji,jj) + qns(ji,jj) 1192 END_2D 1193 CALL iom_rstput( 0, 0, inum, 'sohefldo', z2d ) ! total heat flux 1160 1194 CALL iom_rstput( 0, 0, inum, 'soshfldo', qsr ) ! solar heat flux 1161 1195 CALL iom_rstput( 0, 0, inum, 'soicecov', fr_i ) ! ice fraction 1162 1196 CALL iom_rstput( 0, 0, inum, 'sozotaux', utau ) ! i-wind stress 1163 1197 CALL iom_rstput( 0, 0, inum, 'sometauy', vtau ) ! j-wind stress 1164 IF( .NOT.ln_linssh ) THEN 1165 CALL iom_rstput( 0, 0, inum, 'vovvldep', zgdept ) ! T-cell depth 1166 CALL iom_rstput( 0, 0, inum, 'vovvle3t', ze3t ) ! T-cell thickness 1198 IF( .NOT.ln_linssh ) THEN 1199 DO_3D( 0, 0, 0, 0, 1, jpk ) 1200 z3d(ji,jj,jk) = gdept(ji,jj,jk,Kmm) ! 3D workspace for qco substitution 1201 END_3D 1202 CALL iom_rstput( 0, 0, inum, 'vovvldep', z3d ) ! T-cell depth 1203 DO_3D( 0, 0, 0, 0, 1, jpk ) 1204 z3d(ji,jj,jk) = e3t(ji,jj,jk,Kmm) ! 3D workspace for qco substitution 1205 END_3D 1206 CALL iom_rstput( 0, 0, inum, 'vovvle3t', z3d ) ! T-cell thickness 1167 1207 END IF 1168 1208 IF( ln_wave .AND. ln_sdw ) THEN -
NEMO/trunk/src/OCE/IOM/restart.F90
r15136 r15141 162 162 ! 163 163 IF( .NOT.ln_diurnal_only ) THEN 164 CALL iom_rstput( kt, nitrst, numrow, 'sshb' 165 CALL iom_rstput( kt, nitrst, numrow, 'ub' 166 CALL iom_rstput( kt, nitrst, numrow, 'vb' 164 CALL iom_rstput( kt, nitrst, numrow, 'sshb', ssh(:,: ,Kbb) ) ! before fields 165 CALL iom_rstput( kt, nitrst, numrow, 'ub' , uu(:,:,: ,Kbb) ) 166 CALL iom_rstput( kt, nitrst, numrow, 'vb' , vv(:,:,: ,Kbb) ) 167 167 CALL iom_rstput( kt, nitrst, numrow, 'tb' , ts(:,:,:,jp_tem,Kbb) ) 168 168 CALL iom_rstput( kt, nitrst, numrow, 'sb' , ts(:,:,:,jp_sal,Kbb) ) 169 169 ! 170 170 #if ! defined key_RK3 171 CALL iom_rstput( kt, nitrst, numrow, 'sshn' 172 CALL iom_rstput( kt, nitrst, numrow, 'un' 173 CALL iom_rstput( kt, nitrst, numrow, 'vn' 171 CALL iom_rstput( kt, nitrst, numrow, 'sshn', ssh(:,: ,Kmm) ) ! now fields 172 CALL iom_rstput( kt, nitrst, numrow, 'un' , uu(:,:,: ,Kmm) ) 173 CALL iom_rstput( kt, nitrst, numrow, 'vn' , vv(:,:,: ,Kmm) ) 174 174 CALL iom_rstput( kt, nitrst, numrow, 'tn' , ts(:,:,:,jp_tem,Kmm) ) 175 175 CALL iom_rstput( kt, nitrst, numrow, 'sn' , ts(:,:,:,jp_sal,Kmm) ) … … 282 282 ! !* Read Kbb fields (NB: in RK3 Kmm = Kbb = Nbb) 283 283 IF(lwp) WRITE(numout,*) ' Kbb u, v and T-S fields read in the restart file' 284 CALL iom_get( numror, jpdom_auto, 'ub' 285 CALL iom_get( numror, jpdom_auto, 'vb' 284 CALL iom_get( numror, jpdom_auto, 'ub', uu(:,:,: ,Kbb), cd_type = 'U', psgn = -1._wp ) 285 CALL iom_get( numror, jpdom_auto, 'vb', vv(:,:,: ,Kbb), cd_type = 'V', psgn = -1._wp ) 286 286 CALL iom_get( numror, jpdom_auto, 'tb', ts(:,:,:,jp_tem,Kbb) ) 287 287 CALL iom_get( numror, jpdom_auto, 'sb', ts(:,:,:,jp_sal,Kbb) ) … … 289 289 ! !* Read Kmm fields (MLF only) 290 290 IF(lwp) WRITE(numout,*) ' Kmm u, v and T-S fields read in the restart file' 291 CALL iom_get( numror, jpdom_auto, 'un' 292 CALL iom_get( numror, jpdom_auto, 'vn' 291 CALL iom_get( numror, jpdom_auto, 'un', uu(:,:,: ,Kmm), cd_type = 'U', psgn = -1._wp ) 292 CALL iom_get( numror, jpdom_auto, 'vn', vv(:,:,: ,Kmm), cd_type = 'V', psgn = -1._wp ) 293 293 CALL iom_get( numror, jpdom_auto, 'tn', ts(:,:,:,jp_tem,Kmm) ) 294 294 CALL iom_get( numror, jpdom_auto, 'sn', ts(:,:,:,jp_sal,Kmm) ) … … 302 302 ELSE !* Leap frog restart (MLF only) 303 303 IF(lwp) WRITE(numout,*) ' Kbb u, v and T-S fields read in the restart file' 304 CALL iom_get( numror, jpdom_auto, 'ub' 305 CALL iom_get( numror, jpdom_auto, 'vb' 304 CALL iom_get( numror, jpdom_auto, 'ub', uu(:,:,: ,Kbb), cd_type = 'U', psgn = -1._wp ) 305 CALL iom_get( numror, jpdom_auto, 'vb', vv(:,:,: ,Kbb), cd_type = 'V', psgn = -1._wp ) 306 306 CALL iom_get( numror, jpdom_auto, 'tb', ts(:,:,:,jp_tem,Kbb) ) 307 307 CALL iom_get( numror, jpdom_auto, 'sb', ts(:,:,:,jp_sal,Kbb) )
Note: See TracChangeset
for help on using the changeset viewer.