Changeset 4249 for TOOLS/CPLRESTART
- Timestamp:
- 01/28/19 15:29:51 (5 years ago)
- Location:
- TOOLS/CPLRESTART
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/CPLRESTART/CreateRestartOce4Oasis.bash
r3707 r4249 39 39 # Default values 40 40 Comment="Preliminary attempt - Do not trust !" 41 IceVar=ice_pres # siconc #> Variable containing sea ice fraction [0-1] 41 ##IceVar=ice_pres # siconc #> Variable containing sea ice fraction [0-1] 42 IceVar=siconc #> Variable containing sea ice fraction [0-1] 42 43 43 44 # … … 99 100 ## Defines associated sea ice file 100 101 ## =========================================================================== 101 IceFile=$(echo ${OceFile} | sed 's=/OCE/=/ICE/=' | sed 's=grid_T=icemod=') 102 ###IceFile=$(echo ${OceFile} | sed 's=/OCE/=/ICE/=' | sed 's=grid_T=icemod=') 103 IceFile=${OceFile} 102 104 103 105 ## … … 114 116 ## =========================================================================== 115 117 dim_y=$(ncdump -h sstoce_fields_notime.nc | grep "y *=" | awk '{print $3}' ) 116 dim_x=$(ncdump -h sstoce_fields_notime.nc | grep "x *=" | awk '{print $3}' )118 dim_x=$(ncdump -h sstoce_fields_notime.nc | grep "x *=" | grep -v "nvertex" | awk '{print $3}' ) 117 119 echo ${dim_x} ${dim_y} 118 120 119 121 [[ ${dim_x} = 182 && ${dim_y} = 149 ]] && OCE=ORCA2.3 120 122 [[ ${dim_x} = 362 && ${dim_y} = 332 ]] && OCE=eORCA2.1 123 [[ ${dim_x} = 1442 && ${dim_y} = 1207 ]] && OCE=eORCA025.1 121 124 122 125 … … 126 129 127 130 cat <<EOF > create_sstoce.nco 128 OIceFrc 131 OIceFrc[y,x] = double ( ${IceVar}(:,:) ) ; 129 132 //tos.simple_fill_miss(tos) ; 130 O_SSTSST[y,x] = double ( (tos (:,:) + 273.15d) * (1.0d-OIceFrc ) ) ;133 O_SSTSST[y,x] = double ( (tos (:,:) + 273.15d) * (1.0d-OIceFrc(:,:)) ) ; 131 134 //O_AlbIce[y,x] = double ( ialb (:,:) * OIceFrc(:,:) ) ; 132 135 //O_TepIce[y,x] = double ( (tsice (:,:) + 273.15d) * OIceFrc(:,:) ) ; … … 139 142 140 143 ncap2 --overwrite --fl_fmt=${FL_FMT} --history --script-file create_sstoce.nco sstoce_fields_notime.nc tmp_sstoc.nc 141 142 144 ncks --fl_fmt=${FL_FMT} --overwrite --history --variable OIceFrc,O_SSTSST,O_AlbIce,O_TepIce,O_OCurx1,O_OCury1,O_OCurz1 tmp_sstoc.nc sstoc.nc 143 144 145 ncatted --history --attribute comment,O_SSTSST,o,c,"SST weighted by fraction of open ocean" sstoc.nc 145 ncatted --history --attribute comment,O_ SSTSST,o,c,"Albedo weighted by fraction of sea ice" sstoc.nc146 ncatted --history --attribute comment,O_ SSTSST,o,c,"Ice temperature weighted by fraction of sea ice" sstoc.nc146 ncatted --history --attribute comment,O_AlbIce,o,c,"Albedo weighted by fraction of sea ice" sstoc.nc 147 ncatted --history --attribute comment,O_TepIce,o,c,"Ice temperature weighted by fraction of sea ice" sstoc.nc 147 148 148 149 ## -
TOOLS/CPLRESTART/FillOceRestart.py
r3741 r4249 148 148 nperio = 6 149 149 print ("eORCA1 grid found from dimensions, nperio=6" ) 150 elif (jpoj, jpoi) == (1021, 1442) : 151 nperio = 4 152 print ("ORCA025 grid found from dimensions, nperio=6" ) 153 elif (jpoj, jpoi) == (1207, 1442) : 154 nperio = 4 155 print ("eORCA025 grid found from dimensions, nperio=6" ) 150 156 151 157 if nperio == None :
Note: See TracChangeset
for help on using the changeset viewer.