User Activity

  • Posted a comment on discussion Open Discussion on NCO netCDF Operators

    I am kind of new to nco and i am trying to create a global time series of percentage of areas under higher rainfall (prcp > 100 mm) for the period 1979-2025. Can any help me review my code if i am doing right? I have tried in CDO and want to try if this can also be done using NCO as i am having issues with cdo on my machine. Land mask: grid cells with valid precipitation at least once during the whole period. Missing values in the dataset are currently defined as 1.e+30f cdo setmisstoc,0 -ltc,1e10...

  • Posted a comment on discussion Open Discussion on NCO netCDF Operators

    I did solve this using nncecat -u level and ncks -A -v depth thanks for the help Charlie

  • Modified a comment on discussion Open Discussion on NCO netCDF Operators

    Hi Charlie, I used ncks -v depth -d nlayer,2 global.nc dp1.nc and changed the values. to update the original file, I merge the variable to the original file using different name (dp1) ncks -A ncks -v dp1.nc global.nc and then i tried to replace the original values using the updated values as ncap2 -s 'depth(1,:,:)=dp1;' global.nc global_updated.nc This gives me the following error ncap2: ERROR assign(): Hyperslab for depth - number of elements on LHS(12956) doesn't equal number of elements on RHS(38868)...

  • Posted a comment on discussion Open Discussion on NCO netCDF Operators

    Hi Charlie, i used ncks -v depth -d nlayer,2 global.nc dp1.nc and changed the values. to update the orginal file, I mege the varibale to the orginal file uing ncks -A ncks -v dp1.nc global.nc and then i tried to replace the orginale using the updated values ncap2 -s 'depth(1,:,:)=dp1;' global.nc global_updated.nc this gives me the following error ncap2: ERROR assign(): Hyperslab for depth - number of elements on LHS(12956) doesn't equal number of elements on RHS(38868) any idea how to solve this?...

  • Modified a comment on discussion Open Discussion on NCO netCDF Operators

    Hi Charlie, I managed to extract the layer and make the changes now how do I replace layer?

  • Posted a comment on discussion Open Discussion on NCO netCDF Operators

    Hi Charlie, I am trying to do this but i coudnt find a good way: 1. I cant extract the second layer of the varibale. If I use this to extract layer 2 of variable depth ncks -v depth(1,:,:) in.nc layer2.nc but am getting syntax error near unexpected token('` 2. how do i repace layers?

  • Modified a comment on discussion Open Discussion on NCO netCDF Operators

    Hi all, i am trying to change values of a second layer for a specfic area with 3 layer variable using ncap2 -s 'where((lat_2D >= 3.3 && lat_2D <= 8.5) && (lon >= 30 && lon <= 36)) {depth(1,:,:)=depth(1,:,:)+3.0;}' in.nc out.nc but this giving me the following error (note: if I use depth = depth+3 it works and add 3 to all layers but i only need to change the second layer ) the "where statement" cannot handle a variable with limits on the Left-Hand-Side of an assign statement. Please remove the limts...

  • Posted a comment on discussion Open Discussion on NCO netCDF Operators

    Hi all, i am trying to change values of a second layer for a specfic area with 3 layer variable using ncap2 -s 'where((lat_2D >= 3.3 && lat_2D <= 8.5) && (lon >= 30 && lon <= 36)) {depth(1,:,:)=depth(1,:,:)+3.0;}' in.nc out.nc but this giving me the following error (note: if I use depth = depth+3 it works and add 3 to all layers but i only need to change the second layer ) the "where statement" cannot handle a variable with limits on the Left-Hand-Side of an assign statement. Please remove the limts...

View All

Personal Data

Username:
solomonh
Joined:
2019-04-03 16:57:50

Projects

  • No projects to display.

Personal Tools

Monday.com Logo