Changeset 4249


Ignore:
Timestamp:
01/28/19 15:29:51 (2 years ago)
Author:
cetlod
Message:

CPLRestart: update cplrestart tools for New NEMO files

Location:
TOOLS/CPLRESTART
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/CPLRESTART/CreateRestartOce4Oasis.bash

    r3707 r4249  
    3939# Default values 
    4040Comment="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] 
     42IceVar=siconc #> Variable containing sea ice fraction [0-1] 
    4243 
    4344# 
     
    99100## Defines associated sea ice file 
    100101## =========================================================================== 
    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=') 
     103IceFile=${OceFile} 
    102104 
    103105## 
     
    114116## =========================================================================== 
    115117dim_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}' ) 
     118dim_x=$(ncdump -h sstoce_fields_notime.nc | grep "x *=" | grep -v "nvertex" | awk '{print $3}' ) 
    117119echo ${dim_x} ${dim_y} 
    118120 
    119121[[ ${dim_x} = 182 && ${dim_y} = 149 ]] && OCE=ORCA2.3 
    120122[[ ${dim_x} = 362 && ${dim_y} = 332 ]] && OCE=eORCA2.1 
     123[[ ${dim_x} = 1442 && ${dim_y} = 1207 ]] && OCE=eORCA025.1 
    121124 
    122125 
     
    126129 
    127130cat <<EOF > create_sstoce.nco 
    128 OIceFrc        = double ( ${IceVar}(:,:) ) ;  
     131OIceFrc[y,x]   = double ( ${IceVar}(:,:) ) ;  
    129132//tos.simple_fill_miss(tos)               ; 
    130 O_SSTSST[y,x]  = double ( (tos   (:,:) + 273.15d) * (1.0d-OIceFrc) ) ; 
     133O_SSTSST[y,x]  = double ( (tos   (:,:) + 273.15d) * (1.0d-OIceFrc(:,:)) ) ; 
    131134//O_AlbIce[y,x]  = double ( ialb   (:,:)            * OIceFrc(:,:)   ) ; 
    132135//O_TepIce[y,x]  = double ( (tsice (:,:) + 273.15d) * OIceFrc(:,:)   ) ; 
     
    139142 
    140143ncap2 --overwrite --fl_fmt=${FL_FMT} --history --script-file create_sstoce.nco sstoce_fields_notime.nc tmp_sstoc.nc 
    141  
    142144ncks --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  
    144145ncatted --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.nc 
    146 ncatted --history --attribute comment,O_SSTSST,o,c,"Ice temperature weighted by fraction of sea ice" sstoc.nc 
     146ncatted --history --attribute comment,O_AlbIce,o,c,"Albedo weighted by fraction of sea ice"          sstoc.nc 
     147ncatted --history --attribute comment,O_TepIce,o,c,"Ice temperature weighted by fraction of sea ice" sstoc.nc 
    147148 
    148149## 
  • TOOLS/CPLRESTART/FillOceRestart.py

    r3741 r4249  
    148148        nperio = 6 
    149149        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" ) 
    150156         
    151157if nperio == None : 
Note: See TracChangeset for help on using the changeset viewer.